web-interface.assets.bb8c8232-3374.1f64d56dd21954381c06.js Maven / Gradle / Ivy
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-3374"],{"f+6PzBna":(D,y,a)=>{"use strict";a.d(y,{A:()=>h});var f=a("pmX897Fv"),m=a.n(f),t=a("DjJvgDaP"),o=a.n(t),d=o()(m());d.push([D.id,`.YlgzIDxuVXzWGUeQ6wZ8 {
margin-top: 8px;
}
`,"",{version:3,sources:["webpack://./src/components/content-packs/ContentPackApplyParameter.css"],names:[],mappings:"AAAA;IACI,eAAe;AACnB",sourcesContent:[`:local(.applyParameter) {
margin-top: 8px;
}
`],sourceRoot:""}]),d.locals={applyParameter:"YlgzIDxuVXzWGUeQ6wZ8"};const h=d},"0XyJNg2J":(D,y,a)=>{"use strict";a.d(y,{A:()=>h});var f=a("pmX897Fv"),m=a.n(f),t=a("DjJvgDaP"),o=a.n(t),d=o()(m());d.push([D.id,`.uld5gLTpygpD0RWINILd tbody {
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display:block;
}
.uld5gLTpygpD0RWINILd thead, .uld5gLTpygpD0RWINILd tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
.gr8Pw8P44d_POVcuv1Pr {
word-wrap: break-word;
}
.TiPrBe6U6mlJyjsINNY8 {
color: rgba(158, 31, 99, 0.43);
}
`,"",{version:3,sources:["webpack://./src/components/content-packs/ContentPackEntitiesList.css"],names:[],mappings:"AAAA;IACI,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;AACjB;;AAEA;IACI,aAAa;IACb,UAAU;IACV,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,8BAA8B;AAClC",sourcesContent:[`:local(.scrollable) tbody {
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display:block;
}
:local(.scrollable) thead, :local(.scrollable) tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
:local(.bigColumns) {
word-wrap: break-word;
}
:local(.contentPackEntity) {
color: rgba(158, 31, 99, 0.43);
}
`],sourceRoot:""}]),d.locals={scrollable:"uld5gLTpygpD0RWINILd",bigColumns:"gr8Pw8P44d_POVcuv1Pr",contentPackEntity:"TiPrBe6U6mlJyjsINNY8"};const h=d},vyEB9hoZ:(D,y,a)=>{"use strict";a.d(y,{A:()=>ot});var f=a("ii0bleBb"),m=a.n(f),t=a("Z7aTuO5B"),o=a("rIl5IEuP"),d=a("IOI9nV80"),h=a("gqVHlIxA"),n=a("lhAGFr4h"),u=a.n(n),P=a("4E3oowBb"),A=a("uoAlNf/n"),e=a("znhYcHoq"),s=a("dFpwyWHg"),r=a.n(s),i=a("C2ikvoS0"),c=a.n(i),E=a("1IntWRSu"),v=a.n(E),L=a("8nGWeFnd"),R=a.n(L),O=a("TeAcaicX"),M=a.n(O),U=a("eE3+5goe"),b=a.n(U),w=a("f+6PzBna"),N={};N.styleTagTransform=b(),N.setAttributes=R(),N.insert=v().bind(null,"head"),N.domAPI=c(),N.insertStyleElement=M();var Et=r()(w.A,N);const $=w.A&&w.A.locals?w.A.locals:void 0;var q=Object.defineProperty,tt=(g,p,l)=>p in g?q(g,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):g[p]=l,F=(g,p,l)=>(tt(g,typeof p!="symbol"?p+"":p,l),l);class z extends t.Component{constructor(p){super(p),F(this,"_configKeyRowFormatter",l=>{const C=u()(this.props.appliedParameter,{paramName:l.paramName,configKey:l.configKey,readOnly:!0})<0?t.createElement("td",null,t.createElement(o.Button,{bsStyle:"info",bsSize:"small",onClick:()=>{this._parameterClear(l.configKey)}},"Clear")):t.createElement("td",null);return t.createElement("tr",{key:l.configKey},t.createElement("td",null,l.configKey),t.createElement("td",null,l.paramName),C)}),F(this,"_bindValue",l=>{const _={};_[l.target.name]=l.target.value,this.setState(_)}),F(this,"_valuesSelected",()=>this.state.parameter.length>0&&this.state.config_key.length>0),F(this,"_applyParameter",l=>{l.preventDefault(),!(!this._valuesSelected()||this.props.appliedParameter.findIndex(C=>C.configKey===this.state.config_key)>=0)&&(this.props.onParameterApply(this.state.config_key,this.state.parameter),this.setState({config_key:"",parameter:""}))}),F(this,"_parameterClear",l=>{this.props.onParameterClear(l)}),this.state={config_key:"",parameter:""}}render(){const l=new e.A(this.props.entity.data).getPaths(),_=Object.keys(l).sort(P.j).filter(I=>l[I].isValueRef()).filter(I=>this.props.appliedParameter.findIndex(K=>I===K.configKey)<0),C=I=>t.createElement("option",{key:"EMPTY",value:""},I),S=[C("Choose Config Key")].concat(_.map(I=>t.createElement("option",{key:I,value:I},I)));let{parameters:T}=this.props,V=T.length<=0?"Create a parameter first":"Choose...";if(this.state.config_key!==""&&T.length>0){const I=l[this.state.config_key].getValueType();["string","integer","boolean","double"].findIndex(K=>K===I)>=0&&(T=T.filter(K=>K.type===I)),V=T.length<=0?`No parameter from type ${I}`:"Choose..."}const W=[C(V)].concat(T.map(I=>t.createElement("option",{key:I.name,value:I.name},I.title," (",I.name,")")));return t.createElement("div",null,t.createElement("form",{className:"apply-parameter-form",id:"apply-parameter-form",onSubmit:this._applyParameter},t.createElement(o.Row,{className:$.applyParameter},t.createElement(o.Col,{smOffset:1,sm:5},t.createElement(o.Input,{name:"config_key",id:"config_key",type:"select",value:this.state.config_key,onChange:this._bindValue,label:"Config Key",required:!0},S)),t.createElement(o.Col,{sm:5},t.createElement(o.Input,{name:"parameter",id:"parameter",type:"select",value:this.state.parameter,onChange:this._bindValue,label:"Parameter",required:!0},W)),t.createElement(o.Col,{sm:1})),t.createElement(o.Row,null,t.createElement(o.Col,{smOffset:10,sm:2},t.createElement(o.Button,{bsStyle:"primary",disabled:!this._valuesSelected(),type:"submit"},"Apply")))),t.createElement(o.Row,null,t.createElement(o.Col,{smOffset:1,sm:10},t.createElement(A.A,{id:"config-key-list",headers:["Config Key","Parameter","Action"],filterKeys:[],rows:this.props.appliedParameter,dataRowFormatter:this._configKeyRowFormatter}))))}}F(z,"propTypes",{onParameterApply:m().func,onParameterClear:m().func,entity:m().object.isRequired,parameters:m().array,appliedParameter:m().array}),F(z,"defaultProps",{onParameterApply:()=>{},onParameterClear:()=>{},parameters:[],appliedParameter:[]});const et=z;var at=Object.defineProperty,nt=(g,p,l)=>p in g?at(g,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):g[p]=l,j=(g,p,l)=>(nt(g,typeof p!="symbol"?p+"":p,l),l);class G extends t.Component{constructor(){super(...arguments),j(this,"_getParameterForConfigKey",p=>{const l=this.props.appliedParameter.findIndex(S=>S.configKey===p);if(l<0)return;const _=this.props.appliedParameter[l],C=this.props.parameters.findIndex(S=>S.name===_.paramName);return this.props.parameters[C]}),j(this,"_configKeyRowFormatter",p=>l=>{const _=p[l],C=this._getParameterForConfigKey(l),S=C?t.createElement("b",null,`parameter (${C.type})`):_.getValueType(),T=C?t.createElement("b",null,C.name):_.getValue();return t.createElement("tr",{key:l},t.createElement("td",null,l),t.createElement("td",null,S),t.createElement("td",null,T))})}render(){const l=new e.A(this.props.entity.data).getPaths(),_=Object.keys(l).sort(P.j);return t.createElement("div",null,t.createElement(A.A,{id:"entiy-config-list",headers:["Config Key","Type","Value"],filterKeys:[],rows:_,dataRowFormatter:this._configKeyRowFormatter(l)}))}}j(G,"propTypes",{entity:m().object.isRequired,appliedParameter:m().array,parameters:m().array}),j(G,"defaultProps",{appliedParameter:[],parameters:[]});const st=G;var J=a("0XyJNg2J"),k={};k.styleTagTransform=b(),k.setAttributes=R(),k.insert=v().bind(null,"head"),k.domAPI=c(),k.insertStyleElement=M();var vt=r()(J.A,k);const H=J.A&&J.A.locals?J.A.locals:void 0;var rt=Object.defineProperty,lt=(g,p,l)=>p in g?rt(g,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):g[p]=l,Y=(g,p,l)=>(lt(g,typeof p!="symbol"?p+"":p,l),l);const Q=({entity:g})=>g.fromServer?t.createElement("span",null,t.createElement(d.In,{title:"Server",name:"dns"})):t.createElement("span",null,t.createElement(d.In,{title:"Content Pack",name:"inventory_2",className:H.contentPackEntity}));Q.propTypes={entity:m().object.isRequired};class X extends t.Component{constructor(p){super(p),Y(this,"_filterEntities",(l,_)=>{const{contentPack:C}=this.props,S=_||C.entities;if(!l||l.length<=0){this.setState({filteredEntities:S,filter:void 0});return}const T=RegExp(l,"i"),V=S.filter(W=>T.test(W.title)||T.test(W.description));this.setState({filteredEntities:V,filter:l})}),Y(this,"_entityRowFormatter",l=>{const{contentPack:_,appliedParameter:C,onParameterApply:S,onParameterClear:T,readOnly:V}=this.props,W=t.createElement(et,{parameters:_.parameters,entity:l,appliedParameter:C[l.id],onParameterApply:(x,ht)=>{S(l.id,x,ht)},onParameterClear:x=>{T(l.id,x)}}),I=()=>{this.setState({showApplyConfigModal:!1})},K=()=>{this.setState({showApplyConfigModal:!0})},it=t.createElement(h.A,{showModal:this.state.showApplyConfigModal,onHide:I,bsSize:"large"},t.createElement(o.Modal.Header,{closeButton:!0},t.createElement(o.Modal.Title,null,"Edit")),t.createElement(o.Modal.Body,null,W),t.createElement(o.Modal.Footer,null,t.createElement(o.Button,{onClick:I},"Close"))),ut=t.createElement(st,{appliedParameter:C[l.id],parameters:_.parameters,entity:l}),Z=()=>{this.setState({showConfigModalId:void 0})},ct=x=>{this.setState({showConfigModalId:x})},dt=this.state.showConfigModalId&&t.createElement(h.A,{showModal:l.id===this.state.showConfigModalId,onHide:Z,bsSize:"large"},t.createElement(o.Modal.Header,{closeButton:!0},t.createElement(o.Modal.Title,null,"Entity Config")),t.createElement(o.Modal.Body,null,ut),t.createElement(o.Modal.Footer,null,t.createElement(o.Button,{onClick:Z},"Close"))),mt=_.parameters.length<=0,pt=(C[l.id]||[]).length;return t.createElement("tr",{key:l.id},t.createElement("td",{className:H.bigColumns},l.title),t.createElement("td",null,l.type.name),t.createElement("td",{className:H.bigColumns},l.description),!V&&t.createElement("td",null,t.createElement(Q,{entity:l})),!V&&t.createElement("td",null,pt),t.createElement("td",null,t.createElement(o.ButtonToolbar,null,!V&&t.createElement(o.Button,{bsStyle:"primary",bsSize:"xs",disabled:mt,onClick:()=>{K()}},"Edit"),t.createElement(o.Button,{bsSize:"xs",onClick:()=>{ct(l.id)}},"Show"))),!V&&it,dt)}),this.state={showApplyConfigModal:!1,showConfigModalId:void 0,filteredEntities:p.contentPack.entities||[],filter:void 0}}UNSAFE_componentWillReceiveProps(p){const{filter:l}=this.state;this._filterEntities(l,p.contentPack.entities)}render(){const{readOnly:p}=this.props,{filteredEntities:l}=this.state,_=p?["Title","Type","Description","Action"]:["Title","Type","Description","Origin","Used Parameters","Action"];return t.createElement("div",null,t.createElement("h2",null,"Entity list"),t.createElement("br",null),t.createElement(d.B9,{onSearch:this._filterEntities,onReset:()=>{this._filterEntities("")}}),t.createElement(d.bQ,{id:"entity-list",headers:_,className:H.scrollable,sortBy:C=>C.type.name,filterKeys:[],rows:l,dataRowFormatter:this._entityRowFormatter}))}}Y(X,"propTypes",{contentPack:m().object.isRequired,appliedParameter:m().object,onParameterApply:m().func,onParameterClear:m().func,readOnly:m().bool}),Y(X,"defaultProps",{appliedParameter:{},onParameterClear:()=>{},onParameterApply:()=>{},readOnly:!1});const ot=X},"EL/SQmS6":(D,y,a)=>{"use strict";a.d(y,{A:()=>A});var f=a("ii0bleBb"),m=a.n(f),t=a("Z7aTuO5B"),o=a("J6y4/h8P"),d=a("GwjzBeBD"),h=a("ty2gyrHp"),n=a("d4kzUuQm");const u=(0,o.default)(d.A)(({status:e,theme:s})=>{const{success:r,info:i,warning:c,danger:E}=s.colors.variant.dark,v={installed:r,updatable:i,edited:c,error:E};return(0,o.css)`
margin-left: 4px;
background-color: ${v[e]};
color: ${s.utils.readableColor(v[e])};
`}),P=({contentPackId:e,states:s})=>{const r=s.map(i=>t.createElement(h.N,{key:i,to:n.Ay.SYSTEM.CONTENTPACKS.show(e)},t.createElement(u,{status:i},i)));return t.createElement("span",null,r)};P.propTypes={states:m().arrayOf(m().string),contentPackId:m().string.isRequired},P.defaultProps={states:[]};const A=P},iAkLQLhv:(D,y,a)=>{"use strict";a.d(y,{A:()=>m});const m={convertToString(t){switch(t.type){case"integer":case"double":return t.default_value.toString();case"boolean":return t.default_value?"true":"false";default:return t.default_value}},convertValue(t,o){switch(t){case"integer":return parseInt(o,10);case"double":return parseFloat(o);case"boolean":return o==="true";default:return o}}}},"rbG+3kLS":(D,y,a)=>{"use strict";a.d(y,{A:()=>P});var f=a("VPaD/Np4"),m=a.n(f),t=a("u1Q00LVl"),o=a.n(t),d=a("Jb16h681"),h=a.n(d),n=a("iltCXley"),u=a("PAFhOglk");class P{constructor(s,r,i,c,E,v,L,R,O,M){const U=M.map(b=>b instanceof u.A?b:u.A.fromJSON(b,!1,O));this._value={v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:U}}get v(){return this._value.v}get id(){return this._value.id}get rev(){return this._value.rev}get name(){return this._value.name}get summary(){return this._value.summary}get description(){return this._value.description}get vendor(){return this._value.vendor}get url(){return this._value.url}get constraints(){return this._value.entities.reduce((s,r)=>r.constraints.reduce((i,c)=>i.add(c),s),(0,f.Set)())}get parameters(){return this._value.parameters}get entities(){return this._value.entities}toBuilder(){const{v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:M}=this._value;return new A((0,f.Map)({v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:M}))}toJSON(){const{v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:M}=this._value,U=M.map(b=>b.toJSON());return{v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:U}}static fromJSON(s){const{v:r,id:i,rev:c,name:E,summary:v,description:L,vendor:R,url:O,parameters:M,entities:U}=s;return new P(r,i,c,E,v,L,R,O,M,U)}static builder(){return new A().v(1).id((0,n.A)()).rev(1).name("").summary("").description("").vendor("").url("").parameters([]).entities([])}}class A{constructor(s=(0,f.Map)()){this.value=s}v(s){return this.value=this.value.set("v",s),this}id(s){return this.value=this.value.set("id",s),this}rev(s){return this.value=this.value.set("rev",s),this}name(s){return this.value=this.value.set("name",s),this}summary(s){return this.value=this.value.set("summary",s),this}description(s){return this.value=this.value.set("description",s),this}vendor(s){return this.value=this.value.set("vendor",s),this}url(s){return this.value=this.value.set("url",s),this}parameters(s){return this.value=this.value.set("parameters",s),this}removeParameter(s){const r=this.value.get("parameters").slice(0);return h()(r,i=>i.name===s.name),this.value=this.value.set("parameters",r),this}addParameter(s){const r=this.value.get("parameters"),i=o()(r,s);return this.value=this.value.set("parameters",i),this}entities(s){return this.value=this.value.set("entities",s),this}build(){const{v:s,id:r,rev:i,name:c,summary:E,description:v,vendor:L,url:R,parameters:O,entities:M}=this.value.toObject();return new P(s,r,i,c,E,v,L,R,O,M)}}},PAFhOglk:(D,y,a)=>{"use strict";a.d(y,{A:()=>u});var f=a("VPaD/Np4"),m=a.n(f),t=a("lhAGFr4h"),o=a.n(t),d=a("EHQ1CSeg");class h{constructor(e,s,r="server"){this._value={type:e,plugin:r,version:s}}get type(){return this._value.type}get plugin(){return this._value.plugin}get version(){return this._value.version}toBuilder(){const{type:e,plugin:s,version:r}=this._value;return new n(m().Map({type:e,plugin:s,version:r}))}static create(e,s,r="server"){return new h(e,s,r)}toJSON(){const{type:e,plugin:s,version:r}=this._value;return s==="server"?{type:e,version:r}:{type:e,plugin:s,version:r}}equals(e){return!e.version||!e.plugin||!e.type?!1:e.version===this.version&&e.type===this.type&&e.plugin===this.plugin}static fromJSON(e){const{type:s,version:r,plugin:i}=e;return h.create(s,r,i)}static builder(){return new n().plugin("server")}}class n{constructor(e=m().Map()){this.value=e}type(e){return new n(this.value.set("type",e))}plugin(e){return new n(this.value.set("plugin",e))}version(e){return new n(this.value.set("version",e))}build(){const{type:e,plugin:s,version:r}=this.value.toObject();return new h(e,r,s)}}class u{constructor(e,s,r,i,c=!1,E=[],v=[]){const L=E.map(R=>R instanceof h?R:h.fromJSON(R));this._value={v:e,type:s,id:r,data:i,constraints:L,fromServer:c,parameters:v}}static fromJSON(e,s=!0,r=[]){const{v:i,type:c,id:E,data:v,constraints:L}=e;return new u(i,c,E,v,s,L,r)}get v(){return this._value.v}get type(){return this._value.type}get id(){return this._value.id}get data(){return this._value.data}get fromServer(){return this._value.fromServer}get constraints(){return this._value.constraints}get title(){let e=this.getValueFromData("title");return e||(e=this.getValueFromData("name")),e||""}get description(){return this.getValueFromData("description")||""}get isEntity(){return!0}static[Symbol.hasInstance](e){return!!e.isEntity}getValueFromData(e){const{data:s}=this._value;if(!(!s||!s[e])){if(d.A.dataIsValueRef(s[e])){const r=(s[e]||{})[d.A.VALUE_REF_VALUE_FIELD];if(d.A.dataValueIsParameter(s[e])){const i=o()(this._value.parameters,{name:r});if(i>=0&&this._value.parameters[i].default_value)return this._value.parameters[i].default_value}return r}return s[e]}}toBuilder(){const{v:e,type:s,id:r,data:i,constraints:c,fromServer:E,parameters:v}=this._value;return new P((0,f.Map)({v:e,type:s,id:r,data:i,constraints:c,fromServer:E,parameters:v}))}static builder(){return new P}toJSON(){const{v:e,type:s,id:r,data:i,constraints:c}=this._value;return{v:e,type:s,id:r,data:i,constraints:c}}}class P{constructor(e=(0,f.Map)()){this.value=e}v(e){return this.value=this.value.set("v",e),this}type(e){return this.value=this.value.set("type",e),this}id(e){return this.value=this.value.set("id",e),this}data(e){return this.value=this.value.set("data",e),this}fromServer(e){return this.value=this.value.set("fromServer",e),this}constraints(e){return this.value=this.value.set("constraints",e),this}parameters(e){return this.value=this.value.set("parameters",e),this}build(){const{v:e,type:s,id:r,data:i,constraints:c,fromServer:E,parameters:v}=this.value.toObject();return new u(e,s,r,i,E,c,v)}}},nPaY1a0P:(D,y,a)=>{"use strict";a.d(y,{T:()=>e,D:()=>s});var f=a("JnTtTRmZ"),m=a.n(f),t=a("MdYBRjRJ"),o=a("U1Iufsob"),d=a("eFxcQyPT"),h=a("ZoCQyFC1"),n=a.n(h),u=a("rbG+3kLS");class P{constructor(i){this._value=Object.keys(i).reduce((c,E)=>{const v=i[E];return c[parseInt(E,10)]=u.A.fromJSON(v),c},{})}get latestRevision(){return n()(this.revisions)}get revisions(){return Object.keys(this._value).map(i=>parseInt(i,10))}get latest(){return this._value[this.latestRevision]}get contentPacks(){return Object.values(this._value)}createNewVersionFromRev(i){return this.contentPack(parseInt(i,10)).toBuilder().rev(this.latestRevision+1).build()}contentPack(i){return this._value[i]}}var A=a("IA3Ku5lS");const e=(0,A.rN)("core.ContentPacks",()=>m().createActions({create:{asyncResult:!0},list:{asyncResult:!0},get:{asyncResult:!0},getRev:{asyncResult:!0},delete:{asyncResult:!0},deleteRev:{asyncResult:!0},install:{asyncResult:!0},installList:{asyncResult:!0},uninstall:{asyncResult:!0},uninstallDetails:{asyncResult:!0}})),s=(0,A.Bv)("core.ContentPacks",()=>m().createStore({listenables:[e],getInitialState(){return{contentPack:void 0,contentPackMetadata:void 0,contentPacks:void 0,installations:void 0,uninstallEntities:void 0}},get(r){const i=t.H3(o.A.ContentPacksController.get(r).url),c=(0,d.Ay)("GET",i).then(E=>{const v=new P(E.content_pack_revisions),L=E.constraints_result,R={contentPackRevisions:v,selectedVersion:v.latestRevision,constraints:L};return this.trigger(R),R});e.get.promise(c)},getRev(r,i){const c=t.H3(o.A.ContentPacksController.getRev(r,i).url),E=(0,d.Ay)("GET",c).then(v=>(this.trigger({contentPack:v.content_pack}),v));e.getRev.promise(E)},list(){const r=t.H3(o.A.ContentPacksController.list().url),i=(0,d.Ay)("GET",r).then(c=>(this.trigger({contentPacks:c.content_packs,contentPackMetadata:c.content_packs_metadata}),c));e.list.promise(i)},create(r){const i=(0,d.Ay)("POST",t.H3(o.A.ContentPacksController.create().url),r);e.create.promise(i)},delete(r){const i=(0,d.Ay)("DELETE",t.H3(o.A.ContentPacksController.delete(r).url));e.delete.promise(i)},deleteRev(r,i){const c=(0,d.Ay)("DELETE",t.H3(o.A.ContentPacksController.deleteRev(r,i).url));e.deleteRev.promise(c)},install(r,i,c){const E=(0,d.Ay)("POST",t.H3(o.A.ContentPacksController.install(r,i).url),c);e.install.promise(E)},installList(r){const i=t.H3(o.A.ContentPacksController.installList(r).url),c=(0,d.Ay)("GET",i).then(E=>(this.trigger({installations:E.installations}),E));e.installList.promise(c)},uninstall(r,i){const c=(0,d.Ay)("DELETE",t.H3(o.A.ContentPacksController.uninstall(r,i).url));e.uninstall.promise(c)},uninstallDetails(r,i){const c=t.H3(o.A.ContentPacksController.uninstallDetails(r,i).url),E=(0,d.Ay)("GET",c).then(v=>(this.trigger({uninstallEntities:v.entities}),v));e.uninstallDetails.promise(E)}}))},EHQ1CSeg:(D,y,a)=>{"use strict";a.d(y,{A:()=>d});var f=Object.defineProperty,m=(h,n,u)=>n in h?f(h,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):h[n]=u,t=(h,n,u)=>(m(h,typeof n!="symbol"?n+"":n,u),u);const o=class B{static dataIsValueRef(n){if(!n)return!1;if(typeof n.has=="function")return n.size===2&&n.has(B.VALUE_REF_TYPE_FIELD)&&n.has(B.VALUE_REF_VALUE_FIELD);const u=Object.keys(n);return u.length===2&&u.includes(B.VALUE_REF_TYPE_FIELD)&&u.includes(B.VALUE_REF_VALUE_FIELD)}static dataValueIsParameter(n){return n?typeof n.get=="function"?B.dataIsValueRef(n)&&n.get(B.VALUE_REF_TYPE_FIELD)===B.VALUE_REF_PARAMETER_VALUE:B.dataIsValueRef(n)&&n[B.VALUE_REF_TYPE_FIELD]===B.VALUE_REF_PARAMETER_VALUE:!1}static createValueRef(n,u){return{[this.VALUE_REF_TYPE_FIELD]:n,[this.VALUE_REF_VALUE_FIELD]:u}}};t(o,"VALUE_REF_VALUE_FIELD","@value"),t(o,"VALUE_REF_TYPE_FIELD","@type"),t(o,"VALUE_REF_PARAMETER_VALUE","parameter");let d=o},znhYcHoq:(D,y,a)=>{"use strict";a.d(y,{A:()=>d});var f=a("VPaD/Np4"),m=a.n(f),t=a("EHQ1CSeg");class o{constructor(n,u,P,A,e,s,r){this.path=n,this.valueIsReference=u,this.valueIsParameter=P,this.getter=A,this.setter=e,this.parameterSetter=s,this.valueTypeGetter=r}getPath(){return this.path}getValue(){return this.getter()}setValue(n){this.setter(n)}setParameter(n){this.parameterSetter(n)}getValueType(){return this.valueTypeGetter()}isValueRef(){return this.valueIsReference}isValueParameter(){return this.valueIsParameter}}class d{constructor(n){this.data=(0,f.Map)(m().fromJS(n)),this.paths=(0,f.Map)(),this.walkPaths()}getPaths(){return this.paths.toJS()}getData(){return this.data.toJS()}walkPaths(n=[]){const u=n.length>0?this.data.getIn(n):this.data;f.Map.isMap(u)?t.A.dataIsValueRef(u)?this.addPath(n):u.keySeq().toJS().forEach(P=>{this.walkPaths(n.concat([P]))}):f.List.isList(u)?u.toArray().forEach((P,A)=>{this.walkPaths(n.concat([A]))}):this.addPath(n)}addPath(n){const u=n.join("."),P=new o(u,t.A.dataIsValueRef(this.data.getIn(n)),t.A.dataValueIsParameter(this.data.getIn(n)),this.pathGetter(n),this.pathSetter(n),this.pathParameterSetter(n),this.pathType(n));this.paths=this.paths.set(u,P)}pathGetter(n){return()=>t.A.dataIsValueRef(this.data.getIn(n))?this.data.getIn(n.concat(t.A.VALUE_REF_VALUE_FIELD)):this.data.getIn(n)}pathSetter(n){return u=>{t.A.dataIsValueRef(this.data.getIn(n))?this.data=this.data.setIn(n.concat(t.A.VALUE_REF_VALUE_FIELD),u):this.data=this.data.setIn(n,u)}}pathParameterSetter(n){return u=>{if(t.A.dataIsValueRef(this.data.getIn(n)))this.data=this.data.setIn(n,(0,f.Map)({[t.A.VALUE_REF_VALUE_FIELD]:u,[t.A.VALUE_REF_TYPE_FIELD]:t.A.VALUE_REF_PARAMETER_VALUE}));else throw new Error(`Cannot set parameter on non-value-reference field: ${n.join(".")}`)}}pathType(n){return()=>{const u=this.data.getIn(n);return t.A.dataIsValueRef(u)?this.data.getIn(n.concat(t.A.VALUE_REF_TYPE_FIELD)):typeof u}}}},ePT4VtO3:(D,y,a)=>{var f=a("OQB6cBJJ"),m=a("9yx8Nmpk"),t=Array.prototype,o=t.splice;function d(h,n){for(var u=h?n.length:0,P=u-1;u--;){var A=n[u];if(u==P||A!==e){var e=A;m(A)?o.call(h,A,1):f(h,A)}}return h}D.exports=d},Jb16h681:(D,y,a)=>{var f=a("JF7TaIvC"),m=a("ePT4VtO3");function t(o,d){var h=[];if(!(o&&o.length))return h;var n=-1,u=[],P=o.length;for(d=f(d,3);++n
© 2015 - 2024 Weber Informatics LLC | Privacy Policy