Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopware-ag/admin-extension-sdk

Package Overview
Dependencies
Maintainers
7
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopware-ag/admin-extension-sdk - npm Package Compare versions

Comparing version 0.0.47 to 0.0.48

es/_internals/error-handling/error-factory.d.ts

2

cdn/index.js

@@ -1,1 +0,1 @@

var sg=Object.defineProperty;var Te=Object.getOwnPropertySymbols;var og=Object.prototype.hasOwnProperty,cg=Object.prototype.propertyIsEnumerable;var mt=(p,h,b)=>h in p?sg(p,h,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[h]=b,wt=(p,h)=>{for(var b in h||(h={}))og.call(h,b)&&mt(p,b,h[b]);if(Te)for(var b of Te(h))cg.call(h,b)&&mt(p,b,h[b]);return p};var g=(p,h,b)=>(mt(p,typeof h!="symbol"?h+"":h,b),b);(function(p,h){typeof exports=="object"&&typeof module!="undefined"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):(p=typeof globalThis!="undefined"?globalThis:p||self,h(p.sw={}))})(this,function(p){var Se;"use strict";function h(){return String(Date.now().toString(36)+Math.random().toString(36).substr(2))}function b(t){return t!==null&&typeof t=="object"}function Q(){return new URLSearchParams(window.location.search).get("location-id")}function je(){const t=window.location;return new URL(t.pathname,t.origin).toString()}function X(t,e){return b(e)&&e.__type__&&e.__type__===t}const Z={notificationDispatch:{},windowRedirect:{},windowReload:{},contextLanguage:{},contextEnvironment:{},contextLocale:{},contextCurrency:{},contextShopwareVersion:{},contextAppInformation:{},getPageTitle:{},uiComponentSectionRenderer:{},uiTabsAddTabItem:{},locationUpdateHeight:{},menuItemAdd:{},settingsItemAdd:{},mainModuleAdd:{},uiModalOpen:{},uiModalClose:{},actionButtonAdd:{},actionExecute:{},__function__:{},__registerWindow__:{},_criteriaTest:{},_collectionTest:{},_multiply:{},_subtract:{},_privileges:{create:["user"],read:["user"],update:["user"],delete:["user"]}};function Oe(t){const e=At(t),r=Ie(window.location);return!e||Object.keys(e).length<=0?null:St(e,r)}function Ce(t,e,r){const n=At(t),i=Pe(e,r);return i?St(n,i.permissions):null}function At(t){var e;return(e=Z[t])!=null?e:{}}function Ie(t){const r=new URLSearchParams(t.search).get("privileges");return r?JSON.parse(r):{}}function St(t,e){const r=Object.keys(t),n=[];return r.forEach(i=>{var a;(a=t[i])==null||a.forEach(s=>{var c;(c=e[i])!=null&&c.includes(s)||n.push(`${i}:${s}`)})}),n.length>=1?n:null}function Pe(t,e){let r=null;return Object.values(t).forEach(n=>{n.baseUrl===e&&(r=n)}),r}class tt extends Error{constructor(e,r){super(`Your app is missing the priviliges ${r.join(", ")} for action "${e}".`);g(this,"missingPrivileges");this.missingPrivileges=r,Object.setPrototypeOf(this,tt.prototype)}}const Me=({send:t,handleFactory:e})=>{const r={};let n=!1;function i(){if(n)return;n=!0,e({})("__function__",async({args:s,id:c})=>await Promise.resolve(r[c](...s)))}return{name:"function",serialize:({value:a})=>{if(typeof a=="function"){const s=h();return r[s]=a,i(),{__type__:"__function__",id:s,origin:window.origin}}},deserialize:({value:a,event:s})=>{var u;const c=(u=s==null?void 0:s.source)!=null?u:window;if(b(a)&&a.__type__&&a.__type__==="__function__"&&typeof a.id=="string"){const o=a.id,l=a.origin;return(...f)=>t("__function__",{args:f,id:o},c,l)}}}};var B=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ee(){this.__data__=[],this.size=0}var xe=Ee;function De(t,e){return t===e||t!==t&&e!==e}var Tt=De,Le=Tt;function Fe(t,e){for(var r=t.length;r--;)if(Le(t[r][0],e))return r;return-1}var H=Fe,ze=H,Ne=Array.prototype,Ge=Ne.splice;function Re(t){var e=this.__data__,r=ze(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ge.call(e,r,1),--this.size,!0}var Ue=Re,Be=H;function He(t){var e=this.__data__,r=Be(e,t);return r<0?void 0:e[r][1]}var Ke=He,ke=H;function qe(t){return ke(this.__data__,t)>-1}var Ve=qe,We=H;function Je(t,e){var r=this.__data__,n=We(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Ye=Je,Qe=xe,Xe=Ue,Ze=Ke,tr=Ve,er=Ye;function C(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}C.prototype.clear=Qe,C.prototype.delete=Xe,C.prototype.get=Ze,C.prototype.has=tr,C.prototype.set=er;var K=C,rr=K;function nr(){this.__data__=new rr,this.size=0}var ir=nr;function ar(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var sr=ar;function or(t){return this.__data__.get(t)}var cr=or;function ur(t){return this.__data__.has(t)}var lr=ur,gr=typeof B=="object"&&B&&B.Object===Object&&B,jt=gr,fr=jt,dr=typeof self=="object"&&self&&self.Object===Object&&self,_r=fr||dr||Function("return this")(),A=_r,pr=A,hr=pr.Symbol,et=hr,Ot=et,Ct=Object.prototype,yr=Ct.hasOwnProperty,vr=Ct.toString,F=Ot?Ot.toStringTag:void 0;function br(t){var e=yr.call(t,F),r=t[F];try{t[F]=void 0;var n=!0}catch{}var i=vr.call(t);return n&&(e?t[F]=r:delete t[F]),i}var $r=br,mr=Object.prototype,wr=mr.toString;function Ar(t){return wr.call(t)}var Sr=Ar,It=et,Tr=$r,jr=Sr,Or="[object Null]",Cr="[object Undefined]",Pt=It?It.toStringTag:void 0;function Ir(t){return t==null?t===void 0?Cr:Or:Pt&&Pt in Object(t)?Tr(t):jr(t)}var k=Ir;function Pr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var z=Pr,Mr=k,Er=z,xr="[object AsyncFunction]",Dr="[object Function]",Lr="[object GeneratorFunction]",Fr="[object Proxy]";function zr(t){if(!Er(t))return!1;var e=Mr(t);return e==Dr||e==Lr||e==xr||e==Fr}var Mt=zr,Nr=A,Gr=Nr["__core-js_shared__"],Rr=Gr,rt=Rr,Et=function(){var t=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ur(t){return!!Et&&Et in t}var Br=Ur,Hr=Function.prototype,Kr=Hr.toString;function kr(t){if(t!=null){try{return Kr.call(t)}catch{}try{return t+""}catch{}}return""}var xt=kr,qr=Mt,Vr=Br,Wr=z,Jr=xt,Yr=/[\\^$.*+?()[\]{}|]/g,Qr=/^\[object .+?Constructor\]$/,Xr=Function.prototype,Zr=Object.prototype,tn=Xr.toString,en=Zr.hasOwnProperty,rn=RegExp("^"+tn.call(en).replace(Yr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nn(t){if(!Wr(t)||Vr(t))return!1;var e=qr(t)?rn:Qr;return e.test(Jr(t))}var an=nn;function sn(t,e){return t==null?void 0:t[e]}var on=sn,cn=an,un=on;function ln(t,e){var r=un(t,e);return cn(r)?r:void 0}var j=ln,gn=j,fn=A,dn=gn(fn,"Map"),nt=dn,_n=j,pn=_n(Object,"create"),q=pn,Dt=q;function hn(){this.__data__=Dt?Dt(null):{},this.size=0}var yn=hn;function vn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bn=vn,$n=q,mn="__lodash_hash_undefined__",wn=Object.prototype,An=wn.hasOwnProperty;function Sn(t){var e=this.__data__;if($n){var r=e[t];return r===mn?void 0:r}return An.call(e,t)?e[t]:void 0}var Tn=Sn,jn=q,On=Object.prototype,Cn=On.hasOwnProperty;function In(t){var e=this.__data__;return jn?e[t]!==void 0:Cn.call(e,t)}var Pn=In,Mn=q,En="__lodash_hash_undefined__";function xn(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Mn&&e===void 0?En:e,this}var Dn=xn,Ln=yn,Fn=bn,zn=Tn,Nn=Pn,Gn=Dn;function I(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}I.prototype.clear=Ln,I.prototype.delete=Fn,I.prototype.get=zn,I.prototype.has=Nn,I.prototype.set=Gn;var Rn=I,Lt=Rn,Un=K,Bn=nt;function Hn(){this.size=0,this.__data__={hash:new Lt,map:new(Bn||Un),string:new Lt}}var Kn=Hn;function kn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var qn=kn,Vn=qn;function Wn(t,e){var r=t.__data__;return Vn(e)?r[typeof e=="string"?"string":"hash"]:r.map}var V=Wn,Jn=V;function Yn(t){var e=Jn(this,t).delete(t);return this.size-=e?1:0,e}var Qn=Yn,Xn=V;function Zn(t){return Xn(this,t).get(t)}var ti=Zn,ei=V;function ri(t){return ei(this,t).has(t)}var ni=ri,ii=V;function ai(t,e){var r=ii(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var si=ai,oi=Kn,ci=Qn,ui=ti,li=ni,gi=si;function P(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}P.prototype.clear=oi,P.prototype.delete=ci,P.prototype.get=ui,P.prototype.has=li,P.prototype.set=gi;var fi=P,di=K,_i=nt,pi=fi,hi=200;function yi(t,e){var r=this.__data__;if(r instanceof di){var n=r.__data__;if(!_i||n.length<hi-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new pi(n)}return r.set(t,e),this.size=r.size,this}var vi=yi,bi=K,$i=ir,mi=sr,wi=cr,Ai=lr,Si=vi;function M(t){var e=this.__data__=new bi(t);this.size=e.size}M.prototype.clear=$i,M.prototype.delete=mi,M.prototype.get=wi,M.prototype.has=Ai,M.prototype.set=Si;var Ti=M;function ji(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Oi=ji,Ci=j,Ii=function(){try{var t=Ci(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Pi=Ii,Ft=Pi;function Mi(t,e,r){e=="__proto__"&&Ft?Ft(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var zt=Mi,Ei=zt,xi=Tt,Di=Object.prototype,Li=Di.hasOwnProperty;function Fi(t,e,r){var n=t[e];(!(Li.call(t,e)&&xi(n,r))||r===void 0&&!(e in t))&&Ei(t,e,r)}var Nt=Fi,zi=Nt,Ni=zt;function Gi(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=n?n(r[c],t[c],c,r,t):void 0;u===void 0&&(u=t[c]),i?Ni(r,c,u):zi(r,c,u)}return r}var W=Gi;function Ri(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ui=Ri;function Bi(t){return t!=null&&typeof t=="object"}var N=Bi,Hi=k,Ki=N,ki="[object Arguments]";function qi(t){return Ki(t)&&Hi(t)==ki}var Vi=qi,Gt=Vi,Wi=N,Rt=Object.prototype,Ji=Rt.hasOwnProperty,Yi=Rt.propertyIsEnumerable,Qi=Gt(function(){return arguments}())?Gt:function(t){return Wi(t)&&Ji.call(t,"callee")&&!Yi.call(t,"callee")},Xi=Qi,Zi=Array.isArray,it=Zi,J={exports:{}};function ta(){return!1}var ea=ta;(function(t,e){var r=A,n=ea,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,c=s?r.Buffer:void 0,u=c?c.isBuffer:void 0,o=u||n;t.exports=o})(J,J.exports);var ra=9007199254740991,na=/^(?:0|[1-9]\d*)$/;function ia(t,e){var r=typeof t;return e=e==null?ra:e,!!e&&(r=="number"||r!="symbol"&&na.test(t))&&t>-1&&t%1==0&&t<e}var aa=ia,sa=9007199254740991;function oa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=sa}var Ut=oa,ca=k,ua=Ut,la=N,ga="[object Arguments]",fa="[object Array]",da="[object Boolean]",_a="[object Date]",pa="[object Error]",ha="[object Function]",ya="[object Map]",va="[object Number]",ba="[object Object]",$a="[object RegExp]",ma="[object Set]",wa="[object String]",Aa="[object WeakMap]",Sa="[object ArrayBuffer]",Ta="[object DataView]",ja="[object Float32Array]",Oa="[object Float64Array]",Ca="[object Int8Array]",Ia="[object Int16Array]",Pa="[object Int32Array]",Ma="[object Uint8Array]",Ea="[object Uint8ClampedArray]",xa="[object Uint16Array]",Da="[object Uint32Array]",_={};_[ja]=_[Oa]=_[Ca]=_[Ia]=_[Pa]=_[Ma]=_[Ea]=_[xa]=_[Da]=!0,_[ga]=_[fa]=_[Sa]=_[da]=_[Ta]=_[_a]=_[pa]=_[ha]=_[ya]=_[va]=_[ba]=_[$a]=_[ma]=_[wa]=_[Aa]=!1;function La(t){return la(t)&&ua(t.length)&&!!_[ca(t)]}var Fa=La;function za(t){return function(e){return t(e)}}var at=za,G={exports:{}};(function(t,e){var r=jt,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,c=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();t.exports=c})(G,G.exports);var Na=Fa,Ga=at,Bt=G.exports,Ht=Bt&&Bt.isTypedArray,Ra=Ht?Ga(Ht):Na,Ua=Ra,Ba=Ui,Ha=Xi,Ka=it,ka=J.exports,qa=aa,Va=Ua,Wa=Object.prototype,Ja=Wa.hasOwnProperty;function Ya(t,e){var r=Ka(t),n=!r&&Ha(t),i=!r&&!n&&ka(t),a=!r&&!n&&!i&&Va(t),s=r||n||i||a,c=s?Ba(t.length,String):[],u=c.length;for(var o in t)(e||Ja.call(t,o))&&!(s&&(o=="length"||i&&(o=="offset"||o=="parent")||a&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||qa(o,u)))&&c.push(o);return c}var Kt=Ya,Qa=Object.prototype;function Xa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Qa;return t===r}var st=Xa;function Za(t,e){return function(r){return t(e(r))}}var kt=Za,ts=kt,es=ts(Object.keys,Object),rs=es,ns=st,is=rs,as=Object.prototype,ss=as.hasOwnProperty;function os(t){if(!ns(t))return is(t);var e=[];for(var r in Object(t))ss.call(t,r)&&r!="constructor"&&e.push(r);return e}var cs=os,us=Mt,ls=Ut;function gs(t){return t!=null&&ls(t.length)&&!us(t)}var qt=gs,fs=Kt,ds=cs,_s=qt;function ps(t){return _s(t)?fs(t):ds(t)}var ot=ps,hs=W,ys=ot;function vs(t,e){return t&&hs(e,ys(e),t)}var bs=vs;function $s(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ms=$s,ws=z,As=st,Ss=ms,Ts=Object.prototype,js=Ts.hasOwnProperty;function Os(t){if(!ws(t))return Ss(t);var e=As(t),r=[];for(var n in t)n=="constructor"&&(e||!js.call(t,n))||r.push(n);return r}var Cs=Os,Is=Kt,Ps=Cs,Ms=qt;function Es(t){return Ms(t)?Is(t,!0):Ps(t)}var ct=Es,xs=W,Ds=ct;function Ls(t,e){return t&&xs(e,Ds(e),t)}var Fs=Ls,ut={exports:{}};(function(t,e){var r=A,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a?r.Buffer:void 0,c=s?s.allocUnsafe:void 0;function u(o,l){if(l)return o.slice();var f=o.length,v=c?c(f):new o.constructor(f);return o.copy(v),v}t.exports=u})(ut,ut.exports);function zs(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Ns=zs;function Gs(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var Rs=Gs;function Us(){return[]}var Vt=Us,Bs=Rs,Hs=Vt,Ks=Object.prototype,ks=Ks.propertyIsEnumerable,Wt=Object.getOwnPropertySymbols,qs=Wt?function(t){return t==null?[]:(t=Object(t),Bs(Wt(t),function(e){return ks.call(t,e)}))}:Hs,lt=qs,Vs=W,Ws=lt;function Js(t,e){return Vs(t,Ws(t),e)}var Ys=Js;function Qs(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Jt=Qs,Xs=kt,Zs=Xs(Object.getPrototypeOf,Object),Yt=Zs,to=Jt,eo=Yt,ro=lt,no=Vt,io=Object.getOwnPropertySymbols,ao=io?function(t){for(var e=[];t;)to(e,ro(t)),t=eo(t);return e}:no,Qt=ao,so=W,oo=Qt;function co(t,e){return so(t,oo(t),e)}var uo=co,lo=Jt,go=it;function fo(t,e,r){var n=e(t);return go(t)?n:lo(n,r(t))}var Xt=fo,_o=Xt,po=lt,ho=ot;function yo(t){return _o(t,ho,po)}var vo=yo,bo=Xt,$o=Qt,mo=ct;function wo(t){return bo(t,mo,$o)}var Ao=wo,So=j,To=A,jo=So(To,"DataView"),Oo=jo,Co=j,Io=A,Po=Co(Io,"Promise"),Mo=Po,Eo=j,xo=A,Do=Eo(xo,"Set"),Lo=Do,Fo=j,zo=A,No=Fo(zo,"WeakMap"),Go=No,gt=Oo,ft=nt,dt=Mo,_t=Lo,pt=Go,Zt=k,E=xt,te="[object Map]",Ro="[object Object]",ee="[object Promise]",re="[object Set]",ne="[object WeakMap]",ie="[object DataView]",Uo=E(gt),Bo=E(ft),Ho=E(dt),Ko=E(_t),ko=E(pt),O=Zt;(gt&&O(new gt(new ArrayBuffer(1)))!=ie||ft&&O(new ft)!=te||dt&&O(dt.resolve())!=ee||_t&&O(new _t)!=re||pt&&O(new pt)!=ne)&&(O=function(t){var e=Zt(t),r=e==Ro?t.constructor:void 0,n=r?E(r):"";if(n)switch(n){case Uo:return ie;case Bo:return te;case Ho:return ee;case Ko:return re;case ko:return ne}return e});var ht=O,qo=Object.prototype,Vo=qo.hasOwnProperty;function Wo(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Vo.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Jo=Wo,Yo=A,Qo=Yo.Uint8Array,Xo=Qo,ae=Xo;function Zo(t){var e=new t.constructor(t.byteLength);return new ae(e).set(new ae(t)),e}var yt=Zo,tc=yt;function ec(t,e){var r=e?tc(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var rc=ec,nc=/\w*$/;function ic(t){var e=new t.constructor(t.source,nc.exec(t));return e.lastIndex=t.lastIndex,e}var ac=ic,se=et,oe=se?se.prototype:void 0,ce=oe?oe.valueOf:void 0;function sc(t){return ce?Object(ce.call(t)):{}}var oc=sc,cc=yt;function uc(t,e){var r=e?cc(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var lc=uc,gc=yt,fc=rc,dc=ac,_c=oc,pc=lc,hc="[object Boolean]",yc="[object Date]",vc="[object Map]",bc="[object Number]",$c="[object RegExp]",mc="[object Set]",wc="[object String]",Ac="[object Symbol]",Sc="[object ArrayBuffer]",Tc="[object DataView]",jc="[object Float32Array]",Oc="[object Float64Array]",Cc="[object Int8Array]",Ic="[object Int16Array]",Pc="[object Int32Array]",Mc="[object Uint8Array]",Ec="[object Uint8ClampedArray]",xc="[object Uint16Array]",Dc="[object Uint32Array]";function Lc(t,e,r){var n=t.constructor;switch(e){case Sc:return gc(t);case hc:case yc:return new n(+t);case Tc:return fc(t,r);case jc:case Oc:case Cc:case Ic:case Pc:case Mc:case Ec:case xc:case Dc:return pc(t,r);case vc:return new n;case bc:case wc:return new n(t);case $c:return dc(t);case mc:return new n;case Ac:return _c(t)}}var Fc=Lc,zc=z,ue=Object.create,Nc=function(){function t(){}return function(e){if(!zc(e))return{};if(ue)return ue(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Gc=Nc,Rc=Gc,Uc=Yt,Bc=st;function Hc(t){return typeof t.constructor=="function"&&!Bc(t)?Rc(Uc(t)):{}}var Kc=Hc,kc=ht,qc=N,Vc="[object Map]";function Wc(t){return qc(t)&&kc(t)==Vc}var Jc=Wc,Yc=Jc,Qc=at,le=G.exports,ge=le&&le.isMap,Xc=ge?Qc(ge):Yc,Zc=Xc,tu=ht,eu=N,ru="[object Set]";function nu(t){return eu(t)&&tu(t)==ru}var iu=nu,au=iu,su=at,fe=G.exports,de=fe&&fe.isSet,ou=de?su(de):au,cu=ou,uu=Ti,lu=Oi,gu=Nt,fu=bs,du=Fs,_u=ut.exports,pu=Ns,hu=Ys,yu=uo,vu=vo,bu=Ao,$u=ht,mu=Jo,wu=Fc,Au=Kc,Su=it,Tu=J.exports,ju=Zc,Ou=z,Cu=cu,Iu=ot,Pu=ct,Mu=1,Eu=2,xu=4,_e="[object Arguments]",Du="[object Array]",Lu="[object Boolean]",Fu="[object Date]",zu="[object Error]",pe="[object Function]",Nu="[object GeneratorFunction]",Gu="[object Map]",Ru="[object Number]",he="[object Object]",Uu="[object RegExp]",Bu="[object Set]",Hu="[object String]",Ku="[object Symbol]",ku="[object WeakMap]",qu="[object ArrayBuffer]",Vu="[object DataView]",Wu="[object Float32Array]",Ju="[object Float64Array]",Yu="[object Int8Array]",Qu="[object Int16Array]",Xu="[object Int32Array]",Zu="[object Uint8Array]",tl="[object Uint8ClampedArray]",el="[object Uint16Array]",rl="[object Uint32Array]",d={};d[_e]=d[Du]=d[qu]=d[Vu]=d[Lu]=d[Fu]=d[Wu]=d[Ju]=d[Yu]=d[Qu]=d[Xu]=d[Gu]=d[Ru]=d[he]=d[Uu]=d[Bu]=d[Hu]=d[Ku]=d[Zu]=d[tl]=d[el]=d[rl]=!0,d[zu]=d[pe]=d[ku]=!1;function Y(t,e,r,n,i,a){var s,c=e&Mu,u=e&Eu,o=e&xu;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Ou(t))return t;var l=Su(t);if(l){if(s=mu(t),!c)return pu(t,s)}else{var f=$u(t),v=f==pe||f==Nu;if(Tu(t))return _u(t,c);if(f==he||f==_e||v&&!i){if(s=u||v?{}:Au(t),!c)return u?yu(t,du(s,t)):hu(t,fu(s,t))}else{if(!d[f])return i?t:{};s=wu(t,f,c)}}a||(a=new uu);var S=a.get(t);if(S)return S;a.set(t,s),Cu(t)?t.forEach(function(m){s.add(Y(m,e,r,m,t,a))}):ju(t)&&t.forEach(function(m,w){s.set(w,Y(m,e,r,w,t,a))});var L=o?u?bu:vu:u?Pu:Iu,T=l?void 0:L(t);return lu(T||t,function(m,w){T&&(w=m,m=t[w]),gu(s,w,Y(m,e,r,w,t,a))}),s}var ye=Y,nl=ye,il=1,al=4;function sl(t){return nl(t,il|al)}var vt=sl;class x{constructor(e=1,r=25){g(this,"page");g(this,"limit");g(this,"term");g(this,"filters");g(this,"ids");g(this,"queries");g(this,"associations");g(this,"postFilter");g(this,"sortings");g(this,"aggregations");g(this,"grouping");g(this,"fields");g(this,"groupFields");g(this,"totalCountMode");g(this,"includes");this.page=e,this.limit=r,this.term=null,this.filters=[],this.includes=null,this.ids=[],this.queries=[],this.associations=[],this.postFilter=[],this.sortings=[],this.aggregations=[],this.grouping=[],this.groupFields=[],this.fields=[],this.totalCountMode=1}static fromCriteria(e){return vt(e)}parse(){const e={};return this.ids.length>0&&(e.ids=this.ids.join("|")),this.page!==null&&(e.page=this.page),this.limit!==null&&(e.limit=this.limit),this.term!==null&&(e.term=this.term),this.queries.length>0&&(e.query=this.queries),this.filters.length>0&&(e.filter=this.filters),this.postFilter.length>0&&(e["post-filter"]=this.postFilter),this.sortings.length>0&&(e.sort=this.sortings),this.aggregations.length>0&&(e.aggregations=this.aggregations),this.groupFields.length>0&&(e.groupFields=this.groupFields),this.grouping.length>0&&(e.grouping=this.grouping),this.fields.length>0&&(e.fields=this.fields),this.associations.length>0&&(e.associations={},this.associations.forEach(r=>{!e.associations||(e.associations[r.association]=r.criteria.parse())})),this.includes!==null&&(e.includes=this.includes),this.totalCountMode!==null&&(e["total-count-mode"]=this.totalCountMode),e}setIds(e){return this.ids=e,this}setTotalCountMode(e){return typeof e!="number"&&(this.totalCountMode=null),this.totalCountMode=e<0||e>2?null:e,this}setPage(e){return this.page=e,this}setLimit(e){return this.limit=e,this}setTerm(e){return this.term=e,this}addFilter(e){return this.filters.push(e),this}addIncludes(e){return Object.entries(e).forEach(([r,n])=>{this.includes===null&&(this.includes={}),this.includes[r]||(this.includes[r]=[]),this.includes[r].push(...n)}),this}addPostFilter(e){return this.postFilter.push(e),this}addSorting(e){return this.sortings.push(e),this}addQuery(e,r,n=null){const i={score:r,query:e};return n&&(i[n]=n),this.queries.push(i),this}addGroupField(e){return this.groupFields.push(e),this}addGrouping(e){return this.grouping.push(e),this}addFields(...e){return this.fields.push(...e),this}addAggregation(e){return this.aggregations.push(e),this}addAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n=n.getAssociation(i)}),this}getAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n.hasAssociation(i)||n.associations.push({association:i,criteria:new x(null,null)}),n=n.getAssociationCriteria(i)}),n}getAssociationCriteria(e){let r=null;return this.associations.forEach(n=>{n.association===e&&(r=n.criteria)}),r}getLimit(){var e;return(e=this.limit)!=null?e:0}getPage(){var e;return(e=this.page)!=null?e:0}getCriteriaData(){return{page:this.page,limit:this.limit,term:this.term,filters:this.filters,ids:this.ids,queries:this.queries,associations:this.associations,postFilter:this.postFilter,sortings:this.sortings,aggregations:this.aggregations,grouping:this.grouping,fields:this.fields,groupFields:this.groupFields,totalCountMode:this.totalCountMode,includes:this.includes}}hasAssociation(e){return this.associations.some(r=>r.association===e)}resetSorting(){this.sortings=[]}static avg(e,r){return{type:"avg",name:e,field:r}}static count(e,r){return{type:"count",name:e,field:r}}static max(e,r){return{type:"max",name:e,field:r}}static min(e,r){return{type:"min",name:e,field:r}}static stats(e,r){return{type:"stats",name:e,field:r}}static sum(e,r){return{type:"sum",name:e,field:r}}static terms(e,r,n=null,i=null,a=null){return{type:"terms",name:e,field:r,limit:n,sort:i,aggregation:a}}static filter(e,r,n){return{type:"filter",name:e,filter:r,aggregation:n}}static histogram(e,r,n,i,a,s){return{type:"histogram",name:e,field:r,interval:n,format:i,aggregation:a,timeZone:s}}static sort(e,r="ASC",n=!1){return{field:e,order:r,naturalSorting:n}}static naturalSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!0}}static contains(e,r){return{type:"contains",field:e,value:r}}static prefix(e,r){return{type:"prefix",field:e,value:r}}static suffix(e,r){return{type:"suffix",field:e,value:r}}static equalsAny(e,r){return{type:"equalsAny",field:e,value:r.join("|")}}static range(e,r){return{type:"range",field:e,parameters:r}}static equals(e,r){return{type:"equals",field:e,value:r}}static not(e,r=[]){return{type:"not",operator:e,queries:r}}static multi(e,r=[]){return{type:"multi",operator:e,queries:r}}}const ol=()=>({name:"criteria",serialize:({value:t,customizerMethod:e})=>{if(t instanceof x)return{__type__:"__Criteria__",data:e(t.getCriteriaData())}},deserialize:({value:t,customizerMethod:e})=>{if(X("__Criteria__",t)&&typeof t.data=="object"){const r=t.data,n=new x;return n.setPage(r.page),n.setLimit(r.limit),n.setTerm(r.term),r.filters.forEach(i=>{n.addFilter(i)}),n.setIds(r.ids),r.queries.forEach(({query:i,score:a})=>{n.addQuery(i,a)}),r.associations.forEach(i=>{n.associations.push(e(i))}),r.postFilter.forEach(i=>{n.addPostFilter(i)}),r.sortings.forEach(i=>{n.addSorting(i)}),r.aggregations.forEach(i=>{n.addAggregation(i)}),r.grouping.forEach(i=>{n.addGrouping(i)}),r.fields.forEach(i=>{n.addFields(i)}),r.groupFields.forEach(i=>{n.addGroupField(i)}),r.includes&&n.addIncludes(r.includes),n.setTotalCountMode(r.totalCountMode),n}}});let cl=(t,e,r)=>{t[e]=r};class ul{constructor(e,r,n,i={}){g(this,"id");g(this,"_origin");g(this,"_entityName");g(this,"_draft");g(this,"_isDirty");g(this,"_isNew");var s,c;this.id=e,this._origin=i.originData?vt(i.originData):vt(n),this._entityName=r,this._draft=n,this._isDirty=(s=i.isDirty)!=null?s:!1,this._isNew=(c=i.isNew)!=null?c:!1;const a=this;return new Proxy(this._draft,{get(u,o){return o in a._draft?a._draft[o]:a[o]},set(u,o,l){return cl(a._draft,o,l),a._isDirty=!0,!0}})}markAsNew(){this._isNew=!0}isNew(){return this._isNew}getIsDirty(){return this._isDirty}getOrigin(){return this._origin}getDraft(){return this._draft}getEntityName(){return this._entityName}}const ve=function(e,r,n,i){return new ul(e,r,n,i)},ll=()=>({name:"entity",serialize:({value:t,customizerMethod:e})=>{if(!(!b(t)||typeof t.getDraft!="function"))return{__type__:"__Entity__",__id__:t.id,__entityName__:t._entityName,__isDirty__:t._isDirty,__isNew__:t._isNew,__origin__:e(t._origin),__draft__:e(t._draft)}},deserialize:({value:t,customizerMethod:e})=>{if(X("__Entity__",t)&&typeof t.__origin__=="object")return new ve(t.__id__,t.__entityName__,e(t.__draft__),{originData:e(t.__origin__),isDirty:t.__isDirty__,isNew:t.__isNew__})}});class D extends Array{constructor(e,r,n,i=null,a=[],s=null,c=null){super();g(this,"entity");g(this,"source");g(this,"context");g(this,"criteria");g(this,"aggregations");g(this,"total");g(this,"first");g(this,"last");g(this,"remove");g(this,"has");g(this,"get");g(this,"getAt");g(this,"getIds");g(this,"add");g(this,"addAt");g(this,"moveItem");this.entity=r,this.source=e,this.context=n,this.criteria=i,this.aggregations=c,this.total=s,this.push(...a),this.first=function(){return this.length<=0?null:this[0]},this.last=function(){return this.length<=0?null:this[this.length-1]},this.remove=function(o){const l=this.findIndex(f=>f.id===o);return l<0?!1:(this.splice(l,1),!0)},this.has=function(o){return this.some(l=>l.id===o)},this.get=function(o){const l=this.find(f=>f.id===o);return typeof l!="undefined"?l:null},this.getAt=function(o){const l=this[o];return typeof l!="undefined"?l:null},this.getIds=function(){return this.map(o=>o.id)},this.add=function(o){this.push(o)},this.addAt=function(o,l){if(typeof l=="undefined"){this.add(o);return}this.splice(l,0,o)},this.moveItem=function(o,l=null){if(l===null&&(l=this.length),o<0||o>=this.length)return null;if(l===o)return this.getAt(o);const f=this.find((L,T)=>T===o);if(typeof f=="undefined")return null;const v=this.filter((L,T)=>T!==o),S=[...v.slice(0,l),f,...v.slice(l)];return this.splice(0,this.length,...S),f},this.filter=function(o,l){const f=Object.getPrototypeOf(this).filter.call(this,o,l);return new D(this.source,this.entity,this.context,this.criteria,f,this.total,this.aggregations)}}static fromCollection(e){return new D(e.source,e.entity,e.context,e.criteria===null?e.criteria:x.fromCriteria(e.criteria),e,e.total,e.aggregations)}}const gl=()=>({name:"entity-collection",serialize:({value:t,customizerMethod:e})=>{if(t instanceof D)return e({__type__:"__EntityCollection__",__source__:t.source,__entityName__:t.entity,__context__:t.context,__criteria__:t.criteria,__entities__:Array.from(t),__total__:t.total,__aggregations__:t.aggregations})},deserialize:({value:t,customizerMethod:e})=>{if(X("__EntityCollection__",t))return new D(t.__source__,t.__entityName__,t.__context__,e(t.__criteria__),e(t.__entities__),t.__total__,t.__aggregations__)}});var fl=ye,dl=1,_l=4;function pl(t,e){return e=typeof e=="function"?e:void 0,fl(t,dl|_l,e)}var be=pl;const hl=[ol,gl,ll,Me];function yl(t){const e=hl.map(s=>s(t));function r(){return e}function n(s){var c;return(c=e.find(u=>u.name===s))!=null?c:null}function i(s){return be(s,(c,u,o,l)=>{for(const f of e){const v=f.serialize({value:c,key:u,object:o,stack:l,customizerMethod:i});if(v)return v}})}function a(s,c){return be(s,(u,o,l,f)=>{for(const v of e){const S=v.deserialize({value:u,key:o,object:l,stack:f,event:c,customizerMethod:a});if(S)return S}})}return{getSerializers:r,getSerializerByName:n,serialize:i,deserialize:a}}const{serialize:$e,deserialize:me}=yl({handleFactory:vl,send:$}),bt=new Set;function $(t,e,r,n){const i=Oe(t);if(i!==null){const v=new tt(t,i);return Promise.reject(v)}const a=h(),s=e!=null?e:{},u=$e({_type:t,_data:s,_callbackId:a}),o=JSON.stringify(u);let l=!1;const f=7e3;return new Promise((v,S)=>{const L=function(w){if(typeof w.data!="string")return;let U;try{U=JSON.parse(w.data)}catch{return}if(!ml(U)||U._callbackId!==a||!U.hasOwnProperty("_response"))return;const ag=me(U,w);window.removeEventListener("message",L),l||(l=!0,v(ag._response))};window.addEventListener("message",L);let T=!0;try{T=!window.parent.origin}catch{}let m=T?document.referrer:window.parent.origin;n&&(m=n),r?r.postMessage(o,m):window.parent.postMessage(o,m),setTimeout(()=>{l||S("Send timeout expired. It could be possible that no handler for the postMessage request exists or that the handler freezed.")},f)})}function $t(t,e,r){const n=async function(i){var f;if(Z[t]&&Object.keys(Z[t]).length&&(!r||Ce(t,r,i.origin)!==null)||typeof i.data!="string")return;let a;try{a=JSON.parse(i.data)}catch{return}if(!$l(a)||a._type!==t)return;const s=me(a,i),c=await Promise.resolve(e(s._data,{_event_:i})),u={_callbackId:s._callbackId,_type:s._type,_response:c!=null?c:null},o=$e(u),l=JSON.stringify(o);i.source?i.source.postMessage(l,{targetOrigin:(f=i.origin)!=null?f:"*"}):window.postMessage(l,window.origin)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}function vl(t){return(e,r)=>$t(e,r,t)}function bl(t,e){return $t(t,e,{})}function y(t,e){return r=>$(t,wt(wt({},e),r))}function we(t){return e=>bl(t,e)}(async()=>{$t("__registerWindow__",(t,e)=>{if(e._event_.source){const r=e._event_.source;bt.add({source:r,origin:e._event_.origin})}else bt.add({source:window,origin:window.origin})},{}),await $("__registerWindow__",{})})().catch(t=>console.error(t)),window._swsdk={sourceRegistry:bt};function $l(t){const e=t;return!!e._type&&!!e._data&&!!e._callbackId}function ml(t){const e=t;return!!e._type&&!!e.hasOwnProperty("_response")&&!!e._callbackId}const wl=y("windowRedirect"),Al=y("windowReload",{});var Sl=Object.freeze(Object.defineProperty({__proto__:null,redirect:wl,reload:Al},Symbol.toStringTag,{value:"Module"}));const Tl=y("notificationDispatch");var jl=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Tl},Symbol.toStringTag,{value:"Module"}));const Ol=y("contextLanguage",{}),Cl=we("contextLanguage"),Il=y("contextEnvironment",{}),Pl=y("contextLocale",{}),Ml=we("contextLocale"),El=y("contextCurrency",{}),xl=y("contextShopwareVersion",{}),Dl=y("contextAppInformation",{});var Ll=Object.freeze(Object.defineProperty({__proto__:null,getLanguage:Ol,subscribeLanguage:Cl,getEnvironment:Il,getLocale:Pl,subscribeLocale:Ml,getCurrency:El,getShopwareVersion:xl,getAppInformation:Dl},Symbol.toStringTag,{value:"Module"}));const Fl=y("uiComponentSectionRenderer",{src:(Se=je())!=null?Se:void 0});var zl=Object.freeze(Object.defineProperty({__proto__:null,add:Fl},Symbol.toStringTag,{value:"Module"})),Nl=t=>({addTabItem:y("uiTabsAddTabItem",{positionId:t})});const Gl=t=>Q()===t,Rl=()=>window!==window.parent,Ae=t=>{if(t)return $("locationUpdateHeight",{height:t,locationId:Q()});const e=document.documentElement.offsetHeight;return $("locationUpdateHeight",{height:e,locationId:Q()})};let R=null;var Ul=Object.freeze(Object.defineProperty({__proto__:null,is:Gl,isIframe:Rl,updateHeight:Ae,startAutoResizer:()=>{R=new ResizeObserver(()=>{Ae()}),R.observe(document.body)},stopAutoResizer:()=>{R&&(R.unobserve(document.body),R.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const Bl=y("menuItemAdd");var Hl=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:Bl},Symbol.toStringTag,{value:"Module"}));const Kl=y("settingsItemAdd");var kl=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:Kl},Symbol.toStringTag,{value:"Module"}));const ql=y("mainModuleAdd");var Vl=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:ql},Symbol.toStringTag,{value:"Module"}));const Wl=y("uiModalOpen"),Jl=y("uiModalClose");var Yl=Object.freeze(Object.defineProperty({__proto__:null,open:Wl,close:Jl},Symbol.toStringTag,{value:"Module"}));const Ql=y("actionButtonAdd");var Xl=Object.freeze(Object.defineProperty({__proto__:null,add:Ql},Symbol.toStringTag,{value:"Module"}));const Zl=y("actionExecute");var tg=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:Zl},Symbol.toStringTag,{value:"Module"})),eg=t=>({search:(e,r)=>$("repositorySearch",{entityName:t,context:r,criteria:e}),get:(e,r,n)=>$("repositoryGet",{entityName:t,id:e,context:r,criteria:n}),save:(e,r)=>$("repositorySave",{entityName:t,entity:e,context:r}),clone:(e,r,n)=>$("repositoryClone",{entityName:t,entityId:e,context:r,behavior:n}),hasChanges:e=>$("repositoryHasChanges",{entityName:t,entity:e}),saveAll:(e,r)=>$("repositorySaveAll",{entityName:t,entities:e,context:r}),delete:(e,r)=>$("repositoryDelete",{entityName:t,entityId:e,context:r}),create:(e,r)=>$("repositoryCreate",{entityName:t,entityId:r,context:e})}),rg=Object.freeze(Object.defineProperty({__proto__:null,repository:eg,Classes:{Criteria:x,Entity:ve,EntityCollection:D}},Symbol.toStringTag,{value:"Module"}));const ng={webhook:tg},ig={componentSection:zl,tabs:Nl,menu:Hl,settings:kl,mainModule:Vl,modal:Yl,actionButton:Xl};p.app=ng,p.context=Ll,p.data=rg,p.location=Ul,p.notification=jl,p.ui=ig,p.window=Sl,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
var Sf=Object.defineProperty;var Ne=Object.getOwnPropertySymbols;var wf=Object.prototype.hasOwnProperty,Tf=Object.prototype.propertyIsEnumerable;var Ot=(h,p,b)=>p in h?Sf(h,p,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[p]=b,jt=(h,p)=>{for(var b in p||(p={}))wf.call(p,b)&&Ot(h,b,p[b]);if(Ne)for(var b of Ne(p))Tf.call(p,b)&&Ot(h,b,p[b]);return h};var g=(h,p,b)=>(Ot(h,typeof p!="symbol"?p+"":p,b),b);(function(h,p){typeof exports=="object"&&typeof module!="undefined"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(h=typeof globalThis!="undefined"?globalThis:h||self,p(h.sw={}))})(this,function(h){var Le;"use strict";var p=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},b=Object.prototype,Re=b.hasOwnProperty;function Ge(t,e){return t!=null&&Re.call(t,e)}var Ue=Ge,He=Array.isArray,O=He,Be=typeof p=="object"&&p&&p.Object===Object&&p,Ct=Be,Ke=Ct,ke=typeof self=="object"&&self&&self.Object===Object&&self,qe=Ke||ke||Function("return this")(),w=qe,Ve=w,We=Ve.Symbol,V=We,It=V,Pt=Object.prototype,Je=Pt.hasOwnProperty,Ye=Pt.toString,N=It?It.toStringTag:void 0;function Xe(t){var e=Je.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch{}var i=Ye.call(t);return n&&(e?t[N]=r:delete t[N]),i}var Ze=Xe,Qe=Object.prototype,tr=Qe.toString;function er(t){return tr.call(t)}var rr=er,Et=V,nr=Ze,ir=rr,ar="[object Null]",sr="[object Undefined]",Mt=Et?Et.toStringTag:void 0;function or(t){return t==null?t===void 0?sr:ar:Mt&&Mt in Object(t)?nr(t):ir(t)}var R=or;function cr(t){return t!=null&&typeof t=="object"}var I=cr,ur=R,lr=I,gr="[object Symbol]";function fr(t){return typeof t=="symbol"||lr(t)&&ur(t)==gr}var et=fr,_r=O,dr=et,pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hr=/^\w*$/;function yr(t,e){if(_r(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||dr(t)?!0:hr.test(t)||!pr.test(t)||e!=null&&t in Object(e)}var vr=yr;function br(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var G=br,$r=R,mr=G,Sr="[object AsyncFunction]",wr="[object Function]",Tr="[object GeneratorFunction]",Ar="[object Proxy]";function Or(t){if(!mr(t))return!1;var e=$r(t);return e==wr||e==Tr||e==Sr||e==Ar}var xt=Or,jr=w,Cr=jr["__core-js_shared__"],Ir=Cr,rt=Ir,Dt=function(){var t=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Pr(t){return!!Dt&&Dt in t}var Er=Pr,Mr=Function.prototype,xr=Mr.toString;function Dr(t){if(t!=null){try{return xr.call(t)}catch{}try{return t+""}catch{}}return""}var zt=Dr,zr=xt,Fr=Er,Lr=G,Nr=zt,Rr=/[\\^$.*+?()[\]{}|]/g,Gr=/^\[object .+?Constructor\]$/,Ur=Function.prototype,Hr=Object.prototype,Br=Ur.toString,Kr=Hr.hasOwnProperty,kr=RegExp("^"+Br.call(Kr).replace(Rr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qr(t){if(!Lr(t)||Fr(t))return!1;var e=zr(t)?kr:Gr;return e.test(Nr(t))}var Vr=qr;function Wr(t,e){return t==null?void 0:t[e]}var Jr=Wr,Yr=Vr,Xr=Jr;function Zr(t,e){var r=Xr(t,e);return Yr(r)?r:void 0}var j=Zr,Qr=j,tn=Qr(Object,"create"),W=tn,Ft=W;function en(){this.__data__=Ft?Ft(null):{},this.size=0}var rn=en;function nn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var an=nn,sn=W,on="__lodash_hash_undefined__",cn=Object.prototype,un=cn.hasOwnProperty;function ln(t){var e=this.__data__;if(sn){var r=e[t];return r===on?void 0:r}return un.call(e,t)?e[t]:void 0}var gn=ln,fn=W,_n=Object.prototype,dn=_n.hasOwnProperty;function pn(t){var e=this.__data__;return fn?e[t]!==void 0:dn.call(e,t)}var hn=pn,yn=W,vn="__lodash_hash_undefined__";function bn(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=yn&&e===void 0?vn:e,this}var $n=bn,mn=rn,Sn=an,wn=gn,Tn=hn,An=$n;function P(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}P.prototype.clear=mn,P.prototype.delete=Sn,P.prototype.get=wn,P.prototype.has=Tn,P.prototype.set=An;var On=P;function jn(){this.__data__=[],this.size=0}var Cn=jn;function In(t,e){return t===e||t!==t&&e!==e}var Lt=In,Pn=Lt;function En(t,e){for(var r=t.length;r--;)if(Pn(t[r][0],e))return r;return-1}var J=En,Mn=J,xn=Array.prototype,Dn=xn.splice;function zn(t){var e=this.__data__,r=Mn(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Dn.call(e,r,1),--this.size,!0}var Fn=zn,Ln=J;function Nn(t){var e=this.__data__,r=Ln(e,t);return r<0?void 0:e[r][1]}var Rn=Nn,Gn=J;function Un(t){return Gn(this.__data__,t)>-1}var Hn=Un,Bn=J;function Kn(t,e){var r=this.__data__,n=Bn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var kn=Kn,qn=Cn,Vn=Fn,Wn=Rn,Jn=Hn,Yn=kn;function E(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}E.prototype.clear=qn,E.prototype.delete=Vn,E.prototype.get=Wn,E.prototype.has=Jn,E.prototype.set=Yn;var Y=E,Xn=j,Zn=w,Qn=Xn(Zn,"Map"),nt=Qn,Nt=On,ti=Y,ei=nt;function ri(){this.size=0,this.__data__={hash:new Nt,map:new(ei||ti),string:new Nt}}var ni=ri;function ii(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ai=ii,si=ai;function oi(t,e){var r=t.__data__;return si(e)?r[typeof e=="string"?"string":"hash"]:r.map}var X=oi,ci=X;function ui(t){var e=ci(this,t).delete(t);return this.size-=e?1:0,e}var li=ui,gi=X;function fi(t){return gi(this,t).get(t)}var _i=fi,di=X;function pi(t){return di(this,t).has(t)}var hi=pi,yi=X;function vi(t,e){var r=yi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var bi=vi,$i=ni,mi=li,Si=_i,wi=hi,Ti=bi;function M(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}M.prototype.clear=$i,M.prototype.delete=mi,M.prototype.get=Si,M.prototype.has=wi,M.prototype.set=Ti;var Rt=M,Gt=Rt,Ai="Expected a function";function it(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ai);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(it.Cache||Gt),r}it.Cache=Gt;var Oi=it,ji=Oi,Ci=500;function Ii(t){var e=ji(t,function(n){return r.size===Ci&&r.clear(),n}),r=e.cache;return e}var Pi=Ii,Ei=Pi,Mi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/\\(\\)?/g,Di=Ei(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Mi,function(r,n,i,a){e.push(i?a.replace(xi,"$1"):n||r)}),e}),zi=Di;function Fi(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Li=Fi,Ut=V,Ni=Li,Ri=O,Gi=et,Ui=1/0,Ht=Ut?Ut.prototype:void 0,Bt=Ht?Ht.toString:void 0;function Kt(t){if(typeof t=="string")return t;if(Ri(t))return Ni(t,Kt)+"";if(Gi(t))return Bt?Bt.call(t):"";var e=t+"";return e=="0"&&1/t==-Ui?"-0":e}var Hi=Kt,Bi=Hi;function Ki(t){return t==null?"":Bi(t)}var ki=Ki,qi=O,Vi=vr,Wi=zi,Ji=ki;function Yi(t,e){return qi(t)?t:Vi(t,e)?[t]:Wi(Ji(t))}var Xi=Yi,Zi=R,Qi=I,ta="[object Arguments]";function ea(t){return Qi(t)&&Zi(t)==ta}var ra=ea,kt=ra,na=I,qt=Object.prototype,ia=qt.hasOwnProperty,aa=qt.propertyIsEnumerable,sa=kt(function(){return arguments}())?kt:function(t){return na(t)&&ia.call(t,"callee")&&!aa.call(t,"callee")},Vt=sa,oa=9007199254740991,ca=/^(?:0|[1-9]\d*)$/;function ua(t,e){var r=typeof t;return e=e==null?oa:e,!!e&&(r=="number"||r!="symbol"&&ca.test(t))&&t>-1&&t%1==0&&t<e}var Wt=ua,la=9007199254740991;function ga(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=la}var at=ga,fa=et,_a=1/0;function da(t){if(typeof t=="string"||fa(t))return t;var e=t+"";return e=="0"&&1/t==-_a?"-0":e}var pa=da,ha=Xi,ya=Vt,va=O,ba=Wt,$a=at,ma=pa;function Sa(t,e,r){e=ha(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=ma(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&$a(i)&&ba(s,i)&&(va(t)||ya(t)))}var wa=Sa,Ta=Ue,Aa=wa;function Oa(t,e){return t!=null&&Aa(t,e,Ta)}var ja=Oa;function Jt(){return String(Date.now().toString(36)+Math.random().toString(36).substr(2))}function st(t){return t!==null&&typeof t=="object"}function ot(){return new URLSearchParams(window.location.search).get("location-id")}function Ca(){const t=window.location;return new URL(t.pathname,t.origin).toString()}function U(t,e){return st(e)&&e.__type__&&e.__type__===t}function Ia(t,e){return ja(t,e)}const ct={notificationDispatch:{},windowRedirect:{},windowReload:{},contextLanguage:{},contextEnvironment:{},contextLocale:{},contextCurrency:{},contextShopwareVersion:{},contextAppInformation:{},getPageTitle:{},uiComponentSectionRenderer:{},uiTabsAddTabItem:{},locationUpdateHeight:{},menuItemAdd:{},settingsItemAdd:{},mainModuleAdd:{},uiModalOpen:{},uiModalClose:{},actionButtonAdd:{},actionExecute:{},__function__:{},__registerWindow__:{},_criteriaTest:{},_collectionTest:{},_multiply:{},_subtract:{},_privileges:{create:["user"],read:["user"],update:["user"],delete:["user"]}};function Pa(t){const e=Yt(t),r=Ma(window.location);return!e||Object.keys(e).length<=0?null:Xt(e,r)}function Ea(t,e,r){const n=Yt(t),i=xa(e,r);return i?Xt(n,i.permissions):null}function Yt(t){var e;return(e=ct[t])!=null?e:{}}function Ma(t){const r=new URLSearchParams(t.search).get("privileges");return r?JSON.parse(r):{}}function Xt(t,e){const r=Object.keys(t),n=[];return r.forEach(i=>{var a;(a=t[i])==null||a.forEach(s=>{var c;(c=e[i])!=null&&c.includes(s)||n.push(`${i}:${s}`)})}),n.length>=1?n:null}function xa(t,e){let r=null;return Object.values(t).forEach(n=>{n.baseUrl===e&&(r=n)}),r}class H extends Error{constructor(e,r){super(`Your app is missing the priviliges ${r.join(", ")} for action "${e}".`);g(this,"missingPrivileges");g(this,"messageType");this.missingPrivileges=r,this.messageType=e,Object.setPrototypeOf(this,H.prototype)}toJSON(){return{__type__:"__MissingPrivilegesError__",__messageType__:this.messageType,__data__:this.missingPrivileges}}}const Da=({send:t,handleFactory:e})=>{const r={};let n=!1;function i(){if(n)return;n=!0,e({})("__function__",async({args:s,id:c})=>await Promise.resolve(r[c](...s)))}return{name:"function",serialize:({value:a})=>{if(typeof a=="function"){const s=Jt();return r[s]=a,i(),{__type__:"__function__",id:s,origin:window.origin}}},deserialize:({value:a,event:s})=>{var u;const c=(u=s==null?void 0:s.source)!=null?u:window;if(st(a)&&a.__type__&&a.__type__==="__function__"&&typeof a.id=="string"){const o=a.id,l=a.origin;return(...f)=>t("__function__",{args:f,id:o},c,l)}}}};var za=Y;function Fa(){this.__data__=new za,this.size=0}var La=Fa;function Na(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Ra=Na;function Ga(t){return this.__data__.get(t)}var Ua=Ga;function Ha(t){return this.__data__.has(t)}var Ba=Ha,Ka=Y,ka=nt,qa=Rt,Va=200;function Wa(t,e){var r=this.__data__;if(r instanceof Ka){var n=r.__data__;if(!ka||n.length<Va-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new qa(n)}return r.set(t,e),this.size=r.size,this}var Ja=Wa,Ya=Y,Xa=La,Za=Ra,Qa=Ua,ts=Ba,es=Ja;function x(t){var e=this.__data__=new Ya(t);this.size=e.size}x.prototype.clear=Xa,x.prototype.delete=Za,x.prototype.get=Qa,x.prototype.has=ts,x.prototype.set=es;var rs=x;function ns(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var is=ns,as=j,ss=function(){try{var t=as(Object,"defineProperty");return t({},"",{}),t}catch{}}(),os=ss,Zt=os;function cs(t,e,r){e=="__proto__"&&Zt?Zt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Qt=cs,us=Qt,ls=Lt,gs=Object.prototype,fs=gs.hasOwnProperty;function _s(t,e,r){var n=t[e];(!(fs.call(t,e)&&ls(n,r))||r===void 0&&!(e in t))&&us(t,e,r)}var te=_s,ds=te,ps=Qt;function hs(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=n?n(r[c],t[c],c,r,t):void 0;u===void 0&&(u=t[c]),i?ps(r,c,u):ds(r,c,u)}return r}var Z=hs;function ys(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var vs=ys,Q={exports:{}};function bs(){return!1}var $s=bs;(function(t,e){var r=w,n=$s,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,c=s?r.Buffer:void 0,u=c?c.isBuffer:void 0,o=u||n;t.exports=o})(Q,Q.exports);var ms=R,Ss=at,ws=I,Ts="[object Arguments]",As="[object Array]",Os="[object Boolean]",js="[object Date]",Cs="[object Error]",Is="[object Function]",Ps="[object Map]",Es="[object Number]",Ms="[object Object]",xs="[object RegExp]",Ds="[object Set]",zs="[object String]",Fs="[object WeakMap]",Ls="[object ArrayBuffer]",Ns="[object DataView]",Rs="[object Float32Array]",Gs="[object Float64Array]",Us="[object Int8Array]",Hs="[object Int16Array]",Bs="[object Int32Array]",Ks="[object Uint8Array]",ks="[object Uint8ClampedArray]",qs="[object Uint16Array]",Vs="[object Uint32Array]",d={};d[Rs]=d[Gs]=d[Us]=d[Hs]=d[Bs]=d[Ks]=d[ks]=d[qs]=d[Vs]=!0,d[Ts]=d[As]=d[Ls]=d[Os]=d[Ns]=d[js]=d[Cs]=d[Is]=d[Ps]=d[Es]=d[Ms]=d[xs]=d[Ds]=d[zs]=d[Fs]=!1;function Ws(t){return ws(t)&&Ss(t.length)&&!!d[ms(t)]}var Js=Ws;function Ys(t){return function(e){return t(e)}}var ut=Ys,B={exports:{}};(function(t,e){var r=Ct,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,c=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();t.exports=c})(B,B.exports);var Xs=Js,Zs=ut,ee=B.exports,re=ee&&ee.isTypedArray,Qs=re?Zs(re):Xs,to=Qs,eo=vs,ro=Vt,no=O,io=Q.exports,ao=Wt,so=to,oo=Object.prototype,co=oo.hasOwnProperty;function uo(t,e){var r=no(t),n=!r&&ro(t),i=!r&&!n&&io(t),a=!r&&!n&&!i&&so(t),s=r||n||i||a,c=s?eo(t.length,String):[],u=c.length;for(var o in t)(e||co.call(t,o))&&!(s&&(o=="length"||i&&(o=="offset"||o=="parent")||a&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||ao(o,u)))&&c.push(o);return c}var ne=uo,lo=Object.prototype;function go(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||lo;return t===r}var lt=go;function fo(t,e){return function(r){return t(e(r))}}var ie=fo,_o=ie,po=_o(Object.keys,Object),ho=po,yo=lt,vo=ho,bo=Object.prototype,$o=bo.hasOwnProperty;function mo(t){if(!yo(t))return vo(t);var e=[];for(var r in Object(t))$o.call(t,r)&&r!="constructor"&&e.push(r);return e}var So=mo,wo=xt,To=at;function Ao(t){return t!=null&&To(t.length)&&!wo(t)}var ae=Ao,Oo=ne,jo=So,Co=ae;function Io(t){return Co(t)?Oo(t):jo(t)}var gt=Io,Po=Z,Eo=gt;function Mo(t,e){return t&&Po(e,Eo(e),t)}var xo=Mo;function Do(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var zo=Do,Fo=G,Lo=lt,No=zo,Ro=Object.prototype,Go=Ro.hasOwnProperty;function Uo(t){if(!Fo(t))return No(t);var e=Lo(t),r=[];for(var n in t)n=="constructor"&&(e||!Go.call(t,n))||r.push(n);return r}var Ho=Uo,Bo=ne,Ko=Ho,ko=ae;function qo(t){return ko(t)?Bo(t,!0):Ko(t)}var ft=qo,Vo=Z,Wo=ft;function Jo(t,e){return t&&Vo(e,Wo(e),t)}var Yo=Jo,_t={exports:{}};(function(t,e){var r=w,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a?r.Buffer:void 0,c=s?s.allocUnsafe:void 0;function u(o,l){if(l)return o.slice();var f=o.length,y=c?c(f):new o.constructor(f);return o.copy(y),y}t.exports=u})(_t,_t.exports);function Xo(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Zo=Xo;function Qo(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var tc=Qo;function ec(){return[]}var se=ec,rc=tc,nc=se,ic=Object.prototype,ac=ic.propertyIsEnumerable,oe=Object.getOwnPropertySymbols,sc=oe?function(t){return t==null?[]:(t=Object(t),rc(oe(t),function(e){return ac.call(t,e)}))}:nc,dt=sc,oc=Z,cc=dt;function uc(t,e){return oc(t,cc(t),e)}var lc=uc;function gc(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var ce=gc,fc=ie,_c=fc(Object.getPrototypeOf,Object),ue=_c,dc=ce,pc=ue,hc=dt,yc=se,vc=Object.getOwnPropertySymbols,bc=vc?function(t){for(var e=[];t;)dc(e,hc(t)),t=pc(t);return e}:yc,le=bc,$c=Z,mc=le;function Sc(t,e){return $c(t,mc(t),e)}var wc=Sc,Tc=ce,Ac=O;function Oc(t,e,r){var n=e(t);return Ac(t)?n:Tc(n,r(t))}var ge=Oc,jc=ge,Cc=dt,Ic=gt;function Pc(t){return jc(t,Ic,Cc)}var Ec=Pc,Mc=ge,xc=le,Dc=ft;function zc(t){return Mc(t,Dc,xc)}var Fc=zc,Lc=j,Nc=w,Rc=Lc(Nc,"DataView"),Gc=Rc,Uc=j,Hc=w,Bc=Uc(Hc,"Promise"),Kc=Bc,kc=j,qc=w,Vc=kc(qc,"Set"),Wc=Vc,Jc=j,Yc=w,Xc=Jc(Yc,"WeakMap"),Zc=Xc,pt=Gc,ht=nt,yt=Kc,vt=Wc,bt=Zc,fe=R,D=zt,_e="[object Map]",Qc="[object Object]",de="[object Promise]",pe="[object Set]",he="[object WeakMap]",ye="[object DataView]",tu=D(pt),eu=D(ht),ru=D(yt),nu=D(vt),iu=D(bt),C=fe;(pt&&C(new pt(new ArrayBuffer(1)))!=ye||ht&&C(new ht)!=_e||yt&&C(yt.resolve())!=de||vt&&C(new vt)!=pe||bt&&C(new bt)!=he)&&(C=function(t){var e=fe(t),r=e==Qc?t.constructor:void 0,n=r?D(r):"";if(n)switch(n){case tu:return ye;case eu:return _e;case ru:return de;case nu:return pe;case iu:return he}return e});var $t=C,au=Object.prototype,su=au.hasOwnProperty;function ou(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&su.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var cu=ou,uu=w,lu=uu.Uint8Array,gu=lu,ve=gu;function fu(t){var e=new t.constructor(t.byteLength);return new ve(e).set(new ve(t)),e}var mt=fu,_u=mt;function du(t,e){var r=e?_u(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var pu=du,hu=/\w*$/;function yu(t){var e=new t.constructor(t.source,hu.exec(t));return e.lastIndex=t.lastIndex,e}var vu=yu,be=V,$e=be?be.prototype:void 0,me=$e?$e.valueOf:void 0;function bu(t){return me?Object(me.call(t)):{}}var $u=bu,mu=mt;function Su(t,e){var r=e?mu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var wu=Su,Tu=mt,Au=pu,Ou=vu,ju=$u,Cu=wu,Iu="[object Boolean]",Pu="[object Date]",Eu="[object Map]",Mu="[object Number]",xu="[object RegExp]",Du="[object Set]",zu="[object String]",Fu="[object Symbol]",Lu="[object ArrayBuffer]",Nu="[object DataView]",Ru="[object Float32Array]",Gu="[object Float64Array]",Uu="[object Int8Array]",Hu="[object Int16Array]",Bu="[object Int32Array]",Ku="[object Uint8Array]",ku="[object Uint8ClampedArray]",qu="[object Uint16Array]",Vu="[object Uint32Array]";function Wu(t,e,r){var n=t.constructor;switch(e){case Lu:return Tu(t);case Iu:case Pu:return new n(+t);case Nu:return Au(t,r);case Ru:case Gu:case Uu:case Hu:case Bu:case Ku:case ku:case qu:case Vu:return Cu(t,r);case Eu:return new n;case Mu:case zu:return new n(t);case xu:return Ou(t);case Du:return new n;case Fu:return ju(t)}}var Ju=Wu,Yu=G,Se=Object.create,Xu=function(){function t(){}return function(e){if(!Yu(e))return{};if(Se)return Se(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Zu=Xu,Qu=Zu,tl=ue,el=lt;function rl(t){return typeof t.constructor=="function"&&!el(t)?Qu(tl(t)):{}}var nl=rl,il=$t,al=I,sl="[object Map]";function ol(t){return al(t)&&il(t)==sl}var cl=ol,ul=cl,ll=ut,we=B.exports,Te=we&&we.isMap,gl=Te?ll(Te):ul,fl=gl,_l=$t,dl=I,pl="[object Set]";function hl(t){return dl(t)&&_l(t)==pl}var yl=hl,vl=yl,bl=ut,Ae=B.exports,Oe=Ae&&Ae.isSet,$l=Oe?bl(Oe):vl,ml=$l,Sl=rs,wl=is,Tl=te,Al=xo,Ol=Yo,jl=_t.exports,Cl=Zo,Il=lc,Pl=wc,El=Ec,Ml=Fc,xl=$t,Dl=cu,zl=Ju,Fl=nl,Ll=O,Nl=Q.exports,Rl=fl,Gl=G,Ul=ml,Hl=gt,Bl=ft,Kl=1,kl=2,ql=4,je="[object Arguments]",Vl="[object Array]",Wl="[object Boolean]",Jl="[object Date]",Yl="[object Error]",Ce="[object Function]",Xl="[object GeneratorFunction]",Zl="[object Map]",Ql="[object Number]",Ie="[object Object]",tg="[object RegExp]",eg="[object Set]",rg="[object String]",ng="[object Symbol]",ig="[object WeakMap]",ag="[object ArrayBuffer]",sg="[object DataView]",og="[object Float32Array]",cg="[object Float64Array]",ug="[object Int8Array]",lg="[object Int16Array]",gg="[object Int32Array]",fg="[object Uint8Array]",_g="[object Uint8ClampedArray]",dg="[object Uint16Array]",pg="[object Uint32Array]",_={};_[je]=_[Vl]=_[ag]=_[sg]=_[Wl]=_[Jl]=_[og]=_[cg]=_[ug]=_[lg]=_[gg]=_[Zl]=_[Ql]=_[Ie]=_[tg]=_[eg]=_[rg]=_[ng]=_[fg]=_[_g]=_[dg]=_[pg]=!0,_[Yl]=_[Ce]=_[ig]=!1;function tt(t,e,r,n,i,a){var s,c=e&Kl,u=e&kl,o=e&ql;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Gl(t))return t;var l=Ll(t);if(l){if(s=Dl(t),!c)return Cl(t,s)}else{var f=xl(t),y=f==Ce||f==Xl;if(Nl(t))return jl(t,c);if(f==Ie||f==je||y&&!i){if(s=u||y?{}:Fl(t),!c)return u?Pl(t,Ol(s,t)):Il(t,Al(s,t))}else{if(!_[f])return i?t:{};s=zl(t,f,c)}}a||(a=new Sl);var T=a.get(t);if(T)return T;a.set(t,s),Ul(t)?t.forEach(function(m){s.add(tt(m,e,r,m,t,a))}):Rl(t)&&t.forEach(function(m,S){s.set(S,tt(m,e,r,S,t,a))});var L=o?u?Ml:El:u?Bl:Hl,A=l?void 0:L(t);return wl(A||t,function(m,S){A&&(S=m,m=t[S]),Tl(s,S,tt(m,e,r,S,t,a))}),s}var Pe=tt,hg=Pe,yg=1,vg=4;function bg(t){return hg(t,yg|vg)}var St=bg;class z{constructor(e=1,r=25){g(this,"page");g(this,"limit");g(this,"term");g(this,"filters");g(this,"ids");g(this,"queries");g(this,"associations");g(this,"postFilter");g(this,"sortings");g(this,"aggregations");g(this,"grouping");g(this,"fields");g(this,"groupFields");g(this,"totalCountMode");g(this,"includes");this.page=e,this.limit=r,this.term=null,this.filters=[],this.includes=null,this.ids=[],this.queries=[],this.associations=[],this.postFilter=[],this.sortings=[],this.aggregations=[],this.grouping=[],this.groupFields=[],this.fields=[],this.totalCountMode=1}static fromCriteria(e){return St(e)}parse(){const e={};return this.ids.length>0&&(e.ids=this.ids.join("|")),this.page!==null&&(e.page=this.page),this.limit!==null&&(e.limit=this.limit),this.term!==null&&(e.term=this.term),this.queries.length>0&&(e.query=this.queries),this.filters.length>0&&(e.filter=this.filters),this.postFilter.length>0&&(e["post-filter"]=this.postFilter),this.sortings.length>0&&(e.sort=this.sortings),this.aggregations.length>0&&(e.aggregations=this.aggregations),this.groupFields.length>0&&(e.groupFields=this.groupFields),this.grouping.length>0&&(e.grouping=this.grouping),this.fields.length>0&&(e.fields=this.fields),this.associations.length>0&&(e.associations={},this.associations.forEach(r=>{!e.associations||(e.associations[r.association]=r.criteria.parse())})),this.includes!==null&&(e.includes=this.includes),this.totalCountMode!==null&&(e["total-count-mode"]=this.totalCountMode),e}setIds(e){return this.ids=e,this}setTotalCountMode(e){return typeof e!="number"&&(this.totalCountMode=null),this.totalCountMode=e<0||e>2?null:e,this}setPage(e){return this.page=e,this}setLimit(e){return this.limit=e,this}setTerm(e){return this.term=e,this}addFilter(e){return this.filters.push(e),this}addIncludes(e){return Object.entries(e).forEach(([r,n])=>{this.includes===null&&(this.includes={}),this.includes[r]||(this.includes[r]=[]),this.includes[r].push(...n)}),this}addPostFilter(e){return this.postFilter.push(e),this}addSorting(e){return this.sortings.push(e),this}addQuery(e,r,n=null){const i={score:r,query:e};return n&&(i[n]=n),this.queries.push(i),this}addGroupField(e){return this.groupFields.push(e),this}addGrouping(e){return this.grouping.push(e),this}addFields(...e){return this.fields.push(...e),this}addAggregation(e){return this.aggregations.push(e),this}addAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n=n.getAssociation(i)}),this}getAssociation(e){const r=e.split(".");let n=this;return r.forEach(i=>{n.hasAssociation(i)||n.associations.push({association:i,criteria:new z(null,null)}),n=n.getAssociationCriteria(i)}),n}getAssociationCriteria(e){let r=null;return this.associations.forEach(n=>{n.association===e&&(r=n.criteria)}),r}getLimit(){var e;return(e=this.limit)!=null?e:0}getPage(){var e;return(e=this.page)!=null?e:0}getCriteriaData(){return{page:this.page,limit:this.limit,term:this.term,filters:this.filters,ids:this.ids,queries:this.queries,associations:this.associations,postFilter:this.postFilter,sortings:this.sortings,aggregations:this.aggregations,grouping:this.grouping,fields:this.fields,groupFields:this.groupFields,totalCountMode:this.totalCountMode,includes:this.includes}}hasAssociation(e){return this.associations.some(r=>r.association===e)}resetSorting(){this.sortings=[]}static avg(e,r){return{type:"avg",name:e,field:r}}static count(e,r){return{type:"count",name:e,field:r}}static max(e,r){return{type:"max",name:e,field:r}}static min(e,r){return{type:"min",name:e,field:r}}static stats(e,r){return{type:"stats",name:e,field:r}}static sum(e,r){return{type:"sum",name:e,field:r}}static terms(e,r,n=null,i=null,a=null){return{type:"terms",name:e,field:r,limit:n,sort:i,aggregation:a}}static filter(e,r,n){return{type:"filter",name:e,filter:r,aggregation:n}}static histogram(e,r,n,i,a,s){return{type:"histogram",name:e,field:r,interval:n,format:i,aggregation:a,timeZone:s}}static sort(e,r="ASC",n=!1){return{field:e,order:r,naturalSorting:n}}static naturalSorting(e,r="ASC"){return{field:e,order:r,naturalSorting:!0}}static contains(e,r){return{type:"contains",field:e,value:r}}static prefix(e,r){return{type:"prefix",field:e,value:r}}static suffix(e,r){return{type:"suffix",field:e,value:r}}static equalsAny(e,r){return{type:"equalsAny",field:e,value:r.join("|")}}static range(e,r){return{type:"range",field:e,parameters:r}}static equals(e,r){return{type:"equals",field:e,value:r}}static not(e,r=[]){return{type:"not",operator:e,queries:r}}static multi(e,r=[]){return{type:"multi",operator:e,queries:r}}}const $g=()=>({name:"criteria",serialize:({value:t,customizerMethod:e})=>{if(t instanceof z)return{__type__:"__Criteria__",data:e(t.getCriteriaData())}},deserialize:({value:t,customizerMethod:e})=>{if(U("__Criteria__",t)&&typeof t.data=="object"){const r=t.data,n=new z;return n.setPage(r.page),n.setLimit(r.limit),n.setTerm(r.term),r.filters.forEach(i=>{n.addFilter(i)}),n.setIds(r.ids),r.queries.forEach(({query:i,score:a})=>{n.addQuery(i,a)}),r.associations.forEach(i=>{n.associations.push(e(i))}),r.postFilter.forEach(i=>{n.addPostFilter(i)}),r.sortings.forEach(i=>{n.addSorting(i)}),r.aggregations.forEach(i=>{n.addAggregation(i)}),r.grouping.forEach(i=>{n.addGrouping(i)}),r.fields.forEach(i=>{n.addFields(i)}),r.groupFields.forEach(i=>{n.addGroupField(i)}),r.includes&&n.addIncludes(r.includes),n.setTotalCountMode(r.totalCountMode),n}}});let mg=(t,e,r)=>{t[e]=r};class Sg{constructor(e,r,n,i={}){g(this,"id");g(this,"_origin");g(this,"_entityName");g(this,"_draft");g(this,"_isDirty");g(this,"_isNew");var s,c;this.id=e,this._origin=i.originData?St(i.originData):St(n),this._entityName=r,this._draft=n,this._isDirty=(s=i.isDirty)!=null?s:!1,this._isNew=(c=i.isNew)!=null?c:!1;const a=this;return new Proxy(this._draft,{get(u,o){return o in a._draft?a._draft[o]:a[o]},set(u,o,l){return mg(a._draft,o,l),a._isDirty=!0,!0}})}markAsNew(){this._isNew=!0}isNew(){return this._isNew}getIsDirty(){return this._isDirty}getOrigin(){return this._origin}getDraft(){return this._draft}getEntityName(){return this._entityName}}const Ee=function(e,r,n,i){return new Sg(e,r,n,i)},wg=()=>({name:"entity",serialize:({value:t,customizerMethod:e})=>{if(!(!st(t)||typeof t.getDraft!="function"))return{__type__:"__Entity__",__id__:t.id,__entityName__:t._entityName,__isDirty__:t._isDirty,__isNew__:t._isNew,__origin__:e(t._origin),__draft__:e(t._draft)}},deserialize:({value:t,customizerMethod:e})=>{if(U("__Entity__",t)&&typeof t.__origin__=="object")return new Ee(t.__id__,t.__entityName__,e(t.__draft__),{originData:e(t.__origin__),isDirty:t.__isDirty__,isNew:t.__isNew__})}});class F extends Array{constructor(e,r,n,i=null,a=[],s=null,c=null){super();g(this,"entity");g(this,"source");g(this,"context");g(this,"criteria");g(this,"aggregations");g(this,"total");g(this,"first");g(this,"last");g(this,"remove");g(this,"has");g(this,"get");g(this,"getAt");g(this,"getIds");g(this,"add");g(this,"addAt");g(this,"moveItem");this.entity=r,this.source=e,this.context=n,this.criteria=i,this.aggregations=c,this.total=s,this.push(...a),this.first=function(){return this.length<=0?null:this[0]},this.last=function(){return this.length<=0?null:this[this.length-1]},this.remove=function(o){const l=this.findIndex(f=>f.id===o);return l<0?!1:(this.splice(l,1),!0)},this.has=function(o){return this.some(l=>l.id===o)},this.get=function(o){const l=this.find(f=>f.id===o);return typeof l!="undefined"?l:null},this.getAt=function(o){const l=this[o];return typeof l!="undefined"?l:null},this.getIds=function(){return this.map(o=>o.id)},this.add=function(o){this.push(o)},this.addAt=function(o,l){if(typeof l=="undefined"){this.add(o);return}this.splice(l,0,o)},this.moveItem=function(o,l=null){if(l===null&&(l=this.length),o<0||o>=this.length)return null;if(l===o)return this.getAt(o);const f=this.find((L,A)=>A===o);if(typeof f=="undefined")return null;const y=this.filter((L,A)=>A!==o),T=[...y.slice(0,l),f,...y.slice(l)];return this.splice(0,this.length,...T),f},this.filter=function(o,l){const f=Object.getPrototypeOf(this).filter.call(this,o,l);return new F(this.source,this.entity,this.context,this.criteria,f,this.total,this.aggregations)}}static fromCollection(e){return new F(e.source,e.entity,e.context,e.criteria===null?e.criteria:z.fromCriteria(e.criteria),e,e.total,e.aggregations)}}const Tg=()=>({name:"entity-collection",serialize:({value:t,customizerMethod:e})=>{if(t instanceof F)return e({__type__:"__EntityCollection__",__source__:t.source,__entityName__:t.entity,__context__:t.context,__criteria__:t.criteria,__entities__:Array.from(t),__total__:t.total,__aggregations__:t.aggregations})},deserialize:({value:t,customizerMethod:e})=>{if(U("__EntityCollection__",t))return new F(t.__source__,t.__entityName__,t.__context__,e(t.__criteria__),e(t.__entities__),t.__total__,t.__aggregations__)}});class K extends Error{constructor(e,r){super(e);g(this,"code",500);!r||(this.code=r)}toJSON(){return{__type__:"__HandleError__",__code__:this.code,__message__:this.message}}}const Ag=()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(U("__HandleError__",t))return new K(t.__message__,t.__code__)}});var Og=Pe,jg=1,Cg=4;function Ig(t,e){return e=typeof e=="function"?e:void 0,Og(t,jg|Cg,e)}var Me=Ig;const Pg=[$g,Tg,wg,Da,Ag,()=>({name:"handle-error",serialize:()=>{},deserialize:({value:t})=>{if(U("__MissingPrivilegesError__",t))return new H(t.__messageType__,t.__data__)}})];function Eg(t){const e=Pg.map(s=>s(t));function r(){return e}function n(s){var c;return(c=e.find(u=>u.name===s))!=null?c:null}function i(s){return Me(s,(c,u,o,l)=>{for(const f of e){const y=f.serialize({value:c,key:u,object:o,stack:l,customizerMethod:i});if(y)return y}})}function a(s,c){return Me(s,(u,o,l,f)=>{for(const y of e){const T=y.deserialize({value:u,key:o,object:l,stack:f,event:c,customizerMethod:a});if(T)return T}})}return{getSerializers:r,getSerializerByName:n,serialize:i,deserialize:a}}function Mg(t,e){if(typeof e=="string")return new K(e);if(!(e instanceof Error))return new K("An unknown error occurred.");if(Ia(e,"response.data.errors.0.code")&&e.response.data.errors.length){const r=e.response.data.errors.filter(i=>i.code==="FRAMEWORK__MISSING_PRIVILEGE_ERROR"),n=[];return r.forEach(i=>{const a=JSON.parse(i.detail);n.push(...a.missingPrivileges)}),n.length?new H(t,n):new K(e.response.data.errors[0].code,e.response.data.errors[0].status)}return new K(e.message)}const{serialize:xe,deserialize:De}=Eg({handleFactory:xg,send:$}),wt=new Set;function $(t,e,r,n){const i=Pa(t);if(i!==null){const y=new H(t,i);return Promise.reject(y)}const a=Jt(),s=e!=null?e:{},u=xe({_type:t,_data:s,_callbackId:a}),o=JSON.stringify(u);let l=!1;const f=7e3;return new Promise((y,T)=>{const L=function(S){if(typeof S.data!="string")return;let q;try{q=JSON.parse(S.data)}catch{return}if(!Fg(q)||q._callbackId!==a||!q.hasOwnProperty("_response"))return;const mf=De(q,S);if(window.removeEventListener("message",L),!l){l=!0;const At=mf._response;if(At instanceof Error){T(At);return}y(At)}};window.addEventListener("message",L);let A=!0;try{A=!window.parent.origin}catch{}let m=A?document.referrer:window.parent.origin;n&&(m=n),r?r.postMessage(o,m):window.parent.postMessage(o,m),setTimeout(()=>{l||T("Send timeout expired. It could be possible that no handler for the postMessage request exists or that the handler freezed.")},f)})}function Tt(t,e,r){const n=async function(i){var f;if(ct[t]&&Object.keys(ct[t]).length&&(!r||Ea(t,r,i.origin)!==null)||typeof i.data!="string")return;let a;try{a=JSON.parse(i.data)}catch{return}if(!zg(a)||a._type!==t)return;const s=De(a,i),c=await Promise.resolve(e(s._data,{_event_:i})).catch(y=>Mg(t,y)),u={_callbackId:s._callbackId,_type:s._type,_response:c!=null?c:null},o=xe(u),l=JSON.stringify(o);i.source?i.source.postMessage(l,{targetOrigin:(f=i.origin)!=null?f:"*"}):window.postMessage(l,window.origin)};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}function xg(t){return(e,r)=>Tt(e,r,t)}function Dg(t,e){return Tt(t,e,{})}function v(t,e){return r=>$(t,jt(jt({},e),r))}function ze(t){return e=>Dg(t,e)}(async()=>{Tt("__registerWindow__",(t,e)=>{if(e._event_.source){const r=e._event_.source;wt.add({source:r,origin:e._event_.origin})}else wt.add({source:window,origin:window.origin})},{}),await $("__registerWindow__",{})})().catch(t=>console.error(t)),window._swsdk={sourceRegistry:wt};function zg(t){const e=t;return!!e._type&&!!e._data&&!!e._callbackId}function Fg(t){const e=t;return!!e._type&&!!e.hasOwnProperty("_response")&&!!e._callbackId}const Lg=v("windowRedirect"),Ng=v("windowReload",{});var Rg=Object.freeze(Object.defineProperty({__proto__:null,redirect:Lg,reload:Ng},Symbol.toStringTag,{value:"Module"}));const Gg=v("notificationDispatch");var Ug=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Gg},Symbol.toStringTag,{value:"Module"}));const Hg=v("contextLanguage",{}),Bg=ze("contextLanguage"),Kg=v("contextEnvironment",{}),kg=v("contextLocale",{}),qg=ze("contextLocale"),Vg=v("contextCurrency",{}),Wg=v("contextShopwareVersion",{}),Jg=v("contextAppInformation",{});var Yg=Object.freeze(Object.defineProperty({__proto__:null,getLanguage:Hg,subscribeLanguage:Bg,getEnvironment:Kg,getLocale:kg,subscribeLocale:qg,getCurrency:Vg,getShopwareVersion:Wg,getAppInformation:Jg},Symbol.toStringTag,{value:"Module"}));const Xg=v("uiComponentSectionRenderer",{src:(Le=Ca())!=null?Le:void 0});var Zg=Object.freeze(Object.defineProperty({__proto__:null,add:Xg},Symbol.toStringTag,{value:"Module"})),Qg=t=>({addTabItem:v("uiTabsAddTabItem",{positionId:t})});const tf=t=>ot()===t,ef=()=>window!==window.parent,Fe=t=>{if(t)return $("locationUpdateHeight",{height:t,locationId:ot()});const e=document.documentElement.offsetHeight;return $("locationUpdateHeight",{height:e,locationId:ot()})};let k=null;var rf=Object.freeze(Object.defineProperty({__proto__:null,is:tf,isIframe:ef,updateHeight:Fe,startAutoResizer:()=>{k=new ResizeObserver(()=>{Fe()}),k.observe(document.body)},stopAutoResizer:()=>{k&&(k.unobserve(document.body),k.disconnect())},MAIN_HIDDEN:"sw-main-hidden"},Symbol.toStringTag,{value:"Module"}));const nf=v("menuItemAdd");var af=Object.freeze(Object.defineProperty({__proto__:null,addMenuItem:nf},Symbol.toStringTag,{value:"Module"}));const sf=v("settingsItemAdd");var of=Object.freeze(Object.defineProperty({__proto__:null,addSettingsItem:sf},Symbol.toStringTag,{value:"Module"}));const cf=v("mainModuleAdd");var uf=Object.freeze(Object.defineProperty({__proto__:null,addMainModule:cf},Symbol.toStringTag,{value:"Module"}));const lf=v("uiModalOpen"),gf=v("uiModalClose");var ff=Object.freeze(Object.defineProperty({__proto__:null,open:lf,close:gf},Symbol.toStringTag,{value:"Module"}));const _f=v("actionButtonAdd");var df=Object.freeze(Object.defineProperty({__proto__:null,add:_f},Symbol.toStringTag,{value:"Module"}));const pf=v("actionExecute");var hf=Object.freeze(Object.defineProperty({__proto__:null,actionExecute:pf},Symbol.toStringTag,{value:"Module"})),yf=t=>({search:(e,r)=>$("repositorySearch",{entityName:t,context:r,criteria:e}),get:(e,r,n)=>$("repositoryGet",{entityName:t,id:e,context:r,criteria:n}),save:(e,r)=>$("repositorySave",{entityName:t,entity:e,context:r}),clone:(e,r,n)=>$("repositoryClone",{entityName:t,entityId:e,context:r,behavior:n}),hasChanges:e=>$("repositoryHasChanges",{entityName:t,entity:e}),saveAll:(e,r)=>$("repositorySaveAll",{entityName:t,entities:e,context:r}),delete:(e,r)=>$("repositoryDelete",{entityName:t,entityId:e,context:r}),create:(e,r)=>$("repositoryCreate",{entityName:t,entityId:r,context:e})}),vf=Object.freeze(Object.defineProperty({__proto__:null,repository:yf,Classes:{Criteria:z,Entity:Ee,EntityCollection:F}},Symbol.toStringTag,{value:"Module"}));const bf={webhook:hf},$f={componentSection:Zg,tabs:Qg,menu:af,settings:of,mainModule:uf,modal:ff,actionButton:df};h.app=bf,h.context=Yg,h.data=vf,h.location=rf,h.notification=Ug,h.ui=$f,h.window=Rg,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});

@@ -5,3 +5,5 @@ import FunctionSerializer from './function-serializer';

import EntityCollectionSerializer from './entity-collection-serializer';
import HandleErrorSerializer from './handle-error-serializer';
import cloneDeepWith from 'lodash/cloneDeepWith';
import MissingPrivilegesErrorSerializer from './missing-priviliges-error-serializer';
/**

@@ -16,2 +18,4 @@ * Collect all single serializer/deserializer. The first matching result

FunctionSerializer,
HandleErrorSerializer,
MissingPrivilegesErrorSerializer,
];

@@ -18,0 +22,0 @@ /**

@@ -6,1 +6,2 @@ export declare function generateUniqueId(): string;

export declare function hasType(type: string, obj: any): boolean;
export declare function hasOwnProperty(obj: any, path: string): boolean;

@@ -0,1 +1,2 @@

import has from 'lodash/has';
export function generateUniqueId() {

@@ -20,2 +21,5 @@ return String(Date.now().toString(36) + Math.random().toString(36).substr(2));

}
export function hasOwnProperty(obj, path) {
return has(obj, path);
}
//# sourceMappingURL=utils.js.map

@@ -15,2 +15,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import SerializerFactory from './_internals/serializer';
import createError from './_internals/error-handling/error-factory';
const { serialize, deserialize } = SerializerFactory({

@@ -93,4 +94,10 @@ handleFactory: handleFactory,

isResolved = true;
const response = deserializedResponseData._response;
// @ts-expect-error To not specify a possible error on every message type ignore it here.
if (response instanceof Error) {
reject(response);
return;
}
// Return the data
resolve(deserializedResponseData._response);
resolve(response);
}

@@ -164,3 +171,3 @@ };

const deserializedMessageData = deserialize(shopwareMessageData, event);
const responseValue = yield Promise.resolve(method(deserializedMessageData._data, { _event_: event }));
const responseValue = yield Promise.resolve(method(deserializedMessageData._data, { _event_: event })).catch(e => createError(type, e));
const responseMessage = {

@@ -167,0 +174,0 @@ _callbackId: deserializedMessageData._callbackId,

import { ShopwareMessageTypes } from '../messages.types';
declare type type = '__MissingPrivilegesError__';
interface MissingPrivilegeErrorJson {
__type__: type;
__messageType__: string;
__data__: string[];
}
export default class MissingPrivilegesError extends Error {
missingPrivileges: Array<string>;
messageType: keyof ShopwareMessageTypes;
constructor(messageType: keyof ShopwareMessageTypes, missingPrivileges: Array<string>);
toJSON(): MissingPrivilegeErrorJson;
}
export {};

@@ -10,7 +10,21 @@ export default class MissingPrivilegesError extends Error {

});
Object.defineProperty(this, "messageType", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.missingPrivileges = missingPrivileges;
this.messageType = messageType;
// Set prototype excplicitly
Object.setPrototypeOf(this, MissingPrivilegesError.prototype);
}
toJSON() {
return {
__type__: '__MissingPrivilegesError__',
__messageType__: this.messageType,
__data__: this.missingPrivileges,
};
}
}
//# sourceMappingURL=missing-privileges-error.js.map
{
"name": "@shopware-ag/admin-extension-sdk",
"license": "MIT",
"version": "0.0.47",
"version": "0.0.48",
"repository": "git://github.com/shopware/admin-extension-sdk.git",

@@ -6,0 +6,0 @@ "description": "The SDK for App iframes to communicate with the Shopware Adminstration",

@@ -10,3 +10,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./function-serializer", "./criteria-serializer", "./entity-serializer", "./entity-collection-serializer", "lodash/cloneDeepWith"], factory);
define(["require", "exports", "./function-serializer", "./criteria-serializer", "./entity-serializer", "./entity-collection-serializer", "./handle-error-serializer", "lodash/cloneDeepWith", "./missing-priviliges-error-serializer"], factory);
}

@@ -20,3 +20,5 @@ })(function (require, exports) {

const entity_collection_serializer_1 = __importDefault(require("./entity-collection-serializer"));
const handle_error_serializer_1 = __importDefault(require("./handle-error-serializer"));
const cloneDeepWith_1 = __importDefault(require("lodash/cloneDeepWith"));
const missing_priviliges_error_serializer_1 = __importDefault(require("./missing-priviliges-error-serializer"));
/**

@@ -31,2 +33,4 @@ * Collect all single serializer/deserializer. The first matching result

function_serializer_1.default,
handle_error_serializer_1.default,
missing_priviliges_error_serializer_1.default,
];

@@ -33,0 +37,0 @@ /**

@@ -6,1 +6,2 @@ export declare function generateUniqueId(): string;

export declare function hasType(type: string, obj: any): boolean;
export declare function hasOwnProperty(obj: any, path: string): boolean;

@@ -0,1 +1,4 @@

var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
(function (factory) {

@@ -7,3 +10,3 @@ if (typeof module === "object" && typeof module.exports === "object") {

else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
define(["require", "exports", "lodash/has"], factory);
}

@@ -13,3 +16,4 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.hasType = exports.getWindowSrc = exports.getLocationId = exports.isObject = exports.generateUniqueId = void 0;
exports.hasOwnProperty = exports.hasType = exports.getWindowSrc = exports.getLocationId = exports.isObject = exports.generateUniqueId = void 0;
const has_1 = __importDefault(require("lodash/has"));
function generateUniqueId() {

@@ -39,3 +43,7 @@ return String(Date.now().toString(36) + Math.random().toString(36).substr(2));

exports.hasType = hasType;
function hasOwnProperty(obj, path) {
return (0, has_1.default)(obj, path);
}
exports.hasOwnProperty = hasOwnProperty;
});
//# sourceMappingURL=utils.js.map

@@ -19,3 +19,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./_internals/utils", "./privileges/privilege-resolver", "./privileges", "./privileges/missing-privileges-error", "./_internals/serializer"], factory);
define(["require", "exports", "./_internals/utils", "./privileges/privilege-resolver", "./privileges", "./privileges/missing-privileges-error", "./_internals/serializer", "./_internals/error-handling/error-factory"], factory);
}

@@ -31,2 +31,3 @@ })(function (require, exports) {

const serializer_1 = __importDefault(require("./_internals/serializer"));
const error_factory_1 = __importDefault(require("./_internals/error-handling/error-factory"));
const { serialize, deserialize } = (0, serializer_1.default)({

@@ -109,4 +110,10 @@ handleFactory: handleFactory,

isResolved = true;
const response = deserializedResponseData._response;
// @ts-expect-error To not specify a possible error on every message type ignore it here.
if (response instanceof Error) {
reject(response);
return;
}
// Return the data
resolve(deserializedResponseData._response);
resolve(response);
}

@@ -181,3 +188,3 @@ };

const deserializedMessageData = deserialize(shopwareMessageData, event);
const responseValue = yield Promise.resolve(method(deserializedMessageData._data, { _event_: event }));
const responseValue = yield Promise.resolve(method(deserializedMessageData._data, { _event_: event })).catch(e => (0, error_factory_1.default)(type, e));
const responseMessage = {

@@ -184,0 +191,0 @@ _callbackId: deserializedMessageData._callbackId,

import { ShopwareMessageTypes } from '../messages.types';
declare type type = '__MissingPrivilegesError__';
interface MissingPrivilegeErrorJson {
__type__: type;
__messageType__: string;
__data__: string[];
}
export default class MissingPrivilegesError extends Error {
missingPrivileges: Array<string>;
messageType: keyof ShopwareMessageTypes;
constructor(messageType: keyof ShopwareMessageTypes, missingPrivileges: Array<string>);
toJSON(): MissingPrivilegeErrorJson;
}
export {};

@@ -21,6 +21,20 @@ (function (factory) {

});
Object.defineProperty(this, "messageType", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.missingPrivileges = missingPrivileges;
this.messageType = messageType;
// Set prototype excplicitly
Object.setPrototypeOf(this, MissingPrivilegesError.prototype);
}
toJSON() {
return {
__type__: '__MissingPrivilegesError__',
__messageType__: this.messageType,
__data__: this.missingPrivileges,
};
}
}

@@ -27,0 +41,0 @@ exports.default = MissingPrivilegesError;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc