UNPKG

record-editor

Version:

Editor (used in inspirehep.net) for JSON documents with bibliographic metadata

1 lines 97.4 kB
webpackJsonp([2],{L4VK:function(l,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e,t=u("/oeL"),o=function(){return function(){}}(),i=u("5qJj"),a=u("ipzd"),r=u("IksT"),s=u("d+d+"),c=u("J1Nk"),d=u("9ntG"),p=u("qbdv"),_=["span[_ngcontent-%COMP%]{display:inline-block}.add[_ngcontent-%COMP%]{color:green}.add[_ngcontent-%COMP%], .replace[_ngcontent-%COMP%]{font-weight:700}.replace[_ngcontent-%COMP%]{color:orange}.remove[_ngcontent-%COMP%]{color:red;text-decoration:line-through}"],h=function(){function l(){}return l.prototype.ngOnInit=function(){Array.isArray(this.value)?this.valueType="array":"object"===typeof this.value?this.valueType="object":this.valueType="primitive"},Object.defineProperty(l.prototype,"firstDiff",{get:function(){return this.diff?this.diff[0]:null},enumerable:!0,configurable:!0}),l}(),g=function(){function l(){this.keys=[],this.isExpandedMap=new Map,this.diffKeys=new Map,this.patchesMap=new Map,this.levelOffsetInPixels=10,this.shouldExpandKeys=!1}return l.prototype.expand=function(l){this.isExpandedMap.set(l,!0)},l.prototype.getPropertyStyle=function(l){return"add"===this.diffType&&this.diffKeys.has(l)?"add":"replace"===this.diffType&&this.diffKeys.has(l)?"replace":"remove"===this.diffType&&this.diffKeys.has(l)?"remove":null},l.prototype.getPatchesForChild=function(l){var n=this;return 1===this.diff.length?this.diff:this.diff.filter(function(u){return u.path[n.depth]===l})},l.prototype.isAddPatchForLeaf=function(l){return l.path.length===this.depth+1&&"add"===l.op},l}(),f=this&&this.__extends||(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u])},function(l,n){function u(){this.constructor=l}e(l,n),l.prototype=null===n?Object.create(n):(u.prototype=n.prototype,new u)}),m=function(l){function n(){var n=null!==l&&l.apply(this,arguments)||this;return n.pushedKey=!1,n}return f(n,l),n.prototype.ngOnInit=function(){var l=this;this.keys=Object.keys(this.value),this.diff&&(this.diff.forEach(function(n){l.isAddPatchForLeaf(n)?(l.value[n.path[l.depth]]=n.value,l.keys.push(n.path[l.depth]),l.setAndExtendDiffProperty(n.path[l.depth]),l.pushedKey=!0):n.path.length>l.depth?l.setAndExtendDiffProperty(n.path[l.depth]):n.path.length<=l.depth&&(l.shouldExpandKeys=!0),l.patchesMap.set(n.path[l.depth],l.getPatchesForChild(n.path[l.depth]))}),this.shouldExpandKeys&&this.keys.forEach(function(n){l.patchesMap.set(n,l.diff),l.setAndExtendDiffProperty(n)}),this.pushedKey&&this.keys.sort(),this.diffType=this.diff[0].op)},n.prototype.setAndExtendDiffProperty=function(l){this.diffKeys.set(l,!0),this.expand(l)},n.prototype.trackByItem=function(l,n){return n},n}(g),v=[[".collapsable[_ngcontent-%COMP%]{display:inline-block;border-radius:30px;padding:.3em .3em;font-size:11px;cursor:pointer}"],_],y=t._19({encapsulation:0,styles:v,data:{}});function C(l){return t._46(0,[(l()(),t._22(0,0,null,null,0,"i",[["aria-hidden","true"],["class","collapsable fa fa-caret-right fa-1"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.isExpandedMap.set(l.parent.context.$implicit,!0)&&e);return e},null,null))],null,null)}function b(l){return t._46(0,[(l()(),t._22(0,0,null,null,0,"i",[["aria-hidden","true"],["class","collapsable fa fa-caret-down fa-1"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.isExpandedMap.set(l.parent.context.$implicit,!1)&&e);return e},null,null))],null,null)}function x(l){return t._46(0,[(l()(),t._22(0,0,null,null,4,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,1,"re-any-type-node",[],null,null,null,J,N)),t._20(3,114688,null,0,h,[],{value:[0,"value"],diff:[1,"diff"],depth:[2,"depth"],expanded:[3,"expanded"]},null),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.value[n.parent.context.$implicit],u.patchesMap.get(n.parent.context.$implicit),u.depth+1,u.isExpandedMap.get(n.parent.context.$implicit))},null)}function S(l){return t._46(0,[(l()(),t._22(0,0,null,null,4,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,1,"re-any-type-node",[],null,null,null,J,N)),t._20(3,114688,null,0,h,[],{value:[0,"value"],depth:[1,"depth"],expanded:[2,"expanded"]},null),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.value[n.parent.context.$implicit],u.depth+1,u.isExpandedMap.get(n.parent.context.$implicit))},null)}function k(l){return t._46(0,[(l()(),t._22(0,0,null,null,20,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,17,"span",[],[[4,"margin-left","px"]],null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,C)),t._20(5,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,b)),t._20(8,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(10,0,null,null,2,"span",[],null,null,null,null,null)),t._20(11,278528,null,0,p.j,[t.A,t.B,t.p,t.P],{ngClass:[0,"ngClass"]},null),(l()(),t._44(12,null,["",""])),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,x)),t._20(15,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,S)),t._20(18,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n"]))],function(l,n){var u=n.component;l(n,5,0,!u.isExpandedMap.get(n.context.$implicit)),l(n,8,0,u.isExpandedMap.get(n.context.$implicit)),l(n,11,0,u.getPropertyStyle(n.context.$implicit)),l(n,15,0,u.diff&&u.diffKeys.has(n.context.$implicit)||u.shouldExpandKeys),l(n,18,0,(void 0===u.diff||!u.diffKeys.has(n.context.$implicit))&&!u.shouldExpandKeys)},function(l,n){var u=n.component;l(n,2,0,u.depth*u.levelOffsetInPixels),l(n,12,0,n.context.$implicit)})}function P(l){return t._46(0,[(l()(),t._16(16777216,null,null,1,null,k)),t._20(1,802816,null,0,p.k,[t._4,t.Z,t.A],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null)],function(l,n){var u=n.component;l(n,1,0,u.keys,u.trackByItem)},null)}t._17("re-object-node",m,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-object-node",[],null,null,null,P,y)),t._20(1,114688,null,0,m,[],null,null)],function(l,n){l(n,1,0)},null)},{value:"value",diff:"diff",depth:"depth",expanded:"expanded"},{},[]);var O=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u])};return function(n,u){function e(){this.constructor=n}l(n,u),n.prototype=null===u?Object.create(u):(e.prototype=u.prototype,new e)}}(),M=function(l){function n(){return null!==l&&l.apply(this,arguments)||this}return O(n,l),n.prototype.ngOnInit=function(){var l=this;this.diff&&(this.diff.forEach(function(n){l.isAddPatchForLeaf(n)?(l.value.push(n.value),l.diffKeys.set(n.path[l.depth],!0)):n.path.length<=l.depth?l.shouldExpandKeys=!0:n.path.length>l.depth&&l.diffKeys.set(n.path[l.depth],!0),l.patchesMap.set(n.path[l.depth],l.getPatchesForChild(n.path[l.depth]))}),this.diffType=this.diff[0].op)},n.prototype.trackByIndex=function(l){return l},n}(g),I=[[".array-bar[_ngcontent-%COMP%]{border-top:1px solid gray;background-color:#dae8ef;width:80px}"],_],w=t._19({encapsulation:0,styles:I,data:{}});function A(l){return t._46(0,[(l()(),t._22(0,0,null,null,0,"div",[["class","array-bar"]],[[4,"margin-left","px"]],null,null,null,null))],null,function(l,n){l(n,0,0,n.component.levelOffsetInPixels)})}function j(l){return t._46(0,[(l()(),t._22(0,0,null,null,4,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,1,"re-any-type-node",[],null,null,null,J,N)),t._20(3,114688,null,0,h,[],{value:[0,"value"],diff:[1,"diff"],depth:[2,"depth"],expanded:[3,"expanded"]},null),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,n.parent.context.$implicit,u.patchesMap.get(n.parent.context.index),u.depth+1,!0)},null)}function E(l){return t._46(0,[(l()(),t._22(0,0,null,null,4,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,1,"re-any-type-node",[],null,null,null,J,N)),t._20(3,114688,null,0,h,[],{value:[0,"value"],depth:[1,"depth"],expanded:[2,"expanded"]},null),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,n.parent.context.$implicit,u.depth+1,!0)},null)}function T(l){return t._46(0,[(l()(),t._22(0,0,null,null,13,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,10,"span",[],[[4,"margin-left","px"]],null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,A)),t._20(5,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,j)),t._20(8,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,E)),t._20(11,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,n.context.index>0),l(n,8,0,u.diff&&u.diffKeys.has(n.context.index)||u.shouldExpandKeys),l(n,11,0,(!u.diff||!u.diffKeys.has(n.context.index))&&!u.shouldExpandKeys)},function(l,n){var u=n.component;l(n,2,0,u.depth*u.levelOffsetInPixels)})}function V(l){return t._46(0,[(l()(),t._16(16777216,null,null,1,null,T)),t._20(1,802816,null,0,p.k,[t._4,t.Z,t.A],{ngForOf:[0,"ngForOf"],ngForTrackBy:[1,"ngForTrackBy"]},null)],function(l,n){var u=n.component;l(n,1,0,u.value,u.trackByIndex)},null)}t._17("re-array-node",M,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-array-node",[],null,null,null,V,w)),t._20(1,114688,null,0,M,[],null,null)],function(l,n){l(n,1,0)},null)},{value:"value",diff:"diff",depth:"depth",expanded:"expanded"},{},[]);var R=function(){function l(){}return l.prototype.ngOnInit=function(){this.value;this.diff&&"replace"===this.diff.op&&(this.newValue=this.diff.value)},l}(),F=[[".value-text[_ngcontent-%COMP%]{color:blue}"],_],K=t._19({encapsulation:0,styles:F,data:{}});function D(l){return t._46(0,[(l()(),t._22(0,0,null,null,2,"span",[],null,null,null,null,null)),t._20(1,278528,null,0,p.j,[t.A,t.B,t.p,t.P],{ngClass:[0,"ngClass"]},null),(l()(),t._44(2,null,["",""]))],function(l,n){l(n,1,0,n.component.diff.op)},function(l,n){l(n,2,0,n.component.value)})}function Z(l){return t._46(0,[(l()(),t._22(0,0,null,null,8,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,1,"span",[["class","add"]],null,null,null,null,null)),(l()(),t._44(3,null,["",""])),(l()(),t._22(4,0,null,null,0,"br",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(6,0,null,null,1,"span",[["class","remove"]],null,null,null,null,null)),(l()(),t._44(7,null,["",""])),(l()(),t._44(-1,null,["\n "]))],null,function(l,n){var u=n.component;l(n,3,0,u.newValue),l(n,7,0,u.value)})}function U(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"span",[],null,null,null,null,null)),(l()(),t._44(1,null,["",""]))],null,function(l,n){l(n,1,0,n.component.value)})}function Q(l){return t._46(0,[(l()(),t._22(0,0,null,null,10,"span",[["class","value-text"]],[[4,"margin-left","px"]],null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,D)),t._20(3,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,Z)),t._20(6,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,U)),t._20(9,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,3,0,u.diff&&"replace"!==u.diff.op),l(n,6,0,u.diff&&"replace"===u.diff.op),l(n,9,0,!u.diff)},function(l,n){l(n,0,0,10*n.component.depth)})}t._17("re-primitive-node",R,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-primitive-node",[],null,null,null,Q,K)),t._20(1,114688,null,0,R,[],null,null)],function(l,n){l(n,1,0)},null)},{value:"value",diff:"diff",depth:"depth"},{},[]);var $=[[""]],N=t._19({encapsulation:0,styles:$,data:{}});function z(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-object-node",[],null,null,null,P,y)),t._20(1,114688,null,0,m,[],{value:[0,"value"],diff:[1,"diff"],depth:[2,"depth"]},null)],function(l,n){var u=n.component;l(n,1,0,u.value,u.diff,u.depth)},null)}function B(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-array-node",[],null,null,null,V,w)),t._20(1,114688,null,0,M,[],{value:[0,"value"],diff:[1,"diff"],depth:[2,"depth"]},null)],function(l,n){var u=n.component;l(n,1,0,u.value,u.diff,u.depth)},null)}function q(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-primitive-node",[],null,null,null,Q,K)),t._20(1,114688,null,0,R,[],{value:[0,"value"],diff:[1,"diff"],depth:[2,"depth"]},null)],function(l,n){var u=n.component;l(n,1,0,u.value,u.firstDiff,u.depth)},null)}function L(l){return t._46(0,[(l()(),t._22(0,0,null,null,14,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,11,"div",[],null,null,null,null,null)),t._20(3,16384,null,0,p.o,[],{ngSwitch:[0,"ngSwitch"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,z)),t._20(6,278528,null,0,p.p,[t._4,t.Z,p.o],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,B)),t._20(9,278528,null,0,p.p,[t._4,t.Z,p.o],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,q)),t._20(12,278528,null,0,p.p,[t._4,t.Z,p.o],{ngSwitchCase:[0,"ngSwitchCase"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n "]))],function(l,n){l(n,3,0,n.component.valueType);l(n,6,0,"object");l(n,9,0,"array");l(n,12,0,"primitive")},null)}function J(l){return t._46(0,[(l()(),t._16(16777216,null,null,1,null,L)),t._20(1,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null)],function(l,n){l(n,1,0,n.component.expanded)},null)}t._17("re-any-type-node",h,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-any-type-node",[],null,null,null,J,N)),t._20(1,114688,null,0,h,[],null,null)],function(l,n){l(n,1,0)},null)},{value:"value",diff:"diff",depth:"depth",expanded:"expanded"},{},[]);var W=u("bm2B"),X=u("0Y1R"),G=u("poDJ"),H=u("2xpM"),Y=function(){function l(){this.separator=".",this.schemaKeyStoreMap={},this.schema={}}return l.prototype.forPath=function(l){return""===l?this.schemaKeyStoreMap[""].toArray():this.schemaKeyStoreMap[""+this.separator+l]?this.schemaKeyStoreMap[""+this.separator+l].toArray():[]},l.prototype.buildSchemaKeyStore=function(l){this.schema=l,this.buildSchemaKeyStoreRecursively("",l)},l.prototype.buildSchemaKeyStoreRecursively=function(l,n){var u=this;if("object"===n.type){var e=Object.keys(n.properties);this.schemaKeyStoreMap[l]=Object(H.fromJS)(e).toOrderedSet(),e.filter(function(l){return u.isObjectOrArraySchema(n.properties[l])}).forEach(function(e){var t=""+l+u.separator+e;u.buildSchemaKeyStoreRecursively(t,n.properties[e])})}if("array"===n.type&&"object"===n.items.type){e=Object.keys(n.items.properties);this.schemaKeyStoreMap[l]=Object(H.fromJS)(e).toOrderedSet(),e.filter(function(l){return u.isObjectOrArraySchema(n.items.properties[l])}).forEach(function(e){var t=""+l+u.separator+e;u.buildSchemaKeyStoreRecursively(t,n.items.properties[e])})}},l.prototype.isObjectOrArraySchema=function(l){return"object"===l.type||"array"===l.type},l.prototype.findSubSchema=function(l){var n=this.schema;if(""===l)return n;var u=l.split(this.separator);for(var e in u)if("object"===n.type){if(!n.properties[u[e]])return null;n=n.properties[u[e]]}else if("array"===n.type){if(!n.items.properties[u[e]])return null;n=n.items.properties[u[e]]}return"array"===n.type&&(n=n.items),"object"!==n.type?{type:"object",alwaysShow:["value"],properties:{value:n}}:n},l.ctorParameters=function(){return[]},l}(),ll=u("AP4T"),nl=u("TO51"),ul=(u("ivSB"),u("GQSG"),function(){function l(l){var n=this;this.schemaKeysStoreService=l,this.tagsEnabled=!1,this.valueChange=new t.r,this.valueChange$=new nl.a,this.value="",this.selectedValues=Object(H.Set)(),this.currentPath="",this.typeaheadNoResults=!1,this.tagShortcut="space",this.dataSource=ll.a.create(function(l){l.next(n.value)}).map(function(l){return n.getStateForValue(l)}).do(function(l){n.currentPath=l.path}).mergeMap(function(l){return ll.a.of(n.schemaKeysStoreService.forPath(l.path).filter(function(n){return n.startsWith(l.query)}))}),this.valueChange$.debounceTime(500).subscribe(function(l){n.valueChange.emit(l)})}return l.prototype.modelChange=function(l){this.value=l,this.valueChange$.next(this.value)},l.prototype.onSpaceKeydown=function(l){this.tagsEnabled&&(l.preventDefault(),this.selectedValues=this.selectedValues.add(this.value),this.value="",this.valueChange.emit(this.selectedValues))},l.prototype.selectUserInput=function(l){""!==this.currentPath?this.value=""+this.currentPath+this.schemaKeysStoreService.separator+l.value:this.value=l.value,this.tagsEnabled||this.valueChange$.next(this.value)},l.prototype.getStateForValue=function(l){var n,u,e=l.lastIndexOf(this.schemaKeysStoreService.separator);return e<0?(n="",u=l):e===l.length-1?(n=l.slice(0,-1),u=""):(n=l.slice(0,e),u=l.slice(e+1)),{path:n,query:u}},l.prototype.removeValue=function(l){this.selectedValues=this.selectedValues.remove(l),this.valueChange.emit(this.selectedValues)},l.ctorParameters=function(){return[{type:Y}]},l}()),el=[[".tags-input[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);display:inline-block;padding:2px 3px;color:#555;vertical-align:middle;border-radius:3px;line-height:1.5;height:30px;cursor:text}.tags-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:none;box-shadow:none;outline:none;background-color:transparent;padding:0 6px;margin:0;width:auto}.tags-input[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%]{margin-right:2px;color:#fff;background-color:#337ab7;font-size:12px}.tags-input[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%] i.fa.fa-remove[_ngcontent-%COMP%]{cursor:pointer;margin-left:8px}.tags-input[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%] i.fa.fa-remove[_ngcontent-%COMP%]:hover{text-shadow:2px 2px rgba(0,0,0,.5);box-shadow:inset 2px 2px rgba(0,0,0,.2)}.danger[_ngcontent-%COMP%]{background-color:#f2dede!important;border-color:#ebccd1!important;color:#a94442}"]],tl=t._19({encapsulation:0,styles:el,data:{}});function ol(l){return t._46(0,[(l()(),t._22(0,0,null,null,0,"div",[],null,null,null,null,null))],null,null)}function il(l){return t._46(0,[(l()(),t._44(-1,null,["\n "])),(l()(),t._22(1,16777216,null,null,6,"input",[["class","form-control input-sm"]],[[2,"danger",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"typeaheadNoResults"],[null,"typeaheadOnSelect"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"keyup"],[null,"click"],[null,"focus"],[null,"keydown"]],function(l,n,u){var e=!0,o=l.component;"input"===n&&(e=!1!==t._36(l,2)._handleInput(u.target.value)&&e);"blur"===n&&(e=!1!==t._36(l,2).onTouched()&&e);"compositionstart"===n&&(e=!1!==t._36(l,2)._compositionStart()&&e);"compositionend"===n&&(e=!1!==t._36(l,2)._compositionEnd(u.target.value)&&e);"input"===n&&(e=!1!==t._36(l,7).onInput(u)&&e);"keyup"===n&&(e=!1!==t._36(l,7).onChange(u)&&e);"click"===n&&(e=!1!==t._36(l,7).onFocus()&&e);"focus"===n&&(e=!1!==t._36(l,7).onFocus()&&e);"blur"===n&&(e=!1!==t._36(l,7).onBlur()&&e);"keydown"===n&&(e=!1!==t._36(l,7).onKeydown(u)&&e);"ngModelChange"===n&&(e=!1!==o.modelChange(u)&&e);"typeaheadNoResults"===n&&(e=!1!==(o.typeaheadNoResults=u)&&e);"typeaheadOnSelect"===n&&(e=!1!==o.selectUserInput(u)&&e);return e},null,null)),t._20(2,16384,null,0,W.d,[t.Q,t.p,[2,W.a]],null,null),t._41(1024,null,W.f,function(l){return[l]},[W.d]),t._20(4,671744,null,0,W.k,[[8,null],[8,null],[8,null],[2,W.f]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),t._41(2048,null,W.g,null,[W.k]),t._20(6,16384,null,0,W.h,[W.g],null,null),t._20(7,212992,null,0,X.a,[W.g,t.p,t._4,t.Q,G.a],{typeahead:[0,"typeahead"],typeaheadMinLength:[1,"typeaheadMinLength"]},{typeaheadNoResults:"typeaheadNoResults",typeaheadOnSelect:"typeaheadOnSelect"}),(l()(),t._44(-1,null,["\n"]))],function(l,n){var u=n.component;l(n,4,0,u.disabled,u.value);l(n,7,0,u.dataSource,0)},function(l,n){l(n,1,0,n.component.typeaheadNoResults,t._36(n,6).ngClassUntouched,t._36(n,6).ngClassTouched,t._36(n,6).ngClassPristine,t._36(n,6).ngClassDirty,t._36(n,6).ngClassValid,t._36(n,6).ngClassInvalid,t._36(n,6).ngClassPending)})}function al(l){return t._46(0,[(l()(),t._22(0,0,null,null,3,"span",[["class","label label-info tag"]],null,null,null,null,null)),(l()(),t._44(1,null,["\n "," "])),(l()(),t._22(2,0,null,null,0,"i",[["class","fa fa-remove"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.removeValue(l.context.$implicit)&&e);return e},null,null)),(l()(),t._44(-1,null,["\n "]))],null,function(l,n){l(n,1,0,n.context.$implicit)})}function rl(l){return t._46(0,[(l()(),t._44(-1,null,["\n "])),(l()(),t._22(1,0,null,null,12,"div",[["class","tags-input"]],[[2,"danger",null]],null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,al)),t._20(4,802816,null,0,p.k,[t._4,t.Z,t.A],{ngForOf:[0,"ngForOf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(6,16777216,null,null,6,"input",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"typeaheadNoResults"],[null,"typeaheadOnSelect"],[null,"keydown.space"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"keyup"],[null,"click"],[null,"focus"],[null,"keydown"]],function(l,n,u){var e=!0,o=l.component;"input"===n&&(e=!1!==t._36(l,7)._handleInput(u.target.value)&&e);"blur"===n&&(e=!1!==t._36(l,7).onTouched()&&e);"compositionstart"===n&&(e=!1!==t._36(l,7)._compositionStart()&&e);"compositionend"===n&&(e=!1!==t._36(l,7)._compositionEnd(u.target.value)&&e);"input"===n&&(e=!1!==t._36(l,12).onInput(u)&&e);"keyup"===n&&(e=!1!==t._36(l,12).onChange(u)&&e);"click"===n&&(e=!1!==t._36(l,12).onFocus()&&e);"focus"===n&&(e=!1!==t._36(l,12).onFocus()&&e);"blur"===n&&(e=!1!==t._36(l,12).onBlur()&&e);"keydown"===n&&(e=!1!==t._36(l,12).onKeydown(u)&&e);"ngModelChange"===n&&(e=!1!==(o.value=u)&&e);"typeaheadNoResults"===n&&(e=!1!==(o.typeaheadNoResults=u)&&e);"typeaheadOnSelect"===n&&(e=!1!==o.selectUserInput(u)&&e);"keydown.space"===n&&(e=!1!==o.onSpaceKeydown(u)&&e);return e},null,null)),t._20(7,16384,null,0,W.d,[t.Q,t.p,[2,W.a]],null,null),t._41(1024,null,W.f,function(l){return[l]},[W.d]),t._20(9,671744,null,0,W.k,[[8,null],[8,null],[8,null],[2,W.f]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),t._41(2048,null,W.g,null,[W.k]),t._20(11,16384,null,0,W.h,[W.g],null,null),t._20(12,212992,null,0,X.a,[W.g,t.p,t._4,t.Q,G.a],{typeahead:[0,"typeahead"],typeaheadMinLength:[1,"typeaheadMinLength"]},{typeaheadNoResults:"typeaheadNoResults",typeaheadOnSelect:"typeaheadOnSelect"}),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n"]))],function(l,n){var u=n.component;l(n,4,0,u.selectedValues),l(n,9,0,u.disabled,u.value);l(n,12,0,u.dataSource,0)},function(l,n){l(n,1,0,n.component.typeaheadNoResults),l(n,6,0,t._36(n,11).ngClassUntouched,t._36(n,11).ngClassTouched,t._36(n,11).ngClassPristine,t._36(n,11).ngClassDirty,t._36(n,11).ngClassValid,t._36(n,11).ngClassInvalid,t._36(n,11).ngClassPending)})}function sl(l){return t._46(2,[(l()(),t._16(16777216,null,null,1,null,ol)),t._20(1,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"],ngIfThen:[1,"ngIfThen"],ngIfElse:[2,"ngIfElse"]},null),(l()(),t._44(-1,null,["\n\n"])),(l()(),t._16(0,[["defaultTemplate",2]],null,0,null,il)),(l()(),t._44(-1,null,["\n\n"])),(l()(),t._16(0,[["tagTemplate",2]],null,0,null,rl))],function(l,n){l(n,1,0,n.component.tagsEnabled,t._36(n,5),t._36(n,3))},null)}t._17("re-autocomplete-input",ul,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-autocomplete-input",[],null,null,null,sl,tl)),t._20(1,49152,null,0,ul,[Y],null,null)],null,null)},{disabled:"disabled",className:"className",placeholder:"placeholder",tagsEnabled:"tagsEnabled"},{valueChange:"valueChange"},[]);var cl=u("rggq"),dl=u("LmfY"),pl=u("dWcS"),_l=(u("XD1n"),u("CPp0")),hl=u("Oryw"),gl=u("1j/l"),fl=u("E9/g"),ml=u("lI6h"),vl=u("qgI0"),yl=u("X3fp"),Cl=this&&this.__extends||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u]);function e(){this.constructor=l}l.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)};function bl(){for(var l=[],n=0;n<arguments.length;n++)l[n-0]=arguments[n];var u=l[l.length-1];return"function"===typeof u&&l.pop(),new hl.a(l).lift(new xl(u))}var xl=function(){function l(l){this.project=l}return l.prototype.call=function(l,n){return n.subscribe(new Sl(l,this.project))},l}(),Sl=function(l){function n(n,u,e){void 0===e&&(e=Object.create(null)),l.call(this,n),this.iterators=[],this.active=0,this.project="function"===typeof u?u:null,this.values=e}return Cl(n,l),n.prototype._next=function(l){var n=this.iterators;Object(gl.a)(l)?n.push(new Pl(l)):"function"===typeof l[yl.a]?n.push(new kl(l[yl.a]())):n.push(new Ol(this.destination,this,l))},n.prototype._complete=function(){var l=this.iterators,n=l.length;if(0!==n){this.active=n;for(var u=0;u<n;u++){var e=l[u];e.stillUnsubscribed?this.add(e.subscribe(e,u)):this.active--}}else this.destination.complete()},n.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},n.prototype.checkIterators=function(){for(var l=this.iterators,n=l.length,u=this.destination,e=0;e<n;e++){if("function"===typeof(i=l[e]).hasValue&&!i.hasValue())return}var t=!1,o=[];for(e=0;e<n;e++){var i,a=(i=l[e]).next();if(i.hasCompleted()&&(t=!0),a.done)return void u.complete();o.push(a.value)}this.project?this._tryProject(o):u.next(o),t&&u.complete()},n.prototype._tryProject=function(l){var n;try{n=this.project.apply(this,l)}catch(l){return void this.destination.error(l)}this.destination.next(n)},n}(fl.a),kl=function(){function l(l){this.iterator=l,this.nextResult=l.next()}return l.prototype.hasValue=function(){return!0},l.prototype.next=function(){var l=this.nextResult;return this.nextResult=this.iterator.next(),l},l.prototype.hasCompleted=function(){var l=this.nextResult;return l&&l.done},l}(),Pl=function(){function l(l){this.array=l,this.index=0,this.length=0,this.length=l.length}return l.prototype[yl.a]=function(){return this},l.prototype.next=function(l){var n=this.index++,u=this.array;return n<this.length?{value:u[n],done:!1}:{value:null,done:!0}},l.prototype.hasValue=function(){return this.array.length>this.index},l.prototype.hasCompleted=function(){return this.array.length===this.index},l}(),Ol=function(l){function n(n,u,e){l.call(this,n),this.parent=u,this.observable=e,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return Cl(n,l),n.prototype[yl.a]=function(){return this},n.prototype.next=function(){var l=this.buffer;return 0===l.length&&this.isComplete?{value:null,done:!0}:{value:l.shift(),done:!1}},n.prototype.hasValue=function(){return this.buffer.length>0},n.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},n.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},n.prototype.notifyNext=function(l,n,u,e,t){this.buffer.push(n),this.parent.checkIterators()},n.prototype.subscribe=function(l,n){return Object(vl.a)(this,this.observable,this,n)},n}(ml.a),Ml=bl;ll.a.zip=Ml;var Il=u("p5Ee"),wl=u("VWpA"),Al=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var u in n)n.hasOwnProperty(u)&&(l[u]=n[u])};return function(n,u){function e(){this.constructor=n}l(n,u),n.prototype=null===u?Object.create(u):(e.prototype=u.prototype,new e)}}(),jl=function(l){function n(n){var u=l.call(this,n)||this;return u.http=n,u.url=Il.a.baseUrl+"/api/multieditor",u.schemaUrl=Il.a.baseUrl+"/schemas/records",u}return Al(n,l),n.prototype.save=function(l,n,u){return this.http.post(this.url+"/update",{userActions:l,ids:n,allSelected:u}).map(function(l){return l.json()})},n.prototype.previewActions=function(l,n,u){return this.http.post(this.url+"/preview",{userActions:l,number:n,size:u}).map(function(l){return l.json()})},n.prototype.fetchPaginatedRecords=function(l,n){return this.http.get(this.url+"/search?number="+l+"&size="+n).map(function(l){return l.json()})},n.prototype.searchRecords=function(l,n,u,e){return this.http.get(this.url+"/search?page="+n+"&q="+l+"&index="+u+"&size="+e).map(function(l){return l.json()})},n.prototype.fetchCollectionSchema=function(l){return this.http.get(this.schemaUrl+"/"+l+".json").map(function(l){return l.json()})},n.ctorParameters=function(){return[{type:_l.e}]},n}(wl.b),El=function(){function l(){this.userActions={actions:[],conditions:[]}}return l.prototype.addAction=function(l,n){var u={actionName:l,mainKey:"",value:"",updateValue:"",matchType:n};this.userActions.actions.push(u)},l.prototype.addCondition=function(l){var n={key:"",value:"",matchType:l};this.userActions.conditions.push(n)},l.prototype.removeAction=function(l){this.userActions.actions.splice(l,1)},l.prototype.removeCondition=function(l){this.userActions.conditions.splice(l,1)},l.prototype.getUserActions=function(){return this.userActions},l}(),Tl=u("xrDH"),Vl=function(){function l(l,n){this.recordCleanupService=l,this.schemaKeysStoreService=n}return l.prototype.filterObjectArray=function(l,n){var u=this;return l.map(function(l){return u.filterObject(l,Object(H.Set)([n]))}).filter(function(l){return!u.recordCleanupService.isEmpty(l)})},l.prototype.filterObject=function(l,n){var u=this,e={};return n.forEach(function(n){var t=u.filterObjectRecursively(l,n);t&&Tl.merge(e,t)}),this.recordCleanupService.cleanup(e),e},l.prototype.filterObjectRecursively=function(l,n,u){var e=this;void 0===u&&(u=0);var t=n.split(this.schemaKeysStoreService.separator),o=u<t.length?t[u]:void 0;if(!o)return l;if(l[o]){if(Array.isArray(l[o])){var i=l[o].map(function(l){return e.filterObjectRecursively(l,n,u+1)});return(a={})[o]=i,a}if("object"===typeof l[o]){i=this.filterObjectRecursively(l[o],n,u+1);return this.recordCleanupService.isEmpty(i)?void 0:((r={})[o]=i,r)}return(s={})[o]=l[o],s;var a,r,s}},l.ctorParameters=function(){return[{type:wl.g},{type:Y}]},l}(),Rl=u("wvet"),Fl=function(){function l(l,n,u,e,t,o){this.schemaKeysStoreService=l,this.changeDetectorRef=n,this.apiService=u,this.userActionsService=e,this.jsonFilterService=t,this.toastr=o,this.currentPage=1,this.totalRecords=-1,this.pageSize=10,this.lastSearchedQuery="",this.allSelected=!0,this.recordSelectionStatus={},this.previewMode=!1,this.uuids=[],this.collections=[["hep","HEP"],["authors","Authors"],["data","Data"],["conferences","Conferences"],["jobs","Jobs"],["institutions","Institutions"],["experiments","Experiments"],["journals","Journals"]]}return l.prototype.ngOnInit=function(){this.selectedCollection=this.collections[0][0],this.onCollectionChange("hep")},l.prototype.onSave=function(){var l=this,n=Object.keys(this.recordSelectionStatus).filter(function(n){return l.recordSelectionStatus[n]!==l.allSelected});this.apiService.save(this.previewedActions,n,this.allSelected).subscribe(function(n){l.successMessage=n.message,l.totalRecords=-1,l.changeDetectorRef.markForCheck()},function(n){l.displayErrorMessage(n),l.changeDetectorRef.markForCheck()})},l.prototype.selectAll=function(){var l=this;this.allSelected=!0,Object.keys(this.recordSelectionStatus).forEach(function(n){l.recordSelectionStatus[n]=!0}),this.changeDetectorRef.markForCheck()},l.prototype.deselectAll=function(){var l=this;this.allSelected=!1,Object.keys(this.recordSelectionStatus).forEach(function(n){l.recordSelectionStatus[n]=!1}),this.changeDetectorRef.markForCheck()},l.prototype.setSelectionStatusesForNewPageRecords=function(){var l=this;this.recordSelectionStatus.hasOwnProperty(this.uuids[0])||this.uuids.forEach(function(n){l.recordSelectionStatus[n]=l.allSelected})},Object.defineProperty(l.prototype,"userActions",{get:function(){return this.userActionsService.getUserActions()},enumerable:!0,configurable:!0}),l.prototype.onPreviewClick=function(){this.previewedActions=this.userActions,this.previewActions()},l.prototype.previewActions=function(){var l=this;this.hasAnyNonEmptyAction(this.userActions)?this.validateActionsKeypaths(this.userActions)?this.apiService.previewActions(this.userActions,this.currentPage,this.pageSize).subscribe(function(n){l.records=n.json_records,l.jsonPatches=n.json_patches,l.validationErrors=n.errors,l.previewMode=!0,l.filterRecords(),l.changeDetectorRef.markForCheck()},function(n){l.displayErrorMessage(n)}):this.toastr.error("Please use valid paths provided by autocompletion"):this.toastr.error("Please use at least one action to preview")},l.prototype.onPageChange=function(l){this.currentPage=l,this.previewMode?this.previewActions():this.fetchPage()},l.prototype.fetchPage=function(){var l=this;this.apiService.fetchPaginatedRecords(this.currentPage,this.pageSize).subscribe(function(n){l.records=n.json_records,l.uuids=n.uuids,l.setSelectionStatusesForNewPageRecords(),l.filterRecords(),l.changeDetectorRef.markForCheck()},function(n){l.displayErrorMessage(n)})},Object.defineProperty(l.prototype,"isSearching",{get:function(){return!(!this.searchSubscription||this.searchSubscription.closed)},enumerable:!0,configurable:!0}),l.prototype.onSearch=function(l){void 0===l&&(l=""),this.lastSearchedCollection=this.selectedCollection,this.currentPage=1,this.allSelected=!0,this.previewMode=!1,this.recordSelectionStatus={},this.lastSearchedQuery=l,this.queryCollection(l,this.selectedCollection)},l.prototype.queryCollection=function(l,n){var u=this;this.successMessage=void 0,this.searchSubscription=this.apiService.searchRecords(l,this.currentPage,n,this.pageSize).subscribe(function(l){u.previewMode=!1,u.records=l.json_records,u.totalRecords=l.total_records,u.uuids=l.uuids,u.setSelectionStatusesForNewPageRecords(),u.filterRecords(),u.changeDetectorRef.markForCheck()},function(l){u.displayErrorMessage(l),u.totalRecords=-1,u.changeDetectorRef.markForCheck()})},l.prototype.onCollectionChange=function(l){var n=this;this.selectedCollection=l,this.apiService.fetchCollectionSchema(this.selectedCollection).subscribe(function(l){n.schema=l,n.schemaKeysStoreService.buildSchemaKeyStore(n.schema)},function(l){n.displayErrorMessage(l)})},l.prototype.trackByItem=function(l,n){return n},l.prototype.filterRecord=function(l){return this.filterExpressions&&this.filterExpressions.size>0?this.jsonFilterService.filterObject(l,this.filterExpressions):l},l.prototype.filterRecords=function(){var l=this;this.filteredRecords=this.records.map(function(n){return l.filterRecord(n)}),this.changeDetectorRef.markForCheck()},l.prototype.hasAnyNonEmptyAction=function(l){return l.actions.some(function(l){return Boolean(l.mainKey)})},l.prototype.displayErrorMessage=function(l){var n=l.json().message||"Something went wrong :)";this.toastr.error(n)},l.prototype.validateActionsKeypaths=function(l){var n=this,u=l.actions.some(function(l){return!n.schemaKeysStoreService.findSubSchema(l.mainKey)});return u||(u=l.conditions.some(function(l){return!n.schemaKeysStoreService.findSubSchema(l.key)})),!u},l.ctorParameters=function(){return[{type:Y},{type:t.j},{type:jl},{type:El},{type:Vl},{type:Rl.h}]},l}(),Kl=function(){function l(){this.search=new t.r,this.collectionChange=new t.r,this.save=new t.r}return l.prototype.onCollectionChange=function(l){this.collectionChange.emit(l)},l.prototype.onSearch=function(l){this.search.emit(l)},l}(),Dl=function(){function l(){this.selectedCollection="hep",this.query="",this.search=new t.r,this.collectionChange=new t.r,this.collections=[{name:"hep",value:"Literature"},{name:"authors",value:"Authors"},{name:"data",value:"Data"},{name:"conferences",value:"Conferences"},{name:"jobs",value:"Jobs"},{name:"institutions",value:"Institutions"},{name:"experiments",value:"Experiments"},{name:"journals",value:"Journals"}]}return l.prototype.onSearchClick=function(l){this.search.emit(l)},l.prototype.onCollectionChange=function(l){this.selectedCollection=l,this.collectionChange.emit(l)},l}(),Zl=[[".search-button[_ngcontent-%COMP%]{padding:4.2px 12px}"]],Ul=t._19({encapsulation:0,styles:Zl,data:{}});function Ql(l){return t._46(0,[(l()(),t._22(0,0,null,null,3,"option",[],null,null,null,null,null)),t._20(1,147456,null,0,W.l,[t.p,t.Q,[2,W.m]],{ngValue:[0,"ngValue"]},null),t._20(2,147456,null,0,W.r,[t.p,t.Q,[8,null]],{ngValue:[0,"ngValue"]},null),(l()(),t._44(3,null,[" "," "]))],function(l,n){l(n,1,0,n.context.$implicit.name),l(n,2,0,n.context.$implicit.name)},function(l,n){l(n,3,0,n.context.$implicit.value)})}function $l(l){return t._46(0,[(l()(),t._22(0,0,null,null,9,"select",[["class","form-control input-sm"],["name","collections"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"change"],[null,"blur"]],function(l,n,u){var e=!0,o=l.component;"change"===n&&(e=!1!==t._36(l,1).onChange(u.target.value)&&e);"blur"===n&&(e=!1!==t._36(l,1).onTouched()&&e);"ngModelChange"===n&&(e=!1!==o.onCollectionChange(u)&&e);return e},null,null)),t._20(1,16384,null,0,W.m,[t.Q,t.p],null,null),t._41(1024,null,W.f,function(l){return[l]},[W.m]),t._20(3,671744,null,0,W.k,[[8,null],[8,null],[8,null],[2,W.f]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),t._41(2048,null,W.g,null,[W.k]),t._20(5,16384,null,0,W.h,[W.g],null,null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,Ql)),t._20(8,802816,null,0,p.k,[t._4,t.Z,t.A],{ngForOf:[0,"ngForOf"]},null),(l()(),t._44(-1,null,["\n"])),(l()(),t._44(-1,null,["\n"])),(l()(),t._22(11,0,null,null,14,"div",[["class","input-group"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(13,0,null,null,5,"input",[["class","form-control input-sm"],["placeholder","Search records"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keyup.enter"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(l,n,u){var e=!0,o=l.component;"input"===n&&(e=!1!==t._36(l,14)._handleInput(u.target.value)&&e);"blur"===n&&(e=!1!==t._36(l,14).onTouched()&&e);"compositionstart"===n&&(e=!1!==t._36(l,14)._compositionStart()&&e);"compositionend"===n&&(e=!1!==t._36(l,14)._compositionEnd(u.target.value)&&e);"ngModelChange"===n&&(e=!1!==(o.query=u)&&e);"keyup.enter"===n&&(e=!1!==o.onSearchClick(o.query)&&e);return e},null,null)),t._20(14,16384,null,0,W.d,[t.Q,t.p,[2,W.a]],null,null),t._41(1024,null,W.f,function(l){return[l]},[W.d]),t._20(16,671744,null,0,W.k,[[8,null],[8,null],[8,null],[2,W.f]],{model:[0,"model"]},{update:"ngModelChange"}),t._41(2048,null,W.g,null,[W.k]),t._20(18,16384,null,0,W.h,[W.g],null,null),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(20,0,null,null,4,"span",[["class","input-group-btn"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(22,0,null,null,1,"button",[["class","btn btn-default search-button"],["type","button"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.onSearchClick(t.query)&&e);return e},null,null)),(l()(),t._22(23,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-search fa-3"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n"])),(l()(),t._44(-1,null,["\n"]))],function(l,n){var u=n.component;l(n,3,0,"collections",u.selectedCollection),l(n,8,0,u.collections),l(n,16,0,u.query)},function(l,n){l(n,0,0,t._36(n,5).ngClassUntouched,t._36(n,5).ngClassTouched,t._36(n,5).ngClassPristine,t._36(n,5).ngClassDirty,t._36(n,5).ngClassValid,t._36(n,5).ngClassInvalid,t._36(n,5).ngClassPending),l(n,13,0,t._36(n,18).ngClassUntouched,t._36(n,18).ngClassTouched,t._36(n,18).ngClassPristine,t._36(n,18).ngClassDirty,t._36(n,18).ngClassValid,t._36(n,18).ngClassInvalid,t._36(n,18).ngClassPending)})}t._17("re-multi-editor-search",Dl,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-multi-editor-search",[],null,null,null,$l,Ul)),t._20(1,49152,null,0,Dl,[],null,null)],null,null)},{},{search:"search",collectionChange:"collectionChange"},[]);var Nl=[[".navbar-default[_ngcontent-%COMP%]{background-color:#34495e;box-shadow:0 2px 5px 0 rgba(0,0,0,.2);margin-bottom:0;height:50px;width:100%;border-radius:0;border:0;padding-right:15px;padding-left:15px}"]],zl=t._19({encapsulation:0,styles:Nl,data:{}});function Bl(l){return t._46(0,[(l()(),t._22(0,0,null,null,19,"nav",[["class","navbar navbar-default"],["id","editor-toolbar"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,16,"form",[["class","form-inline"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(l,n,u){var e=!0;"submit"===n&&(e=!1!==t._36(l,4).onSubmit(u)&&e);"reset"===n&&(e=!1!==t._36(l,4).onReset()&&e);return e},null,null)),t._20(3,16384,null,0,W.p,[],null,null),t._20(4,16384,null,0,W.j,[[8,null],[8,null]],null,null),t._41(2048,null,W.c,null,[W.j]),t._20(6,16384,null,0,W.i,[W.c],null,null),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(8,0,null,null,3,"button",[["class","btn btn-default navbar-btn btn-success"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.save.emit()&&e);return e},null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(10,0,null,null,0,"i",[["aria-hidden","true"],["class","fa fa-floppy-o"]],null,null,null,null,null)),(l()(),t._44(-1,null,[" Save\n "])),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(13,0,null,null,4,"span",[["class","col-xs-offset-1"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(15,0,null,null,1,"re-multi-editor-search",[],null,[[null,"search"],[null,"collectionChange"]],function(l,n,u){var e=!0,t=l.component;"search"===n&&(e=!1!==t.onSearch(u)&&e);"collectionChange"===n&&(e=!1!==t.onCollectionChange(u)&&e);return e},$l,Ul)),t._20(16,49152,null,0,Dl,[],null,{search:"search",collectionChange:"collectionChange"}),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n"]))],null,function(l,n){var u=n.component;l(n,2,0,t._36(n,6).ngClassUntouched,t._36(n,6).ngClassTouched,t._36(n,6).ngClassPristine,t._36(n,6).ngClassDirty,t._36(n,6).ngClassValid,t._36(n,6).ngClassInvalid,t._36(n,6).ngClassPending),l(n,8,0,!u.canSave)})}t._17("re-multi-editor-toolbar",Kl,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-multi-editor-toolbar",[],null,null,null,Bl,zl)),t._20(1,49152,null,0,Kl,[],null,null)],null,null)},{canSave:"canSave"},{search:"search",collectionChange:"collectionChange",save:"save"},[]);var ql=u("OrGp"),Ll=u("zihN"),Jl=u("1VXn"),Wl=u("ls8O"),Xl=u("XPrR"),Gl=u("vNM0"),Hl=u("QaWf"),Yl=u("y2v8"),ln=u("Ezgg"),nn=u("xVWs"),un=u("tVim"),en=u("EW85"),tn=function(){function l(l,n){this.schemaKeysStoreService=l,this.toastr=n,this.isEditorVisible=!1,this.isInputField=!1,this.record={}}return l.prototype.saveRecord=function(l){this.action.value=this.subSchema.alwaysShow?l[Object.keys(l)[0]]:l},l.prototype.closeEditor=function(){this.isEditorVisible=!1,this.action.value={}},l.prototype.onValueChange=function(l){this.action.mainKey=l,this.subSchema=this.schemaKeysStoreService.findSubSchema(this.action.mainKey),this.action.value={}},l.prototype.openEditor=function(){this.action.mainKey?this.subSchema?this.isEditorVisible=!0:this.toastr.error("Choose a key using autocompletion values for the field to be added"):this.toastr.error("Choose a key for the field to be added")},l.ctorParameters=function(){return[{type:Y},{type:Rl.h}]},l}(),on=[["label[_ngcontent-%COMP%]{padding-left:15px;text-indent:-15px;display:inline-block}input[_ngcontent-%COMP%]:focus{background-color:#b6d4de;border:1px solid #555}.input-field[_ngcontent-%COMP%]{background-color:#f1f1f1;width:300px}.regex-checkbox[_ngcontent-%COMP%]{margin-left:2px}select[_ngcontent-%COMP%]{width:100%;border-radius:4px;background-color:#f1f1f1}.button[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:20px;display:inline-block;padding:4px 6px;font-size:12px;cursor:pointer;text-align:center;text-decoration:none;outline:none;color:#000;background-color:#dae8ef;border-top:1px gray;border-radius:5px}.button[_ngcontent-%COMP%]:hover{background-color:#f1f1f1}.button[_ngcontent-%COMP%]:active{background-color:#c41313;transform:translateY(2px)}.regex[_ngcontent-%COMP%]{margin-left:140px}.editor[_ngcontent-%COMP%]{width:400px;height:250px;border:2px solid #dae8ef}"]],an=t._19({encapsulation:0,styles:on,data:{}});function rn(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"button",[["class","btn btn-default btn-sm"],["type","button"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.openEditor()&&e);return e},null,null)),(l()(),t._44(-1,null,["Open Editor"]))],null,null)}function sn(l){return t._46(0,[(l()(),t._22(0,0,null,null,11,"div",[],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(2,0,null,null,5,"div",[["class","editor"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(4,0,null,null,2,"json-editor",[],null,[[null,"recordChange"]],function(l,n,u){var e=!0,t=l.component;"recordChange"===n&&(e=!1!==t.saveRecord(u)&&e);return e},ql.b,ql.a)),t._20(5,770048,null,0,Ll.a,[Jl.a,Wl.a,Xl.a,Gl.a,Hl.a,Yl.a,ln.a,nn.a,un.a,en.a],{config:[0,"config"],record:[1,"record"],schema:[2,"schema"]},{recordChange:"recordChange"}),t._39(6,{compact:0}),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(9,0,null,null,1,"button",[["class","btn-sm btn-default button"],["type","button"]],null,[[null,"click"]],function(l,n,u){var e=!0,t=l.component;"click"===n&&(e=!1!==t.closeEditor()&&e);return e},null,null)),(l()(),t._44(-1,null,["Change field"])),(l()(),t._44(-1,null,["\n "]))],function(l,n){var u=n.component;l(n,5,0,l(n,6,0,!0),u.record,u.subSchema)},null)}function cn(l){return t._46(0,[(l()(),t._22(0,0,null,null,20,"form",[["class","form-inline"],["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(l,n,u){var e=!0;"submit"===n&&(e=!1!==t._36(l,2).onSubmit(u)&&e);"reset"===n&&(e=!1!==t._36(l,2).onReset()&&e);return e},null,null)),t._20(1,16384,null,0,W.p,[],null,null),t._20(2,16384,null,0,W.j,[[8,null],[8,null]],null,null),t._41(2048,null,W.c,null,[W.j]),t._20(4,16384,null,0,W.i,[W.c],null,null),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(6,0,null,null,1,"label",[["class","form-group"]],null,null,null,null,null)),(l()(),t._44(-1,null,["Field:"])),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(9,0,null,null,1,"re-autocomplete-input",[["name","key"],["type","text"]],null,[[null,"valueChange"]],function(l,n,u){var e=!0,t=l.component;"valueChange"===n&&(e=!1!==t.onValueChange(u)&&e);return e},sl,tl)),t._20(10,49152,null,0,ul,[Y],{disabled:[0,"disabled"]},{valueChange:"valueChange"}),(l()(),t._44(-1,null,["\n "])),(l()(),t._22(12,0,null,null,7,"div",[["class","form-group"]],null,null,null,null,null)),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,rn)),t._20(15,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._16(16777216,null,null,1,null,sn)),t._20(18,16384,null,0,p.l,[t._4,t.Z],{ngIf:[0,"ngIf"]},null),(l()(),t._44(-1,null,["\n "])),(l()(),t._44(-1,null,["\n"]))],function(l,n){var u=n.component;l(n,10,0,u.isEditorVisible),l(n,15,0,!1===u.isEditorVisible),l(n,18,0,!0===u.isEditorVisible)},function(l,n){l(n,0,0,t._36(n,4).ngClassUntouched,t._36(n,4).ngClassTouched,t._36(n,4).ngClassPristine,t._36(n,4).ngClassDirty,t._36(n,4).ngClassValid,t._36(n,4).ngClassInvalid,t._36(n,4).ngClassPending)})}t._17("re-addition-action",tn,function(l){return t._46(0,[(l()(),t._22(0,0,null,null,1,"re-addition-action",[],null,null,null,cn,an)),t._20(1,49152,null,0,tn,[Y,Rl.h],null,null)],null,null)},{action:"action"},{},[]);var dn=["is equal to","contains","does not exist","matches regular expression"],pn=["is equal to","contains","matches regular expression"],_n=function(){function l(){}return Object.defineProperty(l.prototype,"matchTypes",{get:function(){return pn},enumerable:!0,configurable:!0}),l.prototype.trackByFunction=function(l){return l},l.ctorParameters=function(){return[]},l}(),hn=[[""]],gn=t._19({encapsulation:0,styles:hn,data:{}});function fn(l){return t._46(0,[(l()(),t._22(0,0,null,null,3,"option",[],null,null,null,null,null)),t._20(1,147456,null,0,W.l,[t.p,t.Q,[2,W.m]],{ngValue:[0,"ngValue"]},null),t._20(2,147456,null,0,W.r,[t.p,t.Q,[8,null]],{ngValue:[0,"ngValue"]},null),(l()(),t._44(3,null,[" "," "]))],function(l,n){l(n,1,0,n.context.$implicit),l(n,2,0,n.context.$implicit)},function(l,n){l(n,3,0,n.context.$implicit)})}function mn(l){re