@ws-ui/store 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/hooks/store.d.ts +3 -24
- package/dist/index.cjs.js +115 -86
- package/dist/index.es.js +16649 -11462
- package/dist/modules/catalog/index.d.ts +1 -9
- package/dist/modules/catalog/reducer.d.ts +1 -9
- package/dist/modules/catalog/thunks.d.ts +1 -10
- package/dist/modules/debugger/index.d.ts +1 -1
- package/dist/modules/debugger/reducer.d.ts +3 -118
- package/dist/modules/debugger/thunks.d.ts +2 -26
- package/dist/modules/debugger/types.d.ts +2 -2
- package/dist/modules/explorer/index.d.ts +1 -1
- package/dist/modules/explorer/reducer.d.ts +2 -44
- package/dist/modules/explorer/thunks.d.ts +33 -368
- package/dist/modules/explorer/utils.d.ts +1 -2
- package/dist/modules/index.d.ts +1 -22
- package/dist/modules/modals/index.d.ts +1 -1
- package/dist/modules/modals/reducer.d.ts +2 -13
- package/dist/modules/modals/thunks.d.ts +1 -20
- package/dist/modules/modals/types.d.ts +1 -1
- package/dist/modules/model/helpers.d.ts +2 -2
- package/dist/modules/model/index.d.ts +1 -1
- package/dist/modules/model/reducer.d.ts +2 -10
- package/dist/modules/model/selectors.d.ts +7 -13
- package/dist/modules/model/subjects.d.ts +1 -7
- package/dist/modules/model/thunks.d.ts +4 -89
- package/dist/modules/model/utils.d.ts +5 -5
- package/dist/modules/roles/index.d.ts +1 -1
- package/dist/modules/roles/reducer.d.ts +2 -41
- package/dist/modules/roles/thunks.d.ts +3 -42
- package/dist/modules/root/index.d.ts +1 -1
- package/dist/modules/root/reducer.d.ts +2 -199
- package/dist/modules/root/thunks.d.ts +16 -246
- package/dist/modules/root/types.d.ts +1 -1
- package/dist/modules/settings/index.d.ts +1 -1
- package/dist/modules/settings/reducer.d.ts +2 -28
- package/dist/modules/settings/thunks.d.ts +2 -23
- package/dist/modules/shared-conditions/index.d.ts +1 -1
- package/dist/modules/shared-conditions/reducer.d.ts +3 -35
- package/dist/modules/shared-conditions/thunks.d.ts +1 -13
- package/dist/modules/shared-conditions/utils.d.ts +0 -2
- package/dist/modules/shared-css/index.d.ts +1 -1
- package/dist/modules/shared-css/reducer.d.ts +2 -14
- package/dist/modules/shared-css/thunks.d.ts +1 -13
- package/dist/modules/shared-datasources/index.d.ts +1 -1
- package/dist/modules/shared-datasources/reducer.d.ts +2 -10
- package/dist/modules/shared-datasources/thunks.d.ts +6 -73
- package/dist/modules/tabs/index.d.ts +1 -1
- package/dist/modules/tabs/reducer.d.ts +1 -1
- package/dist/modules/tabs/selectors.d.ts +1 -52
- package/dist/modules/webforms/datasources.adapter.d.ts +2 -24
- package/dist/modules/webforms/index.d.ts +1 -1
- package/dist/modules/webforms/reducer.d.ts +2 -47
- package/dist/modules/webforms/thunks.d.ts +10 -140
- package/dist/modules/webforms/types.d.ts +1 -1
- package/dist/package.json +28 -0
- package/dist/provider.d.ts +1 -1
- package/dist/selectors/catalog.d.ts +8 -200
- package/dist/selectors/common.d.ts +1 -89
- package/dist/selectors/components.d.ts +1 -50
- package/dist/selectors/datasources.d.ts +4 -152
- package/dist/selectors/debugger.d.ts +26 -612
- package/dist/selectors/explorer.d.ts +22 -1010
- package/dist/selectors/modals.d.ts +1 -26
- package/dist/selectors/roles.d.ts +8 -238
- package/dist/selectors/settings.d.ts +12 -332
- package/dist/selectors/states.d.ts +5 -201
- package/dist/selectors/styles.d.ts +5 -162
- package/dist/selectors/tabs.d.ts +3 -156
- package/dist/selectors/webforms.d.ts +13 -366
- package/dist/store.d.ts +3 -45
- package/dist/style.css +1 -0
- package/dist/utils.d.ts +4 -4
- package/package.json +15 -55
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,92 +1,146 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@ws-ui/shared"),lt=require("react"),gT=require("react-dom");function Ve(e){for(var r=arguments.length,t=Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];if(process.env.NODE_ENV!=="production"){var s=wT[e],i=s?typeof s=="function"?s.apply(null,t):s:"unknown error nr: "+e;throw Error("[Immer] "+i)}throw Error("[Immer] minified error nr: "+e+(t.length?" "+t.map(function(u){return"'"+u+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ir(e){return!!e&&!!e[be]}function rr(e){var r;return!!e&&(function(t){if(!t||typeof t!="object")return!1;var a=Object.getPrototypeOf(t);if(a===null)return!0;var s=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===CT}(e)||Array.isArray(e)||!!e[Fa]||!!(!((r=e.constructor)===null||r===void 0)&&r[Fa])||Cs(e)||xs(e))}function Mr(e,r,t){t===void 0&&(t=!1),nn(e)===0?(t?Object.keys:qn)(e).forEach(function(a){t&&typeof a=="symbol"||r(a,e[a],e)}):e.forEach(function(a,s){return r(s,a,e)})}function nn(e){var r=e[be];return r?r.i>3?r.i-4:r.i:Array.isArray(e)?1:Cs(e)?2:xs(e)?3:0}function Qr(e,r){return nn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function es(e,r){return nn(e)===2?e.get(r):e[r]}function ah(e,r,t){var a=nn(e);a===2?e.set(r,t):a===3?e.add(t):e[r]=t}function oh(e,r){return e===r?e!==0||1/e==1/r:e!=e&&r!=r}function Cs(e){return ST&&e instanceof Map}function xs(e){return TT&&e instanceof Set}function it(e){return e.o||e.t}function Tu(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var r=sh(e);delete r[be];for(var t=qn(r),a=0;a<t.length;a++){var s=t[a],i=r[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),r)}function wu(e,r){return r===void 0&&(r=!1),Cu(e)||Ir(e)||!rr(e)||(nn(e)>1&&(e.set=e.add=e.clear=e.delete=vT),Object.freeze(e),r&&Mr(e,function(t,a){return wu(a,!0)},!0)),e}function vT(){Ve(2)}function Cu(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function mr(e){var r=zc[e];return r||Ve(18,e),r}function xu(e,r){zc[e]||(zc[e]=r)}function Na(){return process.env.NODE_ENV==="production"||Kn||Ve(0),Kn}function vc(e,r){r&&(mr("Patches"),e.u=[],e.s=[],e.v=r)}function cs(e){Vc(e),e.p.forEach(mT),e.p=null}function Vc(e){e===Kn&&(Kn=e.l)}function Bd(e){return Kn={p:[],l:Kn,h:e,m:!0,_:0}}function mT(e){var r=e[be];r.i===0||r.i===1?r.j():r.g=!0}function mc(e,r){r._=r.p.length;var t=r.p[0],a=e!==void 0&&e!==t;return r.h.O||mr("ES5").S(r,e,a),a?(t[be].P&&(cs(r),Ve(4)),rr(e)&&(e=us(r,e),r.l||ls(r,e)),r.u&&mr("Patches").M(t[be].t,e,r.u,r.s)):e=us(r,t,[]),cs(r),r.u&&r.v(r.u,r.s),e!==Au?e:void 0}function us(e,r,t){if(Cu(r))return r;var a=r[be];if(!a)return Mr(r,function(l,f){return Wd(e,a,r,l,f,t)},!0),r;if(a.A!==e)return r;if(!a.P)return ls(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var s=a.i===4||a.i===5?a.o=Tu(a.k):a.o,i=s,u=!1;a.i===3&&(i=new Set(s),s.clear(),u=!0),Mr(i,function(l,f){return Wd(e,a,s,l,f,t,u)}),ls(e,s,!1),t&&e.u&&mr("Patches").N(a,t,e.u,e.s)}return a.o}function Wd(e,r,t,a,s,i,u){if(process.env.NODE_ENV!=="production"&&s===t&&Ve(5),Ir(s)){var l=us(e,s,i&&r&&r.i!==3&&!Qr(r.R,a)?i.concat(a):void 0);if(ah(t,a,l),!Ir(l))return;e.m=!1}else u&&t.add(s);if(rr(s)&&!Cu(s)){if(!e.h.D&&e._<1)return;us(e,s),r&&r.A.l||ls(e,s)}}function ls(e,r,t){t===void 0&&(t=!1),!e.l&&e.h.D&&e.m&&wu(r,t)}function yc(e,r){var t=e[be];return(t?it(t):e)[r]}function Hd(e,r){if(r in e)for(var t=Object.getPrototypeOf(e);t;){var a=Object.getOwnPropertyDescriptor(t,r);if(a)return a;t=Object.getPrototypeOf(t)}}function Mt(e){e.P||(e.P=!0,e.l&&Mt(e.l))}function bc(e){e.o||(e.o=Tu(e.t))}function ka(e,r,t){var a=Cs(r)?mr("MapSet").F(r,t):xs(r)?mr("MapSet").T(r,t):e.O?function(s,i){var u=Array.isArray(s),l={i:u?1:0,A:i?i.A:Na(),P:!1,I:!1,R:{},l:i,t:s,k:null,o:null,j:null,C:!1},f=l,p=ja;u&&(f=[l],p=Da);var h=Proxy.revocable(f,p),y=h.revoke,_=h.proxy;return l.k=_,l.j=y,_}(r,t):mr("ES5").J(r,t);return(t?t.A:Na()).p.push(a),a}function yT(e){return Ir(e)||Ve(22,e),function r(t){if(!rr(t))return t;var a,s=t[be],i=nn(t);if(s){if(!s.P&&(s.i<4||!mr("ES5").K(s)))return s.t;s.I=!0,a=Ud(t,i),s.I=!1}else a=Ud(t,i);return Mr(a,function(u,l){s&&es(s.t,u)===l||ah(a,u,r(l))}),i===3?new Set(a):a}(e)}function Ud(e,r){switch(r){case 2:return new Map(e);case 3:return Array.from(e)}return Tu(e)}function bT(){function e(u,l){var f=i[u];return f?f.enumerable=l:i[u]=f={configurable:!0,enumerable:l,get:function(){var p=this[be];return process.env.NODE_ENV!=="production"&&s(p),ja.get(p,u)},set:function(p){var h=this[be];process.env.NODE_ENV!=="production"&&s(h),ja.set(h,u,p)}},f}function r(u){for(var l=u.length-1;l>=0;l--){var f=u[l][be];if(!f.P)switch(f.i){case 5:a(f)&&Mt(f);break;case 4:t(f)&&Mt(f)}}}function t(u){for(var l=u.t,f=u.k,p=qn(f),h=p.length-1;h>=0;h--){var y=p[h];if(y!==be){var _=l[y];if(_===void 0&&!Qr(l,y))return!0;var E=f[y],T=E&&E[be];if(T?T.t!==_:!oh(E,_))return!0}}var C=!!l[be];return p.length!==qn(l).length+(C?0:1)}function a(u){var l=u.k;if(l.length!==u.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function s(u){u.g&&Ve(3,JSON.stringify(it(u)))}var i={};xu("ES5",{J:function(u,l){var f=Array.isArray(u),p=function(y,_){if(y){for(var E=Array(_.length),T=0;T<_.length;T++)Object.defineProperty(E,""+T,e(T,!0));return E}var C=sh(_);delete C[be];for(var O=qn(C),D=0;D<O.length;D++){var F=O[D];C[F]=e(F,y||!!C[F].enumerable)}return Object.create(Object.getPrototypeOf(_),C)}(f,u),h={i:f?5:4,A:l?l.A:Na(),P:!1,I:!1,R:{},l,t:u,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,be,{value:h,writable:!0}),p},S:function(u,l,f){f?Ir(l)&&l[be].A===u&&r(u.p):(u.u&&function p(h){if(h&&typeof h=="object"){var y=h[be];if(y){var _=y.t,E=y.k,T=y.R,C=y.i;if(C===4)Mr(E,function(L){L!==be&&(_[L]!==void 0||Qr(_,L)?T[L]||p(E[L]):(T[L]=!0,Mt(y)))}),Mr(_,function(L){E[L]!==void 0||Qr(E,L)||(T[L]=!1,Mt(y))});else if(C===5){if(a(y)&&(Mt(y),T.length=!0),E.length<_.length)for(var O=E.length;O<_.length;O++)T[O]=!1;else for(var D=_.length;D<E.length;D++)T[D]=!0;for(var F=Math.min(E.length,_.length),M=0;M<F;M++)E.hasOwnProperty(M)||(T[M]=!0),T[M]===void 0&&p(E[M])}}}}(u.p[0]),r(u.p))},K:function(u){return u.i===4?t(u):a(u)}})}function _T(){function e(a){if(!rr(a))return a;if(Array.isArray(a))return a.map(e);if(Cs(a))return new Map(Array.from(a.entries()).map(function(u){return[u[0],e(u[1])]}));if(xs(a))return new Set(Array.from(a).map(e));var s=Object.create(Object.getPrototypeOf(a));for(var i in a)s[i]=e(a[i]);return Qr(a,Fa)&&(s[Fa]=a[Fa]),s}function r(a){return Ir(a)?e(a):a}var t="add";xu("Patches",{$:function(a,s){return s.forEach(function(i){for(var u=i.path,l=i.op,f=a,p=0;p<u.length-1;p++){var h=nn(f),y=u[p];typeof y!="string"&&typeof y!="number"&&(y=""+y),h!==0&&h!==1||y!=="__proto__"&&y!=="constructor"||Ve(24),typeof f=="function"&&y==="prototype"&&Ve(24),typeof(f=es(f,y))!="object"&&Ve(15,u.join("/"))}var _=nn(f),E=e(i.value),T=u[u.length-1];switch(l){case"replace":switch(_){case 2:return f.set(T,E);case 3:Ve(16);default:return f[T]=E}case t:switch(_){case 1:return T==="-"?f.push(E):f.splice(T,0,E);case 2:return f.set(T,E);case 3:return f.add(E);default:return f[T]=E}case"remove":switch(_){case 1:return f.splice(T,1);case 2:return f.delete(T);case 3:return f.delete(i.value);default:return delete f[T]}default:Ve(17,l)}}),a},N:function(a,s,i,u){switch(a.i){case 0:case 4:case 2:return function(l,f,p,h){var y=l.t,_=l.o;Mr(l.R,function(E,T){var C=es(y,E),O=es(_,E),D=T?Qr(y,E)?"replace":t:"remove";if(C!==O||D!=="replace"){var F=f.concat(E);p.push(D==="remove"?{op:D,path:F}:{op:D,path:F,value:O}),h.push(D===t?{op:"remove",path:F}:D==="remove"?{op:t,path:F,value:r(C)}:{op:"replace",path:F,value:r(C)})}})}(a,s,i,u);case 5:case 1:return function(l,f,p,h){var y=l.t,_=l.R,E=l.o;if(E.length<y.length){var T=[E,y];y=T[0],E=T[1];var C=[h,p];p=C[0],h=C[1]}for(var O=0;O<y.length;O++)if(_[O]&&E[O]!==y[O]){var D=f.concat([O]);p.push({op:"replace",path:D,value:r(E[O])}),h.push({op:"replace",path:D,value:r(y[O])})}for(var F=y.length;F<E.length;F++){var M=f.concat([F]);p.push({op:t,path:M,value:r(E[F])})}y.length<E.length&&h.push({op:"replace",path:f.concat(["length"]),value:y.length})}(a,s,i,u);case 3:return function(l,f,p,h){var y=l.t,_=l.o,E=0;y.forEach(function(T){if(!_.has(T)){var C=f.concat([E]);p.push({op:"remove",path:C,value:T}),h.unshift({op:t,path:C,value:T})}E++}),E=0,_.forEach(function(T){if(!y.has(T)){var C=f.concat([E]);p.push({op:t,path:C,value:T}),h.unshift({op:"remove",path:C,value:T})}E++})}(a,s,i,u)}},M:function(a,s,i,u){i.push({op:"replace",path:[],value:s===Au?void 0:s}),u.push({op:"replace",path:[],value:a})}})}function ET(){function e(l,f){function p(){this.constructor=l}s(l,f),l.prototype=(p.prototype=f.prototype,new p)}function r(l){l.o||(l.R=new Map,l.o=new Map(l.t))}function t(l){l.o||(l.o=new Set,l.t.forEach(function(f){if(rr(f)){var p=ka(l.A.h,f,l);l.p.set(f,p),l.o.add(p)}else l.o.add(f)}))}function a(l){l.g&&Ve(3,JSON.stringify(it(l)))}var s=function(l,f){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])})(l,f)},i=function(){function l(p,h){return this[be]={i:2,l:h,A:h?h.A:Na(),P:!1,I:!1,o:void 0,R:void 0,t:p,k:this,C:!1,g:!1},this}e(l,Map);var f=l.prototype;return Object.defineProperty(f,"size",{get:function(){return it(this[be]).size}}),f.has=function(p){return it(this[be]).has(p)},f.set=function(p,h){var y=this[be];return a(y),it(y).has(p)&&it(y).get(p)===h||(r(y),Mt(y),y.R.set(p,!0),y.o.set(p,h),y.R.set(p,!0)),this},f.delete=function(p){if(!this.has(p))return!1;var h=this[be];return a(h),r(h),Mt(h),h.t.has(p)?h.R.set(p,!1):h.R.delete(p),h.o.delete(p),!0},f.clear=function(){var p=this[be];a(p),it(p).size&&(r(p),Mt(p),p.R=new Map,Mr(p.t,function(h){p.R.set(h,!1)}),p.o.clear())},f.forEach=function(p,h){var y=this;it(this[be]).forEach(function(_,E){p.call(h,y.get(E),E,y)})},f.get=function(p){var h=this[be];a(h);var y=it(h).get(p);if(h.I||!rr(y)||y!==h.t.get(p))return y;var _=ka(h.A.h,y,h);return r(h),h.o.set(p,_),_},f.keys=function(){return it(this[be]).keys()},f.values=function(){var p,h=this,y=this.keys();return(p={})[zo]=function(){return h.values()},p.next=function(){var _=y.next();return _.done?_:{done:!1,value:h.get(_.value)}},p},f.entries=function(){var p,h=this,y=this.keys();return(p={})[zo]=function(){return h.entries()},p.next=function(){var _=y.next();if(_.done)return _;var E=h.get(_.value);return{done:!1,value:[_.value,E]}},p},f[zo]=function(){return this.entries()},l}(),u=function(){function l(p,h){return this[be]={i:3,l:h,A:h?h.A:Na(),P:!1,I:!1,o:void 0,t:p,k:this,p:new Map,g:!1,C:!1},this}e(l,Set);var f=l.prototype;return Object.defineProperty(f,"size",{get:function(){return it(this[be]).size}}),f.has=function(p){var h=this[be];return a(h),h.o?!!h.o.has(p)||!(!h.p.has(p)||!h.o.has(h.p.get(p))):h.t.has(p)},f.add=function(p){var h=this[be];return a(h),this.has(p)||(t(h),Mt(h),h.o.add(p)),this},f.delete=function(p){if(!this.has(p))return!1;var h=this[be];return a(h),t(h),Mt(h),h.o.delete(p)||!!h.p.has(p)&&h.o.delete(h.p.get(p))},f.clear=function(){var p=this[be];a(p),it(p).size&&(t(p),Mt(p),p.o.clear())},f.values=function(){var p=this[be];return a(p),t(p),p.o.values()},f.entries=function(){var p=this[be];return a(p),t(p),p.o.entries()},f.keys=function(){return this.values()},f[zo]=function(){return this.values()},f.forEach=function(p,h){for(var y=this.values(),_=y.next();!_.done;)p.call(h,_.value,_.value,this),_=y.next()},l}();xu("MapSet",{F:function(l,f){return new i(l,f)},T:function(l,f){return new u(l,f)}})}var qd,Kn,Ou=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ST=typeof Map<"u",TT=typeof Set<"u",Gd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Au=Ou?Symbol.for("immer-nothing"):((qd={})["immer-nothing"]=!0,qd),Fa=Ou?Symbol.for("immer-draftable"):"__$immer_draftable",be=Ou?Symbol.for("immer-state"):"__$immer_state",zo=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",wT={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},CT=""+Object.prototype.constructor,qn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,sh=Object.getOwnPropertyDescriptors||function(e){var r={};return qn(e).forEach(function(t){r[t]=Object.getOwnPropertyDescriptor(e,t)}),r},zc={},ja={get:function(e,r){if(r===be)return e;var t=it(e);if(!Qr(t,r))return function(s,i,u){var l,f=Hd(i,u);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(s.k):void 0}(e,t,r);var a=t[r];return e.I||!rr(a)?a:a===yc(e.t,r)?(bc(e),e.o[r]=ka(e.A.h,a,e)):a},has:function(e,r){return r in it(e)},ownKeys:function(e){return Reflect.ownKeys(it(e))},set:function(e,r,t){var a=Hd(it(e),r);if(a!=null&&a.set)return a.set.call(e.k,t),!0;if(!e.P){var s=yc(it(e),r),i=s==null?void 0:s[be];if(i&&i.t===t)return e.o[r]=t,e.R[r]=!1,!0;if(oh(t,s)&&(t!==void 0||Qr(e.t,r)))return!0;bc(e),Mt(e)}return e.o[r]===t&&(t!==void 0||r in e.o)||Number.isNaN(t)&&Number.isNaN(e.o[r])||(e.o[r]=t,e.R[r]=!0),!0},deleteProperty:function(e,r){return yc(e.t,r)!==void 0||r in e.t?(e.R[r]=!1,bc(e),Mt(e)):delete e.R[r],e.o&&delete e.o[r],!0},getOwnPropertyDescriptor:function(e,r){var t=it(e),a=Reflect.getOwnPropertyDescriptor(t,r);return a&&{writable:!0,configurable:e.i!==1||r!=="length",enumerable:a.enumerable,value:t[r]}},defineProperty:function(){Ve(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ve(12)}},Da={};Mr(ja,function(e,r){Da[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),Da.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&Ve(13),Da.set.call(this,e,r,void 0)},Da.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&Ve(14),ja.set.call(this,e[0],r,t,e[0])};var xT=function(){function e(t){var a=this;this.O=Gd,this.D=!0,this.produce=function(s,i,u){if(typeof s=="function"&&typeof i!="function"){var l=i;i=s;var f=a;return function(C){var O=this;C===void 0&&(C=l);for(var D=arguments.length,F=Array(D>1?D-1:0),M=1;M<D;M++)F[M-1]=arguments[M];return f.produce(C,function(L){var I;return(I=i).call.apply(I,[O,L].concat(F))})}}var p;if(typeof i!="function"&&Ve(6),u!==void 0&&typeof u!="function"&&Ve(7),rr(s)){var h=Bd(a),y=ka(a,s,void 0),_=!0;try{p=i(y),_=!1}finally{_?cs(h):Vc(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return vc(h,u),mc(C,h)},function(C){throw cs(h),C}):(vc(h,u),mc(p,h))}if(!s||typeof s!="object"){if((p=i(s))===void 0&&(p=s),p===Au&&(p=void 0),a.D&&wu(p,!0),u){var E=[],T=[];mr("Patches").M(s,p,E,T),u(E,T)}return p}Ve(21,s)},this.produceWithPatches=function(s,i){if(typeof s=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),_=1;_<h;_++)y[_-1]=arguments[_];return a.produceWithPatches(p,function(E){return s.apply(void 0,[E].concat(y))})};var u,l,f=a.produce(s,i,function(p,h){u=p,l=h});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,u,l]}):[f,u,l]},typeof(t==null?void 0:t.useProxies)=="boolean"&&this.setUseProxies(t.useProxies),typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var r=e.prototype;return r.createDraft=function(t){rr(t)||Ve(8),Ir(t)&&(t=yT(t));var a=Bd(this),s=ka(this,t,void 0);return s[be].C=!0,Vc(a),s},r.finishDraft=function(t,a){var s=t&&t[be];process.env.NODE_ENV!=="production"&&(s&&s.C||Ve(9),s.I&&Ve(10));var i=s.A;return vc(i,a),mc(void 0,i)},r.setAutoFreeze=function(t){this.D=t},r.setUseProxies=function(t){t&&!Gd&&Ve(20),this.O=t},r.applyPatches=function(t,a){var s;for(s=a.length-1;s>=0;s--){var i=a[s];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}s>-1&&(a=a.slice(s+1));var u=mr("Patches").$;return Ir(t)?u(t,a):this.produce(t,function(l){return u(l,a)})},e}(),qt=new xT,ih=qt.produce;qt.produceWithPatches.bind(qt);qt.setAutoFreeze.bind(qt);qt.setUseProxies.bind(qt);qt.applyPatches.bind(qt);qt.createDraft.bind(qt);qt.finishDraft.bind(qt);function Ba(e){"@babel/helpers - typeof";return Ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ba(e)}function OT(e,r){if(Ba(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,r||"default");if(Ba(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function AT(e){var r=OT(e,"string");return Ba(r)=="symbol"?r:r+""}function RT(e,r,t){return(r=AT(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Yd(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,a)}return t}function Vd(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Yd(Object(t),!0).forEach(function(a){RT(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yd(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function St(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var zd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_c=function(){return Math.random().toString(36).substring(7).split("").join(".")},Tn={INIT:"@@redux/INIT"+_c(),REPLACE:"@@redux/REPLACE"+_c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_c()}};function ch(e){if(typeof e!="object"||e===null)return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function DT(e){if(e===void 0)return"undefined";if(e===null)return"null";var r=typeof e;switch(r){case"boolean":case"string":case"number":case"symbol":case"function":return r}if(Array.isArray(e))return"array";if(IT(e))return"date";if(FT(e))return"error";var t=PT(e);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")}function PT(e){return typeof e.constructor=="function"?e.constructor.name:null}function FT(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function IT(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function En(e){var r=typeof e;return process.env.NODE_ENV!=="production"&&(r=DT(e)),r}function uh(e,r,t){var a;if(typeof r=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?St(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof r=="function"&&typeof t>"u"&&(t=r,r=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?St(1):"Expected the enhancer to be a function. Instead, received: '"+En(t)+"'");return t(uh)(e,r)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?St(2):"Expected the root reducer to be a function. Instead, received: '"+En(e)+"'");var s=e,i=r,u=[],l=u,f=!1;function p(){l===u&&(l=u.slice())}function h(){if(f)throw new Error(process.env.NODE_ENV==="production"?St(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function y(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?St(4):"Expected the listener to be a function. Instead, received: '"+En(C)+"'");if(f)throw new Error(process.env.NODE_ENV==="production"?St(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var O=!0;return p(),l.push(C),function(){if(O){if(f)throw new Error(process.env.NODE_ENV==="production"?St(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");O=!1,p();var F=l.indexOf(C);l.splice(F,1),u=null}}}function _(C){if(!ch(C))throw new Error(process.env.NODE_ENV==="production"?St(7):"Actions must be plain objects. Instead, the actual type was: '"+En(C)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof C.type>"u")throw new Error(process.env.NODE_ENV==="production"?St(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(f)throw new Error(process.env.NODE_ENV==="production"?St(9):"Reducers may not dispatch actions.");try{f=!0,i=s(i,C)}finally{f=!1}for(var O=u=l,D=0;D<O.length;D++){var F=O[D];F()}return C}function E(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?St(10):"Expected the nextReducer to be a function. Instead, received: '"+En(C));s=C,_({type:Tn.REPLACE})}function T(){var C,O=y;return C={subscribe:function(F){if(typeof F!="object"||F===null)throw new Error(process.env.NODE_ENV==="production"?St(11):"Expected the observer to be an object. Instead, received: '"+En(F)+"'");function M(){F.next&&F.next(h())}M();var L=O(M);return{unsubscribe:L}}},C[zd]=function(){return this},C}return _({type:Tn.INIT}),a={dispatch:_,subscribe:y,getState:h,replaceReducer:E},a[zd]=T,a}function Kd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function MT(e,r,t,a){var s=Object.keys(r),i=t&&t.type===Tn.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(s.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!ch(e))return"The "+i+' has unexpected type of "'+En(e)+'". Expected argument to be an object with the following '+('keys: "'+s.join('", "')+'"');var u=Object.keys(e).filter(function(l){return!r.hasOwnProperty(l)&&!a[l]});if(u.forEach(function(l){a[l]=!0}),!(t&&t.type===Tn.REPLACE)&&u.length>0)return"Unexpected "+(u.length>1?"keys":"key")+" "+('"'+u.join('", "')+'" found in '+i+". ")+"Expected to find one of the known reducer keys instead: "+('"'+s.join('", "')+'". Unexpected keys will be ignored.')}function $T(e){Object.keys(e).forEach(function(r){var t=e[r],a=t(void 0,{type:Tn.INIT});if(typeof a>"u")throw new Error(process.env.NODE_ENV==="production"?St(12):'The slice reducer for key "'+r+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof t(void 0,{type:Tn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?St(13):'The slice reducer for key "'+r+'" returned undefined when probed with a random type. '+("Don't try to handle '"+Tn.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function lh(e){for(var r=Object.keys(e),t={},a=0;a<r.length;a++){var s=r[a];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Kd('No reducer provided for key "'+s+'"'),typeof e[s]=="function"&&(t[s]=e[s])}var i=Object.keys(t),u;process.env.NODE_ENV!=="production"&&(u={});var l;try{$T(t)}catch(f){l=f}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(process.env.NODE_ENV!=="production"){var y=MT(p,t,h,u);y&&Kd(y)}for(var _=!1,E={},T=0;T<i.length;T++){var C=i[T],O=t[C],D=p[C],F=O(D,h);if(typeof F>"u"){var M=h&&h.type;throw new Error(process.env.NODE_ENV==="production"?St(14):"When called with an action of type "+(M?'"'+String(M)+'"':"(unknown type)")+', the slice reducer for key "'+C+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}E[C]=F,_=_||F!==D}return _=_||i.length!==Object.keys(p).length,_?E:p}}function fs(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.length===0?function(a){return a}:r.length===1?r[0]:r.reduce(function(a,s){return function(){return a(s.apply(void 0,arguments))}})}function LT(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(a){return function(){var s=a.apply(void 0,arguments),i=function(){throw new Error(process.env.NODE_ENV==="production"?St(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},u={getState:s.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=r.map(function(f){return f(u)});return i=fs.apply(void 0,l)(s.dispatch),Vd(Vd({},s),{},{dispatch:i})}}}var ds="NOT_FOUND";function NT(e){var r;return{get:function(a){return r&&e(r.key,a)?r.value:ds},put:function(a,s){r={key:a,value:s}},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0}}}function kT(e,r){var t=[];function a(l){var f=t.findIndex(function(h){return r(l,h.key)});if(f>-1){var p=t[f];return f>0&&(t.splice(f,1),t.unshift(p)),p.value}return ds}function s(l,f){a(l)===ds&&(t.unshift({key:l,value:f}),t.length>e&&t.pop())}function i(){return t}function u(){t=[]}return{get:a,put:s,getEntries:i,clear:u}}var jT=function(r,t){return r===t};function BT(e){return function(t,a){if(t===null||a===null||t.length!==a.length)return!1;for(var s=t.length,i=0;i<s;i++)if(!e(t[i],a[i]))return!1;return!0}}function WT(e,r){var t=typeof r=="object"?r:{equalityCheck:r},a=t.equalityCheck,s=a===void 0?jT:a,i=t.maxSize,u=i===void 0?1:i,l=t.resultEqualityCheck,f=BT(s),p=u===1?NT(f):kT(u,f);function h(){var y=p.get(arguments);if(y===ds){if(y=e.apply(null,arguments),l){var _=p.getEntries(),E=_.find(function(T){return l(T.value,y)});E&&(y=E.value)}p.put(arguments,y)}return y}return h.clearCache=function(){return p.clear()},h}function HT(e){var r=Array.isArray(e[0])?e[0]:e;if(!r.every(function(a){return typeof a=="function"})){var t=r.map(function(a){return typeof a=="function"?"function "+(a.name||"unnamed")+"()":typeof a}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+t+"]")}return r}function UT(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];var s=function(){for(var u=arguments.length,l=new Array(u),f=0;f<u;f++)l[f]=arguments[f];var p=0,h,y={memoizeOptions:void 0},_=l.pop();if(typeof _=="object"&&(y=_,_=l.pop()),typeof _!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof _+"]");var E=y,T=E.memoizeOptions,C=T===void 0?t:T,O=Array.isArray(C)?C:[C],D=HT(l),F=e.apply(void 0,[function(){return p++,_.apply(null,arguments)}].concat(O)),M=e(function(){for(var I=[],G=D.length,W=0;W<G;W++)I.push(D[W].apply(null,arguments));return h=F.apply(null,I),h});return Object.assign(M,{resultFunc:_,memoizedResultFunc:F,dependencies:D,lastResult:function(){return h},recomputations:function(){return p},resetRecomputations:function(){return p=0}}),M};return s}var j=UT(WT);function fh(e){var r=function(a){var s=a.dispatch,i=a.getState;return function(u){return function(l){return typeof l=="function"?l(s,i,e):u(l)}}};return r}var dh=fh();dh.withExtraArgument=fh;const Jd=dh;var ph=globalThis&&globalThis.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(a[i]=s[i])},e(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(r,t);function a(){this.constructor=r}r.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}(),qT=globalThis&&globalThis.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,s,i,u;return u={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function l(p){return function(h){return f([p,h])}}function f(p){if(a)throw new TypeError("Generator is already executing.");for(;t;)try{if(a=1,s&&(i=p[0]&2?s.return:p[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,p[1])).done)return i;switch(s=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,s=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){t.label=p[1];break}if(p[0]===6&&t.label<i[1]){t.label=i[1],i=p;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(p);break}i[2]&&t.ops.pop(),t.trys.pop();continue}p=r.call(e,t)}catch(h){p=[6,h],s=0}finally{a=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Jn=globalThis&&globalThis.__spreadArray||function(e,r){for(var t=0,a=r.length,s=e.length;t<a;t++,s++)e[s]=r[t];return e},GT=Object.defineProperty,YT=Object.defineProperties,VT=Object.getOwnPropertyDescriptors,Xd=Object.getOwnPropertySymbols,zT=Object.prototype.hasOwnProperty,KT=Object.prototype.propertyIsEnumerable,Qd=function(e,r,t){return r in e?GT(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t},Zr=function(e,r){for(var t in r||(r={}))zT.call(r,t)&&Qd(e,t,r[t]);if(Xd)for(var a=0,s=Xd(r);a<s.length;a++){var t=s[a];KT.call(r,t)&&Qd(e,t,r[t])}return e},Ec=function(e,r){return YT(e,VT(r))},JT=function(e,r,t){return new Promise(function(a,s){var i=function(f){try{l(t.next(f))}catch(p){s(p)}},u=function(f){try{l(t.throw(f))}catch(p){s(p)}},l=function(f){return f.done?a(f.value):Promise.resolve(f.value).then(i,u)};l((t=t.apply(e,r)).next())})},XT=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fs:fs.apply(null,arguments)};function hh(e){if(typeof e!="object"||e===null)return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return r===t}var gh=function(e){return e&&typeof e.match=="function"};function en(e,r){function t(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(r){var i=r.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return Zr(Zr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return t.toString=function(){return""+e},t.type=e,t.match=function(a){return a.type===e},t}function QT(e){return typeof e=="function"&&"type"in e&&gh(e)}function ZT(e){var r=e?(""+e).split("/"):[],t=r[r.length-1]||"actionCreator";return'Detected an action creator with type "'+(e||"unknown")+`" being dispatched.
|
|
2
|
-
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(`+
|
|
1
|
+
"use strict";var dx=Object.defineProperty;var bg=e=>{throw TypeError(e)};var px=(e,t,r)=>t in e?dx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vt=(e,t,r)=>px(e,typeof t!="symbol"?t+"":t,r),kl=(e,t,r)=>t.has(e)||bg("Cannot "+r);var U=(e,t,r)=>(kl(e,t,"read from private field"),r?r.call(e):t.get(e)),nr=(e,t,r)=>t.has(e)?bg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ct=(e,t,r,n)=>(kl(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Un=(e,t,r)=>(kl(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ao=require("react/jsx-runtime"),Y=require("react"),hx=require("react-dom");function mx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const te=mx(Y);function Tt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var a=Tx[e],o=a?typeof a=="function"?a.apply(null,r):a:"unknown error nr: "+e;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(u){return"'"+u+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oa(e){return!!e&&!!e[et]}function Rn(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ox}(e)||Array.isArray(e)||!!e[Cg]||!!(!((t=e.constructor)===null||t===void 0)&&t[Cg])||Ed(e)||_d(e))}function Da(e,t,r){r===void 0&&(r=!1),vi(e)===0?(r?Object.keys:ti)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function vi(e){var t=e[et];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ed(e)?2:_d(e)?3:0}function ei(e,t){return vi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gx(e,t){return vi(e)===2?e.get(t):e[t]}function my(e,t,r){var n=vi(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function gy(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ed(e){return Ex&&e instanceof Map}function _d(e){return _x&&e instanceof Set}function qn(e){return e.o||e.t}function Td(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=yy(e);delete t[et];for(var r=ti(t),n=0;n<r.length;n++){var a=r[n],o=t[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Od(e,t){return t===void 0&&(t=!1),Cd(e)||oa(e)||!Rn(e)||(vi(e)>1&&(e.set=e.add=e.clear=e.delete=vx),Object.freeze(e),t&&Da(e,function(r,n){return Od(n,!0)},!0)),e}function vx(){Tt(2)}function Cd(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=Rf[e];return t||Tt(18,e),t}function yx(e,t){Rf[e]||(Rf[e]=t)}function Af(){return process.env.NODE_ENV==="production"||ci||Tt(0),ci}function jl(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function iu(e){xf(e),e.p.forEach(bx),e.p=null}function xf(e){e===ci&&(ci=e.l)}function Sg(e){return ci={p:[],l:ci,h:e,m:!0,_:0}}function bx(e){var t=e[et];t.i===0||t.i===1?t.j():t.g=!0}function Wl(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||tn("ES5").S(t,e,n),n?(r[et].P&&(iu(t),Tt(4)),Rn(e)&&(e=ou(t,e),t.l||su(t,e)),t.u&&tn("Patches").M(r[et].t,e,t.u,t.s)):e=ou(t,r,[]),iu(t),t.u&&t.v(t.u,t.s),e!==vy?e:void 0}function ou(e,t,r){if(Cd(t))return t;var n=t[et];if(!n)return Da(t,function(c,f){return wg(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return su(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Td(n.k):n.o,o=a,u=!1;n.i===3&&(o=new Set(a),a.clear(),u=!0),Da(o,function(c,f){return wg(e,n,a,c,f,r,u)}),su(e,a,!1),r&&e.u&&tn("Patches").N(n,r,e.u,e.s)}return n.o}function wg(e,t,r,n,a,o,u){if(process.env.NODE_ENV!=="production"&&a===r&&Tt(5),oa(a)){var c=ou(e,a,o&&t&&t.i!==3&&!ei(t.R,n)?o.concat(n):void 0);if(my(r,n,c),!oa(c))return;e.m=!1}else u&&r.add(a);if(Rn(a)&&!Cd(a)){if(!e.h.D&&e._<1)return;ou(e,a),t&&t.A.l||su(e,a)}}function su(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Od(t,r)}function Bl(e,t){var r=e[et];return(r?qn(r):e)[t]}function Eg(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Kn(e){e.P||(e.P=!0,e.l&&Kn(e.l))}function zl(e){e.o||(e.o=Td(e.t))}function Pf(e,t,r){var n=Ed(t)?tn("MapSet").F(t,r):_d(t)?tn("MapSet").T(t,r):e.O?function(a,o){var u=Array.isArray(a),c={i:u?1:0,A:o?o.A:Af(),P:!1,I:!1,R:{},l:o,t:a,k:null,o:null,j:null,C:!1},f=c,d=ho;u&&(f=[c],d=Qi);var p=Proxy.revocable(f,d),m=p.revoke,g=p.proxy;return c.k=g,c.j=m,g}(t,r):tn("ES5").J(t,r);return(r?r.A:Af()).p.push(n),n}function Sx(e){return oa(e)||Tt(22,e),function t(r){if(!Rn(r))return r;var n,a=r[et],o=vi(r);if(a){if(!a.P&&(a.i<4||!tn("ES5").K(a)))return a.t;a.I=!0,n=_g(r,o),a.I=!1}else n=_g(r,o);return Da(n,function(u,c){a&&gx(a.t,u)===c||my(n,u,t(c))}),o===3?new Set(n):n}(e)}function _g(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Td(e)}function wx(){function e(u,c){var f=o[u];return f?f.enumerable=c:o[u]=f={configurable:!0,enumerable:c,get:function(){var d=this[et];return process.env.NODE_ENV!=="production"&&a(d),ho.get(d,u)},set:function(d){var p=this[et];process.env.NODE_ENV!=="production"&&a(p),ho.set(p,u,d)}},f}function t(u){for(var c=u.length-1;c>=0;c--){var f=u[c][et];if(!f.P)switch(f.i){case 5:n(f)&&Kn(f);break;case 4:r(f)&&Kn(f)}}}function r(u){for(var c=u.t,f=u.k,d=ti(f),p=d.length-1;p>=0;p--){var m=d[p];if(m!==et){var g=c[m];if(g===void 0&&!ei(c,m))return!0;var y=f[m],E=y&&y[et];if(E?E.t!==g:!gy(y,g))return!0}}var S=!!c[et];return d.length!==ti(c).length+(S?0:1)}function n(u){var c=u.k;if(c.length!==u.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var d=0;d<c.length;d++)if(!c.hasOwnProperty(d))return!0;return!1}function a(u){u.g&&Tt(3,JSON.stringify(qn(u)))}var o={};yx("ES5",{J:function(u,c){var f=Array.isArray(u),d=function(m,g){if(m){for(var y=Array(g.length),E=0;E<g.length;E++)Object.defineProperty(y,""+E,e(E,!0));return y}var S=yy(g);delete S[et];for(var T=ti(S),C=0;C<T.length;C++){var A=T[C];S[A]=e(A,m||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(f,u),p={i:f?5:4,A:c?c.A:Af(),P:!1,I:!1,R:{},l:c,t:u,k:d,o:null,g:!1,C:!1};return Object.defineProperty(d,et,{value:p,writable:!0}),d},S:function(u,c,f){f?oa(c)&&c[et].A===u&&t(u.p):(u.u&&function d(p){if(p&&typeof p=="object"){var m=p[et];if(m){var g=m.t,y=m.k,E=m.R,S=m.i;if(S===4)Da(y,function($){$!==et&&(g[$]!==void 0||ei(g,$)?E[$]||d(y[$]):(E[$]=!0,Kn(m)))}),Da(g,function($){y[$]!==void 0||ei(y,$)||(E[$]=!1,Kn(m))});else if(S===5){if(n(m)&&(Kn(m),E.length=!0),y.length<g.length)for(var T=y.length;T<g.length;T++)E[T]=!1;else for(var C=g.length;C<y.length;C++)E[C]=!0;for(var A=Math.min(y.length,g.length),P=0;P<A;P++)y.hasOwnProperty(P)||(E[P]=!0),E[P]===void 0&&d(y[P])}}}}(u.p[0]),t(u.p))},K:function(u){return u.i===4?r(u):n(u)}})}var Tg,ci,Ad=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ex=typeof Map<"u",_x=typeof Set<"u",Og=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",vy=Ad?Symbol.for("immer-nothing"):((Tg={})["immer-nothing"]=!0,Tg),Cg=Ad?Symbol.for("immer-draftable"):"__$immer_draftable",et=Ad?Symbol.for("immer-state"):"__$immer_state",Tx={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Ox=""+Object.prototype.constructor,ti=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,yy=Object.getOwnPropertyDescriptors||function(e){var t={};return ti(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Rf={},ho={get:function(e,t){if(t===et)return e;var r=qn(e);if(!ei(r,t))return function(a,o,u){var c,f=Eg(o,u);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!Rn(n)?n:n===Bl(e.t,t)?(zl(e),e.o[t]=Pf(e.A.h,n,e)):n},has:function(e,t){return t in qn(e)},ownKeys:function(e){return Reflect.ownKeys(qn(e))},set:function(e,t,r){var n=Eg(qn(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Bl(qn(e),t),o=a==null?void 0:a[et];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(gy(r,a)&&(r!==void 0||ei(e.t,t)))return!0;zl(e),Kn(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Bl(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,zl(e),Kn(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=qn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Tt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Tt(12)}},Qi={};Da(ho,function(e,t){Qi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qi.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Tt(13),Qi.set.call(this,e,t,void 0)},Qi.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Tt(14),ho.set.call(this,e[0],t,r,e[0])};var Cx=function(){function e(r){var n=this;this.O=Og,this.D=!0,this.produce=function(a,o,u){if(typeof a=="function"&&typeof o!="function"){var c=o;o=a;var f=n;return function(S){var T=this;S===void 0&&(S=c);for(var C=arguments.length,A=Array(C>1?C-1:0),P=1;P<C;P++)A[P-1]=arguments[P];return f.produce(S,function($){var _;return(_=o).call.apply(_,[T,$].concat(A))})}}var d;if(typeof o!="function"&&Tt(6),u!==void 0&&typeof u!="function"&&Tt(7),Rn(a)){var p=Sg(n),m=Pf(n,a,void 0),g=!0;try{d=o(m),g=!1}finally{g?iu(p):xf(p)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(S){return jl(p,u),Wl(S,p)},function(S){throw iu(p),S}):(jl(p,u),Wl(d,p))}if(!a||typeof a!="object"){if((d=o(a))===void 0&&(d=a),d===vy&&(d=void 0),n.D&&Od(d,!0),u){var y=[],E=[];tn("Patches").M(a,d,y,E),u(y,E)}return d}Tt(21,a)},this.produceWithPatches=function(a,o){if(typeof a=="function")return function(d){for(var p=arguments.length,m=Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];return n.produceWithPatches(d,function(y){return a.apply(void 0,[y].concat(m))})};var u,c,f=n.produce(a,o,function(d,p){u=d,c=p});return typeof Promise<"u"&&f instanceof Promise?f.then(function(d){return[d,u,c]}):[f,u,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Rn(r)||Tt(8),oa(r)&&(r=Sx(r));var n=Sg(this),a=Pf(this,r,void 0);return a[et].C=!0,xf(n),a},t.finishDraft=function(r,n){var a=r&&r[et];process.env.NODE_ENV!=="production"&&(a&&a.C||Tt(9),a.I&&Tt(10));var o=a.A;return jl(o,n),Wl(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Og&&Tt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));var u=tn("Patches").$;return oa(r)?u(r,n):this.produce(r,function(c){return u(c,n)})},e}(),mr=new Cx,by=mr.produce;mr.produceWithPatches.bind(mr);mr.setAutoFreeze.bind(mr);mr.setUseProxies.bind(mr);mr.applyPatches.bind(mr);mr.createDraft.bind(mr);mr.finishDraft.bind(mr);function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function Ax(e,t){if(mo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xx(e){var t=Ax(e,"string");return mo(t)=="symbol"?t:t+""}function Px(e,t,r){return(t=xx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ag(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ag(Object(r),!0).forEach(function(n){Px(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ag(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ht(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Pg=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Hl=function(){return Math.random().toString(36).substring(7).split("").join(".")},xa={INIT:"@@redux/INIT"+Hl(),REPLACE:"@@redux/REPLACE"+Hl(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Hl()}};function Sy(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Rx(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Ix(e))return"date";if($x(e))return"error";var r=Dx(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Dx(e){return typeof e.constructor=="function"?e.constructor.name:null}function $x(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Ix(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function _a(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Rx(e)),t}function wy(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ht(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Ht(1):"Expected the enhancer to be a function. Instead, received: '"+_a(r)+"'");return r(wy)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ht(2):"Expected the root reducer to be a function. Instead, received: '"+_a(e)+"'");var a=e,o=t,u=[],c=u,f=!1;function d(){c===u&&(c=u.slice())}function p(){if(f)throw new Error(process.env.NODE_ENV==="production"?Ht(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function m(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Ht(4):"Expected the listener to be a function. Instead, received: '"+_a(S)+"'");if(f)throw new Error(process.env.NODE_ENV==="production"?Ht(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var T=!0;return d(),c.push(S),function(){if(T){if(f)throw new Error(process.env.NODE_ENV==="production"?Ht(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");T=!1,d();var A=c.indexOf(S);c.splice(A,1),u=null}}}function g(S){if(!Sy(S))throw new Error(process.env.NODE_ENV==="production"?Ht(7):"Actions must be plain objects. Instead, the actual type was: '"+_a(S)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof S.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ht(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(f)throw new Error(process.env.NODE_ENV==="production"?Ht(9):"Reducers may not dispatch actions.");try{f=!0,o=a(o,S)}finally{f=!1}for(var T=u=c,C=0;C<T.length;C++){var A=T[C];A()}return S}function y(S){if(typeof S!="function")throw new Error(process.env.NODE_ENV==="production"?Ht(10):"Expected the nextReducer to be a function. Instead, received: '"+_a(S));a=S,g({type:xa.REPLACE})}function E(){var S,T=m;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(process.env.NODE_ENV==="production"?Ht(11):"Expected the observer to be an object. Instead, received: '"+_a(A)+"'");function P(){A.next&&A.next(p())}P();var $=T(P);return{unsubscribe:$}}},S[Pg]=function(){return this},S}return g({type:xa.INIT}),n={dispatch:g,subscribe:m,getState:p,replaceReducer:y},n[Pg]=E,n}function Rg(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Mx(e,t,r,n){var a=Object.keys(t),o=r&&r.type===xa.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(a.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Sy(e))return"The "+o+' has unexpected type of "'+_a(e)+'". Expected argument to be an object with the following '+('keys: "'+a.join('", "')+'"');var u=Object.keys(e).filter(function(c){return!t.hasOwnProperty(c)&&!n[c]});if(u.forEach(function(c){n[c]=!0}),!(r&&r.type===xa.REPLACE)&&u.length>0)return"Unexpected "+(u.length>1?"keys":"key")+" "+('"'+u.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+a.join('", "')+'". Unexpected keys will be ignored.')}function Fx(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:xa.INIT});if(typeof n>"u")throw new Error(process.env.NODE_ENV==="production"?Ht(12):'The slice reducer for key "'+t+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:xa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ht(13):'The slice reducer for key "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle '"+xa.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function Ey(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&Rg('No reducer provided for key "'+a+'"'),typeof e[a]=="function"&&(r[a]=e[a])}var o=Object.keys(r),u;process.env.NODE_ENV!=="production"&&(u={});var c;try{Fx(r)}catch(f){c=f}return function(d,p){if(d===void 0&&(d={}),c)throw c;if(process.env.NODE_ENV!=="production"){var m=Mx(d,r,p,u);m&&Rg(m)}for(var g=!1,y={},E=0;E<o.length;E++){var S=o[E],T=r[S],C=d[S],A=T(C,p);if(typeof A>"u"){var P=p&&p.type;throw new Error(process.env.NODE_ENV==="production"?Ht(14):"When called with an action of type "+(P?'"'+String(P)+'"':"(unknown type)")+', the slice reducer for key "'+S+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}y[S]=A,g=g||A!==C}return g=g||o.length!==Object.keys(d).length,g?y:d}}function uu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Nx(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),o=function(){throw new Error(process.env.NODE_ENV==="production"?Ht(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},u={getState:a.getState,dispatch:function(){return o.apply(void 0,arguments)}},c=t.map(function(f){return f(u)});return o=uu.apply(void 0,c)(a.dispatch),xg(xg({},a),{},{dispatch:o})}}}var cu="NOT_FOUND";function Lx(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:cu},put:function(n,a){t={key:n,value:a}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function kx(e,t){var r=[];function n(c){var f=r.findIndex(function(p){return t(c,p.key)});if(f>-1){var d=r[f];return f>0&&(r.splice(f,1),r.unshift(d)),d.value}return cu}function a(c,f){n(c)===cu&&(r.unshift({key:c,value:f}),r.length>e&&r.pop())}function o(){return r}function u(){r=[]}return{get:n,put:a,getEntries:o,clear:u}}var jx=function(t,r){return t===r};function Wx(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var a=r.length,o=0;o<a;o++)if(!e(r[o],n[o]))return!1;return!0}}function Bx(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,a=n===void 0?jx:n,o=r.maxSize,u=o===void 0?1:o,c=r.resultEqualityCheck,f=Wx(a),d=u===1?Lx(f):kx(u,f);function p(){var m=d.get(arguments);if(m===cu){if(m=e.apply(null,arguments),c){var g=d.getEntries(),y=g.find(function(E){return c(E.value,m)});y&&(m=y.value)}d.put(arguments,m)}return m}return p.clearCache=function(){return d.clear()},p}function zx(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function Hx(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var a=function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];var d=0,p,m={memoizeOptions:void 0},g=c.pop();if(typeof g=="object"&&(m=g,g=c.pop()),typeof g!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof g+"]");var y=m,E=y.memoizeOptions,S=E===void 0?r:E,T=Array.isArray(S)?S:[S],C=zx(c),A=e.apply(void 0,[function(){return d++,g.apply(null,arguments)}].concat(T)),P=e(function(){for(var _=[],M=C.length,W=0;W<M;W++)_.push(C[W].apply(null,arguments));return p=A.apply(null,_),p});return Object.assign(P,{resultFunc:g,memoizedResultFunc:A,dependencies:C,lastResult:function(){return p},recomputations:function(){return d},resetRecomputations:function(){return d=0}}),P};return a}var B=Hx(Bx);function _y(e){var t=function(n){var a=n.dispatch,o=n.getState;return function(u){return function(c){return typeof c=="function"?c(a,o,e):u(c)}}};return t}var Df=_y();Df.withExtraArgument=_y;var Ty=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ux=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(d){return function(p){return f([d,p])}}function f(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(o=d[0]&2?a.return:d[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,d[1])).done)return o;switch(a=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,a=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){r.label=d[1];break}if(d[0]===6&&r.label<o[1]){r.label=o[1],o=d;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(d);break}o[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(p){d=[6,p],a=0}finally{n=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},li=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Gx=Object.defineProperty,qx=Object.defineProperties,Yx=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,Kx=Object.prototype.hasOwnProperty,Vx=Object.prototype.propertyIsEnumerable,$g=function(e,t,r){return t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},ea=function(e,t){for(var r in t||(t={}))Kx.call(t,r)&&$g(e,r,t[r]);if(Dg)for(var n=0,a=Dg(t);n<a.length;n++){var r=a[n];Vx.call(t,r)&&$g(e,r,t[r])}return e},Ul=function(e,t){return qx(e,Yx(t))},Zx=function(e,t,r){return new Promise(function(n,a){var o=function(f){try{c(r.next(f))}catch(d){a(d)}},u=function(f){try{c(r.throw(f))}catch(d){a(d)}},c=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(o,u)};c((r=r.apply(e,t)).next())})},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?uu:uu.apply(null,arguments)};function Oy(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Cy=function(e){return e&&typeof e.match=="function"};function ta(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return ea(ea({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function Xx(e){return typeof e=="function"&&"type"in e&&Cy(e)}function Qx(e){var t=e?(""+e).split("/"):[],r=t[t.length-1]||"actionCreator";return'Detected an action creator with type "'+(e||"unknown")+`" being dispatched.
|
|
2
|
+
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(`+r+"())` instead of `dispatch("+r+")`. This is necessary even if the action has no payload."}function eP(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(n){return function(a){return n(a)}}};var t=e.isActionCreator,r=t===void 0?Xx:t;return function(){return function(n){return function(a){return r(a)&&console.warn(Qx(a.type)),n(a)}}}}function Ay(e,t){var r=0;return{measureTime:function(n){var a=Date.now();try{return n()}finally{var o=Date.now();r+=o-a}},warnIfExceeded:function(){r>e&&console.warn(t+" took "+r+"ms, which is more than the warning threshold of "+e+`ms.
|
|
3
3
|
If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
|
4
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var
|
|
5
|
-
Take a look at the logic that dispatched this action: `,
|
|
4
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var tP=function(e){Ty(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,li([void 0],r[0].concat(this)))):new(t.bind.apply(t,li([void 0],r.concat(this))))},t}(Array),rP=function(e){Ty(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,li([void 0],r[0].concat(this)))):new(t.bind.apply(t,li([void 0],r.concat(this))))},t}(Array);function $f(e){return Rn(e)?by(e,function(){}):e}var nP=process.env.NODE_ENV==="production",Ig="Invariant failed";function Mg(e,t){if(!e)throw nP?new Error(Ig):new Error(Ig+": "+(t||""))}function aP(e,t,r,n){return JSON.stringify(e,iP(t,n),r)}function iP(e,t){var r=[],n=[];return t||(t=function(a,o){return r[0]===o?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(o)).join(".")+"]"}),function(a,o){if(r.length>0){var u=r.indexOf(this);~u?r.splice(u+1):r.push(this),~u?n.splice(u,1/0,a):n.push(a),~r.indexOf(o)&&(o=t.call(this,a,o))}else r.push(o);return e==null?o:e.call(this,a,o)}}function oP(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function sP(e,t,r){var n=xy(e,t,r);return{detectMutations:function(){return Py(e,t,n,r)}}}function xy(e,t,r,n,a){t===void 0&&(t=[]),n===void 0&&(n=""),a===void 0&&(a=new Set);var o={value:r};if(!e(r)&&!a.has(r)){a.add(r),o.children={};for(var u in r){var c=n?n+"."+u:u;t.length&&t.indexOf(c)!==-1||(o.children[u]=xy(e,t,r[u],c))}}return o}function Py(e,t,r,n,a,o){t===void 0&&(t=[]),a===void 0&&(a=!1),o===void 0&&(o="");var u=r?r.value:void 0,c=u===n;if(a&&!c&&!Number.isNaN(n))return{wasMutated:!0,path:o};if(e(u)||e(n))return{wasMutated:!1};var f={};for(var d in r.children)f[d]=!0;for(var d in n)f[d]=!0;var p=t.length>0,m=function(y){var E=o?o+"."+y:y;if(p){var S=t.some(function(C){return C instanceof RegExp?C.test(E):E===C});if(S)return"continue"}var T=Py(e,t,r.children[y],n[y],c,E);if(T.wasMutated)return{value:T}};for(var d in f){var g=m(d);if(typeof g=="object")return g.value}return{wasMutated:!1}}function uP(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(f){return function(d){return f(d)}}};var t=e.isImmutable,r=t===void 0?oP:t,n=e.ignoredPaths,a=e.warnAfter,o=a===void 0?32:a,u=e.ignore;n=n||u;var c=sP.bind(null,r,n);return function(f){var d=f.getState,p=d(),m=c(p),g;return function(y){return function(E){var S=Ay(o,"ImmutableStateInvariantMiddleware");S.measureTime(function(){p=d(),g=m.detectMutations(),m=c(p),Mg(!g.wasMutated,"A state mutation was detected between dispatches, in the path '"+(g.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var T=y(E);return S.measureTime(function(){p=d(),g=m.detectMutations(),m=c(p),g.wasMutated&&Mg(!g.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(g.path||"")+". Take a look at the reducer(s) handling the action "+aP(E)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),S.warnIfExceeded(),T}}}}function Ry(e){var t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Oy(e)}function If(e,t,r,n,a,o){t===void 0&&(t=""),r===void 0&&(r=Ry),a===void 0&&(a=[]);var u;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||o!=null&&o.has(e))return!1;for(var c=n!=null?n(e):Object.entries(e),f=a.length>0,d=function(T,C){var A=t?t+"."+T:T;if(f){var P=a.some(function($){return $ instanceof RegExp?$.test(A):A===$});if(P)return"continue"}if(!r(C))return{value:{keyPath:A,value:C}};if(typeof C=="object"&&(u=If(C,A,r,n,a,o),u))return{value:u}},p=0,m=c;p<m.length;p++){var g=m[p],y=g[0],E=g[1],S=d(y,E);if(typeof S=="object")return S.value}return o&&Dy(e)&&o.add(e),!1}function Dy(e){if(!Object.isFrozen(e))return!1;for(var t=0,r=Object.values(e);t<r.length;t++){var n=r[t];if(!(typeof n!="object"||n===null)&&!Dy(n))return!1}return!0}function cP(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(P){return function($){return P($)}}};var t=e.isSerializable,r=t===void 0?Ry:t,n=e.getEntries,a=e.ignoredActions,o=a===void 0?[]:a,u=e.ignoredActionPaths,c=u===void 0?["meta.arg","meta.baseQueryMeta"]:u,f=e.ignoredPaths,d=f===void 0?[]:f,p=e.warnAfter,m=p===void 0?32:p,g=e.ignoreState,y=g===void 0?!1:g,E=e.ignoreActions,S=E===void 0?!1:E,T=e.disableCache,C=T===void 0?!1:T,A=!C&&WeakSet?new WeakSet:void 0;return function(P){return function($){return function(_){var M=$(_),W=Ay(m,"SerializableStateInvariantMiddleware");return!S&&!(o.length&&o.indexOf(_.type)!==-1)&&W.measureTime(function(){var G=If(_,"",r,n,c,A);if(G){var Q=G.keyPath,we=G.value;console.error("A non-serializable value was detected in an action, in the path: `"+Q+"`. Value:",we,`
|
|
5
|
+
Take a look at the logic that dispatched this action: `,_,`
|
|
6
6
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
7
|
-
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),
|
|
8
|
-
Take a look at the reducer(s) handling this action type: `+
|
|
9
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),W.warnIfExceeded()),G}}}}function Ko(e){return typeof e=="boolean"}function lw(){return function(r){return fw(r)}}function fw(e){e===void 0&&(e={});var r=e.thunk,t=r===void 0?!0:r,a=e.immutableCheck,s=a===void 0?!0:a,i=e.serializableCheck,u=i===void 0?!0:i,l=e.actionCreatorCheck,f=l===void 0?!0:l,p=new tw;if(t&&(Ko(t)?p.push(Jd):p.push(Jd.withExtraArgument(t.extraArgument))),process.env.NODE_ENV!=="production"){if(s){var h={};Ko(s)||(h=s),p.unshift(cw(h))}if(u){var y={};Ko(u)||(y=u),p.push(uw(y))}if(f){var _={};Ko(f)||(_=f),p.unshift(ew(_))}}return p}var Sc=process.env.NODE_ENV==="production";function dw(e){var r=lw(),t=e||{},a=t.reducer,s=a===void 0?void 0:a,i=t.middleware,u=i===void 0?r():i,l=t.devTools,f=l===void 0?!0:l,p=t.preloadedState,h=p===void 0?void 0:p,y=t.enhancers,_=y===void 0?void 0:y,E;if(typeof s=="function")E=s;else if(hh(s))E=lh(s);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var T=u;if(typeof T=="function"&&(T=T(r),!Sc&&!Array.isArray(T)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sc&&T.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=LT.apply(void 0,T),O=fs;f&&(O=XT(Zr({trace:!Sc},typeof f=="object"&&f)));var D=new rw(C),F=D;Array.isArray(_)?F=Jn([C],_):typeof _=="function"&&(F=_(D));var M=O.apply(void 0,F);return uh(E,h,M)}function Eh(e){var r={},t=[],a,s={addCase:function(i,u){if(process.env.NODE_ENV!=="production"){if(t.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(a)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in r)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return r[l]=u,s},addMatcher:function(i,u){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return t.push({matcher:i,reducer:u}),s},addDefaultCase:function(i){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addDefaultCase` can only be called once");return a=i,s}};return e(s),[r,t,a]}function pw(e){return typeof e=="function"}var tp=!1;function hw(e,r,t,a){t===void 0&&(t=[]),process.env.NODE_ENV!=="production"&&typeof r=="object"&&(tp||(tp=!0,console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer")));var s=typeof r=="function"?Eh(r):[r,t,a],i=s[0],u=s[1],l=s[2],f;if(pw(e))f=function(){return Kc(e())};else{var p=Kc(e);f=function(){return p}}function h(y,_){y===void 0&&(y=f());var E=Jn([i[_.type]],u.filter(function(T){var C=T.matcher;return C(_)}).map(function(T){var C=T.reducer;return C}));return E.filter(function(T){return!!T}).length===0&&(E=[l]),E.reduce(function(T,C){if(C)if(Ir(T)){var O=T,D=C(O,_);return D===void 0?T:D}else{if(rr(T))return ih(T,function(F){return C(F,_)});var D=C(T,_);if(D===void 0){if(T===null)return T;throw Error("A case reducer on a non-draftable value must not return undefined")}return D}return T},y)}return h.getInitialState=f,h}var rp=!1;function gw(e,r){return e+"/"+r}function Gt(e){var r=e.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&e.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");var t=typeof e.initialState=="function"?e.initialState:Kc(e.initialState),a=e.reducers||{},s=Object.keys(a),i={},u={},l={};s.forEach(function(h){var y=a[h],_=gw(r,h),E,T;"reducer"in y?(E=y.reducer,T=y.prepare):E=y,i[h]=E,u[_]=E,l[h]=T?en(_,T):en(_)});function f(){process.env.NODE_ENV!=="production"&&typeof e.extraReducers=="object"&&(rp||(rp=!0,console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice")));var h=typeof e.extraReducers=="function"?Eh(e.extraReducers):[e.extraReducers],y=h[0],_=y===void 0?{}:y,E=h[1],T=E===void 0?[]:E,C=h[2],O=C===void 0?void 0:C,D=Zr(Zr({},_),u);return hw(t,function(F){for(var M in D)F.addCase(M,D[M]);for(var L=0,I=T;L<I.length;L++){var G=I[L];F.addMatcher(G.matcher,G.reducer)}O&&F.addDefaultCase(O)})}var p;return{name:r,reducer:function(h,y){return p||(p=f()),p(h,y)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var vw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ru=function(e){e===void 0&&(e=21);for(var r="",t=e;t--;)r+=vw[Math.random()*64|0];return r},mw=["name","message","stack","code"],Tc=function(){function e(r,t){this.payload=r,this.meta=t}return e}(),np=function(){function e(r,t){this.payload=r,this.meta=t}return e}(),yw=function(e){if(typeof e=="object"&&e!==null){for(var r={},t=0,a=mw;t<a.length;t++){var s=a[t];typeof e[s]=="string"&&(r[s]=e[s])}return r}return{message:String(e)}},Q=function(){function e(r,t,a){var s=en(r+"/fulfilled",function(h,y,_,E){return{payload:h,meta:Ec(Zr({},E||{}),{arg:_,requestId:y,requestStatus:"fulfilled"})}}),i=en(r+"/pending",function(h,y,_){return{payload:void 0,meta:Ec(Zr({},_||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),u=en(r+"/rejected",function(h,y,_,E,T){return{payload:E,error:(a&&a.serializeError||yw)(h||"Rejected"),meta:Ec(Zr({},T||{}),{arg:_,requestId:y,rejectedWithValue:!!E,requestStatus:"rejected",aborted:(h==null?void 0:h.name)==="AbortError",condition:(h==null?void 0:h.name)==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){process.env.NODE_ENV!=="production"&&(l||(l=!0,console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.")))},h}();function p(h){return function(y,_,E){var T=a!=null&&a.idGenerator?a.idGenerator(h):Ru(),C=new f,O;function D(M){O=M,C.abort()}var F=function(){return JT(this,null,function(){var M,L,I,G,W,q,ee;return qT(this,function(De){switch(De.label){case 0:return De.trys.push([0,4,,5]),G=(M=a==null?void 0:a.condition)==null?void 0:M.call(a,h,{getState:_,extra:E}),_w(G)?[4,G]:[3,2];case 1:G=De.sent(),De.label=2;case 2:if(G===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return W=new Promise(function(Ee,We){return C.signal.addEventListener("abort",function(){return We({name:"AbortError",message:O||"Aborted"})})}),y(i(T,h,(L=a==null?void 0:a.getPendingMeta)==null?void 0:L.call(a,{requestId:T,arg:h},{getState:_,extra:E}))),[4,Promise.race([W,Promise.resolve(t(h,{dispatch:y,getState:_,extra:E,requestId:T,signal:C.signal,abort:D,rejectWithValue:function(Ee,We){return new Tc(Ee,We)},fulfillWithValue:function(Ee,We){return new np(Ee,We)}})).then(function(Ee){if(Ee instanceof Tc)throw Ee;return Ee instanceof np?s(Ee.payload,T,h,Ee.meta):s(Ee,T,h)})])];case 3:return I=De.sent(),[3,5];case 4:return q=De.sent(),I=q instanceof Tc?u(null,T,h,q.payload,q.meta):u(q,T,h),[3,5];case 5:return ee=a&&!a.dispatchConditionRejection&&u.match(I)&&I.meta.condition,ee||y(I),[2,I]}})})}();return Object.assign(F,{abort:D,requestId:T,arg:h,unwrap:function(){return F.then(bw)}})}}return Object.assign(p,{pending:i,rejected:u,fulfilled:s,typePrefix:r})}return e.withTypes=function(){return e},e}();function bw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _w(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ew=function(e,r){return gh(e)?e.match(r):e(r)};function Ht(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.some(function(a){return Ew(a,t)})}}function Du(e,r){if(!e||!e.meta)return!1;var t=typeof e.meta.requestId=="string",a=r.indexOf(e.meta.requestStatus)>-1;return t&&a}function Pu(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Sh(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return Du(t,["pending"])}:Pu(e)?function(t){var a=e.map(function(i){return i.pending}),s=Ht.apply(void 0,a);return s(t)}:Sh()(e[0])}function Th(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return Du(t,["rejected"])}:Pu(e)?function(t){var a=e.map(function(i){return i.rejected}),s=Ht.apply(void 0,a);return s(t)}:Th()(e[0])}function wh(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return Du(t,["fulfilled"])}:Pu(e)?function(t){var a=e.map(function(i){return i.fulfilled}),s=Ht.apply(void 0,a);return s(t)}:wh()(e[0])}var Fu="listenerMiddleware";en(Fu+"/add");en(Fu+"/removeAll");en(Fu+"/remove");var ap;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);bT();var Pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Os(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Sw(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),t}function Tw(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Ga=Tw,ww=typeof Pr=="object"&&Pr&&Pr.Object===Object&&Pr,Ch=ww,Cw=Ch,xw=typeof self=="object"&&self&&self.Object===Object&&self,Ow=Cw||xw||Function("return this")(),yr=Ow,Aw=yr,Rw=function(){return Aw.Date.now()},Dw=Rw,Pw=/\s/;function Fw(e){for(var r=e.length;r--&&Pw.test(e.charAt(r)););return r}var Iw=Fw,Mw=Iw,$w=/^\s+/;function Lw(e){return e&&e.slice(0,Mw(e)+1).replace($w,"")}var Nw=Lw,kw=yr,jw=kw.Symbol,Iu=jw,op=Iu,xh=Object.prototype,Bw=xh.hasOwnProperty,Ww=xh.toString,Oa=op?op.toStringTag:void 0;function Hw(e){var r=Bw.call(e,Oa),t=e[Oa];try{e[Oa]=void 0;var a=!0}catch{}var s=Ww.call(e);return a&&(r?e[Oa]=t:delete e[Oa]),s}var Uw=Hw,qw=Object.prototype,Gw=qw.toString;function Yw(e){return Gw.call(e)}var Vw=Yw,sp=Iu,zw=Uw,Kw=Vw,Jw="[object Null]",Xw="[object Undefined]",ip=sp?sp.toStringTag:void 0;function Qw(e){return e==null?e===void 0?Xw:Jw:ip&&ip in Object(e)?zw(e):Kw(e)}var As=Qw;function Zw(e){return e!=null&&typeof e=="object"}var Mu=Zw,e1=As,t1=Mu,r1="[object Symbol]";function n1(e){return typeof e=="symbol"||t1(e)&&e1(e)==r1}var a1=n1,o1=Nw,cp=Ga,s1=a1,up=0/0,i1=/^[-+]0x[0-9a-f]+$/i,c1=/^0b[01]+$/i,u1=/^0o[0-7]+$/i,l1=parseInt;function f1(e){if(typeof e=="number")return e;if(s1(e))return up;if(cp(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=cp(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=o1(e);var t=c1.test(e);return t||u1.test(e)?l1(e.slice(2),t?2:8):i1.test(e)?up:+e}var d1=f1,p1=Ga,wc=Dw,lp=d1,h1="Expected a function",g1=Math.max,v1=Math.min;function m1(e,r,t){var a,s,i,u,l,f,p=0,h=!1,y=!1,_=!0;if(typeof e!="function")throw new TypeError(h1);r=lp(r)||0,p1(t)&&(h=!!t.leading,y="maxWait"in t,i=y?g1(lp(t.maxWait)||0,r):i,_="trailing"in t?!!t.trailing:_);function E(G){var W=a,q=s;return a=s=void 0,p=G,u=e.apply(q,W),u}function T(G){return p=G,l=setTimeout(D,r),h?E(G):u}function C(G){var W=G-f,q=G-p,ee=r-W;return y?v1(ee,i-q):ee}function O(G){var W=G-f,q=G-p;return f===void 0||W>=r||W<0||y&&q>=i}function D(){var G=wc();if(O(G))return F(G);l=setTimeout(D,C(G))}function F(G){return l=void 0,_&&a?E(G):(a=s=void 0,u)}function M(){l!==void 0&&clearTimeout(l),p=0,a=f=s=l=void 0}function L(){return l===void 0?u:F(wc())}function I(){var G=wc(),W=O(G);if(a=arguments,s=this,f=G,W){if(l===void 0)return T(f);if(y)return clearTimeout(l),l=setTimeout(D,r),E(f)}return l===void 0&&(l=setTimeout(D,r)),u}return I.cancel=M,I.flush=L,I}var y1=m1,b1=y1,_1=Ga,E1="Expected a function";function S1(e,r,t){var a=!0,s=!0;if(typeof e!="function")throw new TypeError(E1);return _1(t)&&(a="leading"in t?!!t.leading:a,s="trailing"in t?!!t.trailing:s),b1(e,r,{leading:a,maxWait:r,trailing:s})}var T1=S1;const w1=Os(T1);var Oh=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(Oh||{}),Jr=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Jr||{}),ps=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(ps||{}),Ah=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(Ah||{}),hs={exports:{}};/**
|
|
7
|
+
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),y||(W.measureTime(function(){var G=P.getState(),Q=If(G,"",r,n,d,A);if(Q){var we=Q.keyPath,Oe=Q.value;console.error("A non-serializable value was detected in the state, in the path: `"+we+"`. Value:",Oe,`
|
|
8
|
+
Take a look at the reducer(s) handling this action type: `+_.type+`.
|
|
9
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),W.warnIfExceeded()),M}}}}function $s(e){return typeof e=="boolean"}function lP(){return function(t){return fP(t)}}function fP(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,o=e.serializableCheck,u=o===void 0?!0:o,c=e.actionCreatorCheck,f=c===void 0?!0:c,d=new tP;if(r&&($s(r)?d.push(Df):d.push(Df.withExtraArgument(r.extraArgument))),process.env.NODE_ENV!=="production"){if(a){var p={};$s(a)||(p=a),d.unshift(uP(p))}if(u){var m={};$s(u)||(m=u),d.push(cP(m))}if(f){var g={};$s(f)||(g=f),d.unshift(eP(g))}}return d}var Gl=process.env.NODE_ENV==="production";function dP(e){var t=lP(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,o=r.middleware,u=o===void 0?t():o,c=r.devTools,f=c===void 0?!0:c,d=r.preloadedState,p=d===void 0?void 0:d,m=r.enhancers,g=m===void 0?void 0:m,y;if(typeof a=="function")y=a;else if(Oy(a))y=Ey(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=u;if(typeof E=="function"&&(E=E(t),!Gl&&!Array.isArray(E)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gl&&E.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Nx.apply(void 0,E),T=uu;f&&(T=Jx(ea({trace:!Gl},typeof f=="object"&&f)));var C=new rP(S),A=C;Array.isArray(g)?A=li([S],g):typeof g=="function"&&(A=g(C));var P=T.apply(void 0,A);return wy(y,p,P)}function $y(e){var t={},r=[],n,a={addCase:function(o,u){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var c=typeof o=="string"?o:o.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[c]=u,a},addMatcher:function(o,u){if(process.env.NODE_ENV!=="production"&&n)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:o,reducer:u}),a},addDefaultCase:function(o){if(process.env.NODE_ENV!=="production"&&n)throw new Error("`builder.addDefaultCase` can only be called once");return n=o,a}};return e(a),[t,r,n]}function pP(e){return typeof e=="function"}var Fg=!1;function hP(e,t,r,n){r===void 0&&(r=[]),process.env.NODE_ENV!=="production"&&typeof t=="object"&&(Fg||(Fg=!0,console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer")));var a=typeof t=="function"?$y(t):[t,r,n],o=a[0],u=a[1],c=a[2],f;if(pP(e))f=function(){return $f(e())};else{var d=$f(e);f=function(){return d}}function p(m,g){m===void 0&&(m=f());var y=li([o[g.type]],u.filter(function(E){var S=E.matcher;return S(g)}).map(function(E){var S=E.reducer;return S}));return y.filter(function(E){return!!E}).length===0&&(y=[c]),y.reduce(function(E,S){if(S)if(oa(E)){var T=E,C=S(T,g);return C===void 0?E:C}else{if(Rn(E))return by(E,function(A){return S(A,g)});var C=S(E,g);if(C===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return E},m)}return p.getInitialState=f,p}var Ng=!1;function mP(e,t){return e+"/"+t}function yr(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&e.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");var r=typeof e.initialState=="function"?e.initialState:$f(e.initialState),n=e.reducers||{},a=Object.keys(n),o={},u={},c={};a.forEach(function(p){var m=n[p],g=mP(t,p),y,E;"reducer"in m?(y=m.reducer,E=m.prepare):y=m,o[p]=y,u[g]=y,c[p]=E?ta(g,E):ta(g)});function f(){process.env.NODE_ENV!=="production"&&typeof e.extraReducers=="object"&&(Ng||(Ng=!0,console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice")));var p=typeof e.extraReducers=="function"?$y(e.extraReducers):[e.extraReducers],m=p[0],g=m===void 0?{}:m,y=p[1],E=y===void 0?[]:y,S=p[2],T=S===void 0?void 0:S,C=ea(ea({},g),u);return hP(r,function(A){for(var P in C)A.addCase(P,C[P]);for(var $=0,_=E;$<_.length;$++){var M=_[$];A.addMatcher(M.matcher,M.reducer)}T&&A.addDefaultCase(T)})}var d;return{name:t,reducer:function(p,m){return d||(d=f()),d(p,m)},actions:c,caseReducers:o,getInitialState:function(){return d||(d=f()),d.getInitialState()}}}var gP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xd=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=gP[Math.random()*64|0];return t},vP=["name","message","stack","code"],ql=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Lg=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),yP=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=vP;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Z=function(){function e(t,r,n){var a=ta(t+"/fulfilled",function(p,m,g,y){return{payload:p,meta:Ul(ea({},y||{}),{arg:g,requestId:m,requestStatus:"fulfilled"})}}),o=ta(t+"/pending",function(p,m,g){return{payload:void 0,meta:Ul(ea({},g||{}),{arg:m,requestId:p,requestStatus:"pending"})}}),u=ta(t+"/rejected",function(p,m,g,y,E){return{payload:y,error:(n&&n.serializeError||yP)(p||"Rejected"),meta:Ul(ea({},E||{}),{arg:g,requestId:m,rejectedWithValue:!!y,requestStatus:"rejected",aborted:(p==null?void 0:p.name)==="AbortError",condition:(p==null?void 0:p.name)==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){process.env.NODE_ENV!=="production"&&(c||(c=!0,console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.")))},p}();function d(p){return function(m,g,y){var E=n!=null&&n.idGenerator?n.idGenerator(p):xd(),S=new f,T;function C(P){T=P,S.abort()}var A=function(){return Zx(this,null,function(){var P,$,_,M,W,G,Q;return Ux(this,function(we){switch(we.label){case 0:return we.trys.push([0,4,,5]),M=(P=n==null?void 0:n.condition)==null?void 0:P.call(n,p,{getState:g,extra:y}),SP(M)?[4,M]:[3,2];case 1:M=we.sent(),we.label=2;case 2:if(M===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return W=new Promise(function(Oe,Ke){return S.signal.addEventListener("abort",function(){return Ke({name:"AbortError",message:T||"Aborted"})})}),m(o(E,p,($=n==null?void 0:n.getPendingMeta)==null?void 0:$.call(n,{requestId:E,arg:p},{getState:g,extra:y}))),[4,Promise.race([W,Promise.resolve(r(p,{dispatch:m,getState:g,extra:y,requestId:E,signal:S.signal,abort:C,rejectWithValue:function(Oe,Ke){return new ql(Oe,Ke)},fulfillWithValue:function(Oe,Ke){return new Lg(Oe,Ke)}})).then(function(Oe){if(Oe instanceof ql)throw Oe;return Oe instanceof Lg?a(Oe.payload,E,p,Oe.meta):a(Oe,E,p)})])];case 3:return _=we.sent(),[3,5];case 4:return G=we.sent(),_=G instanceof ql?u(null,E,p,G.payload,G.meta):u(G,E,p),[3,5];case 5:return Q=n&&!n.dispatchConditionRejection&&u.match(_)&&_.meta.condition,Q||m(_),[2,_]}})})}();return Object.assign(A,{abort:C,requestId:E,arg:p,unwrap:function(){return A.then(bP)}})}}return Object.assign(d,{pending:o,rejected:u,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function bP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function SP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var wP=function(e,t){return Cy(e)?e.match(t):e(t)};function fr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return e.some(function(n){return wP(n,r)})}}function Pd(e,t){if(!e||!e.meta)return!1;var r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Rd(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Iy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(r){return Pd(r,["pending"])}:Rd(e)?function(r){var n=e.map(function(o){return o.pending}),a=fr.apply(void 0,n);return a(r)}:Iy()(e[0])}function My(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(r){return Pd(r,["rejected"])}:Rd(e)?function(r){var n=e.map(function(o){return o.rejected}),a=fr.apply(void 0,n);return a(r)}:My()(e[0])}function Fy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(r){return Pd(r,["fulfilled"])}:Rd(e)?function(r){var n=e.map(function(o){return o.fulfilled}),a=fr.apply(void 0,n);return a(r)}:Fy()(e[0])}var Dd="listenerMiddleware";ta(Dd+"/add");ta(Dd+"/removeAll");ta(Dd+"/remove");var kg;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);wx();var Br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function EP(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}function _P(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ro=_P,TP=typeof Br=="object"&&Br&&Br.Object===Object&&Br,Ny=TP,OP=Ny,CP=typeof self=="object"&&self&&self.Object===Object&&self,AP=OP||CP||Function("return this")(),sn=AP,xP=sn,PP=function(){return xP.Date.now()},RP=PP,DP=/\s/;function $P(e){for(var t=e.length;t--&&DP.test(e.charAt(t)););return t}var IP=$P,MP=IP,FP=/^\s+/;function NP(e){return e&&e.slice(0,MP(e)+1).replace(FP,"")}var LP=NP,kP=sn,jP=kP.Symbol,$d=jP,jg=$d,Ly=Object.prototype,WP=Ly.hasOwnProperty,BP=Ly.toString,Yi=jg?jg.toStringTag:void 0;function zP(e){var t=WP.call(e,Yi),r=e[Yi];try{e[Yi]=void 0;var n=!0}catch{}var a=BP.call(e);return n&&(t?e[Yi]=r:delete e[Yi]),a}var HP=zP,UP=Object.prototype,GP=UP.toString;function qP(e){return GP.call(e)}var YP=qP,Wg=$d,KP=HP,VP=YP,ZP="[object Null]",JP="[object Undefined]",Bg=Wg?Wg.toStringTag:void 0;function XP(e){return e==null?e===void 0?JP:ZP:Bg&&Bg in Object(e)?KP(e):VP(e)}var Fu=XP;function QP(e){return e!=null&&typeof e=="object"}var Id=QP,eR=Fu,tR=Id,rR="[object Symbol]";function nR(e){return typeof e=="symbol"||tR(e)&&eR(e)==rR}var aR=nR,iR=LP,zg=Ro,oR=aR,Hg=NaN,sR=/^[-+]0x[0-9a-f]+$/i,uR=/^0b[01]+$/i,cR=/^0o[0-7]+$/i,lR=parseInt;function fR(e){if(typeof e=="number")return e;if(oR(e))return Hg;if(zg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=zg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iR(e);var r=uR.test(e);return r||cR.test(e)?lR(e.slice(2),r?2:8):sR.test(e)?Hg:+e}var dR=fR,pR=Ro,Yl=RP,Ug=dR,hR="Expected a function",mR=Math.max,gR=Math.min;function vR(e,t,r){var n,a,o,u,c,f,d=0,p=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(hR);t=Ug(t)||0,pR(r)&&(p=!!r.leading,m="maxWait"in r,o=m?mR(Ug(r.maxWait)||0,t):o,g="trailing"in r?!!r.trailing:g);function y(M){var W=n,G=a;return n=a=void 0,d=M,u=e.apply(G,W),u}function E(M){return d=M,c=setTimeout(C,t),p?y(M):u}function S(M){var W=M-f,G=M-d,Q=t-W;return m?gR(Q,o-G):Q}function T(M){var W=M-f,G=M-d;return f===void 0||W>=t||W<0||m&&G>=o}function C(){var M=Yl();if(T(M))return A(M);c=setTimeout(C,S(M))}function A(M){return c=void 0,g&&n?y(M):(n=a=void 0,u)}function P(){c!==void 0&&clearTimeout(c),d=0,n=f=a=c=void 0}function $(){return c===void 0?u:A(Yl())}function _(){var M=Yl(),W=T(M);if(n=arguments,a=this,f=M,W){if(c===void 0)return E(f);if(m)return clearTimeout(c),c=setTimeout(C,t),y(f)}return c===void 0&&(c=setTimeout(C,t)),u}return _.cancel=P,_.flush=$,_}var yR=vR,bR=yR,SR=Ro,wR="Expected a function";function ER(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(wR);return SR(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),bR(e,t,{leading:n,maxWait:t,trailing:a})}var _R=ER;const TR=Po(_R);Y.forwardRef(({children:e,style:t,attributes:r},n)=>ao.jsx("div",{style:{...t,zIndex:2e3},...r,ref:n,className:"w-60 rounded border rounded border border-grey-50 bg-grey-900 shadow-2xl","data-cy":"dialogBody",children:e}));var ky={exports:{}};/*!
|
|
10
|
+
Copyright (c) 2018 Jed Watson.
|
|
11
|
+
Licensed under the MIT License (MIT), see
|
|
12
|
+
http://jedwatson.github.io/classnames
|
|
13
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(o=a(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var u="";for(var c in o)t.call(o,c)&&o[c]&&(u=a(u,c));return u}function a(o,u){return u?o?o+" "+u:o+u:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ky);var jy=ky.exports;const OR=Po(jy);var Is,CR=new Uint8Array(16);function Wy(){if(!Is&&(Is=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Is))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Is(CR)}const AR=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Nu(e){return typeof e=="string"&&AR.test(e)}var $t=[];for(var Kl=0;Kl<256;++Kl)$t.push((Kl+256).toString(16).substr(1));function Lu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=($t[e[t+0]]+$t[e[t+1]]+$t[e[t+2]]+$t[e[t+3]]+"-"+$t[e[t+4]]+$t[e[t+5]]+"-"+$t[e[t+6]]+$t[e[t+7]]+"-"+$t[e[t+8]]+$t[e[t+9]]+"-"+$t[e[t+10]]+$t[e[t+11]]+$t[e[t+12]]+$t[e[t+13]]+$t[e[t+14]]+$t[e[t+15]]).toLowerCase();if(!Nu(r))throw TypeError("Stringified UUID is invalid");return r}var Gg,Vl,Zl=0,Jl=0;function xR(e,t,r){var n=t&&r||0,a=t||new Array(16);e=e||{};var o=e.node||Gg,u=e.clockseq!==void 0?e.clockseq:Vl;if(o==null||u==null){var c=e.random||(e.rng||Wy)();o==null&&(o=Gg=[c[0]|1,c[1],c[2],c[3],c[4],c[5]]),u==null&&(u=Vl=(c[6]<<8|c[7])&16383)}var f=e.msecs!==void 0?e.msecs:Date.now(),d=e.nsecs!==void 0?e.nsecs:Jl+1,p=f-Zl+(d-Jl)/1e4;if(p<0&&e.clockseq===void 0&&(u=u+1&16383),(p<0||f>Zl)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Zl=f,Jl=d,Vl=u,f+=122192928e5;var m=((f&268435455)*1e4+d)%4294967296;a[n++]=m>>>24&255,a[n++]=m>>>16&255,a[n++]=m>>>8&255,a[n++]=m&255;var g=f/4294967296*1e4&268435455;a[n++]=g>>>8&255,a[n++]=g&255,a[n++]=g>>>24&15|16,a[n++]=g>>>16&255,a[n++]=u>>>8|128,a[n++]=u&255;for(var y=0;y<6;++y)a[n+y]=o[y];return t||Lu(a)}function By(e){if(!Nu(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function PR(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var RR="6ba7b810-9dad-11d1-80b4-00c04fd430c8",DR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function zy(e,t,r){function n(a,o,u,c){if(typeof a=="string"&&(a=PR(a)),typeof o=="string"&&(o=By(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var f=new Uint8Array(16+a.length);if(f.set(o),f.set(a,o.length),f=r(f),f[6]=f[6]&15|t,f[8]=f[8]&63|128,u){c=c||0;for(var d=0;d<16;++d)u[c+d]=f[d];return u}return Lu(f)}try{n.name=e}catch{}return n.DNS=RR,n.URL=DR,n}function $R(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return IR(MR(FR(e),e.length*8))}function IR(e){for(var t=[],r=e.length*32,n="0123456789abcdef",a=0;a<r;a+=8){var o=e[a>>5]>>>a%32&255,u=parseInt(n.charAt(o>>>4&15)+n.charAt(o&15),16);t.push(u)}return t}function Hy(e){return(e+64>>>9<<4)+14+1}function MR(e,t){e[t>>5]|=128<<t%32,e[Hy(t)-1]=t;for(var r=1732584193,n=-271733879,a=-1732584194,o=271733878,u=0;u<e.length;u+=16){var c=r,f=n,d=a,p=o;r=Lt(r,n,a,o,e[u],7,-680876936),o=Lt(o,r,n,a,e[u+1],12,-389564586),a=Lt(a,o,r,n,e[u+2],17,606105819),n=Lt(n,a,o,r,e[u+3],22,-1044525330),r=Lt(r,n,a,o,e[u+4],7,-176418897),o=Lt(o,r,n,a,e[u+5],12,1200080426),a=Lt(a,o,r,n,e[u+6],17,-1473231341),n=Lt(n,a,o,r,e[u+7],22,-45705983),r=Lt(r,n,a,o,e[u+8],7,1770035416),o=Lt(o,r,n,a,e[u+9],12,-1958414417),a=Lt(a,o,r,n,e[u+10],17,-42063),n=Lt(n,a,o,r,e[u+11],22,-1990404162),r=Lt(r,n,a,o,e[u+12],7,1804603682),o=Lt(o,r,n,a,e[u+13],12,-40341101),a=Lt(a,o,r,n,e[u+14],17,-1502002290),n=Lt(n,a,o,r,e[u+15],22,1236535329),r=kt(r,n,a,o,e[u+1],5,-165796510),o=kt(o,r,n,a,e[u+6],9,-1069501632),a=kt(a,o,r,n,e[u+11],14,643717713),n=kt(n,a,o,r,e[u],20,-373897302),r=kt(r,n,a,o,e[u+5],5,-701558691),o=kt(o,r,n,a,e[u+10],9,38016083),a=kt(a,o,r,n,e[u+15],14,-660478335),n=kt(n,a,o,r,e[u+4],20,-405537848),r=kt(r,n,a,o,e[u+9],5,568446438),o=kt(o,r,n,a,e[u+14],9,-1019803690),a=kt(a,o,r,n,e[u+3],14,-187363961),n=kt(n,a,o,r,e[u+8],20,1163531501),r=kt(r,n,a,o,e[u+13],5,-1444681467),o=kt(o,r,n,a,e[u+2],9,-51403784),a=kt(a,o,r,n,e[u+7],14,1735328473),n=kt(n,a,o,r,e[u+12],20,-1926607734),r=jt(r,n,a,o,e[u+5],4,-378558),o=jt(o,r,n,a,e[u+8],11,-2022574463),a=jt(a,o,r,n,e[u+11],16,1839030562),n=jt(n,a,o,r,e[u+14],23,-35309556),r=jt(r,n,a,o,e[u+1],4,-1530992060),o=jt(o,r,n,a,e[u+4],11,1272893353),a=jt(a,o,r,n,e[u+7],16,-155497632),n=jt(n,a,o,r,e[u+10],23,-1094730640),r=jt(r,n,a,o,e[u+13],4,681279174),o=jt(o,r,n,a,e[u],11,-358537222),a=jt(a,o,r,n,e[u+3],16,-722521979),n=jt(n,a,o,r,e[u+6],23,76029189),r=jt(r,n,a,o,e[u+9],4,-640364487),o=jt(o,r,n,a,e[u+12],11,-421815835),a=jt(a,o,r,n,e[u+15],16,530742520),n=jt(n,a,o,r,e[u+2],23,-995338651),r=Wt(r,n,a,o,e[u],6,-198630844),o=Wt(o,r,n,a,e[u+7],10,1126891415),a=Wt(a,o,r,n,e[u+14],15,-1416354905),n=Wt(n,a,o,r,e[u+5],21,-57434055),r=Wt(r,n,a,o,e[u+12],6,1700485571),o=Wt(o,r,n,a,e[u+3],10,-1894986606),a=Wt(a,o,r,n,e[u+10],15,-1051523),n=Wt(n,a,o,r,e[u+1],21,-2054922799),r=Wt(r,n,a,o,e[u+8],6,1873313359),o=Wt(o,r,n,a,e[u+15],10,-30611744),a=Wt(a,o,r,n,e[u+6],15,-1560198380),n=Wt(n,a,o,r,e[u+13],21,1309151649),r=Wt(r,n,a,o,e[u+4],6,-145523070),o=Wt(o,r,n,a,e[u+11],10,-1120210379),a=Wt(a,o,r,n,e[u+2],15,718787259),n=Wt(n,a,o,r,e[u+9],21,-343485551),r=Xn(r,c),n=Xn(n,f),a=Xn(a,d),o=Xn(o,p)}return[r,n,a,o]}function FR(e){if(e.length===0)return[];for(var t=e.length*8,r=new Uint32Array(Hy(t)),n=0;n<t;n+=8)r[n>>5]|=(e[n/8]&255)<<n%32;return r}function Xn(e,t){var r=(e&65535)+(t&65535),n=(e>>16)+(t>>16)+(r>>16);return n<<16|r&65535}function NR(e,t){return e<<t|e>>>32-t}function ku(e,t,r,n,a,o){return Xn(NR(Xn(Xn(t,e),Xn(n,o)),a),r)}function Lt(e,t,r,n,a,o,u){return ku(t&r|~t&n,e,t,a,o,u)}function kt(e,t,r,n,a,o,u){return ku(t&n|r&~n,e,t,a,o,u)}function jt(e,t,r,n,a,o,u){return ku(t^r^n,e,t,a,o,u)}function Wt(e,t,r,n,a,o,u){return ku(r^(t|~n),e,t,a,o,u)}var LR=zy("v3",48,$R);function kR(e,t,r){e=e||{};var n=e.random||(e.rng||Wy)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return Lu(n)}function jR(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Xl(e,t){return e<<t|e>>>32-t}function WR(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=[];for(var a=0;a<n.length;++a)e.push(n.charCodeAt(a))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,u=Math.ceil(o/16),c=new Array(u),f=0;f<u;++f){for(var d=new Uint32Array(16),p=0;p<16;++p)d[p]=e[f*64+p*4]<<24|e[f*64+p*4+1]<<16|e[f*64+p*4+2]<<8|e[f*64+p*4+3];c[f]=d}c[u-1][14]=(e.length-1)*8/Math.pow(2,32),c[u-1][14]=Math.floor(c[u-1][14]),c[u-1][15]=(e.length-1)*8&4294967295;for(var m=0;m<u;++m){for(var g=new Uint32Array(80),y=0;y<16;++y)g[y]=c[m][y];for(var E=16;E<80;++E)g[E]=Xl(g[E-3]^g[E-8]^g[E-14]^g[E-16],1);for(var S=r[0],T=r[1],C=r[2],A=r[3],P=r[4],$=0;$<80;++$){var _=Math.floor($/20),M=Xl(S,5)+jR(_,T,C,A)+P+t[_]+g[$]>>>0;P=A,A=C,C=Xl(T,30)>>>0,T=S,S=M}r[0]=r[0]+S>>>0,r[1]=r[1]+T>>>0,r[2]=r[2]+C>>>0,r[3]=r[3]+A>>>0,r[4]=r[4]+P>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var BR=zy("v5",80,WR);const zR="00000000-0000-0000-0000-000000000000";function HR(e){if(!Nu(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const UR=Object.freeze(Object.defineProperty({__proto__:null,NIL:zR,parse:By,stringify:Lu,v1:xR,v3:LR,v4:kR,v5:BR,validate:Nu,version:HR},Symbol.toStringTag,{value:"Module"})),GR=EP(UR);function Md(e,t){if(!e||!t||!e.length||!t.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=t}Md.prototype.convert=function(e){var t,r,n,a={},o=this.srcAlphabet.length,u=this.dstAlphabet.length,c=e.length,f=typeof e=="string"?"":[];if(!this.isValid(e))throw new Error('Number "'+e+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return e;for(t=0;t<c;t++)a[t]=this.srcAlphabet.indexOf(e[t]);do{for(r=0,n=0,t=0;t<c;t++)r=r*o+a[t],r>=u?(a[n++]=parseInt(r/u,10),r=r%u):n>0&&(a[n++]=0);c=n,f=this.dstAlphabet.slice(r,r+1).concat(f)}while(n!==0);return f};Md.prototype.isValid=function(e){for(var t=0;t<e.length;++t)if(this.srcAlphabet.indexOf(e[t])===-1)return!1;return!0};var qR=Md,YR=qR;function Do(e,t){var r=new YR(e,t);return function(n){return r.convert(n)}}Do.BIN="01";Do.OCT="01234567";Do.DEC="0123456789";Do.HEX="0123456789abcdef";var KR=Do;const{v4:Ql}=GR,Ms=KR,ef="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",VR="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",ZR={consistentLength:!0};let tf;const qg=(e,t,r)=>{const n=t(e.toLowerCase().replace(/-/g,""));return!r||!r.consistentLength?n:n.padStart(r.shortIdLength,r.paddingChar)},JR=(e,t)=>{const n=t(e).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[n[1],n[2],n[3],n[4],n[5]].join("-")},XR=e=>Math.ceil(Math.log(2**128)/Math.log(e));var fi=(()=>{const e=(t,r)=>{const n=t||ef,a={...ZR,...r};if([...new Set(Array.from(n))].length!==n.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const o=XR(n.length),u={shortIdLength:o,consistentLength:a.consistentLength,paddingChar:n[0]},c=Ms(Ms.HEX,n),f=Ms(n,Ms.HEX),d=()=>qg(Ql(),c,u),p={new:d,generate:d,uuid:Ql,fromUUID:m=>qg(m,c,u),toUUID:m=>JR(m,f),alphabet:n,maxLength:o};return Object.freeze(p),p};return e.constants={flickrBase58:ef,cookieBase90:VR},e.uuid=Ql,e.generate=()=>(tf||(tf=e(ef).generate),tf()),e})();function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dn.apply(null,arguments)}var QR=!1;function eD(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function tD(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var rD=function(){function e(r){var n=this;this._insertTag=function(a){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,o),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!QR:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(tD(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=eD(a);try{o.insertRule(n,o.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Bt="-ms-",lu="-moz-",$e="-webkit-",Uy="comm",Fd="rule",Nd="decl",nD="@import",Gy="@keyframes",aD="@layer",iD=Math.abs,ju=String.fromCharCode,oD=Object.assign;function sD(e,t){return Mt(e,0)^45?(((t<<2^Mt(e,0))<<2^Mt(e,1))<<2^Mt(e,2))<<2^Mt(e,3):0}function qy(e){return e.trim()}function uD(e,t){return(e=t.exec(e))?e[0]:e}function Ie(e,t,r){return e.replace(t,r)}function Mf(e,t){return e.indexOf(t)}function Mt(e,t){return e.charCodeAt(t)|0}function go(e,t,r){return e.slice(t,r)}function Kr(e){return e.length}function Ld(e){return e.length}function Fs(e,t){return t.push(e),e}function cD(e,t){return e.map(t).join("")}var Wu=1,di=1,Yy=0,ar=0,ht=0,yi="";function Bu(e,t,r,n,a,o,u){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:Wu,column:di,length:u,return:""}}function Ki(e,t){return oD(Bu("",null,null,"",null,null,0),e,{length:-e.length},t)}function lD(){return ht}function fD(){return ht=ar>0?Mt(yi,--ar):0,di--,ht===10&&(di=1,Wu--),ht}function pr(){return ht=ar<Yy?Mt(yi,ar++):0,di++,ht===10&&(di=1,Wu++),ht}function rn(){return Mt(yi,ar)}function qs(){return ar}function $o(e,t){return go(yi,e,t)}function vo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ky(e){return Wu=di=1,Yy=Kr(yi=e),ar=0,[]}function Vy(e){return yi="",e}function Ys(e){return qy($o(ar-1,Ff(e===91?e+2:e===40?e+1:e)))}function dD(e){for(;(ht=rn())&&ht<33;)pr();return vo(e)>2||vo(ht)>3?"":" "}function pD(e,t){for(;--t&&pr()&&!(ht<48||ht>102||ht>57&&ht<65||ht>70&&ht<97););return $o(e,qs()+(t<6&&rn()==32&&pr()==32))}function Ff(e){for(;pr();)switch(ht){case e:return ar;case 34:case 39:e!==34&&e!==39&&Ff(ht);break;case 40:e===41&&Ff(e);break;case 92:pr();break}return ar}function hD(e,t){for(;pr()&&e+ht!==57;)if(e+ht===84&&rn()===47)break;return"/*"+$o(t,ar-1)+"*"+ju(e===47?e:pr())}function mD(e){for(;!vo(rn());)pr();return $o(e,ar)}function gD(e){return Vy(Ks("",null,null,null,[""],e=Ky(e),0,[0],e))}function Ks(e,t,r,n,a,o,u,c,f){for(var d=0,p=0,m=u,g=0,y=0,E=0,S=1,T=1,C=1,A=0,P="",$=a,_=o,M=n,W=P;T;)switch(E=A,A=pr()){case 40:if(E!=108&&Mt(W,m-1)==58){Mf(W+=Ie(Ys(A),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:W+=Ys(A);break;case 9:case 10:case 13:case 32:W+=dD(E);break;case 92:W+=pD(qs()-1,7);continue;case 47:switch(rn()){case 42:case 47:Fs(vD(hD(pr(),qs()),t,r),f);break;default:W+="/"}break;case 123*S:c[d++]=Kr(W)*C;case 125*S:case 59:case 0:switch(A){case 0:case 125:T=0;case 59+p:C==-1&&(W=Ie(W,/\f/g,"")),y>0&&Kr(W)-m&&Fs(y>32?Kg(W+";",n,r,m-1):Kg(Ie(W," ","")+";",n,r,m-2),f);break;case 59:W+=";";default:if(Fs(M=Yg(W,t,r,d,p,a,c,P,$=[],_=[],m),o),A===123)if(p===0)Ks(W,t,M,M,$,o,m,c,_);else switch(g===99&&Mt(W,3)===110?100:g){case 100:case 108:case 109:case 115:Ks(e,M,M,n&&Fs(Yg(e,M,M,0,0,a,c,P,a,$=[],m),_),a,_,m,c,n?$:_);break;default:Ks(W,M,M,M,[""],_,0,c,_)}}d=p=y=0,S=C=1,P=W="",m=u;break;case 58:m=1+Kr(W),y=E;default:if(S<1){if(A==123)--S;else if(A==125&&S++==0&&fD()==125)continue}switch(W+=ju(A),A*S){case 38:C=p>0?1:(W+="\f",-1);break;case 44:c[d++]=(Kr(W)-1)*C,C=1;break;case 64:rn()===45&&(W+=Ys(pr())),g=rn(),p=m=Kr(P=W+=mD(qs())),A++;break;case 45:E===45&&Kr(W)==2&&(S=0)}}return o}function Yg(e,t,r,n,a,o,u,c,f,d,p){for(var m=a-1,g=a===0?o:[""],y=Ld(g),E=0,S=0,T=0;E<n;++E)for(var C=0,A=go(e,m+1,m=iD(S=u[E])),P=e;C<y;++C)(P=qy(S>0?g[C]+" "+A:Ie(A,/&\f/g,g[C])))&&(f[T++]=P);return Bu(e,t,r,a===0?Fd:c,f,d,p)}function vD(e,t,r){return Bu(e,t,r,Uy,ju(lD()),go(e,2,-2),0)}function Kg(e,t,r,n){return Bu(e,t,r,Nd,go(e,0,n),go(e,n+1,-1),n)}function ri(e,t){for(var r="",n=Ld(e),a=0;a<n;a++)r+=t(e[a],a,e,t)||"";return r}function yD(e,t,r,n){switch(e.type){case aD:if(e.children.length)break;case nD:case Nd:return e.return=e.return||e.value;case Uy:return"";case Gy:return e.return=e.value+"{"+ri(e.children,n)+"}";case Fd:e.value=e.props.join(",")}return Kr(r=ri(e.children,n))?e.return=e.value+"{"+r+"}":""}function bD(e){var t=Ld(e);return function(r,n,a,o){for(var u="",c=0;c<t;c++)u+=e[c](r,n,a,o)||"";return u}}function SD(e){return function(t){t.root||(t=t.return)&&e(t)}}function Zy(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var wD=function(t,r,n){for(var a=0,o=0;a=o,o=rn(),a===38&&o===12&&(r[n]=1),!vo(o);)pr();return $o(t,ar)},ED=function(t,r){var n=-1,a=44;do switch(vo(a)){case 0:a===38&&rn()===12&&(r[n]=1),t[n]+=wD(ar-1,r,n);break;case 2:t[n]+=Ys(a);break;case 4:if(a===44){t[++n]=rn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=ju(a)}while(a=pr());return t},_D=function(t,r){return Vy(ED(Ky(t),r))},Vg=new WeakMap,TD=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,a=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Vg.get(n))&&!a){Vg.set(t,!0);for(var o=[],u=_D(r,o),c=n.props,f=0,d=0;f<u.length;f++)for(var p=0;p<c.length;p++,d++)t.props[d]=o[f]?u[f].replace(/&\f/g,c[p]):c[p]+" "+u[f]}}},OD=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Jy(e,t){switch(sD(e,t)){case 5103:return $e+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $e+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $e+e+lu+e+Bt+e+e;case 6828:case 4268:return $e+e+Bt+e+e;case 6165:return $e+e+Bt+"flex-"+e+e;case 5187:return $e+e+Ie(e,/(\w+).+(:[^]+)/,$e+"box-$1$2"+Bt+"flex-$1$2")+e;case 5443:return $e+e+Bt+"flex-item-"+Ie(e,/flex-|-self/,"")+e;case 4675:return $e+e+Bt+"flex-line-pack"+Ie(e,/align-content|flex-|-self/,"")+e;case 5548:return $e+e+Bt+Ie(e,"shrink","negative")+e;case 5292:return $e+e+Bt+Ie(e,"basis","preferred-size")+e;case 6060:return $e+"box-"+Ie(e,"-grow","")+$e+e+Bt+Ie(e,"grow","positive")+e;case 4554:return $e+Ie(e,/([^-])(transform)/g,"$1"+$e+"$2")+e;case 6187:return Ie(Ie(Ie(e,/(zoom-|grab)/,$e+"$1"),/(image-set)/,$e+"$1"),e,"")+e;case 5495:case 3959:return Ie(e,/(image-set\([^]*)/,$e+"$1$`$1");case 4968:return Ie(Ie(e,/(.+:)(flex-)?(.*)/,$e+"box-pack:$3"+Bt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$e+e+e;case 4095:case 3583:case 4068:case 2532:return Ie(e,/(.+)-inline(.+)/,$e+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Kr(e)-1-t>6)switch(Mt(e,t+1)){case 109:if(Mt(e,t+4)!==45)break;case 102:return Ie(e,/(.+:)(.+)-([^]+)/,"$1"+$e+"$2-$3$1"+lu+(Mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Mf(e,"stretch")?Jy(Ie(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Mt(e,t+1)!==115)break;case 6444:switch(Mt(e,Kr(e)-3-(~Mf(e,"!important")&&10))){case 107:return Ie(e,":",":"+$e)+e;case 101:return Ie(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$e+(Mt(e,14)===45?"inline-":"")+"box$3$1"+$e+"$2$3$1"+Bt+"$2box$3")+e}break;case 5936:switch(Mt(e,t+11)){case 114:return $e+e+Bt+Ie(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $e+e+Bt+Ie(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $e+e+Bt+Ie(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $e+e+Bt+e+e}return e}var CD=function(t,r,n,a){if(t.length>-1&&!t.return)switch(t.type){case Nd:t.return=Jy(t.value,t.length);break;case Gy:return ri([Ki(t,{value:Ie(t.value,"@","@"+$e)})],a);case Fd:if(t.length)return cD(t.props,function(o){switch(uD(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ri([Ki(t,{props:[Ie(o,/:(read-\w+)/,":"+lu+"$1")]})],a);case"::placeholder":return ri([Ki(t,{props:[Ie(o,/:(plac\w+)/,":"+$e+"input-$1")]}),Ki(t,{props:[Ie(o,/:(plac\w+)/,":"+lu+"$1")]}),Ki(t,{props:[Ie(o,/:(plac\w+)/,Bt+"input-$1")]})],a)}return""})}},AD=[CD],xD=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(S){var T=S.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var a=t.stylisPlugins||AD,o={},u,c=[];u=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(S){for(var T=S.getAttribute("data-emotion").split(" "),C=1;C<T.length;C++)o[T[C]]=!0;c.push(S)});var f,d=[TD,OD];{var p,m=[yD,SD(function(S){p.insert(S)})],g=bD(d.concat(a,m)),y=function(T){return ri(gD(T),g)};f=function(T,C,A,P){p=A,y(T?T+"{"+C.styles+"}":C.styles),P&&(E.inserted[C.name]=!0)}}var E={key:r,sheet:new rD({key:r,container:u,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:f};return E.sheet.hydrate(c),E},Nf={exports:{}},Fe={};/** @license React v16.13.1
|
|
14
|
+
* react-is.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/var Zg;function PD(){if(Zg)return Fe;Zg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function P(_){if(typeof _=="object"&&_!==null){var M=_.$$typeof;switch(M){case t:switch(_=_.type,_){case f:case d:case n:case o:case a:case m:return _;default:switch(_=_&&_.$$typeof,_){case c:case p:case E:case y:case u:return _;default:return M}}case r:return M}}}function $(_){return P(_)===d}return Fe.AsyncMode=f,Fe.ConcurrentMode=d,Fe.ContextConsumer=c,Fe.ContextProvider=u,Fe.Element=t,Fe.ForwardRef=p,Fe.Fragment=n,Fe.Lazy=E,Fe.Memo=y,Fe.Portal=r,Fe.Profiler=o,Fe.StrictMode=a,Fe.Suspense=m,Fe.isAsyncMode=function(_){return $(_)||P(_)===f},Fe.isConcurrentMode=$,Fe.isContextConsumer=function(_){return P(_)===c},Fe.isContextProvider=function(_){return P(_)===u},Fe.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Fe.isForwardRef=function(_){return P(_)===p},Fe.isFragment=function(_){return P(_)===n},Fe.isLazy=function(_){return P(_)===E},Fe.isMemo=function(_){return P(_)===y},Fe.isPortal=function(_){return P(_)===r},Fe.isProfiler=function(_){return P(_)===o},Fe.isStrictMode=function(_){return P(_)===a},Fe.isSuspense=function(_){return P(_)===m},Fe.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===d||_===o||_===a||_===m||_===g||typeof _=="object"&&_!==null&&(_.$$typeof===E||_.$$typeof===y||_.$$typeof===u||_.$$typeof===c||_.$$typeof===p||_.$$typeof===T||_.$$typeof===C||_.$$typeof===A||_.$$typeof===S)},Fe.typeOf=P,Fe}var Ne={};/** @license React v16.13.1
|
|
21
|
+
* react-is.development.js
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/var Jg;function RD(){return Jg||(Jg=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function P(F){return typeof F=="string"||typeof F=="function"||F===n||F===d||F===o||F===a||F===m||F===g||typeof F=="object"&&F!==null&&(F.$$typeof===E||F.$$typeof===y||F.$$typeof===u||F.$$typeof===c||F.$$typeof===p||F.$$typeof===T||F.$$typeof===C||F.$$typeof===A||F.$$typeof===S)}function $(F){if(typeof F=="object"&&F!==null){var at=F.$$typeof;switch(at){case t:var Ze=F.type;switch(Ze){case f:case d:case n:case o:case a:case m:return Ze;default:var $r=Ze&&Ze.$$typeof;switch($r){case c:case p:case E:case y:case u:return $r;default:return at}}case r:return at}}}var _=f,M=d,W=c,G=u,Q=t,we=p,Oe=n,Ke=E,X=y,xt=r,dn=o,Pt=a,lt=m,St=!1;function pn(F){return St||(St=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),H(F)||$(F)===f}function H(F){return $(F)===d}function q(F){return $(F)===c}function me(F){return $(F)===u}function de(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function se(F){return $(F)===p}function le(F){return $(F)===n}function ue(F){return $(F)===E}function pe(F){return $(F)===y}function he(F){return $(F)===r}function ye(F){return $(F)===o}function Ee(F){return $(F)===a}function V(F){return $(F)===m}Ne.AsyncMode=_,Ne.ConcurrentMode=M,Ne.ContextConsumer=W,Ne.ContextProvider=G,Ne.Element=Q,Ne.ForwardRef=we,Ne.Fragment=Oe,Ne.Lazy=Ke,Ne.Memo=X,Ne.Portal=xt,Ne.Profiler=dn,Ne.StrictMode=Pt,Ne.Suspense=lt,Ne.isAsyncMode=pn,Ne.isConcurrentMode=H,Ne.isContextConsumer=q,Ne.isContextProvider=me,Ne.isElement=de,Ne.isForwardRef=se,Ne.isFragment=le,Ne.isLazy=ue,Ne.isMemo=pe,Ne.isPortal=he,Ne.isProfiler=ye,Ne.isStrictMode=Ee,Ne.isSuspense=V,Ne.isValidElementType=P,Ne.typeOf=$}()),Ne}process.env.NODE_ENV==="production"?Nf.exports=PD():Nf.exports=RD();var DD=Nf.exports,Xy=DD,$D={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ID={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qy={};Qy[Xy.ForwardRef]=$D;Qy[Xy.Memo]=ID;var MD=!0;function e0(e,t,r){var n="";return r.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(n+=a+" ")}),n}var kd=function(t,r,n){var a=t.key+"-"+r.name;(n===!1||MD===!1)&&t.registered[a]===void 0&&(t.registered[a]=r.styles)},t0=function(t,r,n){kd(t,r,n);var a=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function FD(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ND={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},LD=!1,kD=/[A-Z]|^ms/g,jD=/_EMO_([^_]+?)_([^]*?)_EMO_/g,r0=function(t){return t.charCodeAt(1)===45},Xg=function(t){return t!=null&&typeof t!="boolean"},rf=Zy(function(e){return r0(e)?e:e.replace(kD,"-$&").toLowerCase()}),Qg=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(jD,function(n,a,o){return Vr={name:a,styles:o,next:Vr},a})}return ND[t]!==1&&!r0(t)&&typeof r=="number"&&r!==0?r+"px":r},WD="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function yo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Vr={name:a.name,styles:a.styles,next:Vr},a.name;var o=r;if(o.styles!==void 0){var u=o.next;if(u!==void 0)for(;u!==void 0;)Vr={name:u.name,styles:u.styles,next:Vr},u=u.next;var c=o.styles+";";return c}return BD(e,t,r)}case"function":{if(e!==void 0){var f=Vr,d=r(e);return Vr=f,yo(e,t,d)}break}}var p=r;if(t==null)return p;var m=t[p];return m!==void 0?m:p}function BD(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=yo(e,t,r[a])+";";else for(var o in r){var u=r[o];if(typeof u!="object"){var c=u;t!=null&&t[c]!==void 0?n+=o+"{"+t[c]+"}":Xg(c)&&(n+=rf(o)+":"+Qg(o,c)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&LD)throw new Error(WD);if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var f=0;f<u.length;f++)Xg(u[f])&&(n+=rf(o)+":"+Qg(o,u[f])+";");else{var d=yo(e,t,u);switch(o){case"animation":case"animationName":{n+=rf(o)+":"+d+";";break}default:n+=o+"{"+d+"}"}}}}return n}var ev=/label:\s*([^\s;{]+)\s*(;|$)/g,Vr;function jd(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";Vr=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=yo(r,t,o);else{var u=o;a+=u[0]}for(var c=1;c<e.length;c++)if(a+=yo(r,t,e[c]),n){var f=o;a+=f[c]}ev.lastIndex=0;for(var d="",p;(p=ev.exec(a))!==null;)d+="-"+p[1];var m=FD(a)+d;return{name:m,styles:a,next:Vr}}var zD=function(t){return t()},HD=te.useInsertionEffect?te.useInsertionEffect:!1,n0=HD||zD,UD=!1,a0=te.createContext(typeof HTMLElement<"u"?xD({key:"css"}):null);a0.Provider;var i0=function(t){return Y.forwardRef(function(r,n){var a=Y.useContext(a0);return t(r,a,n)})},o0=te.createContext({}),Wd={}.hasOwnProperty,Lf="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",GD=function(t,r){var n={};for(var a in r)Wd.call(r,a)&&(n[a]=r[a]);return n[Lf]=t,n},qD=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return kd(r,n,a),n0(function(){return t0(r,n,a)}),null},YD=i0(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var a=e[Lf],o=[n],u="";typeof e.className=="string"?u=e0(t.registered,o,e.className):e.className!=null&&(u=e.className+" ");var c=jd(o,void 0,te.useContext(o0));u+=t.key+"-"+c.name;var f={};for(var d in e)Wd.call(e,d)&&d!=="css"&&d!==Lf&&!UD&&(f[d]=e[d]);return f.className=u,r&&(f.ref=r),te.createElement(te.Fragment,null,te.createElement(qD,{cache:t,serialized:c,isStringTag:typeof a=="string"}),te.createElement(a,f))}),KD=YD,tv=function(t,r){var n=arguments;if(r==null||!Wd.call(r,"css"))return te.createElement.apply(void 0,n);var a=n.length,o=new Array(a);o[0]=KD,o[1]=GD(t,r);for(var u=2;u<a;u++)o[u]=n[u];return te.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(tv||(tv={}));function VD(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return jd(t)}function ZD(){var e=VD.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var JD=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XD=Zy(function(e){return JD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),QD=!1,e$=XD,t$=function(t){return t!=="theme"},rv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?e$:t$},nv=function(t,r,n){var a;if(r){var o=r.shouldForwardProp;a=t.__emotion_forwardProp&&o?function(u){return t.__emotion_forwardProp(u)&&o(u)}:o}return typeof a!="function"&&n&&(a=t.__emotion_forwardProp),a},r$=function(t){var r=t.cache,n=t.serialized,a=t.isStringTag;return kd(r,n,a),n0(function(){return t0(r,n,a)}),null},n$=function e(t,r){var n=t.__emotion_real===t,a=n&&t.__emotion_base||t,o,u;r!==void 0&&(o=r.label,u=r.target);var c=nv(t,r,n),f=c||rv(a),d=!f("as");return function(){var p=arguments,m=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&m.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)m.push.apply(m,p);else{var g=p[0];m.push(g[0]);for(var y=p.length,E=1;E<y;E++)m.push(p[E],g[E])}var S=i0(function(T,C,A){var P=d&&T.as||a,$="",_=[],M=T;if(T.theme==null){M={};for(var W in T)M[W]=T[W];M.theme=te.useContext(o0)}typeof T.className=="string"?$=e0(C.registered,_,T.className):T.className!=null&&($=T.className+" ");var G=jd(m.concat(_),C.registered,M);$+=C.key+"-"+G.name,u!==void 0&&($+=" "+u);var Q=d&&c===void 0?rv(P):f,we={};for(var Oe in T)d&&Oe==="as"||Q(Oe)&&(we[Oe]=T[Oe]);return we.className=$,A&&(we.ref=A),te.createElement(te.Fragment,null,te.createElement(r$,{cache:C,serialized:G,isStringTag:typeof P=="string"}),te.createElement(P,we))});return S.displayName=o!==void 0?o:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=a,S.__emotion_styles=m,S.__emotion_forwardProp=c,Object.defineProperty(S,"toString",{value:function(){return u===void 0&&QD?"NO_COMPONENT_SELECTOR":"."+u}}),S.withComponent=function(T,C){var A=e(T,Dn({},r,C,{shouldForwardProp:nv(S,C,!0)}));return A.apply(void 0,m)},S}},a$=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],fu=n$.bind(null);a$.forEach(function(e){fu[e]=fu(e)});var kf=function(e,t){return kf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},kf(e,t)};function zu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kf(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function jf(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wf(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,o=[],u;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(c){u={error:c}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(u)throw u.error}}return o}function Bf(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function s0(...e){return t=>e.forEach(r=>function(n,a){typeof n=="function"?n(a):n!=null&&(n.current=a)}(r,t))}function u0(...e){return te.useCallback(s0(...e),e)}const c0=te.forwardRef((e,t)=>{const{children:r,...n}=e;return te.Children.toArray(r).some(av)?te.createElement(te.Fragment,null,te.Children.map(r,a=>av(a)?te.createElement(zf,Dn({},n,{ref:t}),a.props.children):a)):te.createElement(zf,Dn({},n,{ref:t}),r)});c0.displayName="Slot";const zf=te.forwardRef((e,t)=>{const{children:r,...n}=e;return te.isValidElement(r)?te.cloneElement(r,{...o$(n,r.props),ref:s0(t,r.ref)}):te.Children.count(r)>1?te.Children.only(null):null});zf.displayName="SlotClone";const i$=({children:e})=>te.createElement(te.Fragment,null,e);function av(e){return te.isValidElement(e)&&e.type===i$}function o$(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?r[n]=(...u)=>{o==null||o(...u),a==null||a(...u)}:n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}const l0=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>({...e,[t]:te.forwardRef((r,n)=>{const{asChild:a,...o}=r,u=a?c0:t;return te.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),te.createElement(u,Dn({},o,{ref:n}))})}),{});function s$(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}function f0(e,t=[]){let r=[];const n=()=>{const a=r.map(o=>te.createContext(o));return function(o){const u=(o==null?void 0:o[e])||a;return te.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return n.scopeName=e,[function(a,o){const u=te.createContext(o),c=r.length;function f(d){const{scope:p,children:m,...g}=d,y=(p==null?void 0:p[e][c])||u,E=te.useMemo(()=>g,Object.values(g));return te.createElement(y.Provider,{value:E},m)}return r=[...r,o],f.displayName=a+"Provider",[f,function(d,p){const m=(p==null?void 0:p[e][c])||u,g=te.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}]},u$(n,...t)]}function u$(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){const o=n.reduce((u,{useScope:c,scopeName:f})=>({...u,...c(a)[`__scope${f}`]}),{});return te.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}const[d0,p0]=f0("Popper"),[y9,c$]=d0("Popper"),l$=te.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,o=c$("PopperAnchor",r),u=te.useRef(null),c=u0(t,u);return te.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||u.current)}),n?null:te.createElement(l0.div,Dn({},a,{ref:c}))});d0("PopperContent");const f$=l$,[d$,b9]=f0("Popover",[p0]),p$=p0(),[S9,h$]=d$("Popover"),m$=te.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=h$("PopoverTrigger",r),o=p$(r),u=u0(t,a.triggerRef),c=te.createElement(l0.button,Dn({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":g$(a.open)},n,{ref:u,onClick:s$(e.onClick,a.onOpenToggle)}));return a.hasCustomAnchor?c:te.createElement(f$,Dn({asChild:!0},o),c)});function g$(e){return e?"open":"closed"}const v$=m$;var y$={},Hu={},Bd={},nf={},Hf={exports:{}},Ns={exports:{}},Le={};/** @license React v16.13.1
|
|
28
|
+
* react-is.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var iv;function b$(){if(iv)return Le;iv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function P(_){if(typeof _=="object"&&_!==null){var M=_.$$typeof;switch(M){case t:switch(_=_.type,_){case f:case d:case n:case o:case a:case m:return _;default:switch(_=_&&_.$$typeof,_){case c:case p:case E:case y:case u:return _;default:return M}}case r:return M}}}function $(_){return P(_)===d}return Le.AsyncMode=f,Le.ConcurrentMode=d,Le.ContextConsumer=c,Le.ContextProvider=u,Le.Element=t,Le.ForwardRef=p,Le.Fragment=n,Le.Lazy=E,Le.Memo=y,Le.Portal=r,Le.Profiler=o,Le.StrictMode=a,Le.Suspense=m,Le.isAsyncMode=function(_){return $(_)||P(_)===f},Le.isConcurrentMode=$,Le.isContextConsumer=function(_){return P(_)===c},Le.isContextProvider=function(_){return P(_)===u},Le.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Le.isForwardRef=function(_){return P(_)===p},Le.isFragment=function(_){return P(_)===n},Le.isLazy=function(_){return P(_)===E},Le.isMemo=function(_){return P(_)===y},Le.isPortal=function(_){return P(_)===r},Le.isProfiler=function(_){return P(_)===o},Le.isStrictMode=function(_){return P(_)===a},Le.isSuspense=function(_){return P(_)===m},Le.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===d||_===o||_===a||_===m||_===g||typeof _=="object"&&_!==null&&(_.$$typeof===E||_.$$typeof===y||_.$$typeof===u||_.$$typeof===c||_.$$typeof===p||_.$$typeof===T||_.$$typeof===C||_.$$typeof===A||_.$$typeof===S)},Le.typeOf=P,Le}var ke={};/** @license React v16.13.1
|
|
35
|
+
* react-is.development.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var ov;function S$(){return ov||(ov=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function P(F){return typeof F=="string"||typeof F=="function"||F===n||F===d||F===o||F===a||F===m||F===g||typeof F=="object"&&F!==null&&(F.$$typeof===E||F.$$typeof===y||F.$$typeof===u||F.$$typeof===c||F.$$typeof===p||F.$$typeof===T||F.$$typeof===C||F.$$typeof===A||F.$$typeof===S)}function $(F){if(typeof F=="object"&&F!==null){var at=F.$$typeof;switch(at){case t:var Ze=F.type;switch(Ze){case f:case d:case n:case o:case a:case m:return Ze;default:var $r=Ze&&Ze.$$typeof;switch($r){case c:case p:case E:case y:case u:return $r;default:return at}}case r:return at}}}var _=f,M=d,W=c,G=u,Q=t,we=p,Oe=n,Ke=E,X=y,xt=r,dn=o,Pt=a,lt=m,St=!1;function pn(F){return St||(St=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),H(F)||$(F)===f}function H(F){return $(F)===d}function q(F){return $(F)===c}function me(F){return $(F)===u}function de(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function se(F){return $(F)===p}function le(F){return $(F)===n}function ue(F){return $(F)===E}function pe(F){return $(F)===y}function he(F){return $(F)===r}function ye(F){return $(F)===o}function Ee(F){return $(F)===a}function V(F){return $(F)===m}ke.AsyncMode=_,ke.ConcurrentMode=M,ke.ContextConsumer=W,ke.ContextProvider=G,ke.Element=Q,ke.ForwardRef=we,ke.Fragment=Oe,ke.Lazy=Ke,ke.Memo=X,ke.Portal=xt,ke.Profiler=dn,ke.StrictMode=Pt,ke.Suspense=lt,ke.isAsyncMode=pn,ke.isConcurrentMode=H,ke.isContextConsumer=q,ke.isContextProvider=me,ke.isElement=de,ke.isForwardRef=se,ke.isFragment=le,ke.isLazy=ue,ke.isMemo=pe,ke.isPortal=he,ke.isProfiler=ye,ke.isStrictMode=Ee,ke.isSuspense=V,ke.isValidElementType=P,ke.typeOf=$}()),ke}var sv;function h0(){return sv||(sv=1,process.env.NODE_ENV==="production"?Ns.exports=b$():Ns.exports=S$()),Ns.exports}/*
|
|
42
|
+
object-assign
|
|
43
|
+
(c) Sindre Sorhus
|
|
44
|
+
@license MIT
|
|
45
|
+
*/var af,uv;function w$(){if(uv)return af;uv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var f=Object.getOwnPropertyNames(u).map(function(p){return u[p]});if(f.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(p){d[p]=p}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return af=a()?Object.assign:function(o,u){for(var c,f=n(o),d,p=1;p<arguments.length;p++){c=Object(arguments[p]);for(var m in c)t.call(c,m)&&(f[m]=c[m]);if(e){d=e(c);for(var g=0;g<d.length;g++)r.call(c,d[g])&&(f[d[g]]=c[d[g]])}}return f},af}var of,cv;function zd(){if(cv)return of;cv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return of=e,of}var sf,lv;function m0(){return lv||(lv=1,sf=Function.call.bind(Object.prototype.hasOwnProperty)),sf}var uf,fv;function E$(){if(fv)return uf;fv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zd(),r={},n=m0();e=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function a(o,u,c,f,d){if(process.env.NODE_ENV!=="production"){for(var p in o)if(n(o,p)){var m;try{if(typeof o[p]!="function"){var g=Error((f||"React class")+": "+c+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}m=o[p](u,p,f,c,null,t)}catch(E){m=E}if(m&&!(m instanceof Error)&&e((f||"React class")+": type specification of "+c+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in r)){r[m.message]=!0;var y=d?d():"";e("Failed "+c+" type: "+m.message+(y??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},uf=a,uf}var cf,dv;function _$(){if(dv)return cf;dv=1;var e=h0(),t=w$(),r=zd(),n=m0(),a=E$(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var f="Warning: "+c;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function u(){return null}return cf=function(c,f){var d=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function m(H){var q=H&&(d&&H[d]||H[p]);if(typeof q=="function")return q}var g="<<anonymous>>",y={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:A(),arrayOf:P,element:$(),elementType:_(),instanceOf:M,node:we(),objectOf:G,oneOf:W,oneOfType:Q,shape:Ke,exact:X};function E(H,q){return H===q?H!==0||1/H===1/q:H!==H&&q!==q}function S(H,q){this.message=H,this.data=q&&typeof q=="object"?q:{},this.stack=""}S.prototype=Error.prototype;function T(H){if(process.env.NODE_ENV!=="production")var q={},me=0;function de(le,ue,pe,he,ye,Ee,V){if(he=he||g,Ee=Ee||pe,V!==r){if(f){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var at=he+":"+pe;!q[at]&&me<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Ee+"` prop on `"+he+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),q[at]=!0,me++)}}return ue[pe]==null?le?ue[pe]===null?new S("The "+ye+" `"+Ee+"` is marked as required "+("in `"+he+"`, but its value is `null`.")):new S("The "+ye+" `"+Ee+"` is marked as required in "+("`"+he+"`, but its value is `undefined`.")):null:H(ue,pe,he,ye,Ee)}var se=de.bind(null,!1);return se.isRequired=de.bind(null,!0),se}function C(H){function q(me,de,se,le,ue,pe){var he=me[de],ye=Pt(he);if(ye!==H){var Ee=lt(he);return new S("Invalid "+le+" `"+ue+"` of type "+("`"+Ee+"` supplied to `"+se+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return T(q)}function A(){return T(u)}function P(H){function q(me,de,se,le,ue){if(typeof H!="function")return new S("Property `"+ue+"` of component `"+se+"` has invalid PropType notation inside arrayOf.");var pe=me[de];if(!Array.isArray(pe)){var he=Pt(pe);return new S("Invalid "+le+" `"+ue+"` of type "+("`"+he+"` supplied to `"+se+"`, expected an array."))}for(var ye=0;ye<pe.length;ye++){var Ee=H(pe,ye,se,le,ue+"["+ye+"]",r);if(Ee instanceof Error)return Ee}return null}return T(q)}function $(){function H(q,me,de,se,le){var ue=q[me];if(!c(ue)){var pe=Pt(ue);return new S("Invalid "+se+" `"+le+"` of type "+("`"+pe+"` supplied to `"+de+"`, expected a single ReactElement."))}return null}return T(H)}function _(){function H(q,me,de,se,le){var ue=q[me];if(!e.isValidElementType(ue)){var pe=Pt(ue);return new S("Invalid "+se+" `"+le+"` of type "+("`"+pe+"` supplied to `"+de+"`, expected a single ReactElement type."))}return null}return T(H)}function M(H){function q(me,de,se,le,ue){if(!(me[de]instanceof H)){var pe=H.name||g,he=pn(me[de]);return new S("Invalid "+le+" `"+ue+"` of type "+("`"+he+"` supplied to `"+se+"`, expected ")+("instance of `"+pe+"`."))}return null}return T(q)}function W(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),u;function q(me,de,se,le,ue){for(var pe=me[de],he=0;he<H.length;he++)if(E(pe,H[he]))return null;var ye=JSON.stringify(H,function(V,F){var at=lt(F);return at==="symbol"?String(F):F});return new S("Invalid "+le+" `"+ue+"` of value `"+String(pe)+"` "+("supplied to `"+se+"`, expected one of "+ye+"."))}return T(q)}function G(H){function q(me,de,se,le,ue){if(typeof H!="function")return new S("Property `"+ue+"` of component `"+se+"` has invalid PropType notation inside objectOf.");var pe=me[de],he=Pt(pe);if(he!=="object")return new S("Invalid "+le+" `"+ue+"` of type "+("`"+he+"` supplied to `"+se+"`, expected an object."));for(var ye in pe)if(n(pe,ye)){var Ee=H(pe,ye,se,le,ue+"."+ye,r);if(Ee instanceof Error)return Ee}return null}return T(q)}function Q(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var q=0;q<H.length;q++){var me=H[q];if(typeof me!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+St(me)+" at index "+q+"."),u}function de(se,le,ue,pe,he){for(var ye=[],Ee=0;Ee<H.length;Ee++){var V=H[Ee],F=V(se,le,ue,pe,he,r);if(F==null)return null;F.data&&n(F.data,"expectedType")&&ye.push(F.data.expectedType)}var at=ye.length>0?", expected one of type ["+ye.join(", ")+"]":"";return new S("Invalid "+pe+" `"+he+"` supplied to "+("`"+ue+"`"+at+"."))}return T(de)}function we(){function H(q,me,de,se,le){return xt(q[me])?null:new S("Invalid "+se+" `"+le+"` supplied to "+("`"+de+"`, expected a ReactNode."))}return T(H)}function Oe(H,q,me,de,se){return new S((H||"React class")+": "+q+" type `"+me+"."+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+se+"`.")}function Ke(H){function q(me,de,se,le,ue){var pe=me[de],he=Pt(pe);if(he!=="object")return new S("Invalid "+le+" `"+ue+"` of type `"+he+"` "+("supplied to `"+se+"`, expected `object`."));for(var ye in H){var Ee=H[ye];if(typeof Ee!="function")return Oe(se,le,ue,ye,lt(Ee));var V=Ee(pe,ye,se,le,ue+"."+ye,r);if(V)return V}return null}return T(q)}function X(H){function q(me,de,se,le,ue){var pe=me[de],he=Pt(pe);if(he!=="object")return new S("Invalid "+le+" `"+ue+"` of type `"+he+"` "+("supplied to `"+se+"`, expected `object`."));var ye=t({},me[de],H);for(var Ee in ye){var V=H[Ee];if(n(H,Ee)&&typeof V!="function")return Oe(se,le,ue,Ee,lt(V));if(!V)return new S("Invalid "+le+" `"+ue+"` key `"+Ee+"` supplied to `"+se+"`.\nBad object: "+JSON.stringify(me[de],null," ")+`
|
|
46
|
+
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var F=V(pe,Ee,se,le,ue+"."+Ee,r);if(F)return F}return null}return T(q)}function xt(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every(xt);if(H===null||c(H))return!0;var q=m(H);if(q){var me=q.call(H),de;if(q!==H.entries){for(;!(de=me.next()).done;)if(!xt(de.value))return!1}else for(;!(de=me.next()).done;){var se=de.value;if(se&&!xt(se[1]))return!1}}else return!1;return!0;default:return!1}}function dn(H,q){return H==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function Pt(H){var q=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":dn(q,H)?"symbol":q}function lt(H){if(typeof H>"u"||H===null)return""+H;var q=Pt(H);if(q==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return q}function St(H){var q=lt(H);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function pn(H){return!H.constructor||!H.constructor.name?g:H.constructor.name}return y.checkPropTypes=a,y.resetWarningCache=a.resetWarningCache,y.PropTypes=y,y},cf}var lf,pv;function T$(){if(pv)return lf;pv=1;var e=zd();function t(){}function r(){}return r.resetWarningCache=t,lf=function(){function n(u,c,f,d,p,m){if(m!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function a(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},lf}if(process.env.NODE_ENV!=="production"){var O$=h0(),C$=!0;Hf.exports=_$()(O$.isElement,C$)}else Hf.exports=T$()();var g0=Hf.exports;const Xa=Po(g0);var hv;function A$(){return hv||(hv=1,function(e){(function(t,r){r(e,Y,g0)})(Br,function(t,r,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=E;var a=u(r),o=u(n);function u(A){return A&&A.__esModule?A:{default:A}}var c=Object.assign||function(A){for(var P=1;P<arguments.length;P++){var $=arguments[P];for(var _ in $)Object.prototype.hasOwnProperty.call($,_)&&(A[_]=$[_])}return A};function f(A,P){var $={};for(var _ in A)P.indexOf(_)>=0||Object.prototype.hasOwnProperty.call(A,_)&&($[_]=A[_]);return $}function d(A,P){if(!(A instanceof P))throw new TypeError("Cannot call a class as a function")}var p=function(){function A(P,$){for(var _=0;_<$.length;_++){var M=$[_];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(P,M.key,M)}}return function(P,$,_){return $&&A(P.prototype,$),_&&A(P,_),P}}();function m(A,P){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:A}function g(A,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);A.prototype=Object.create(P&&P.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(A,P):A.__proto__=P)}var y=!1;function E(A){y=A}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){E(!0)}}))}catch{}function S(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return y?A:A.capture}function T(A){if("touches"in A){var P=A.touches[0],$=P.pageX,_=P.pageY;return{x:$,y:_}}var M=A.screenX,W=A.screenY;return{x:M,y:W}}var C=function(A){g(P,A);function P(){var $;d(this,P);for(var _=arguments.length,M=Array(_),W=0;W<_;W++)M[W]=arguments[W];var G=m(this,($=P.__proto__||Object.getPrototypeOf(P)).call.apply($,[this].concat(M)));return G._handleSwipeStart=G._handleSwipeStart.bind(G),G._handleSwipeMove=G._handleSwipeMove.bind(G),G._handleSwipeEnd=G._handleSwipeEnd.bind(G),G._onMouseDown=G._onMouseDown.bind(G),G._onMouseMove=G._onMouseMove.bind(G),G._onMouseUp=G._onMouseUp.bind(G),G._setSwiperRef=G._setSwiperRef.bind(G),G}return p(P,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,S({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,S({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(_){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(_))}},{key:"_onMouseMove",value:function(_){this.mouseDown&&this._handleSwipeMove(_)}},{key:"_onMouseUp",value:function(_){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(_)}},{key:"_handleSwipeStart",value:function(_){var M=T(_),W=M.x,G=M.y;this.moveStart={x:W,y:G},this.props.onSwipeStart(_)}},{key:"_handleSwipeMove",value:function(_){if(this.moveStart){var M=T(_),W=M.x,G=M.y,Q=W-this.moveStart.x,we=G-this.moveStart.y;this.moving=!0;var Oe=this.props.onSwipeMove({x:Q,y:we},_);Oe&&_.cancelable&&_.preventDefault(),this.movePosition={deltaX:Q,deltaY:we}}}},{key:"_handleSwipeEnd",value:function(_){this.props.onSwipeEnd(_);var M=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-M?this.props.onSwipeLeft(1,_):this.movePosition.deltaX>M&&this.props.onSwipeRight(1,_),this.movePosition.deltaY<-M?this.props.onSwipeUp(1,_):this.movePosition.deltaY>M&&this.props.onSwipeDown(1,_)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(_){this.swiper=_,this.props.innerRef(_)}},{key:"render",value:function(){var _=this.props;_.tagName;var M=_.className,W=_.style,G=_.children;_.allowMouseEvents,_.onSwipeUp,_.onSwipeDown,_.onSwipeLeft,_.onSwipeRight,_.onSwipeStart,_.onSwipeMove,_.onSwipeEnd,_.innerRef,_.tolerance;var Q=f(_,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return a.default.createElement(this.props.tagName,c({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:M,style:W},Q),G)}}]),P}(r.Component);C.displayName="ReactSwipe",C.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.default.number.isRequired},C.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=C})}(nf)),nf}(function(e){(function(t,r){r(e,A$())})(Br,function(t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=a(r);function a(o){return o&&o.__esModule?o:{default:o}}t.default=n.default})})(Bd);var Io={};Object.defineProperty(Io,"__esModule",{value:!0});Io.default=void 0;var Gn=x$(jy);function x$(e){return e&&e.__esModule?e:{default:e}}function P$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R$={ROOT:function(t){return(0,Gn.default)(P$({"carousel-root":!0},t||"",!!t))},CAROUSEL:function(t){return(0,Gn.default)({carousel:!0,"carousel-slider":t})},WRAPPER:function(t,r){return(0,Gn.default)({"thumbs-wrapper":!t,"slider-wrapper":t,"axis-horizontal":r==="horizontal","axis-vertical":r!=="horizontal"})},SLIDER:function(t,r){return(0,Gn.default)({thumbs:!t,slider:t,animated:!r})},ITEM:function(t,r,n){return(0,Gn.default)({thumb:!t,slide:t,selected:r,previous:n})},ARROW_PREV:function(t){return(0,Gn.default)({"control-arrow control-prev":!0,"control-disabled":t})},ARROW_NEXT:function(t){return(0,Gn.default)({"control-arrow control-next":!0,"control-disabled":t})},DOT:function(t){return(0,Gn.default)({dot:!0,selected:t})}};Io.default=R$;var Mo={},Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});Uu.outerWidth=void 0;var D$=function(t){var r=t.offsetWidth,n=getComputedStyle(t);return r+=parseInt(n.marginLeft)+parseInt(n.marginRight),r};Uu.outerWidth=D$;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.default=void 0;var $$=function(t,r,n){var a=t===0?t:t+r,o=n==="horizontal"?[a,0,0]:[0,a,0],u="translate3d",c="("+o.join(",")+")";return u+c};bi.default=$$;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.default=void 0;var I$=function(){return window};Fo.default=I$;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.default=void 0;var kr=N$(Y),Ea=Gu(Io),M$=Uu,mv=Gu(bi),F$=Gu(Bd),Ls=Gu(Fo);function Gu(e){return e&&e.__esModule?e:{default:e}}function v0(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return v0=function(){return e},e}function N$(e){if(e&&e.__esModule)return e;if(e===null||io(e)!=="object"&&typeof e!="function")return{default:e};var t=v0();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}function io(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?io=function(r){return typeof r}:io=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},io(e)}function Uf(){return Uf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uf.apply(this,arguments)}function L$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function j$(e,t,r){return t&&k$(e.prototype,t),e}function W$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gf(e,t)}function Gf(e,t){return Gf=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Gf(e,t)}function B$(e){var t=H$();return function(){var n=du(e),a;if(t){var o=du(this).constructor;a=Reflect.construct(n,arguments,o)}else a=n.apply(this,arguments);return z$(this,a)}}function z$(e,t){return t&&(io(t)==="object"||typeof t=="function")?t:Vt(e)}function Vt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H$(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function du(e){return du=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},du(e)}function zt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var U$=function(t){return t.hasOwnProperty("key")},Hd=function(e){W$(r,e);var t=B$(r);function r(n){var a;return L$(this,r),a=t.call(this,n),zt(Vt(a),"itemsWrapperRef",void 0),zt(Vt(a),"itemsListRef",void 0),zt(Vt(a),"thumbsRef",void 0),zt(Vt(a),"setItemsWrapperRef",function(o){a.itemsWrapperRef=o}),zt(Vt(a),"setItemsListRef",function(o){a.itemsListRef=o}),zt(Vt(a),"setThumbsRef",function(o,u){a.thumbsRef||(a.thumbsRef=[]),a.thumbsRef[u]=o}),zt(Vt(a),"updateSizes",function(){if(!(!a.props.children||!a.itemsWrapperRef||!a.thumbsRef)){var o=kr.Children.count(a.props.children),u=a.itemsWrapperRef.clientWidth,c=a.props.thumbWidth?a.props.thumbWidth:(0,M$.outerWidth)(a.thumbsRef[0]),f=Math.floor(u/c),d=f<o,p=d?o-f:0;a.setState(function(m,g){return{itemSize:c,visibleItems:f,firstItem:d?a.getFirstItem(g.selectedItem):0,lastPosition:p,showArrows:d}})}}),zt(Vt(a),"handleClickItem",function(o,u,c){if(!U$(c)||c.key==="Enter"){var f=a.props.onSelectItem;typeof f=="function"&&f(o,u)}}),zt(Vt(a),"onSwipeStart",function(){a.setState({swiping:!0})}),zt(Vt(a),"onSwipeEnd",function(){a.setState({swiping:!1})}),zt(Vt(a),"onSwipeMove",function(o){var u=o.x;if(!a.state.itemSize||!a.itemsWrapperRef||!a.state.visibleItems)return!1;var c=0,f=kr.Children.count(a.props.children),d=-(a.state.firstItem*100)/a.state.visibleItems,p=Math.max(f-a.state.visibleItems,0),m=-p*100/a.state.visibleItems;d===c&&u>0&&(u=0),d===m&&u<0&&(u=0);var g=a.itemsWrapperRef.clientWidth,y=d+100/(g/u);return a.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(E){a.itemsListRef.style[E]=(0,mv.default)(y,"%",a.props.axis)}),!0}),zt(Vt(a),"slideRight",function(o){a.moveTo(a.state.firstItem-(typeof o=="number"?o:1))}),zt(Vt(a),"slideLeft",function(o){a.moveTo(a.state.firstItem+(typeof o=="number"?o:1))}),zt(Vt(a),"moveTo",function(o){o=o<0?0:o,o=o>=a.state.lastPosition?a.state.lastPosition:o,a.setState({firstItem:o})}),a.state={selectedItem:n.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},a}return j$(r,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(a){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==a.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,Ls.default)().addEventListener("resize",this.updateSizes),(0,Ls.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,Ls.default)().removeEventListener("resize",this.updateSizes),(0,Ls.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(a){var o=a;return a>=this.state.lastPosition&&(o=this.state.lastPosition),a<this.state.firstItem+this.state.visibleItems&&(o=this.state.firstItem),a<this.state.firstItem&&(o=a),o}},{key:"renderItems",value:function(){var a=this;return this.props.children.map(function(o,u){var c=Ea.default.ITEM(!1,u===a.state.selectedItem),f={key:u,ref:function(p){return a.setThumbsRef(p,u)},className:c,onClick:a.handleClickItem.bind(a,u,a.props.children[u]),onKeyDown:a.handleClickItem.bind(a,u,a.props.children[u]),"aria-label":"".concat(a.props.labels.item," ").concat(u+1),style:{width:a.props.thumbWidth}};return kr.default.createElement("li",Uf({},f,{role:"button",tabIndex:0}),o)})}},{key:"render",value:function(){var a=this;if(!this.props.children)return null;var o=kr.Children.count(this.props.children)>1,u=this.state.showArrows&&this.state.firstItem>0,c=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,f={},d=-this.state.firstItem*(this.state.itemSize||0),p=(0,mv.default)(d,"px",this.props.axis),m=this.props.transitionTime+"ms";return f={WebkitTransform:p,MozTransform:p,MsTransform:p,OTransform:p,transform:p,msTransform:p,WebkitTransitionDuration:m,MozTransitionDuration:m,MsTransitionDuration:m,OTransitionDuration:m,transitionDuration:m,msTransitionDuration:m},kr.default.createElement("div",{className:Ea.default.CAROUSEL(!1)},kr.default.createElement("div",{className:Ea.default.WRAPPER(!1),ref:this.setItemsWrapperRef},kr.default.createElement("button",{type:"button",className:Ea.default.ARROW_PREV(!u),onClick:function(){return a.slideRight()},"aria-label":this.props.labels.leftArrow}),o?kr.default.createElement(F$.default,{tagName:"ul",className:Ea.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:f,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):kr.default.createElement("ul",{className:Ea.default.SLIDER(!1,this.state.swiping),ref:function(y){return a.setItemsListRef(y)},style:f},this.renderItems()),kr.default.createElement("button",{type:"button",className:Ea.default.ARROW_NEXT(!c),onClick:function(){return a.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),r}(kr.Component);Mo.default=Hd;zt(Hd,"displayName","Thumbs");zt(Hd,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350});var qu={};Object.defineProperty(qu,"__esModule",{value:!0});qu.default=void 0;var G$=function(){return document};qu.default=G$;var dr={};Object.defineProperty(dr,"__esModule",{value:!0});dr.setPosition=dr.getPosition=dr.isKeyboardEvent=dr.defaultStatusFormatter=dr.noop=void 0;var q$=Y,Y$=K$(bi);function K$(e){return e&&e.__esModule?e:{default:e}}var V$=function(){};dr.noop=V$;var Z$=function(t,r){return"".concat(t," of ").concat(r)};dr.defaultStatusFormatter=Z$;var J$=function(t){return t?t.hasOwnProperty("key"):!1};dr.isKeyboardEvent=J$;var X$=function(t,r){if(r.infiniteLoop&&++t,t===0)return 0;var n=q$.Children.count(r.children);if(r.centerMode&&r.axis==="horizontal"){var a=-t*r.centerSlidePercentage,o=n-1;return t&&(t!==o||r.infiniteLoop)?a+=(100-r.centerSlidePercentage)/2:t===o&&(a+=100-r.centerSlidePercentage),a}return-t*100};dr.getPosition=X$;var Q$=function(t,r){var n={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(a){n[a]=(0,Y$.default)(t,"%",r)}),n};dr.setPosition=Q$;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.fadeAnimationHandler=Jr.slideStopSwipingHandler=Jr.slideSwipeAnimationHandler=Jr.slideAnimationHandler=void 0;var y0=Y,eI=tI(bi),Xr=dr;function tI(e){return e&&e.__esModule?e:{default:e}}function gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gv(Object(r),!0).forEach(function(n){rI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nI=function(t,r){var n={},a=r.selectedItem,o=a,u=y0.Children.count(t.children)-1,c=t.infiniteLoop&&(a<0||a>u);if(c)return o<0?t.centerMode&&t.centerSlidePercentage&&t.axis==="horizontal"?n.itemListStyle=(0,Xr.setPosition)(-(u+2)*t.centerSlidePercentage-(100-t.centerSlidePercentage)/2,t.axis):n.itemListStyle=(0,Xr.setPosition)(-(u+2)*100,t.axis):o>u&&(n.itemListStyle=(0,Xr.setPosition)(0,t.axis)),n;var f=(0,Xr.getPosition)(a,t),d=(0,eI.default)(f,"%",t.axis),p=t.transitionTime+"ms";return n.itemListStyle={WebkitTransform:d,msTransform:d,OTransform:d,transform:d},r.swiping||(n.itemListStyle=Ta(Ta({},n.itemListStyle),{},{WebkitTransitionDuration:p,MozTransitionDuration:p,OTransitionDuration:p,transitionDuration:p,msTransitionDuration:p})),n};Jr.slideAnimationHandler=nI;var aI=function(t,r,n,a){var o={},u=r.axis==="horizontal",c=y0.Children.count(r.children),f=0,d=(0,Xr.getPosition)(n.selectedItem,r),p=r.infiniteLoop?(0,Xr.getPosition)(c-1,r)-100:(0,Xr.getPosition)(c-1,r),m=u?t.x:t.y,g=m;d===f&&m>0&&(g=0),d===p&&m<0&&(g=0);var y=d+100/(n.itemSize/g),E=Math.abs(m)>r.swipeScrollTolerance;return r.infiniteLoop&&E&&(n.selectedItem===0&&y>-100?y-=c*100:n.selectedItem===c-1&&y<-c*100&&(y+=c*100)),(!r.preventMovementUntilSwipeScrollTolerance||E||n.swipeMovementStarted)&&(n.swipeMovementStarted||a({swipeMovementStarted:!0}),o.itemListStyle=(0,Xr.setPosition)(y,r.axis)),E&&!n.cancelClick&&a({cancelClick:!0}),o};Jr.slideSwipeAnimationHandler=aI;var iI=function(t,r){var n=(0,Xr.getPosition)(r.selectedItem,t),a=(0,Xr.setPosition)(n,t.axis);return{itemListStyle:a}};Jr.slideStopSwipingHandler=iI;var oI=function(t,r){var n=t.transitionTime+"ms",a="ease-in-out",o={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:a,msTransitionTimingFunction:a,MozTransitionTimingFunction:a,WebkitTransitionTimingFunction:a,OTransitionTimingFunction:a};return r.swiping||(o=Ta(Ta({},o),{},{WebkitTransitionDuration:n,MozTransitionDuration:n,OTransitionDuration:n,transitionDuration:n,msTransitionDuration:n})),{slideStyle:o,selectedStyle:Ta(Ta({},o),{},{opacity:1,position:"relative"}),prevStyle:Ta({},o)}};Jr.fadeAnimationHandler=oI;Object.defineProperty(Hu,"__esModule",{value:!0});Hu.default=void 0;var ze=cI(Y),sI=No(Bd),On=No(Io),uI=No(Mo),ks=No(qu),js=No(Fo),eo=dr,pu=Jr;function No(e){return e&&e.__esModule?e:{default:e}}function b0(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return b0=function(){return e},e}function cI(e){if(e&&e.__esModule)return e;if(e===null||oo(e)!=="object"&&typeof e!="function")return{default:e};var t=b0();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}function oo(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oo=function(r){return typeof r}:oo=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},oo(e)}function qf(){return qf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qf.apply(this,arguments)}function vv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vv(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dI(e,t,r){return t&&fI(e.prototype,t),e}function pI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yf(e,t)}function Yf(e,t){return Yf=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Yf(e,t)}function hI(e){var t=gI();return function(){var n=hu(e),a;if(t){var o=hu(this).constructor;a=Reflect.construct(n,arguments,o)}else a=n.apply(this,arguments);return mI(this,a)}}function mI(e,t){return t&&(oo(t)==="object"||typeof t=="function")?t:_e(e)}function _e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gI(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hu(e)}function Se(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ud=function(e){pI(r,e);var t=hI(r);function r(n){var a;lI(this,r),a=t.call(this,n),Se(_e(a),"thumbsRef",void 0),Se(_e(a),"carouselWrapperRef",void 0),Se(_e(a),"listRef",void 0),Se(_e(a),"itemsRef",void 0),Se(_e(a),"timer",void 0),Se(_e(a),"animationHandler",void 0),Se(_e(a),"setThumbsRef",function(u){a.thumbsRef=u}),Se(_e(a),"setCarouselWrapperRef",function(u){a.carouselWrapperRef=u}),Se(_e(a),"setListRef",function(u){a.listRef=u}),Se(_e(a),"setItemsRef",function(u,c){a.itemsRef||(a.itemsRef=[]),a.itemsRef[c]=u}),Se(_e(a),"autoPlay",function(){ze.Children.count(a.props.children)<=1||(a.clearAutoPlay(),a.props.autoPlay&&(a.timer=setTimeout(function(){a.increment()},a.props.interval)))}),Se(_e(a),"clearAutoPlay",function(){a.timer&&clearTimeout(a.timer)}),Se(_e(a),"resetAutoPlay",function(){a.clearAutoPlay(),a.autoPlay()}),Se(_e(a),"stopOnHover",function(){a.setState({isMouseEntered:!0},a.clearAutoPlay)}),Se(_e(a),"startOnLeave",function(){a.setState({isMouseEntered:!1},a.autoPlay)}),Se(_e(a),"isFocusWithinTheCarousel",function(){return a.carouselWrapperRef?!!((0,ks.default)().activeElement===a.carouselWrapperRef||a.carouselWrapperRef.contains((0,ks.default)().activeElement)):!1}),Se(_e(a),"navigateWithKeyboard",function(u){if(a.isFocusWithinTheCarousel()){var c=a.props.axis,f=c==="horizontal",d={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},p=f?d.ArrowRight:d.ArrowDown,m=f?d.ArrowLeft:d.ArrowUp;p===u.keyCode?a.increment():m===u.keyCode&&a.decrement()}}),Se(_e(a),"updateSizes",function(){if(!(!a.state.initialized||!a.itemsRef||a.itemsRef.length===0)){var u=a.props.axis==="horizontal",c=a.itemsRef[0];if(c){var f=u?c.clientWidth:c.clientHeight;a.setState({itemSize:f}),a.thumbsRef&&a.thumbsRef.updateSizes()}}}),Se(_e(a),"setMountState",function(){a.setState({hasMount:!0}),a.updateSizes()}),Se(_e(a),"handleClickItem",function(u,c){if(ze.Children.count(a.props.children)!==0){if(a.state.cancelClick){a.setState({cancelClick:!1});return}a.props.onClickItem(u,c),u!==a.state.selectedItem&&a.setState({selectedItem:u})}}),Se(_e(a),"handleOnChange",function(u,c){ze.Children.count(a.props.children)<=1||a.props.onChange(u,c)}),Se(_e(a),"handleClickThumb",function(u,c){a.props.onClickThumb(u,c),a.moveTo(u)}),Se(_e(a),"onSwipeStart",function(u){a.setState({swiping:!0}),a.props.onSwipeStart(u)}),Se(_e(a),"onSwipeEnd",function(u){a.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),a.props.onSwipeEnd(u),a.clearAutoPlay(),a.state.autoPlay&&a.autoPlay()}),Se(_e(a),"onSwipeMove",function(u,c){a.props.onSwipeMove(c);var f=a.props.swipeAnimationHandler(u,a.props,a.state,a.setState.bind(_e(a)));return a.setState(jr({},f)),!!Object.keys(f).length}),Se(_e(a),"decrement",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;a.moveTo(a.state.selectedItem-(typeof u=="number"?u:1))}),Se(_e(a),"increment",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;a.moveTo(a.state.selectedItem+(typeof u=="number"?u:1))}),Se(_e(a),"moveTo",function(u){if(typeof u=="number"){var c=ze.Children.count(a.props.children)-1;u<0&&(u=a.props.infiniteLoop?c:0),u>c&&(u=a.props.infiniteLoop?0:c),a.selectItem({selectedItem:u}),a.state.autoPlay&&a.state.isMouseEntered===!1&&a.resetAutoPlay()}}),Se(_e(a),"onClickNext",function(){a.increment(1)}),Se(_e(a),"onClickPrev",function(){a.decrement(1)}),Se(_e(a),"onSwipeForward",function(){a.increment(1),a.props.emulateTouch&&a.setState({cancelClick:!0})}),Se(_e(a),"onSwipeBackwards",function(){a.decrement(1),a.props.emulateTouch&&a.setState({cancelClick:!0})}),Se(_e(a),"changeItem",function(u){return function(c){(!(0,eo.isKeyboardEvent)(c)||c.key==="Enter")&&a.moveTo(u)}}),Se(_e(a),"selectItem",function(u){a.setState(jr({previousItem:a.state.selectedItem},u),function(){a.setState(a.animationHandler(a.props,a.state))}),a.handleOnChange(u.selectedItem,ze.Children.toArray(a.props.children)[u.selectedItem])}),Se(_e(a),"getInitialImage",function(){var u=a.props.selectedItem,c=a.itemsRef&&a.itemsRef[u],f=c&&c.getElementsByTagName("img")||[];return f[0]}),Se(_e(a),"getVariableItemHeight",function(u){var c=a.itemsRef&&a.itemsRef[u];if(a.state.hasMount&&c&&c.children.length){var f=c.children[0].getElementsByTagName("img")||[];if(f.length>0){var d=f[0];if(!d.complete){var p=function y(){a.forceUpdate(),d.removeEventListener("load",y)};d.addEventListener("load",p)}}var m=f[0]||c.children[0],g=m.clientHeight;return g>0?g:null}return null});var o={initialized:!1,previousItem:n.selectedItem,selectedItem:n.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:n.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return a.animationHandler=typeof n.animationHandler=="function"&&n.animationHandler||n.animationHandler==="fade"&&pu.fadeAnimationHandler||pu.slideAnimationHandler,a.state=jr(jr({},o),a.animationHandler(n,o)),a}return dI(r,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(a,o){!a.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!a.autoFocus&&this.props.autoFocus&&this.forceFocus(),o.swiping&&!this.state.swiping&&this.setState(jr({},this.props.stopSwipingHandler(this.props,this.state))),(a.selectedItem!==this.props.selectedItem||a.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),a.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var a=this;this.bindEvents(),this.state.autoPlay&&ze.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var o=a.getInitialImage();o&&!o.complete?o.addEventListener("load",a.setMountState):a.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var a=this.carouselWrapperRef;this.props.stopOnHover&&a&&(a.addEventListener("mouseenter",this.stopOnHover),a.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var a=this.carouselWrapperRef;this.props.stopOnHover&&a&&(a.removeEventListener("mouseenter",this.stopOnHover),a.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,js.default)().addEventListener("resize",this.updateSizes),(0,js.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,ks.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,js.default)().removeEventListener("resize",this.updateSizes),(0,js.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var a=this.getInitialImage();a&&a.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,ks.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var a;(a=this.carouselWrapperRef)===null||a===void 0||a.focus()}},{key:"renderItems",value:function(a){var o=this;return this.props.children?ze.Children.map(this.props.children,function(u,c){var f=c===o.state.selectedItem,d=c===o.state.previousItem,p=f&&o.state.selectedStyle||d&&o.state.prevStyle||o.state.slideStyle||{};o.props.centerMode&&o.props.axis==="horizontal"&&(p=jr(jr({},p),{},{minWidth:o.props.centerSlidePercentage+"%"})),o.state.swiping&&o.state.swipeMovementStarted&&(p=jr(jr({},p),{},{pointerEvents:"none"}));var m={ref:function(y){return o.setItemsRef(y,c)},key:"itemKey"+c+(a?"clone":""),className:On.default.ITEM(!0,c===o.state.selectedItem,c===o.state.previousItem),onClick:o.handleClickItem.bind(o,c,u),style:p};return ze.default.createElement("li",m,o.props.renderItem(u,{isSelected:c===o.state.selectedItem,isPrevious:c===o.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var a=this,o=this.props,u=o.showIndicators,c=o.labels,f=o.renderIndicator,d=o.children;return u?ze.default.createElement("ul",{className:"control-dots"},ze.Children.map(d,function(p,m){return f&&f(a.changeItem(m),m===a.state.selectedItem,m,c.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?ze.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,ze.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||ze.Children.count(this.props.children)===0?null:ze.default.createElement(uI.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var a=this;if(!this.props.children||ze.Children.count(this.props.children)===0)return null;var o=this.props.swipeable&&ze.Children.count(this.props.children)>1,u=this.props.axis==="horizontal",c=this.props.showArrows&&ze.Children.count(this.props.children)>1,f=c&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,d=c&&(this.state.selectedItem<ze.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,p=this.renderItems(!0),m=p.shift(),g=p.pop(),y={className:On.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},E={};if(u){if(y.onSwipeLeft=this.onSwipeForward,y.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var S=this.getVariableItemHeight(this.state.selectedItem);E.height=S||"auto"}}else y.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,y.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,y.style=jr(jr({},y.style),{},{height:this.state.itemSize}),E.height=this.state.itemSize;return ze.default.createElement("div",{"aria-label":this.props.ariaLabel,className:On.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},ze.default.createElement("div",{className:On.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,f,this.props.labels.leftArrow),ze.default.createElement("div",{className:On.default.WRAPPER(!0,this.props.axis),style:E},o?ze.default.createElement(sI.default,qf({tagName:"ul",innerRef:this.setListRef},y,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&g,this.renderItems(),this.props.infiniteLoop&&m):ze.default.createElement("ul",{className:On.default.SLIDER(!0,this.state.swiping),ref:function(C){return a.setListRef(C)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&g,this.renderItems(),this.props.infiniteLoop&&m)),this.props.renderArrowNext(this.onClickNext,d,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),r}(ze.default.Component);Hu.default=Ud;Se(Ud,"displayName","Carousel");Se(Ud,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:eo.noop,onClickThumb:eo.noop,onChange:eo.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(t,r,n){return ze.default.createElement("button",{type:"button","aria-label":n,className:On.default.ARROW_PREV(!r),onClick:t})},renderArrowNext:function(t,r,n){return ze.default.createElement("button",{type:"button","aria-label":n,className:On.default.ARROW_NEXT(!r),onClick:t})},renderIndicator:function(t,r,n,a){return ze.default.createElement("li",{className:On.default.DOT(r),onClick:t,onKeyDown:t,value:n,key:n,role:"button",tabIndex:0,"aria-label":"".concat(a," ").concat(n+1)})},renderItem:function(t){return t},renderThumbs:function(t){var r=ze.Children.map(t,function(n){var a=n;if(n.type!=="img"&&(a=ze.Children.toArray(n.props.children).find(function(o){return o.type==="img"})),!!a)return a});return r.filter(function(n){return n}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):r},statusFormatter:eo.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:pu.slideSwipeAnimationHandler,stopSwipingHandler:pu.slideStopSwipingHandler});var vI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return r.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return n.default}});var t=a(Hu),r=vI,n=a(Mo);function a(o){return o&&o.__esModule?o:{default:o}}})(y$);Y.createContext(void 0);fu(v$)`
|
|
47
|
+
&[data-state='open'] > * {
|
|
48
|
+
display: block !important;
|
|
49
|
+
}
|
|
50
|
+
`;var yI=Object.defineProperty,bI=(e,t,r)=>t in e?yI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ff=(e,t,r)=>(bI(e,typeof t!="symbol"?t+"":t,r),r);let SI=class{constructor(){ff(this,"current",this.detect()),ff(this,"handoffState","pending"),ff(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ni=new SI,pi=(e,t)=>{ni.isServer?Y.useEffect(e,t):Y.useLayoutEffect(e,t)};function wI(e){let t=Y.useRef(e);return pi(()=>{t.current=e},[e]),t}let Qn=function(e){let t=wI(e);return Y.useCallback((...r)=>t.current(...r),[t])};function EI(e,t,r){let[n,a]=Y.useState(r),o=e!==void 0,u=Y.useRef(o),c=Y.useRef(!1),f=Y.useRef(!1);return o&&!u.current&&!c.current?(c.current=!0,u.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&u.current&&!f.current&&(f.current=!0,u.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:n,Qn(d=>(o||a(d),t==null?void 0:t(d)))]}function _I(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function S0(){let e=[],t={addEventListener(r,n,a,o){return r.addEventListener(n,a,o),t.add(()=>r.removeEventListener(n,a,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return _I(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,a){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:a}),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=S0();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let a of e.splice(n,1))a()}},dispose(){for(let r of e.splice(0))r()}};return t}function TI(){let[e]=Y.useState(S0);return Y.useEffect(()=>()=>e.dispose(),[e]),e}function OI(){let e=typeof document>"u";return"useSyncExternalStore"in te?(t=>t.useSyncExternalStore)(te)(()=>()=>{},()=>!1,()=>!e):!1}function CI(){let e=OI(),[t,r]=te.useState(ni.isHandoffComplete);return t&&ni.isHandoffComplete===!1&&r(!1),te.useEffect(()=>{t!==!0&&r(!0)},[t]),te.useEffect(()=>ni.handoff(),[]),e?!1:t}var yv;let Gd=(yv=Y.useId)!=null?yv:function(){let e=CI(),[t,r]=Y.useState(e?()=>ni.nextId():null);return pi(()=>{t===null&&r(ni.nextId())},[t]),t!=null?""+t:void 0};function w0(e,t,...r){if(e in t){let a=t[e];return typeof a=="function"?a(...r):a}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,w0),n}function bv(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function AI(e,t){let[r,n]=Y.useState(()=>bv(e));return pi(()=>{n(bv(e))},[e.type,e.as]),pi(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let xI=Symbol();function qd(...e){let t=Y.useRef(e);Y.useEffect(()=>{t.current=e},[e]);let r=Qn(n=>{for(let a of t.current)a!=null&&(typeof a=="function"?a(n):a.current=n)});return e.every(n=>n==null||(n==null?void 0:n[xI]))?void 0:r}function Sv(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var PI=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(PI||{}),RI=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(RI||{});function Lo({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:u,mergeRefs:c}){c=c??DI;let f=E0(t,e);if(o)return Ws(f,r,n,u,c);let d=a??0;if(d&2){let{static:p=!1,...m}=f;if(p)return Ws(m,r,n,u,c)}if(d&1){let{unmount:p=!0,...m}=f;return w0(p?0:1,{0(){return null},1(){return Ws({...m,hidden:!0,style:{display:"none"}},r,n,u,c)}})}return Ws(f,r,n,u,c)}function Ws(e,t={},r,n,a){let{as:o=r,children:u,refName:c="ref",...f}=df(e,["unmount","static"]),d=e.ref!==void 0?{[c]:e.ref}:{},p=typeof u=="function"?u(t):u;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(t));let m={};if(t){let g=!1,y=[];for(let[E,S]of Object.entries(t))typeof S=="boolean"&&(g=!0),S===!0&&y.push(E);g&&(m["data-headlessui-state"]=y.join(" "))}if(o===Y.Fragment&&Object.keys(Kf(f)).length>0){if(!Y.isValidElement(p)||Array.isArray(p)&&p.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(S=>` - ${S}`).join(`
|
|
51
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(S=>` - ${S}`).join(`
|
|
52
|
+
`)].join(`
|
|
53
|
+
`));let g=p.props,y=typeof(g==null?void 0:g.className)=="function"?(...S)=>Sv(g==null?void 0:g.className(...S),f.className):Sv(g==null?void 0:g.className,f.className),E=y?{className:y}:{};return Y.cloneElement(p,Object.assign({},E0(p.props,Kf(df(f,["ref"]))),m,d,{ref:a(p.ref,d.ref)},E))}return Y.createElement(o,Object.assign({},df(f,["ref"]),o!==Y.Fragment&&d,o!==Y.Fragment&&m),p)}function DI(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function E0(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let a in n)a.startsWith("on")&&typeof n[a]=="function"?(r[a]!=null||(r[a]=[]),r[a].push(n[a])):t[a]=n[a];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](a,...o){let u=r[n];for(let c of u){if((a instanceof Event||(a==null?void 0:a.nativeEvent)instanceof Event)&&a.defaultPrevented)return;c(a,...o)}}});return t}function Yu(e){var t;return Object.assign(Y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Kf(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function df(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let $I="div";var _0=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_0||{});function II(e,t){var r;let{features:n=1,...a}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:(r=a["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Lo({ourProps:o,theirProps:a,slot:{},defaultTag:$I,name:"Hidden"})}let MI=Yu(II);function FI(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&NI(r)?!1:n}function NI(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function LI(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let a of n.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Vf=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vf||{});let T0=Y.createContext(null);function O0(){let e=Y.useContext(T0);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,O0),t}return e}function kI(){let[e,t]=Y.useState([]);return[e.length>0?e.join(" "):void 0,Y.useMemo(()=>function(r){let n=Qn(o=>(t(u=>[...u,o]),()=>t(u=>{let c=u.slice(),f=c.indexOf(o);return f!==-1&&c.splice(f,1),c}))),a=Y.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return Y.createElement(T0.Provider,{value:a},r.children)},[t])]}let jI="p";function WI(e,t){let r=Gd(),{id:n=`headlessui-description-${r}`,...a}=e,o=O0(),u=qd(t);pi(()=>o.register(n),[n,o.register]);let c={ref:u,...o.props,id:n};return Lo({ourProps:c,theirProps:a,slot:o.slot||{},defaultTag:jI,name:o.name||"Description"})}let BI=Yu(WI),zI=Object.assign(BI,{}),C0=Y.createContext(null);function A0(){let e=Y.useContext(C0);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,A0),t}return e}function HI(){let[e,t]=Y.useState([]);return[e.length>0?e.join(" "):void 0,Y.useMemo(()=>function(r){let n=Qn(o=>(t(u=>[...u,o]),()=>t(u=>{let c=u.slice(),f=c.indexOf(o);return f!==-1&&c.splice(f,1),c}))),a=Y.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return Y.createElement(C0.Provider,{value:a},r.children)},[t])]}let UI="label";function GI(e,t){let r=Gd(),{id:n=`headlessui-label-${r}`,passive:a=!1,...o}=e,u=A0(),c=qd(t);pi(()=>u.register(n),[n,u.register]);let f={ref:c,...u.props,id:n};return a&&("onClick"in f&&(delete f.htmlFor,delete f.onClick),"onClick"in o&&delete o.onClick),Lo({ourProps:f,theirProps:o,slot:u.slot||{},defaultTag:UI,name:u.name||"Label"})}let qI=Yu(GI),YI=Object.assign(qI,{}),Yd=Y.createContext(null);Yd.displayName="GroupContext";let KI=Y.Fragment;function VI(e){var t;let[r,n]=Y.useState(null),[a,o]=HI(),[u,c]=kI(),f=Y.useMemo(()=>({switch:r,setSwitch:n,labelledby:a,describedby:u}),[r,n,a,u]),d={},p=e;return Y.createElement(c,{name:"Switch.Description"},Y.createElement(o,{name:"Switch.Label",props:{htmlFor:(t=f.switch)==null?void 0:t.id,onClick(m){r&&(m.currentTarget.tagName==="LABEL"&&m.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},Y.createElement(Yd.Provider,{value:f},Lo({ourProps:d,theirProps:p,defaultTag:KI,name:"Switch.Group"}))))}let ZI="button";function JI(e,t){var r;let n=Gd(),{id:a=`headlessui-switch-${n}`,checked:o,defaultChecked:u=!1,onChange:c,disabled:f=!1,name:d,value:p,form:m,...g}=e,y=Y.useContext(Yd),E=Y.useRef(null),S=qd(E,t,y===null?null:y.setSwitch),[T,C]=EI(o,c,u),A=Qn(()=>C==null?void 0:C(!T)),P=Qn(Q=>{if(FI(Q.currentTarget))return Q.preventDefault();Q.preventDefault(),A()}),$=Qn(Q=>{Q.key===Vf.Space?(Q.preventDefault(),A()):Q.key===Vf.Enter&&LI(Q.currentTarget)}),_=Qn(Q=>Q.preventDefault()),M=Y.useMemo(()=>({checked:T}),[T]),W={id:a,ref:S,role:"switch",type:AI(e,E),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":T,"aria-labelledby":y==null?void 0:y.labelledby,"aria-describedby":y==null?void 0:y.describedby,disabled:f,onClick:P,onKeyUp:$,onKeyPress:_},G=TI();return Y.useEffect(()=>{var Q;let we=(Q=E.current)==null?void 0:Q.closest("form");we&&u!==void 0&&G.addEventListener(we,"reset",()=>{C(u)})},[E,C]),Y.createElement(Y.Fragment,null,d!=null&&T&&Y.createElement(MI,{features:_0.Hidden,...Kf({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:f,form:m,checked:T,name:d,value:p})}),Lo({ourProps:W,theirProps:g,slot:M,defaultTag:ZI,name:"Switch"}))}let XI=Yu(JI),QI=VI,eM=Object.assign(XI,{Group:QI,Label:YI,Description:zI});const pf={xs:{switch:"h-2.5 w-2.5",translate:"translate-x-2.5",container:"w-6 h-3.5"},sm:{switch:"h-3.5 w-3.5",translate:"translate-x-[0.85rem]",container:"h-4.5 w-8"},md:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"},lg:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"}};Y.forwardRef(({onChange:e,value:t,size:r="md",className:n="ml-auto"},a)=>{const o=u=>{e(u)};return ao.jsx("div",{className:OR("flex items-center",n),children:ao.jsx(eM,{ref:a,checked:t,onChange:o,onKeyDown:u=>{u.key==="Enter"&&o(!t)},className:`${t?"bg-primary-dark":"bg-grey-200"}
|
|
54
|
+
relative inline-flex shrink-0 ${pf[r].container} cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:ao.jsx("span",{"aria-hidden":"true",className:`${t?pf[r].translate:"translate-x-0"}
|
|
55
|
+
pointer-events-none inline-block ${pf[r].switch} transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})})})});const tM=ZD`
|
|
56
|
+
to {
|
|
57
|
+
fill: url(#d);
|
|
58
|
+
stroke-dashoffset: 0;
|
|
59
|
+
}
|
|
60
|
+
`;fu.svg`
|
|
61
|
+
& .e {
|
|
62
|
+
fill: url(#d);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& #tail {
|
|
66
|
+
stroke: url(#d);
|
|
67
|
+
stroke-width: 2;
|
|
68
|
+
fill: transparent;
|
|
69
|
+
stroke-dasharray: 700;
|
|
70
|
+
stroke-dashoffset: 700;
|
|
71
|
+
animation: ${tM} 1.5s ease-in-out infinite alternate-reverse;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
& #circle {
|
|
75
|
+
stroke: #fff;
|
|
76
|
+
stroke-width: 2;
|
|
77
|
+
fill: #fff;
|
|
78
|
+
stroke-dasharray: 700;
|
|
79
|
+
stroke-dashoffset: 700;
|
|
80
|
+
}
|
|
81
|
+
`;var mu={exports:{}};/**
|
|
10
82
|
* @license
|
|
11
83
|
* Lodash <https://lodash.com/>
|
|
12
84
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
13
85
|
* Released under MIT license <https://lodash.com/license>
|
|
14
86
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
15
87
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
16
|
-
*/hs.exports;(function(e,r){(function(){var t,a="4.17.21",s=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",p=500,h="__lodash_placeholder__",y=1,_=2,E=4,T=1,C=2,O=1,D=2,F=4,M=8,L=16,I=32,G=64,W=128,q=256,ee=512,De=30,Ee="...",We=800,X=16,ke=1,ft=2,rt=3,Ge=1/0,ct=9007199254740991,dr=17976931348623157e292,H=0/0,V=4294967295,ge=V-1,de=V>>>1,ce=[["ary",W],["bind",O],["bindKey",D],["curry",M],["curryRight",L],["flip",ee],["partial",I],["partialRight",G],["rearg",q]],pe="[object Arguments]",se="[object Array]",le="[object AsyncFunction]",ue="[object Boolean]",ve="[object Date]",me="[object DOMException]",J="[object Error]",Y="[object Function]",Qe="[object GeneratorFunction]",Ze="[object Map]",$t="[object Number]",Ja="[object Null]",Yt="[object Object]",an="[object Promise]",Qs="[object Proxy]",or="[object RegExp]",wt="[object Set]",on="[object String]",sn="[object Symbol]",Xa="[object Undefined]",Er="[object WeakMap]",Zs="[object WeakSet]",cn="[object ArrayBuffer]",kr="[object DataView]",ia="[object Float32Array]",ca="[object Float64Array]",ua="[object Int8Array]",la="[object Int16Array]",un="[object Int32Array]",xn="[object Uint8Array]",pr="[object Uint8ClampedArray]",ln="[object Uint16Array]",fn="[object Uint32Array]",Qa=/\b__p \+= '';/g,ei=/\b(__p \+=) '' \+/g,Za=/(__e\(.*?\)|\b__t\)) \+\n'';/g,eo=/&(?:amp|lt|gt|quot|#39);/g,fa=/[&<>"']/g,to=RegExp(eo.source),ti=RegExp(fa.source),ri=/<%-([\s\S]+?)%>/g,ro=/<%([\s\S]+?)%>/g,no=/<%=([\s\S]+?)%>/g,ni=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ai=/^\w*$/,oi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/[\\^$.*+?()[\]{}|]/g,U=RegExp(w.source),K=/^\s+/,ie=/\s/,$e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Le=/\{\n\/\* \[wrapped with (.+)\] \*/,Oe=/,? & /,Te=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,ze=/\\(\\)?/g,Je=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,jr=/^[-+]0x[0-9a-f]+$/i,ao=/^0b[01]+$/i,sr=/^\[object .+?Constructor\]$/,am=/^0o[0-7]+$/i,om=/^(?:0|[1-9]\d*)$/,sm=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oo=/($^)/,im=/['\n\r\u2028\u2029\\]/g,so="\\ud800-\\udfff",cm="\\u0300-\\u036f",um="\\ufe20-\\ufe2f",lm="\\u20d0-\\u20ff",hl=cm+um+lm,gl="\\u2700-\\u27bf",vl="a-z\\xdf-\\xf6\\xf8-\\xff",fm="\\xac\\xb1\\xd7\\xf7",dm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pm="\\u2000-\\u206f",hm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ml="A-Z\\xc0-\\xd6\\xd8-\\xde",yl="\\ufe0e\\ufe0f",bl=fm+dm+pm+hm,si="['’]",gm="["+so+"]",_l="["+bl+"]",io="["+hl+"]",El="\\d+",vm="["+gl+"]",Sl="["+vl+"]",Tl="[^"+so+bl+El+gl+vl+ml+"]",ii="\\ud83c[\\udffb-\\udfff]",mm="(?:"+io+"|"+ii+")",wl="[^"+so+"]",ci="(?:\\ud83c[\\udde6-\\uddff]){2}",ui="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+ml+"]",Cl="\\u200d",xl="(?:"+Sl+"|"+Tl+")",ym="(?:"+On+"|"+Tl+")",Ol="(?:"+si+"(?:d|ll|m|re|s|t|ve))?",Al="(?:"+si+"(?:D|LL|M|RE|S|T|VE))?",Rl=mm+"?",Dl="["+yl+"]?",bm="(?:"+Cl+"(?:"+[wl,ci,ui].join("|")+")"+Dl+Rl+")*",_m="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Em="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pl=Dl+Rl+bm,Sm="(?:"+[vm,ci,ui].join("|")+")"+Pl,Tm="(?:"+[wl+io+"?",io,ci,ui,gm].join("|")+")",wm=RegExp(si,"g"),Cm=RegExp(io,"g"),li=RegExp(ii+"(?="+ii+")|"+Tm+Pl,"g"),xm=RegExp([On+"?"+Sl+"+"+Ol+"(?="+[_l,On,"$"].join("|")+")",ym+"+"+Al+"(?="+[_l,On+xl,"$"].join("|")+")",On+"?"+xl+"+"+Ol,On+"+"+Al,Em,_m,El,Sm].join("|"),"g"),Om=RegExp("["+Cl+so+hl+yl+"]"),Am=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Dm=-1,qe={};qe[ia]=qe[ca]=qe[ua]=qe[la]=qe[un]=qe[xn]=qe[pr]=qe[ln]=qe[fn]=!0,qe[pe]=qe[se]=qe[cn]=qe[ue]=qe[kr]=qe[ve]=qe[J]=qe[Y]=qe[Ze]=qe[$t]=qe[Yt]=qe[or]=qe[wt]=qe[on]=qe[Er]=!1;var Ue={};Ue[pe]=Ue[se]=Ue[cn]=Ue[kr]=Ue[ue]=Ue[ve]=Ue[ia]=Ue[ca]=Ue[ua]=Ue[la]=Ue[un]=Ue[Ze]=Ue[$t]=Ue[Yt]=Ue[or]=Ue[wt]=Ue[on]=Ue[sn]=Ue[xn]=Ue[pr]=Ue[ln]=Ue[fn]=!0,Ue[J]=Ue[Y]=Ue[Er]=!1;var Pm={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Fm={"&":"&","<":"<",">":">",'"':""","'":"'"},Im={"&":"&","<":"<",">":">",""":'"',"'":"'"},Mm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$m=parseFloat,Lm=parseInt,Fl=typeof Pr=="object"&&Pr&&Pr.Object===Object&&Pr,Nm=typeof self=="object"&&self&&self.Object===Object&&self,pt=Fl||Nm||Function("return this")(),fi=r&&!r.nodeType&&r,dn=fi&&!0&&e&&!e.nodeType&&e,Il=dn&&dn.exports===fi,di=Il&&Fl.process,zt=function(){try{var A=dn&&dn.require&&dn.require("util").types;return A||di&&di.binding&&di.binding("util")}catch{}}(),Ml=zt&&zt.isArrayBuffer,$l=zt&&zt.isDate,Ll=zt&&zt.isMap,Nl=zt&&zt.isRegExp,kl=zt&&zt.isSet,jl=zt&&zt.isTypedArray;function Lt(A,$,P){switch(P.length){case 0:return A.call($);case 1:return A.call($,P[0]);case 2:return A.call($,P[0],P[1]);case 3:return A.call($,P[0],P[1],P[2])}return A.apply($,P)}function km(A,$,P,Z){for(var fe=-1,Pe=A==null?0:A.length;++fe<Pe;){var ot=A[fe];$(Z,ot,P(ot),A)}return Z}function Kt(A,$){for(var P=-1,Z=A==null?0:A.length;++P<Z&&$(A[P],P,A)!==!1;);return A}function jm(A,$){for(var P=A==null?0:A.length;P--&&$(A[P],P,A)!==!1;);return A}function Bl(A,$){for(var P=-1,Z=A==null?0:A.length;++P<Z;)if(!$(A[P],P,A))return!1;return!0}function Br(A,$){for(var P=-1,Z=A==null?0:A.length,fe=0,Pe=[];++P<Z;){var ot=A[P];$(ot,P,A)&&(Pe[fe++]=ot)}return Pe}function co(A,$){var P=A==null?0:A.length;return!!P&&An(A,$,0)>-1}function pi(A,$,P){for(var Z=-1,fe=A==null?0:A.length;++Z<fe;)if(P($,A[Z]))return!0;return!1}function Ye(A,$){for(var P=-1,Z=A==null?0:A.length,fe=Array(Z);++P<Z;)fe[P]=$(A[P],P,A);return fe}function Wr(A,$){for(var P=-1,Z=$.length,fe=A.length;++P<Z;)A[fe+P]=$[P];return A}function hi(A,$,P,Z){var fe=-1,Pe=A==null?0:A.length;for(Z&&Pe&&(P=A[++fe]);++fe<Pe;)P=$(P,A[fe],fe,A);return P}function Bm(A,$,P,Z){var fe=A==null?0:A.length;for(Z&&fe&&(P=A[--fe]);fe--;)P=$(P,A[fe],fe,A);return P}function gi(A,$){for(var P=-1,Z=A==null?0:A.length;++P<Z;)if($(A[P],P,A))return!0;return!1}var Wm=vi("length");function Hm(A){return A.split("")}function Um(A){return A.match(Te)||[]}function Wl(A,$,P){var Z;return P(A,function(fe,Pe,ot){if($(fe,Pe,ot))return Z=Pe,!1}),Z}function uo(A,$,P,Z){for(var fe=A.length,Pe=P+(Z?1:-1);Z?Pe--:++Pe<fe;)if($(A[Pe],Pe,A))return Pe;return-1}function An(A,$,P){return $===$?ty(A,$,P):uo(A,Hl,P)}function qm(A,$,P,Z){for(var fe=P-1,Pe=A.length;++fe<Pe;)if(Z(A[fe],$))return fe;return-1}function Hl(A){return A!==A}function Ul(A,$){var P=A==null?0:A.length;return P?yi(A,$)/P:H}function vi(A){return function($){return $==null?t:$[A]}}function mi(A){return function($){return A==null?t:A[$]}}function ql(A,$,P,Z,fe){return fe(A,function(Pe,ot,He){P=Z?(Z=!1,Pe):$(P,Pe,ot,He)}),P}function Gm(A,$){var P=A.length;for(A.sort($);P--;)A[P]=A[P].value;return A}function yi(A,$){for(var P,Z=-1,fe=A.length;++Z<fe;){var Pe=$(A[Z]);Pe!==t&&(P=P===t?Pe:P+Pe)}return P}function bi(A,$){for(var P=-1,Z=Array(A);++P<A;)Z[P]=$(P);return Z}function Ym(A,$){return Ye($,function(P){return[P,A[P]]})}function Gl(A){return A&&A.slice(0,Kl(A)+1).replace(K,"")}function Nt(A){return function($){return A($)}}function _i(A,$){return Ye($,function(P){return A[P]})}function da(A,$){return A.has($)}function Yl(A,$){for(var P=-1,Z=A.length;++P<Z&&An($,A[P],0)>-1;);return P}function Vl(A,$){for(var P=A.length;P--&&An($,A[P],0)>-1;);return P}function Vm(A,$){for(var P=A.length,Z=0;P--;)A[P]===$&&++Z;return Z}var zm=mi(Pm),Km=mi(Fm);function Jm(A){return"\\"+Mm[A]}function Xm(A,$){return A==null?t:A[$]}function Rn(A){return Om.test(A)}function Qm(A){return Am.test(A)}function Zm(A){for(var $,P=[];!($=A.next()).done;)P.push($.value);return P}function Ei(A){var $=-1,P=Array(A.size);return A.forEach(function(Z,fe){P[++$]=[fe,Z]}),P}function zl(A,$){return function(P){return A($(P))}}function Hr(A,$){for(var P=-1,Z=A.length,fe=0,Pe=[];++P<Z;){var ot=A[P];(ot===$||ot===h)&&(A[P]=h,Pe[fe++]=P)}return Pe}function lo(A){var $=-1,P=Array(A.size);return A.forEach(function(Z){P[++$]=Z}),P}function ey(A){var $=-1,P=Array(A.size);return A.forEach(function(Z){P[++$]=[Z,Z]}),P}function ty(A,$,P){for(var Z=P-1,fe=A.length;++Z<fe;)if(A[Z]===$)return Z;return-1}function ry(A,$,P){for(var Z=P+1;Z--;)if(A[Z]===$)return Z;return Z}function Dn(A){return Rn(A)?ay(A):Wm(A)}function ir(A){return Rn(A)?oy(A):Hm(A)}function Kl(A){for(var $=A.length;$--&&ie.test(A.charAt($)););return $}var ny=mi(Im);function ay(A){for(var $=li.lastIndex=0;li.test(A);)++$;return $}function oy(A){return A.match(li)||[]}function sy(A){return A.match(xm)||[]}var iy=function A($){$=$==null?pt:Pn.defaults(pt.Object(),$,Pn.pick(pt,Rm));var P=$.Array,Z=$.Date,fe=$.Error,Pe=$.Function,ot=$.Math,He=$.Object,Si=$.RegExp,cy=$.String,Jt=$.TypeError,fo=P.prototype,uy=Pe.prototype,Fn=He.prototype,po=$["__core-js_shared__"],ho=uy.toString,Ne=Fn.hasOwnProperty,ly=0,Jl=function(){var n=/[^.]+$/.exec(po&&po.keys&&po.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),go=Fn.toString,fy=ho.call(He),dy=pt._,py=Si("^"+ho.call(Ne).replace(w,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vo=Il?$.Buffer:t,Ur=$.Symbol,mo=$.Uint8Array,Xl=vo?vo.allocUnsafe:t,yo=zl(He.getPrototypeOf,He),Ql=He.create,Zl=Fn.propertyIsEnumerable,bo=fo.splice,ef=Ur?Ur.isConcatSpreadable:t,pa=Ur?Ur.iterator:t,pn=Ur?Ur.toStringTag:t,_o=function(){try{var n=yn(He,"defineProperty");return n({},"",{}),n}catch{}}(),hy=$.clearTimeout!==pt.clearTimeout&&$.clearTimeout,gy=Z&&Z.now!==pt.Date.now&&Z.now,vy=$.setTimeout!==pt.setTimeout&&$.setTimeout,Eo=ot.ceil,So=ot.floor,Ti=He.getOwnPropertySymbols,my=vo?vo.isBuffer:t,tf=$.isFinite,yy=fo.join,by=zl(He.keys,He),st=ot.max,vt=ot.min,_y=Z.now,Ey=$.parseInt,rf=ot.random,Sy=fo.reverse,wi=yn($,"DataView"),ha=yn($,"Map"),Ci=yn($,"Promise"),In=yn($,"Set"),ga=yn($,"WeakMap"),va=yn(He,"create"),To=ga&&new ga,Mn={},Ty=bn(wi),wy=bn(ha),Cy=bn(Ci),xy=bn(In),Oy=bn(ga),wo=Ur?Ur.prototype:t,ma=wo?wo.valueOf:t,nf=wo?wo.toString:t;function m(n){if(Xe(n)&&!he(n)&&!(n instanceof xe)){if(n instanceof Xt)return n;if(Ne.call(n,"__wrapped__"))return od(n)}return new Xt(n)}var $n=function(){function n(){}return function(o){if(!Ke(o))return{};if(Ql)return Ql(o);n.prototype=o;var c=new n;return n.prototype=t,c}}();function Co(){}function Xt(n,o){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=t}m.templateSettings={escape:ri,evaluate:ro,interpolate:no,variable:"",imports:{_:m}},m.prototype=Co.prototype,m.prototype.constructor=m,Xt.prototype=$n(Co.prototype),Xt.prototype.constructor=Xt;function xe(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=V,this.__views__=[]}function Ay(){var n=new xe(this.__wrapped__);return n.__actions__=Dt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Dt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Dt(this.__views__),n}function Ry(){if(this.__filtered__){var n=new xe(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Dy(){var n=this.__wrapped__.value(),o=this.__dir__,c=he(n),d=o<0,g=c?n.length:0,b=Hb(0,g,this.__views__),S=b.start,x=b.end,R=x-S,N=d?x:S-1,k=this.__iteratees__,B=k.length,z=0,te=vt(R,this.__takeCount__);if(!c||!d&&g==R&&te==R)return Af(n,this.__actions__);var ae=[];e:for(;R--&&z<te;){N+=o;for(var _e=-1,oe=n[N];++_e<B;){var we=k[_e],Ae=we.iteratee,Bt=we.type,Ot=Ae(oe);if(Bt==ft)oe=Ot;else if(!Ot){if(Bt==ke)continue e;break e}}ae[z++]=oe}return ae}xe.prototype=$n(Co.prototype),xe.prototype.constructor=xe;function hn(n){var o=-1,c=n==null?0:n.length;for(this.clear();++o<c;){var d=n[o];this.set(d[0],d[1])}}function Py(){this.__data__=va?va(null):{},this.size=0}function Fy(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}function Iy(n){var o=this.__data__;if(va){var c=o[n];return c===f?t:c}return Ne.call(o,n)?o[n]:t}function My(n){var o=this.__data__;return va?o[n]!==t:Ne.call(o,n)}function $y(n,o){var c=this.__data__;return this.size+=this.has(n)?0:1,c[n]=va&&o===t?f:o,this}hn.prototype.clear=Py,hn.prototype.delete=Fy,hn.prototype.get=Iy,hn.prototype.has=My,hn.prototype.set=$y;function Sr(n){var o=-1,c=n==null?0:n.length;for(this.clear();++o<c;){var d=n[o];this.set(d[0],d[1])}}function Ly(){this.__data__=[],this.size=0}function Ny(n){var o=this.__data__,c=xo(o,n);if(c<0)return!1;var d=o.length-1;return c==d?o.pop():bo.call(o,c,1),--this.size,!0}function ky(n){var o=this.__data__,c=xo(o,n);return c<0?t:o[c][1]}function jy(n){return xo(this.__data__,n)>-1}function By(n,o){var c=this.__data__,d=xo(c,n);return d<0?(++this.size,c.push([n,o])):c[d][1]=o,this}Sr.prototype.clear=Ly,Sr.prototype.delete=Ny,Sr.prototype.get=ky,Sr.prototype.has=jy,Sr.prototype.set=By;function Tr(n){var o=-1,c=n==null?0:n.length;for(this.clear();++o<c;){var d=n[o];this.set(d[0],d[1])}}function Wy(){this.size=0,this.__data__={hash:new hn,map:new(ha||Sr),string:new hn}}function Hy(n){var o=ko(this,n).delete(n);return this.size-=o?1:0,o}function Uy(n){return ko(this,n).get(n)}function qy(n){return ko(this,n).has(n)}function Gy(n,o){var c=ko(this,n),d=c.size;return c.set(n,o),this.size+=c.size==d?0:1,this}Tr.prototype.clear=Wy,Tr.prototype.delete=Hy,Tr.prototype.get=Uy,Tr.prototype.has=qy,Tr.prototype.set=Gy;function gn(n){var o=-1,c=n==null?0:n.length;for(this.__data__=new Tr;++o<c;)this.add(n[o])}function Yy(n){return this.__data__.set(n,f),this}function Vy(n){return this.__data__.has(n)}gn.prototype.add=gn.prototype.push=Yy,gn.prototype.has=Vy;function cr(n){var o=this.__data__=new Sr(n);this.size=o.size}function zy(){this.__data__=new Sr,this.size=0}function Ky(n){var o=this.__data__,c=o.delete(n);return this.size=o.size,c}function Jy(n){return this.__data__.get(n)}function Xy(n){return this.__data__.has(n)}function Qy(n,o){var c=this.__data__;if(c instanceof Sr){var d=c.__data__;if(!ha||d.length<s-1)return d.push([n,o]),this.size=++c.size,this;c=this.__data__=new Tr(d)}return c.set(n,o),this.size=c.size,this}cr.prototype.clear=zy,cr.prototype.delete=Ky,cr.prototype.get=Jy,cr.prototype.has=Xy,cr.prototype.set=Qy;function af(n,o){var c=he(n),d=!c&&_n(n),g=!c&&!d&&zr(n),b=!c&&!d&&!g&&jn(n),S=c||d||g||b,x=S?bi(n.length,cy):[],R=x.length;for(var N in n)(o||Ne.call(n,N))&&!(S&&(N=="length"||g&&(N=="offset"||N=="parent")||b&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||Or(N,R)))&&x.push(N);return x}function of(n){var o=n.length;return o?n[Li(0,o-1)]:t}function Zy(n,o){return jo(Dt(n),vn(o,0,n.length))}function eb(n){return jo(Dt(n))}function xi(n,o,c){(c!==t&&!ur(n[o],c)||c===t&&!(o in n))&&wr(n,o,c)}function ya(n,o,c){var d=n[o];(!(Ne.call(n,o)&&ur(d,c))||c===t&&!(o in n))&&wr(n,o,c)}function xo(n,o){for(var c=n.length;c--;)if(ur(n[c][0],o))return c;return-1}function tb(n,o,c,d){return qr(n,function(g,b,S){o(d,g,c(g),S)}),d}function sf(n,o){return n&&gr(o,ut(o),n)}function rb(n,o){return n&&gr(o,Ft(o),n)}function wr(n,o,c){o=="__proto__"&&_o?_o(n,o,{configurable:!0,enumerable:!0,value:c,writable:!0}):n[o]=c}function Oi(n,o){for(var c=-1,d=o.length,g=P(d),b=n==null;++c<d;)g[c]=b?t:ic(n,o[c]);return g}function vn(n,o,c){return n===n&&(c!==t&&(n=n<=c?n:c),o!==t&&(n=n>=o?n:o)),n}function Qt(n,o,c,d,g,b){var S,x=o&y,R=o&_,N=o&E;if(c&&(S=g?c(n,d,g,b):c(n)),S!==t)return S;if(!Ke(n))return n;var k=he(n);if(k){if(S=qb(n),!x)return Dt(n,S)}else{var B=mt(n),z=B==Y||B==Qe;if(zr(n))return Pf(n,x);if(B==Yt||B==pe||z&&!g){if(S=R||z?{}:Jf(n),!x)return R?Ib(n,rb(S,n)):Fb(n,sf(S,n))}else{if(!Ue[B])return g?n:{};S=Gb(n,B,x)}}b||(b=new cr);var te=b.get(n);if(te)return te;b.set(n,S),Cd(n)?n.forEach(function(oe){S.add(Qt(oe,o,c,oe,n,b))}):Td(n)&&n.forEach(function(oe,we){S.set(we,Qt(oe,o,c,we,n,b))});var ae=N?R?Vi:Yi:R?Ft:ut,_e=k?t:ae(n);return Kt(_e||n,function(oe,we){_e&&(we=oe,oe=n[we]),ya(S,we,Qt(oe,o,c,we,n,b))}),S}function nb(n){var o=ut(n);return function(c){return cf(c,n,o)}}function cf(n,o,c){var d=c.length;if(n==null)return!d;for(n=He(n);d--;){var g=c[d],b=o[g],S=n[g];if(S===t&&!(g in n)||!b(S))return!1}return!0}function uf(n,o,c){if(typeof n!="function")throw new Jt(u);return Ca(function(){n.apply(t,c)},o)}function ba(n,o,c,d){var g=-1,b=co,S=!0,x=n.length,R=[],N=o.length;if(!x)return R;c&&(o=Ye(o,Nt(c))),d?(b=pi,S=!1):o.length>=s&&(b=da,S=!1,o=new gn(o));e:for(;++g<x;){var k=n[g],B=c==null?k:c(k);if(k=d||k!==0?k:0,S&&B===B){for(var z=N;z--;)if(o[z]===B)continue e;R.push(k)}else b(o,B,d)||R.push(k)}return R}var qr=Lf(hr),lf=Lf(Ri,!0);function ab(n,o){var c=!0;return qr(n,function(d,g,b){return c=!!o(d,g,b),c}),c}function Oo(n,o,c){for(var d=-1,g=n.length;++d<g;){var b=n[d],S=o(b);if(S!=null&&(x===t?S===S&&!jt(S):c(S,x)))var x=S,R=b}return R}function ob(n,o,c,d){var g=n.length;for(c=ye(c),c<0&&(c=-c>g?0:g+c),d=d===t||d>g?g:ye(d),d<0&&(d+=g),d=c>d?0:Od(d);c<d;)n[c++]=o;return n}function ff(n,o){var c=[];return qr(n,function(d,g,b){o(d,g,b)&&c.push(d)}),c}function ht(n,o,c,d,g){var b=-1,S=n.length;for(c||(c=Vb),g||(g=[]);++b<S;){var x=n[b];o>0&&c(x)?o>1?ht(x,o-1,c,d,g):Wr(g,x):d||(g[g.length]=x)}return g}var Ai=Nf(),df=Nf(!0);function hr(n,o){return n&&Ai(n,o,ut)}function Ri(n,o){return n&&df(n,o,ut)}function Ao(n,o){return Br(o,function(c){return Ar(n[c])})}function mn(n,o){o=Yr(o,n);for(var c=0,d=o.length;n!=null&&c<d;)n=n[vr(o[c++])];return c&&c==d?n:t}function pf(n,o,c){var d=o(n);return he(n)?d:Wr(d,c(n))}function Ct(n){return n==null?n===t?Xa:Ja:pn&&pn in He(n)?Wb(n):e0(n)}function Di(n,o){return n>o}function sb(n,o){return n!=null&&Ne.call(n,o)}function ib(n,o){return n!=null&&o in He(n)}function cb(n,o,c){return n>=vt(o,c)&&n<st(o,c)}function Pi(n,o,c){for(var d=c?pi:co,g=n[0].length,b=n.length,S=b,x=P(b),R=1/0,N=[];S--;){var k=n[S];S&&o&&(k=Ye(k,Nt(o))),R=vt(k.length,R),x[S]=!c&&(o||g>=120&&k.length>=120)?new gn(S&&k):t}k=n[0];var B=-1,z=x[0];e:for(;++B<g&&N.length<R;){var te=k[B],ae=o?o(te):te;if(te=c||te!==0?te:0,!(z?da(z,ae):d(N,ae,c))){for(S=b;--S;){var _e=x[S];if(!(_e?da(_e,ae):d(n[S],ae,c)))continue e}z&&z.push(ae),N.push(te)}}return N}function ub(n,o,c,d){return hr(n,function(g,b,S){o(d,c(g),b,S)}),d}function _a(n,o,c){o=Yr(o,n),n=ed(n,o);var d=n==null?n:n[vr(er(o))];return d==null?t:Lt(d,n,c)}function hf(n){return Xe(n)&&Ct(n)==pe}function lb(n){return Xe(n)&&Ct(n)==cn}function fb(n){return Xe(n)&&Ct(n)==ve}function Ea(n,o,c,d,g){return n===o?!0:n==null||o==null||!Xe(n)&&!Xe(o)?n!==n&&o!==o:db(n,o,c,d,Ea,g)}function db(n,o,c,d,g,b){var S=he(n),x=he(o),R=S?se:mt(n),N=x?se:mt(o);R=R==pe?Yt:R,N=N==pe?Yt:N;var k=R==Yt,B=N==Yt,z=R==N;if(z&&zr(n)){if(!zr(o))return!1;S=!0,k=!1}if(z&&!k)return b||(b=new cr),S||jn(n)?Vf(n,o,c,d,g,b):jb(n,o,R,c,d,g,b);if(!(c&T)){var te=k&&Ne.call(n,"__wrapped__"),ae=B&&Ne.call(o,"__wrapped__");if(te||ae){var _e=te?n.value():n,oe=ae?o.value():o;return b||(b=new cr),g(_e,oe,c,d,b)}}return z?(b||(b=new cr),Bb(n,o,c,d,g,b)):!1}function pb(n){return Xe(n)&&mt(n)==Ze}function Fi(n,o,c,d){var g=c.length,b=g,S=!d;if(n==null)return!b;for(n=He(n);g--;){var x=c[g];if(S&&x[2]?x[1]!==n[x[0]]:!(x[0]in n))return!1}for(;++g<b;){x=c[g];var R=x[0],N=n[R],k=x[1];if(S&&x[2]){if(N===t&&!(R in n))return!1}else{var B=new cr;if(d)var z=d(N,k,R,n,o,B);if(!(z===t?Ea(k,N,T|C,d,B):z))return!1}}return!0}function gf(n){if(!Ke(n)||Kb(n))return!1;var o=Ar(n)?py:sr;return o.test(bn(n))}function hb(n){return Xe(n)&&Ct(n)==or}function gb(n){return Xe(n)&&mt(n)==wt}function vb(n){return Xe(n)&&Go(n.length)&&!!qe[Ct(n)]}function vf(n){return typeof n=="function"?n:n==null?It:typeof n=="object"?he(n)?bf(n[0],n[1]):yf(n):kd(n)}function Ii(n){if(!wa(n))return by(n);var o=[];for(var c in He(n))Ne.call(n,c)&&c!="constructor"&&o.push(c);return o}function mb(n){if(!Ke(n))return Zb(n);var o=wa(n),c=[];for(var d in n)d=="constructor"&&(o||!Ne.call(n,d))||c.push(d);return c}function Mi(n,o){return n<o}function mf(n,o){var c=-1,d=Pt(n)?P(n.length):[];return qr(n,function(g,b,S){d[++c]=o(g,b,S)}),d}function yf(n){var o=Ki(n);return o.length==1&&o[0][2]?Qf(o[0][0],o[0][1]):function(c){return c===n||Fi(c,n,o)}}function bf(n,o){return Xi(n)&&Xf(o)?Qf(vr(n),o):function(c){var d=ic(c,n);return d===t&&d===o?cc(c,n):Ea(o,d,T|C)}}function Ro(n,o,c,d,g){n!==o&&Ai(o,function(b,S){if(g||(g=new cr),Ke(b))yb(n,o,S,c,Ro,d,g);else{var x=d?d(Zi(n,S),b,S+"",n,o,g):t;x===t&&(x=b),xi(n,S,x)}},Ft)}function yb(n,o,c,d,g,b,S){var x=Zi(n,c),R=Zi(o,c),N=S.get(R);if(N){xi(n,c,N);return}var k=b?b(x,R,c+"",n,o,S):t,B=k===t;if(B){var z=he(R),te=!z&&zr(R),ae=!z&&!te&&jn(R);k=R,z||te||ae?he(x)?k=x:et(x)?k=Dt(x):te?(B=!1,k=Pf(R,!0)):ae?(B=!1,k=Ff(R,!0)):k=[]:xa(R)||_n(R)?(k=x,_n(x)?k=Ad(x):(!Ke(x)||Ar(x))&&(k=Jf(R))):B=!1}B&&(S.set(R,k),g(k,R,d,b,S),S.delete(R)),xi(n,c,k)}function _f(n,o){var c=n.length;if(c)return o+=o<0?c:0,Or(o,c)?n[o]:t}function Ef(n,o,c){o.length?o=Ye(o,function(b){return he(b)?function(S){return mn(S,b.length===1?b[0]:b)}:b}):o=[It];var d=-1;o=Ye(o,Nt(re()));var g=mf(n,function(b,S,x){var R=Ye(o,function(N){return N(b)});return{criteria:R,index:++d,value:b}});return Gm(g,function(b,S){return Pb(b,S,c)})}function bb(n,o){return Sf(n,o,function(c,d){return cc(n,d)})}function Sf(n,o,c){for(var d=-1,g=o.length,b={};++d<g;){var S=o[d],x=mn(n,S);c(x,S)&&Sa(b,Yr(S,n),x)}return b}function _b(n){return function(o){return mn(o,n)}}function $i(n,o,c,d){var g=d?qm:An,b=-1,S=o.length,x=n;for(n===o&&(o=Dt(o)),c&&(x=Ye(n,Nt(c)));++b<S;)for(var R=0,N=o[b],k=c?c(N):N;(R=g(x,k,R,d))>-1;)x!==n&&bo.call(x,R,1),bo.call(n,R,1);return n}function Tf(n,o){for(var c=n?o.length:0,d=c-1;c--;){var g=o[c];if(c==d||g!==b){var b=g;Or(g)?bo.call(n,g,1):ji(n,g)}}return n}function Li(n,o){return n+So(rf()*(o-n+1))}function Eb(n,o,c,d){for(var g=-1,b=st(Eo((o-n)/(c||1)),0),S=P(b);b--;)S[d?b:++g]=n,n+=c;return S}function Ni(n,o){var c="";if(!n||o<1||o>ct)return c;do o%2&&(c+=n),o=So(o/2),o&&(n+=n);while(o);return c}function Se(n,o){return ec(Zf(n,o,It),n+"")}function Sb(n){return of(Bn(n))}function Tb(n,o){var c=Bn(n);return jo(c,vn(o,0,c.length))}function Sa(n,o,c,d){if(!Ke(n))return n;o=Yr(o,n);for(var g=-1,b=o.length,S=b-1,x=n;x!=null&&++g<b;){var R=vr(o[g]),N=c;if(R==="__proto__"||R==="constructor"||R==="prototype")return n;if(g!=S){var k=x[R];N=d?d(k,R,x):t,N===t&&(N=Ke(k)?k:Or(o[g+1])?[]:{})}ya(x,R,N),x=x[R]}return n}var wf=To?function(n,o){return To.set(n,o),n}:It,wb=_o?function(n,o){return _o(n,"toString",{configurable:!0,enumerable:!1,value:lc(o),writable:!0})}:It;function Cb(n){return jo(Bn(n))}function Zt(n,o,c){var d=-1,g=n.length;o<0&&(o=-o>g?0:g+o),c=c>g?g:c,c<0&&(c+=g),g=o>c?0:c-o>>>0,o>>>=0;for(var b=P(g);++d<g;)b[d]=n[d+o];return b}function xb(n,o){var c;return qr(n,function(d,g,b){return c=o(d,g,b),!c}),!!c}function Do(n,o,c){var d=0,g=n==null?d:n.length;if(typeof o=="number"&&o===o&&g<=de){for(;d<g;){var b=d+g>>>1,S=n[b];S!==null&&!jt(S)&&(c?S<=o:S<o)?d=b+1:g=b}return g}return ki(n,o,It,c)}function ki(n,o,c,d){var g=0,b=n==null?0:n.length;if(b===0)return 0;o=c(o);for(var S=o!==o,x=o===null,R=jt(o),N=o===t;g<b;){var k=So((g+b)/2),B=c(n[k]),z=B!==t,te=B===null,ae=B===B,_e=jt(B);if(S)var oe=d||ae;else N?oe=ae&&(d||z):x?oe=ae&&z&&(d||!te):R?oe=ae&&z&&!te&&(d||!_e):te||_e?oe=!1:oe=d?B<=o:B<o;oe?g=k+1:b=k}return vt(b,ge)}function Cf(n,o){for(var c=-1,d=n.length,g=0,b=[];++c<d;){var S=n[c],x=o?o(S):S;if(!c||!ur(x,R)){var R=x;b[g++]=S===0?0:S}}return b}function xf(n){return typeof n=="number"?n:jt(n)?H:+n}function kt(n){if(typeof n=="string")return n;if(he(n))return Ye(n,kt)+"";if(jt(n))return nf?nf.call(n):"";var o=n+"";return o=="0"&&1/n==-Ge?"-0":o}function Gr(n,o,c){var d=-1,g=co,b=n.length,S=!0,x=[],R=x;if(c)S=!1,g=pi;else if(b>=s){var N=o?null:Nb(n);if(N)return lo(N);S=!1,g=da,R=new gn}else R=o?[]:x;e:for(;++d<b;){var k=n[d],B=o?o(k):k;if(k=c||k!==0?k:0,S&&B===B){for(var z=R.length;z--;)if(R[z]===B)continue e;o&&R.push(B),x.push(k)}else g(R,B,c)||(R!==x&&R.push(B),x.push(k))}return x}function ji(n,o){return o=Yr(o,n),n=ed(n,o),n==null||delete n[vr(er(o))]}function Of(n,o,c,d){return Sa(n,o,c(mn(n,o)),d)}function Po(n,o,c,d){for(var g=n.length,b=d?g:-1;(d?b--:++b<g)&&o(n[b],b,n););return c?Zt(n,d?0:b,d?b+1:g):Zt(n,d?b+1:0,d?g:b)}function Af(n,o){var c=n;return c instanceof xe&&(c=c.value()),hi(o,function(d,g){return g.func.apply(g.thisArg,Wr([d],g.args))},c)}function Bi(n,o,c){var d=n.length;if(d<2)return d?Gr(n[0]):[];for(var g=-1,b=P(d);++g<d;)for(var S=n[g],x=-1;++x<d;)x!=g&&(b[g]=ba(b[g]||S,n[x],o,c));return Gr(ht(b,1),o,c)}function Rf(n,o,c){for(var d=-1,g=n.length,b=o.length,S={};++d<g;){var x=d<b?o[d]:t;c(S,n[d],x)}return S}function Wi(n){return et(n)?n:[]}function Hi(n){return typeof n=="function"?n:It}function Yr(n,o){return he(n)?n:Xi(n,o)?[n]:ad(Fe(n))}var Ob=Se;function Vr(n,o,c){var d=n.length;return c=c===t?d:c,!o&&c>=d?n:Zt(n,o,c)}var Df=hy||function(n){return pt.clearTimeout(n)};function Pf(n,o){if(o)return n.slice();var c=n.length,d=Xl?Xl(c):new n.constructor(c);return n.copy(d),d}function Ui(n){var o=new n.constructor(n.byteLength);return new mo(o).set(new mo(n)),o}function Ab(n,o){var c=o?Ui(n.buffer):n.buffer;return new n.constructor(c,n.byteOffset,n.byteLength)}function Rb(n){var o=new n.constructor(n.source,Vt.exec(n));return o.lastIndex=n.lastIndex,o}function Db(n){return ma?He(ma.call(n)):{}}function Ff(n,o){var c=o?Ui(n.buffer):n.buffer;return new n.constructor(c,n.byteOffset,n.length)}function If(n,o){if(n!==o){var c=n!==t,d=n===null,g=n===n,b=jt(n),S=o!==t,x=o===null,R=o===o,N=jt(o);if(!x&&!N&&!b&&n>o||b&&S&&R&&!x&&!N||d&&S&&R||!c&&R||!g)return 1;if(!d&&!b&&!N&&n<o||N&&c&&g&&!d&&!b||x&&c&&g||!S&&g||!R)return-1}return 0}function Pb(n,o,c){for(var d=-1,g=n.criteria,b=o.criteria,S=g.length,x=c.length;++d<S;){var R=If(g[d],b[d]);if(R){if(d>=x)return R;var N=c[d];return R*(N=="desc"?-1:1)}}return n.index-o.index}function Mf(n,o,c,d){for(var g=-1,b=n.length,S=c.length,x=-1,R=o.length,N=st(b-S,0),k=P(R+N),B=!d;++x<R;)k[x]=o[x];for(;++g<S;)(B||g<b)&&(k[c[g]]=n[g]);for(;N--;)k[x++]=n[g++];return k}function $f(n,o,c,d){for(var g=-1,b=n.length,S=-1,x=c.length,R=-1,N=o.length,k=st(b-x,0),B=P(k+N),z=!d;++g<k;)B[g]=n[g];for(var te=g;++R<N;)B[te+R]=o[R];for(;++S<x;)(z||g<b)&&(B[te+c[S]]=n[g++]);return B}function Dt(n,o){var c=-1,d=n.length;for(o||(o=P(d));++c<d;)o[c]=n[c];return o}function gr(n,o,c,d){var g=!c;c||(c={});for(var b=-1,S=o.length;++b<S;){var x=o[b],R=d?d(c[x],n[x],x,c,n):t;R===t&&(R=n[x]),g?wr(c,x,R):ya(c,x,R)}return c}function Fb(n,o){return gr(n,Ji(n),o)}function Ib(n,o){return gr(n,zf(n),o)}function Fo(n,o){return function(c,d){var g=he(c)?km:tb,b=o?o():{};return g(c,n,re(d,2),b)}}function Ln(n){return Se(function(o,c){var d=-1,g=c.length,b=g>1?c[g-1]:t,S=g>2?c[2]:t;for(b=n.length>3&&typeof b=="function"?(g--,b):t,S&&xt(c[0],c[1],S)&&(b=g<3?t:b,g=1),o=He(o);++d<g;){var x=c[d];x&&n(o,x,d,b)}return o})}function Lf(n,o){return function(c,d){if(c==null)return c;if(!Pt(c))return n(c,d);for(var g=c.length,b=o?g:-1,S=He(c);(o?b--:++b<g)&&d(S[b],b,S)!==!1;);return c}}function Nf(n){return function(o,c,d){for(var g=-1,b=He(o),S=d(o),x=S.length;x--;){var R=S[n?x:++g];if(c(b[R],R,b)===!1)break}return o}}function Mb(n,o,c){var d=o&O,g=Ta(n);function b(){var S=this&&this!==pt&&this instanceof b?g:n;return S.apply(d?c:this,arguments)}return b}function kf(n){return function(o){o=Fe(o);var c=Rn(o)?ir(o):t,d=c?c[0]:o.charAt(0),g=c?Vr(c,1).join(""):o.slice(1);return d[n]()+g}}function Nn(n){return function(o){return hi(Ld($d(o).replace(wm,"")),n,"")}}function Ta(n){return function(){var o=arguments;switch(o.length){case 0:return new n;case 1:return new n(o[0]);case 2:return new n(o[0],o[1]);case 3:return new n(o[0],o[1],o[2]);case 4:return new n(o[0],o[1],o[2],o[3]);case 5:return new n(o[0],o[1],o[2],o[3],o[4]);case 6:return new n(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new n(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var c=$n(n.prototype),d=n.apply(c,o);return Ke(d)?d:c}}function $b(n,o,c){var d=Ta(n);function g(){for(var b=arguments.length,S=P(b),x=b,R=kn(g);x--;)S[x]=arguments[x];var N=b<3&&S[0]!==R&&S[b-1]!==R?[]:Hr(S,R);if(b-=N.length,b<c)return Uf(n,o,Io,g.placeholder,t,S,N,t,t,c-b);var k=this&&this!==pt&&this instanceof g?d:n;return Lt(k,this,S)}return g}function jf(n){return function(o,c,d){var g=He(o);if(!Pt(o)){var b=re(c,3);o=ut(o),c=function(x){return b(g[x],x,g)}}var S=n(o,c,d);return S>-1?g[b?o[S]:S]:t}}function Bf(n){return xr(function(o){var c=o.length,d=c,g=Xt.prototype.thru;for(n&&o.reverse();d--;){var b=o[d];if(typeof b!="function")throw new Jt(u);if(g&&!S&&No(b)=="wrapper")var S=new Xt([],!0)}for(d=S?d:c;++d<c;){b=o[d];var x=No(b),R=x=="wrapper"?zi(b):t;R&&Qi(R[0])&&R[1]==(W|M|I|q)&&!R[4].length&&R[9]==1?S=S[No(R[0])].apply(S,R[3]):S=b.length==1&&Qi(b)?S[x]():S.thru(b)}return function(){var N=arguments,k=N[0];if(S&&N.length==1&&he(k))return S.plant(k).value();for(var B=0,z=c?o[B].apply(this,N):k;++B<c;)z=o[B].call(this,z);return z}})}function Io(n,o,c,d,g,b,S,x,R,N){var k=o&W,B=o&O,z=o&D,te=o&(M|L),ae=o&ee,_e=z?t:Ta(n);function oe(){for(var we=arguments.length,Ae=P(we),Bt=we;Bt--;)Ae[Bt]=arguments[Bt];if(te)var Ot=kn(oe),Wt=Vm(Ae,Ot);if(d&&(Ae=Mf(Ae,d,g,te)),b&&(Ae=$f(Ae,b,S,te)),we-=Wt,te&&we<N){var tt=Hr(Ae,Ot);return Uf(n,o,Io,oe.placeholder,c,Ae,tt,x,R,N-we)}var lr=B?c:this,Dr=z?lr[n]:n;return we=Ae.length,x?Ae=t0(Ae,x):ae&&we>1&&Ae.reverse(),k&&R<we&&(Ae.length=R),this&&this!==pt&&this instanceof oe&&(Dr=_e||Ta(Dr)),Dr.apply(lr,Ae)}return oe}function Wf(n,o){return function(c,d){return ub(c,n,o(d),{})}}function Mo(n,o){return function(c,d){var g;if(c===t&&d===t)return o;if(c!==t&&(g=c),d!==t){if(g===t)return d;typeof c=="string"||typeof d=="string"?(c=kt(c),d=kt(d)):(c=xf(c),d=xf(d)),g=n(c,d)}return g}}function qi(n){return xr(function(o){return o=Ye(o,Nt(re())),Se(function(c){var d=this;return n(o,function(g){return Lt(g,d,c)})})})}function $o(n,o){o=o===t?" ":kt(o);var c=o.length;if(c<2)return c?Ni(o,n):o;var d=Ni(o,Eo(n/Dn(o)));return Rn(o)?Vr(ir(d),0,n).join(""):d.slice(0,n)}function Lb(n,o,c,d){var g=o&O,b=Ta(n);function S(){for(var x=-1,R=arguments.length,N=-1,k=d.length,B=P(k+R),z=this&&this!==pt&&this instanceof S?b:n;++N<k;)B[N]=d[N];for(;R--;)B[N++]=arguments[++x];return Lt(z,g?c:this,B)}return S}function Hf(n){return function(o,c,d){return d&&typeof d!="number"&&xt(o,c,d)&&(c=d=t),o=Rr(o),c===t?(c=o,o=0):c=Rr(c),d=d===t?o<c?1:-1:Rr(d),Eb(o,c,d,n)}}function Lo(n){return function(o,c){return typeof o=="string"&&typeof c=="string"||(o=tr(o),c=tr(c)),n(o,c)}}function Uf(n,o,c,d,g,b,S,x,R,N){var k=o&M,B=k?S:t,z=k?t:S,te=k?b:t,ae=k?t:b;o|=k?I:G,o&=~(k?G:I),o&F||(o&=~(O|D));var _e=[n,o,g,te,B,ae,z,x,R,N],oe=c.apply(t,_e);return Qi(n)&&td(oe,_e),oe.placeholder=d,rd(oe,n,o)}function Gi(n){var o=ot[n];return function(c,d){if(c=tr(c),d=d==null?0:vt(ye(d),292),d&&tf(c)){var g=(Fe(c)+"e").split("e"),b=o(g[0]+"e"+(+g[1]+d));return g=(Fe(b)+"e").split("e"),+(g[0]+"e"+(+g[1]-d))}return o(c)}}var Nb=In&&1/lo(new In([,-0]))[1]==Ge?function(n){return new In(n)}:pc;function qf(n){return function(o){var c=mt(o);return c==Ze?Ei(o):c==wt?ey(o):Ym(o,n(o))}}function Cr(n,o,c,d,g,b,S,x){var R=o&D;if(!R&&typeof n!="function")throw new Jt(u);var N=d?d.length:0;if(N||(o&=~(I|G),d=g=t),S=S===t?S:st(ye(S),0),x=x===t?x:ye(x),N-=g?g.length:0,o&G){var k=d,B=g;d=g=t}var z=R?t:zi(n),te=[n,o,c,d,g,k,B,b,S,x];if(z&&Qb(te,z),n=te[0],o=te[1],c=te[2],d=te[3],g=te[4],x=te[9]=te[9]===t?R?0:n.length:st(te[9]-N,0),!x&&o&(M|L)&&(o&=~(M|L)),!o||o==O)var ae=Mb(n,o,c);else o==M||o==L?ae=$b(n,o,x):(o==I||o==(O|I))&&!g.length?ae=Lb(n,o,c,d):ae=Io.apply(t,te);var _e=z?wf:td;return rd(_e(ae,te),n,o)}function Gf(n,o,c,d){return n===t||ur(n,Fn[c])&&!Ne.call(d,c)?o:n}function Yf(n,o,c,d,g,b){return Ke(n)&&Ke(o)&&(b.set(o,n),Ro(n,o,t,Yf,b),b.delete(o)),n}function kb(n){return xa(n)?t:n}function Vf(n,o,c,d,g,b){var S=c&T,x=n.length,R=o.length;if(x!=R&&!(S&&R>x))return!1;var N=b.get(n),k=b.get(o);if(N&&k)return N==o&&k==n;var B=-1,z=!0,te=c&C?new gn:t;for(b.set(n,o),b.set(o,n);++B<x;){var ae=n[B],_e=o[B];if(d)var oe=S?d(_e,ae,B,o,n,b):d(ae,_e,B,n,o,b);if(oe!==t){if(oe)continue;z=!1;break}if(te){if(!gi(o,function(we,Ae){if(!da(te,Ae)&&(ae===we||g(ae,we,c,d,b)))return te.push(Ae)})){z=!1;break}}else if(!(ae===_e||g(ae,_e,c,d,b))){z=!1;break}}return b.delete(n),b.delete(o),z}function jb(n,o,c,d,g,b,S){switch(c){case kr:if(n.byteLength!=o.byteLength||n.byteOffset!=o.byteOffset)return!1;n=n.buffer,o=o.buffer;case cn:return!(n.byteLength!=o.byteLength||!b(new mo(n),new mo(o)));case ue:case ve:case $t:return ur(+n,+o);case J:return n.name==o.name&&n.message==o.message;case or:case on:return n==o+"";case Ze:var x=Ei;case wt:var R=d&T;if(x||(x=lo),n.size!=o.size&&!R)return!1;var N=S.get(n);if(N)return N==o;d|=C,S.set(n,o);var k=Vf(x(n),x(o),d,g,b,S);return S.delete(n),k;case sn:if(ma)return ma.call(n)==ma.call(o)}return!1}function Bb(n,o,c,d,g,b){var S=c&T,x=Yi(n),R=x.length,N=Yi(o),k=N.length;if(R!=k&&!S)return!1;for(var B=R;B--;){var z=x[B];if(!(S?z in o:Ne.call(o,z)))return!1}var te=b.get(n),ae=b.get(o);if(te&&ae)return te==o&&ae==n;var _e=!0;b.set(n,o),b.set(o,n);for(var oe=S;++B<R;){z=x[B];var we=n[z],Ae=o[z];if(d)var Bt=S?d(Ae,we,z,o,n,b):d(we,Ae,z,n,o,b);if(!(Bt===t?we===Ae||g(we,Ae,c,d,b):Bt)){_e=!1;break}oe||(oe=z=="constructor")}if(_e&&!oe){var Ot=n.constructor,Wt=o.constructor;Ot!=Wt&&"constructor"in n&&"constructor"in o&&!(typeof Ot=="function"&&Ot instanceof Ot&&typeof Wt=="function"&&Wt instanceof Wt)&&(_e=!1)}return b.delete(n),b.delete(o),_e}function xr(n){return ec(Zf(n,t,cd),n+"")}function Yi(n){return pf(n,ut,Ji)}function Vi(n){return pf(n,Ft,zf)}var zi=To?function(n){return To.get(n)}:pc;function No(n){for(var o=n.name+"",c=Mn[o],d=Ne.call(Mn,o)?c.length:0;d--;){var g=c[d],b=g.func;if(b==null||b==n)return g.name}return o}function kn(n){var o=Ne.call(m,"placeholder")?m:n;return o.placeholder}function re(){var n=m.iteratee||fc;return n=n===fc?vf:n,arguments.length?n(arguments[0],arguments[1]):n}function ko(n,o){var c=n.__data__;return zb(o)?c[typeof o=="string"?"string":"hash"]:c.map}function Ki(n){for(var o=ut(n),c=o.length;c--;){var d=o[c],g=n[d];o[c]=[d,g,Xf(g)]}return o}function yn(n,o){var c=Xm(n,o);return gf(c)?c:t}function Wb(n){var o=Ne.call(n,pn),c=n[pn];try{n[pn]=t;var d=!0}catch{}var g=go.call(n);return d&&(o?n[pn]=c:delete n[pn]),g}var Ji=Ti?function(n){return n==null?[]:(n=He(n),Br(Ti(n),function(o){return Zl.call(n,o)}))}:hc,zf=Ti?function(n){for(var o=[];n;)Wr(o,Ji(n)),n=yo(n);return o}:hc,mt=Ct;(wi&&mt(new wi(new ArrayBuffer(1)))!=kr||ha&&mt(new ha)!=Ze||Ci&&mt(Ci.resolve())!=an||In&&mt(new In)!=wt||ga&&mt(new ga)!=Er)&&(mt=function(n){var o=Ct(n),c=o==Yt?n.constructor:t,d=c?bn(c):"";if(d)switch(d){case Ty:return kr;case wy:return Ze;case Cy:return an;case xy:return wt;case Oy:return Er}return o});function Hb(n,o,c){for(var d=-1,g=c.length;++d<g;){var b=c[d],S=b.size;switch(b.type){case"drop":n+=S;break;case"dropRight":o-=S;break;case"take":o=vt(o,n+S);break;case"takeRight":n=st(n,o-S);break}}return{start:n,end:o}}function Ub(n){var o=n.match(Le);return o?o[1].split(Oe):[]}function Kf(n,o,c){o=Yr(o,n);for(var d=-1,g=o.length,b=!1;++d<g;){var S=vr(o[d]);if(!(b=n!=null&&c(n,S)))break;n=n[S]}return b||++d!=g?b:(g=n==null?0:n.length,!!g&&Go(g)&&Or(S,g)&&(he(n)||_n(n)))}function qb(n){var o=n.length,c=new n.constructor(o);return o&&typeof n[0]=="string"&&Ne.call(n,"index")&&(c.index=n.index,c.input=n.input),c}function Jf(n){return typeof n.constructor=="function"&&!wa(n)?$n(yo(n)):{}}function Gb(n,o,c){var d=n.constructor;switch(o){case cn:return Ui(n);case ue:case ve:return new d(+n);case kr:return Ab(n,c);case ia:case ca:case ua:case la:case un:case xn:case pr:case ln:case fn:return Ff(n,c);case Ze:return new d;case $t:case on:return new d(n);case or:return Rb(n);case wt:return new d;case sn:return Db(n)}}function Yb(n,o){var c=o.length;if(!c)return n;var d=c-1;return o[d]=(c>1?"& ":"")+o[d],o=o.join(c>2?", ":" "),n.replace($e,`{
|
|
17
|
-
/* [wrapped with `+
|
|
18
|
-
`)}function Vb(n){return he(n)||_n(n)||!!(ef&&n&&n[ef])}function Or(n,o){var c=typeof n;return o=o??ct,!!o&&(c=="number"||c!="symbol"&&om.test(n))&&n>-1&&n%1==0&&n<o}function xt(n,o,c){if(!Ke(c))return!1;var d=typeof o;return(d=="number"?Pt(c)&&Or(o,c.length):d=="string"&&o in c)?ur(c[o],n):!1}function Xi(n,o){if(he(n))return!1;var c=typeof n;return c=="number"||c=="symbol"||c=="boolean"||n==null||jt(n)?!0:ai.test(n)||!ni.test(n)||o!=null&&n in He(o)}function zb(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}function Qi(n){var o=No(n),c=m[o];if(typeof c!="function"||!(o in xe.prototype))return!1;if(n===c)return!0;var d=zi(c);return!!d&&n===d[0]}function Kb(n){return!!Jl&&Jl in n}var Jb=po?Ar:gc;function wa(n){var o=n&&n.constructor,c=typeof o=="function"&&o.prototype||Fn;return n===c}function Xf(n){return n===n&&!Ke(n)}function Qf(n,o){return function(c){return c==null?!1:c[n]===o&&(o!==t||n in He(c))}}function Xb(n){var o=Uo(n,function(d){return c.size===p&&c.clear(),d}),c=o.cache;return o}function Qb(n,o){var c=n[1],d=o[1],g=c|d,b=g<(O|D|W),S=d==W&&c==M||d==W&&c==q&&n[7].length<=o[8]||d==(W|q)&&o[7].length<=o[8]&&c==M;if(!(b||S))return n;d&O&&(n[2]=o[2],g|=c&O?0:F);var x=o[3];if(x){var R=n[3];n[3]=R?Mf(R,x,o[4]):x,n[4]=R?Hr(n[3],h):o[4]}return x=o[5],x&&(R=n[5],n[5]=R?$f(R,x,o[6]):x,n[6]=R?Hr(n[5],h):o[6]),x=o[7],x&&(n[7]=x),d&W&&(n[8]=n[8]==null?o[8]:vt(n[8],o[8])),n[9]==null&&(n[9]=o[9]),n[0]=o[0],n[1]=g,n}function Zb(n){var o=[];if(n!=null)for(var c in He(n))o.push(c);return o}function e0(n){return go.call(n)}function Zf(n,o,c){return o=st(o===t?n.length-1:o,0),function(){for(var d=arguments,g=-1,b=st(d.length-o,0),S=P(b);++g<b;)S[g]=d[o+g];g=-1;for(var x=P(o+1);++g<o;)x[g]=d[g];return x[o]=c(S),Lt(n,this,x)}}function ed(n,o){return o.length<2?n:mn(n,Zt(o,0,-1))}function t0(n,o){for(var c=n.length,d=vt(o.length,c),g=Dt(n);d--;){var b=o[d];n[d]=Or(b,c)?g[b]:t}return n}function Zi(n,o){if(!(o==="constructor"&&typeof n[o]=="function")&&o!="__proto__")return n[o]}var td=nd(wf),Ca=vy||function(n,o){return pt.setTimeout(n,o)},ec=nd(wb);function rd(n,o,c){var d=o+"";return ec(n,Yb(d,r0(Ub(d),c)))}function nd(n){var o=0,c=0;return function(){var d=_y(),g=X-(d-c);if(c=d,g>0){if(++o>=We)return arguments[0]}else o=0;return n.apply(t,arguments)}}function jo(n,o){var c=-1,d=n.length,g=d-1;for(o=o===t?d:o;++c<o;){var b=Li(c,g),S=n[b];n[b]=n[c],n[c]=S}return n.length=o,n}var ad=Xb(function(n){var o=[];return n.charCodeAt(0)===46&&o.push(""),n.replace(oi,function(c,d,g,b){o.push(g?b.replace(ze,"$1"):d||c)}),o});function vr(n){if(typeof n=="string"||jt(n))return n;var o=n+"";return o=="0"&&1/n==-Ge?"-0":o}function bn(n){if(n!=null){try{return ho.call(n)}catch{}try{return n+""}catch{}}return""}function r0(n,o){return Kt(ce,function(c){var d="_."+c[0];o&c[1]&&!co(n,d)&&n.push(d)}),n.sort()}function od(n){if(n instanceof xe)return n.clone();var o=new Xt(n.__wrapped__,n.__chain__);return o.__actions__=Dt(n.__actions__),o.__index__=n.__index__,o.__values__=n.__values__,o}function n0(n,o,c){(c?xt(n,o,c):o===t)?o=1:o=st(ye(o),0);var d=n==null?0:n.length;if(!d||o<1)return[];for(var g=0,b=0,S=P(Eo(d/o));g<d;)S[b++]=Zt(n,g,g+=o);return S}function a0(n){for(var o=-1,c=n==null?0:n.length,d=0,g=[];++o<c;){var b=n[o];b&&(g[d++]=b)}return g}function o0(){var n=arguments.length;if(!n)return[];for(var o=P(n-1),c=arguments[0],d=n;d--;)o[d-1]=arguments[d];return Wr(he(c)?Dt(c):[c],ht(o,1))}var s0=Se(function(n,o){return et(n)?ba(n,ht(o,1,et,!0)):[]}),i0=Se(function(n,o){var c=er(o);return et(c)&&(c=t),et(n)?ba(n,ht(o,1,et,!0),re(c,2)):[]}),c0=Se(function(n,o){var c=er(o);return et(c)&&(c=t),et(n)?ba(n,ht(o,1,et,!0),t,c):[]});function u0(n,o,c){var d=n==null?0:n.length;return d?(o=c||o===t?1:ye(o),Zt(n,o<0?0:o,d)):[]}function l0(n,o,c){var d=n==null?0:n.length;return d?(o=c||o===t?1:ye(o),o=d-o,Zt(n,0,o<0?0:o)):[]}function f0(n,o){return n&&n.length?Po(n,re(o,3),!0,!0):[]}function d0(n,o){return n&&n.length?Po(n,re(o,3),!0):[]}function p0(n,o,c,d){var g=n==null?0:n.length;return g?(c&&typeof c!="number"&&xt(n,o,c)&&(c=0,d=g),ob(n,o,c,d)):[]}function sd(n,o,c){var d=n==null?0:n.length;if(!d)return-1;var g=c==null?0:ye(c);return g<0&&(g=st(d+g,0)),uo(n,re(o,3),g)}function id(n,o,c){var d=n==null?0:n.length;if(!d)return-1;var g=d-1;return c!==t&&(g=ye(c),g=c<0?st(d+g,0):vt(g,d-1)),uo(n,re(o,3),g,!0)}function cd(n){var o=n==null?0:n.length;return o?ht(n,1):[]}function h0(n){var o=n==null?0:n.length;return o?ht(n,Ge):[]}function g0(n,o){var c=n==null?0:n.length;return c?(o=o===t?1:ye(o),ht(n,o)):[]}function v0(n){for(var o=-1,c=n==null?0:n.length,d={};++o<c;){var g=n[o];d[g[0]]=g[1]}return d}function ud(n){return n&&n.length?n[0]:t}function m0(n,o,c){var d=n==null?0:n.length;if(!d)return-1;var g=c==null?0:ye(c);return g<0&&(g=st(d+g,0)),An(n,o,g)}function y0(n){var o=n==null?0:n.length;return o?Zt(n,0,-1):[]}var b0=Se(function(n){var o=Ye(n,Wi);return o.length&&o[0]===n[0]?Pi(o):[]}),_0=Se(function(n){var o=er(n),c=Ye(n,Wi);return o===er(c)?o=t:c.pop(),c.length&&c[0]===n[0]?Pi(c,re(o,2)):[]}),E0=Se(function(n){var o=er(n),c=Ye(n,Wi);return o=typeof o=="function"?o:t,o&&c.pop(),c.length&&c[0]===n[0]?Pi(c,t,o):[]});function S0(n,o){return n==null?"":yy.call(n,o)}function er(n){var o=n==null?0:n.length;return o?n[o-1]:t}function T0(n,o,c){var d=n==null?0:n.length;if(!d)return-1;var g=d;return c!==t&&(g=ye(c),g=g<0?st(d+g,0):vt(g,d-1)),o===o?ry(n,o,g):uo(n,Hl,g,!0)}function w0(n,o){return n&&n.length?_f(n,ye(o)):t}var C0=Se(ld);function ld(n,o){return n&&n.length&&o&&o.length?$i(n,o):n}function x0(n,o,c){return n&&n.length&&o&&o.length?$i(n,o,re(c,2)):n}function O0(n,o,c){return n&&n.length&&o&&o.length?$i(n,o,t,c):n}var A0=xr(function(n,o){var c=n==null?0:n.length,d=Oi(n,o);return Tf(n,Ye(o,function(g){return Or(g,c)?+g:g}).sort(If)),d});function R0(n,o){var c=[];if(!(n&&n.length))return c;var d=-1,g=[],b=n.length;for(o=re(o,3);++d<b;){var S=n[d];o(S,d,n)&&(c.push(S),g.push(d))}return Tf(n,g),c}function tc(n){return n==null?n:Sy.call(n)}function D0(n,o,c){var d=n==null?0:n.length;return d?(c&&typeof c!="number"&&xt(n,o,c)?(o=0,c=d):(o=o==null?0:ye(o),c=c===t?d:ye(c)),Zt(n,o,c)):[]}function P0(n,o){return Do(n,o)}function F0(n,o,c){return ki(n,o,re(c,2))}function I0(n,o){var c=n==null?0:n.length;if(c){var d=Do(n,o);if(d<c&&ur(n[d],o))return d}return-1}function M0(n,o){return Do(n,o,!0)}function $0(n,o,c){return ki(n,o,re(c,2),!0)}function L0(n,o){var c=n==null?0:n.length;if(c){var d=Do(n,o,!0)-1;if(ur(n[d],o))return d}return-1}function N0(n){return n&&n.length?Cf(n):[]}function k0(n,o){return n&&n.length?Cf(n,re(o,2)):[]}function j0(n){var o=n==null?0:n.length;return o?Zt(n,1,o):[]}function B0(n,o,c){return n&&n.length?(o=c||o===t?1:ye(o),Zt(n,0,o<0?0:o)):[]}function W0(n,o,c){var d=n==null?0:n.length;return d?(o=c||o===t?1:ye(o),o=d-o,Zt(n,o<0?0:o,d)):[]}function H0(n,o){return n&&n.length?Po(n,re(o,3),!1,!0):[]}function U0(n,o){return n&&n.length?Po(n,re(o,3)):[]}var q0=Se(function(n){return Gr(ht(n,1,et,!0))}),G0=Se(function(n){var o=er(n);return et(o)&&(o=t),Gr(ht(n,1,et,!0),re(o,2))}),Y0=Se(function(n){var o=er(n);return o=typeof o=="function"?o:t,Gr(ht(n,1,et,!0),t,o)});function V0(n){return n&&n.length?Gr(n):[]}function z0(n,o){return n&&n.length?Gr(n,re(o,2)):[]}function K0(n,o){return o=typeof o=="function"?o:t,n&&n.length?Gr(n,t,o):[]}function rc(n){if(!(n&&n.length))return[];var o=0;return n=Br(n,function(c){if(et(c))return o=st(c.length,o),!0}),bi(o,function(c){return Ye(n,vi(c))})}function fd(n,o){if(!(n&&n.length))return[];var c=rc(n);return o==null?c:Ye(c,function(d){return Lt(o,t,d)})}var J0=Se(function(n,o){return et(n)?ba(n,o):[]}),X0=Se(function(n){return Bi(Br(n,et))}),Q0=Se(function(n){var o=er(n);return et(o)&&(o=t),Bi(Br(n,et),re(o,2))}),Z0=Se(function(n){var o=er(n);return o=typeof o=="function"?o:t,Bi(Br(n,et),t,o)}),e_=Se(rc);function t_(n,o){return Rf(n||[],o||[],ya)}function r_(n,o){return Rf(n||[],o||[],Sa)}var n_=Se(function(n){var o=n.length,c=o>1?n[o-1]:t;return c=typeof c=="function"?(n.pop(),c):t,fd(n,c)});function dd(n){var o=m(n);return o.__chain__=!0,o}function a_(n,o){return o(n),n}function Bo(n,o){return o(n)}var o_=xr(function(n){var o=n.length,c=o?n[0]:0,d=this.__wrapped__,g=function(b){return Oi(b,n)};return o>1||this.__actions__.length||!(d instanceof xe)||!Or(c)?this.thru(g):(d=d.slice(c,+c+(o?1:0)),d.__actions__.push({func:Bo,args:[g],thisArg:t}),new Xt(d,this.__chain__).thru(function(b){return o&&!b.length&&b.push(t),b}))});function s_(){return dd(this)}function i_(){return new Xt(this.value(),this.__chain__)}function c_(){this.__values__===t&&(this.__values__=xd(this.value()));var n=this.__index__>=this.__values__.length,o=n?t:this.__values__[this.__index__++];return{done:n,value:o}}function u_(){return this}function l_(n){for(var o,c=this;c instanceof Co;){var d=od(c);d.__index__=0,d.__values__=t,o?g.__wrapped__=d:o=d;var g=d;c=c.__wrapped__}return g.__wrapped__=n,o}function f_(){var n=this.__wrapped__;if(n instanceof xe){var o=n;return this.__actions__.length&&(o=new xe(this)),o=o.reverse(),o.__actions__.push({func:Bo,args:[tc],thisArg:t}),new Xt(o,this.__chain__)}return this.thru(tc)}function d_(){return Af(this.__wrapped__,this.__actions__)}var p_=Fo(function(n,o,c){Ne.call(n,c)?++n[c]:wr(n,c,1)});function h_(n,o,c){var d=he(n)?Bl:ab;return c&&xt(n,o,c)&&(o=t),d(n,re(o,3))}function g_(n,o){var c=he(n)?Br:ff;return c(n,re(o,3))}var v_=jf(sd),m_=jf(id);function y_(n,o){return ht(Wo(n,o),1)}function b_(n,o){return ht(Wo(n,o),Ge)}function __(n,o,c){return c=c===t?1:ye(c),ht(Wo(n,o),c)}function pd(n,o){var c=he(n)?Kt:qr;return c(n,re(o,3))}function hd(n,o){var c=he(n)?jm:lf;return c(n,re(o,3))}var E_=Fo(function(n,o,c){Ne.call(n,c)?n[c].push(o):wr(n,c,[o])});function S_(n,o,c,d){n=Pt(n)?n:Bn(n),c=c&&!d?ye(c):0;var g=n.length;return c<0&&(c=st(g+c,0)),Yo(n)?c<=g&&n.indexOf(o,c)>-1:!!g&&An(n,o,c)>-1}var T_=Se(function(n,o,c){var d=-1,g=typeof o=="function",b=Pt(n)?P(n.length):[];return qr(n,function(S){b[++d]=g?Lt(o,S,c):_a(S,o,c)}),b}),w_=Fo(function(n,o,c){wr(n,c,o)});function Wo(n,o){var c=he(n)?Ye:mf;return c(n,re(o,3))}function C_(n,o,c,d){return n==null?[]:(he(o)||(o=o==null?[]:[o]),c=d?t:c,he(c)||(c=c==null?[]:[c]),Ef(n,o,c))}var x_=Fo(function(n,o,c){n[c?0:1].push(o)},function(){return[[],[]]});function O_(n,o,c){var d=he(n)?hi:ql,g=arguments.length<3;return d(n,re(o,4),c,g,qr)}function A_(n,o,c){var d=he(n)?Bm:ql,g=arguments.length<3;return d(n,re(o,4),c,g,lf)}function R_(n,o){var c=he(n)?Br:ff;return c(n,qo(re(o,3)))}function D_(n){var o=he(n)?of:Sb;return o(n)}function P_(n,o,c){(c?xt(n,o,c):o===t)?o=1:o=ye(o);var d=he(n)?Zy:Tb;return d(n,o)}function F_(n){var o=he(n)?eb:Cb;return o(n)}function I_(n){if(n==null)return 0;if(Pt(n))return Yo(n)?Dn(n):n.length;var o=mt(n);return o==Ze||o==wt?n.size:Ii(n).length}function M_(n,o,c){var d=he(n)?gi:xb;return c&&xt(n,o,c)&&(o=t),d(n,re(o,3))}var $_=Se(function(n,o){if(n==null)return[];var c=o.length;return c>1&&xt(n,o[0],o[1])?o=[]:c>2&&xt(o[0],o[1],o[2])&&(o=[o[0]]),Ef(n,ht(o,1),[])}),Ho=gy||function(){return pt.Date.now()};function L_(n,o){if(typeof o!="function")throw new Jt(u);return n=ye(n),function(){if(--n<1)return o.apply(this,arguments)}}function gd(n,o,c){return o=c?t:o,o=n&&o==null?n.length:o,Cr(n,W,t,t,t,t,o)}function vd(n,o){var c;if(typeof o!="function")throw new Jt(u);return n=ye(n),function(){return--n>0&&(c=o.apply(this,arguments)),n<=1&&(o=t),c}}var nc=Se(function(n,o,c){var d=O;if(c.length){var g=Hr(c,kn(nc));d|=I}return Cr(n,d,o,c,g)}),md=Se(function(n,o,c){var d=O|D;if(c.length){var g=Hr(c,kn(md));d|=I}return Cr(o,d,n,c,g)});function yd(n,o,c){o=c?t:o;var d=Cr(n,M,t,t,t,t,t,o);return d.placeholder=yd.placeholder,d}function bd(n,o,c){o=c?t:o;var d=Cr(n,L,t,t,t,t,t,o);return d.placeholder=bd.placeholder,d}function _d(n,o,c){var d,g,b,S,x,R,N=0,k=!1,B=!1,z=!0;if(typeof n!="function")throw new Jt(u);o=tr(o)||0,Ke(c)&&(k=!!c.leading,B="maxWait"in c,b=B?st(tr(c.maxWait)||0,o):b,z="trailing"in c?!!c.trailing:z);function te(tt){var lr=d,Dr=g;return d=g=t,N=tt,S=n.apply(Dr,lr),S}function ae(tt){return N=tt,x=Ca(we,o),k?te(tt):S}function _e(tt){var lr=tt-R,Dr=tt-N,jd=o-lr;return B?vt(jd,b-Dr):jd}function oe(tt){var lr=tt-R,Dr=tt-N;return R===t||lr>=o||lr<0||B&&Dr>=b}function we(){var tt=Ho();if(oe(tt))return Ae(tt);x=Ca(we,_e(tt))}function Ae(tt){return x=t,z&&d?te(tt):(d=g=t,S)}function Bt(){x!==t&&Df(x),N=0,d=R=g=x=t}function Ot(){return x===t?S:Ae(Ho())}function Wt(){var tt=Ho(),lr=oe(tt);if(d=arguments,g=this,R=tt,lr){if(x===t)return ae(R);if(B)return Df(x),x=Ca(we,o),te(R)}return x===t&&(x=Ca(we,o)),S}return Wt.cancel=Bt,Wt.flush=Ot,Wt}var N_=Se(function(n,o){return uf(n,1,o)}),k_=Se(function(n,o,c){return uf(n,tr(o)||0,c)});function j_(n){return Cr(n,ee)}function Uo(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new Jt(u);var c=function(){var d=arguments,g=o?o.apply(this,d):d[0],b=c.cache;if(b.has(g))return b.get(g);var S=n.apply(this,d);return c.cache=b.set(g,S)||b,S};return c.cache=new(Uo.Cache||Tr),c}Uo.Cache=Tr;function qo(n){if(typeof n!="function")throw new Jt(u);return function(){var o=arguments;switch(o.length){case 0:return!n.call(this);case 1:return!n.call(this,o[0]);case 2:return!n.call(this,o[0],o[1]);case 3:return!n.call(this,o[0],o[1],o[2])}return!n.apply(this,o)}}function B_(n){return vd(2,n)}var W_=Ob(function(n,o){o=o.length==1&&he(o[0])?Ye(o[0],Nt(re())):Ye(ht(o,1),Nt(re()));var c=o.length;return Se(function(d){for(var g=-1,b=vt(d.length,c);++g<b;)d[g]=o[g].call(this,d[g]);return Lt(n,this,d)})}),ac=Se(function(n,o){var c=Hr(o,kn(ac));return Cr(n,I,t,o,c)}),Ed=Se(function(n,o){var c=Hr(o,kn(Ed));return Cr(n,G,t,o,c)}),H_=xr(function(n,o){return Cr(n,q,t,t,t,o)});function U_(n,o){if(typeof n!="function")throw new Jt(u);return o=o===t?o:ye(o),Se(n,o)}function q_(n,o){if(typeof n!="function")throw new Jt(u);return o=o==null?0:st(ye(o),0),Se(function(c){var d=c[o],g=Vr(c,0,o);return d&&Wr(g,d),Lt(n,this,g)})}function G_(n,o,c){var d=!0,g=!0;if(typeof n!="function")throw new Jt(u);return Ke(c)&&(d="leading"in c?!!c.leading:d,g="trailing"in c?!!c.trailing:g),_d(n,o,{leading:d,maxWait:o,trailing:g})}function Y_(n){return gd(n,1)}function V_(n,o){return ac(Hi(o),n)}function z_(){if(!arguments.length)return[];var n=arguments[0];return he(n)?n:[n]}function K_(n){return Qt(n,E)}function J_(n,o){return o=typeof o=="function"?o:t,Qt(n,E,o)}function X_(n){return Qt(n,y|E)}function Q_(n,o){return o=typeof o=="function"?o:t,Qt(n,y|E,o)}function Z_(n,o){return o==null||cf(n,o,ut(o))}function ur(n,o){return n===o||n!==n&&o!==o}var eE=Lo(Di),tE=Lo(function(n,o){return n>=o}),_n=hf(function(){return arguments}())?hf:function(n){return Xe(n)&&Ne.call(n,"callee")&&!Zl.call(n,"callee")},he=P.isArray,rE=Ml?Nt(Ml):lb;function Pt(n){return n!=null&&Go(n.length)&&!Ar(n)}function et(n){return Xe(n)&&Pt(n)}function nE(n){return n===!0||n===!1||Xe(n)&&Ct(n)==ue}var zr=my||gc,aE=$l?Nt($l):fb;function oE(n){return Xe(n)&&n.nodeType===1&&!xa(n)}function sE(n){if(n==null)return!0;if(Pt(n)&&(he(n)||typeof n=="string"||typeof n.splice=="function"||zr(n)||jn(n)||_n(n)))return!n.length;var o=mt(n);if(o==Ze||o==wt)return!n.size;if(wa(n))return!Ii(n).length;for(var c in n)if(Ne.call(n,c))return!1;return!0}function iE(n,o){return Ea(n,o)}function cE(n,o,c){c=typeof c=="function"?c:t;var d=c?c(n,o):t;return d===t?Ea(n,o,t,c):!!d}function oc(n){if(!Xe(n))return!1;var o=Ct(n);return o==J||o==me||typeof n.message=="string"&&typeof n.name=="string"&&!xa(n)}function uE(n){return typeof n=="number"&&tf(n)}function Ar(n){if(!Ke(n))return!1;var o=Ct(n);return o==Y||o==Qe||o==le||o==Qs}function Sd(n){return typeof n=="number"&&n==ye(n)}function Go(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ct}function Ke(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}function Xe(n){return n!=null&&typeof n=="object"}var Td=Ll?Nt(Ll):pb;function lE(n,o){return n===o||Fi(n,o,Ki(o))}function fE(n,o,c){return c=typeof c=="function"?c:t,Fi(n,o,Ki(o),c)}function dE(n){return wd(n)&&n!=+n}function pE(n){if(Jb(n))throw new fe(i);return gf(n)}function hE(n){return n===null}function gE(n){return n==null}function wd(n){return typeof n=="number"||Xe(n)&&Ct(n)==$t}function xa(n){if(!Xe(n)||Ct(n)!=Yt)return!1;var o=yo(n);if(o===null)return!0;var c=Ne.call(o,"constructor")&&o.constructor;return typeof c=="function"&&c instanceof c&&ho.call(c)==fy}var sc=Nl?Nt(Nl):hb;function vE(n){return Sd(n)&&n>=-ct&&n<=ct}var Cd=kl?Nt(kl):gb;function Yo(n){return typeof n=="string"||!he(n)&&Xe(n)&&Ct(n)==on}function jt(n){return typeof n=="symbol"||Xe(n)&&Ct(n)==sn}var jn=jl?Nt(jl):vb;function mE(n){return n===t}function yE(n){return Xe(n)&&mt(n)==Er}function bE(n){return Xe(n)&&Ct(n)==Zs}var _E=Lo(Mi),EE=Lo(function(n,o){return n<=o});function xd(n){if(!n)return[];if(Pt(n))return Yo(n)?ir(n):Dt(n);if(pa&&n[pa])return Zm(n[pa]());var o=mt(n),c=o==Ze?Ei:o==wt?lo:Bn;return c(n)}function Rr(n){if(!n)return n===0?n:0;if(n=tr(n),n===Ge||n===-Ge){var o=n<0?-1:1;return o*dr}return n===n?n:0}function ye(n){var o=Rr(n),c=o%1;return o===o?c?o-c:o:0}function Od(n){return n?vn(ye(n),0,V):0}function tr(n){if(typeof n=="number")return n;if(jt(n))return H;if(Ke(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Ke(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=Gl(n);var c=ao.test(n);return c||am.test(n)?Lm(n.slice(2),c?2:8):jr.test(n)?H:+n}function Ad(n){return gr(n,Ft(n))}function SE(n){return n?vn(ye(n),-ct,ct):n===0?n:0}function Fe(n){return n==null?"":kt(n)}var TE=Ln(function(n,o){if(wa(o)||Pt(o)){gr(o,ut(o),n);return}for(var c in o)Ne.call(o,c)&&ya(n,c,o[c])}),Rd=Ln(function(n,o){gr(o,Ft(o),n)}),Vo=Ln(function(n,o,c,d){gr(o,Ft(o),n,d)}),wE=Ln(function(n,o,c,d){gr(o,ut(o),n,d)}),CE=xr(Oi);function xE(n,o){var c=$n(n);return o==null?c:sf(c,o)}var OE=Se(function(n,o){n=He(n);var c=-1,d=o.length,g=d>2?o[2]:t;for(g&&xt(o[0],o[1],g)&&(d=1);++c<d;)for(var b=o[c],S=Ft(b),x=-1,R=S.length;++x<R;){var N=S[x],k=n[N];(k===t||ur(k,Fn[N])&&!Ne.call(n,N))&&(n[N]=b[N])}return n}),AE=Se(function(n){return n.push(t,Yf),Lt(Dd,t,n)});function RE(n,o){return Wl(n,re(o,3),hr)}function DE(n,o){return Wl(n,re(o,3),Ri)}function PE(n,o){return n==null?n:Ai(n,re(o,3),Ft)}function FE(n,o){return n==null?n:df(n,re(o,3),Ft)}function IE(n,o){return n&&hr(n,re(o,3))}function ME(n,o){return n&&Ri(n,re(o,3))}function $E(n){return n==null?[]:Ao(n,ut(n))}function LE(n){return n==null?[]:Ao(n,Ft(n))}function ic(n,o,c){var d=n==null?t:mn(n,o);return d===t?c:d}function NE(n,o){return n!=null&&Kf(n,o,sb)}function cc(n,o){return n!=null&&Kf(n,o,ib)}var kE=Wf(function(n,o,c){o!=null&&typeof o.toString!="function"&&(o=go.call(o)),n[o]=c},lc(It)),jE=Wf(function(n,o,c){o!=null&&typeof o.toString!="function"&&(o=go.call(o)),Ne.call(n,o)?n[o].push(c):n[o]=[c]},re),BE=Se(_a);function ut(n){return Pt(n)?af(n):Ii(n)}function Ft(n){return Pt(n)?af(n,!0):mb(n)}function WE(n,o){var c={};return o=re(o,3),hr(n,function(d,g,b){wr(c,o(d,g,b),d)}),c}function HE(n,o){var c={};return o=re(o,3),hr(n,function(d,g,b){wr(c,g,o(d,g,b))}),c}var UE=Ln(function(n,o,c){Ro(n,o,c)}),Dd=Ln(function(n,o,c,d){Ro(n,o,c,d)}),qE=xr(function(n,o){var c={};if(n==null)return c;var d=!1;o=Ye(o,function(b){return b=Yr(b,n),d||(d=b.length>1),b}),gr(n,Vi(n),c),d&&(c=Qt(c,y|_|E,kb));for(var g=o.length;g--;)ji(c,o[g]);return c});function GE(n,o){return Pd(n,qo(re(o)))}var YE=xr(function(n,o){return n==null?{}:bb(n,o)});function Pd(n,o){if(n==null)return{};var c=Ye(Vi(n),function(d){return[d]});return o=re(o),Sf(n,c,function(d,g){return o(d,g[0])})}function VE(n,o,c){o=Yr(o,n);var d=-1,g=o.length;for(g||(g=1,n=t);++d<g;){var b=n==null?t:n[vr(o[d])];b===t&&(d=g,b=c),n=Ar(b)?b.call(n):b}return n}function zE(n,o,c){return n==null?n:Sa(n,o,c)}function KE(n,o,c,d){return d=typeof d=="function"?d:t,n==null?n:Sa(n,o,c,d)}var Fd=qf(ut),Id=qf(Ft);function JE(n,o,c){var d=he(n),g=d||zr(n)||jn(n);if(o=re(o,4),c==null){var b=n&&n.constructor;g?c=d?new b:[]:Ke(n)?c=Ar(b)?$n(yo(n)):{}:c={}}return(g?Kt:hr)(n,function(S,x,R){return o(c,S,x,R)}),c}function XE(n,o){return n==null?!0:ji(n,o)}function QE(n,o,c){return n==null?n:Of(n,o,Hi(c))}function ZE(n,o,c,d){return d=typeof d=="function"?d:t,n==null?n:Of(n,o,Hi(c),d)}function Bn(n){return n==null?[]:_i(n,ut(n))}function eS(n){return n==null?[]:_i(n,Ft(n))}function tS(n,o,c){return c===t&&(c=o,o=t),c!==t&&(c=tr(c),c=c===c?c:0),o!==t&&(o=tr(o),o=o===o?o:0),vn(tr(n),o,c)}function rS(n,o,c){return o=Rr(o),c===t?(c=o,o=0):c=Rr(c),n=tr(n),cb(n,o,c)}function nS(n,o,c){if(c&&typeof c!="boolean"&&xt(n,o,c)&&(o=c=t),c===t&&(typeof o=="boolean"?(c=o,o=t):typeof n=="boolean"&&(c=n,n=t)),n===t&&o===t?(n=0,o=1):(n=Rr(n),o===t?(o=n,n=0):o=Rr(o)),n>o){var d=n;n=o,o=d}if(c||n%1||o%1){var g=rf();return vt(n+g*(o-n+$m("1e-"+((g+"").length-1))),o)}return Li(n,o)}var aS=Nn(function(n,o,c){return o=o.toLowerCase(),n+(c?Md(o):o)});function Md(n){return uc(Fe(n).toLowerCase())}function $d(n){return n=Fe(n),n&&n.replace(sm,zm).replace(Cm,"")}function oS(n,o,c){n=Fe(n),o=kt(o);var d=n.length;c=c===t?d:vn(ye(c),0,d);var g=c;return c-=o.length,c>=0&&n.slice(c,g)==o}function sS(n){return n=Fe(n),n&&ti.test(n)?n.replace(fa,Km):n}function iS(n){return n=Fe(n),n&&U.test(n)?n.replace(w,"\\$&"):n}var cS=Nn(function(n,o,c){return n+(c?"-":"")+o.toLowerCase()}),uS=Nn(function(n,o,c){return n+(c?" ":"")+o.toLowerCase()}),lS=kf("toLowerCase");function fS(n,o,c){n=Fe(n),o=ye(o);var d=o?Dn(n):0;if(!o||d>=o)return n;var g=(o-d)/2;return $o(So(g),c)+n+$o(Eo(g),c)}function dS(n,o,c){n=Fe(n),o=ye(o);var d=o?Dn(n):0;return o&&d<o?n+$o(o-d,c):n}function pS(n,o,c){n=Fe(n),o=ye(o);var d=o?Dn(n):0;return o&&d<o?$o(o-d,c)+n:n}function hS(n,o,c){return c||o==null?o=0:o&&(o=+o),Ey(Fe(n).replace(K,""),o||0)}function gS(n,o,c){return(c?xt(n,o,c):o===t)?o=1:o=ye(o),Ni(Fe(n),o)}function vS(){var n=arguments,o=Fe(n[0]);return n.length<3?o:o.replace(n[1],n[2])}var mS=Nn(function(n,o,c){return n+(c?"_":"")+o.toLowerCase()});function yS(n,o,c){return c&&typeof c!="number"&&xt(n,o,c)&&(o=c=t),c=c===t?V:c>>>0,c?(n=Fe(n),n&&(typeof o=="string"||o!=null&&!sc(o))&&(o=kt(o),!o&&Rn(n))?Vr(ir(n),0,c):n.split(o,c)):[]}var bS=Nn(function(n,o,c){return n+(c?" ":"")+uc(o)});function _S(n,o,c){return n=Fe(n),c=c==null?0:vn(ye(c),0,n.length),o=kt(o),n.slice(c,c+o.length)==o}function ES(n,o,c){var d=m.templateSettings;c&&xt(n,o,c)&&(o=t),n=Fe(n),o=Vo({},o,d,Gf);var g=Vo({},o.imports,d.imports,Gf),b=ut(g),S=_i(g,b),x,R,N=0,k=o.interpolate||oo,B="__p += '",z=Si((o.escape||oo).source+"|"+k.source+"|"+(k===no?Je:oo).source+"|"+(o.evaluate||oo).source+"|$","g"),te="//# sourceURL="+(Ne.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Dm+"]")+`
|
|
19
|
-
`;
|
|
20
|
-
__e(`+
|
|
21
|
-
'`),
|
|
22
|
-
`+
|
|
23
|
-
__p += '`),Ae&&(
|
|
88
|
+
*/mu.exports;(function(e,t){(function(){var r,n="4.17.21",a=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",m=1,g=2,y=4,E=1,S=2,T=1,C=2,A=4,P=8,$=16,_=32,M=64,W=128,G=256,Q=512,we=30,Oe="...",Ke=800,X=16,xt=1,dn=2,Pt=3,lt=1/0,St=9007199254740991,pn=17976931348623157e292,H=NaN,q=4294967295,me=q-1,de=q>>>1,se=[["ary",W],["bind",T],["bindKey",C],["curry",P],["curryRight",$],["flip",Q],["partial",_],["partialRight",M],["rearg",G]],le="[object Arguments]",ue="[object Array]",pe="[object AsyncFunction]",he="[object Boolean]",ye="[object Date]",Ee="[object DOMException]",V="[object Error]",F="[object Function]",at="[object GeneratorFunction]",Ze="[object Map]",$r="[object Number]",Pw="[object Null]",hn="[object Object]",Hp="[object Promise]",Rw="[object Proxy]",xi="[object RegExp]",Ir="[object Set]",Pi="[object String]",Ho="[object Symbol]",Dw="[object Undefined]",Ri="[object WeakMap]",$w="[object WeakSet]",Di="[object ArrayBuffer]",La="[object DataView]",vc="[object Float32Array]",yc="[object Float64Array]",bc="[object Int8Array]",Sc="[object Int16Array]",wc="[object Int32Array]",Ec="[object Uint8Array]",_c="[object Uint8ClampedArray]",Tc="[object Uint16Array]",Oc="[object Uint32Array]",Iw=/\b__p \+= '';/g,Mw=/\b(__p \+=) '' \+/g,Fw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Up=/&(?:amp|lt|gt|quot|#39);/g,Gp=/[&<>"']/g,Nw=RegExp(Up.source),Lw=RegExp(Gp.source),kw=/<%-([\s\S]+?)%>/g,jw=/<%([\s\S]+?)%>/g,qp=/<%=([\s\S]+?)%>/g,Ww=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bw=/^\w*$/,zw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cc=/[\\^$.*+?()[\]{}|]/g,Hw=RegExp(Cc.source),Ac=/^\s+/,Uw=/\s/,Gw=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qw=/\{\n\/\* \[wrapped with (.+)\] \*/,Yw=/,? & /,Kw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vw=/[()=,{}\[\]\/\s]/,Zw=/\\(\\)?/g,Jw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yp=/\w*$/,Xw=/^[-+]0x[0-9a-f]+$/i,Qw=/^0b[01]+$/i,eE=/^\[object .+?Constructor\]$/,tE=/^0o[0-7]+$/i,rE=/^(?:0|[1-9]\d*)$/,nE=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Uo=/($^)/,aE=/['\n\r\u2028\u2029\\]/g,Go="\\ud800-\\udfff",iE="\\u0300-\\u036f",oE="\\ufe20-\\ufe2f",sE="\\u20d0-\\u20ff",Kp=iE+oE+sE,Vp="\\u2700-\\u27bf",Zp="a-z\\xdf-\\xf6\\xf8-\\xff",uE="\\xac\\xb1\\xd7\\xf7",cE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lE="\\u2000-\\u206f",fE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Jp="A-Z\\xc0-\\xd6\\xd8-\\xde",Xp="\\ufe0e\\ufe0f",Qp=uE+cE+lE+fE,xc="['’]",dE="["+Go+"]",eh="["+Qp+"]",qo="["+Kp+"]",th="\\d+",pE="["+Vp+"]",rh="["+Zp+"]",nh="[^"+Go+Qp+th+Vp+Zp+Jp+"]",Pc="\\ud83c[\\udffb-\\udfff]",hE="(?:"+qo+"|"+Pc+")",ah="[^"+Go+"]",Rc="(?:\\ud83c[\\udde6-\\uddff]){2}",Dc="[\\ud800-\\udbff][\\udc00-\\udfff]",ka="["+Jp+"]",ih="\\u200d",oh="(?:"+rh+"|"+nh+")",mE="(?:"+ka+"|"+nh+")",sh="(?:"+xc+"(?:d|ll|m|re|s|t|ve))?",uh="(?:"+xc+"(?:D|LL|M|RE|S|T|VE))?",ch=hE+"?",lh="["+Xp+"]?",gE="(?:"+ih+"(?:"+[ah,Rc,Dc].join("|")+")"+lh+ch+")*",vE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fh=lh+ch+gE,bE="(?:"+[pE,Rc,Dc].join("|")+")"+fh,SE="(?:"+[ah+qo+"?",qo,Rc,Dc,dE].join("|")+")",wE=RegExp(xc,"g"),EE=RegExp(qo,"g"),$c=RegExp(Pc+"(?="+Pc+")|"+SE+fh,"g"),_E=RegExp([ka+"?"+rh+"+"+sh+"(?="+[eh,ka,"$"].join("|")+")",mE+"+"+uh+"(?="+[eh,ka+oh,"$"].join("|")+")",ka+"?"+oh+"+"+sh,ka+"+"+uh,yE,vE,th,bE].join("|"),"g"),TE=RegExp("["+ih+Go+Kp+Xp+"]"),OE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,CE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],AE=-1,Ve={};Ve[vc]=Ve[yc]=Ve[bc]=Ve[Sc]=Ve[wc]=Ve[Ec]=Ve[_c]=Ve[Tc]=Ve[Oc]=!0,Ve[le]=Ve[ue]=Ve[Di]=Ve[he]=Ve[La]=Ve[ye]=Ve[V]=Ve[F]=Ve[Ze]=Ve[$r]=Ve[hn]=Ve[xi]=Ve[Ir]=Ve[Pi]=Ve[Ri]=!1;var Ye={};Ye[le]=Ye[ue]=Ye[Di]=Ye[La]=Ye[he]=Ye[ye]=Ye[vc]=Ye[yc]=Ye[bc]=Ye[Sc]=Ye[wc]=Ye[Ze]=Ye[$r]=Ye[hn]=Ye[xi]=Ye[Ir]=Ye[Pi]=Ye[Ho]=Ye[Ec]=Ye[_c]=Ye[Tc]=Ye[Oc]=!0,Ye[V]=Ye[F]=Ye[Ri]=!1;var xE={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},PE={"&":"&","<":"<",">":">",'"':""","'":"'"},RE={"&":"&","<":"<",">":">",""":'"',"'":"'"},DE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$E=parseFloat,IE=parseInt,dh=typeof Br=="object"&&Br&&Br.Object===Object&&Br,ME=typeof self=="object"&&self&&self.Object===Object&&self,Rt=dh||ME||Function("return this")(),Ic=t&&!t.nodeType&&t,pa=Ic&&!0&&e&&!e.nodeType&&e,ph=pa&&pa.exports===Ic,Mc=ph&&dh.process,br=function(){try{var R=pa&&pa.require&&pa.require("util").types;return R||Mc&&Mc.binding&&Mc.binding("util")}catch{}}(),hh=br&&br.isArrayBuffer,mh=br&&br.isDate,gh=br&&br.isMap,vh=br&&br.isRegExp,yh=br&&br.isSet,bh=br&&br.isTypedArray;function ir(R,L,I){switch(I.length){case 0:return R.call(L);case 1:return R.call(L,I[0]);case 2:return R.call(L,I[0],I[1]);case 3:return R.call(L,I[0],I[1],I[2])}return R.apply(L,I)}function FE(R,L,I,J){for(var ce=-1,De=R==null?0:R.length;++ce<De;){var mt=R[ce];L(J,mt,I(mt),R)}return J}function Sr(R,L){for(var I=-1,J=R==null?0:R.length;++I<J&&L(R[I],I,R)!==!1;);return R}function NE(R,L){for(var I=R==null?0:R.length;I--&&L(R[I],I,R)!==!1;);return R}function Sh(R,L){for(var I=-1,J=R==null?0:R.length;++I<J;)if(!L(R[I],I,R))return!1;return!0}function Fn(R,L){for(var I=-1,J=R==null?0:R.length,ce=0,De=[];++I<J;){var mt=R[I];L(mt,I,R)&&(De[ce++]=mt)}return De}function Yo(R,L){var I=R==null?0:R.length;return!!I&&ja(R,L,0)>-1}function Fc(R,L,I){for(var J=-1,ce=R==null?0:R.length;++J<ce;)if(I(L,R[J]))return!0;return!1}function Je(R,L){for(var I=-1,J=R==null?0:R.length,ce=Array(J);++I<J;)ce[I]=L(R[I],I,R);return ce}function Nn(R,L){for(var I=-1,J=L.length,ce=R.length;++I<J;)R[ce+I]=L[I];return R}function Nc(R,L,I,J){var ce=-1,De=R==null?0:R.length;for(J&&De&&(I=R[++ce]);++ce<De;)I=L(I,R[ce],ce,R);return I}function LE(R,L,I,J){var ce=R==null?0:R.length;for(J&&ce&&(I=R[--ce]);ce--;)I=L(I,R[ce],ce,R);return I}function Lc(R,L){for(var I=-1,J=R==null?0:R.length;++I<J;)if(L(R[I],I,R))return!0;return!1}var kE=kc("length");function jE(R){return R.split("")}function WE(R){return R.match(Kw)||[]}function wh(R,L,I){var J;return I(R,function(ce,De,mt){if(L(ce,De,mt))return J=De,!1}),J}function Ko(R,L,I,J){for(var ce=R.length,De=I+(J?1:-1);J?De--:++De<ce;)if(L(R[De],De,R))return De;return-1}function ja(R,L,I){return L===L?XE(R,L,I):Ko(R,Eh,I)}function BE(R,L,I,J){for(var ce=I-1,De=R.length;++ce<De;)if(J(R[ce],L))return ce;return-1}function Eh(R){return R!==R}function _h(R,L){var I=R==null?0:R.length;return I?Wc(R,L)/I:H}function kc(R){return function(L){return L==null?r:L[R]}}function jc(R){return function(L){return R==null?r:R[L]}}function Th(R,L,I,J,ce){return ce(R,function(De,mt,Ge){I=J?(J=!1,De):L(I,De,mt,Ge)}),I}function zE(R,L){var I=R.length;for(R.sort(L);I--;)R[I]=R[I].value;return R}function Wc(R,L){for(var I,J=-1,ce=R.length;++J<ce;){var De=L(R[J]);De!==r&&(I=I===r?De:I+De)}return I}function Bc(R,L){for(var I=-1,J=Array(R);++I<R;)J[I]=L(I);return J}function HE(R,L){return Je(L,function(I){return[I,R[I]]})}function Oh(R){return R&&R.slice(0,Ph(R)+1).replace(Ac,"")}function or(R){return function(L){return R(L)}}function zc(R,L){return Je(L,function(I){return R[I]})}function $i(R,L){return R.has(L)}function Ch(R,L){for(var I=-1,J=R.length;++I<J&&ja(L,R[I],0)>-1;);return I}function Ah(R,L){for(var I=R.length;I--&&ja(L,R[I],0)>-1;);return I}function UE(R,L){for(var I=R.length,J=0;I--;)R[I]===L&&++J;return J}var GE=jc(xE),qE=jc(PE);function YE(R){return"\\"+DE[R]}function KE(R,L){return R==null?r:R[L]}function Wa(R){return TE.test(R)}function VE(R){return OE.test(R)}function ZE(R){for(var L,I=[];!(L=R.next()).done;)I.push(L.value);return I}function Hc(R){var L=-1,I=Array(R.size);return R.forEach(function(J,ce){I[++L]=[ce,J]}),I}function xh(R,L){return function(I){return R(L(I))}}function Ln(R,L){for(var I=-1,J=R.length,ce=0,De=[];++I<J;){var mt=R[I];(mt===L||mt===p)&&(R[I]=p,De[ce++]=I)}return De}function Vo(R){var L=-1,I=Array(R.size);return R.forEach(function(J){I[++L]=J}),I}function JE(R){var L=-1,I=Array(R.size);return R.forEach(function(J){I[++L]=[J,J]}),I}function XE(R,L,I){for(var J=I-1,ce=R.length;++J<ce;)if(R[J]===L)return J;return-1}function QE(R,L,I){for(var J=I+1;J--;)if(R[J]===L)return J;return J}function Ba(R){return Wa(R)?t1(R):kE(R)}function Mr(R){return Wa(R)?r1(R):jE(R)}function Ph(R){for(var L=R.length;L--&&Uw.test(R.charAt(L)););return L}var e1=jc(RE);function t1(R){for(var L=$c.lastIndex=0;$c.test(R);)++L;return L}function r1(R){return R.match($c)||[]}function n1(R){return R.match(_E)||[]}var a1=function R(L){L=L==null?Rt:za.defaults(Rt.Object(),L,za.pick(Rt,CE));var I=L.Array,J=L.Date,ce=L.Error,De=L.Function,mt=L.Math,Ge=L.Object,Uc=L.RegExp,i1=L.String,wr=L.TypeError,Zo=I.prototype,o1=De.prototype,Ha=Ge.prototype,Jo=L["__core-js_shared__"],Xo=o1.toString,Be=Ha.hasOwnProperty,s1=0,Rh=function(){var i=/[^.]+$/.exec(Jo&&Jo.keys&&Jo.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Qo=Ha.toString,u1=Xo.call(Ge),c1=Rt._,l1=Uc("^"+Xo.call(Be).replace(Cc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),es=ph?L.Buffer:r,kn=L.Symbol,ts=L.Uint8Array,Dh=es?es.allocUnsafe:r,rs=xh(Ge.getPrototypeOf,Ge),$h=Ge.create,Ih=Ha.propertyIsEnumerable,ns=Zo.splice,Mh=kn?kn.isConcatSpreadable:r,Ii=kn?kn.iterator:r,ha=kn?kn.toStringTag:r,as=function(){try{var i=ba(Ge,"defineProperty");return i({},"",{}),i}catch{}}(),f1=L.clearTimeout!==Rt.clearTimeout&&L.clearTimeout,d1=J&&J.now!==Rt.Date.now&&J.now,p1=L.setTimeout!==Rt.setTimeout&&L.setTimeout,is=mt.ceil,os=mt.floor,Gc=Ge.getOwnPropertySymbols,h1=es?es.isBuffer:r,Fh=L.isFinite,m1=Zo.join,g1=xh(Ge.keys,Ge),gt=mt.max,Ft=mt.min,v1=J.now,y1=L.parseInt,Nh=mt.random,b1=Zo.reverse,qc=ba(L,"DataView"),Mi=ba(L,"Map"),Yc=ba(L,"Promise"),Ua=ba(L,"Set"),Fi=ba(L,"WeakMap"),Ni=ba(Ge,"create"),ss=Fi&&new Fi,Ga={},S1=Sa(qc),w1=Sa(Mi),E1=Sa(Yc),_1=Sa(Ua),T1=Sa(Fi),us=kn?kn.prototype:r,Li=us?us.valueOf:r,Lh=us?us.toString:r;function b(i){if(it(i)&&!fe(i)&&!(i instanceof Ce)){if(i instanceof Er)return i;if(Be.call(i,"__wrapped__"))return km(i)}return new Er(i)}var qa=function(){function i(){}return function(s){if(!tt(s))return{};if($h)return $h(s);i.prototype=s;var l=new i;return i.prototype=r,l}}();function cs(){}function Er(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=r}b.templateSettings={escape:kw,evaluate:jw,interpolate:qp,variable:"",imports:{_:b}},b.prototype=cs.prototype,b.prototype.constructor=b,Er.prototype=qa(cs.prototype),Er.prototype.constructor=Er;function Ce(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function O1(){var i=new Ce(this.__wrapped__);return i.__actions__=Qt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qt(this.__views__),i}function C1(){if(this.__filtered__){var i=new Ce(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function A1(){var i=this.__wrapped__.value(),s=this.__dir__,l=fe(i),h=s<0,v=l?i.length:0,w=j_(0,v,this.__views__),O=w.start,x=w.end,D=x-O,k=h?x:O-1,j=this.__iteratees__,z=j.length,K=0,ee=Ft(D,this.__takeCount__);if(!l||!h&&v==D&&ee==D)return sm(i,this.__actions__);var ae=[];e:for(;D--&&K<ee;){k+=s;for(var ve=-1,ie=i[k];++ve<z;){var Te=j[ve],Ae=Te.iteratee,cr=Te.type,Kt=Ae(ie);if(cr==dn)ie=Kt;else if(!Kt){if(cr==xt)continue e;break e}}ae[K++]=ie}return ae}Ce.prototype=qa(cs.prototype),Ce.prototype.constructor=Ce;function ma(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function x1(){this.__data__=Ni?Ni(null):{},this.size=0}function P1(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function R1(i){var s=this.__data__;if(Ni){var l=s[i];return l===f?r:l}return Be.call(s,i)?s[i]:r}function D1(i){var s=this.__data__;return Ni?s[i]!==r:Be.call(s,i)}function $1(i,s){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=Ni&&s===r?f:s,this}ma.prototype.clear=x1,ma.prototype.delete=P1,ma.prototype.get=R1,ma.prototype.has=D1,ma.prototype.set=$1;function mn(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function I1(){this.__data__=[],this.size=0}function M1(i){var s=this.__data__,l=ls(s,i);if(l<0)return!1;var h=s.length-1;return l==h?s.pop():ns.call(s,l,1),--this.size,!0}function F1(i){var s=this.__data__,l=ls(s,i);return l<0?r:s[l][1]}function N1(i){return ls(this.__data__,i)>-1}function L1(i,s){var l=this.__data__,h=ls(l,i);return h<0?(++this.size,l.push([i,s])):l[h][1]=s,this}mn.prototype.clear=I1,mn.prototype.delete=M1,mn.prototype.get=F1,mn.prototype.has=N1,mn.prototype.set=L1;function gn(i){var s=-1,l=i==null?0:i.length;for(this.clear();++s<l;){var h=i[s];this.set(h[0],h[1])}}function k1(){this.size=0,this.__data__={hash:new ma,map:new(Mi||mn),string:new ma}}function j1(i){var s=Es(this,i).delete(i);return this.size-=s?1:0,s}function W1(i){return Es(this,i).get(i)}function B1(i){return Es(this,i).has(i)}function z1(i,s){var l=Es(this,i),h=l.size;return l.set(i,s),this.size+=l.size==h?0:1,this}gn.prototype.clear=k1,gn.prototype.delete=j1,gn.prototype.get=W1,gn.prototype.has=B1,gn.prototype.set=z1;function ga(i){var s=-1,l=i==null?0:i.length;for(this.__data__=new gn;++s<l;)this.add(i[s])}function H1(i){return this.__data__.set(i,f),this}function U1(i){return this.__data__.has(i)}ga.prototype.add=ga.prototype.push=H1,ga.prototype.has=U1;function Fr(i){var s=this.__data__=new mn(i);this.size=s.size}function G1(){this.__data__=new mn,this.size=0}function q1(i){var s=this.__data__,l=s.delete(i);return this.size=s.size,l}function Y1(i){return this.__data__.get(i)}function K1(i){return this.__data__.has(i)}function V1(i,s){var l=this.__data__;if(l instanceof mn){var h=l.__data__;if(!Mi||h.length<a-1)return h.push([i,s]),this.size=++l.size,this;l=this.__data__=new gn(h)}return l.set(i,s),this.size=l.size,this}Fr.prototype.clear=G1,Fr.prototype.delete=q1,Fr.prototype.get=Y1,Fr.prototype.has=K1,Fr.prototype.set=V1;function kh(i,s){var l=fe(i),h=!l&&wa(i),v=!l&&!h&&Hn(i),w=!l&&!h&&!v&&Za(i),O=l||h||v||w,x=O?Bc(i.length,i1):[],D=x.length;for(var k in i)(s||Be.call(i,k))&&!(O&&(k=="length"||v&&(k=="offset"||k=="parent")||w&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||Sn(k,D)))&&x.push(k);return x}function jh(i){var s=i.length;return s?i[al(0,s-1)]:r}function Z1(i,s){return _s(Qt(i),va(s,0,i.length))}function J1(i){return _s(Qt(i))}function Kc(i,s,l){(l!==r&&!Nr(i[s],l)||l===r&&!(s in i))&&vn(i,s,l)}function ki(i,s,l){var h=i[s];(!(Be.call(i,s)&&Nr(h,l))||l===r&&!(s in i))&&vn(i,s,l)}function ls(i,s){for(var l=i.length;l--;)if(Nr(i[l][0],s))return l;return-1}function X1(i,s,l,h){return jn(i,function(v,w,O){s(h,v,l(v),O)}),h}function Wh(i,s){return i&&Gr(s,wt(s),i)}function Q1(i,s){return i&&Gr(s,tr(s),i)}function vn(i,s,l){s=="__proto__"&&as?as(i,s,{configurable:!0,enumerable:!0,value:l,writable:!0}):i[s]=l}function Vc(i,s){for(var l=-1,h=s.length,v=I(h),w=i==null;++l<h;)v[l]=w?r:Pl(i,s[l]);return v}function va(i,s,l){return i===i&&(l!==r&&(i=i<=l?i:l),s!==r&&(i=i>=s?i:s)),i}function _r(i,s,l,h,v,w){var O,x=s&m,D=s&g,k=s&y;if(l&&(O=v?l(i,h,v,w):l(i)),O!==r)return O;if(!tt(i))return i;var j=fe(i);if(j){if(O=B_(i),!x)return Qt(i,O)}else{var z=Nt(i),K=z==F||z==at;if(Hn(i))return lm(i,x);if(z==hn||z==le||K&&!v){if(O=D||K?{}:Pm(i),!x)return D?R_(i,Q1(O,i)):P_(i,Wh(O,i))}else{if(!Ye[z])return v?i:{};O=z_(i,z,x)}}w||(w=new Fr);var ee=w.get(i);if(ee)return ee;w.set(i,O),ag(i)?i.forEach(function(ie){O.add(_r(ie,s,l,ie,i,w))}):rg(i)&&i.forEach(function(ie,Te){O.set(Te,_r(ie,s,l,Te,i,w))});var ae=k?D?ml:hl:D?tr:wt,ve=j?r:ae(i);return Sr(ve||i,function(ie,Te){ve&&(Te=ie,ie=i[Te]),ki(O,Te,_r(ie,s,l,Te,i,w))}),O}function e_(i){var s=wt(i);return function(l){return Bh(l,i,s)}}function Bh(i,s,l){var h=l.length;if(i==null)return!h;for(i=Ge(i);h--;){var v=l[h],w=s[v],O=i[v];if(O===r&&!(v in i)||!w(O))return!1}return!0}function zh(i,s,l){if(typeof i!="function")throw new wr(u);return Gi(function(){i.apply(r,l)},s)}function ji(i,s,l,h){var v=-1,w=Yo,O=!0,x=i.length,D=[],k=s.length;if(!x)return D;l&&(s=Je(s,or(l))),h?(w=Fc,O=!1):s.length>=a&&(w=$i,O=!1,s=new ga(s));e:for(;++v<x;){var j=i[v],z=l==null?j:l(j);if(j=h||j!==0?j:0,O&&z===z){for(var K=k;K--;)if(s[K]===z)continue e;D.push(j)}else w(s,z,h)||D.push(j)}return D}var jn=mm(Ur),Hh=mm(Jc,!0);function t_(i,s){var l=!0;return jn(i,function(h,v,w){return l=!!s(h,v,w),l}),l}function fs(i,s,l){for(var h=-1,v=i.length;++h<v;){var w=i[h],O=s(w);if(O!=null&&(x===r?O===O&&!ur(O):l(O,x)))var x=O,D=w}return D}function r_(i,s,l,h){var v=i.length;for(l=ge(l),l<0&&(l=-l>v?0:v+l),h=h===r||h>v?v:ge(h),h<0&&(h+=v),h=l>h?0:og(h);l<h;)i[l++]=s;return i}function Uh(i,s){var l=[];return jn(i,function(h,v,w){s(h,v,w)&&l.push(h)}),l}function Dt(i,s,l,h,v){var w=-1,O=i.length;for(l||(l=U_),v||(v=[]);++w<O;){var x=i[w];s>0&&l(x)?s>1?Dt(x,s-1,l,h,v):Nn(v,x):h||(v[v.length]=x)}return v}var Zc=gm(),Gh=gm(!0);function Ur(i,s){return i&&Zc(i,s,wt)}function Jc(i,s){return i&&Gh(i,s,wt)}function ds(i,s){return Fn(s,function(l){return wn(i[l])})}function ya(i,s){s=Bn(s,i);for(var l=0,h=s.length;i!=null&&l<h;)i=i[qr(s[l++])];return l&&l==h?i:r}function qh(i,s,l){var h=s(i);return fe(i)?h:Nn(h,l(i))}function qt(i){return i==null?i===r?Dw:Pw:ha&&ha in Ge(i)?k_(i):J_(i)}function Xc(i,s){return i>s}function n_(i,s){return i!=null&&Be.call(i,s)}function a_(i,s){return i!=null&&s in Ge(i)}function i_(i,s,l){return i>=Ft(s,l)&&i<gt(s,l)}function Qc(i,s,l){for(var h=l?Fc:Yo,v=i[0].length,w=i.length,O=w,x=I(w),D=1/0,k=[];O--;){var j=i[O];O&&s&&(j=Je(j,or(s))),D=Ft(j.length,D),x[O]=!l&&(s||v>=120&&j.length>=120)?new ga(O&&j):r}j=i[0];var z=-1,K=x[0];e:for(;++z<v&&k.length<D;){var ee=j[z],ae=s?s(ee):ee;if(ee=l||ee!==0?ee:0,!(K?$i(K,ae):h(k,ae,l))){for(O=w;--O;){var ve=x[O];if(!(ve?$i(ve,ae):h(i[O],ae,l)))continue e}K&&K.push(ae),k.push(ee)}}return k}function o_(i,s,l,h){return Ur(i,function(v,w,O){s(h,l(v),w,O)}),h}function Wi(i,s,l){s=Bn(s,i),i=Im(i,s);var h=i==null?i:i[qr(Or(s))];return h==null?r:ir(h,i,l)}function Yh(i){return it(i)&&qt(i)==le}function s_(i){return it(i)&&qt(i)==Di}function u_(i){return it(i)&&qt(i)==ye}function Bi(i,s,l,h,v){return i===s?!0:i==null||s==null||!it(i)&&!it(s)?i!==i&&s!==s:c_(i,s,l,h,Bi,v)}function c_(i,s,l,h,v,w){var O=fe(i),x=fe(s),D=O?ue:Nt(i),k=x?ue:Nt(s);D=D==le?hn:D,k=k==le?hn:k;var j=D==hn,z=k==hn,K=D==k;if(K&&Hn(i)){if(!Hn(s))return!1;O=!0,j=!1}if(K&&!j)return w||(w=new Fr),O||Za(i)?Cm(i,s,l,h,v,w):N_(i,s,D,l,h,v,w);if(!(l&E)){var ee=j&&Be.call(i,"__wrapped__"),ae=z&&Be.call(s,"__wrapped__");if(ee||ae){var ve=ee?i.value():i,ie=ae?s.value():s;return w||(w=new Fr),v(ve,ie,l,h,w)}}return K?(w||(w=new Fr),L_(i,s,l,h,v,w)):!1}function l_(i){return it(i)&&Nt(i)==Ze}function el(i,s,l,h){var v=l.length,w=v,O=!h;if(i==null)return!w;for(i=Ge(i);v--;){var x=l[v];if(O&&x[2]?x[1]!==i[x[0]]:!(x[0]in i))return!1}for(;++v<w;){x=l[v];var D=x[0],k=i[D],j=x[1];if(O&&x[2]){if(k===r&&!(D in i))return!1}else{var z=new Fr;if(h)var K=h(k,j,D,i,s,z);if(!(K===r?Bi(j,k,E|S,h,z):K))return!1}}return!0}function Kh(i){if(!tt(i)||q_(i))return!1;var s=wn(i)?l1:eE;return s.test(Sa(i))}function f_(i){return it(i)&&qt(i)==xi}function d_(i){return it(i)&&Nt(i)==Ir}function p_(i){return it(i)&&Ps(i.length)&&!!Ve[qt(i)]}function Vh(i){return typeof i=="function"?i:i==null?rr:typeof i=="object"?fe(i)?Xh(i[0],i[1]):Jh(i):vg(i)}function tl(i){if(!Ui(i))return g1(i);var s=[];for(var l in Ge(i))Be.call(i,l)&&l!="constructor"&&s.push(l);return s}function h_(i){if(!tt(i))return Z_(i);var s=Ui(i),l=[];for(var h in i)h=="constructor"&&(s||!Be.call(i,h))||l.push(h);return l}function rl(i,s){return i<s}function Zh(i,s){var l=-1,h=er(i)?I(i.length):[];return jn(i,function(v,w,O){h[++l]=s(v,w,O)}),h}function Jh(i){var s=vl(i);return s.length==1&&s[0][2]?Dm(s[0][0],s[0][1]):function(l){return l===i||el(l,i,s)}}function Xh(i,s){return bl(i)&&Rm(s)?Dm(qr(i),s):function(l){var h=Pl(l,i);return h===r&&h===s?Rl(l,i):Bi(s,h,E|S)}}function ps(i,s,l,h,v){i!==s&&Zc(s,function(w,O){if(v||(v=new Fr),tt(w))m_(i,s,O,l,ps,h,v);else{var x=h?h(wl(i,O),w,O+"",i,s,v):r;x===r&&(x=w),Kc(i,O,x)}},tr)}function m_(i,s,l,h,v,w,O){var x=wl(i,l),D=wl(s,l),k=O.get(D);if(k){Kc(i,l,k);return}var j=w?w(x,D,l+"",i,s,O):r,z=j===r;if(z){var K=fe(D),ee=!K&&Hn(D),ae=!K&&!ee&&Za(D);j=D,K||ee||ae?fe(x)?j=x:st(x)?j=Qt(x):ee?(z=!1,j=lm(D,!0)):ae?(z=!1,j=fm(D,!0)):j=[]:qi(D)||wa(D)?(j=x,wa(x)?j=sg(x):(!tt(x)||wn(x))&&(j=Pm(D))):z=!1}z&&(O.set(D,j),v(j,D,h,w,O),O.delete(D)),Kc(i,l,j)}function Qh(i,s){var l=i.length;if(l)return s+=s<0?l:0,Sn(s,l)?i[s]:r}function em(i,s,l){s.length?s=Je(s,function(w){return fe(w)?function(O){return ya(O,w.length===1?w[0]:w)}:w}):s=[rr];var h=-1;s=Je(s,or(re()));var v=Zh(i,function(w,O,x){var D=Je(s,function(k){return k(w)});return{criteria:D,index:++h,value:w}});return zE(v,function(w,O){return x_(w,O,l)})}function g_(i,s){return tm(i,s,function(l,h){return Rl(i,h)})}function tm(i,s,l){for(var h=-1,v=s.length,w={};++h<v;){var O=s[h],x=ya(i,O);l(x,O)&&zi(w,Bn(O,i),x)}return w}function v_(i){return function(s){return ya(s,i)}}function nl(i,s,l,h){var v=h?BE:ja,w=-1,O=s.length,x=i;for(i===s&&(s=Qt(s)),l&&(x=Je(i,or(l)));++w<O;)for(var D=0,k=s[w],j=l?l(k):k;(D=v(x,j,D,h))>-1;)x!==i&&ns.call(x,D,1),ns.call(i,D,1);return i}function rm(i,s){for(var l=i?s.length:0,h=l-1;l--;){var v=s[l];if(l==h||v!==w){var w=v;Sn(v)?ns.call(i,v,1):sl(i,v)}}return i}function al(i,s){return i+os(Nh()*(s-i+1))}function y_(i,s,l,h){for(var v=-1,w=gt(is((s-i)/(l||1)),0),O=I(w);w--;)O[h?w:++v]=i,i+=l;return O}function il(i,s){var l="";if(!i||s<1||s>St)return l;do s%2&&(l+=i),s=os(s/2),s&&(i+=i);while(s);return l}function be(i,s){return El($m(i,s,rr),i+"")}function b_(i){return jh(Ja(i))}function S_(i,s){var l=Ja(i);return _s(l,va(s,0,l.length))}function zi(i,s,l,h){if(!tt(i))return i;s=Bn(s,i);for(var v=-1,w=s.length,O=w-1,x=i;x!=null&&++v<w;){var D=qr(s[v]),k=l;if(D==="__proto__"||D==="constructor"||D==="prototype")return i;if(v!=O){var j=x[D];k=h?h(j,D,x):r,k===r&&(k=tt(j)?j:Sn(s[v+1])?[]:{})}ki(x,D,k),x=x[D]}return i}var nm=ss?function(i,s){return ss.set(i,s),i}:rr,w_=as?function(i,s){return as(i,"toString",{configurable:!0,enumerable:!1,value:$l(s),writable:!0})}:rr;function E_(i){return _s(Ja(i))}function Tr(i,s,l){var h=-1,v=i.length;s<0&&(s=-s>v?0:v+s),l=l>v?v:l,l<0&&(l+=v),v=s>l?0:l-s>>>0,s>>>=0;for(var w=I(v);++h<v;)w[h]=i[h+s];return w}function __(i,s){var l;return jn(i,function(h,v,w){return l=s(h,v,w),!l}),!!l}function hs(i,s,l){var h=0,v=i==null?h:i.length;if(typeof s=="number"&&s===s&&v<=de){for(;h<v;){var w=h+v>>>1,O=i[w];O!==null&&!ur(O)&&(l?O<=s:O<s)?h=w+1:v=w}return v}return ol(i,s,rr,l)}function ol(i,s,l,h){var v=0,w=i==null?0:i.length;if(w===0)return 0;s=l(s);for(var O=s!==s,x=s===null,D=ur(s),k=s===r;v<w;){var j=os((v+w)/2),z=l(i[j]),K=z!==r,ee=z===null,ae=z===z,ve=ur(z);if(O)var ie=h||ae;else k?ie=ae&&(h||K):x?ie=ae&&K&&(h||!ee):D?ie=ae&&K&&!ee&&(h||!ve):ee||ve?ie=!1:ie=h?z<=s:z<s;ie?v=j+1:w=j}return Ft(w,me)}function am(i,s){for(var l=-1,h=i.length,v=0,w=[];++l<h;){var O=i[l],x=s?s(O):O;if(!l||!Nr(x,D)){var D=x;w[v++]=O===0?0:O}}return w}function im(i){return typeof i=="number"?i:ur(i)?H:+i}function sr(i){if(typeof i=="string")return i;if(fe(i))return Je(i,sr)+"";if(ur(i))return Lh?Lh.call(i):"";var s=i+"";return s=="0"&&1/i==-lt?"-0":s}function Wn(i,s,l){var h=-1,v=Yo,w=i.length,O=!0,x=[],D=x;if(l)O=!1,v=Fc;else if(w>=a){var k=s?null:M_(i);if(k)return Vo(k);O=!1,v=$i,D=new ga}else D=s?[]:x;e:for(;++h<w;){var j=i[h],z=s?s(j):j;if(j=l||j!==0?j:0,O&&z===z){for(var K=D.length;K--;)if(D[K]===z)continue e;s&&D.push(z),x.push(j)}else v(D,z,l)||(D!==x&&D.push(z),x.push(j))}return x}function sl(i,s){return s=Bn(s,i),i=Im(i,s),i==null||delete i[qr(Or(s))]}function om(i,s,l,h){return zi(i,s,l(ya(i,s)),h)}function ms(i,s,l,h){for(var v=i.length,w=h?v:-1;(h?w--:++w<v)&&s(i[w],w,i););return l?Tr(i,h?0:w,h?w+1:v):Tr(i,h?w+1:0,h?v:w)}function sm(i,s){var l=i;return l instanceof Ce&&(l=l.value()),Nc(s,function(h,v){return v.func.apply(v.thisArg,Nn([h],v.args))},l)}function ul(i,s,l){var h=i.length;if(h<2)return h?Wn(i[0]):[];for(var v=-1,w=I(h);++v<h;)for(var O=i[v],x=-1;++x<h;)x!=v&&(w[v]=ji(w[v]||O,i[x],s,l));return Wn(Dt(w,1),s,l)}function um(i,s,l){for(var h=-1,v=i.length,w=s.length,O={};++h<v;){var x=h<w?s[h]:r;l(O,i[h],x)}return O}function cl(i){return st(i)?i:[]}function ll(i){return typeof i=="function"?i:rr}function Bn(i,s){return fe(i)?i:bl(i,s)?[i]:Lm(Me(i))}var T_=be;function zn(i,s,l){var h=i.length;return l=l===r?h:l,!s&&l>=h?i:Tr(i,s,l)}var cm=f1||function(i){return Rt.clearTimeout(i)};function lm(i,s){if(s)return i.slice();var l=i.length,h=Dh?Dh(l):new i.constructor(l);return i.copy(h),h}function fl(i){var s=new i.constructor(i.byteLength);return new ts(s).set(new ts(i)),s}function O_(i,s){var l=s?fl(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.byteLength)}function C_(i){var s=new i.constructor(i.source,Yp.exec(i));return s.lastIndex=i.lastIndex,s}function A_(i){return Li?Ge(Li.call(i)):{}}function fm(i,s){var l=s?fl(i.buffer):i.buffer;return new i.constructor(l,i.byteOffset,i.length)}function dm(i,s){if(i!==s){var l=i!==r,h=i===null,v=i===i,w=ur(i),O=s!==r,x=s===null,D=s===s,k=ur(s);if(!x&&!k&&!w&&i>s||w&&O&&D&&!x&&!k||h&&O&&D||!l&&D||!v)return 1;if(!h&&!w&&!k&&i<s||k&&l&&v&&!h&&!w||x&&l&&v||!O&&v||!D)return-1}return 0}function x_(i,s,l){for(var h=-1,v=i.criteria,w=s.criteria,O=v.length,x=l.length;++h<O;){var D=dm(v[h],w[h]);if(D){if(h>=x)return D;var k=l[h];return D*(k=="desc"?-1:1)}}return i.index-s.index}function pm(i,s,l,h){for(var v=-1,w=i.length,O=l.length,x=-1,D=s.length,k=gt(w-O,0),j=I(D+k),z=!h;++x<D;)j[x]=s[x];for(;++v<O;)(z||v<w)&&(j[l[v]]=i[v]);for(;k--;)j[x++]=i[v++];return j}function hm(i,s,l,h){for(var v=-1,w=i.length,O=-1,x=l.length,D=-1,k=s.length,j=gt(w-x,0),z=I(j+k),K=!h;++v<j;)z[v]=i[v];for(var ee=v;++D<k;)z[ee+D]=s[D];for(;++O<x;)(K||v<w)&&(z[ee+l[O]]=i[v++]);return z}function Qt(i,s){var l=-1,h=i.length;for(s||(s=I(h));++l<h;)s[l]=i[l];return s}function Gr(i,s,l,h){var v=!l;l||(l={});for(var w=-1,O=s.length;++w<O;){var x=s[w],D=h?h(l[x],i[x],x,l,i):r;D===r&&(D=i[x]),v?vn(l,x,D):ki(l,x,D)}return l}function P_(i,s){return Gr(i,yl(i),s)}function R_(i,s){return Gr(i,Am(i),s)}function gs(i,s){return function(l,h){var v=fe(l)?FE:X1,w=s?s():{};return v(l,i,re(h,2),w)}}function Ya(i){return be(function(s,l){var h=-1,v=l.length,w=v>1?l[v-1]:r,O=v>2?l[2]:r;for(w=i.length>3&&typeof w=="function"?(v--,w):r,O&&Yt(l[0],l[1],O)&&(w=v<3?r:w,v=1),s=Ge(s);++h<v;){var x=l[h];x&&i(s,x,h,w)}return s})}function mm(i,s){return function(l,h){if(l==null)return l;if(!er(l))return i(l,h);for(var v=l.length,w=s?v:-1,O=Ge(l);(s?w--:++w<v)&&h(O[w],w,O)!==!1;);return l}}function gm(i){return function(s,l,h){for(var v=-1,w=Ge(s),O=h(s),x=O.length;x--;){var D=O[i?x:++v];if(l(w[D],D,w)===!1)break}return s}}function D_(i,s,l){var h=s&T,v=Hi(i);function w(){var O=this&&this!==Rt&&this instanceof w?v:i;return O.apply(h?l:this,arguments)}return w}function vm(i){return function(s){s=Me(s);var l=Wa(s)?Mr(s):r,h=l?l[0]:s.charAt(0),v=l?zn(l,1).join(""):s.slice(1);return h[i]()+v}}function Ka(i){return function(s){return Nc(mg(hg(s).replace(wE,"")),i,"")}}function Hi(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var l=qa(i.prototype),h=i.apply(l,s);return tt(h)?h:l}}function $_(i,s,l){var h=Hi(i);function v(){for(var w=arguments.length,O=I(w),x=w,D=Va(v);x--;)O[x]=arguments[x];var k=w<3&&O[0]!==D&&O[w-1]!==D?[]:Ln(O,D);if(w-=k.length,w<l)return Em(i,s,vs,v.placeholder,r,O,k,r,r,l-w);var j=this&&this!==Rt&&this instanceof v?h:i;return ir(j,this,O)}return v}function ym(i){return function(s,l,h){var v=Ge(s);if(!er(s)){var w=re(l,3);s=wt(s),l=function(x){return w(v[x],x,v)}}var O=i(s,l,h);return O>-1?v[w?s[O]:O]:r}}function bm(i){return bn(function(s){var l=s.length,h=l,v=Er.prototype.thru;for(i&&s.reverse();h--;){var w=s[h];if(typeof w!="function")throw new wr(u);if(v&&!O&&ws(w)=="wrapper")var O=new Er([],!0)}for(h=O?h:l;++h<l;){w=s[h];var x=ws(w),D=x=="wrapper"?gl(w):r;D&&Sl(D[0])&&D[1]==(W|P|_|G)&&!D[4].length&&D[9]==1?O=O[ws(D[0])].apply(O,D[3]):O=w.length==1&&Sl(w)?O[x]():O.thru(w)}return function(){var k=arguments,j=k[0];if(O&&k.length==1&&fe(j))return O.plant(j).value();for(var z=0,K=l?s[z].apply(this,k):j;++z<l;)K=s[z].call(this,K);return K}})}function vs(i,s,l,h,v,w,O,x,D,k){var j=s&W,z=s&T,K=s&C,ee=s&(P|$),ae=s&Q,ve=K?r:Hi(i);function ie(){for(var Te=arguments.length,Ae=I(Te),cr=Te;cr--;)Ae[cr]=arguments[cr];if(ee)var Kt=Va(ie),lr=UE(Ae,Kt);if(h&&(Ae=pm(Ae,h,v,ee)),w&&(Ae=hm(Ae,w,O,ee)),Te-=lr,ee&&Te<k){var ut=Ln(Ae,Kt);return Em(i,s,vs,ie.placeholder,l,Ae,ut,x,D,k-Te)}var Lr=z?l:this,_n=K?Lr[i]:i;return Te=Ae.length,x?Ae=X_(Ae,x):ae&&Te>1&&Ae.reverse(),j&&D<Te&&(Ae.length=D),this&&this!==Rt&&this instanceof ie&&(_n=ve||Hi(_n)),_n.apply(Lr,Ae)}return ie}function Sm(i,s){return function(l,h){return o_(l,i,s(h),{})}}function ys(i,s){return function(l,h){var v;if(l===r&&h===r)return s;if(l!==r&&(v=l),h!==r){if(v===r)return h;typeof l=="string"||typeof h=="string"?(l=sr(l),h=sr(h)):(l=im(l),h=im(h)),v=i(l,h)}return v}}function dl(i){return bn(function(s){return s=Je(s,or(re())),be(function(l){var h=this;return i(s,function(v){return ir(v,h,l)})})})}function bs(i,s){s=s===r?" ":sr(s);var l=s.length;if(l<2)return l?il(s,i):s;var h=il(s,is(i/Ba(s)));return Wa(s)?zn(Mr(h),0,i).join(""):h.slice(0,i)}function I_(i,s,l,h){var v=s&T,w=Hi(i);function O(){for(var x=-1,D=arguments.length,k=-1,j=h.length,z=I(j+D),K=this&&this!==Rt&&this instanceof O?w:i;++k<j;)z[k]=h[k];for(;D--;)z[k++]=arguments[++x];return ir(K,v?l:this,z)}return O}function wm(i){return function(s,l,h){return h&&typeof h!="number"&&Yt(s,l,h)&&(l=h=r),s=En(s),l===r?(l=s,s=0):l=En(l),h=h===r?s<l?1:-1:En(h),y_(s,l,h,i)}}function Ss(i){return function(s,l){return typeof s=="string"&&typeof l=="string"||(s=Cr(s),l=Cr(l)),i(s,l)}}function Em(i,s,l,h,v,w,O,x,D,k){var j=s&P,z=j?O:r,K=j?r:O,ee=j?w:r,ae=j?r:w;s|=j?_:M,s&=~(j?M:_),s&A||(s&=~(T|C));var ve=[i,s,v,ee,z,ae,K,x,D,k],ie=l.apply(r,ve);return Sl(i)&&Mm(ie,ve),ie.placeholder=h,Fm(ie,i,s)}function pl(i){var s=mt[i];return function(l,h){if(l=Cr(l),h=h==null?0:Ft(ge(h),292),h&&Fh(l)){var v=(Me(l)+"e").split("e"),w=s(v[0]+"e"+(+v[1]+h));return v=(Me(w)+"e").split("e"),+(v[0]+"e"+(+v[1]-h))}return s(l)}}var M_=Ua&&1/Vo(new Ua([,-0]))[1]==lt?function(i){return new Ua(i)}:Fl;function _m(i){return function(s){var l=Nt(s);return l==Ze?Hc(s):l==Ir?JE(s):HE(s,i(s))}}function yn(i,s,l,h,v,w,O,x){var D=s&C;if(!D&&typeof i!="function")throw new wr(u);var k=h?h.length:0;if(k||(s&=~(_|M),h=v=r),O=O===r?O:gt(ge(O),0),x=x===r?x:ge(x),k-=v?v.length:0,s&M){var j=h,z=v;h=v=r}var K=D?r:gl(i),ee=[i,s,l,h,v,j,z,w,O,x];if(K&&V_(ee,K),i=ee[0],s=ee[1],l=ee[2],h=ee[3],v=ee[4],x=ee[9]=ee[9]===r?D?0:i.length:gt(ee[9]-k,0),!x&&s&(P|$)&&(s&=~(P|$)),!s||s==T)var ae=D_(i,s,l);else s==P||s==$?ae=$_(i,s,x):(s==_||s==(T|_))&&!v.length?ae=I_(i,s,l,h):ae=vs.apply(r,ee);var ve=K?nm:Mm;return Fm(ve(ae,ee),i,s)}function Tm(i,s,l,h){return i===r||Nr(i,Ha[l])&&!Be.call(h,l)?s:i}function Om(i,s,l,h,v,w){return tt(i)&&tt(s)&&(w.set(s,i),ps(i,s,r,Om,w),w.delete(s)),i}function F_(i){return qi(i)?r:i}function Cm(i,s,l,h,v,w){var O=l&E,x=i.length,D=s.length;if(x!=D&&!(O&&D>x))return!1;var k=w.get(i),j=w.get(s);if(k&&j)return k==s&&j==i;var z=-1,K=!0,ee=l&S?new ga:r;for(w.set(i,s),w.set(s,i);++z<x;){var ae=i[z],ve=s[z];if(h)var ie=O?h(ve,ae,z,s,i,w):h(ae,ve,z,i,s,w);if(ie!==r){if(ie)continue;K=!1;break}if(ee){if(!Lc(s,function(Te,Ae){if(!$i(ee,Ae)&&(ae===Te||v(ae,Te,l,h,w)))return ee.push(Ae)})){K=!1;break}}else if(!(ae===ve||v(ae,ve,l,h,w))){K=!1;break}}return w.delete(i),w.delete(s),K}function N_(i,s,l,h,v,w,O){switch(l){case La:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case Di:return!(i.byteLength!=s.byteLength||!w(new ts(i),new ts(s)));case he:case ye:case $r:return Nr(+i,+s);case V:return i.name==s.name&&i.message==s.message;case xi:case Pi:return i==s+"";case Ze:var x=Hc;case Ir:var D=h&E;if(x||(x=Vo),i.size!=s.size&&!D)return!1;var k=O.get(i);if(k)return k==s;h|=S,O.set(i,s);var j=Cm(x(i),x(s),h,v,w,O);return O.delete(i),j;case Ho:if(Li)return Li.call(i)==Li.call(s)}return!1}function L_(i,s,l,h,v,w){var O=l&E,x=hl(i),D=x.length,k=hl(s),j=k.length;if(D!=j&&!O)return!1;for(var z=D;z--;){var K=x[z];if(!(O?K in s:Be.call(s,K)))return!1}var ee=w.get(i),ae=w.get(s);if(ee&&ae)return ee==s&&ae==i;var ve=!0;w.set(i,s),w.set(s,i);for(var ie=O;++z<D;){K=x[z];var Te=i[K],Ae=s[K];if(h)var cr=O?h(Ae,Te,K,s,i,w):h(Te,Ae,K,i,s,w);if(!(cr===r?Te===Ae||v(Te,Ae,l,h,w):cr)){ve=!1;break}ie||(ie=K=="constructor")}if(ve&&!ie){var Kt=i.constructor,lr=s.constructor;Kt!=lr&&"constructor"in i&&"constructor"in s&&!(typeof Kt=="function"&&Kt instanceof Kt&&typeof lr=="function"&&lr instanceof lr)&&(ve=!1)}return w.delete(i),w.delete(s),ve}function bn(i){return El($m(i,r,Bm),i+"")}function hl(i){return qh(i,wt,yl)}function ml(i){return qh(i,tr,Am)}var gl=ss?function(i){return ss.get(i)}:Fl;function ws(i){for(var s=i.name+"",l=Ga[s],h=Be.call(Ga,s)?l.length:0;h--;){var v=l[h],w=v.func;if(w==null||w==i)return v.name}return s}function Va(i){var s=Be.call(b,"placeholder")?b:i;return s.placeholder}function re(){var i=b.iteratee||Il;return i=i===Il?Vh:i,arguments.length?i(arguments[0],arguments[1]):i}function Es(i,s){var l=i.__data__;return G_(s)?l[typeof s=="string"?"string":"hash"]:l.map}function vl(i){for(var s=wt(i),l=s.length;l--;){var h=s[l],v=i[h];s[l]=[h,v,Rm(v)]}return s}function ba(i,s){var l=KE(i,s);return Kh(l)?l:r}function k_(i){var s=Be.call(i,ha),l=i[ha];try{i[ha]=r;var h=!0}catch{}var v=Qo.call(i);return h&&(s?i[ha]=l:delete i[ha]),v}var yl=Gc?function(i){return i==null?[]:(i=Ge(i),Fn(Gc(i),function(s){return Ih.call(i,s)}))}:Nl,Am=Gc?function(i){for(var s=[];i;)Nn(s,yl(i)),i=rs(i);return s}:Nl,Nt=qt;(qc&&Nt(new qc(new ArrayBuffer(1)))!=La||Mi&&Nt(new Mi)!=Ze||Yc&&Nt(Yc.resolve())!=Hp||Ua&&Nt(new Ua)!=Ir||Fi&&Nt(new Fi)!=Ri)&&(Nt=function(i){var s=qt(i),l=s==hn?i.constructor:r,h=l?Sa(l):"";if(h)switch(h){case S1:return La;case w1:return Ze;case E1:return Hp;case _1:return Ir;case T1:return Ri}return s});function j_(i,s,l){for(var h=-1,v=l.length;++h<v;){var w=l[h],O=w.size;switch(w.type){case"drop":i+=O;break;case"dropRight":s-=O;break;case"take":s=Ft(s,i+O);break;case"takeRight":i=gt(i,s-O);break}}return{start:i,end:s}}function W_(i){var s=i.match(qw);return s?s[1].split(Yw):[]}function xm(i,s,l){s=Bn(s,i);for(var h=-1,v=s.length,w=!1;++h<v;){var O=qr(s[h]);if(!(w=i!=null&&l(i,O)))break;i=i[O]}return w||++h!=v?w:(v=i==null?0:i.length,!!v&&Ps(v)&&Sn(O,v)&&(fe(i)||wa(i)))}function B_(i){var s=i.length,l=new i.constructor(s);return s&&typeof i[0]=="string"&&Be.call(i,"index")&&(l.index=i.index,l.input=i.input),l}function Pm(i){return typeof i.constructor=="function"&&!Ui(i)?qa(rs(i)):{}}function z_(i,s,l){var h=i.constructor;switch(s){case Di:return fl(i);case he:case ye:return new h(+i);case La:return O_(i,l);case vc:case yc:case bc:case Sc:case wc:case Ec:case _c:case Tc:case Oc:return fm(i,l);case Ze:return new h;case $r:case Pi:return new h(i);case xi:return C_(i);case Ir:return new h;case Ho:return A_(i)}}function H_(i,s){var l=s.length;if(!l)return i;var h=l-1;return s[h]=(l>1?"& ":"")+s[h],s=s.join(l>2?", ":" "),i.replace(Gw,`{
|
|
89
|
+
/* [wrapped with `+s+`] */
|
|
90
|
+
`)}function U_(i){return fe(i)||wa(i)||!!(Mh&&i&&i[Mh])}function Sn(i,s){var l=typeof i;return s=s??St,!!s&&(l=="number"||l!="symbol"&&rE.test(i))&&i>-1&&i%1==0&&i<s}function Yt(i,s,l){if(!tt(l))return!1;var h=typeof s;return(h=="number"?er(l)&&Sn(s,l.length):h=="string"&&s in l)?Nr(l[s],i):!1}function bl(i,s){if(fe(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||ur(i)?!0:Bw.test(i)||!Ww.test(i)||s!=null&&i in Ge(s)}function G_(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function Sl(i){var s=ws(i),l=b[s];if(typeof l!="function"||!(s in Ce.prototype))return!1;if(i===l)return!0;var h=gl(l);return!!h&&i===h[0]}function q_(i){return!!Rh&&Rh in i}var Y_=Jo?wn:Ll;function Ui(i){var s=i&&i.constructor,l=typeof s=="function"&&s.prototype||Ha;return i===l}function Rm(i){return i===i&&!tt(i)}function Dm(i,s){return function(l){return l==null?!1:l[i]===s&&(s!==r||i in Ge(l))}}function K_(i){var s=As(i,function(h){return l.size===d&&l.clear(),h}),l=s.cache;return s}function V_(i,s){var l=i[1],h=s[1],v=l|h,w=v<(T|C|W),O=h==W&&l==P||h==W&&l==G&&i[7].length<=s[8]||h==(W|G)&&s[7].length<=s[8]&&l==P;if(!(w||O))return i;h&T&&(i[2]=s[2],v|=l&T?0:A);var x=s[3];if(x){var D=i[3];i[3]=D?pm(D,x,s[4]):x,i[4]=D?Ln(i[3],p):s[4]}return x=s[5],x&&(D=i[5],i[5]=D?hm(D,x,s[6]):x,i[6]=D?Ln(i[5],p):s[6]),x=s[7],x&&(i[7]=x),h&W&&(i[8]=i[8]==null?s[8]:Ft(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=v,i}function Z_(i){var s=[];if(i!=null)for(var l in Ge(i))s.push(l);return s}function J_(i){return Qo.call(i)}function $m(i,s,l){return s=gt(s===r?i.length-1:s,0),function(){for(var h=arguments,v=-1,w=gt(h.length-s,0),O=I(w);++v<w;)O[v]=h[s+v];v=-1;for(var x=I(s+1);++v<s;)x[v]=h[v];return x[s]=l(O),ir(i,this,x)}}function Im(i,s){return s.length<2?i:ya(i,Tr(s,0,-1))}function X_(i,s){for(var l=i.length,h=Ft(s.length,l),v=Qt(i);h--;){var w=s[h];i[h]=Sn(w,l)?v[w]:r}return i}function wl(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var Mm=Nm(nm),Gi=p1||function(i,s){return Rt.setTimeout(i,s)},El=Nm(w_);function Fm(i,s,l){var h=s+"";return El(i,H_(h,Q_(W_(h),l)))}function Nm(i){var s=0,l=0;return function(){var h=v1(),v=X-(h-l);if(l=h,v>0){if(++s>=Ke)return arguments[0]}else s=0;return i.apply(r,arguments)}}function _s(i,s){var l=-1,h=i.length,v=h-1;for(s=s===r?h:s;++l<s;){var w=al(l,v),O=i[w];i[w]=i[l],i[l]=O}return i.length=s,i}var Lm=K_(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(zw,function(l,h,v,w){s.push(v?w.replace(Zw,"$1"):h||l)}),s});function qr(i){if(typeof i=="string"||ur(i))return i;var s=i+"";return s=="0"&&1/i==-lt?"-0":s}function Sa(i){if(i!=null){try{return Xo.call(i)}catch{}try{return i+""}catch{}}return""}function Q_(i,s){return Sr(se,function(l){var h="_."+l[0];s&l[1]&&!Yo(i,h)&&i.push(h)}),i.sort()}function km(i){if(i instanceof Ce)return i.clone();var s=new Er(i.__wrapped__,i.__chain__);return s.__actions__=Qt(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function eT(i,s,l){(l?Yt(i,s,l):s===r)?s=1:s=gt(ge(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var v=0,w=0,O=I(is(h/s));v<h;)O[w++]=Tr(i,v,v+=s);return O}function tT(i){for(var s=-1,l=i==null?0:i.length,h=0,v=[];++s<l;){var w=i[s];w&&(v[h++]=w)}return v}function rT(){var i=arguments.length;if(!i)return[];for(var s=I(i-1),l=arguments[0],h=i;h--;)s[h-1]=arguments[h];return Nn(fe(l)?Qt(l):[l],Dt(s,1))}var nT=be(function(i,s){return st(i)?ji(i,Dt(s,1,st,!0)):[]}),aT=be(function(i,s){var l=Or(s);return st(l)&&(l=r),st(i)?ji(i,Dt(s,1,st,!0),re(l,2)):[]}),iT=be(function(i,s){var l=Or(s);return st(l)&&(l=r),st(i)?ji(i,Dt(s,1,st,!0),r,l):[]});function oT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===r?1:ge(s),Tr(i,s<0?0:s,h)):[]}function sT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===r?1:ge(s),s=h-s,Tr(i,0,s<0?0:s)):[]}function uT(i,s){return i&&i.length?ms(i,re(s,3),!0,!0):[]}function cT(i,s){return i&&i.length?ms(i,re(s,3),!0):[]}function lT(i,s,l,h){var v=i==null?0:i.length;return v?(l&&typeof l!="number"&&Yt(i,s,l)&&(l=0,h=v),r_(i,s,l,h)):[]}function jm(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var v=l==null?0:ge(l);return v<0&&(v=gt(h+v,0)),Ko(i,re(s,3),v)}function Wm(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var v=h-1;return l!==r&&(v=ge(l),v=l<0?gt(h+v,0):Ft(v,h-1)),Ko(i,re(s,3),v,!0)}function Bm(i){var s=i==null?0:i.length;return s?Dt(i,1):[]}function fT(i){var s=i==null?0:i.length;return s?Dt(i,lt):[]}function dT(i,s){var l=i==null?0:i.length;return l?(s=s===r?1:ge(s),Dt(i,s)):[]}function pT(i){for(var s=-1,l=i==null?0:i.length,h={};++s<l;){var v=i[s];h[v[0]]=v[1]}return h}function zm(i){return i&&i.length?i[0]:r}function hT(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var v=l==null?0:ge(l);return v<0&&(v=gt(h+v,0)),ja(i,s,v)}function mT(i){var s=i==null?0:i.length;return s?Tr(i,0,-1):[]}var gT=be(function(i){var s=Je(i,cl);return s.length&&s[0]===i[0]?Qc(s):[]}),vT=be(function(i){var s=Or(i),l=Je(i,cl);return s===Or(l)?s=r:l.pop(),l.length&&l[0]===i[0]?Qc(l,re(s,2)):[]}),yT=be(function(i){var s=Or(i),l=Je(i,cl);return s=typeof s=="function"?s:r,s&&l.pop(),l.length&&l[0]===i[0]?Qc(l,r,s):[]});function bT(i,s){return i==null?"":m1.call(i,s)}function Or(i){var s=i==null?0:i.length;return s?i[s-1]:r}function ST(i,s,l){var h=i==null?0:i.length;if(!h)return-1;var v=h;return l!==r&&(v=ge(l),v=v<0?gt(h+v,0):Ft(v,h-1)),s===s?QE(i,s,v):Ko(i,Eh,v,!0)}function wT(i,s){return i&&i.length?Qh(i,ge(s)):r}var ET=be(Hm);function Hm(i,s){return i&&i.length&&s&&s.length?nl(i,s):i}function _T(i,s,l){return i&&i.length&&s&&s.length?nl(i,s,re(l,2)):i}function TT(i,s,l){return i&&i.length&&s&&s.length?nl(i,s,r,l):i}var OT=bn(function(i,s){var l=i==null?0:i.length,h=Vc(i,s);return rm(i,Je(s,function(v){return Sn(v,l)?+v:v}).sort(dm)),h});function CT(i,s){var l=[];if(!(i&&i.length))return l;var h=-1,v=[],w=i.length;for(s=re(s,3);++h<w;){var O=i[h];s(O,h,i)&&(l.push(O),v.push(h))}return rm(i,v),l}function _l(i){return i==null?i:b1.call(i)}function AT(i,s,l){var h=i==null?0:i.length;return h?(l&&typeof l!="number"&&Yt(i,s,l)?(s=0,l=h):(s=s==null?0:ge(s),l=l===r?h:ge(l)),Tr(i,s,l)):[]}function xT(i,s){return hs(i,s)}function PT(i,s,l){return ol(i,s,re(l,2))}function RT(i,s){var l=i==null?0:i.length;if(l){var h=hs(i,s);if(h<l&&Nr(i[h],s))return h}return-1}function DT(i,s){return hs(i,s,!0)}function $T(i,s,l){return ol(i,s,re(l,2),!0)}function IT(i,s){var l=i==null?0:i.length;if(l){var h=hs(i,s,!0)-1;if(Nr(i[h],s))return h}return-1}function MT(i){return i&&i.length?am(i):[]}function FT(i,s){return i&&i.length?am(i,re(s,2)):[]}function NT(i){var s=i==null?0:i.length;return s?Tr(i,1,s):[]}function LT(i,s,l){return i&&i.length?(s=l||s===r?1:ge(s),Tr(i,0,s<0?0:s)):[]}function kT(i,s,l){var h=i==null?0:i.length;return h?(s=l||s===r?1:ge(s),s=h-s,Tr(i,s<0?0:s,h)):[]}function jT(i,s){return i&&i.length?ms(i,re(s,3),!1,!0):[]}function WT(i,s){return i&&i.length?ms(i,re(s,3)):[]}var BT=be(function(i){return Wn(Dt(i,1,st,!0))}),zT=be(function(i){var s=Or(i);return st(s)&&(s=r),Wn(Dt(i,1,st,!0),re(s,2))}),HT=be(function(i){var s=Or(i);return s=typeof s=="function"?s:r,Wn(Dt(i,1,st,!0),r,s)});function UT(i){return i&&i.length?Wn(i):[]}function GT(i,s){return i&&i.length?Wn(i,re(s,2)):[]}function qT(i,s){return s=typeof s=="function"?s:r,i&&i.length?Wn(i,r,s):[]}function Tl(i){if(!(i&&i.length))return[];var s=0;return i=Fn(i,function(l){if(st(l))return s=gt(l.length,s),!0}),Bc(s,function(l){return Je(i,kc(l))})}function Um(i,s){if(!(i&&i.length))return[];var l=Tl(i);return s==null?l:Je(l,function(h){return ir(s,r,h)})}var YT=be(function(i,s){return st(i)?ji(i,s):[]}),KT=be(function(i){return ul(Fn(i,st))}),VT=be(function(i){var s=Or(i);return st(s)&&(s=r),ul(Fn(i,st),re(s,2))}),ZT=be(function(i){var s=Or(i);return s=typeof s=="function"?s:r,ul(Fn(i,st),r,s)}),JT=be(Tl);function XT(i,s){return um(i||[],s||[],ki)}function QT(i,s){return um(i||[],s||[],zi)}var eO=be(function(i){var s=i.length,l=s>1?i[s-1]:r;return l=typeof l=="function"?(i.pop(),l):r,Um(i,l)});function Gm(i){var s=b(i);return s.__chain__=!0,s}function tO(i,s){return s(i),i}function Ts(i,s){return s(i)}var rO=bn(function(i){var s=i.length,l=s?i[0]:0,h=this.__wrapped__,v=function(w){return Vc(w,i)};return s>1||this.__actions__.length||!(h instanceof Ce)||!Sn(l)?this.thru(v):(h=h.slice(l,+l+(s?1:0)),h.__actions__.push({func:Ts,args:[v],thisArg:r}),new Er(h,this.__chain__).thru(function(w){return s&&!w.length&&w.push(r),w}))});function nO(){return Gm(this)}function aO(){return new Er(this.value(),this.__chain__)}function iO(){this.__values__===r&&(this.__values__=ig(this.value()));var i=this.__index__>=this.__values__.length,s=i?r:this.__values__[this.__index__++];return{done:i,value:s}}function oO(){return this}function sO(i){for(var s,l=this;l instanceof cs;){var h=km(l);h.__index__=0,h.__values__=r,s?v.__wrapped__=h:s=h;var v=h;l=l.__wrapped__}return v.__wrapped__=i,s}function uO(){var i=this.__wrapped__;if(i instanceof Ce){var s=i;return this.__actions__.length&&(s=new Ce(this)),s=s.reverse(),s.__actions__.push({func:Ts,args:[_l],thisArg:r}),new Er(s,this.__chain__)}return this.thru(_l)}function cO(){return sm(this.__wrapped__,this.__actions__)}var lO=gs(function(i,s,l){Be.call(i,l)?++i[l]:vn(i,l,1)});function fO(i,s,l){var h=fe(i)?Sh:t_;return l&&Yt(i,s,l)&&(s=r),h(i,re(s,3))}function dO(i,s){var l=fe(i)?Fn:Uh;return l(i,re(s,3))}var pO=ym(jm),hO=ym(Wm);function mO(i,s){return Dt(Os(i,s),1)}function gO(i,s){return Dt(Os(i,s),lt)}function vO(i,s,l){return l=l===r?1:ge(l),Dt(Os(i,s),l)}function qm(i,s){var l=fe(i)?Sr:jn;return l(i,re(s,3))}function Ym(i,s){var l=fe(i)?NE:Hh;return l(i,re(s,3))}var yO=gs(function(i,s,l){Be.call(i,l)?i[l].push(s):vn(i,l,[s])});function bO(i,s,l,h){i=er(i)?i:Ja(i),l=l&&!h?ge(l):0;var v=i.length;return l<0&&(l=gt(v+l,0)),Rs(i)?l<=v&&i.indexOf(s,l)>-1:!!v&&ja(i,s,l)>-1}var SO=be(function(i,s,l){var h=-1,v=typeof s=="function",w=er(i)?I(i.length):[];return jn(i,function(O){w[++h]=v?ir(s,O,l):Wi(O,s,l)}),w}),wO=gs(function(i,s,l){vn(i,l,s)});function Os(i,s){var l=fe(i)?Je:Zh;return l(i,re(s,3))}function EO(i,s,l,h){return i==null?[]:(fe(s)||(s=s==null?[]:[s]),l=h?r:l,fe(l)||(l=l==null?[]:[l]),em(i,s,l))}var _O=gs(function(i,s,l){i[l?0:1].push(s)},function(){return[[],[]]});function TO(i,s,l){var h=fe(i)?Nc:Th,v=arguments.length<3;return h(i,re(s,4),l,v,jn)}function OO(i,s,l){var h=fe(i)?LE:Th,v=arguments.length<3;return h(i,re(s,4),l,v,Hh)}function CO(i,s){var l=fe(i)?Fn:Uh;return l(i,xs(re(s,3)))}function AO(i){var s=fe(i)?jh:b_;return s(i)}function xO(i,s,l){(l?Yt(i,s,l):s===r)?s=1:s=ge(s);var h=fe(i)?Z1:S_;return h(i,s)}function PO(i){var s=fe(i)?J1:E_;return s(i)}function RO(i){if(i==null)return 0;if(er(i))return Rs(i)?Ba(i):i.length;var s=Nt(i);return s==Ze||s==Ir?i.size:tl(i).length}function DO(i,s,l){var h=fe(i)?Lc:__;return l&&Yt(i,s,l)&&(s=r),h(i,re(s,3))}var $O=be(function(i,s){if(i==null)return[];var l=s.length;return l>1&&Yt(i,s[0],s[1])?s=[]:l>2&&Yt(s[0],s[1],s[2])&&(s=[s[0]]),em(i,Dt(s,1),[])}),Cs=d1||function(){return Rt.Date.now()};function IO(i,s){if(typeof s!="function")throw new wr(u);return i=ge(i),function(){if(--i<1)return s.apply(this,arguments)}}function Km(i,s,l){return s=l?r:s,s=i&&s==null?i.length:s,yn(i,W,r,r,r,r,s)}function Vm(i,s){var l;if(typeof s!="function")throw new wr(u);return i=ge(i),function(){return--i>0&&(l=s.apply(this,arguments)),i<=1&&(s=r),l}}var Ol=be(function(i,s,l){var h=T;if(l.length){var v=Ln(l,Va(Ol));h|=_}return yn(i,h,s,l,v)}),Zm=be(function(i,s,l){var h=T|C;if(l.length){var v=Ln(l,Va(Zm));h|=_}return yn(s,h,i,l,v)});function Jm(i,s,l){s=l?r:s;var h=yn(i,P,r,r,r,r,r,s);return h.placeholder=Jm.placeholder,h}function Xm(i,s,l){s=l?r:s;var h=yn(i,$,r,r,r,r,r,s);return h.placeholder=Xm.placeholder,h}function Qm(i,s,l){var h,v,w,O,x,D,k=0,j=!1,z=!1,K=!0;if(typeof i!="function")throw new wr(u);s=Cr(s)||0,tt(l)&&(j=!!l.leading,z="maxWait"in l,w=z?gt(Cr(l.maxWait)||0,s):w,K="trailing"in l?!!l.trailing:K);function ee(ut){var Lr=h,_n=v;return h=v=r,k=ut,O=i.apply(_n,Lr),O}function ae(ut){return k=ut,x=Gi(Te,s),j?ee(ut):O}function ve(ut){var Lr=ut-D,_n=ut-k,yg=s-Lr;return z?Ft(yg,w-_n):yg}function ie(ut){var Lr=ut-D,_n=ut-k;return D===r||Lr>=s||Lr<0||z&&_n>=w}function Te(){var ut=Cs();if(ie(ut))return Ae(ut);x=Gi(Te,ve(ut))}function Ae(ut){return x=r,K&&h?ee(ut):(h=v=r,O)}function cr(){x!==r&&cm(x),k=0,h=D=v=x=r}function Kt(){return x===r?O:Ae(Cs())}function lr(){var ut=Cs(),Lr=ie(ut);if(h=arguments,v=this,D=ut,Lr){if(x===r)return ae(D);if(z)return cm(x),x=Gi(Te,s),ee(D)}return x===r&&(x=Gi(Te,s)),O}return lr.cancel=cr,lr.flush=Kt,lr}var MO=be(function(i,s){return zh(i,1,s)}),FO=be(function(i,s,l){return zh(i,Cr(s)||0,l)});function NO(i){return yn(i,Q)}function As(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new wr(u);var l=function(){var h=arguments,v=s?s.apply(this,h):h[0],w=l.cache;if(w.has(v))return w.get(v);var O=i.apply(this,h);return l.cache=w.set(v,O)||w,O};return l.cache=new(As.Cache||gn),l}As.Cache=gn;function xs(i){if(typeof i!="function")throw new wr(u);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function LO(i){return Vm(2,i)}var kO=T_(function(i,s){s=s.length==1&&fe(s[0])?Je(s[0],or(re())):Je(Dt(s,1),or(re()));var l=s.length;return be(function(h){for(var v=-1,w=Ft(h.length,l);++v<w;)h[v]=s[v].call(this,h[v]);return ir(i,this,h)})}),Cl=be(function(i,s){var l=Ln(s,Va(Cl));return yn(i,_,r,s,l)}),eg=be(function(i,s){var l=Ln(s,Va(eg));return yn(i,M,r,s,l)}),jO=bn(function(i,s){return yn(i,G,r,r,r,s)});function WO(i,s){if(typeof i!="function")throw new wr(u);return s=s===r?s:ge(s),be(i,s)}function BO(i,s){if(typeof i!="function")throw new wr(u);return s=s==null?0:gt(ge(s),0),be(function(l){var h=l[s],v=zn(l,0,s);return h&&Nn(v,h),ir(i,this,v)})}function zO(i,s,l){var h=!0,v=!0;if(typeof i!="function")throw new wr(u);return tt(l)&&(h="leading"in l?!!l.leading:h,v="trailing"in l?!!l.trailing:v),Qm(i,s,{leading:h,maxWait:s,trailing:v})}function HO(i){return Km(i,1)}function UO(i,s){return Cl(ll(s),i)}function GO(){if(!arguments.length)return[];var i=arguments[0];return fe(i)?i:[i]}function qO(i){return _r(i,y)}function YO(i,s){return s=typeof s=="function"?s:r,_r(i,y,s)}function KO(i){return _r(i,m|y)}function VO(i,s){return s=typeof s=="function"?s:r,_r(i,m|y,s)}function ZO(i,s){return s==null||Bh(i,s,wt(s))}function Nr(i,s){return i===s||i!==i&&s!==s}var JO=Ss(Xc),XO=Ss(function(i,s){return i>=s}),wa=Yh(function(){return arguments}())?Yh:function(i){return it(i)&&Be.call(i,"callee")&&!Ih.call(i,"callee")},fe=I.isArray,QO=hh?or(hh):s_;function er(i){return i!=null&&Ps(i.length)&&!wn(i)}function st(i){return it(i)&&er(i)}function eC(i){return i===!0||i===!1||it(i)&&qt(i)==he}var Hn=h1||Ll,tC=mh?or(mh):u_;function rC(i){return it(i)&&i.nodeType===1&&!qi(i)}function nC(i){if(i==null)return!0;if(er(i)&&(fe(i)||typeof i=="string"||typeof i.splice=="function"||Hn(i)||Za(i)||wa(i)))return!i.length;var s=Nt(i);if(s==Ze||s==Ir)return!i.size;if(Ui(i))return!tl(i).length;for(var l in i)if(Be.call(i,l))return!1;return!0}function aC(i,s){return Bi(i,s)}function iC(i,s,l){l=typeof l=="function"?l:r;var h=l?l(i,s):r;return h===r?Bi(i,s,r,l):!!h}function Al(i){if(!it(i))return!1;var s=qt(i);return s==V||s==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!qi(i)}function oC(i){return typeof i=="number"&&Fh(i)}function wn(i){if(!tt(i))return!1;var s=qt(i);return s==F||s==at||s==pe||s==Rw}function tg(i){return typeof i=="number"&&i==ge(i)}function Ps(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=St}function tt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function it(i){return i!=null&&typeof i=="object"}var rg=gh?or(gh):l_;function sC(i,s){return i===s||el(i,s,vl(s))}function uC(i,s,l){return l=typeof l=="function"?l:r,el(i,s,vl(s),l)}function cC(i){return ng(i)&&i!=+i}function lC(i){if(Y_(i))throw new ce(o);return Kh(i)}function fC(i){return i===null}function dC(i){return i==null}function ng(i){return typeof i=="number"||it(i)&&qt(i)==$r}function qi(i){if(!it(i)||qt(i)!=hn)return!1;var s=rs(i);if(s===null)return!0;var l=Be.call(s,"constructor")&&s.constructor;return typeof l=="function"&&l instanceof l&&Xo.call(l)==u1}var xl=vh?or(vh):f_;function pC(i){return tg(i)&&i>=-St&&i<=St}var ag=yh?or(yh):d_;function Rs(i){return typeof i=="string"||!fe(i)&&it(i)&&qt(i)==Pi}function ur(i){return typeof i=="symbol"||it(i)&&qt(i)==Ho}var Za=bh?or(bh):p_;function hC(i){return i===r}function mC(i){return it(i)&&Nt(i)==Ri}function gC(i){return it(i)&&qt(i)==$w}var vC=Ss(rl),yC=Ss(function(i,s){return i<=s});function ig(i){if(!i)return[];if(er(i))return Rs(i)?Mr(i):Qt(i);if(Ii&&i[Ii])return ZE(i[Ii]());var s=Nt(i),l=s==Ze?Hc:s==Ir?Vo:Ja;return l(i)}function En(i){if(!i)return i===0?i:0;if(i=Cr(i),i===lt||i===-lt){var s=i<0?-1:1;return s*pn}return i===i?i:0}function ge(i){var s=En(i),l=s%1;return s===s?l?s-l:s:0}function og(i){return i?va(ge(i),0,q):0}function Cr(i){if(typeof i=="number")return i;if(ur(i))return H;if(tt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=tt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=Oh(i);var l=Qw.test(i);return l||tE.test(i)?IE(i.slice(2),l?2:8):Xw.test(i)?H:+i}function sg(i){return Gr(i,tr(i))}function bC(i){return i?va(ge(i),-St,St):i===0?i:0}function Me(i){return i==null?"":sr(i)}var SC=Ya(function(i,s){if(Ui(s)||er(s)){Gr(s,wt(s),i);return}for(var l in s)Be.call(s,l)&&ki(i,l,s[l])}),ug=Ya(function(i,s){Gr(s,tr(s),i)}),Ds=Ya(function(i,s,l,h){Gr(s,tr(s),i,h)}),wC=Ya(function(i,s,l,h){Gr(s,wt(s),i,h)}),EC=bn(Vc);function _C(i,s){var l=qa(i);return s==null?l:Wh(l,s)}var TC=be(function(i,s){i=Ge(i);var l=-1,h=s.length,v=h>2?s[2]:r;for(v&&Yt(s[0],s[1],v)&&(h=1);++l<h;)for(var w=s[l],O=tr(w),x=-1,D=O.length;++x<D;){var k=O[x],j=i[k];(j===r||Nr(j,Ha[k])&&!Be.call(i,k))&&(i[k]=w[k])}return i}),OC=be(function(i){return i.push(r,Om),ir(cg,r,i)});function CC(i,s){return wh(i,re(s,3),Ur)}function AC(i,s){return wh(i,re(s,3),Jc)}function xC(i,s){return i==null?i:Zc(i,re(s,3),tr)}function PC(i,s){return i==null?i:Gh(i,re(s,3),tr)}function RC(i,s){return i&&Ur(i,re(s,3))}function DC(i,s){return i&&Jc(i,re(s,3))}function $C(i){return i==null?[]:ds(i,wt(i))}function IC(i){return i==null?[]:ds(i,tr(i))}function Pl(i,s,l){var h=i==null?r:ya(i,s);return h===r?l:h}function MC(i,s){return i!=null&&xm(i,s,n_)}function Rl(i,s){return i!=null&&xm(i,s,a_)}var FC=Sm(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=Qo.call(s)),i[s]=l},$l(rr)),NC=Sm(function(i,s,l){s!=null&&typeof s.toString!="function"&&(s=Qo.call(s)),Be.call(i,s)?i[s].push(l):i[s]=[l]},re),LC=be(Wi);function wt(i){return er(i)?kh(i):tl(i)}function tr(i){return er(i)?kh(i,!0):h_(i)}function kC(i,s){var l={};return s=re(s,3),Ur(i,function(h,v,w){vn(l,s(h,v,w),h)}),l}function jC(i,s){var l={};return s=re(s,3),Ur(i,function(h,v,w){vn(l,v,s(h,v,w))}),l}var WC=Ya(function(i,s,l){ps(i,s,l)}),cg=Ya(function(i,s,l,h){ps(i,s,l,h)}),BC=bn(function(i,s){var l={};if(i==null)return l;var h=!1;s=Je(s,function(w){return w=Bn(w,i),h||(h=w.length>1),w}),Gr(i,ml(i),l),h&&(l=_r(l,m|g|y,F_));for(var v=s.length;v--;)sl(l,s[v]);return l});function zC(i,s){return lg(i,xs(re(s)))}var HC=bn(function(i,s){return i==null?{}:g_(i,s)});function lg(i,s){if(i==null)return{};var l=Je(ml(i),function(h){return[h]});return s=re(s),tm(i,l,function(h,v){return s(h,v[0])})}function UC(i,s,l){s=Bn(s,i);var h=-1,v=s.length;for(v||(v=1,i=r);++h<v;){var w=i==null?r:i[qr(s[h])];w===r&&(h=v,w=l),i=wn(w)?w.call(i):w}return i}function GC(i,s,l){return i==null?i:zi(i,s,l)}function qC(i,s,l,h){return h=typeof h=="function"?h:r,i==null?i:zi(i,s,l,h)}var fg=_m(wt),dg=_m(tr);function YC(i,s,l){var h=fe(i),v=h||Hn(i)||Za(i);if(s=re(s,4),l==null){var w=i&&i.constructor;v?l=h?new w:[]:tt(i)?l=wn(w)?qa(rs(i)):{}:l={}}return(v?Sr:Ur)(i,function(O,x,D){return s(l,O,x,D)}),l}function KC(i,s){return i==null?!0:sl(i,s)}function VC(i,s,l){return i==null?i:om(i,s,ll(l))}function ZC(i,s,l,h){return h=typeof h=="function"?h:r,i==null?i:om(i,s,ll(l),h)}function Ja(i){return i==null?[]:zc(i,wt(i))}function JC(i){return i==null?[]:zc(i,tr(i))}function XC(i,s,l){return l===r&&(l=s,s=r),l!==r&&(l=Cr(l),l=l===l?l:0),s!==r&&(s=Cr(s),s=s===s?s:0),va(Cr(i),s,l)}function QC(i,s,l){return s=En(s),l===r?(l=s,s=0):l=En(l),i=Cr(i),i_(i,s,l)}function eA(i,s,l){if(l&&typeof l!="boolean"&&Yt(i,s,l)&&(s=l=r),l===r&&(typeof s=="boolean"?(l=s,s=r):typeof i=="boolean"&&(l=i,i=r)),i===r&&s===r?(i=0,s=1):(i=En(i),s===r?(s=i,i=0):s=En(s)),i>s){var h=i;i=s,s=h}if(l||i%1||s%1){var v=Nh();return Ft(i+v*(s-i+$E("1e-"+((v+"").length-1))),s)}return al(i,s)}var tA=Ka(function(i,s,l){return s=s.toLowerCase(),i+(l?pg(s):s)});function pg(i){return Dl(Me(i).toLowerCase())}function hg(i){return i=Me(i),i&&i.replace(nE,GE).replace(EE,"")}function rA(i,s,l){i=Me(i),s=sr(s);var h=i.length;l=l===r?h:va(ge(l),0,h);var v=l;return l-=s.length,l>=0&&i.slice(l,v)==s}function nA(i){return i=Me(i),i&&Lw.test(i)?i.replace(Gp,qE):i}function aA(i){return i=Me(i),i&&Hw.test(i)?i.replace(Cc,"\\$&"):i}var iA=Ka(function(i,s,l){return i+(l?"-":"")+s.toLowerCase()}),oA=Ka(function(i,s,l){return i+(l?" ":"")+s.toLowerCase()}),sA=vm("toLowerCase");function uA(i,s,l){i=Me(i),s=ge(s);var h=s?Ba(i):0;if(!s||h>=s)return i;var v=(s-h)/2;return bs(os(v),l)+i+bs(is(v),l)}function cA(i,s,l){i=Me(i),s=ge(s);var h=s?Ba(i):0;return s&&h<s?i+bs(s-h,l):i}function lA(i,s,l){i=Me(i),s=ge(s);var h=s?Ba(i):0;return s&&h<s?bs(s-h,l)+i:i}function fA(i,s,l){return l||s==null?s=0:s&&(s=+s),y1(Me(i).replace(Ac,""),s||0)}function dA(i,s,l){return(l?Yt(i,s,l):s===r)?s=1:s=ge(s),il(Me(i),s)}function pA(){var i=arguments,s=Me(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var hA=Ka(function(i,s,l){return i+(l?"_":"")+s.toLowerCase()});function mA(i,s,l){return l&&typeof l!="number"&&Yt(i,s,l)&&(s=l=r),l=l===r?q:l>>>0,l?(i=Me(i),i&&(typeof s=="string"||s!=null&&!xl(s))&&(s=sr(s),!s&&Wa(i))?zn(Mr(i),0,l):i.split(s,l)):[]}var gA=Ka(function(i,s,l){return i+(l?" ":"")+Dl(s)});function vA(i,s,l){return i=Me(i),l=l==null?0:va(ge(l),0,i.length),s=sr(s),i.slice(l,l+s.length)==s}function yA(i,s,l){var h=b.templateSettings;l&&Yt(i,s,l)&&(s=r),i=Me(i),s=Ds({},s,h,Tm);var v=Ds({},s.imports,h.imports,Tm),w=wt(v),O=zc(v,w),x,D,k=0,j=s.interpolate||Uo,z="__p += '",K=Uc((s.escape||Uo).source+"|"+j.source+"|"+(j===qp?Jw:Uo).source+"|"+(s.evaluate||Uo).source+"|$","g"),ee="//# sourceURL="+(Be.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++AE+"]")+`
|
|
91
|
+
`;i.replace(K,function(ie,Te,Ae,cr,Kt,lr){return Ae||(Ae=cr),z+=i.slice(k,lr).replace(aE,YE),Te&&(x=!0,z+=`' +
|
|
92
|
+
__e(`+Te+`) +
|
|
93
|
+
'`),Kt&&(D=!0,z+=`';
|
|
94
|
+
`+Kt+`;
|
|
95
|
+
__p += '`),Ae&&(z+=`' +
|
|
24
96
|
((__t = (`+Ae+`)) == null ? '' : __t) +
|
|
25
|
-
'`),
|
|
26
|
-
`;var ae=
|
|
27
|
-
`+
|
|
97
|
+
'`),k=lr+ie.length,ie}),z+=`';
|
|
98
|
+
`;var ae=Be.call(s,"variable")&&s.variable;if(!ae)z=`with (obj) {
|
|
99
|
+
`+z+`
|
|
28
100
|
}
|
|
29
|
-
`;else if(
|
|
101
|
+
`;else if(Vw.test(ae))throw new ce(c);z=(D?z.replace(Iw,""):z).replace(Mw,"$1").replace(Fw,"$1;"),z="function("+(ae||"obj")+`) {
|
|
30
102
|
`+(ae?"":`obj || (obj = {});
|
|
31
|
-
`)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(
|
|
103
|
+
`)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
|
|
32
104
|
function print() { __p += __j.call(arguments, '') }
|
|
33
105
|
`:`;
|
|
34
|
-
`)+
|
|
35
|
-
}`;var _e=Nd(function(){return Pe(b,te+"return "+B).apply(t,S)});if(_e.source=B,oc(_e))throw _e;return _e}function SS(n){return Fe(n).toLowerCase()}function TS(n){return Fe(n).toUpperCase()}function wS(n,o,c){if(n=Fe(n),n&&(c||o===t))return Gl(n);if(!n||!(o=kt(o)))return n;var d=ir(n),g=ir(o),b=Yl(d,g),S=Vl(d,g)+1;return Vr(d,b,S).join("")}function CS(n,o,c){if(n=Fe(n),n&&(c||o===t))return n.slice(0,Kl(n)+1);if(!n||!(o=kt(o)))return n;var d=ir(n),g=Vl(d,ir(o))+1;return Vr(d,0,g).join("")}function xS(n,o,c){if(n=Fe(n),n&&(c||o===t))return n.replace(K,"");if(!n||!(o=kt(o)))return n;var d=ir(n),g=Yl(d,ir(o));return Vr(d,g).join("")}function OS(n,o){var c=De,d=Ee;if(Ke(o)){var g="separator"in o?o.separator:g;c="length"in o?ye(o.length):c,d="omission"in o?kt(o.omission):d}n=Fe(n);var b=n.length;if(Rn(n)){var S=ir(n);b=S.length}if(c>=b)return n;var x=c-Dn(d);if(x<1)return d;var R=S?Vr(S,0,x).join(""):n.slice(0,x);if(g===t)return R+d;if(S&&(x+=R.length-x),sc(g)){if(n.slice(x).search(g)){var N,k=R;for(g.global||(g=Si(g.source,Fe(Vt.exec(g))+"g")),g.lastIndex=0;N=g.exec(k);)var B=N.index;R=R.slice(0,B===t?x:B)}}else if(n.indexOf(kt(g),x)!=x){var z=R.lastIndexOf(g);z>-1&&(R=R.slice(0,z))}return R+d}function AS(n){return n=Fe(n),n&&to.test(n)?n.replace(eo,ny):n}var RS=Nn(function(n,o,c){return n+(c?" ":"")+o.toUpperCase()}),uc=kf("toUpperCase");function Ld(n,o,c){return n=Fe(n),o=c?t:o,o===t?Qm(n)?sy(n):Um(n):n.match(o)||[]}var Nd=Se(function(n,o){try{return Lt(n,t,o)}catch(c){return oc(c)?c:new fe(c)}}),DS=xr(function(n,o){return Kt(o,function(c){c=vr(c),wr(n,c,nc(n[c],n))}),n});function PS(n){var o=n==null?0:n.length,c=re();return n=o?Ye(n,function(d){if(typeof d[1]!="function")throw new Jt(u);return[c(d[0]),d[1]]}):[],Se(function(d){for(var g=-1;++g<o;){var b=n[g];if(Lt(b[0],this,d))return Lt(b[1],this,d)}})}function FS(n){return nb(Qt(n,y))}function lc(n){return function(){return n}}function IS(n,o){return n==null||n!==n?o:n}var MS=Bf(),$S=Bf(!0);function It(n){return n}function fc(n){return vf(typeof n=="function"?n:Qt(n,y))}function LS(n){return yf(Qt(n,y))}function NS(n,o){return bf(n,Qt(o,y))}var kS=Se(function(n,o){return function(c){return _a(c,n,o)}}),jS=Se(function(n,o){return function(c){return _a(n,c,o)}});function dc(n,o,c){var d=ut(o),g=Ao(o,d);c==null&&!(Ke(o)&&(g.length||!d.length))&&(c=o,o=n,n=this,g=Ao(o,ut(o)));var b=!(Ke(c)&&"chain"in c)||!!c.chain,S=Ar(n);return Kt(g,function(x){var R=o[x];n[x]=R,S&&(n.prototype[x]=function(){var N=this.__chain__;if(b||N){var k=n(this.__wrapped__),B=k.__actions__=Dt(this.__actions__);return B.push({func:R,args:arguments,thisArg:n}),k.__chain__=N,k}return R.apply(n,Wr([this.value()],arguments))})}),n}function BS(){return pt._===this&&(pt._=dy),this}function pc(){}function WS(n){return n=ye(n),Se(function(o){return _f(o,n)})}var HS=qi(Ye),US=qi(Bl),qS=qi(gi);function kd(n){return Xi(n)?vi(vr(n)):_b(n)}function GS(n){return function(o){return n==null?t:mn(n,o)}}var YS=Hf(),VS=Hf(!0);function hc(){return[]}function gc(){return!1}function zS(){return{}}function KS(){return""}function JS(){return!0}function XS(n,o){if(n=ye(n),n<1||n>ct)return[];var c=V,d=vt(n,V);o=re(o),n-=V;for(var g=bi(d,o);++c<n;)o(c);return g}function QS(n){return he(n)?Ye(n,vr):jt(n)?[n]:Dt(ad(Fe(n)))}function ZS(n){var o=++ly;return Fe(n)+o}var eT=Mo(function(n,o){return n+o},0),tT=Gi("ceil"),rT=Mo(function(n,o){return n/o},1),nT=Gi("floor");function aT(n){return n&&n.length?Oo(n,It,Di):t}function oT(n,o){return n&&n.length?Oo(n,re(o,2),Di):t}function sT(n){return Ul(n,It)}function iT(n,o){return Ul(n,re(o,2))}function cT(n){return n&&n.length?Oo(n,It,Mi):t}function uT(n,o){return n&&n.length?Oo(n,re(o,2),Mi):t}var lT=Mo(function(n,o){return n*o},1),fT=Gi("round"),dT=Mo(function(n,o){return n-o},0);function pT(n){return n&&n.length?yi(n,It):0}function hT(n,o){return n&&n.length?yi(n,re(o,2)):0}return m.after=L_,m.ary=gd,m.assign=TE,m.assignIn=Rd,m.assignInWith=Vo,m.assignWith=wE,m.at=CE,m.before=vd,m.bind=nc,m.bindAll=DS,m.bindKey=md,m.castArray=z_,m.chain=dd,m.chunk=n0,m.compact=a0,m.concat=o0,m.cond=PS,m.conforms=FS,m.constant=lc,m.countBy=p_,m.create=xE,m.curry=yd,m.curryRight=bd,m.debounce=_d,m.defaults=OE,m.defaultsDeep=AE,m.defer=N_,m.delay=k_,m.difference=s0,m.differenceBy=i0,m.differenceWith=c0,m.drop=u0,m.dropRight=l0,m.dropRightWhile=f0,m.dropWhile=d0,m.fill=p0,m.filter=g_,m.flatMap=y_,m.flatMapDeep=b_,m.flatMapDepth=__,m.flatten=cd,m.flattenDeep=h0,m.flattenDepth=g0,m.flip=j_,m.flow=MS,m.flowRight=$S,m.fromPairs=v0,m.functions=$E,m.functionsIn=LE,m.groupBy=E_,m.initial=y0,m.intersection=b0,m.intersectionBy=_0,m.intersectionWith=E0,m.invert=kE,m.invertBy=jE,m.invokeMap=T_,m.iteratee=fc,m.keyBy=w_,m.keys=ut,m.keysIn=Ft,m.map=Wo,m.mapKeys=WE,m.mapValues=HE,m.matches=LS,m.matchesProperty=NS,m.memoize=Uo,m.merge=UE,m.mergeWith=Dd,m.method=kS,m.methodOf=jS,m.mixin=dc,m.negate=qo,m.nthArg=WS,m.omit=qE,m.omitBy=GE,m.once=B_,m.orderBy=C_,m.over=HS,m.overArgs=W_,m.overEvery=US,m.overSome=qS,m.partial=ac,m.partialRight=Ed,m.partition=x_,m.pick=YE,m.pickBy=Pd,m.property=kd,m.propertyOf=GS,m.pull=C0,m.pullAll=ld,m.pullAllBy=x0,m.pullAllWith=O0,m.pullAt=A0,m.range=YS,m.rangeRight=VS,m.rearg=H_,m.reject=R_,m.remove=R0,m.rest=U_,m.reverse=tc,m.sampleSize=P_,m.set=zE,m.setWith=KE,m.shuffle=F_,m.slice=D0,m.sortBy=$_,m.sortedUniq=N0,m.sortedUniqBy=k0,m.split=yS,m.spread=q_,m.tail=j0,m.take=B0,m.takeRight=W0,m.takeRightWhile=H0,m.takeWhile=U0,m.tap=a_,m.throttle=G_,m.thru=Bo,m.toArray=xd,m.toPairs=Fd,m.toPairsIn=Id,m.toPath=QS,m.toPlainObject=Ad,m.transform=JE,m.unary=Y_,m.union=q0,m.unionBy=G0,m.unionWith=Y0,m.uniq=V0,m.uniqBy=z0,m.uniqWith=K0,m.unset=XE,m.unzip=rc,m.unzipWith=fd,m.update=QE,m.updateWith=ZE,m.values=Bn,m.valuesIn=eS,m.without=J0,m.words=Ld,m.wrap=V_,m.xor=X0,m.xorBy=Q0,m.xorWith=Z0,m.zip=e_,m.zipObject=t_,m.zipObjectDeep=r_,m.zipWith=n_,m.entries=Fd,m.entriesIn=Id,m.extend=Rd,m.extendWith=Vo,dc(m,m),m.add=eT,m.attempt=Nd,m.camelCase=aS,m.capitalize=Md,m.ceil=tT,m.clamp=tS,m.clone=K_,m.cloneDeep=X_,m.cloneDeepWith=Q_,m.cloneWith=J_,m.conformsTo=Z_,m.deburr=$d,m.defaultTo=IS,m.divide=rT,m.endsWith=oS,m.eq=ur,m.escape=sS,m.escapeRegExp=iS,m.every=h_,m.find=v_,m.findIndex=sd,m.findKey=RE,m.findLast=m_,m.findLastIndex=id,m.findLastKey=DE,m.floor=nT,m.forEach=pd,m.forEachRight=hd,m.forIn=PE,m.forInRight=FE,m.forOwn=IE,m.forOwnRight=ME,m.get=ic,m.gt=eE,m.gte=tE,m.has=NE,m.hasIn=cc,m.head=ud,m.identity=It,m.includes=S_,m.indexOf=m0,m.inRange=rS,m.invoke=BE,m.isArguments=_n,m.isArray=he,m.isArrayBuffer=rE,m.isArrayLike=Pt,m.isArrayLikeObject=et,m.isBoolean=nE,m.isBuffer=zr,m.isDate=aE,m.isElement=oE,m.isEmpty=sE,m.isEqual=iE,m.isEqualWith=cE,m.isError=oc,m.isFinite=uE,m.isFunction=Ar,m.isInteger=Sd,m.isLength=Go,m.isMap=Td,m.isMatch=lE,m.isMatchWith=fE,m.isNaN=dE,m.isNative=pE,m.isNil=gE,m.isNull=hE,m.isNumber=wd,m.isObject=Ke,m.isObjectLike=Xe,m.isPlainObject=xa,m.isRegExp=sc,m.isSafeInteger=vE,m.isSet=Cd,m.isString=Yo,m.isSymbol=jt,m.isTypedArray=jn,m.isUndefined=mE,m.isWeakMap=yE,m.isWeakSet=bE,m.join=S0,m.kebabCase=cS,m.last=er,m.lastIndexOf=T0,m.lowerCase=uS,m.lowerFirst=lS,m.lt=_E,m.lte=EE,m.max=aT,m.maxBy=oT,m.mean=sT,m.meanBy=iT,m.min=cT,m.minBy=uT,m.stubArray=hc,m.stubFalse=gc,m.stubObject=zS,m.stubString=KS,m.stubTrue=JS,m.multiply=lT,m.nth=w0,m.noConflict=BS,m.noop=pc,m.now=Ho,m.pad=fS,m.padEnd=dS,m.padStart=pS,m.parseInt=hS,m.random=nS,m.reduce=O_,m.reduceRight=A_,m.repeat=gS,m.replace=vS,m.result=VE,m.round=fT,m.runInContext=A,m.sample=D_,m.size=I_,m.snakeCase=mS,m.some=M_,m.sortedIndex=P0,m.sortedIndexBy=F0,m.sortedIndexOf=I0,m.sortedLastIndex=M0,m.sortedLastIndexBy=$0,m.sortedLastIndexOf=L0,m.startCase=bS,m.startsWith=_S,m.subtract=dT,m.sum=pT,m.sumBy=hT,m.template=ES,m.times=XS,m.toFinite=Rr,m.toInteger=ye,m.toLength=Od,m.toLower=SS,m.toNumber=tr,m.toSafeInteger=SE,m.toString=Fe,m.toUpper=TS,m.trim=wS,m.trimEnd=CS,m.trimStart=xS,m.truncate=OS,m.unescape=AS,m.uniqueId=ZS,m.upperCase=RS,m.upperFirst=uc,m.each=pd,m.eachRight=hd,m.first=ud,dc(m,function(){var n={};return hr(m,function(o,c){Ne.call(m.prototype,c)||(n[c]=o)}),n}(),{chain:!1}),m.VERSION=a,Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){m[n].placeholder=m}),Kt(["drop","take"],function(n,o){xe.prototype[n]=function(c){c=c===t?1:st(ye(c),0);var d=this.__filtered__&&!o?new xe(this):this.clone();return d.__filtered__?d.__takeCount__=vt(c,d.__takeCount__):d.__views__.push({size:vt(c,V),type:n+(d.__dir__<0?"Right":"")}),d},xe.prototype[n+"Right"]=function(c){return this.reverse()[n](c).reverse()}}),Kt(["filter","map","takeWhile"],function(n,o){var c=o+1,d=c==ke||c==rt;xe.prototype[n]=function(g){var b=this.clone();return b.__iteratees__.push({iteratee:re(g,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),Kt(["head","last"],function(n,o){var c="take"+(o?"Right":"");xe.prototype[n]=function(){return this[c](1).value()[0]}}),Kt(["initial","tail"],function(n,o){var c="drop"+(o?"":"Right");xe.prototype[n]=function(){return this.__filtered__?new xe(this):this[c](1)}}),xe.prototype.compact=function(){return this.filter(It)},xe.prototype.find=function(n){return this.filter(n).head()},xe.prototype.findLast=function(n){return this.reverse().find(n)},xe.prototype.invokeMap=Se(function(n,o){return typeof n=="function"?new xe(this):this.map(function(c){return _a(c,n,o)})}),xe.prototype.reject=function(n){return this.filter(qo(re(n)))},xe.prototype.slice=function(n,o){n=ye(n);var c=this;return c.__filtered__&&(n>0||o<0)?new xe(c):(n<0?c=c.takeRight(-n):n&&(c=c.drop(n)),o!==t&&(o=ye(o),c=o<0?c.dropRight(-o):c.take(o-n)),c)},xe.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},xe.prototype.toArray=function(){return this.take(V)},hr(xe.prototype,function(n,o){var c=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),g=m[d?"take"+(o=="last"?"Right":""):o],b=d||/^find/.test(o);g&&(m.prototype[o]=function(){var S=this.__wrapped__,x=d?[1]:arguments,R=S instanceof xe,N=x[0],k=R||he(S),B=function(we){var Ae=g.apply(m,Wr([we],x));return d&&z?Ae[0]:Ae};k&&c&&typeof N=="function"&&N.length!=1&&(R=k=!1);var z=this.__chain__,te=!!this.__actions__.length,ae=b&&!z,_e=R&&!te;if(!b&&k){S=_e?S:new xe(this);var oe=n.apply(S,x);return oe.__actions__.push({func:Bo,args:[B],thisArg:t}),new Xt(oe,z)}return ae&&_e?n.apply(this,x):(oe=this.thru(B),ae?d?oe.value()[0]:oe.value():oe)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(n){var o=fo[n],c=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",d=/^(?:pop|shift)$/.test(n);m.prototype[n]=function(){var g=arguments;if(d&&!this.__chain__){var b=this.value();return o.apply(he(b)?b:[],g)}return this[c](function(S){return o.apply(he(S)?S:[],g)})}}),hr(xe.prototype,function(n,o){var c=m[o];if(c){var d=c.name+"";Ne.call(Mn,d)||(Mn[d]=[]),Mn[d].push({name:o,func:c})}}),Mn[Io(t,D).name]=[{name:"wrapper",func:t}],xe.prototype.clone=Ay,xe.prototype.reverse=Ry,xe.prototype.value=Dy,m.prototype.at=o_,m.prototype.chain=s_,m.prototype.commit=i_,m.prototype.next=c_,m.prototype.plant=l_,m.prototype.reverse=f_,m.prototype.toJSON=m.prototype.valueOf=m.prototype.value=d_,m.prototype.first=m.prototype.head,pa&&(m.prototype[pa]=u_),m},Pn=iy();dn?((dn.exports=Pn)._=Pn,fi._=Pn):pt._=Pn}).call(Pr)})(hs,hs.exports);var Ce=hs.exports;const C1=Os(Ce),Ya=2e3,$u={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles",forceLogin:!1},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Jr.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},Rh="4DWS_PREFS",Dh=e=>`APP_STATE_${e}`,Ph=()=>{var e,r;return((r=(e=window==null?void 0:window.$$datastores)==null?void 0:e.ds)==null?void 0:r.getBaseID())||""};function Fh(e){try{const r=Ph(),t=JSON.stringify(e);localStorage.setItem(Dh(r),t)}catch(r){console.error(r)}}function Ih(e){try{const r=JSON.stringify(e);localStorage.setItem(Rh,r)}catch(r){console.error(r)}}function Lu(){try{const e=localStorage.getItem(Rh);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Zn(){const e=Ph(),r=localStorage.getItem(Dh(e));if(r){const t=JSON.parse(r);return t.tabs=t.tabs.map(a=>({...a,flags:{...a.flags,enabled:!0}})),t}return $u}function Rs(e){const{name:r,type:t,path:a}=e,s=a.split(".").at(-1);switch(t){case v.FileFolderType.WEBFORM:return`${r}`;case v.FileFolderType.METHOD:case v.FileFolderType.CLASS:return s?`${r}.${s}`:r;case v.FileFolderType.ROLES:case v.FileFolderType.HTTP_HANDLERS:return r;default:return`${r}.${t}`}}const Mh=e=>{if(!e)return[];const r=new Map;return e.dataClasses.forEach(t=>{var i,u;const a=t.extraProperties||{},s={id:t.className,type:"table",position:{x:((i=a.position)==null?void 0:i.x)||0,y:((u=a.position)==null?void 0:u.y)||0},dragHandle:".custom-drag-handle",data:t};r.set(t.name,s)}),Array.from(r.values())};function $h(e){return e?["json","4dmodel","webform","mform","qodoc"].includes(e.toLowerCase()):!1}const Xn=(e,r,t="")=>r?e.type==="currentState"&&e.value===r?{...e,value:t}:e.type==="combination"&&e.conditions?{...e,conditions:e.conditions.map(a=>Xn(a,r,t))}:e:e;function Lh(e,r){const{id:t,label:a}=r;return{...e,components:Object.entries(e.components||{}).reduce((s,[i,u])=>({...s,[i]:{...u,custom:Object.entries(u.custom).reduce((l,[f,p])=>f===`states:${t}`?l:{...l,[f]:p},{}),props:Object.entries(u.props).reduce((l,[f,p])=>{let h=p;return f==="events"&&(h=h.map(y=>{var _,E;return y.type==="simple-action"?{...y,state:{...y.state,states:(E=(_=y.state)==null?void 0:_.states)==null?void 0:E.filter(T=>T!==t)}}:y})),{...l,[f]:h}},{})}}),{}),metadata:{...e.metadata,states:e.metadata.states.filter(s=>(s==null?void 0:s.id)!==t).map(s=>s.conditions?{...s,conditions:Xn(s.conditions,a)}:s)}}}const x1=(e,r)=>Ce.isEqual(e,r);function O1(){this.__data__=[],this.size=0}var A1=O1;function R1(e,r){return e===r||e!==e&&r!==r}var D1=R1,P1=D1;function F1(e,r){for(var t=e.length;t--;)if(P1(e[t][0],r))return t;return-1}var Ds=F1,I1=Ds,M1=Array.prototype,$1=M1.splice;function L1(e){var r=this.__data__,t=I1(r,e);if(t<0)return!1;var a=r.length-1;return t==a?r.pop():$1.call(r,t,1),--this.size,!0}var N1=L1,k1=Ds;function j1(e){var r=this.__data__,t=k1(r,e);return t<0?void 0:r[t][1]}var B1=j1,W1=Ds;function H1(e){return W1(this.__data__,e)>-1}var U1=H1,q1=Ds;function G1(e,r){var t=this.__data__,a=q1(t,e);return a<0?(++this.size,t.push([e,r])):t[a][1]=r,this}var Y1=G1,V1=A1,z1=N1,K1=B1,J1=U1,X1=Y1;function ea(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}ea.prototype.clear=V1;ea.prototype.delete=z1;ea.prototype.get=K1;ea.prototype.has=J1;ea.prototype.set=X1;var Ps=ea,Q1=Ps;function Z1(){this.__data__=new Q1,this.size=0}var eC=Z1;function tC(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var rC=tC;function nC(e){return this.__data__.get(e)}var aC=nC;function oC(e){return this.__data__.has(e)}var sC=oC,iC=As,cC=Ga,uC="[object AsyncFunction]",lC="[object Function]",fC="[object GeneratorFunction]",dC="[object Proxy]";function pC(e){if(!cC(e))return!1;var r=iC(e);return r==lC||r==fC||r==uC||r==dC}var hC=pC,gC=yr,vC=gC["__core-js_shared__"],mC=vC,Cc=mC,fp=function(){var e=/[^.]+$/.exec(Cc&&Cc.keys&&Cc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yC(e){return!!fp&&fp in e}var bC=yC,_C=Function.prototype,EC=_C.toString;function SC(e){if(e!=null){try{return EC.call(e)}catch{}try{return e+""}catch{}}return""}var Nh=SC,TC=hC,wC=bC,CC=Ga,xC=Nh,OC=/[\\^$.*+?()[\]{}|]/g,AC=/^\[object .+?Constructor\]$/,RC=Function.prototype,DC=Object.prototype,PC=RC.toString,FC=DC.hasOwnProperty,IC=RegExp("^"+PC.call(FC).replace(OC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function MC(e){if(!CC(e)||wC(e))return!1;var r=TC(e)?IC:AC;return r.test(xC(e))}var $C=MC;function LC(e,r){return e==null?void 0:e[r]}var NC=LC,kC=$C,jC=NC;function BC(e,r){var t=jC(e,r);return kC(t)?t:void 0}var ta=BC,WC=ta,HC=yr,UC=WC(HC,"Map"),Nu=UC,qC=ta,GC=qC(Object,"create"),Fs=GC,dp=Fs;function YC(){this.__data__=dp?dp(null):{},this.size=0}var VC=YC;function zC(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var KC=zC,JC=Fs,XC="__lodash_hash_undefined__",QC=Object.prototype,ZC=QC.hasOwnProperty;function ex(e){var r=this.__data__;if(JC){var t=r[e];return t===XC?void 0:t}return ZC.call(r,e)?r[e]:void 0}var tx=ex,rx=Fs,nx=Object.prototype,ax=nx.hasOwnProperty;function ox(e){var r=this.__data__;return rx?r[e]!==void 0:ax.call(r,e)}var sx=ox,ix=Fs,cx="__lodash_hash_undefined__";function ux(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ix&&r===void 0?cx:r,this}var lx=ux,fx=VC,dx=KC,px=tx,hx=sx,gx=lx;function ra(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}ra.prototype.clear=fx;ra.prototype.delete=dx;ra.prototype.get=px;ra.prototype.has=hx;ra.prototype.set=gx;var vx=ra,pp=vx,mx=Ps,yx=Nu;function bx(){this.size=0,this.__data__={hash:new pp,map:new(yx||mx),string:new pp}}var _x=bx;function Ex(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Sx=Ex,Tx=Sx;function wx(e,r){var t=e.__data__;return Tx(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Is=wx,Cx=Is;function xx(e){var r=Cx(this,e).delete(e);return this.size-=r?1:0,r}var Ox=xx,Ax=Is;function Rx(e){return Ax(this,e).get(e)}var Dx=Rx,Px=Is;function Fx(e){return Px(this,e).has(e)}var Ix=Fx,Mx=Is;function $x(e,r){var t=Mx(this,e),a=t.size;return t.set(e,r),this.size+=t.size==a?0:1,this}var Lx=$x,Nx=_x,kx=Ox,jx=Dx,Bx=Ix,Wx=Lx;function na(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}na.prototype.clear=Nx;na.prototype.delete=kx;na.prototype.get=jx;na.prototype.has=Bx;na.prototype.set=Wx;var kh=na,Hx=Ps,Ux=Nu,qx=kh,Gx=200;function Yx(e,r){var t=this.__data__;if(t instanceof Hx){var a=t.__data__;if(!Ux||a.length<Gx-1)return a.push([e,r]),this.size=++t.size,this;t=this.__data__=new qx(a)}return t.set(e,r),this.size=t.size,this}var Vx=Yx,zx=Ps,Kx=eC,Jx=rC,Xx=aC,Qx=sC,Zx=Vx;function Va(e){var r=this.__data__=new zx(e);this.size=r.size}Va.prototype.clear=Kx;Va.prototype.delete=Jx;Va.prototype.get=Xx;Va.prototype.has=Qx;Va.prototype.set=Zx;var eO="__lodash_hash_undefined__";function tO(e){return this.__data__.set(e,eO),this}var rO=tO;function nO(e){return this.__data__.has(e)}var aO=nO,oO=kh,sO=rO,iO=aO;function Xc(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new oO;++r<t;)this.add(e[r])}Xc.prototype.add=Xc.prototype.push=sO;Xc.prototype.has=iO;var cO=yr;cO.Uint8Array;var hp=Iu,gp=hp?hp.prototype:void 0;gp&&gp.valueOf;var uO=As,lO=Mu,fO="[object Arguments]";function dO(e){return lO(e)&&uO(e)==fO}var pO=dO,vp=pO,hO=Mu,jh=Object.prototype,gO=jh.hasOwnProperty,vO=jh.propertyIsEnumerable;vp(function(){return arguments}());var gs={exports:{}};function mO(){return!1}var yO=mO;gs.exports;(function(e,r){var t=yr,a=yO,s=r&&!r.nodeType&&r,i=s&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===s,l=u?t.Buffer:void 0,f=l?l.isBuffer:void 0,p=f||a;e.exports=p})(gs,gs.exports);gs.exports;var vs={exports:{}};vs.exports;(function(e,r){var t=Ch,a=r&&!r.nodeType&&r,s=a&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===a,u=i&&t.process,l=function(){try{var f=s&&s.require&&s.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}}();e.exports=l})(vs,vs.exports);var bO=vs.exports,mp=bO;mp&&mp.isTypedArray;var _O=ta,EO=yr,SO=_O(EO,"DataView"),TO=SO,wO=ta,CO=yr,xO=wO(CO,"Promise"),OO=xO,AO=ta,RO=yr,DO=AO(RO,"Set"),PO=DO,FO=ta,IO=yr,MO=FO(IO,"WeakMap"),$O=MO,Qc=TO,Zc=Nu,eu=OO,tu=PO,ru=$O,Bh=As,aa=Nh,yp="[object Map]",LO="[object Object]",bp="[object Promise]",_p="[object Set]",Ep="[object WeakMap]",Sp="[object DataView]",NO=aa(Qc),kO=aa(Zc),jO=aa(eu),BO=aa(tu),WO=aa(ru),Wn=Bh;(Qc&&Wn(new Qc(new ArrayBuffer(1)))!=Sp||Zc&&Wn(new Zc)!=yp||eu&&Wn(eu.resolve())!=bp||tu&&Wn(new tu)!=_p||ru&&Wn(new ru)!=Ep)&&(Wn=function(e){var r=Bh(e),t=r==LO?e.constructor:void 0,a=t?aa(t):"";if(a)switch(a){case NO:return Sp;case kO:return yp;case jO:return bp;case BO:return _p;case WO:return Ep}return r});typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@ws-ui/craftjs-utils"]="0.2.3");const HO="ROOT";ET(),_T();var Tp;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(Tp||(Tp={}));function ku(e){return`Debugger/${e}`}function Wh(e,r){var a;const t=(a=r.name)==null?void 0:a.replace(/\.(4dm|4qs)$/,"");return`#${e} ${t}`}const UO=typeof process=="object"&&process&&process.platform==="win32";var qO=UO?{sep:"\\"}:{sep:"/"},GO=Hh;function Hh(e,r,t){e instanceof RegExp&&(e=wp(e,t)),r instanceof RegExp&&(r=wp(r,t));var a=Uh(e,r,t);return a&&{start:a[0],end:a[1],pre:t.slice(0,a[0]),body:t.slice(a[0]+e.length,a[1]),post:t.slice(a[1]+r.length)}}function wp(e,r){var t=r.match(e);return t?t[0]:null}Hh.range=Uh;function Uh(e,r,t){var a,s,i,u,l,f=t.indexOf(e),p=t.indexOf(r,f+1),h=f;if(f>=0&&p>0){if(e===r)return[f,p];for(a=[],i=t.length;h>=0&&!l;)h==f?(a.push(h),f=t.indexOf(e,h+1)):a.length==1?l=[a.pop(),p]:(s=a.pop(),s<i&&(i=s,u=p),p=t.indexOf(r,h+1)),h=f<p&&f>=0?f:p;a.length&&(l=[i,u])}return l}var qh=GO,YO=KO,Gh="\0SLASH"+Math.random()+"\0",Yh="\0OPEN"+Math.random()+"\0",ju="\0CLOSE"+Math.random()+"\0",Vh="\0COMMA"+Math.random()+"\0",zh="\0PERIOD"+Math.random()+"\0";function xc(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function VO(e){return e.split("\\\\").join(Gh).split("\\{").join(Yh).split("\\}").join(ju).split("\\,").join(Vh).split("\\.").join(zh)}function zO(e){return e.split(Gh).join("\\").split(Yh).join("{").split(ju).join("}").split(Vh).join(",").split(zh).join(".")}function Kh(e){if(!e)return[""];var r=[],t=qh("{","}",e);if(!t)return e.split(",");var a=t.pre,s=t.body,i=t.post,u=a.split(",");u[u.length-1]+="{"+s+"}";var l=Kh(i);return i.length&&(u[u.length-1]+=l.shift(),u.push.apply(u,l)),r.push.apply(r,u),r}function KO(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Pa(VO(e),!0).map(zO)):[]}function JO(e){return"{"+e+"}"}function XO(e){return/^-?0\d/.test(e)}function QO(e,r){return e<=r}function ZO(e,r){return e>=r}function Pa(e,r){var t=[],a=qh("{","}",e);if(!a)return[e];var s=a.pre,i=a.post.length?Pa(a.post,!1):[""];if(/\$$/.test(a.pre))for(var u=0;u<i.length;u++){var l=s+"{"+a.body+"}"+i[u];t.push(l)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=f||p,y=a.body.indexOf(",")>=0;if(!h&&!y)return a.post.match(/,.*\}/)?(e=a.pre+"{"+a.body+ju+a.post,Pa(e)):[e];var _;if(h)_=a.body.split(/\.\./);else if(_=Kh(a.body),_.length===1&&(_=Pa(_[0],!1).map(JO),_.length===1))return i.map(function(De){return a.pre+_[0]+De});var E;if(h){var T=xc(_[0]),C=xc(_[1]),O=Math.max(_[0].length,_[1].length),D=_.length==3?Math.abs(xc(_[2])):1,F=QO,M=C<T;M&&(D*=-1,F=ZO);var L=_.some(XO);E=[];for(var I=T;F(I,C);I+=D){var G;if(p)G=String.fromCharCode(I),G==="\\"&&(G="");else if(G=String(I),L){var W=O-G.length;if(W>0){var q=new Array(W+1).join("0");I<0?G="-"+q+G.slice(1):G=q+G}}E.push(G)}}else{E=[];for(var ee=0;ee<_.length;ee++)E.push.apply(E,Pa(_[ee],!1))}for(var ee=0;ee<E.length;ee++)for(var u=0;u<i.length;u++){var l=s+E[ee]+i[u];(!r||h||l)&&t.push(l)}}return t}const Ut=Jh=(e,r,t={})=>(ms(r),!t.nocomment&&r.charAt(0)==="#"?!1:new Ms(r,t).match(e));var Jh=Ut;const nu=qO;Ut.sep=nu.sep;const fr=Symbol("globstar **");Ut.GLOBSTAR=fr;const eA=YO,Cp={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},au="[^/]",Oc=au+"*?",tA="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",rA="(?:(?!(?:\\/|^)\\.).)*?",Xh=e=>e.split("").reduce((r,t)=>(r[t]=!0,r),{}),xp=Xh("().*{}+?[]^$\\!"),nA=Xh("[.("),Op=/\/+/;Ut.filter=(e,r={})=>(t,a,s)=>Ut(t,e,r);const Kr=(e,r={})=>{const t={};return Object.keys(e).forEach(a=>t[a]=e[a]),Object.keys(r).forEach(a=>t[a]=r[a]),t};Ut.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ut;const r=Ut,t=(a,s,i)=>r(a,s,Kr(e,i));return t.Minimatch=class extends r.Minimatch{constructor(s,i){super(s,Kr(e,i))}},t.Minimatch.defaults=a=>r.defaults(Kr(e,a)).Minimatch,t.filter=(a,s)=>r.filter(a,Kr(e,s)),t.defaults=a=>r.defaults(Kr(e,a)),t.makeRe=(a,s)=>r.makeRe(a,Kr(e,s)),t.braceExpand=(a,s)=>r.braceExpand(a,Kr(e,s)),t.match=(a,s,i)=>r.match(a,s,Kr(e,i)),t};Ut.braceExpand=(e,r)=>Qh(e,r);const Qh=(e,r={})=>(ms(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:eA(e)),aA=1024*64,ms=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>aA)throw new TypeError("pattern is too long")},Ac=Symbol("subparse");Ut.makeRe=(e,r)=>new Ms(e,r||{}).makeRe();Ut.match=(e,r,t={})=>{const a=new Ms(r,t);return e=e.filter(s=>a.match(s)),a.options.nonull&&!e.length&&e.push(r),e};const oA=e=>e.replace(/\\(.)/g,"$1"),sA=e=>e.replace(/\\([^-\]])/g,"$1"),iA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cA=e=>e.replace(/[[\]\\]/g,"\\$&");class Ms{constructor(r,t){ms(r),t||(t={}),this.options=t,this.set=[],this.pattern=r,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const r=this.pattern,t=this.options;if(!t.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();let a=this.globSet=this.braceExpand();t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,a),a=this.globParts=a.map(s=>s.split(Op)),this.debug(this.pattern,a),a=a.map((s,i,u)=>s.map(this.parse,this)),this.debug(this.pattern,a),a=a.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,a),this.set=a}parseNegate(){if(this.options.nonegate)return;const r=this.pattern;let t=!1,a=0;for(let s=0;s<r.length&&r.charAt(s)==="!";s++)t=!t,a++;a&&(this.pattern=r.slice(a)),this.negate=t}matchOne(r,t,a){var s=this.options;this.debug("matchOne",{this:this,file:r,pattern:t}),this.debug("matchOne",r.length,t.length);for(var i=0,u=0,l=r.length,f=t.length;i<l&&u<f;i++,u++){this.debug("matchOne loop");var p=t[u],h=r[i];if(this.debug(t,p,h),p===!1)return!1;if(p===fr){this.debug("GLOBSTAR",[t,p,h]);var y=i,_=u+1;if(_===f){for(this.debug("** at the end");i<l;i++)if(r[i]==="."||r[i]===".."||!s.dot&&r[i].charAt(0)===".")return!1;return!0}for(;y<l;){var E=r[y];if(this.debug(`
|
|
36
|
-
|
|
37
|
-
>>> no match, partial?`,r,y,t,_),y===l))}var T;if(typeof p=="string"?(T=h===p,this.debug("string match",p,h,T)):(T=h.match(p),this.debug("pattern match",p,h,T)),!T)return!1}if(i===l&&u===f)return!0;if(i===l)return a;if(u===f)return i===l-1&&r[i]==="";throw new Error("wtf?")}braceExpand(){return Qh(this.pattern,this.options)}parse(r,t){ms(r);const a=this.options;if(r==="**")if(a.noglobstar)r="*";else return fr;if(r==="")return"";let s="",i=!1,u=!1;const l=[],f=[];let p,h=!1,y=-1,_=-1,E,T,C,O=r.charAt(0)===".",D=a.dot||O;const F=()=>O?"":D?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=W=>W.charAt(0)==="."?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",L=()=>{if(p){switch(p){case"*":s+=Oc,i=!0;break;case"?":s+=au,i=!0;break;default:s+="\\"+p;break}this.debug("clearStateChar %j %j",p,s),p=!1}};for(let W=0,q;W<r.length&&(q=r.charAt(W));W++){if(this.debug("%s %s %s %j",r,W,s,q),u){if(q==="/")return!1;xp[q]&&(s+="\\"),s+=q,u=!1;continue}switch(q){case"/":return!1;case"\\":if(h&&r.charAt(W+1)==="-"){s+=q;continue}L(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,W,s,q),h){this.debug(" in class"),q==="!"&&W===_+1&&(q="^"),s+=q;continue}this.debug("call clearStateChar %j",p),L(),p=q,a.noext&&L();continue;case"(":{if(h){s+="(";continue}if(!p){s+="\\(";continue}const ee={type:p,start:W-1,reStart:s.length,open:Cp[p].open,close:Cp[p].close};this.debug(this.pattern," ",ee),l.push(ee),s+=ee.open,ee.start===0&&ee.type!=="!"&&(O=!0,s+=M(r.slice(W+1))),this.debug("plType %j %j",p,s),p=!1;continue}case")":{const ee=l[l.length-1];if(h||!ee){s+="\\)";continue}l.pop(),L(),i=!0,T=ee,s+=T.close,T.type==="!"&&f.push(Object.assign(T,{reEnd:s.length}));continue}case"|":{const ee=l[l.length-1];if(h||!ee){s+="\\|";continue}L(),s+="|",ee.start===0&&ee.type!=="!"&&(O=!0,s+=M(r.slice(W+1)));continue}case"[":if(L(),h){s+="\\"+q;continue}h=!0,_=W,y=s.length,s+=q;continue;case"]":if(W===_+1||!h){s+="\\"+q;continue}E=r.substring(_+1,W);try{RegExp("["+cA(sA(E))+"]"),s+=q}catch{s=s.substring(0,y)+"(?:$.)"}i=!0,h=!1;continue;default:L(),xp[q]&&!(q==="^"&&h)&&(s+="\\"),s+=q;break}}for(h&&(E=r.slice(_+1),C=this.parse(E,Ac),s=s.substring(0,y)+"\\["+C[0],i=i||C[1]),T=l.pop();T;T=l.pop()){let W;W=s.slice(T.reStart+T.open.length),this.debug("setting tail",s,T),W=W.replace(/((?:\\{2}){0,64})(\\?)\|/g,(ee,De,Ee)=>(Ee||(Ee="\\"),De+De+Ee+"|")),this.debug(`tail=%j
|
|
38
|
-
|
|
106
|
+
`)+z+`return __p
|
|
107
|
+
}`;var ve=gg(function(){return De(w,ee+"return "+z).apply(r,O)});if(ve.source=z,Al(ve))throw ve;return ve}function bA(i){return Me(i).toLowerCase()}function SA(i){return Me(i).toUpperCase()}function wA(i,s,l){if(i=Me(i),i&&(l||s===r))return Oh(i);if(!i||!(s=sr(s)))return i;var h=Mr(i),v=Mr(s),w=Ch(h,v),O=Ah(h,v)+1;return zn(h,w,O).join("")}function EA(i,s,l){if(i=Me(i),i&&(l||s===r))return i.slice(0,Ph(i)+1);if(!i||!(s=sr(s)))return i;var h=Mr(i),v=Ah(h,Mr(s))+1;return zn(h,0,v).join("")}function _A(i,s,l){if(i=Me(i),i&&(l||s===r))return i.replace(Ac,"");if(!i||!(s=sr(s)))return i;var h=Mr(i),v=Ch(h,Mr(s));return zn(h,v).join("")}function TA(i,s){var l=we,h=Oe;if(tt(s)){var v="separator"in s?s.separator:v;l="length"in s?ge(s.length):l,h="omission"in s?sr(s.omission):h}i=Me(i);var w=i.length;if(Wa(i)){var O=Mr(i);w=O.length}if(l>=w)return i;var x=l-Ba(h);if(x<1)return h;var D=O?zn(O,0,x).join(""):i.slice(0,x);if(v===r)return D+h;if(O&&(x+=D.length-x),xl(v)){if(i.slice(x).search(v)){var k,j=D;for(v.global||(v=Uc(v.source,Me(Yp.exec(v))+"g")),v.lastIndex=0;k=v.exec(j);)var z=k.index;D=D.slice(0,z===r?x:z)}}else if(i.indexOf(sr(v),x)!=x){var K=D.lastIndexOf(v);K>-1&&(D=D.slice(0,K))}return D+h}function OA(i){return i=Me(i),i&&Nw.test(i)?i.replace(Up,e1):i}var CA=Ka(function(i,s,l){return i+(l?" ":"")+s.toUpperCase()}),Dl=vm("toUpperCase");function mg(i,s,l){return i=Me(i),s=l?r:s,s===r?VE(i)?n1(i):WE(i):i.match(s)||[]}var gg=be(function(i,s){try{return ir(i,r,s)}catch(l){return Al(l)?l:new ce(l)}}),AA=bn(function(i,s){return Sr(s,function(l){l=qr(l),vn(i,l,Ol(i[l],i))}),i});function xA(i){var s=i==null?0:i.length,l=re();return i=s?Je(i,function(h){if(typeof h[1]!="function")throw new wr(u);return[l(h[0]),h[1]]}):[],be(function(h){for(var v=-1;++v<s;){var w=i[v];if(ir(w[0],this,h))return ir(w[1],this,h)}})}function PA(i){return e_(_r(i,m))}function $l(i){return function(){return i}}function RA(i,s){return i==null||i!==i?s:i}var DA=bm(),$A=bm(!0);function rr(i){return i}function Il(i){return Vh(typeof i=="function"?i:_r(i,m))}function IA(i){return Jh(_r(i,m))}function MA(i,s){return Xh(i,_r(s,m))}var FA=be(function(i,s){return function(l){return Wi(l,i,s)}}),NA=be(function(i,s){return function(l){return Wi(i,l,s)}});function Ml(i,s,l){var h=wt(s),v=ds(s,h);l==null&&!(tt(s)&&(v.length||!h.length))&&(l=s,s=i,i=this,v=ds(s,wt(s)));var w=!(tt(l)&&"chain"in l)||!!l.chain,O=wn(i);return Sr(v,function(x){var D=s[x];i[x]=D,O&&(i.prototype[x]=function(){var k=this.__chain__;if(w||k){var j=i(this.__wrapped__),z=j.__actions__=Qt(this.__actions__);return z.push({func:D,args:arguments,thisArg:i}),j.__chain__=k,j}return D.apply(i,Nn([this.value()],arguments))})}),i}function LA(){return Rt._===this&&(Rt._=c1),this}function Fl(){}function kA(i){return i=ge(i),be(function(s){return Qh(s,i)})}var jA=dl(Je),WA=dl(Sh),BA=dl(Lc);function vg(i){return bl(i)?kc(qr(i)):v_(i)}function zA(i){return function(s){return i==null?r:ya(i,s)}}var HA=wm(),UA=wm(!0);function Nl(){return[]}function Ll(){return!1}function GA(){return{}}function qA(){return""}function YA(){return!0}function KA(i,s){if(i=ge(i),i<1||i>St)return[];var l=q,h=Ft(i,q);s=re(s),i-=q;for(var v=Bc(h,s);++l<i;)s(l);return v}function VA(i){return fe(i)?Je(i,qr):ur(i)?[i]:Qt(Lm(Me(i)))}function ZA(i){var s=++s1;return Me(i)+s}var JA=ys(function(i,s){return i+s},0),XA=pl("ceil"),QA=ys(function(i,s){return i/s},1),ex=pl("floor");function tx(i){return i&&i.length?fs(i,rr,Xc):r}function rx(i,s){return i&&i.length?fs(i,re(s,2),Xc):r}function nx(i){return _h(i,rr)}function ax(i,s){return _h(i,re(s,2))}function ix(i){return i&&i.length?fs(i,rr,rl):r}function ox(i,s){return i&&i.length?fs(i,re(s,2),rl):r}var sx=ys(function(i,s){return i*s},1),ux=pl("round"),cx=ys(function(i,s){return i-s},0);function lx(i){return i&&i.length?Wc(i,rr):0}function fx(i,s){return i&&i.length?Wc(i,re(s,2)):0}return b.after=IO,b.ary=Km,b.assign=SC,b.assignIn=ug,b.assignInWith=Ds,b.assignWith=wC,b.at=EC,b.before=Vm,b.bind=Ol,b.bindAll=AA,b.bindKey=Zm,b.castArray=GO,b.chain=Gm,b.chunk=eT,b.compact=tT,b.concat=rT,b.cond=xA,b.conforms=PA,b.constant=$l,b.countBy=lO,b.create=_C,b.curry=Jm,b.curryRight=Xm,b.debounce=Qm,b.defaults=TC,b.defaultsDeep=OC,b.defer=MO,b.delay=FO,b.difference=nT,b.differenceBy=aT,b.differenceWith=iT,b.drop=oT,b.dropRight=sT,b.dropRightWhile=uT,b.dropWhile=cT,b.fill=lT,b.filter=dO,b.flatMap=mO,b.flatMapDeep=gO,b.flatMapDepth=vO,b.flatten=Bm,b.flattenDeep=fT,b.flattenDepth=dT,b.flip=NO,b.flow=DA,b.flowRight=$A,b.fromPairs=pT,b.functions=$C,b.functionsIn=IC,b.groupBy=yO,b.initial=mT,b.intersection=gT,b.intersectionBy=vT,b.intersectionWith=yT,b.invert=FC,b.invertBy=NC,b.invokeMap=SO,b.iteratee=Il,b.keyBy=wO,b.keys=wt,b.keysIn=tr,b.map=Os,b.mapKeys=kC,b.mapValues=jC,b.matches=IA,b.matchesProperty=MA,b.memoize=As,b.merge=WC,b.mergeWith=cg,b.method=FA,b.methodOf=NA,b.mixin=Ml,b.negate=xs,b.nthArg=kA,b.omit=BC,b.omitBy=zC,b.once=LO,b.orderBy=EO,b.over=jA,b.overArgs=kO,b.overEvery=WA,b.overSome=BA,b.partial=Cl,b.partialRight=eg,b.partition=_O,b.pick=HC,b.pickBy=lg,b.property=vg,b.propertyOf=zA,b.pull=ET,b.pullAll=Hm,b.pullAllBy=_T,b.pullAllWith=TT,b.pullAt=OT,b.range=HA,b.rangeRight=UA,b.rearg=jO,b.reject=CO,b.remove=CT,b.rest=WO,b.reverse=_l,b.sampleSize=xO,b.set=GC,b.setWith=qC,b.shuffle=PO,b.slice=AT,b.sortBy=$O,b.sortedUniq=MT,b.sortedUniqBy=FT,b.split=mA,b.spread=BO,b.tail=NT,b.take=LT,b.takeRight=kT,b.takeRightWhile=jT,b.takeWhile=WT,b.tap=tO,b.throttle=zO,b.thru=Ts,b.toArray=ig,b.toPairs=fg,b.toPairsIn=dg,b.toPath=VA,b.toPlainObject=sg,b.transform=YC,b.unary=HO,b.union=BT,b.unionBy=zT,b.unionWith=HT,b.uniq=UT,b.uniqBy=GT,b.uniqWith=qT,b.unset=KC,b.unzip=Tl,b.unzipWith=Um,b.update=VC,b.updateWith=ZC,b.values=Ja,b.valuesIn=JC,b.without=YT,b.words=mg,b.wrap=UO,b.xor=KT,b.xorBy=VT,b.xorWith=ZT,b.zip=JT,b.zipObject=XT,b.zipObjectDeep=QT,b.zipWith=eO,b.entries=fg,b.entriesIn=dg,b.extend=ug,b.extendWith=Ds,Ml(b,b),b.add=JA,b.attempt=gg,b.camelCase=tA,b.capitalize=pg,b.ceil=XA,b.clamp=XC,b.clone=qO,b.cloneDeep=KO,b.cloneDeepWith=VO,b.cloneWith=YO,b.conformsTo=ZO,b.deburr=hg,b.defaultTo=RA,b.divide=QA,b.endsWith=rA,b.eq=Nr,b.escape=nA,b.escapeRegExp=aA,b.every=fO,b.find=pO,b.findIndex=jm,b.findKey=CC,b.findLast=hO,b.findLastIndex=Wm,b.findLastKey=AC,b.floor=ex,b.forEach=qm,b.forEachRight=Ym,b.forIn=xC,b.forInRight=PC,b.forOwn=RC,b.forOwnRight=DC,b.get=Pl,b.gt=JO,b.gte=XO,b.has=MC,b.hasIn=Rl,b.head=zm,b.identity=rr,b.includes=bO,b.indexOf=hT,b.inRange=QC,b.invoke=LC,b.isArguments=wa,b.isArray=fe,b.isArrayBuffer=QO,b.isArrayLike=er,b.isArrayLikeObject=st,b.isBoolean=eC,b.isBuffer=Hn,b.isDate=tC,b.isElement=rC,b.isEmpty=nC,b.isEqual=aC,b.isEqualWith=iC,b.isError=Al,b.isFinite=oC,b.isFunction=wn,b.isInteger=tg,b.isLength=Ps,b.isMap=rg,b.isMatch=sC,b.isMatchWith=uC,b.isNaN=cC,b.isNative=lC,b.isNil=dC,b.isNull=fC,b.isNumber=ng,b.isObject=tt,b.isObjectLike=it,b.isPlainObject=qi,b.isRegExp=xl,b.isSafeInteger=pC,b.isSet=ag,b.isString=Rs,b.isSymbol=ur,b.isTypedArray=Za,b.isUndefined=hC,b.isWeakMap=mC,b.isWeakSet=gC,b.join=bT,b.kebabCase=iA,b.last=Or,b.lastIndexOf=ST,b.lowerCase=oA,b.lowerFirst=sA,b.lt=vC,b.lte=yC,b.max=tx,b.maxBy=rx,b.mean=nx,b.meanBy=ax,b.min=ix,b.minBy=ox,b.stubArray=Nl,b.stubFalse=Ll,b.stubObject=GA,b.stubString=qA,b.stubTrue=YA,b.multiply=sx,b.nth=wT,b.noConflict=LA,b.noop=Fl,b.now=Cs,b.pad=uA,b.padEnd=cA,b.padStart=lA,b.parseInt=fA,b.random=eA,b.reduce=TO,b.reduceRight=OO,b.repeat=dA,b.replace=pA,b.result=UC,b.round=ux,b.runInContext=R,b.sample=AO,b.size=RO,b.snakeCase=hA,b.some=DO,b.sortedIndex=xT,b.sortedIndexBy=PT,b.sortedIndexOf=RT,b.sortedLastIndex=DT,b.sortedLastIndexBy=$T,b.sortedLastIndexOf=IT,b.startCase=gA,b.startsWith=vA,b.subtract=cx,b.sum=lx,b.sumBy=fx,b.template=yA,b.times=KA,b.toFinite=En,b.toInteger=ge,b.toLength=og,b.toLower=bA,b.toNumber=Cr,b.toSafeInteger=bC,b.toString=Me,b.toUpper=SA,b.trim=wA,b.trimEnd=EA,b.trimStart=_A,b.truncate=TA,b.unescape=OA,b.uniqueId=ZA,b.upperCase=CA,b.upperFirst=Dl,b.each=qm,b.eachRight=Ym,b.first=zm,Ml(b,function(){var i={};return Ur(b,function(s,l){Be.call(b.prototype,l)||(i[l]=s)}),i}(),{chain:!1}),b.VERSION=n,Sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){b[i].placeholder=b}),Sr(["drop","take"],function(i,s){Ce.prototype[i]=function(l){l=l===r?1:gt(ge(l),0);var h=this.__filtered__&&!s?new Ce(this):this.clone();return h.__filtered__?h.__takeCount__=Ft(l,h.__takeCount__):h.__views__.push({size:Ft(l,q),type:i+(h.__dir__<0?"Right":"")}),h},Ce.prototype[i+"Right"]=function(l){return this.reverse()[i](l).reverse()}}),Sr(["filter","map","takeWhile"],function(i,s){var l=s+1,h=l==xt||l==Pt;Ce.prototype[i]=function(v){var w=this.clone();return w.__iteratees__.push({iteratee:re(v,3),type:l}),w.__filtered__=w.__filtered__||h,w}}),Sr(["head","last"],function(i,s){var l="take"+(s?"Right":"");Ce.prototype[i]=function(){return this[l](1).value()[0]}}),Sr(["initial","tail"],function(i,s){var l="drop"+(s?"":"Right");Ce.prototype[i]=function(){return this.__filtered__?new Ce(this):this[l](1)}}),Ce.prototype.compact=function(){return this.filter(rr)},Ce.prototype.find=function(i){return this.filter(i).head()},Ce.prototype.findLast=function(i){return this.reverse().find(i)},Ce.prototype.invokeMap=be(function(i,s){return typeof i=="function"?new Ce(this):this.map(function(l){return Wi(l,i,s)})}),Ce.prototype.reject=function(i){return this.filter(xs(re(i)))},Ce.prototype.slice=function(i,s){i=ge(i);var l=this;return l.__filtered__&&(i>0||s<0)?new Ce(l):(i<0?l=l.takeRight(-i):i&&(l=l.drop(i)),s!==r&&(s=ge(s),l=s<0?l.dropRight(-s):l.take(s-i)),l)},Ce.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ce.prototype.toArray=function(){return this.take(q)},Ur(Ce.prototype,function(i,s){var l=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),v=b[h?"take"+(s=="last"?"Right":""):s],w=h||/^find/.test(s);v&&(b.prototype[s]=function(){var O=this.__wrapped__,x=h?[1]:arguments,D=O instanceof Ce,k=x[0],j=D||fe(O),z=function(Te){var Ae=v.apply(b,Nn([Te],x));return h&&K?Ae[0]:Ae};j&&l&&typeof k=="function"&&k.length!=1&&(D=j=!1);var K=this.__chain__,ee=!!this.__actions__.length,ae=w&&!K,ve=D&&!ee;if(!w&&j){O=ve?O:new Ce(this);var ie=i.apply(O,x);return ie.__actions__.push({func:Ts,args:[z],thisArg:r}),new Er(ie,K)}return ae&&ve?i.apply(this,x):(ie=this.thru(z),ae?h?ie.value()[0]:ie.value():ie)})}),Sr(["pop","push","shift","sort","splice","unshift"],function(i){var s=Zo[i],l=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);b.prototype[i]=function(){var v=arguments;if(h&&!this.__chain__){var w=this.value();return s.apply(fe(w)?w:[],v)}return this[l](function(O){return s.apply(fe(O)?O:[],v)})}}),Ur(Ce.prototype,function(i,s){var l=b[s];if(l){var h=l.name+"";Be.call(Ga,h)||(Ga[h]=[]),Ga[h].push({name:s,func:l})}}),Ga[vs(r,C).name]=[{name:"wrapper",func:r}],Ce.prototype.clone=O1,Ce.prototype.reverse=C1,Ce.prototype.value=A1,b.prototype.at=rO,b.prototype.chain=nO,b.prototype.commit=aO,b.prototype.next=iO,b.prototype.plant=sO,b.prototype.reverse=uO,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=cO,b.prototype.first=b.prototype.head,Ii&&(b.prototype[Ii]=oO),b},za=a1();pa?((pa.exports=za)._=za,Ic._=za):Rt._=za}).call(Br)})(mu,mu.exports);var oe=mu.exports;const rM=Po(oe);var gr=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(gr||{}),Pr=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(Pr||{}),x0=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(x0||{});Pr.PRIMARY+"",Pr.DANGER+"",Pr.WARNING+"";const hf=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function mf(e,t,r,n){e.addEventListener?e.addEventListener(t,r,n):e.attachEvent&&e.attachEvent("on".concat(t),r)}function Vi(e,t,r,n){e.removeEventListener?e.removeEventListener(t,r,n):e.detachEvent&&e.detachEvent("on".concat(t),r)}function P0(e,t){const r=t.slice(0,t.length-1);for(let n=0;n<r.length;n++)r[n]=e[r[n].toLowerCase()];return r}function R0(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function nM(e,t){const r=e.length>=t.length?e:t,n=e.length>=t.length?t:e;let a=!0;for(let o=0;o<r.length;o++)n.indexOf(r[o])===-1&&(a=!1);return a}const bo={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":hf?173:189,"=":hf?61:187,";":hf?59:186,"'":222,"[":219,"]":221,"\\":220},an={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Vs={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},It={16:!1,18:!1,17:!1,91:!1},nt={};for(let e=1;e<20;e++)bo["f".concat(e)]=111+e;let Qe=[],so=null,D0="all";const Tn=new Map,ko=e=>bo[e.toLowerCase()]||an[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),aM=e=>Object.keys(bo).find(t=>bo[t]===e),iM=e=>Object.keys(an).find(t=>an[t]===e);function $0(e){D0=e||"all"}function So(){return D0||"all"}function oM(){return Qe.slice(0)}function sM(){return Qe.map(e=>aM(e)||iM(e)||String.fromCharCode(e))}function uM(){const e=[];return Object.keys(nt).forEach(t=>{nt[t].forEach(r=>{let{key:n,scope:a,mods:o,shortcut:u}=r;e.push({scope:a,shortcut:u,mods:o,keys:n.split("+").map(c=>ko(c))})})}),e}function cM(e){const t=e.target||e.srcElement,{tagName:r}=t;let n=!0;const a=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(a||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(n=!1),n}function lM(e){return typeof e=="string"&&(e=ko(e)),Qe.indexOf(e)!==-1}function fM(e,t){let r,n;e||(e=So());for(const a in nt)if(Object.prototype.hasOwnProperty.call(nt,a))for(r=nt[a],n=0;n<r.length;)r[n].scope===e?r.splice(n,1).forEach(u=>{let{element:c}=u;return Kd(c)}):n++;So()===e&&$0(t||"all")}function dM(e){let t=e.keyCode||e.which||e.charCode;const r=Qe.indexOf(t);if(r>=0&&Qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&Qe.splice(0,Qe.length),(t===93||t===224)&&(t=91),t in It){It[t]=!1;for(const n in an)an[n]===t&&(xn[n]=!1)}}function I0(e){if(typeof e>"u")Object.keys(nt).forEach(a=>{Array.isArray(nt[a])&&nt[a].forEach(o=>Bs(o)),delete nt[a]}),Kd(null);else if(Array.isArray(e))e.forEach(a=>{a.key&&Bs(a)});else if(typeof e=="object")e.key&&Bs(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let[a,o]=r;typeof a=="function"&&(o=a,a=""),Bs({key:e,scope:a,method:o,splitKey:"+"})}}const Bs=e=>{let{key:t,scope:r,method:n,splitKey:a="+"}=e;R0(t).forEach(u=>{const c=u.split(a),f=c.length,d=c[f-1],p=d==="*"?"*":ko(d);if(!nt[p])return;r||(r=So());const m=f>1?P0(an,c):[],g=[];nt[p]=nt[p].filter(y=>{const S=(n?y.method===n:!0)&&y.scope===r&&nM(y.mods,m);return S&&g.push(y.element),!S}),g.forEach(y=>Kd(y))})};function wv(e,t,r,n){if(t.element!==n)return;let a;if(t.scope===r||t.scope==="all"){a=t.mods.length>0;for(const o in It)Object.prototype.hasOwnProperty.call(It,o)&&(!It[o]&&t.mods.indexOf(+o)>-1||It[o]&&t.mods.indexOf(+o)===-1)&&(a=!1);(t.mods.length===0&&!It[16]&&!It[18]&&!It[17]&&!It[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(Qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function Ev(e,t){const r=nt["*"];let n=e.keyCode||e.which||e.charCode;if(!xn.filter.call(this,e))return;if((n===93||n===224)&&(n=91),Qe.indexOf(n)===-1&&n!==229&&Qe.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=Vs[c];e[c]&&Qe.indexOf(f)===-1?Qe.push(f):!e[c]&&Qe.indexOf(f)>-1?Qe.splice(Qe.indexOf(f),1):c==="metaKey"&&e[c]&&(Qe=Qe.filter(d=>d in Vs||d===n))}),n in It){It[n]=!0;for(const c in an)an[c]===n&&(xn[c]=!0);if(!r)return}for(const c in It)Object.prototype.hasOwnProperty.call(It,c)&&(It[c]=e[Vs[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Qe.indexOf(17)===-1&&Qe.push(17),Qe.indexOf(18)===-1&&Qe.push(18),It[17]=!0,It[18]=!0);const a=So();if(r)for(let c=0;c<r.length;c++)r[c].scope===a&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&wv(e,r[c],a,t);if(!(n in nt))return;const o=nt[n],u=o.length;for(let c=0;c<u;c++)if((e.type==="keydown"&&o[c].keydown||e.type==="keyup"&&o[c].keyup)&&o[c].key){const f=o[c],{splitKey:d}=f,p=f.key.split(d),m=[];for(let g=0;g<p.length;g++)m.push(ko(p[g]));m.sort().join("")===Qe.sort().join("")&&wv(e,f,a,t)}}function xn(e,t,r){Qe=[];const n=R0(e);let a=[],o="all",u=document,c=0,f=!1,d=!0,p="+",m=!1,g=!1;for(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(u=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(d=t.keydown),t.capture!==void 0&&(m=t.capture),typeof t.splitKey=="string"&&(p=t.splitKey),t.single===!0&&(g=!0)),typeof t=="string"&&(o=t),g&&I0(e,o);c<n.length;c++)e=n[c].split(p),a=[],e.length>1&&(a=P0(an,e)),e=e[e.length-1],e=e==="*"?"*":ko(e),e in nt||(nt[e]=[]),nt[e].push({keyup:f,keydown:d,scope:o,mods:a,shortcut:n[c],method:r,key:n[c],splitKey:p,element:u});if(typeof u<"u"&&window){if(!Tn.has(u)){const y=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return Ev(S,u)},E=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;Ev(S,u),dM(S)};Tn.set(u,{keydownListener:y,keyupListenr:E,capture:m}),mf(u,"keydown",y,m),mf(u,"keyup",E,m)}if(!so){const y=()=>{Qe=[]};so={listener:y,capture:m},mf(window,"focus",y,m)}}}function pM(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(nt).forEach(r=>{nt[r].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}function Kd(e){const t=Object.values(nt).flat();if(t.findIndex(n=>{let{element:a}=n;return a===e})<0){const{keydownListener:n,keyupListenr:a,capture:o}=Tn.get(e)||{};n&&a&&(Vi(e,"keyup",a,o),Vi(e,"keydown",n,o),Tn.delete(e))}if((t.length<=0||Tn.size<=0)&&(Object.keys(Tn).forEach(a=>{const{keydownListener:o,keyupListenr:u,capture:c}=Tn.get(a)||{};o&&u&&(Vi(a,"keyup",u,c),Vi(a,"keydown",o,c),Tn.delete(a))}),Tn.clear(),Object.keys(nt).forEach(a=>delete nt[a]),so)){const{listener:a,capture:o}=so;Vi(window,"focus",a,o),so=null}}const gf={getPressedKeyString:sM,setScope:$0,getScope:So,deleteScope:fM,getPressedKeyCodes:oM,getAllKeyCodes:uM,isPressed:lM,filter:cM,trigger:pM,unbind:I0,keyMap:bo,modifier:an,modifierMap:Vs};for(const e in gf)Object.prototype.hasOwnProperty.call(gf,e)&&(xn[e]=gf[e]);if(typeof window<"u"){const e=window.hotkeys;xn.noConflict=t=>(t&&window.hotkeys===xn&&(window.hotkeys=e),xn),window.hotkeys=xn}xn.filter=()=>!0;Y.createContext("");function Pn(e){return typeof e=="function"}function M0(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var vf=M0(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
108
|
+
`+r.map(function(n,a){return a+1+") "+n.toString()}).join(`
|
|
109
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Zf(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ku=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,a,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var c=jf(u),f=c.next();!f.done;f=c.next()){var d=f.value;d.remove(this)}}catch(S){t={error:S}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else u.remove(this);var p=this.initialTeardown;if(Pn(p))try{p()}catch(S){o=S instanceof vf?S.errors:[S]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var g=jf(m),y=g.next();!y.done;y=g.next()){var E=y.value;try{_v(E)}catch(S){o=o??[],S instanceof vf?o=Bf(Bf([],Wf(o)),Wf(S.errors)):o.push(S)}}}catch(S){n={error:S}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(n)throw n.error}}}if(o)throw new vf(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)_v(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Zf(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Zf(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),F0=Ku.EMPTY;function N0(e){return e instanceof Ku||e&&"closed"in e&&Pn(e.remove)&&Pn(e.add)&&Pn(e.unsubscribe)}function _v(e){Pn(e)?e():e.unsubscribe()}var L0={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},hM={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Bf([e,t],Wf(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function mM(e){hM.setTimeout(function(){throw e})}function Tv(){}function Zs(e){e()}var k0=function(e){zu(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,N0(r)&&r.add(n)):n.destination=bM,n}return t.create=function(r,n,a){return new Jf(r,n,a)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ku),gM=Function.prototype.bind;function yf(e,t){return gM.call(e,t)}var vM=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){zs(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){zs(n)}else zs(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){zs(r)}},e}(),Jf=function(e){zu(t,e);function t(r,n,a){var o=e.call(this)||this,u;if(Pn(r)||!r)u={next:r??void 0,error:n??void 0,complete:a??void 0};else{var c;o&&L0.useDeprecatedNextContext?(c=Object.create(r),c.unsubscribe=function(){return o.unsubscribe()},u={next:r.next&&yf(r.next,c),error:r.error&&yf(r.error,c),complete:r.complete&&yf(r.complete,c)}):u=r}return o.destination=new vM(u),o}return t}(k0);function zs(e){mM(e)}function yM(e){throw e}var bM={closed:!0,next:Tv,error:yM,complete:Tv},SM=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function wM(e){return e}function EM(e){return e.length===0?wM:e.length===1?e[0]:function(r){return e.reduce(function(n,a){return a(n)},r)}}var Ov=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var a=this,o=TM(t)?t:new Jf(t,r,n);return Zs(function(){var u=a,c=u.operator,f=u.source;o.add(c?c.call(o,f):f?a._subscribe(o):a._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Cv(r),new r(function(a,o){var u=new Jf({next:function(c){try{t(c)}catch(f){o(f),u.unsubscribe()}},error:o,complete:a});n.subscribe(u)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[SM]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return EM(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Cv(t),new t(function(n,a){var o;r.subscribe(function(u){return o=u},function(u){return a(u)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Cv(e){var t;return(t=e??L0.Promise)!==null&&t!==void 0?t:Promise}function _M(e){return e&&Pn(e.next)&&Pn(e.error)&&Pn(e.complete)}function TM(e){return e&&e instanceof k0||_M(e)&&N0(e)}var OM=M0(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ua=function(e){zu(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new Av(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new OM},t.prototype.next=function(r){var n=this;Zs(function(){var a,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var u=jf(n.currentObservers),c=u.next();!c.done;c=u.next()){var f=c.value;f.next(r)}}catch(d){a={error:d}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(a)throw a.error}}}})},t.prototype.error=function(r){var n=this;Zs(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var a=n.observers;a.length;)a.shift().error(r)}})},t.prototype.complete=function(){var r=this;Zs(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,a=this,o=a.hasError,u=a.isStopped,c=a.observers;return o||u?F0:(this.currentObservers=null,c.push(r),new Ku(function(){n.currentObservers=null,Zf(c,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,a=n.hasError,o=n.thrownError,u=n.isStopped;a?r.error(o):u&&r.complete()},t.prototype.asObservable=function(){var r=new Ov;return r.source=this,r},t.create=function(r,n){return new Av(r,n)},t}(Ov),Av=function(e){zu(t,e);function t(r,n){var a=e.call(this)||this;return a.destination=r,a.source=n,a}return t.prototype.next=function(r){var n,a;(a=(n=this.destination)===null||n===void 0?void 0:n.next)===null||a===void 0||a.call(n,r)},t.prototype.error=function(r){var n,a;(a=(n=this.destination)===null||n===void 0?void 0:n.error)===null||a===void 0||a.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,a;return(a=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&a!==void 0?a:F0},t}(ua),j0=(e=>(e.RELOAD="reload",e))(j0||{}),Vu=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(Vu||{});const Vd=new ua,CM=new ua,Hr=new ua;new ua;var Wr=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e.DIAGNOSTIC_REFRESH="diagnostic-refresh",e))(Wr||{});const Zr=new ua;new ua;const W0=31;var B0=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${W0} characters`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(B0||{});function z0(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>W0)throw new Error(B0.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(e))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(e))throw new Error("Invalid name");return!0}function AM(e){const t=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"{}\\[\\]\\\\]*(?:\\\\.|"(?:[^"{}\\[\\]\\\\]*\\\\.)*[^"{}\\[\\]\\\\]*"))*[^"}\\]]*$)',"gm");return e.replace(t,"")}var ai=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(ai||{});const We={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var N=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.REPORT="report",e.METHOD="method",e.CLASS="class",e.CLASS_FOLDER="classfolder",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.HTTP_HANDLERS="http-handlers",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(N||{}),qe=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(qe||{}),Zd=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(Zd||{});const Ot="roles.json",ca="qodlyApp.json",jo="model.4DModel",Qr="HTTPHandlers.json";function gu(e){const t=e.split("."),r=t.pop(),n=t.join(".").split("/")[0];switch(!0){case r==="4DModel":return N.MODEL;case r==="WebForm":return N.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&n===We.METHODS):return N.METHOD;case(["4dm","4qs","4qm"].includes(r)&&n===We.CLASSES):return N.CLASS;case e===Ot:return N.ROLES;case e===Qr:return N.HTTP_HANDLERS;case e===ca:return N.SETTINGS;default:return N.TEXT}}function Yn(e,t=!1){switch(e){case We.REPORTS:case"report":return"QoDoc";case We.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case We.CLASSES:case We.METHODS:return t?"4qs":"4dm";default:return""}}class xM{constructor(){this.current=Promise.resolve()}lock(){let t;const r=new Promise(a=>{t=a}),n=this.current.then(()=>t);return this.current=r,n}}function Jd(){const e=new xM;return async t=>{const r=await e.lock();try{const n=await t();return r(),n}catch(n){console.error(n),r();return}}}const en=oe.curry((e,t,r)=>e&&oe.get(r,e)===t);oe.curry((e,t,r)=>oe.get(r,e)!==t);const PM=oe.curry((e,t)=>oe.get(t,"id")!==e),RM=oe.curry((e,t)=>oe.get(t,"id")===e);oe.curry((e,t)=>oe.get(t,"path")===e);function vu(e){if(!e)return"";const{id:t,namespace:r}=e;return r&&t?`${r}:${t}`:t}function DM(e){return e.dataType==="array"}function Xd(e){return e.dataType==="object"}function $M(e){return e.type==="scalar"}function H0(e){return DM(e)||Xd(e)||$M(e)}var yu=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(yu||{}),U0=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(U0||{});function Qd(e){var o;let t={};try{const u=((o=e.match(/\/\/%attributes = (.*)/))==null?void 0:o[1])||"";t=JSON.parse(u)}catch{}const{published4DMobile:r,...n}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:yu.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!r,publishedRestOptions:r||{table:"",scope:U0.table}},...n}}function IM(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[yu.capable,yu.incapable].includes(e.preemptive)&&(t.preemptive=e.preemptive),e.publishedSoap&&(t.publishedSoap=!0,e.publishedWsdl&&(t.publishedWsdl=!0)),e.publishedWeb&&(t.publishedWeb=!0),e.publishedSql&&(t.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(t.published4DMobile=e.publishedRestOptions),JSON.stringify(t).replace(/"(true|false)"/g,"$1")}function G0(e,t,r=!1){const n=oe.isString(t)?t:IM(t);if(!r&&MM(e))return e;const a=FM(e);return`//%attributes = ${n}\r
|
|
110
|
+
${a}`}function MM(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function FM(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const bu=()=>fi.uuid().replaceAll("-","").toUpperCase(),Gt="/rest/$designer",NM="/rest/$designer-ext";class xv extends Error{constructor(t,r,n){super(),this.url=t,this.response=r,this.data=n}log(){console.error("Error while sending the request",this)}}async function bt(e,t){const r=await window.fetch(e,t);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const o=await r.json();a=new xv(e,r,o)}catch{a=new xv(e,r)}throw a.log(),a}return await r.json()}var ot={},Xf=ot.ValidationError=function(t,r,n,a,o,u){if(Array.isArray(a)?(this.path=a,this.property=a.reduce(function(f,d){return f+q0(d)},"instance")):a!==void 0&&(this.property=a),t&&(this.message=t),n){var c=n.$id||n.id;this.schema=c||n}r!==void 0&&(this.instance=r),this.name=o,this.argument=u,this.stack=this.toString()};Xf.prototype.toString=function(){return this.property+" "+this.message};var Zu=ot.ValidatorResult=function(t,r,n,a){this.instance=t,this.schema=r,this.options=n,this.path=a.path,this.propertyPath=a.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.throwFirst=n&&n.throwFirst,this.throwAll=n&&n.throwAll,this.disableFormat=n&&n.disableFormat===!0};Zu.prototype.addError=function(t){var r;if(typeof t=="string")r=new Xf(t,this.instance,this.schema,this.path);else{if(!t)throw new Error("Missing error detail");if(!t.message)throw new Error("Missing error message");if(!t.name)throw new Error("Missing validator type");r=new Xf(t.message,this.instance,this.schema,this.path,t.name,t.argument)}if(this.errors.push(r),this.throwFirst)throw new $a(this);if(this.throwError)throw r;return r};Zu.prototype.importErrors=function(t){typeof t=="string"||t&&t.validatorType?this.addError(t):t&&t.errors&&(this.errors=this.errors.concat(t.errors))};function LM(e,t){return t+": "+e.toString()+`
|
|
111
|
+
`}Zu.prototype.toString=function(t){return this.errors.map(LM).join("")};Object.defineProperty(Zu.prototype,"valid",{get:function(){return!this.errors.length}});ot.ValidatorResultError=$a;function $a(e){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$a),this.instance=e.instance,this.schema=e.schema,this.options=e.options,this.errors=e.errors}$a.prototype=new Error;$a.prototype.constructor=$a;$a.prototype.name="Validation Error";var Pv=ot.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)};Pv.prototype=Object.create(Error.prototype,{constructor:{value:Pv,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var Qf=ot.SchemaContext=function(t,r,n,a,o){this.schema=t,this.options=r,Array.isArray(n)?(this.path=n,this.propertyPath=n.reduce(function(u,c){return u+q0(c)},"instance")):this.propertyPath=n,this.base=a,this.schemas=o};Qf.prototype.resolve=function(t){return Y0(this.base,t)};Qf.prototype.makeChild=function(t,r){var n=r===void 0?this.path:this.path.concat([r]),a=t.$id||t.id;let o=Y0(this.base,a||"");var u=new Qf(t,this.options,n,o,Object.create(this.schemas));return a&&!u.schemas[o]&&(u.schemas[o]=t),u};var zr=ot.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(e){return typeof e=="string"&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch{t=!1}return t},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};zr.regexp=zr.regex;zr.pattern=zr.regex;zr.ipv4=zr["ip-address"];ot.isFormat=function(t,r,n){if(typeof t=="string"&&zr[r]!==void 0){if(zr[r]instanceof RegExp)return zr[r].test(t);if(typeof zr[r]=="function")return zr[r](t)}else if(n&&n.customFormats&&typeof n.customFormats[r]=="function")return n.customFormats[r](t);return!0};var q0=ot.makeSuffix=function(t){return t=t.toString(),!t.match(/[.\s\[\]]/)&&!t.match(/^[\d]/)?"."+t:t.match(/^\d+$/)?"["+t+"]":"["+JSON.stringify(t)+"]"};ot.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(Array.isArray(t))return!Array.isArray(r)||t.length!==r.length?!1:t.every(function(o,u){return e(t[u],r[u])});if(typeof t=="object"){if(!t||!r)return t===r;var n=Object.keys(t),a=Object.keys(r);return n.length!==a.length?!1:n.every(function(o){return e(t[o],r[o])})}return t===r};function kM(e,t,r,n){typeof r=="object"?t[n]=ep(e[n],r):e.indexOf(r)===-1&&t.push(r)}function jM(e,t,r){t[r]=e[r]}function WM(e,t,r,n){typeof t[n]!="object"||!t[n]?r[n]=t[n]:e[n]?r[n]=ep(e[n],t[n]):r[n]=t[n]}function ep(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(kM.bind(null,e,n))):(e&&typeof e=="object"&&Object.keys(e).forEach(jM.bind(null,e,n)),Object.keys(t).forEach(WM.bind(null,e,t,n))),n}ot.deepMerge=ep;ot.objectGetPath=function(t,r){for(var n=r.split("/").slice(1),a;typeof(a=n.shift())=="string";){var o=decodeURIComponent(a.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in t))return;t=t[o]}return t};function BM(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}ot.encodePath=function(t){return t.map(BM).join("")};ot.getDecimalPlaces=function(t){var r=0;if(isNaN(t))return r;typeof t!="number"&&(t=Number(t));var n=t.toString().split("e");if(n.length===2){if(n[1][0]!=="-")return r;r=Number(n[1].slice(1))}var a=n[0].split(".");return a.length===2&&(r+=a[1].length),r};ot.isSchema=function(t){return typeof t=="object"&&t||typeof t=="boolean"};var Y0=ot.resolveUrl=function(t,r){const n=new URL(r,new URL(t,"resolve://"));if(n.protocol==="resolve:"){const{pathname:a,search:o,hash:u}=n;return a+o+u}return n.toString()},hr=ot,Pe=hr.ValidatorResult,la=hr.SchemaError,tp={};tp.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var Re=tp.validators={};Re.type=function(t,r,n,a){if(t===void 0)return null;var o=new Pe(t,r,n,a),u=Array.isArray(r.type)?r.type:[r.type];if(!u.some(this.testType.bind(this,t,r,n,a))){var c=u.map(function(f){if(f){var d=f.$id||f.id;return d?"<"+d+">":f+""}});o.addError({name:"type",argument:c,message:"is not of a type(s) "+c})}return o};function rp(e,t,r,n,a){var o=t.throwError,u=t.throwAll;t.throwError=!1,t.throwAll=!1;var c=this.validateSchema(e,a,t,r);return t.throwError=o,t.throwAll=u,!c.valid&&n instanceof Function&&n(c),c.valid}Re.anyOf=function(t,r,n,a){if(t===void 0)return null;var o=new Pe(t,r,n,a),u=new Pe(t,r,n,a);if(!Array.isArray(r.anyOf))throw new la("anyOf must be an array");if(!r.anyOf.some(rp.bind(this,t,n,a,function(f){u.importErrors(f)}))){var c=r.anyOf.map(function(f,d){var p=f.$id||f.id;return p?"<"+p+">":f.title&&JSON.stringify(f.title)||f.$ref&&"<"+f.$ref+">"||"[subschema "+d+"]"});n.nestedErrors&&o.importErrors(u),o.addError({name:"anyOf",argument:c,message:"is not any of "+c.join(",")})}return o};Re.allOf=function(t,r,n,a){if(t===void 0)return null;if(!Array.isArray(r.allOf))throw new la("allOf must be an array");var o=new Pe(t,r,n,a),u=this;return r.allOf.forEach(function(c,f){var d=u.validateSchema(t,c,n,a);if(!d.valid){var p=c.$id||c.id,m=p||c.title&&JSON.stringify(c.title)||c.$ref&&"<"+c.$ref+">"||"[subschema "+f+"]";o.addError({name:"allOf",argument:{id:m,length:d.errors.length,valid:d},message:"does not match allOf schema "+m+" with "+d.errors.length+" error[s]:"}),o.importErrors(d)}}),o};Re.oneOf=function(t,r,n,a){if(t===void 0)return null;if(!Array.isArray(r.oneOf))throw new la("oneOf must be an array");var o=new Pe(t,r,n,a),u=new Pe(t,r,n,a),c=r.oneOf.filter(rp.bind(this,t,n,a,function(d){u.importErrors(d)})).length,f=r.oneOf.map(function(d,p){var m=d.$id||d.id;return m||d.title&&JSON.stringify(d.title)||d.$ref&&"<"+d.$ref+">"||"[subschema "+p+"]"});return c!==1&&(n.nestedErrors&&o.importErrors(u),o.addError({name:"oneOf",argument:f,message:"is not exactly one from "+f.join(",")})),o};Re.if=function(t,r,n,a){if(t===void 0)return null;if(!hr.isSchema(r.if))throw new Error('Expected "if" keyword to be a schema');var o=rp.call(this,t,n,a,null,r.if),u=new Pe(t,r,n,a),c;if(o){if(r.then===void 0)return;if(!hr.isSchema(r.then))throw new Error('Expected "then" keyword to be a schema');c=this.validateSchema(t,r.then,n,a.makeChild(r.then)),u.importErrors(c)}else{if(r.else===void 0)return;if(!hr.isSchema(r.else))throw new Error('Expected "else" keyword to be a schema');c=this.validateSchema(t,r.else,n,a.makeChild(r.else)),u.importErrors(c)}return u};function np(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e){for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}}Re.propertyNames=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a),u=r.propertyNames!==void 0?r.propertyNames:{};if(!hr.isSchema(u))throw new la('Expected "propertyNames" to be a schema (object or boolean)');for(var c in t)if(np(t,c)!==void 0){var f=this.validateSchema(c,u,n,a.makeChild(u));o.importErrors(f)}return o}};Re.properties=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a),u=r.properties||{};for(var c in u){var f=u[c];if(f!==void 0){if(f===null)throw new la('Unexpected null, expected schema in "properties"');typeof n.preValidateProperty=="function"&&n.preValidateProperty(t,c,f,n,a);var d=np(t,c),p=this.validateSchema(d,f,n,a.makeChild(f,c));p.instance!==o.instance[c]&&(o.instance[c]=p.instance),o.importErrors(p)}}return o}};function K0(e,t,r,n,a,o){if(this.types.object(e)&&!(t.properties&&t.properties[a]!==void 0))if(t.additionalProperties===!1)o.addError({name:"additionalProperties",argument:a,message:"is not allowed to have the additional property "+JSON.stringify(a)});else{var u=t.additionalProperties||{};typeof r.preValidateProperty=="function"&&r.preValidateProperty(e,a,u,r,n);var c=this.validateSchema(e[a],u,r,n.makeChild(u,a));c.instance!==o.instance[a]&&(o.instance[a]=c.instance),o.importErrors(c)}}Re.patternProperties=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a),u=r.patternProperties||{};for(var c in t){var f=!0;for(var d in u){var p=u[d];if(p!==void 0){if(p===null)throw new la('Unexpected null, expected schema in "patternProperties"');try{var m=new RegExp(d,"u")}catch{m=new RegExp(d)}if(m.test(c)){f=!1,typeof n.preValidateProperty=="function"&&n.preValidateProperty(t,c,p,n,a);var g=this.validateSchema(t[c],p,n,a.makeChild(p,c));g.instance!==o.instance[c]&&(o.instance[c]=g.instance),o.importErrors(g)}}}f&&K0.call(this,t,r,n,a,c,o)}return o}};Re.additionalProperties=function(t,r,n,a){if(this.types.object(t)){if(r.patternProperties)return null;var o=new Pe(t,r,n,a);for(var u in t)K0.call(this,t,r,n,a,u,o);return o}};Re.minProperties=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a),u=Object.keys(t);return u.length>=r.minProperties||o.addError({name:"minProperties",argument:r.minProperties,message:"does not meet minimum property length of "+r.minProperties}),o}};Re.maxProperties=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a),u=Object.keys(t);return u.length<=r.maxProperties||o.addError({name:"maxProperties",argument:r.maxProperties,message:"does not meet maximum property length of "+r.maxProperties}),o}};Re.items=function(t,r,n,a){var o=this;if(this.types.array(t)&&r.items!==void 0){var u=new Pe(t,r,n,a);return t.every(function(c,f){if(Array.isArray(r.items))var d=r.items[f]===void 0?r.additionalItems:r.items[f];else var d=r.items;if(d===void 0)return!0;if(d===!1)return u.addError({name:"items",message:"additionalItems not permitted"}),!1;var p=o.validateSchema(c,d,n,a.makeChild(d,f));return p.instance!==u.instance[f]&&(u.instance[f]=p.instance),u.importErrors(p),!0}),u}};Re.contains=function(t,r,n,a){var o=this;if(this.types.array(t)&&r.contains!==void 0){if(!hr.isSchema(r.contains))throw new Error('Expected "contains" keyword to be a schema');var u=new Pe(t,r,n,a),c=t.some(function(f,d){var p=o.validateSchema(f,r.contains,n,a.makeChild(r.contains,d));return p.errors.length===0});return c===!1&&u.addError({name:"contains",argument:r.contains,message:"must contain an item matching given schema"}),u}};Re.minimum=function(t,r,n,a){if(this.types.number(t)){var o=new Pe(t,r,n,a);return r.exclusiveMinimum&&r.exclusiveMinimum===!0?t>r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than "+r.minimum}):t>=r.minimum||o.addError({name:"minimum",argument:r.minimum,message:"must be greater than or equal to "+r.minimum}),o}};Re.maximum=function(t,r,n,a){if(this.types.number(t)){var o=new Pe(t,r,n,a);return r.exclusiveMaximum&&r.exclusiveMaximum===!0?t<r.maximum||o.addError({name:"maximum",argument:r.maximum,message:"must be less than "+r.maximum}):t<=r.maximum||o.addError({name:"maximum",argument:r.maximum,message:"must be less than or equal to "+r.maximum}),o}};Re.exclusiveMinimum=function(t,r,n,a){if(typeof r.exclusiveMinimum!="boolean"&&this.types.number(t)){var o=new Pe(t,r,n,a),u=t>r.exclusiveMinimum;return u||o.addError({name:"exclusiveMinimum",argument:r.exclusiveMinimum,message:"must be strictly greater than "+r.exclusiveMinimum}),o}};Re.exclusiveMaximum=function(t,r,n,a){if(typeof r.exclusiveMaximum!="boolean"&&this.types.number(t)){var o=new Pe(t,r,n,a),u=t<r.exclusiveMaximum;return u||o.addError({name:"exclusiveMaximum",argument:r.exclusiveMaximum,message:"must be strictly less than "+r.exclusiveMaximum}),o}};var V0=function(t,r,n,a,o,u){if(this.types.number(t)){var c=r[o];if(c==0)throw new la(o+" cannot be zero");var f=new Pe(t,r,n,a),d=hr.getDecimalPlaces(t),p=hr.getDecimalPlaces(c),m=Math.max(d,p),g=Math.pow(10,m);return Math.round(t*g)%Math.round(c*g)!==0&&f.addError({name:o,argument:c,message:u+JSON.stringify(c)}),f}};Re.multipleOf=function(t,r,n,a){return V0.call(this,t,r,n,a,"multipleOf","is not a multiple of (divisible by) ")};Re.divisibleBy=function(t,r,n,a){return V0.call(this,t,r,n,a,"divisibleBy","is not divisible by (multiple of) ")};Re.required=function(t,r,n,a){var o=new Pe(t,r,n,a);return t===void 0&&r.required===!0?o.addError({name:"required",message:"is required"}):this.types.object(t)&&Array.isArray(r.required)&&r.required.forEach(function(u){np(t,u)===void 0&&o.addError({name:"required",argument:u,message:"requires property "+JSON.stringify(u)})}),o};Re.pattern=function(t,r,n,a){if(this.types.string(t)){var o=new Pe(t,r,n,a),u=r.pattern;try{var c=new RegExp(u,"u")}catch{c=new RegExp(u)}return t.match(c)||o.addError({name:"pattern",argument:r.pattern,message:"does not match pattern "+JSON.stringify(r.pattern.toString())}),o}};Re.format=function(t,r,n,a){if(t!==void 0){var o=new Pe(t,r,n,a);return!o.disableFormat&&!hr.isFormat(t,r.format,this)&&o.addError({name:"format",argument:r.format,message:"does not conform to the "+JSON.stringify(r.format)+" format"}),o}};Re.minLength=function(t,r,n,a){if(this.types.string(t)){var o=new Pe(t,r,n,a),u=t.match(/[\uDC00-\uDFFF]/g),c=t.length-(u?u.length:0);return c>=r.minLength||o.addError({name:"minLength",argument:r.minLength,message:"does not meet minimum length of "+r.minLength}),o}};Re.maxLength=function(t,r,n,a){if(this.types.string(t)){var o=new Pe(t,r,n,a),u=t.match(/[\uDC00-\uDFFF]/g),c=t.length-(u?u.length:0);return c<=r.maxLength||o.addError({name:"maxLength",argument:r.maxLength,message:"does not meet maximum length of "+r.maxLength}),o}};Re.minItems=function(t,r,n,a){if(this.types.array(t)){var o=new Pe(t,r,n,a);return t.length>=r.minItems||o.addError({name:"minItems",argument:r.minItems,message:"does not meet minimum length of "+r.minItems}),o}};Re.maxItems=function(t,r,n,a){if(this.types.array(t)){var o=new Pe(t,r,n,a);return t.length<=r.maxItems||o.addError({name:"maxItems",argument:r.maxItems,message:"does not meet maximum length of "+r.maxItems}),o}};function zM(e,t,r){var n,a=r.length;for(n=t+1,a;n<a;n++)if(hr.deepCompareStrict(e,r[n]))return!1;return!0}Re.uniqueItems=function(t,r,n,a){if(r.uniqueItems===!0&&this.types.array(t)){var o=new Pe(t,r,n,a);return t.every(zM)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o}};Re.dependencies=function(t,r,n,a){if(this.types.object(t)){var o=new Pe(t,r,n,a);for(var u in r.dependencies)if(t[u]!==void 0){var c=r.dependencies[u],f=a.makeChild(c,u);if(typeof c=="string"&&(c=[c]),Array.isArray(c))c.forEach(function(p){t[p]===void 0&&o.addError({name:"dependencies",argument:f.propertyPath,message:"property "+p+" not found, required by "+f.propertyPath})});else{var d=this.validateSchema(t,c,n,f);o.instance!==d.instance&&(o.instance=d.instance),d&&d.errors.length&&(o.addError({name:"dependencies",argument:f.propertyPath,message:"does not meet dependency required by "+f.propertyPath}),o.importErrors(d))}}return o}};Re.enum=function(t,r,n,a){if(t===void 0)return null;if(!Array.isArray(r.enum))throw new la("enum expects an array",r);var o=new Pe(t,r,n,a);return r.enum.some(hr.deepCompareStrict.bind(null,t))||o.addError({name:"enum",argument:r.enum,message:"is not one of enum values: "+r.enum.map(String).join(",")}),o};Re.const=function(t,r,n,a){if(t===void 0)return null;var o=new Pe(t,r,n,a);return hr.deepCompareStrict(r.const,t)||o.addError({name:"const",argument:r.const,message:"does not exactly match expected constant: "+r.const}),o};Re.not=Re.disallow=function(t,r,n,a){var o=this;if(t===void 0)return null;var u=new Pe(t,r,n,a),c=r.not||r.disallow;return c?(Array.isArray(c)||(c=[c]),c.forEach(function(f){if(o.testType(t,r,n,a,f)){var d=f&&(f.$id||f.id),p=d||f;u.addError({name:"not",argument:p,message:"is of prohibited type "+p})}}),u):null};var HM=tp,ap={},bf=ot;ap.SchemaScanResult=Z0;function Z0(e,t){this.id=e,this.ref=t}ap.scan=function(t,r){function n(f,d){if(!d||typeof d!="object")return;if(d.$ref){let y=bf.resolveUrl(f,d.$ref);c[y]=c[y]?c[y]+1:0;return}var p=d.$id||d.id;let m=bf.resolveUrl(f,p);var g=p?m:f;if(g){if(g.indexOf("#")<0&&(g+="#"),u[g]){if(!bf.deepCompareStrict(u[g],d))throw new Error("Schema <"+g+"> already exists with different definition");return u[g]}u[g]=d,g[g.length-1]=="#"&&(u[g.substring(0,g.length-1)]=d)}a(g+"/items",Array.isArray(d.items)?d.items:[d.items]),a(g+"/extends",Array.isArray(d.extends)?d.extends:[d.extends]),n(g+"/additionalItems",d.additionalItems),o(g+"/properties",d.properties),n(g+"/additionalProperties",d.additionalProperties),o(g+"/definitions",d.definitions),o(g+"/patternProperties",d.patternProperties),o(g+"/dependencies",d.dependencies),a(g+"/disallow",d.disallow),a(g+"/allOf",d.allOf),a(g+"/anyOf",d.anyOf),a(g+"/oneOf",d.oneOf),n(g+"/not",d.not)}function a(f,d){if(Array.isArray(d))for(var p=0;p<d.length;p++)n(f+"/"+p,d[p])}function o(f,d){if(!(!d||typeof d!="object"))for(var p in d)n(f+"/"+p,d[p])}var u={},c={};return n(t,r),new Z0(u,c)};var J0=HM,fa=ot,X0=ap.scan,Q0=fa.ValidatorResult,UM=fa.ValidatorResultError,wo=fa.SchemaError,eb=fa.SchemaContext,GM="/",At=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(un),this.attributes=Object.create(J0.validators)};At.prototype.customFormats={};At.prototype.schemas=null;At.prototype.types=null;At.prototype.attributes=null;At.prototype.unresolvedRefs=null;At.prototype.addSchema=function(t,r){var n=this;if(!t)return null;var a=X0(r||GM,t),o=r||t.$id||t.id;for(var u in a.id)this.schemas[u]=a.id[u];for(var u in a.ref)this.unresolvedRefs.push(u);return this.unresolvedRefs=this.unresolvedRefs.filter(function(c){return typeof n.schemas[c]>"u"}),this.schemas[o]};At.prototype.addSubSchemaArray=function(t,r){if(Array.isArray(r))for(var n=0;n<r.length;n++)this.addSubSchema(t,r[n])};At.prototype.addSubSchemaObject=function(t,r){if(!(!r||typeof r!="object"))for(var n in r)this.addSubSchema(t,r[n])};At.prototype.setSchemas=function(t){this.schemas=t};At.prototype.getSchema=function(t){return this.schemas[t]};At.prototype.validate=function(t,r,n,a){if(typeof r!="boolean"&&typeof r!="object"||r===null)throw new wo("Expected `schema` to be an object or boolean");n||(n={});var o=r.$id||r.id;let u=fa.resolveUrl(n.base,o||"");if(!a){a=new eb(r,n,[],u,Object.create(this.schemas)),a.schemas[u]||(a.schemas[u]=r);var c=X0(u,r);for(var f in c.id){var d=c.id[f];a.schemas[f]=d}}if(n.required&&t===void 0){var p=new Q0(t,r,n,a);return p.addError("is required, but is undefined"),p}var p=this.validateSchema(t,r,n,a);if(p){if(n.throwAll&&p.errors.length)throw new UM(p)}else throw new Error("Result undefined");return p};function tb(e){var t=typeof e=="string"?e:e.$ref;return typeof t=="string"?t:!1}At.prototype.validateSchema=function(t,r,n,a){var o=new Q0(t,r,n,a);if(typeof r=="boolean")r===!0?r={}:r===!1&&(r={type:[]});else if(!r)throw new Error("schema is undefined");if(r.extends)if(Array.isArray(r.extends)){var u={schema:r,ctx:a};r.extends.forEach(this.schemaTraverser.bind(this,u)),r=u.schema,u.schema=null,u.ctx=null,u=null}else r=fa.deepMerge(r,this.superResolve(r.extends,a));var c=tb(r);if(c){var f=this.resolve(r,c,a),d=new eb(f.subschema,n,a.path,f.switchSchema,a.schemas);return this.validateSchema(t,f.subschema,n,d)}var p=n&&n.skipAttributes||[];for(var m in r)if(!J0.ignoreProperties[m]&&p.indexOf(m)<0){var g=null,y=this.attributes[m];if(y)g=y.call(this,t,r,n,a);else if(n.allowUnknownAttributes===!1)throw new wo("Unsupported attribute: "+m,r);g&&o.importErrors(g)}if(typeof n.rewrite=="function"){var E=n.rewrite.call(this,t,r,n,a);o.instance=E}return o};At.prototype.schemaTraverser=function(t,r){t.schema=fa.deepMerge(t.schema,this.superResolve(r,t.ctx))};At.prototype.superResolve=function(t,r){var n=tb(t);return n?this.resolve(t,n,r).subschema:t};At.prototype.resolve=function(t,r,n){if(r=n.resolve(r),n.schemas[r])return{subschema:n.schemas[r],switchSchema:r};let o=new URL(r,"thismessage::/").hash;var u=o&&o.length&&r.substr(0,r.length-o.length);if(!u||!n.schemas[u])throw new wo("no such schema <"+r+">",t);var c=fa.objectGetPath(n.schemas[u],o.substr(1));if(c===void 0)throw new wo("no such schema "+o+" located in <"+u+">",t);return{subschema:c,switchSchema:r}};At.prototype.testType=function(t,r,n,a,o){if(o!==void 0){if(o===null)throw new wo('Unexpected null in "type" keyword');if(typeof this.types[o]=="function")return this.types[o].call(this,t);if(o&&typeof o=="object"){var u=this.validateSchema(t,o,n,a);return u===void 0||!(u&&u.errors.length)}return!0}};var un=At.prototype.types={};un.string=function(t){return typeof t=="string"};un.number=function(t){return typeof t=="number"&&isFinite(t)};un.integer=function(t){return typeof t=="number"&&t%1===0};un.boolean=function(t){return typeof t=="boolean"};un.array=function(t){return Array.isArray(t)};un.null=function(t){return t===null};un.date=function(t){return t instanceof Date};un.any=function(t){return!0};un.object=function(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date)};var qM=At,rb;rb=qM;ot.ValidatorResult;ot.ValidatorResultError;ot.ValidationError;ot.SchemaError;var YM=nb;function nb(e,t,r){e instanceof RegExp&&(e=Rv(e,r)),t instanceof RegExp&&(t=Rv(t,r));var n=ab(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function Rv(e,t){var r=t.match(e);return r?r[0]:null}nb.range=ab;function ab(e,t,r){var n,a,o,u,c,f=r.indexOf(e),d=r.indexOf(t,f+1),p=f;if(f>=0&&d>0){if(e===t)return[f,d];for(n=[],o=r.length;p>=0&&!c;)p==f?(n.push(p),f=r.indexOf(e,p+1)):n.length==1?c=[n.pop(),d]:(a=n.pop(),a<o&&(o=a,u=d),d=r.indexOf(t,p+1)),p=f<d&&f>=0?f:d;n.length&&(c=[o,u])}return c}var ib=YM,KM=JM,ob="\0SLASH"+Math.random()+"\0",sb="\0OPEN"+Math.random()+"\0",ip="\0CLOSE"+Math.random()+"\0",ub="\0COMMA"+Math.random()+"\0",cb="\0PERIOD"+Math.random()+"\0";function Sf(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function VM(e){return e.split("\\\\").join(ob).split("\\{").join(sb).split("\\}").join(ip).split("\\,").join(ub).split("\\.").join(cb)}function ZM(e){return e.split(ob).join("\\").split(sb).join("{").split(ip).join("}").split(ub).join(",").split(cb).join(".")}function lb(e){if(!e)return[""];var t=[],r=ib("{","}",e);if(!r)return e.split(",");var n=r.pre,a=r.body,o=r.post,u=n.split(",");u[u.length-1]+="{"+a+"}";var c=lb(o);return o.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c)),t.push.apply(t,u),t}function JM(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),to(VM(e),!0).map(ZM)):[]}function XM(e){return"{"+e+"}"}function QM(e){return/^-?0\d/.test(e)}function eF(e,t){return e<=t}function tF(e,t){return e>=t}function to(e,t){var r=[],n=ib("{","}",e);if(!n)return[e];var a=n.pre,o=n.post.length?to(n.post,!1):[""];if(/\$$/.test(n.pre))for(var u=0;u<o.length;u++){var c=a+"{"+n.body+"}"+o[u];r.push(c)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),p=f||d,m=n.body.indexOf(",")>=0;if(!p&&!m)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+ip+n.post,to(e)):[e];var g;if(p)g=n.body.split(/\.\./);else if(g=lb(n.body),g.length===1&&(g=to(g[0],!1).map(XM),g.length===1))return o.map(function(we){return n.pre+g[0]+we});var y;if(p){var E=Sf(g[0]),S=Sf(g[1]),T=Math.max(g[0].length,g[1].length),C=g.length==3?Math.abs(Sf(g[2])):1,A=eF,P=S<E;P&&(C*=-1,A=tF);var $=g.some(QM);y=[];for(var _=E;A(_,S);_+=C){var M;if(d)M=String.fromCharCode(_),M==="\\"&&(M="");else if(M=String(_),$){var W=T-M.length;if(W>0){var G=new Array(W+1).join("0");_<0?M="-"+G+M.slice(1):M=G+M}}y.push(M)}}else{y=[];for(var Q=0;Q<g.length;Q++)y.push.apply(y,to(g[Q],!1))}for(var Q=0;Q<y.length;Q++)for(var u=0;u<o.length;u++){var c=a+y[Q]+o[u];(!t||p||c)&&r.push(c)}}return r}const rF=Po(KM),nF=1024*64,Su=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>nF)throw new TypeError("pattern is too long")},aF={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Zi=e=>e.replace(/[[\]\\-]/g,"\\$&"),iF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Dv=e=>e.join(""),oF=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const n=[],a=[];let o=r+1,u=!1,c=!1,f=!1,d=!1,p=r,m="";e:for(;o<e.length;){const S=e.charAt(o);if((S==="!"||S==="^")&&o===r+1){d=!0,o++;continue}if(S==="]"&&u&&!f){p=o+1;break}if(u=!0,S==="\\"&&!f){f=!0,o++;continue}if(S==="["&&!f){for(const[T,[C,A,P]]of Object.entries(aF))if(e.startsWith(T,o)){if(m)return["$.",!1,e.length-r,!0];o+=T.length,P?a.push(C):n.push(C),c=c||A;continue e}}if(f=!1,m){S>m?n.push(Zi(m)+"-"+Zi(S)):S===m&&n.push(Zi(S)),m="",o++;continue}if(e.startsWith("-]",o+1)){n.push(Zi(S+"-")),o+=2;continue}if(e.startsWith("-",o+1)){m=S,o+=2;continue}n.push(Zi(S)),o++}if(p<o)return["",!1,0,!1];if(!n.length&&!a.length)return["$.",!1,e.length-r,!0];if(a.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!d){const S=n[0].length===2?n[0].slice(-1):n[0];return[iF(S),!1,p-r,!1]}const g="["+(d?"^":"")+Dv(n)+"]",y="["+(d?"":"^")+Dv(a)+"]";return[n.length&&a.length?"("+g+"|"+y+")":n.length?g:y,c,p-r,!0]},ro=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),sF=new Set(["!","?","+","*","@"]),$v=e=>sF.has(e),uF="(?!(?:^|/)\\.\\.?(?:$|/))",Hs="(?!\\.)",cF=new Set(["[","."]),lF=new Set(["..","."]),fF=new Set("().*{}+?[]^$\\!"),dF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),op="[^/]",Iv=op+"*?",Mv=op+"+?";var yt,Et,An,Xe,ft,Zn,Ca,Jn,Yr,Aa,xo,Fa,fb,ia,Js,ed,db;const Zt=class Zt{constructor(t,r,n={}){nr(this,Fa);vt(this,"type");nr(this,yt);nr(this,Et);nr(this,An,!1);nr(this,Xe,[]);nr(this,ft);nr(this,Zn);nr(this,Ca);nr(this,Jn,!1);nr(this,Yr);nr(this,Aa);nr(this,xo,!1);this.type=t,t&&ct(this,Et,!0),ct(this,ft,r),ct(this,yt,U(this,ft)?U(U(this,ft),yt):this),ct(this,Yr,U(this,yt)===this?n:U(U(this,yt),Yr)),ct(this,Ca,U(this,yt)===this?[]:U(U(this,yt),Ca)),t==="!"&&!U(U(this,yt),Jn)&&U(this,Ca).push(this),ct(this,Zn,U(this,ft)?U(U(this,ft),Xe).length:0)}get hasMagic(){if(U(this,Et)!==void 0)return U(this,Et);for(const t of U(this,Xe))if(typeof t!="string"&&(t.type||t.hasMagic))return ct(this,Et,!0);return U(this,Et)}toString(){return U(this,Aa)!==void 0?U(this,Aa):this.type?ct(this,Aa,this.type+"("+U(this,Xe).map(t=>String(t)).join("|")+")"):ct(this,Aa,U(this,Xe).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Zt&&U(r,ft)===this))throw new Error("invalid part: "+r);U(this,Xe).push(r)}}toJSON(){var r;const t=this.type===null?U(this,Xe).slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...U(this,Xe).map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===U(this,yt)||U(U(this,yt),Jn)&&((r=U(this,ft))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(U(this,yt)===this)return!0;if(!((r=U(this,ft))!=null&&r.isStart()))return!1;if(U(this,Zn)===0)return!0;const t=U(this,ft);for(let n=0;n<U(this,Zn);n++){const a=U(t,Xe)[n];if(!(a instanceof Zt&&a.type==="!"))return!1}return!0}isEnd(){var r,n,a;if(U(this,yt)===this||((r=U(this,ft))==null?void 0:r.type)==="!")return!0;if(!((n=U(this,ft))!=null&&n.isEnd()))return!1;if(!this.type)return(a=U(this,ft))==null?void 0:a.isEnd();const t=U(this,ft)?U(U(this,ft),Xe).length:0;return U(this,Zn)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new Zt(this.type,t);for(const n of U(this,Xe))r.copyIn(n);return r}static fromGlob(t,r={}){var a;const n=new Zt(null,void 0,r);return Un(a=Zt,ia,Js).call(a,t,n,0,r),n}toMMPattern(){if(this!==U(this,yt))return U(this,yt).toMMPattern();const t=this.toString(),[r,n,a,o]=this.toRegExpSource();if(!(a||U(this,Et)||U(this,Yr).nocase&&!U(this,Yr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const c=(U(this,Yr).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return U(this,Yr)}toRegExpSource(t){var f;const r=t??!!U(this,Yr).dot;if(U(this,yt)===this&&Un(this,Fa,fb).call(this),!this.type){const d=this.isStart()&&this.isEnd(),p=U(this,Xe).map(E=>{var P;const[S,T,C,A]=typeof E=="string"?Un(P=Zt,ia,db).call(P,E,U(this,Et),d):E.toRegExpSource(t);return ct(this,Et,U(this,Et)||C),ct(this,An,U(this,An)||A),S}).join("");let m="";if(this.isStart()&&typeof U(this,Xe)[0]=="string"&&!(U(this,Xe).length===1&&lF.has(U(this,Xe)[0]))){const S=cF,T=r&&S.has(p.charAt(0))||p.startsWith("\\.")&&S.has(p.charAt(2))||p.startsWith("\\.\\.")&&S.has(p.charAt(4)),C=!r&&!t&&S.has(p.charAt(0));m=T?uF:C?Hs:""}let g="";return this.isEnd()&&U(U(this,yt),Jn)&&((f=U(this,ft))==null?void 0:f.type)==="!"&&(g="(?:$|\\/)"),[m+p+g,ro(p),ct(this,Et,!!U(this,Et)),U(this,An)]}const n=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:";let o=Un(this,Fa,ed).call(this,r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){const d=this.toString();return ct(this,Xe,[d]),this.type=null,ct(this,Et,void 0),[d,ro(this.toString()),!1,!1]}let u=!n||t||r||!Hs?"":Un(this,Fa,ed).call(this,!0);u===o&&(u=""),u&&(o=`(?:${o})(?:${u})*?`);let c="";if(this.type==="!"&&U(this,xo))c=(this.isStart()&&!r?Hs:"")+Mv;else{const d=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Hs:"")+Iv+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;c=a+o+d}return[c,ro(o),ct(this,Et,!!U(this,Et)),U(this,An)]}};yt=new WeakMap,Et=new WeakMap,An=new WeakMap,Xe=new WeakMap,ft=new WeakMap,Zn=new WeakMap,Ca=new WeakMap,Jn=new WeakMap,Yr=new WeakMap,Aa=new WeakMap,xo=new WeakMap,Fa=new WeakSet,fb=function(){if(this!==U(this,yt))throw new Error("should only call on root");if(U(this,Jn))return this;this.toString(),ct(this,Jn,!0);let t;for(;t=U(this,Ca).pop();){if(t.type!=="!")continue;let r=t,n=U(r,ft);for(;n;){for(let a=U(r,Zn)+1;!n.type&&a<U(n,Xe).length;a++)for(const o of U(t,Xe)){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(U(n,Xe)[a])}r=n,n=U(r,ft)}}return this},ia=new WeakSet,Js=function(t,r,n,a){var y,E;let o=!1,u=!1,c=-1,f=!1;if(r.type===null){let S=n,T="";for(;S<t.length;){const C=t.charAt(S++);if(o||C==="\\"){o=!o,T+=C;continue}if(u){S===c+1?(C==="^"||C==="!")&&(f=!0):C==="]"&&!(S===c+2&&f)&&(u=!1),T+=C;continue}else if(C==="["){u=!0,c=S,f=!1,T+=C;continue}if(!a.noext&&$v(C)&&t.charAt(S)==="("){r.push(T),T="";const A=new Zt(C,r);S=Un(y=Zt,ia,Js).call(y,t,A,S,a),r.push(A);continue}T+=C}return r.push(T),S}let d=n+1,p=new Zt(null,r);const m=[];let g="";for(;d<t.length;){const S=t.charAt(d++);if(o||S==="\\"){o=!o,g+=S;continue}if(u){d===c+1?(S==="^"||S==="!")&&(f=!0):S==="]"&&!(d===c+2&&f)&&(u=!1),g+=S;continue}else if(S==="["){u=!0,c=d,f=!1,g+=S;continue}if($v(S)&&t.charAt(d)==="("){p.push(g),g="";const T=new Zt(S,p);p.push(T),d=Un(E=Zt,ia,Js).call(E,t,T,d,a);continue}if(S==="|"){p.push(g),g="",m.push(p),p=new Zt(null,r);continue}if(S===")")return g===""&&U(r,Xe).length===0&&ct(r,xo,!0),p.push(g),g="",r.push(...m,p),d;g+=S}return r.type=null,ct(r,Et,void 0),ct(r,Xe,[t.substring(n-1)]),d},ed=function(t){return U(this,Xe).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[n,a,o,u]=r.toRegExpSource(t);return ct(this,An,U(this,An)||u),n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},db=function(t,r,n=!1){let a=!1,o="",u=!1;for(let c=0;c<t.length;c++){const f=t.charAt(c);if(a){a=!1,o+=(fF.has(f)?"\\":"")+f;continue}if(f==="\\"){c===t.length-1?o+="\\\\":a=!0;continue}if(f==="["){const[d,p,m,g]=oF(t,c);if(m){o+=d,u=u||p,c+=m-1,r=r||g;continue}}if(f==="*"){n&&t==="*"?o+=Mv:o+=Iv,r=!0;continue}if(f==="?"){o+=op,r=!0;continue}o+=dF(f)}return[o,ro(t),!!r,u]},nr(Zt,ia);let wu=Zt;const pF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Ct=(e,t,r={})=>(Su(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Ju(t,r).match(e)),hF=/^\*+([^+@!?\*\[\(]*)$/,mF=e=>t=>!t.startsWith(".")&&t.endsWith(e),gF=e=>t=>t.endsWith(e),vF=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),yF=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),bF=/^\*+\.\*+$/,SF=e=>!e.startsWith(".")&&e.includes("."),wF=e=>e!=="."&&e!==".."&&e.includes("."),EF=/^\.\*+$/,_F=e=>e!=="."&&e!==".."&&e.startsWith("."),TF=/^\*+$/,OF=e=>e.length!==0&&!e.startsWith("."),CF=e=>e.length!==0&&e!=="."&&e!=="..",AF=/^\?+([^+@!?\*\[\(]*)?$/,xF=([e,t=""])=>{const r=pb([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},PF=([e,t=""])=>{const r=hb([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},RF=([e,t=""])=>{const r=hb([e]);return t?n=>r(n)&&n.endsWith(t):r},DF=([e,t=""])=>{const r=pb([e]);return t?n=>r(n)&&n.endsWith(t):r},pb=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},hb=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},mb=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Fv={win32:{sep:"\\"},posix:{sep:"/"}},$F=mb==="win32"?Fv.win32.sep:Fv.posix.sep;Ct.sep=$F;const xr=Symbol("globstar **");Ct.GLOBSTAR=xr;const IF="[^/]",MF=IF+"*?",FF="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",NF="(?:(?!(?:\\/|^)\\.).)*?",LF=(e,t={})=>r=>Ct(r,e,t);Ct.filter=LF;const Ar=(e,t={})=>Object.assign({},e,t),kF=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ct;const t=Ct;return Object.assign((n,a,o={})=>t(n,a,Ar(e,o)),{Minimatch:class extends t.Minimatch{constructor(a,o={}){super(a,Ar(e,o))}static defaults(a){return t.defaults(Ar(e,a)).Minimatch}},AST:class extends t.AST{constructor(a,o,u={}){super(a,o,Ar(e,u))}static fromGlob(a,o={}){return t.AST.fromGlob(a,Ar(e,o))}},unescape:(n,a={})=>t.unescape(n,Ar(e,a)),escape:(n,a={})=>t.escape(n,Ar(e,a)),filter:(n,a={})=>t.filter(n,Ar(e,a)),defaults:n=>t.defaults(Ar(e,n)),makeRe:(n,a={})=>t.makeRe(n,Ar(e,a)),braceExpand:(n,a={})=>t.braceExpand(n,Ar(e,a)),match:(n,a,o={})=>t.match(n,a,Ar(e,o)),sep:t.sep,GLOBSTAR:xr})};Ct.defaults=kF;const gb=(e,t={})=>(Su(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:rF(e));Ct.braceExpand=gb;const jF=(e,t={})=>new Ju(e,t).makeRe();Ct.makeRe=jF;const WF=(e,t,r={})=>{const n=new Ju(t,r);return e=e.filter(a=>n.match(a)),n.options.nonull&&!e.length&&e.push(t),e};Ct.match=WF;const Nv=/[?*]|[+@!]\(.*?\)|\[|\]/,BF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Ju{constructor(t,r={}){vt(this,"options");vt(this,"set");vt(this,"pattern");vt(this,"windowsPathsNoEscape");vt(this,"nonegate");vt(this,"negate");vt(this,"comment");vt(this,"empty");vt(this,"preserveMultipleSlashes");vt(this,"partial");vt(this,"globSet");vt(this,"globParts");vt(this,"nocase");vt(this,"isWindows");vt(this,"platform");vt(this,"windowsNoMagicRoot");vt(this,"regexp");Su(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||mb,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let a=this.globParts.map((o,u,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=o[0]===""&&o[1]===""&&(o[2]==="?"||!Nv.test(o[2]))&&!Nv.test(o[3]),d=/^[a-z]:/i.test(o[0]);if(f)return[...o.slice(0,4),...o.slice(4).map(p=>this.parse(p))];if(d)return[o[0],...o.slice(1).map(p=>this.parse(p))]}return o.map(f=>this.parse(f))});if(this.debug(this.pattern,a),this.set=a.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){const u=this.set[o];u[0]===""&&u[1]===""&&this.globParts[o][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let a=0;a<t[n].length;a++)t[n][a]==="**"&&(t[n][a]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let a=n;for(;r[a+1]==="**";)a++;a!==n&&r.splice(n,a-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,a)=>{const o=n[n.length-1];return a==="**"&&o==="**"?n:a===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(a),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;a<t.length-1;a++){const o=t[a];a===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(a,1),a--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const a=t[n-1];a&&a!=="."&&a!==".."&&a!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let a=-1;for(;(a=n.indexOf("**",a+1))!==-1;){let u=a;for(;n[u+1]==="**";)u++;u>a&&n.splice(a+1,u-a);let c=n[a+1];const f=n[a+2],d=n[a+3];if(c!==".."||!f||f==="."||f===".."||!d||d==="."||d==="..")continue;r=!0,n.splice(a,1);const p=n.slice(0);p[a]="**",t.push(p),a--}if(!this.preserveMultipleSlashes){for(let u=1;u<n.length-1;u++){const c=n[u];u===1&&c===""&&n[0]===""||(c==="."||c==="")&&(r=!0,n.splice(u,1),u--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){const u=n[o-1];if(u&&u!=="."&&u!==".."&&u!=="**"){r=!0;const f=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...f),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){const a=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);if(a){t[r]=[],t[n]=a;break}}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let a=0,o=0,u=[],c="";for(;a<t.length&&o<r.length;)if(t[a]===r[o])u.push(c==="b"?r[o]:t[a]),a++,o++;else if(n&&t[a]==="**"&&r[o]===t[a+1])u.push(t[a]),a++;else if(n&&r[o]==="**"&&t[a]===r[o+1])u.push(r[o]),o++;else if(t[a]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",u.push(t[a]),a++,o++}else if(r[o]==="*"&&t[a]&&(this.options.dot||!t[a].startsWith("."))&&t[a]!=="**"){if(c==="a")return!1;c="b",u.push(r[o]),a++,o++}else return!1;return t.length===r.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,n=0;for(let a=0;a<t.length&&t.charAt(a)==="!";a++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){const a=this.options;if(this.isWindows){const S=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),T=!S&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),C=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),A=!C&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),P=T?3:S?0:void 0,$=A?3:C?0:void 0;if(typeof P=="number"&&typeof $=="number"){const[_,M]=[t[P],r[$]];_.toLowerCase()===M.toLowerCase()&&(r[$]=_,$>P?r=r.slice($):P>$&&(t=t.slice(P)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var u=0,c=0,f=t.length,d=r.length;u<f&&c<d;u++,c++){this.debug("matchOne loop");var p=r[c],m=t[u];if(this.debug(r,p,m),p===!1)return!1;if(p===xr){this.debug("GLOBSTAR",[r,p,m]);var g=u,y=c+1;if(y===d){for(this.debug("** at the end");u<f;u++)if(t[u]==="."||t[u]===".."||!a.dot&&t[u].charAt(0)===".")return!1;return!0}for(;g<f;){var E=t[g];if(this.debug(`
|
|
112
|
+
globstar while`,t,g,r,y,E),this.matchOne(t.slice(g),r.slice(y),n))return this.debug("globstar found match!",g,f,E),!0;if(E==="."||E===".."||!a.dot&&E.charAt(0)==="."){this.debug("dot detected!",t,g,r,y);break}this.debug("globstar swallow a segment, and continue"),g++}return!!(n&&(this.debug(`
|
|
113
|
+
>>> no match, partial?`,t,g,r,y),g===f))}let S;if(typeof p=="string"?(S=m===p,this.debug("string match",p,m,S)):(S=p.test(m),this.debug("pattern match",p,m,S)),!S)return!1}if(u===f&&c===d)return!0;if(u===f)return n;if(c===d)return u===f-1&&t[u]==="";throw new Error("wtf?")}braceExpand(){return gb(this.pattern,this.options)}parse(t){Su(t);const r=this.options;if(t==="**")return xr;if(t==="")return"";let n,a=null;(n=t.match(TF))?a=r.dot?CF:OF:(n=t.match(hF))?a=(r.nocase?r.dot?yF:vF:r.dot?gF:mF)(n[1]):(n=t.match(AF))?a=(r.nocase?r.dot?PF:xF:r.dot?RF:DF)(n):(n=t.match(bF))?a=r.dot?wF:SF:(n=t.match(EF))&&(a=_F);const o=wu.fromGlob(t,this.options).toMMPattern();return a&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:a}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,n=r.noglobstar?MF:r.dot?FF:NF,a=new Set(r.nocase?["i"]:[]);let o=t.map(f=>{const d=f.map(p=>{if(p instanceof RegExp)for(const m of p.flags.split(""))a.add(m);return typeof p=="string"?BF(p):p===xr?xr:p._src});return d.forEach((p,m)=>{const g=d[m+1],y=d[m-1];p!==xr||y===xr||(y===void 0?g!==void 0&&g!==xr?d[m+1]="(?:\\/|"+n+"\\/)?"+g:d[m]=n:g===void 0?d[m-1]=y+"(?:\\/|"+n+")?":g!==xr&&(d[m-1]=y+"(?:\\/|\\/"+n+"\\/)"+g,d[m+1]=xr))}),d.filter(p=>p!==xr).join("/")}).join("|");const[u,c]=t.length>1?["(?:",")"]:["",""];o="^"+u+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const a=this.slashSplit(t);this.debug(this.pattern,"split",a);const o=this.set;this.debug(this.pattern,"set",o);let u=a[a.length-1];if(!u)for(let c=a.length-2;!u&&c>=0;c--)u=a[c];for(let c=0;c<o.length;c++){const f=o[c];let d=a;if(n.matchBase&&f.length===1&&(d=[u]),this.matchOne(d,f,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Ct.defaults(t).Minimatch}}Ct.AST=wu;Ct.Minimatch=Ju;Ct.escape=pF;Ct.unescape=ro;const vb="/$shared",zF={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/*.json":{parser:"json",content:{}}};function yb(e){const t=Object.entries(zF).find(([r])=>Ct(e,r));return t==null?void 0:t[1]}function bb(e){var n;const t=(n=yb(e))==null?void 0:n.content;if(!t)return;const r=e.replace(`${vb}/`,"Shared/");ra({name:r,content:t,asText:typeof t=="string"})}function sp({path:e,createIfNotExists:t=!1}){const r=`${vb}/${e}`;return bt(`${r}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(n=>{const a=yb(e);let o=n;if(!a)return o;if(typeof o=="string")try{switch(a.parser){case"json":o=JSON.parse(o);break;default:break}}catch{throw new Error("Cannot parse")}if(a.schema&&!new rb().validate(o,a.schema).valid)throw new Error("Invalid Schema");return o}).catch(n=>{if(HF(n)&&t){const a=UF(n,e);Hr.next({message:a,kind:"warning"}),bb(r)}throw n})}function HF(e){var t;return((t=e==null?void 0:e.response)==null?void 0:t.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function UF(e,t){var r;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${t}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${t}' is corrupt, resetting...`;case((r=e==null?void 0:e.response)==null?void 0:r.status)===404:return`File '${t}' not found, creating...`;default:return e==null?void 0:e.message}}const GF=()=>{const{host:e,protocol:t}=window.location,r=t==="https:";return{projectOpened:!1,remoteDebuggerMode:Zd.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function qF(){const{hostname:e,host:t,protocol:r}=window.location,n=r==="https:";try{const a=await bt(Gt,{method:"POST",body:JSON.stringify({verb:qe.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),o=(()=>{if(a.rendererPath)return a.rendererPath;const u=`http://${e}:${a.webServerHTTPPort}`,c=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?n?c:u:a.webServerHTTPPort?u:c})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:o,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${o}/$lib/renderer/`,debugger:`ws${n?"s":""}://${t}/remoteDebugger`,lsp:`ws${n?"s":""}://${t}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),GF()}}async function YF(e){return await bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function KF(...e){return(await Promise.all(e.map(n=>YF({root:n,verb:qe.GET_FOLDER})))).map(({children:n})=>n.map(({name:a,date:o,type:u})=>({name:a,type:u,date:o,path:`${u}/${a}`}))).flat()}async function VF(e){return e.type==="folder"?(await bt(NM,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function Eo(...e){return await bt(Gt,{method:"POST",body:JSON.stringify({verb:qe.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function ZF(){return await bt("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function JF({name:e,path:t="",root:r="root",asText:n=!1}){return bt(Gt,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:t,name:e,asText:n}),headers:new Headers({"Content-Type":"application/json"})})}async function XF(e={}){try{return await sp({path:"shared_datasources.json",...e})}catch{return{}}}async function QF(e={}){try{return await sp({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function eN(e={}){try{return await sp({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}const tN=Jd(),da=async e=>{const t={verb:qe.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return tN(async()=>(await bt(Gt,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},ra=async e=>{const t=await bt(Gt,{method:"POST",body:JSON.stringify({...e,verb:qe.SET_FILE_CONTENT,root:ai.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=gu(`${e.path||"Sources"}/${e.name}`);return{...t,type:r,size:0}},up=async e=>await ra({name:"crafted_components.json",path:We.WEBFORMS,content:e});function rN(e){return bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function Sb(e){return bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function td(e){return bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function cn(e){return bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(t=>Array.isArray(t)?t:{...t,content:["4dm","4qm","4qs"].includes(t.ext)?AM(t.content):t.content}).catch(t=>{var r,n;throw((n=(r=t.data)==null?void 0:r.__ERROR[0])==null?void 0:n.errCode)===1839&&bb(e.path),t})}function nN(e){return bt(Gt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}var Pa=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(Pa||{}),Eu=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(Eu||{});const rd={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};var wb=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(wb||{}),Vn=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Vn||{}),_u=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(_u||{}),Eb=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(Eb||{});const Wo=2e3,cp={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles",forceLogin:!1},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Vn.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},_b="4DWS_PREFS",Tb=e=>`APP_STATE_${e}`,Ob=()=>{var e,t;return((t=(e=window==null?void 0:window.$$datastores)==null?void 0:e.ds)==null?void 0:t.getBaseID())||""};function Cb(e){try{const t=Ob(),r=JSON.stringify(e);localStorage.setItem(Tb(t),r)}catch(t){console.error(t)}}function Ab(e){try{const t=JSON.stringify(e);localStorage.setItem(_b,t)}catch(t){console.error(t)}}function lp(){try{const e=localStorage.getItem(_b);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Si(){const e=Ob(),t=localStorage.getItem(Tb(e));if(t){const r=JSON.parse(t);return r.tabs=r.tabs.map(n=>({...n,flags:{...n.flags,enabled:!0}})),r}return cp}function Xu(e){const{name:t,type:r,path:n}=e,a=n.split(".").at(-1);switch(r){case N.WEBFORM:case N.ROLES:case N.HTTP_HANDLERS:case N.SETTINGS:case N.MODEL:return t;case N.METHOD:case N.CLASS:default:return a?`${t}.${a}`:t}}const xb=e=>{if(!e)return[];const t=new Map;return e.dataClasses.forEach(r=>{var o,u;const n=r.extraProperties||{},a={id:r.className,type:"table",position:{x:((o=n.position)==null?void 0:o.x)||0,y:((u=n.position)==null?void 0:u.y)||0},dragHandle:".custom-drag-handle",data:r};t.set(r.name,a)}),Array.from(t.values())};function Pb(e){return e?["json","4dmodel","webform","mform","qodoc"].includes(e.toLowerCase()):!1}const hi=(e,t,r="")=>t?e.type==="currentState"&&e.value===t?{...e,value:r}:e.type==="combination"&&e.conditions?{...e,conditions:e.conditions.map(n=>hi(n,t,r))}:e:e;function Rb(e,t){const{id:r,label:n}=t;return{...e,components:Object.entries(e.components||{}).reduce((a,[o,u])=>({...a,[o]:{...u,custom:Object.entries(u.custom).reduce((c,[f,d])=>f===`states:${r}`?c:{...c,[f]:d},{}),props:Object.entries(u.props).reduce((c,[f,d])=>{let p=d;return f==="events"&&(p=p.map(m=>{var g,y;return m.type==="simple-action"?{...m,state:{...m.state,states:(y=(g=m.state)==null?void 0:g.states)==null?void 0:y.filter(E=>E!==r)}}:m})),{...c,[f]:p}},{})}}),{}),metadata:{...e.metadata,states:e.metadata.states.filter(a=>(a==null?void 0:a.id)!==r).map(a=>a.conditions?{...a,conditions:hi(a.conditions,n)}:a)}}}const aN=(e,t)=>oe.isEqual(e,t);function rt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var a=pN[e],o=a?typeof a=="function"?a.apply(null,r):a:"unknown error nr: "+e;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(u){return"'"+u+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ia(e){return!!e&&!!e[je]}function on(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===hN}(e)||Array.isArray(e)||!!e[uo]||!!(!((t=e.constructor)===null||t===void 0)&&t[uo])||Qu(e)||ec(e))}function Ma(e,t,r){r===void 0&&(r=!1),sa(e)===0?(r?Object.keys:gp)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function sa(e){var t=e[je];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Qu(e)?2:ec(e)?3:0}function _o(e,t){return sa(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xs(e,t){return sa(e)===2?e.get(t):e[t]}function Db(e,t,r){var n=sa(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function iN(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Qu(e){return fN&&e instanceof Map}function ec(e){return dN&&e instanceof Set}function _t(e){return e.o||e.t}function fp(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=mN(e);delete t[je];for(var r=gp(t),n=0;n<r.length;n++){var a=r[n],o=t[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function dp(e,t){return t===void 0&&(t=!1),pp(e)||Ia(e)||!on(e)||(sa(e)>1&&(e.set=e.add=e.clear=e.delete=oN),Object.freeze(e),t&&Ma(e,function(r,n){return dp(n,!0)},!0)),e}function oN(){rt(2)}function pp(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function nn(e){var t=ad[e];return t||rt(18,e),t}function $b(e,t){ad[e]||(ad[e]=t)}function Tu(){return process.env.NODE_ENV==="production"||mi||rt(0),mi}function wf(e,t){t&&(nn("Patches"),e.u=[],e.s=[],e.v=t)}function Ou(e){nd(e),e.p.forEach(sN),e.p=null}function nd(e){e===mi&&(mi=e.l)}function Lv(e){return mi={p:[],l:mi,h:e,m:!0,_:0}}function sN(e){var t=e[je];t.i===0||t.i===1?t.j():t.g=!0}function Ef(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||nn("ES5").S(t,e,n),n?(r[je].P&&(Ou(t),rt(4)),on(e)&&(e=Cu(t,e),t.l||Au(t,e)),t.u&&nn("Patches").M(r[je].t,e,t.u,t.s)):e=Cu(t,r,[]),Ou(t),t.u&&t.v(t.u,t.s),e!==mp?e:void 0}function Cu(e,t,r){if(pp(t))return t;var n=t[je];if(!n)return Ma(t,function(c,f){return kv(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Au(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=fp(n.k):n.o,o=a,u=!1;n.i===3&&(o=new Set(a),a.clear(),u=!0),Ma(o,function(c,f){return kv(e,n,a,c,f,r,u)}),Au(e,a,!1),r&&e.u&&nn("Patches").N(n,r,e.u,e.s)}return n.o}function kv(e,t,r,n,a,o,u){if(process.env.NODE_ENV!=="production"&&a===r&&rt(5),Ia(a)){var c=Cu(e,a,o&&t&&t.i!==3&&!_o(t.R,n)?o.concat(n):void 0);if(Db(r,n,c),!Ia(c))return;e.m=!1}else u&&r.add(a);if(on(a)&&!pp(a)){if(!e.h.D&&e._<1)return;Cu(e,a),t&&t.A.l||Au(e,a)}}function Au(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&dp(t,r)}function _f(e,t){var r=e[je];return(r?_t(r):e)[t]}function jv(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Cn(e){e.P||(e.P=!0,e.l&&Cn(e.l))}function Tf(e){e.o||(e.o=fp(e.t))}function To(e,t,r){var n=Qu(t)?nn("MapSet").F(t,r):ec(t)?nn("MapSet").T(t,r):e.O?function(a,o){var u=Array.isArray(a),c={i:u?1:0,A:o?o.A:Tu(),P:!1,I:!1,R:{},l:o,t:a,k:null,o:null,j:null,C:!1},f=c,d=id;u&&(f=[c],d=no);var p=Proxy.revocable(f,d),m=p.revoke,g=p.proxy;return c.k=g,c.j=m,g}(t,r):nn("ES5").J(t,r);return(r?r.A:Tu()).p.push(n),n}function uN(e){return Ia(e)||rt(22,e),function t(r){if(!on(r))return r;var n,a=r[je],o=sa(r);if(a){if(!a.P&&(a.i<4||!nn("ES5").K(a)))return a.t;a.I=!0,n=Wv(r,o),a.I=!1}else n=Wv(r,o);return Ma(n,function(u,c){a&&Xs(a.t,u)===c||Db(n,u,t(c))}),o===3?new Set(n):n}(e)}function Wv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return fp(e)}function cN(){function e(n){if(!on(n))return n;if(Array.isArray(n))return n.map(e);if(Qu(n))return new Map(Array.from(n.entries()).map(function(u){return[u[0],e(u[1])]}));if(ec(n))return new Set(Array.from(n).map(e));var a=Object.create(Object.getPrototypeOf(n));for(var o in n)a[o]=e(n[o]);return _o(n,uo)&&(a[uo]=n[uo]),a}function t(n){return Ia(n)?e(n):n}var r="add";$b("Patches",{$:function(n,a){return a.forEach(function(o){for(var u=o.path,c=o.op,f=n,d=0;d<u.length-1;d++){var p=sa(f),m=u[d];typeof m!="string"&&typeof m!="number"&&(m=""+m),p!==0&&p!==1||m!=="__proto__"&&m!=="constructor"||rt(24),typeof f=="function"&&m==="prototype"&&rt(24),typeof(f=Xs(f,m))!="object"&&rt(15,u.join("/"))}var g=sa(f),y=e(o.value),E=u[u.length-1];switch(c){case"replace":switch(g){case 2:return f.set(E,y);case 3:rt(16);default:return f[E]=y}case r:switch(g){case 1:return E==="-"?f.push(y):f.splice(E,0,y);case 2:return f.set(E,y);case 3:return f.add(y);default:return f[E]=y}case"remove":switch(g){case 1:return f.splice(E,1);case 2:return f.delete(E);case 3:return f.delete(o.value);default:return delete f[E]}default:rt(17,c)}}),n},N:function(n,a,o,u){switch(n.i){case 0:case 4:case 2:return function(c,f,d,p){var m=c.t,g=c.o;Ma(c.R,function(y,E){var S=Xs(m,y),T=Xs(g,y),C=E?_o(m,y)?"replace":r:"remove";if(S!==T||C!=="replace"){var A=f.concat(y);d.push(C==="remove"?{op:C,path:A}:{op:C,path:A,value:T}),p.push(C===r?{op:"remove",path:A}:C==="remove"?{op:r,path:A,value:t(S)}:{op:"replace",path:A,value:t(S)})}})}(n,a,o,u);case 5:case 1:return function(c,f,d,p){var m=c.t,g=c.R,y=c.o;if(y.length<m.length){var E=[y,m];m=E[0],y=E[1];var S=[p,d];d=S[0],p=S[1]}for(var T=0;T<m.length;T++)if(g[T]&&y[T]!==m[T]){var C=f.concat([T]);d.push({op:"replace",path:C,value:t(y[T])}),p.push({op:"replace",path:C,value:t(m[T])})}for(var A=m.length;A<y.length;A++){var P=f.concat([A]);d.push({op:r,path:P,value:t(y[A])})}m.length<y.length&&p.push({op:"replace",path:f.concat(["length"]),value:m.length})}(n,a,o,u);case 3:return function(c,f,d,p){var m=c.t,g=c.o,y=0;m.forEach(function(E){if(!g.has(E)){var S=f.concat([y]);d.push({op:"remove",path:S,value:E}),p.unshift({op:r,path:S,value:E})}y++}),y=0,g.forEach(function(E){if(!m.has(E)){var S=f.concat([y]);d.push({op:r,path:S,value:E}),p.unshift({op:"remove",path:S,value:E})}y++})}(n,a,o,u)}},M:function(n,a,o,u){o.push({op:"replace",path:[],value:a===mp?void 0:a}),u.push({op:"replace",path:[],value:n})}})}function lN(){function e(c,f){function d(){this.constructor=c}a(c,f),c.prototype=(d.prototype=f.prototype,new d)}function t(c){c.o||(c.R=new Map,c.o=new Map(c.t))}function r(c){c.o||(c.o=new Set,c.t.forEach(function(f){if(on(f)){var d=To(c.A.h,f,c);c.p.set(f,d),c.o.add(d)}else c.o.add(f)}))}function n(c){c.g&&rt(3,JSON.stringify(_t(c)))}var a=function(c,f){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var m in p)p.hasOwnProperty(m)&&(d[m]=p[m])})(c,f)},o=function(){function c(d,p){return this[je]={i:2,l:p,A:p?p.A:Tu(),P:!1,I:!1,o:void 0,R:void 0,t:d,k:this,C:!1,g:!1},this}e(c,Map);var f=c.prototype;return Object.defineProperty(f,"size",{get:function(){return _t(this[je]).size}}),f.has=function(d){return _t(this[je]).has(d)},f.set=function(d,p){var m=this[je];return n(m),_t(m).has(d)&&_t(m).get(d)===p||(t(m),Cn(m),m.R.set(d,!0),m.o.set(d,p),m.R.set(d,!0)),this},f.delete=function(d){if(!this.has(d))return!1;var p=this[je];return n(p),t(p),Cn(p),p.t.has(d)?p.R.set(d,!1):p.R.delete(d),p.o.delete(d),!0},f.clear=function(){var d=this[je];n(d),_t(d).size&&(t(d),Cn(d),d.R=new Map,Ma(d.t,function(p){d.R.set(p,!1)}),d.o.clear())},f.forEach=function(d,p){var m=this;_t(this[je]).forEach(function(g,y){d.call(p,m.get(y),y,m)})},f.get=function(d){var p=this[je];n(p);var m=_t(p).get(d);if(p.I||!on(m)||m!==p.t.get(d))return m;var g=To(p.A.h,m,p);return t(p),p.o.set(d,g),g},f.keys=function(){return _t(this[je]).keys()},f.values=function(){var d,p=this,m=this.keys();return(d={})[Us]=function(){return p.values()},d.next=function(){var g=m.next();return g.done?g:{done:!1,value:p.get(g.value)}},d},f.entries=function(){var d,p=this,m=this.keys();return(d={})[Us]=function(){return p.entries()},d.next=function(){var g=m.next();if(g.done)return g;var y=p.get(g.value);return{done:!1,value:[g.value,y]}},d},f[Us]=function(){return this.entries()},c}(),u=function(){function c(d,p){return this[je]={i:3,l:p,A:p?p.A:Tu(),P:!1,I:!1,o:void 0,t:d,k:this,p:new Map,g:!1,C:!1},this}e(c,Set);var f=c.prototype;return Object.defineProperty(f,"size",{get:function(){return _t(this[je]).size}}),f.has=function(d){var p=this[je];return n(p),p.o?!!p.o.has(d)||!(!p.p.has(d)||!p.o.has(p.p.get(d))):p.t.has(d)},f.add=function(d){var p=this[je];return n(p),this.has(d)||(r(p),Cn(p),p.o.add(d)),this},f.delete=function(d){if(!this.has(d))return!1;var p=this[je];return n(p),r(p),Cn(p),p.o.delete(d)||!!p.p.has(d)&&p.o.delete(p.p.get(d))},f.clear=function(){var d=this[je];n(d),_t(d).size&&(r(d),Cn(d),d.o.clear())},f.values=function(){var d=this[je];return n(d),r(d),d.o.values()},f.entries=function(){var d=this[je];return n(d),r(d),d.o.entries()},f.keys=function(){return this.values()},f[Us]=function(){return this.values()},f.forEach=function(d,p){for(var m=this.values(),g=m.next();!g.done;)d.call(p,g.value,g.value,this),g=m.next()},c}();$b("MapSet",{F:function(c,f){return new o(c,f)},T:function(c,f){return new u(c,f)}})}var Bv,mi,hp=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fN=typeof Map<"u",dN=typeof Set<"u",zv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",mp=hp?Symbol.for("immer-nothing"):((Bv={})["immer-nothing"]=!0,Bv),uo=hp?Symbol.for("immer-draftable"):"__$immer_draftable",je=hp?Symbol.for("immer-state"):"__$immer_state",Us=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",pN={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},hN=""+Object.prototype.constructor,gp=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,mN=Object.getOwnPropertyDescriptors||function(e){var t={};return gp(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},ad={},id={get:function(e,t){if(t===je)return e;var r=_t(e);if(!_o(r,t))return function(a,o,u){var c,f=jv(o,u);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!on(n)?n:n===_f(e.t,t)?(Tf(e),e.o[t]=To(e.A.h,n,e)):n},has:function(e,t){return t in _t(e)},ownKeys:function(e){return Reflect.ownKeys(_t(e))},set:function(e,t,r){var n=jv(_t(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var a=_f(_t(e),t),o=a==null?void 0:a[je];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(iN(r,a)&&(r!==void 0||_o(e.t,t)))return!0;Tf(e),Cn(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return _f(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Tf(e),Cn(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=_t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){rt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){rt(12)}},no={};Ma(id,function(e,t){no[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),no.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&rt(13),no.set.call(this,e,t,void 0)},no.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&rt(14),id.set.call(this,e[0],t,r,e[0])};var gN=function(){function e(r){var n=this;this.O=zv,this.D=!0,this.produce=function(a,o,u){if(typeof a=="function"&&typeof o!="function"){var c=o;o=a;var f=n;return function(S){var T=this;S===void 0&&(S=c);for(var C=arguments.length,A=Array(C>1?C-1:0),P=1;P<C;P++)A[P-1]=arguments[P];return f.produce(S,function($){var _;return(_=o).call.apply(_,[T,$].concat(A))})}}var d;if(typeof o!="function"&&rt(6),u!==void 0&&typeof u!="function"&&rt(7),on(a)){var p=Lv(n),m=To(n,a,void 0),g=!0;try{d=o(m),g=!1}finally{g?Ou(p):nd(p)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(S){return wf(p,u),Ef(S,p)},function(S){throw Ou(p),S}):(wf(p,u),Ef(d,p))}if(!a||typeof a!="object"){if((d=o(a))===void 0&&(d=a),d===mp&&(d=void 0),n.D&&dp(d,!0),u){var y=[],E=[];nn("Patches").M(a,d,y,E),u(y,E)}return d}rt(21,a)},this.produceWithPatches=function(a,o){if(typeof a=="function")return function(d){for(var p=arguments.length,m=Array(p>1?p-1:0),g=1;g<p;g++)m[g-1]=arguments[g];return n.produceWithPatches(d,function(y){return a.apply(void 0,[y].concat(m))})};var u,c,f=n.produce(a,o,function(d,p){u=d,c=p});return typeof Promise<"u"&&f instanceof Promise?f.then(function(d){return[d,u,c]}):[f,u,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){on(r)||rt(8),Ia(r)&&(r=uN(r));var n=Lv(this),a=To(this,r,void 0);return a[je].C=!0,nd(n),a},t.finishDraft=function(r,n){var a=r&&r[je];process.env.NODE_ENV!=="production"&&(a&&a.C||rt(9),a.I&&rt(10));var o=a.A;return wf(o,n),Ef(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!zv&&rt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));var u=nn("Patches").$;return Ia(r)?u(r,n):this.produce(r,function(c){return u(c,n)})},e}(),vr=new gN;vr.produce;vr.produceWithPatches.bind(vr);vr.setAutoFreeze.bind(vr);vr.setUseProxies.bind(vr);vr.applyPatches.bind(vr);vr.createDraft.bind(vr);vr.finishDraft.bind(vr);function vN(){this.__data__=[],this.size=0}var yN=vN;function bN(e,t){return e===t||e!==e&&t!==t}var SN=bN,wN=SN;function EN(e,t){for(var r=e.length;r--;)if(wN(e[r][0],t))return r;return-1}var tc=EN,_N=tc,TN=Array.prototype,ON=TN.splice;function CN(e){var t=this.__data__,r=_N(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ON.call(t,r,1),--this.size,!0}var AN=CN,xN=tc;function PN(e){var t=this.__data__,r=xN(t,e);return r<0?void 0:t[r][1]}var RN=PN,DN=tc;function $N(e){return DN(this.__data__,e)>-1}var IN=$N,MN=tc;function FN(e,t){var r=this.__data__,n=MN(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var NN=FN,LN=yN,kN=AN,jN=RN,WN=IN,BN=NN;function wi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wi.prototype.clear=LN;wi.prototype.delete=kN;wi.prototype.get=jN;wi.prototype.has=WN;wi.prototype.set=BN;var rc=wi,zN=rc;function HN(){this.__data__=new zN,this.size=0}var UN=HN;function GN(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var qN=GN;function YN(e){return this.__data__.get(e)}var KN=YN;function VN(e){return this.__data__.has(e)}var ZN=VN,JN=Fu,XN=Ro,QN="[object AsyncFunction]",eL="[object Function]",tL="[object GeneratorFunction]",rL="[object Proxy]";function nL(e){if(!XN(e))return!1;var t=JN(e);return t==eL||t==tL||t==QN||t==rL}var aL=nL,iL=sn,oL=iL["__core-js_shared__"],sL=oL,Of=sL,Hv=function(){var e=/[^.]+$/.exec(Of&&Of.keys&&Of.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uL(e){return!!Hv&&Hv in e}var cL=uL,lL=Function.prototype,fL=lL.toString;function dL(e){if(e!=null){try{return fL.call(e)}catch{}try{return e+""}catch{}}return""}var Ib=dL,pL=aL,hL=cL,mL=Ro,gL=Ib,vL=/[\\^$.*+?()[\]{}|]/g,yL=/^\[object .+?Constructor\]$/,bL=Function.prototype,SL=Object.prototype,wL=bL.toString,EL=SL.hasOwnProperty,_L=RegExp("^"+wL.call(EL).replace(vL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TL(e){if(!mL(e)||hL(e))return!1;var t=pL(e)?_L:yL;return t.test(gL(e))}var OL=TL;function CL(e,t){return e==null?void 0:e[t]}var AL=CL,xL=OL,PL=AL;function RL(e,t){var r=PL(e,t);return xL(r)?r:void 0}var Ei=RL,DL=Ei,$L=sn,IL=DL($L,"Map"),vp=IL,ML=Ei,FL=ML(Object,"create"),nc=FL,Uv=nc;function NL(){this.__data__=Uv?Uv(null):{},this.size=0}var LL=NL;function kL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jL=kL,WL=nc,BL="__lodash_hash_undefined__",zL=Object.prototype,HL=zL.hasOwnProperty;function UL(e){var t=this.__data__;if(WL){var r=t[e];return r===BL?void 0:r}return HL.call(t,e)?t[e]:void 0}var GL=UL,qL=nc,YL=Object.prototype,KL=YL.hasOwnProperty;function VL(e){var t=this.__data__;return qL?t[e]!==void 0:KL.call(t,e)}var ZL=VL,JL=nc,XL="__lodash_hash_undefined__";function QL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=JL&&t===void 0?XL:t,this}var ek=QL,tk=LL,rk=jL,nk=GL,ak=ZL,ik=ek;function _i(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_i.prototype.clear=tk;_i.prototype.delete=rk;_i.prototype.get=nk;_i.prototype.has=ak;_i.prototype.set=ik;var ok=_i,Gv=ok,sk=rc,uk=vp;function ck(){this.size=0,this.__data__={hash:new Gv,map:new(uk||sk),string:new Gv}}var lk=ck;function fk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dk=fk,pk=dk;function hk(e,t){var r=e.__data__;return pk(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ac=hk,mk=ac;function gk(e){var t=mk(this,e).delete(e);return this.size-=t?1:0,t}var vk=gk,yk=ac;function bk(e){return yk(this,e).get(e)}var Sk=bk,wk=ac;function Ek(e){return wk(this,e).has(e)}var _k=Ek,Tk=ac;function Ok(e,t){var r=Tk(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ck=Ok,Ak=lk,xk=vk,Pk=Sk,Rk=_k,Dk=Ck;function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ti.prototype.clear=Ak;Ti.prototype.delete=xk;Ti.prototype.get=Pk;Ti.prototype.has=Rk;Ti.prototype.set=Dk;var Mb=Ti,$k=rc,Ik=vp,Mk=Mb,Fk=200;function Nk(e,t){var r=this.__data__;if(r instanceof $k){var n=r.__data__;if(!Ik||n.length<Fk-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Mk(n)}return r.set(e,t),this.size=r.size,this}var Lk=Nk,kk=rc,jk=UN,Wk=qN,Bk=KN,zk=ZN,Hk=Lk;function Bo(e){var t=this.__data__=new kk(e);this.size=t.size}Bo.prototype.clear=jk;Bo.prototype.delete=Wk;Bo.prototype.get=Bk;Bo.prototype.has=zk;Bo.prototype.set=Hk;var Uk="__lodash_hash_undefined__";function Gk(e){return this.__data__.set(e,Uk),this}var qk=Gk;function Yk(e){return this.__data__.has(e)}var Kk=Yk,Vk=Mb,Zk=qk,Jk=Kk;function od(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Vk;++t<r;)this.add(e[t])}od.prototype.add=od.prototype.push=Zk;od.prototype.has=Jk;var Xk=sn;Xk.Uint8Array;var qv=$d,Yv=qv?qv.prototype:void 0;Yv&&Yv.valueOf;var Qk=Fu,e2=Id,t2="[object Arguments]";function r2(e){return e2(e)&&Qk(e)==t2}var n2=r2,Kv=n2,a2=Id,Fb=Object.prototype,i2=Fb.hasOwnProperty,o2=Fb.propertyIsEnumerable;Kv(function(){return arguments}());var xu={exports:{}};function s2(){return!1}var u2=s2;xu.exports;(function(e,t){var r=sn,n=u2,a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,u=o&&o.exports===a,c=u?r.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||n;e.exports=d})(xu,xu.exports);xu.exports;var Pu={exports:{}};Pu.exports;(function(e,t){var r=Ny,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===n,u=o&&r.process,c=function(){try{var f=a&&a.require&&a.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}}();e.exports=c})(Pu,Pu.exports);var c2=Pu.exports,Vv=c2;Vv&&Vv.isTypedArray;var l2=Ei,f2=sn,d2=l2(f2,"DataView"),p2=d2,h2=Ei,m2=sn,g2=h2(m2,"Promise"),v2=g2,y2=Ei,b2=sn,S2=y2(b2,"Set"),w2=S2,E2=Ei,_2=sn,T2=E2(_2,"WeakMap"),O2=T2,sd=p2,ud=vp,cd=v2,ld=w2,fd=O2,Nb=Fu,Oi=Ib,Zv="[object Map]",C2="[object Object]",Jv="[object Promise]",Xv="[object Set]",Qv="[object WeakMap]",ey="[object DataView]",A2=Oi(sd),x2=Oi(ud),P2=Oi(cd),R2=Oi(ld),D2=Oi(fd),Qa=Nb;(sd&&Qa(new sd(new ArrayBuffer(1)))!=ey||ud&&Qa(new ud)!=Zv||cd&&Qa(cd.resolve())!=Jv||ld&&Qa(new ld)!=Xv||fd&&Qa(new fd)!=Qv)&&(Qa=function(e){var t=Nb(e),r=t==C2?e.constructor:void 0,n=r?Oi(r):"";if(n)switch(n){case A2:return ey;case x2:return Zv;case P2:return Jv;case R2:return Xv;case D2:return Qv}return t});typeof window<"u"&&(window.__CRAFTJS__||(window.__CRAFTJS__={}),window.__CRAFTJS__["@ws-ui/craftjs-utils"]="0.2.3");const $2="ROOT";lN(),cN();var ty;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(ty||(ty={}));function yp(e){return`Debugger/${e}`}function Lb(e,t){var n;const r=(n=t.name)==null?void 0:n.replace(/\.(4dm|4qs)$/,"");return`#${e} ${r}`}const kb=[{pattern:Ot,editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:Qr,editor:{key:"editors:http-handlers"},supportedEditors:[{key:"editors:code",config:{language:"json"}}]},{pattern:jo,editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"**/*.webform",editor:{key:"editors:webforms"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"**/*.qodoc",editor:{key:"editors:reports"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"Methods/*.4dm",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Methods/*.4qs",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4dm",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4qs",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(json)",editor:{key:"editors:code",config:{language:"json"}}},{pattern:"**/*.+(js)",editor:{key:"editors:code",config:{language:"js"}}},{pattern:"**/*.+(css)",editor:{key:"editors:code",config:{language:"css"}}},{pattern:"**/*.+(txt)",editor:{key:"editors:code",config:{language:""}}},{pattern:"Debugger/*",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(png|jpeg|jpg|gif|svg)",editor:{key:"editors:img"}}],jb=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function Wb(e){const t=e.split("/");return t.pop(),t.join("/")}function Ut(e){const t=kb.find(({pattern:r})=>Ct(e,r,{nocase:!0}));return t||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function bp(e){const t=jb.find(({pattern:r})=>Ct(e,r,{nocase:!0}));return t?t.type:"text"}const Oa=()=>({dataclass:({name:e,qodly:t})=>({name:e,content:t?`extends DataClass
|
|
39
114
|
`:`Class extends DataClass
|
|
40
|
-
`}),collection:({name:e,qodly:
|
|
115
|
+
`}),collection:({name:e,qodly:t})=>({name:`${e}Selection`,content:t?`extends EntitySelection
|
|
41
116
|
`:`Class extends EntitySelection
|
|
42
|
-
`}),entity:({name:e,qodly:
|
|
117
|
+
`}),entity:({name:e,qodly:t})=>({name:`${e}Entity`,content:t?`extends Entity
|
|
43
118
|
`:`Class extends Entity
|
|
44
|
-
`}),model:({name:e,qodly:
|
|
119
|
+
`}),model:({name:e,qodly:t})=>({name:e,content:t?`extends DataStoreImplementation
|
|
45
120
|
`:`Class extends DataStoreImplementation
|
|
46
121
|
`}),app:({name:e})=>({name:e,content:`shared singleton constructor()
|
|
47
122
|
|
|
48
123
|
shared function onStartup()
|
|
49
124
|
|
|
50
|
-
shared function onStop()`})}),
|
|
51
|
-
`+t.map(function(a,s){return s+1+") "+a.toString()}).join(`
|
|
52
|
-
`):"",this.name="UnsubscriptionError",this.errors=t}});function cu(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}}var Ls=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,t,a,s,i;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var l=iu(u),f=l.next();!f.done;f=l.next()){var p=f.value;p.remove(this)}}catch(C){r={error:C}}finally{try{f&&!f.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}else u.remove(this);var h=this.initialTeardown;if(Fr(h))try{h()}catch(C){i=C instanceof Rc?C.errors:[C]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var _=iu(y),E=_.next();!E.done;E=_.next()){var T=E.value;try{Ap(T)}catch(C){i=i??[],C instanceof Rc?i=bs(bs([],ys(i)),ys(C.errors)):i.push(C)}}}catch(C){a={error:C}}finally{try{E&&!E.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}}if(i)throw new Rc(i)}},e.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)Ap(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},e.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},e.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},e.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&cu(t,r)},e.prototype.remove=function(r){var t=this._finalizers;t&&cu(t,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),og=Ls.EMPTY;function sg(e){return e instanceof Ls||e&&"closed"in e&&Fr(e.remove)&&Fr(e.add)&&Fr(e.unsubscribe)}function Ap(e){Fr(e)?e():e.unsubscribe()}var ig={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},uu={setTimeout:function(e,r){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=uu.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,bs([e,r],ys(t))):setTimeout.apply(void 0,bs([e,r],ys(t)))},clearTimeout:function(e){var r=uu.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function uA(e){uu.setTimeout(function(){throw e})}function Rp(){}function ts(e){e()}var cg=function(e){$s(r,e);function r(t){var a=e.call(this)||this;return a.isStopped=!1,t?(a.destination=t,sg(t)&&t.add(a)):a.destination=pA,a}return r.create=function(t,a,s){return new lu(t,a,s)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(Ls),lA=Function.prototype.bind;function Dc(e,r){return lA.call(e,r)}var fA=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var t=this.partialObserver;if(t.next)try{t.next(r)}catch(a){Jo(a)}},e.prototype.error=function(r){var t=this.partialObserver;if(t.error)try{t.error(r)}catch(a){Jo(a)}else Jo(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(t){Jo(t)}},e}(),lu=function(e){$s(r,e);function r(t,a,s){var i=e.call(this)||this,u;if(Fr(t)||!t)u={next:t??void 0,error:a??void 0,complete:s??void 0};else{var l;i&&ig.useDeprecatedNextContext?(l=Object.create(t),l.unsubscribe=function(){return i.unsubscribe()},u={next:t.next&&Dc(t.next,l),error:t.error&&Dc(t.error,l),complete:t.complete&&Dc(t.complete,l)}):u=t}return i.destination=new fA(u),i}return r}(cg);function Jo(e){uA(e)}function dA(e){throw e}var pA={closed:!0,next:Rp,error:dA,complete:Rp},hA=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function gA(e){return e}function vA(e){return e.length===0?gA:e.length===1?e[0]:function(t){return e.reduce(function(a,s){return s(a)},t)}}var Dp=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.subscribe=function(r,t,a){var s=this,i=yA(r)?r:new lu(r,t,a);return ts(function(){var u=s,l=u.operator,f=u.source;i.add(l?l.call(i,f):f?s._subscribe(i):s._trySubscribe(i))}),i},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.error(t)}},e.prototype.forEach=function(r,t){var a=this;return t=Pp(t),new t(function(s,i){var u=new lu({next:function(l){try{r(l)}catch(f){i(f),u.unsubscribe()}},error:i,complete:s});a.subscribe(u)})},e.prototype._subscribe=function(r){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(r)},e.prototype[hA]=function(){return this},e.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return vA(r)(this)},e.prototype.toPromise=function(r){var t=this;return r=Pp(r),new r(function(a,s){var i;t.subscribe(function(u){return i=u},function(u){return s(u)},function(){return a(i)})})},e.create=function(r){return new e(r)},e}();function Pp(e){var r;return(r=e??ig.Promise)!==null&&r!==void 0?r:Promise}function mA(e){return e&&Fr(e.next)&&Fr(e.error)&&Fr(e.complete)}function yA(e){return e&&e instanceof cg||mA(e)&&sg(e)}var bA=ag(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ug=function(e){$s(r,e);function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype.lift=function(t){var a=new Fp(this,this);return a.operator=t,a},r.prototype._throwIfClosed=function(){if(this.closed)throw new bA},r.prototype.next=function(t){var a=this;ts(function(){var s,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var u=iu(a.currentObservers),l=u.next();!l.done;l=u.next()){var f=l.value;f.next(t)}}catch(p){s={error:p}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(s)throw s.error}}}})},r.prototype.error=function(t){var a=this;ts(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=t;for(var s=a.observers;s.length;)s.shift().error(t)}})},r.prototype.complete=function(){var t=this;ts(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var a=t.observers;a.length;)a.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var a=this,s=this,i=s.hasError,u=s.isStopped,l=s.observers;return i||u?og:(this.currentObservers=null,l.push(t),new Ls(function(){a.currentObservers=null,cu(l,t)}))},r.prototype._checkFinalizedStatuses=function(t){var a=this,s=a.hasError,i=a.thrownError,u=a.isStopped;s?t.error(i):u&&t.complete()},r.prototype.asObservable=function(){var t=new Dp;return t.source=this,t},r.create=function(t,a){return new Fp(t,a)},r}(Dp),Fp=function(e){$s(r,e);function r(t,a){var s=e.call(this)||this;return s.destination=t,s.source=a,s}return r.prototype.next=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.next)===null||s===void 0||s.call(a,t)},r.prototype.error=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.error)===null||s===void 0||s.call(a,t)},r.prototype.complete=function(){var t,a;(a=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||a===void 0||a.call(t)},r.prototype._subscribe=function(t){var a,s;return(s=(a=this.source)===null||a===void 0?void 0:a.subscribe(t))!==null&&s!==void 0?s:og},r}(ug);const lg=new ug;var fu={exports:{}},du={exports:{}},Ie={};/** @license React v16.13.1
|
|
125
|
+
shared function onStop()`})}),dd=async(e,t,r)=>{if(e.catalog.state!=="loaded")return[];const{settings:{server:{qodly:n}}}=e,a=n?"4qs":"4dm",o=e.root.tabs.find(T=>T.path===jo),u=e.catalog.model.dataClasses,c=Object.values(o?o.content.dataClasses:u),f=e.explorer.find(T=>T.name==="Classes"),d=t.find(({name:T})=>T==="DataStore"),p=`Classes/DataStore.${(d==null?void 0:d.ext)||a}`,m=Ut(p),g={ext:a,...d,name:"DataStore",type:N.CLASS,path:p,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:m,info:{kind:"model",filename:"DataStore",exist:!!d}},y=[];if(n){const T=t.find(({name:C})=>C==="QodlyEvents");y.push({ext:a,...T,name:"QodlyEvents",type:N.CLASS,path:`Classes/QodlyEvents.${a}`,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:m,info:{kind:"app",filename:"QodlyEvents",exist:!!T}})}const E=c.map(({name:T,className:C,collectionName:A,uuid:P})=>{var Oe;const $=t.find(({name:Ke})=>Ke===T),_=t.find(({name:Ke})=>Ke===`${C}Entity`),M=t.find(({name:Ke})=>Ke===A),W=(Oe=f==null?void 0:f.children)==null?void 0:Oe.find(Ke=>Ke.path===`Classes/${T}___[<QODLY_ID>]`),G=`Classes/${T}.${($==null?void 0:$.ext)||a}`,Q=`Classes/${T}Entity.${(_==null?void 0:_.ext)||a}`,we=`Classes/${A}.${(M==null?void 0:M.ext)||a}`;return{name:T,type:N.CLASS_FOLDER,children:[{ext:a,...$,name:"DataClass",type:N.CLASS,path:G,error:null,flags:{},config:Ut(G),info:{dataclass:T,filename:T,kind:"dataclass",exist:!!$}},{ext:a,..._,name:"Entity",type:N.CLASS,path:Q,error:null,flags:{},config:Ut(Q),info:{dataclass:T,filename:`${T}Entity`,kind:"entity",exist:!!_}},{ext:a,...M,name:"Selection",type:N.CLASS,path:we,error:null,flags:{},config:Ut(we),info:{dataclass:T,filename:`${T}Selection`,kind:"collection",exist:!!M}}],path:`Classes/${T}___[<QODLY_ID>]`,error:null,flags:{expanded:(W==null?void 0:W.flags.expanded)||r===T||!1,loading:!1,cached:!1},config:{},info:{uuid:P}}}),S=t.filter(T=>{if(!T.name)return;const C=T.name==="DataStore",A=T.name==="QodlyEvents",P=c.find(({name:M})=>M===T.name),$=c.find(({name:M})=>`${M}Entity`===T.name),_=c.find(({name:M})=>`${M}Selection`===T.name);return!A&&!P&&!C&&!$&&!_}).map(T=>{const C=`Classes/${T.name}.${(T==null?void 0:T.ext)||a}`;return{...T,type:N.CLASS,path:C,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:Ut(C),info:{filename:T.name,kind:"userClass",exist:!0}}});return[...y,g,...E,...S]},Bb=e=>e.split(".").slice(0,-1).join("."),zb=new ua;var $n=Y.createContext(null);process.env.NODE_ENV!=="production"&&($n.displayName="ReactRedux");function I2(e){e()}var Hb=I2,M2=function(t){return Hb=t},F2=function(){return Hb};function N2(){var e=F2(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var a=t;a;)a.callback(),a=a.next})},get:function(){for(var a=[],o=t;o;)a.push(o),o=o.next;return a},subscribe:function(a){var o=!0,u=r={callback:a,next:null,prev:r};return u.prev?u.prev.next=u:t=u,function(){!o||t===null||(o=!1,u.next?u.next.prev=u.prev:r=u.prev,u.prev?u.prev.next=u.next:t=u.next)}}}}var ry={notify:function(){},get:function(){return[]}};function Ub(e,t){var r,n=ry;function a(m){return f(),n.subscribe(m)}function o(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function c(){return!!r}function f(){r||(r=t?t.addNestedSub(u):e.subscribe(u),n=N2())}function d(){r&&(r(),r=void 0,n.clear(),n=ry)}var p={addNestedSub:a,notifyNestedSubs:o,handleChangeWrapper:u,isSubscribed:c,trySubscribe:f,tryUnsubscribe:d,getListeners:function(){return n}};return p}var pd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Y.useLayoutEffect:Y.useEffect;function Gb(e){var t=e.store,r=e.context,n=e.children,a=Y.useMemo(function(){var c=Ub(t);return{store:t,subscription:c}},[t]),o=Y.useMemo(function(){return t.getState()},[t]);pd(function(){var c=a.subscription;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==t.getState()&&c.notifyNestedSubs(),function(){c.tryUnsubscribe(),c.onStateChange=null}},[a,o]);var u=r||$n;return Y.createElement(u.Provider,{value:a},n)}process.env.NODE_ENV!=="production"&&(Gb.propTypes={store:Xa.shape({subscribe:Xa.func.isRequired,dispatch:Xa.func.isRequired,getState:Xa.func.isRequired}),context:Xa.object,children:Xa.any});var He={};/** @license React v17.0.2
|
|
53
126
|
* react-is.production.min.js
|
|
54
127
|
*
|
|
55
128
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56
129
|
*
|
|
57
130
|
* This source code is licensed under the MIT license found in the
|
|
58
131
|
* LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/var
|
|
132
|
+
*/var ny;function L2(){if(ny)return He;ny=1;var e=60103,t=60106,r=60107,n=60108,a=60114,o=60109,u=60110,c=60112,f=60113,d=60120,p=60115,m=60116,g=60121,y=60122,E=60117,S=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;e=C("react.element"),t=C("react.portal"),r=C("react.fragment"),n=C("react.strict_mode"),a=C("react.profiler"),o=C("react.provider"),u=C("react.context"),c=C("react.forward_ref"),f=C("react.suspense"),d=C("react.suspense_list"),p=C("react.memo"),m=C("react.lazy"),g=C("react.block"),y=C("react.server.block"),E=C("react.fundamental"),S=C("react.debug_trace_mode"),T=C("react.legacy_hidden")}function A(X){if(typeof X=="object"&&X!==null){var xt=X.$$typeof;switch(xt){case e:switch(X=X.type,X){case r:case a:case n:case f:case d:return X;default:switch(X=X&&X.$$typeof,X){case u:case c:case m:case p:case o:return X;default:return xt}}case t:return xt}}}var P=o,$=e,_=c,M=r,W=m,G=p,Q=t,we=a,Oe=n,Ke=f;return He.ContextConsumer=u,He.ContextProvider=P,He.Element=$,He.ForwardRef=_,He.Fragment=M,He.Lazy=W,He.Memo=G,He.Portal=Q,He.Profiler=we,He.StrictMode=Oe,He.Suspense=Ke,He.isAsyncMode=function(){return!1},He.isConcurrentMode=function(){return!1},He.isContextConsumer=function(X){return A(X)===u},He.isContextProvider=function(X){return A(X)===o},He.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===e},He.isForwardRef=function(X){return A(X)===c},He.isFragment=function(X){return A(X)===r},He.isLazy=function(X){return A(X)===m},He.isMemo=function(X){return A(X)===p},He.isPortal=function(X){return A(X)===t},He.isProfiler=function(X){return A(X)===a},He.isStrictMode=function(X){return A(X)===n},He.isSuspense=function(X){return A(X)===f},He.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===r||X===a||X===S||X===n||X===f||X===d||X===T||typeof X=="object"&&X!==null&&(X.$$typeof===m||X.$$typeof===p||X.$$typeof===o||X.$$typeof===u||X.$$typeof===c||X.$$typeof===E||X.$$typeof===g||X[0]===y)},He.typeOf=A,He}var Ue={};/** @license React v17.0.2
|
|
60
133
|
* react-is.development.js
|
|
61
134
|
*
|
|
62
135
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
63
136
|
*
|
|
64
137
|
* This source code is licensed under the MIT license found in the
|
|
65
138
|
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var
|
|
67
|
-
object-assign
|
|
68
|
-
(c) Sindre Sorhus
|
|
69
|
-
@license MIT
|
|
70
|
-
*/var Pc,$p;function Hu(){if($p)return Pc;$p=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function a(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var u={},l=0;l<10;l++)u["_"+String.fromCharCode(l)]=l;var f=Object.getOwnPropertyNames(u).map(function(h){return u[h]});if(f.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(h){p[h]=h}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pc=s()?Object.assign:function(i,u){for(var l,f=a(i),p,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var y in l)r.call(l,y)&&(f[y]=l[y]);if(e){p=e(l);for(var _=0;_<p.length;_++)t.call(l,p[_])&&(f[p[_]]=l[p[_]])}}return f},Pc}var Fc,Lp;function Uu(){if(Lp)return Fc;Lp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fc=e,Fc}var Ic,Np;function fg(){return Np||(Np=1,Ic=Function.call.bind(Object.prototype.hasOwnProperty)),Ic}var Mc,kp;function SA(){if(kp)return Mc;kp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=Uu(),t={},a=fg();e=function(i){var u="Warning: "+i;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function s(i,u,l,f,p){if(process.env.NODE_ENV!=="production"){for(var h in i)if(a(i,h)){var y;try{if(typeof i[h]!="function"){var _=Error((f||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}y=i[h](u,h,f,l,null,r)}catch(T){y=T}if(y&&!(y instanceof Error)&&e((f||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in t)){t[y.message]=!0;var E=p?p():"";e("Failed "+l+" type: "+y.message+(E??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Mc=s,Mc}var $c,jp;function TA(){if(jp)return $c;jp=1;var e=Wu,r=Hu(),t=Uu(),a=fg(),s=SA(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var f="Warning: "+l;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function u(){return null}return $c=function(l,f){var p=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function y(H){var V=H&&(p&&H[p]||H[h]);if(typeof V=="function")return V}var _="<<anonymous>>",E={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:F(),arrayOf:M,element:L(),elementType:I(),instanceOf:G,node:De(),objectOf:q,oneOf:W,oneOfType:ee,shape:We,exact:X};function T(H,V){return H===V?H!==0||1/H===1/V:H!==H&&V!==V}function C(H,V){this.message=H,this.data=V&&typeof V=="object"?V:{},this.stack=""}C.prototype=Error.prototype;function O(H){if(process.env.NODE_ENV!=="production")var V={},ge=0;function de(pe,se,le,ue,ve,me,J){if(ue=ue||_,me=me||le,J!==t){if(f){var Y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Y.name="Invariant Violation",Y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Qe=ue+":"+le;!V[Qe]&&ge<3&&(i("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Qe]=!0,ge++)}}return se[le]==null?pe?se[le]===null?new C("The "+ve+" `"+me+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new C("The "+ve+" `"+me+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:H(se,le,ue,ve,me)}var ce=de.bind(null,!1);return ce.isRequired=de.bind(null,!0),ce}function D(H){function V(ge,de,ce,pe,se,le){var ue=ge[de],ve=rt(ue);if(ve!==H){var me=Ge(ue);return new C("Invalid "+pe+" `"+se+"` of type "+("`"+me+"` supplied to `"+ce+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return O(V)}function F(){return O(u)}function M(H){function V(ge,de,ce,pe,se){if(typeof H!="function")return new C("Property `"+se+"` of component `"+ce+"` has invalid PropType notation inside arrayOf.");var le=ge[de];if(!Array.isArray(le)){var ue=rt(le);return new C("Invalid "+pe+" `"+se+"` of type "+("`"+ue+"` supplied to `"+ce+"`, expected an array."))}for(var ve=0;ve<le.length;ve++){var me=H(le,ve,ce,pe,se+"["+ve+"]",t);if(me instanceof Error)return me}return null}return O(V)}function L(){function H(V,ge,de,ce,pe){var se=V[ge];if(!l(se)){var le=rt(se);return new C("Invalid "+ce+" `"+pe+"` of type "+("`"+le+"` supplied to `"+de+"`, expected a single ReactElement."))}return null}return O(H)}function I(){function H(V,ge,de,ce,pe){var se=V[ge];if(!e.isValidElementType(se)){var le=rt(se);return new C("Invalid "+ce+" `"+pe+"` of type "+("`"+le+"` supplied to `"+de+"`, expected a single ReactElement type."))}return null}return O(H)}function G(H){function V(ge,de,ce,pe,se){if(!(ge[de]instanceof H)){var le=H.name||_,ue=dr(ge[de]);return new C("Invalid "+pe+" `"+se+"` of type "+("`"+ue+"` supplied to `"+ce+"`, expected ")+("instance of `"+le+"`."))}return null}return O(V)}function W(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),u;function V(ge,de,ce,pe,se){for(var le=ge[de],ue=0;ue<H.length;ue++)if(T(le,H[ue]))return null;var ve=JSON.stringify(H,function(J,Y){var Qe=Ge(Y);return Qe==="symbol"?String(Y):Y});return new C("Invalid "+pe+" `"+se+"` of value `"+String(le)+"` "+("supplied to `"+ce+"`, expected one of "+ve+"."))}return O(V)}function q(H){function V(ge,de,ce,pe,se){if(typeof H!="function")return new C("Property `"+se+"` of component `"+ce+"` has invalid PropType notation inside objectOf.");var le=ge[de],ue=rt(le);if(ue!=="object")return new C("Invalid "+pe+" `"+se+"` of type "+("`"+ue+"` supplied to `"+ce+"`, expected an object."));for(var ve in le)if(a(le,ve)){var me=H(le,ve,ce,pe,se+"."+ve,t);if(me instanceof Error)return me}return null}return O(V)}function ee(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var V=0;V<H.length;V++){var ge=H[V];if(typeof ge!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ct(ge)+" at index "+V+"."),u}function de(ce,pe,se,le,ue){for(var ve=[],me=0;me<H.length;me++){var J=H[me],Y=J(ce,pe,se,le,ue,t);if(Y==null)return null;Y.data&&a(Y.data,"expectedType")&&ve.push(Y.data.expectedType)}var Qe=ve.length>0?", expected one of type ["+ve.join(", ")+"]":"";return new C("Invalid "+le+" `"+ue+"` supplied to "+("`"+se+"`"+Qe+"."))}return O(de)}function De(){function H(V,ge,de,ce,pe){return ke(V[ge])?null:new C("Invalid "+ce+" `"+pe+"` supplied to "+("`"+de+"`, expected a ReactNode."))}return O(H)}function Ee(H,V,ge,de,ce){return new C((H||"React class")+": "+V+" type `"+ge+"."+de+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ce+"`.")}function We(H){function V(ge,de,ce,pe,se){var le=ge[de],ue=rt(le);if(ue!=="object")return new C("Invalid "+pe+" `"+se+"` of type `"+ue+"` "+("supplied to `"+ce+"`, expected `object`."));for(var ve in H){var me=H[ve];if(typeof me!="function")return Ee(ce,pe,se,ve,Ge(me));var J=me(le,ve,ce,pe,se+"."+ve,t);if(J)return J}return null}return O(V)}function X(H){function V(ge,de,ce,pe,se){var le=ge[de],ue=rt(le);if(ue!=="object")return new C("Invalid "+pe+" `"+se+"` of type `"+ue+"` "+("supplied to `"+ce+"`, expected `object`."));var ve=r({},ge[de],H);for(var me in ve){var J=H[me];if(a(H,me)&&typeof J!="function")return Ee(ce,pe,se,me,Ge(J));if(!J)return new C("Invalid "+pe+" `"+se+"` key `"+me+"` supplied to `"+ce+"`.\nBad object: "+JSON.stringify(ge[de],null," ")+`
|
|
71
|
-
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var Y=J(le,me,ce,pe,se+"."+me,t);if(Y)return Y}return null}return O(V)}function ke(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every(ke);if(H===null||l(H))return!0;var V=y(H);if(V){var ge=V.call(H),de;if(V!==H.entries){for(;!(de=ge.next()).done;)if(!ke(de.value))return!1}else for(;!(de=ge.next()).done;){var ce=de.value;if(ce&&!ke(ce[1]))return!1}}else return!1;return!0;default:return!1}}function ft(H,V){return H==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function rt(H){var V=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":ft(V,H)?"symbol":V}function Ge(H){if(typeof H>"u"||H===null)return""+H;var V=rt(H);if(V==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return V}function ct(H){var V=Ge(H);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function dr(H){return!H.constructor||!H.constructor.name?_:H.constructor.name}return E.checkPropTypes=s,E.resetWarningCache=s.resetWarningCache,E.PropTypes=E,E},$c}var Lc,Bp;function wA(){if(Bp)return Lc;Bp=1;var e=Uu();function r(){}function t(){}return t.resetWarningCache=r,Lc=function(){function a(u,l,f,p,h,y){if(y!==e){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}a.isRequired=a;function s(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:s,element:a,elementType:a,instanceOf:s,node:a,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:r};return i.PropTypes=i,i},Lc}if(process.env.NODE_ENV!=="production"){var CA=Wu,xA=!0;fu.exports=TA()(CA.isElement,xA)}else fu.exports=wA()();var OA=fu.exports;const Hn=Os(OA);var $r=lt.createContext(null);process.env.NODE_ENV!=="production"&&($r.displayName="ReactRedux");function AA(e){e()}var dg=AA,RA=function(r){return dg=r},DA=function(){return dg};function PA(){var e=DA(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var s=r;s;)s.callback(),s=s.next})},get:function(){for(var s=[],i=r;i;)s.push(i),i=i.next;return s},subscribe:function(s){var i=!0,u=t={callback:s,next:null,prev:t};return u.prev?u.prev.next=u:r=u,function(){!i||r===null||(i=!1,u.next?u.next.prev=u.prev:t=u.prev,u.prev?u.prev.next=u.next:r=u.next)}}}}var Wp={notify:function(){},get:function(){return[]}};function pg(e,r){var t,a=Wp;function s(y){return f(),a.subscribe(y)}function i(){a.notify()}function u(){h.onStateChange&&h.onStateChange()}function l(){return!!t}function f(){t||(t=r?r.addNestedSub(u):e.subscribe(u),a=PA())}function p(){t&&(t(),t=void 0,a.clear(),a=Wp)}var h={addNestedSub:s,notifyNestedSubs:i,handleChangeWrapper:u,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:function(){return a}};return h}var pu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?lt.useLayoutEffect:lt.useEffect;function hg(e){var r=e.store,t=e.context,a=e.children,s=lt.useMemo(function(){var l=pg(r);return{store:r,subscription:l}},[r]),i=lt.useMemo(function(){return r.getState()},[r]);pu(function(){var l=s.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==r.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[s,i]);var u=t||$r;return lt.createElement(u.Provider,{value:s},a)}process.env.NODE_ENV!=="production"&&(hg.propTypes={store:Hn.shape({subscribe:Hn.func.isRequired,dispatch:Hn.func.isRequired,getState:Hn.func.isRequired}),context:Hn.object,children:Hn.any});var gg=Wu,FA={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},IA={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vg={};vg[gg.ForwardRef]=FA;vg[gg.Memo]=IA;var je={};/** @license React v17.0.2
|
|
72
|
-
* react-is.production.min.js
|
|
73
|
-
*
|
|
74
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the MIT license found in the
|
|
77
|
-
* LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/var Hp;function MA(){if(Hp)return je;Hp=1;var e=60103,r=60106,t=60107,a=60108,s=60114,i=60109,u=60110,l=60112,f=60113,p=60120,h=60115,y=60116,_=60121,E=60122,T=60117,C=60129,O=60131;if(typeof Symbol=="function"&&Symbol.for){var D=Symbol.for;e=D("react.element"),r=D("react.portal"),t=D("react.fragment"),a=D("react.strict_mode"),s=D("react.profiler"),i=D("react.provider"),u=D("react.context"),l=D("react.forward_ref"),f=D("react.suspense"),p=D("react.suspense_list"),h=D("react.memo"),y=D("react.lazy"),_=D("react.block"),E=D("react.server.block"),T=D("react.fundamental"),C=D("react.debug_trace_mode"),O=D("react.legacy_hidden")}function F(X){if(typeof X=="object"&&X!==null){var ke=X.$$typeof;switch(ke){case e:switch(X=X.type,X){case t:case s:case a:case f:case p:return X;default:switch(X=X&&X.$$typeof,X){case u:case l:case y:case h:case i:return X;default:return ke}}case r:return ke}}}var M=i,L=e,I=l,G=t,W=y,q=h,ee=r,De=s,Ee=a,We=f;return je.ContextConsumer=u,je.ContextProvider=M,je.Element=L,je.ForwardRef=I,je.Fragment=G,je.Lazy=W,je.Memo=q,je.Portal=ee,je.Profiler=De,je.StrictMode=Ee,je.Suspense=We,je.isAsyncMode=function(){return!1},je.isConcurrentMode=function(){return!1},je.isContextConsumer=function(X){return F(X)===u},je.isContextProvider=function(X){return F(X)===i},je.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===e},je.isForwardRef=function(X){return F(X)===l},je.isFragment=function(X){return F(X)===t},je.isLazy=function(X){return F(X)===y},je.isMemo=function(X){return F(X)===h},je.isPortal=function(X){return F(X)===r},je.isProfiler=function(X){return F(X)===s},je.isStrictMode=function(X){return F(X)===a},je.isSuspense=function(X){return F(X)===f},je.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===t||X===s||X===C||X===a||X===f||X===p||X===O||typeof X=="object"&&X!==null&&(X.$$typeof===y||X.$$typeof===h||X.$$typeof===i||X.$$typeof===u||X.$$typeof===l||X.$$typeof===T||X.$$typeof===_||X[0]===E)},je.typeOf=F,je}var Be={};/** @license React v17.0.2
|
|
79
|
-
* react-is.development.js
|
|
80
|
-
*
|
|
81
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the MIT license found in the
|
|
84
|
-
* LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/var Up;function $A(){return Up||(Up=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,r=60106,t=60107,a=60108,s=60114,i=60109,u=60110,l=60112,f=60113,p=60120,h=60115,y=60116,_=60121,E=60122,T=60117,C=60129,O=60131;if(typeof Symbol=="function"&&Symbol.for){var D=Symbol.for;e=D("react.element"),r=D("react.portal"),t=D("react.fragment"),a=D("react.strict_mode"),s=D("react.profiler"),i=D("react.provider"),u=D("react.context"),l=D("react.forward_ref"),f=D("react.suspense"),p=D("react.suspense_list"),h=D("react.memo"),y=D("react.lazy"),_=D("react.block"),E=D("react.server.block"),T=D("react.fundamental"),D("react.scope"),D("react.opaque.id"),C=D("react.debug_trace_mode"),D("react.offscreen"),O=D("react.legacy_hidden")}var F=!1;function M(J){return!!(typeof J=="string"||typeof J=="function"||J===t||J===s||J===C||J===a||J===f||J===p||J===O||F||typeof J=="object"&&J!==null&&(J.$$typeof===y||J.$$typeof===h||J.$$typeof===i||J.$$typeof===u||J.$$typeof===l||J.$$typeof===T||J.$$typeof===_||J[0]===E))}function L(J){if(typeof J=="object"&&J!==null){var Y=J.$$typeof;switch(Y){case e:var Qe=J.type;switch(Qe){case t:case s:case a:case f:case p:return Qe;default:var Ze=Qe&&Qe.$$typeof;switch(Ze){case u:case l:case y:case h:case i:return Ze;default:return Y}}case r:return Y}}}var I=u,G=i,W=e,q=l,ee=t,De=y,Ee=h,We=r,X=s,ke=a,ft=f,rt=!1,Ge=!1;function ct(J){return rt||(rt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function dr(J){return Ge||(Ge=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(J){return L(J)===u}function V(J){return L(J)===i}function ge(J){return typeof J=="object"&&J!==null&&J.$$typeof===e}function de(J){return L(J)===l}function ce(J){return L(J)===t}function pe(J){return L(J)===y}function se(J){return L(J)===h}function le(J){return L(J)===r}function ue(J){return L(J)===s}function ve(J){return L(J)===a}function me(J){return L(J)===f}Be.ContextConsumer=I,Be.ContextProvider=G,Be.Element=W,Be.ForwardRef=q,Be.Fragment=ee,Be.Lazy=De,Be.Memo=Ee,Be.Portal=We,Be.Profiler=X,Be.StrictMode=ke,Be.Suspense=ft,Be.isAsyncMode=ct,Be.isConcurrentMode=dr,Be.isContextConsumer=H,Be.isContextProvider=V,Be.isElement=ge,Be.isForwardRef=de,Be.isFragment=ce,Be.isLazy=pe,Be.isMemo=se,Be.isPortal=le,Be.isProfiler=ue,Be.isStrictMode=ve,Be.isSuspense=me,Be.isValidElementType=M,Be.typeOf=L}()),Be}process.env.NODE_ENV==="production"?MA():$A();function qp(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function mg(e,r){if(qp(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var t=Object.keys(e),a=Object.keys(r);if(t.length!==a.length)return!1;for(var s=0;s<t.length;s++)if(!Object.prototype.hasOwnProperty.call(r,t[s])||!qp(e[t[s]],r[t[s]]))return!1;return!0}function yg(){var e=lt.useContext($r);if(process.env.NODE_ENV!=="production"&&!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return e}function bg(e){e===void 0&&(e=$r);var r=e===$r?yg:function(){return lt.useContext(e)};return function(){var a=r(),s=a.store;return s}}var LA=bg();function NA(e){e===void 0&&(e=$r);var r=e===$r?LA:bg(e);return function(){var a=r();return a.dispatch}}var kA=NA(),jA=function(r,t){return r===t};function BA(e,r,t,a){var s=lt.useReducer(function(T){return T+1},0),i=s[1],u=lt.useMemo(function(){return pg(t,a)},[t,a]),l=lt.useRef(),f=lt.useRef(),p=lt.useRef(),h=lt.useRef(),y=t.getState(),_;try{if(e!==f.current||y!==p.current||l.current){var E=e(y);h.current===void 0||!r(E,h.current)?_=E:_=h.current}else _=h.current}catch(T){throw l.current&&(T.message+=`
|
|
139
|
+
*/var ay;function k2(){return ay||(ay=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,r=60107,n=60108,a=60114,o=60109,u=60110,c=60112,f=60113,d=60120,p=60115,m=60116,g=60121,y=60122,E=60117,S=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;e=C("react.element"),t=C("react.portal"),r=C("react.fragment"),n=C("react.strict_mode"),a=C("react.profiler"),o=C("react.provider"),u=C("react.context"),c=C("react.forward_ref"),f=C("react.suspense"),d=C("react.suspense_list"),p=C("react.memo"),m=C("react.lazy"),g=C("react.block"),y=C("react.server.block"),E=C("react.fundamental"),C("react.scope"),C("react.opaque.id"),S=C("react.debug_trace_mode"),C("react.offscreen"),T=C("react.legacy_hidden")}var A=!1;function P(V){return!!(typeof V=="string"||typeof V=="function"||V===r||V===a||V===S||V===n||V===f||V===d||V===T||A||typeof V=="object"&&V!==null&&(V.$$typeof===m||V.$$typeof===p||V.$$typeof===o||V.$$typeof===u||V.$$typeof===c||V.$$typeof===E||V.$$typeof===g||V[0]===y))}function $(V){if(typeof V=="object"&&V!==null){var F=V.$$typeof;switch(F){case e:var at=V.type;switch(at){case r:case a:case n:case f:case d:return at;default:var Ze=at&&at.$$typeof;switch(Ze){case u:case c:case m:case p:case o:return Ze;default:return F}}case t:return F}}}var _=u,M=o,W=e,G=c,Q=r,we=m,Oe=p,Ke=t,X=a,xt=n,dn=f,Pt=!1,lt=!1;function St(V){return Pt||(Pt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function pn(V){return lt||(lt=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(V){return $(V)===u}function q(V){return $(V)===o}function me(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function de(V){return $(V)===c}function se(V){return $(V)===r}function le(V){return $(V)===m}function ue(V){return $(V)===p}function pe(V){return $(V)===t}function he(V){return $(V)===a}function ye(V){return $(V)===n}function Ee(V){return $(V)===f}Ue.ContextConsumer=_,Ue.ContextProvider=M,Ue.Element=W,Ue.ForwardRef=G,Ue.Fragment=Q,Ue.Lazy=we,Ue.Memo=Oe,Ue.Portal=Ke,Ue.Profiler=X,Ue.StrictMode=xt,Ue.Suspense=dn,Ue.isAsyncMode=St,Ue.isConcurrentMode=pn,Ue.isContextConsumer=H,Ue.isContextProvider=q,Ue.isElement=me,Ue.isForwardRef=de,Ue.isFragment=se,Ue.isLazy=le,Ue.isMemo=ue,Ue.isPortal=pe,Ue.isProfiler=he,Ue.isStrictMode=ye,Ue.isSuspense=Ee,Ue.isValidElementType=P,Ue.typeOf=$}()),Ue}process.env.NODE_ENV==="production"?L2():k2();function iy(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function qb(e,t){if(iy(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(t,r[a])||!iy(e[r[a]],t[r[a]]))return!1;return!0}function Yb(){var e=Y.useContext($n);if(process.env.NODE_ENV!=="production"&&!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return e}function Kb(e){e===void 0&&(e=$n);var t=e===$n?Yb:function(){return Y.useContext(e)};return function(){var n=t(),a=n.store;return a}}var j2=Kb();function W2(e){e===void 0&&(e=$n);var t=e===$n?j2:Kb(e);return function(){var n=t();return n.dispatch}}var B2=W2(),z2=function(t,r){return t===r};function H2(e,t,r,n){var a=Y.useReducer(function(E){return E+1},0),o=a[1],u=Y.useMemo(function(){return Ub(r,n)},[r,n]),c=Y.useRef(),f=Y.useRef(),d=Y.useRef(),p=Y.useRef(),m=r.getState(),g;try{if(e!==f.current||m!==d.current||c.current){var y=e(m);p.current===void 0||!t(y,p.current)?g=y:g=p.current}else g=p.current}catch(E){throw c.current&&(E.message+=`
|
|
86
140
|
The error may be correlated with this previous error:
|
|
87
|
-
`+
|
|
141
|
+
`+c.current.stack+`
|
|
88
142
|
|
|
89
|
-
`),T}return pu(function(){f.current=e,p.current=y,h.current=_,l.current=void 0}),pu(function(){function T(){try{var C=t.getState();if(C===p.current)return;var O=f.current(C);if(r(O,h.current))return;h.current=O,p.current=C}catch(D){l.current=D}i()}return u.onStateChange=T,u.trySubscribe(),T(),function(){return u.tryUnsubscribe()}},[t,u]),_}function WA(e){e===void 0&&(e=$r);var r=e===$r?yg:function(){return lt.useContext(e)};return function(a,s){if(s===void 0&&(s=jA),process.env.NODE_ENV!=="production"){if(!a)throw new Error("You must pass a selector to useSelector");if(typeof a!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}var i=r(),u=i.store,l=i.subscription,f=BA(a,s,u,l);return lt.useDebugValue(f),f}}var HA=WA();RA(gT.unstable_batchedUpdates);const UA=()=>kA(),br=HA,Ns=j(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),qA=j(e=>e,({catalog:e})=>e.state),_g=j(Ns,e=>e?e.dataClasses:[]),GA=j(Ns,e=>e?e.singletons:[]),YA=j(_g,e=>Object.values(e).filter(({virtual:r})=>r)),VA=j(Ns,e=>e?e.methods:[]),Eg=e=>j(r=>r,r=>{switch(r.catalog.state){case"loaded":const t=e?r.catalog.model.dataClasses[e]:r.catalog.model;return(t==null?void 0:t.methods)||[];default:return[]}}),zA=e=>br(Eg(e),mg),KA=(e,r)=>j(Eg(e),t=>t.find(a=>`${a.applyTo}.${a.name}`===r)),JA=(e,r,t)=>br(KA(e,`${t}.${r}`),mg),Sg=j(e=>e,e=>e),XA=e=>j(Lr,r=>{var s;const t=r.tabs.find(({path:i})=>i===e),a=t==null?void 0:t.content.components;return!t||!a?[]:(s=Object.keys(a))==null?void 0:s.map(i=>({id:i,...a[i]}))}),Tg=e=>j(Lr,r=>{var a,s;const t=r.tabs.find(({path:i})=>i===e);return((s=(a=t==null?void 0:t.content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]}),QA=(e,r,t)=>j(Sg,a=>{var s,i;if(r){const u=a.sharedDatasources.sources[r];return u?u.find(l=>l.id===e):void 0}else{const u=a.root.tabs.find(f=>f.path===t);return u?(i=(s=u.content.metadata)==null?void 0:s.datasources)==null?void 0:i.find(f=>f.id===e):void 0}}),wg=j(e=>e,e=>{var r;return((r=e.sharedDatasources)==null?void 0:r.sources)||[]}),ZA=(e,r,t,a)=>j(Tg(e),wg,(s,i)=>{const u=Ce.flatten(Ce.values(i)),l=[...r!=="private"?s:[],...r!=="shared"?u:[]];return t?l.filter(f=>(!a||a.every(({id:p,namespace:h=""})=>f.id!==p||(f.namespace||"")!==h))&&(t.includes(f.type)||f.dataType&&(t.includes(f.dataType)||t.includes("objectFromArray")&&f.dataType==="object"&&f.from))):l}),eR=j(e=>e.debugger,e=>e.meta),Cn=j(e=>e.debugger,e=>e.list),Rt=j(e=>e.debugger,e=>e.sessions),tR=j(Rt,e=>e.length),wn=(e,r,t,a)=>e.find(s=>s.filePath===r&&s.methodName===t&&(!a||s.className===a)),at=(e,r)=>e.find(t=>t.threadId===r),Cg=(e,r)=>e.find(t=>t.tabPath===r),rR=(e,r)=>j(Cn,t=>{var a;return((a=wn(t,e,r))==null?void 0:a.breakpoints.saved.locations)||[]}),nR=(e,r)=>j(Cn,t=>{var a;return((a=wn(t,e,r))==null?void 0:a.breakpoints.draft.locations)||[]}),aR=e=>j(Cn,r=>r.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.saved.locations.map(s=>({...s,line:s.line+(a.breakpoints.saved.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),oR=e=>j(Cn,r=>r.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.draft.locations.map(s=>({...s,line:s.line+(a.breakpoints.draft.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),sR=e=>j(Rt,r=>{const t=at(r,e);return t!=null&&t.stopped?t.highlightedLines:null}),iR=e=>j(Rt,r=>{const t=at(r,e);return t!=null&&t.stopped?t.activeLine:null}),cR=e=>j(Rt,r=>{var t;return((t=at(r,e))==null?void 0:t.expressions)||[]}),uR=e=>j(Rt,r=>{var t;return((t=at(r,e))==null?void 0:t.stopped)||!1}),lR=(e,r)=>j(Cn,t=>{var a;return(a=wn(t,e,r))==null?void 0:a.source}),fR=e=>j(Rt,r=>{var t;return((t=Cg(r,e))==null?void 0:t.threadId)||-1}),dR=e=>j(Rt,r=>{var t,a;return(a=(t=at(r,e))==null?void 0:t.currentStackFrame)==null?void 0:a.source}),pR=e=>j(Rt,r=>{var t;return(t=at(r,e))==null?void 0:t.currentStackFrame}),hR=j(Rt,e=>e.map(({channelId:r,threadId:t})=>({id:r,threadId:t}))),gR=e=>j(Rt,r=>{var t;return((t=at(r,e))==null?void 0:t.stackFrames)||[]}),vR=e=>j(Rt,r=>{var t,a;return((a=(t=at(r,e))==null?void 0:t.variables)==null?void 0:a.callchain)||[]}),mR=e=>j(Rt,r=>{var t,a;return((a=(t=at(r,e))==null?void 0:t.variables)==null?void 0:a.expressions)||[]}),yR=(e,r="saved")=>j(Cn,t=>{const a=t.find(s=>s.filePath===e);return(a==null?void 0:a.breakpoints[r].offset)||0}),bR=(e,r,t,a)=>j(Rt,s=>{var p;const i=((p=at(s,e))==null?void 0:p.exceptions)||[],u=r===v.FileFolderType.CLASS,l=u&&a?`${a}.${t}`:t;return(l?i.filter(h=>h.location===l):i).map(h=>({...h,locationLine:u?h.locationLine:h.locationLine+1}))}),Lr=j(e=>e.root,e=>e),oa=j(Lr,e=>e.tabs),_R=j(Lr,e=>e.activeTab),ER=j(Lr,e=>e.recent.filter(({type:r})=>r!==v.FileFolderType.DEBUGGER)),xg=j(Lr,({tabs:e,activeTab:r})=>e.find(({path:t})=>t===r)),SR=j(Lr,({tabs:e})=>e.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null)),TR=j(oa,e=>e.filter(({type:r,flags:t})=>r===v.FileFolderType.WEBFORM&&t.enabled===!1).map(({path:r})=>r)),wR=j(oa,e=>e.length>0),Nr=e=>j(Lr,r=>r.tabs.find(({path:t})=>t===e)),Og=(e,r="")=>j(Nr(e),t=>!t||!t.content||typeof t.content=="string"?t==null?void 0:t.content:Ce.get(t.content,r)),CR=e=>j(Nr(e),r=>r==null?void 0:r.extra),xR=(e,r=t=>t)=>j(Og(e,"components"),t=>r(t||{})),qu=j(oa,e=>e.filter(r=>r.flags.touched)),OR=j(qu,e=>e.length),AR=j(Rt,e=>e.map(({threadId:r,currentStackFrame:{source:t},tabPath:a})=>({name:Wh(r,t),path:a,type:v.FileFolderType.DEBUGGER,content:t==null?void 0:t.content,flags:{},extra:{source:t}}))),RR=j(e=>e,e=>e.explorer||[]),Ag=j(e=>e,e=>e.explorer.find(r=>r.path===v.FolderRootPath.WEBFORMS)),Rg=j(e=>e,e=>e.explorer.find(r=>r.path===v.FolderRootPath.METHODS)),Dg=j(e=>e,e=>e.explorer.find(r=>r.path===v.FolderRootPath.CLASSES)),DR=j(Rg,e=>(e==null?void 0:e.children)||[]),PR=j(Ag,e=>{var r;return((r=e==null?void 0:e.children)==null?void 0:r.filter(t=>t.ext==="WebForm"))||[]}),FR=j(Dg,e=>(e==null?void 0:e.children)||[]),IR=j(e=>e.modals,e=>e.list),MR=j(e=>e.roles,e=>qs(e)),$R=j(e=>e.roles,({roles:e})=>e),LR=j(e=>e.roles,({privileges:e})=>e),NR=j(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:r})=>r==="guest")),kR=j(e=>e.roles,({flags:e})=>e),jR=j(e=>e.roles,({selectedTab:e})=>e),BR=j(e=>e.roles,({forceLogin:e})=>e),WR=j(e=>e.roles,({date:e})=>e),sa=j(e=>e.settings,e=>e.session),HR=(...e)=>j(sa,r=>e.length>0?Ce.pick(r,e):r),UR=e=>j(sa,r=>r[e]),qR=e=>j(sa,r=>["states"].includes(e)?!0:!!r[`features.experimental.${e}`]),Pg=j(e=>e.settings,e=>e.project),GR=j(e=>e.settings,e=>e),Gu=j(e=>e.settings,e=>e.server),YR=j(Gu,e=>e.remoteDebuggerMode),VR=j(Gu,e=>e.qodly),zR=j(sa,e=>e["monaco.zoom"]),KR=j(Pg,e=>e["webforms.i18n"]),JR=j(sa,e=>e["webforms.i18n.current"]),Fg=["rounded-full","rounded-lg","border-gray-400","border-2","bg-red-500","bg-blue-500","bg-indigo-500","bg-transparent","bg-primary-dark","bg-green-500","bg-yellow-400","text-gray-500","text-4xl","text-white","px-4","py-2","primary","info","secondary","success","warning","danger","w-10","w-20","w-40","w-60","w-80","mb-2","mb-3","shadow","shadow-lg","shadow-xl","shadow-2xl"],Ig=Fg.map(e=>({id:Ru(),content:"",name:e,parentId:null,scope:v.EWebFormStyleClassScope.THEME})),Yu=e=>j(Nr(e),r=>{var t,a;return((a=(t=r==null?void 0:r.content)==null?void 0:t.metadata)==null?void 0:a.styles)||[]}),XR=(e,r)=>j(Yu(e),t=>r.map(a=>{switch(!0){case a===v.EWebFormStyleClassScope.LOCAL:return t.map(s=>({...s,scope:v.EWebFormStyleClassScope.LOCAL}));case a===v.EWebFormStyleClassScope.THEME:return Ig;default:return[]}}).flat()),QR=e=>j(Yu(e),r=>[...r.map(t=>({...t,scope:v.EWebFormStyleClassScope.LOCAL})),...Ig]),ZR=j(e=>e,e=>{var r;return[...(((r=e.sharedCSS)==null?void 0:r.styles)||[]).map(t=>({...t,scope:v.EWebFormStyleClassScope.SHARED}))]}),eD=e=>j(Nr(e),r=>r==null?void 0:r.flags),tD=e=>j(Nr(e),r=>r==null?void 0:r.history),rD=j(xg,e=>{const r=e!=null&&e.history?e.history.active>0:!1,t=e!=null&&e.history?e.history.active<e.history.stack.length-1:!1;return{canUndo:r,canRedo:t}}),za=j(e=>e.webforms,e=>e),Mg=j(za,e=>(e==null?void 0:e.components)||[]),ks=j(za,e=>e.inspector),nD=j(ks,e=>e.css),aD=j(ks,e=>e.datasource),$g=j(za,e=>e.templates||{data:[]}),oD=j($g,e=>e.data||[]),sD=e=>j(Mg,r=>r.find(t=>t.id===e)),iD=e=>j(ks,r=>r[e]),cD=j(za,e=>e.datasources.theme),uD=j(e=>e.root,e=>e.clipboard),lD=j(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,r,t)=>[e.state,r.state,t.state].every(a=>["loaded","error"].includes(a))),fD=e=>j(r=>r.root,r=>{var a;const t=r.tabs.find(({path:s})=>s===e);return((a=t==null?void 0:t.content)==null?void 0:a.metadata)||{}}),Qn={label:"Base",id:"root"},Vu=e=>e.id===Qn.id,Lg=(e,r=[])=>j(Nr(e),t=>{var i,u;let s=((u=(i=t==null?void 0:t.content)==null?void 0:i.metadata)==null?void 0:u.states)||[Qn];return s.find(Vu)||(s=[Qn,...s]),s.filter(({id:l})=>!r.includes(l))}),dD=(e,r=[])=>j(Lg(e,r),t=>t.map(({label:a})=>a)),pD=e=>j(Nr(e),r=>{var t,a;return((a=(t=r==null?void 0:r.content)==null?void 0:t.metadata)==null?void 0:a.defaultStates)||[]}),hD=e=>j(Nr(e),r=>{var a,s,i,u;const{currentState:t}=((a=r==null?void 0:r.content)==null?void 0:a.metadata)||{};return((u=(i=(s=r==null?void 0:r.content)==null?void 0:s.metadata)==null?void 0:i.states)==null?void 0:u.find(l=>l.id===t))||Qn}),gD=j(e=>e,e=>{var r;return((r=e.savedConditions)==null?void 0:r.conditions)||[]});var zu=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(zu||{}),Ku=(e=>(e.NONE="none",e.SAVE_ALL_AND_PROCEED="saved_all_and_proceed",e.PROCEED="proceed",e))(Ku||{}),Ju=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Ju||{}),Xo,vD=new Uint8Array(16);function Ng(){if(!Xo&&(Xo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Xo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xo(vD)}const mD=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function js(e){return typeof e=="string"&&mD.test(e)}var gt=[];for(var Nc=0;Nc<256;++Nc)gt.push((Nc+256).toString(16).substr(1));function Bs(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(gt[e[r+0]]+gt[e[r+1]]+gt[e[r+2]]+gt[e[r+3]]+"-"+gt[e[r+4]]+gt[e[r+5]]+"-"+gt[e[r+6]]+gt[e[r+7]]+"-"+gt[e[r+8]]+gt[e[r+9]]+"-"+gt[e[r+10]]+gt[e[r+11]]+gt[e[r+12]]+gt[e[r+13]]+gt[e[r+14]]+gt[e[r+15]]).toLowerCase();if(!js(t))throw TypeError("Stringified UUID is invalid");return t}var Gp,kc,jc=0,Bc=0;function yD(e,r,t){var a=r&&t||0,s=r||new Array(16);e=e||{};var i=e.node||Gp,u=e.clockseq!==void 0?e.clockseq:kc;if(i==null||u==null){var l=e.random||(e.rng||Ng)();i==null&&(i=Gp=[l[0]|1,l[1],l[2],l[3],l[4],l[5]]),u==null&&(u=kc=(l[6]<<8|l[7])&16383)}var f=e.msecs!==void 0?e.msecs:Date.now(),p=e.nsecs!==void 0?e.nsecs:Bc+1,h=f-jc+(p-Bc)/1e4;if(h<0&&e.clockseq===void 0&&(u=u+1&16383),(h<0||f>jc)&&e.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");jc=f,Bc=p,kc=u,f+=122192928e5;var y=((f&268435455)*1e4+p)%4294967296;s[a++]=y>>>24&255,s[a++]=y>>>16&255,s[a++]=y>>>8&255,s[a++]=y&255;var _=f/4294967296*1e4&268435455;s[a++]=_>>>8&255,s[a++]=_&255,s[a++]=_>>>24&15|16,s[a++]=_>>>16&255,s[a++]=u>>>8|128,s[a++]=u&255;for(var E=0;E<6;++E)s[a+E]=i[E];return r||Bs(s)}function kg(e){if(!js(e))throw TypeError("Invalid UUID");var r,t=new Uint8Array(16);return t[0]=(r=parseInt(e.slice(0,8),16))>>>24,t[1]=r>>>16&255,t[2]=r>>>8&255,t[3]=r&255,t[4]=(r=parseInt(e.slice(9,13),16))>>>8,t[5]=r&255,t[6]=(r=parseInt(e.slice(14,18),16))>>>8,t[7]=r&255,t[8]=(r=parseInt(e.slice(19,23),16))>>>8,t[9]=r&255,t[10]=(r=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=r/4294967296&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255,t}function bD(e){e=unescape(encodeURIComponent(e));for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}var _D="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ED="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function jg(e,r,t){function a(s,i,u,l){if(typeof s=="string"&&(s=bD(s)),typeof i=="string"&&(i=kg(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var f=new Uint8Array(16+s.length);if(f.set(i),f.set(s,i.length),f=t(f),f[6]=f[6]&15|r,f[8]=f[8]&63|128,u){l=l||0;for(var p=0;p<16;++p)u[l+p]=f[p];return u}return Bs(f)}try{a.name=e}catch{}return a.DNS=_D,a.URL=ED,a}function SD(e){if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=new Uint8Array(r.length);for(var t=0;t<r.length;++t)e[t]=r.charCodeAt(t)}return TD(wD(CD(e),e.length*8))}function TD(e){for(var r=[],t=e.length*32,a="0123456789abcdef",s=0;s<t;s+=8){var i=e[s>>5]>>>s%32&255,u=parseInt(a.charAt(i>>>4&15)+a.charAt(i&15),16);r.push(u)}return r}function Bg(e){return(e+64>>>9<<4)+14+1}function wD(e,r){e[r>>5]|=128<<r%32,e[Bg(r)-1]=r;for(var t=1732584193,a=-271733879,s=-1732584194,i=271733878,u=0;u<e.length;u+=16){var l=t,f=a,p=s,h=i;t=yt(t,a,s,i,e[u],7,-680876936),i=yt(i,t,a,s,e[u+1],12,-389564586),s=yt(s,i,t,a,e[u+2],17,606105819),a=yt(a,s,i,t,e[u+3],22,-1044525330),t=yt(t,a,s,i,e[u+4],7,-176418897),i=yt(i,t,a,s,e[u+5],12,1200080426),s=yt(s,i,t,a,e[u+6],17,-1473231341),a=yt(a,s,i,t,e[u+7],22,-45705983),t=yt(t,a,s,i,e[u+8],7,1770035416),i=yt(i,t,a,s,e[u+9],12,-1958414417),s=yt(s,i,t,a,e[u+10],17,-42063),a=yt(a,s,i,t,e[u+11],22,-1990404162),t=yt(t,a,s,i,e[u+12],7,1804603682),i=yt(i,t,a,s,e[u+13],12,-40341101),s=yt(s,i,t,a,e[u+14],17,-1502002290),a=yt(a,s,i,t,e[u+15],22,1236535329),t=bt(t,a,s,i,e[u+1],5,-165796510),i=bt(i,t,a,s,e[u+6],9,-1069501632),s=bt(s,i,t,a,e[u+11],14,643717713),a=bt(a,s,i,t,e[u],20,-373897302),t=bt(t,a,s,i,e[u+5],5,-701558691),i=bt(i,t,a,s,e[u+10],9,38016083),s=bt(s,i,t,a,e[u+15],14,-660478335),a=bt(a,s,i,t,e[u+4],20,-405537848),t=bt(t,a,s,i,e[u+9],5,568446438),i=bt(i,t,a,s,e[u+14],9,-1019803690),s=bt(s,i,t,a,e[u+3],14,-187363961),a=bt(a,s,i,t,e[u+8],20,1163531501),t=bt(t,a,s,i,e[u+13],5,-1444681467),i=bt(i,t,a,s,e[u+2],9,-51403784),s=bt(s,i,t,a,e[u+7],14,1735328473),a=bt(a,s,i,t,e[u+12],20,-1926607734),t=_t(t,a,s,i,e[u+5],4,-378558),i=_t(i,t,a,s,e[u+8],11,-2022574463),s=_t(s,i,t,a,e[u+11],16,1839030562),a=_t(a,s,i,t,e[u+14],23,-35309556),t=_t(t,a,s,i,e[u+1],4,-1530992060),i=_t(i,t,a,s,e[u+4],11,1272893353),s=_t(s,i,t,a,e[u+7],16,-155497632),a=_t(a,s,i,t,e[u+10],23,-1094730640),t=_t(t,a,s,i,e[u+13],4,681279174),i=_t(i,t,a,s,e[u],11,-358537222),s=_t(s,i,t,a,e[u+3],16,-722521979),a=_t(a,s,i,t,e[u+6],23,76029189),t=_t(t,a,s,i,e[u+9],4,-640364487),i=_t(i,t,a,s,e[u+12],11,-421815835),s=_t(s,i,t,a,e[u+15],16,530742520),a=_t(a,s,i,t,e[u+2],23,-995338651),t=Et(t,a,s,i,e[u],6,-198630844),i=Et(i,t,a,s,e[u+7],10,1126891415),s=Et(s,i,t,a,e[u+14],15,-1416354905),a=Et(a,s,i,t,e[u+5],21,-57434055),t=Et(t,a,s,i,e[u+12],6,1700485571),i=Et(i,t,a,s,e[u+3],10,-1894986606),s=Et(s,i,t,a,e[u+10],15,-1051523),a=Et(a,s,i,t,e[u+1],21,-2054922799),t=Et(t,a,s,i,e[u+8],6,1873313359),i=Et(i,t,a,s,e[u+15],10,-30611744),s=Et(s,i,t,a,e[u+6],15,-1560198380),a=Et(a,s,i,t,e[u+13],21,1309151649),t=Et(t,a,s,i,e[u+4],6,-145523070),i=Et(i,t,a,s,e[u+11],10,-1120210379),s=Et(s,i,t,a,e[u+2],15,718787259),a=Et(a,s,i,t,e[u+9],21,-343485551),t=Xr(t,l),a=Xr(a,f),s=Xr(s,p),i=Xr(i,h)}return[t,a,s,i]}function CD(e){if(e.length===0)return[];for(var r=e.length*8,t=new Uint32Array(Bg(r)),a=0;a<r;a+=8)t[a>>5]|=(e[a/8]&255)<<a%32;return t}function Xr(e,r){var t=(e&65535)+(r&65535),a=(e>>16)+(r>>16)+(t>>16);return a<<16|t&65535}function xD(e,r){return e<<r|e>>>32-r}function Ws(e,r,t,a,s,i){return Xr(xD(Xr(Xr(r,e),Xr(a,i)),s),t)}function yt(e,r,t,a,s,i,u){return Ws(r&t|~r&a,e,r,s,i,u)}function bt(e,r,t,a,s,i,u){return Ws(r&a|t&~a,e,r,s,i,u)}function _t(e,r,t,a,s,i,u){return Ws(r^t^a,e,r,s,i,u)}function Et(e,r,t,a,s,i,u){return Ws(t^(r|~a),e,r,s,i,u)}var OD=jg("v3",48,SD);const AD=OD;function RD(e,r,t){e=e||{};var a=e.random||(e.rng||Ng)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){t=t||0;for(var s=0;s<16;++s)r[t+s]=a[s];return r}return Bs(a)}function DD(e,r,t,a){switch(e){case 0:return r&t^~r&a;case 1:return r^t^a;case 2:return r&t^r&a^t&a;case 3:return r^t^a}}function Wc(e,r){return e<<r|e>>>32-r}function PD(e){var r=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var a=unescape(encodeURIComponent(e));e=[];for(var s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,u=Math.ceil(i/16),l=new Array(u),f=0;f<u;++f){for(var p=new Uint32Array(16),h=0;h<16;++h)p[h]=e[f*64+h*4]<<24|e[f*64+h*4+1]<<16|e[f*64+h*4+2]<<8|e[f*64+h*4+3];l[f]=p}l[u-1][14]=(e.length-1)*8/Math.pow(2,32),l[u-1][14]=Math.floor(l[u-1][14]),l[u-1][15]=(e.length-1)*8&4294967295;for(var y=0;y<u;++y){for(var _=new Uint32Array(80),E=0;E<16;++E)_[E]=l[y][E];for(var T=16;T<80;++T)_[T]=Wc(_[T-3]^_[T-8]^_[T-14]^_[T-16],1);for(var C=t[0],O=t[1],D=t[2],F=t[3],M=t[4],L=0;L<80;++L){var I=Math.floor(L/20),G=Wc(C,5)+DD(I,O,D,F)+M+r[I]+_[L]>>>0;M=F,F=D,D=Wc(O,30)>>>0,O=C,C=G}t[0]=t[0]+C>>>0,t[1]=t[1]+O>>>0,t[2]=t[2]+D>>>0,t[3]=t[3]+F>>>0,t[4]=t[4]+M>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var FD=jg("v5",80,PD);const ID=FD,MD="00000000-0000-0000-0000-000000000000";function $D(e){if(!js(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const LD=Object.freeze(Object.defineProperty({__proto__:null,NIL:MD,parse:kg,stringify:Bs,v1:yD,v3:AD,v4:RD,v5:ID,validate:js,version:$D},Symbol.toStringTag,{value:"Module"})),ND=Sw(LD);function Xu(e,r){if(!e||!r||!e.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=r}Xu.prototype.convert=function(e){var r,t,a,s={},i=this.srcAlphabet.length,u=this.dstAlphabet.length,l=e.length,f=typeof e=="string"?"":[];if(!this.isValid(e))throw new Error('Number "'+e+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return e;for(r=0;r<l;r++)s[r]=this.srcAlphabet.indexOf(e[r]);do{for(t=0,a=0,r=0;r<l;r++)t=t*i+s[r],t>=u?(s[a++]=parseInt(t/u,10),t=t%u):a>0&&(s[a++]=0);l=a,f=this.dstAlphabet.slice(t,t+1).concat(f)}while(a!==0);return f};Xu.prototype.isValid=function(e){for(var r=0;r<e.length;++r)if(this.srcAlphabet.indexOf(e[r])===-1)return!1;return!0};var kD=Xu,jD=kD;function Ka(e,r){var t=new jD(e,r);return function(a){return t.convert(a)}}Ka.BIN="01";Ka.OCT="01234567";Ka.DEC="0123456789";Ka.HEX="0123456789abcdef";var BD=Ka;const{v4:Hc}=ND,Qo=BD,Uc="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",WD="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",HD={consistentLength:!0};let qc;const Yp=(e,r,t)=>{const a=r(e.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?a:a.padStart(t.shortIdLength,t.paddingChar)},UD=(e,r)=>{const a=r(e).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[a[1],a[2],a[3],a[4],a[5]].join("-")},qD=e=>Math.ceil(Math.log(2**128)/Math.log(e));var Wa=(()=>{const e=(r,t)=>{const a=r||Uc,s={...HD,...t};if([...new Set(Array.from(a))].length!==a.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const i=qD(a.length),u={shortIdLength:i,consistentLength:s.consistentLength,paddingChar:a[0]},l=Qo(Qo.HEX,a),f=Qo(a,Qo.HEX),p=()=>Yp(Hc(),l,u),h={new:p,generate:p,uuid:Hc,fromUUID:y=>Yp(y,l,u),toUUID:y=>UD(y,f),alphabet:a,maxLength:i};return Object.freeze(h),h};return e.constants={flickrBase58:Uc,cookieBase90:WD},e.uuid=Hc,e.generate=()=>(qc||(qc=e(Uc).generate),qc()),e})(),ne=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.DS_METHOD="dsMethod",e.DATACLASS_METHOD="dataclassMethod",e.ENTITY_METHOD="entityMethod",e.ENTITY_SEL_METHOD="entityselMethod",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e.SINGLETON="singleton",e.SINGLETON_METHOD="singletonMethod",e))(ne||{});const GD=[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE,ne.SINGLETON_METHOD,ne.SINGLETON,ne.METHOD],Vp=e=>[ne.DS_METHOD,ne.ENTITY_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_SEL_METHOD].includes(e)?ne.METHOD:e,_s="guest",Qu=[{key:"read",label:"Read",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"execute",label:"Execute",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.METHOD,ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD,ne.SINGLETON,ne.SINGLETON_METHOD]},{key:"promote",label:"Promote",canApplyTo:[ne.METHOD,ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD,ne.SINGLETON_METHOD]}];function nr(e,...r){return Array.from(new Set([...e,...r]))}function Wg(e){const r={},t=new Map;e.forEach(f=>{const p=f.id||Wa.generate();r[p]={...f,id:p,parents:[],includes:nr(f.includes||[]),resources:[]},t.set(f.privilege,p)}),Object.entries(r).forEach(([f,p])=>{const h=p.includes.map(y=>{const _=t.get(y);return _?(r[_].parents=nr(r[_].parents,_),_):""}).filter(Boolean);r[f]={...p,includes:h}});const a=Hg(r),s=new Set;function i(f){s.add(f.id),f.includes=f.includes.filter(p=>!s.has(p))}if(a.forEach(i),a.forEach(f=>f.parents=[]),a.forEach(f=>{f.includes.forEach(p=>r[p].parents.push(f.id))}),Object.values(r).find(({privilege:f})=>f===_s))return r;const l=Wa.generate();return{[l]:{id:l,privilege:_s,includes:[],parents:[],resources:[]},...r}}function Hg(e){return Object.values(e).sort((r,t)=>r.parents.length-t.parents.length)}function Hs(e,r){const t=r[e];let a=[];return t&&t.parents.forEach(s=>{a=nr(a,...Hs(s,r),s)}),a}function Es(e,r){const t=r[e];let a=[];return t&&t.includes.forEach(s=>{a=nr(a,...Es(s,r),s)}),a}function YD(e,r){const t=r[e];if(!t)return[];const a=[e,...Hs(e,r),...t.includes];return Object.keys(r).filter(s=>!a.includes(s))}function VD(e,r){return r[e]?Object.keys(r).reduce((a,s)=>s===e?a:{...a,[s]:{...r[s],parents:r[s].parents.filter(i=>i!==e),includes:r[s].includes.filter(i=>i!==e)}},{}):r}function zD(e,r,t){const a=t[e],s=t[r];return!a||!s?t:{...t,[e]:{...t[e],includes:nr(a.includes,r)},[r]:{...t[r],parents:nr(s.parents,e)}}}function KD(e,r,t){const a=t[e],s=t[r];return!a||!s?t:{...t,[e]:{...t[e],includes:t[e].includes.filter(i=>i!==r)},[r]:{...t[r],parents:t[r].parents.filter(i=>i!==e)}}}function Ug(e,r){v.validateName(e),Object.entries(r).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const t=Wa.generate();return{[t]:{id:t,privilege:e,includes:[],parents:[],resources:[]},...r}}function JD(e,r,t,a,s){let i=Ug(e,s);const u=Object.entries(i).find(([,l])=>l.privilege===e);return u?(i=Vg(u[1].id,r,t,a,i),i):s}function XD(e,r,t){if(!e)throw new Error("Please enter a name");if(!t[r])throw new Error("Invalid privilege");return Object.entries(t).forEach(([,{privilege:a,id:s}])=>{if(e.toLowerCase()===a.toLowerCase()&&r!==s)throw new Error(`There's already a Privilege with the name ${e}`)}),{...t,[r]:{...t[r],privilege:e}}}function QD(e,r){return e.map(t=>_r(t,r))}function _r(e,r){return r[e]?r[e]:null}function qg({applyTo:e,type:r,...t}){return Object.entries(t).reduce((a,[s,i])=>{const u=Ce.find(Qu,["key",s]);return!u||!u.canApplyTo.includes(r)||(typeof i=="string"?i.split(","):i).forEach(f=>{a[f]=nr(a[f]||[],s)}),a},{})}const hu=(e,r=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${r?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${r?"through the model (DataStore, Dataclasses, Entity selections, Entities) have the execute permission":"on this Dataclass, Entity selection class, Entity class have the execute permission"}`:`All ${r?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function Zu(e){return{permissions:Qu.filter(({canApplyTo:r})=>r.includes(e.type)).map(({key:r,label:t})=>{const a={name:r,from:[]};switch(e.type){case ne.DATASTORE:return{...a,info:hu(t,!0)};case ne.DATACLASS:return{...a,info:hu(t)};default:return a}}),resource:e.applyTo,type:e.type}}function Gg(e,r){const t=Yg(r),a={};return e.filter(({type:s})=>GD.includes(s)).forEach(s=>{const i=qg(s);Object.entries(i).forEach(([u,l])=>{var h;const f=(h=t[u])==null?void 0:h.id;if(!f)return;a[f]=a[f]||{...r[f]};let p=Ce.find(a[f].resources,{resource:s.applyTo,type:s.type});p||(p=Zu(s),a[f].resources.push(p)),p.permissions=p.permissions.map(y=>({...y,checked:y.checked||l.includes(y.name)}))})}),{...r,...a}}function Yg(e){return Object.values(e).reduce((r,t)=>({...r,[t.privilege]:t}),{})}function Us(e){var t;const r=Wg(e.privileges||[]);return{forceLogin:(e==null?void 0:e.forceLogin)||!1,privileges:Gg(((t=e.permissions)==null?void 0:t.allowed)||[],r),roles:(e.roles||[]).map(({id:a=Wa.generate(),role:s,privileges:i=[]})=>({id:a,role:s,privileges:nr(i).map(u=>{var l;return(l=Object.values(r).find(({privilege:f})=>f===u))==null?void 0:l.id}).filter(Boolean)})).reduce((a,s)=>({...a,[s.id]:{...s}}),{})}}function qs(e){const r=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),t=[...r,...r.map(a=>Hs(a,e.privileges).reverse())].flat().filter((a,s,i)=>i.indexOf(a)===s).map(a=>e.privileges[a]);return{forceLogin:e.forceLogin||!1,permissions:{allowed:Object.values(e.privileges).reduce((a,s)=>(s.resources.forEach(({permissions:i,resource:u,type:l})=>{let f=Ce.find(a,{applyTo:u,type:Vp(l)});f||(f={applyTo:u,type:Vp(l)},a.push(f)),i.forEach(({name:p,checked:h})=>{h&&f&&(f[p]=f[p]||[],f[p].push(s.privilege))})}),a),[])},privileges:t.filter(({privilege:a})=>a!==_s).map(({id:a,includes:s,privilege:i})=>({id:a,privilege:i,includes:s.map(u=>e.privileges[u].privilege)})),roles:Object.values(e.roles).map(a=>({...a,privileges:a.privileges.map(s=>{var i;return(i=e.privileges[s])==null?void 0:i.privilege}).filter(Boolean)}))}}function ZD(e,r){const t=r[e],a={children:[],links:[],parents:[],selected:e};if(!t)return a;function s(l,f,p=[]){const h=l.reduce((y,_)=>[...y,...r[_][f]],[]);return h.length===0?p:(p.push(h),s(h,f,p))}function i(l){const f=[],p=[];for(let h=l.length-1;h>=0;h-=1){const y=l[h].filter(_=>f.includes(_)?!1:(f.push(_),!0));y.length>0&&p.unshift(nr(y))}return p}function u(l,f){const p=[];return l.reduce((h,y)=>(y.forEach(_=>{r[_][f==="parents"?"includes":"parents"].forEach(T=>{p.includes(T)&&h.push(f==="parents"?{source:_,target:T}:{source:T,target:_})}),p.push(_)}),h),[])}return a.children=s([e],"includes"),a.children=i(a.children),a.parents=s([e],"parents"),a.parents=i(a.parents),a.links=[...u([[e],...a.parents],"parents"),...u([[e],...a.children],"includes")],a}function eP(e,r,t){const a=_r(e,t);if(!a||Ce.find(a.resources,{resource:r.applyTo,type:r.type}))return t;const s={...a,resources:[...a.resources,Zu(r)]};return{...t,[e]:s}}function tP(e,r,t){const a=_r(e,t);if(!a)return t;const s={...a,resources:a.resources.filter(({resource:i,type:u})=>i!==r.applyTo||u!==r.type)};return{...t,[e]:s}}function rP(e,r){const t=Object.entries(e).map(([a,s])=>{const i=_r(a,r);if(!i)return{[a]:r[a]};const u={...i,resources:i.resources.filter(({resource:l,type:f})=>!s.some(p=>p.applyTo===l&&p.type===f))};return{[a]:u}}).reduce((a,s)=>({...a,...s}),{});return{...r,...t}}function nP(e,r){const t=_r(e,r);if(!t)return r;const a={...t,resources:t.resources.filter(s=>s.permissions.some(i=>i.from.length)).map(s=>({...s,permissions:s.permissions.map(i=>({...i,checked:!1}))}))};return{...r,[e]:a}}function Vg(e,r,t,a,s){const i=_r(e,s);if(!i)return s;const l=Ce.find(i.resources,{type:t,resource:r})?{...i,resources:i.resources.map(f=>f.type===t&&f.resource===r?{...f,permissions:f.permissions.map(p=>p.name===a?{...p,checked:!p.checked,from:[]}:p)}:f)}:{...i,resources:[...i.resources,{type:t,resource:r,permissions:Qu.filter(f=>f.canApplyTo.includes(t)).map(f=>({from:[],name:f.key,checked:f.key===a,info:hu(f.key,t===ne.DATASTORE)}))}]};return{...s,[e]:l}}function aP(e,r,t,a){const s=_r(e,a);if(!s)return a;const u=Ce.find(s.resources,{type:r.type,resource:r.resource})?{...s,resources:s.resources.map(l=>l.type===r.type&&l.resource===r.resource?{...l,permissions:r.permissions.map(f=>f.name===t.name?{...f,checked:!f.checked,from:[]}:f)}:l)}:{...s,resources:[...s.resources,{...r,permissions:r.permissions.map(l=>({...l,checked:t.name===l.name,from:[]}))}]};return{...a,[e]:u}}function oP(e,r){var f;const t=zg(e,r)||[],a=((f=_r(e,r))==null?void 0:f.resources)||[],u=([...t,...a].filter(({type:p})=>[ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD].includes(p))||[]).map(({resource:p})=>p);return Object.entries(r).reduce((p,[h,{resources:y}])=>(y.filter(({resource:_,type:E})=>[ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD].includes(E)&&u.includes(_)).forEach(({permissions:_,resource:E})=>{var C;((C=_.find(({name:O})=>O==="promote"))==null?void 0:C.checked)&&(p[E]=nr(p[E]||[],h))}),p),{})}function zg(e,r){var u;const t=_r(e,r);if(!t)return[];const a=(u=Object.values(r).find(l=>l.privilege===_s))==null?void 0:u.id;return(a&&a!==e?nr(Es(e,r),a):Es(e,r)).reduce((l,f)=>(r[f].resources.forEach(h=>{if(h.permissions.filter(({checked:E,name:T})=>E&&T!=="promote").length===0)return;const _=Ce.find(l,{type:h.type,resource:h.resource});if(!_){l.push({...h,permissions:h.permissions.map(E=>({...E,from:E.checked?[f]:[],checked:!1}))});return}_.permissions=_.permissions.map((E,T)=>{let{from:C=[]}=E;return h.permissions[T].checked&&!C.includes(f)&&(C=[...C,f]),{...E,from:C,checked:E.checked}})}),l),Ce.clone(t.resources.map(l=>({...l,permissions:l.permissions.map(({checked:f,...p})=>({...p,checked:!!f}))}))))}const sP=e=>e.reduce((r,t)=>({...r,[t.id]:{...t}}),{}),iP=(e,r)=>r[e]?Object.values(r).reduce((t,a)=>e===a.id||a.role===""?t:{...t,[a.id]:a},{}):r,cP=(e,r,t)=>t[e]?Object.values(t).reduce((a,s)=>e===s.id?{...a,[s.id]:{...s,name:r}}:{...a,[s.id]:s},{}):t,uP=(e,r,t)=>{const a={id:e,role:r,privileges:[]};return{...t,[a.id]:a}},lP=(e,r)=>{if(v.validateName(e.role),Object.values(r).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(r).reduce((a,s)=>e.id===s.id?{...a,[e.id]:e}:{...a,[s.id]:s},{})},fP={list:[]},zp=(e,r)=>e.list.filter(t=>t.id!==r),Kg=Gt({name:"modals",initialState:fP,reducers:{createModal:(e,r)=>{e.list.push(r.payload)},editModal:(e,r)=>{const{id:t,...a}=r.payload,s=e.list.find(v.byId(t));s&&Object.assign(s,{...a})},removeModal:(e,r)=>{const t=r.payload;e.list=zp(e,t)},closeModal:(e,r)=>{const{id:t,reason:a}=r.payload;if(a){const s=e.list.find(i=>i.id===t);s&&(s.closeReason=a,s.isOpen=!1)}else e.list=zp(e,t)}}}),{createModal:Jg,removeModal:Xg,closeModal:dP,editModal:pP}=Kg.actions,ar=Q("modals/open",async(e,{dispatch:r})=>{const t=nm(),{type:a=v.ModalType.ALERT}=e,s=Ru();switch(r(Jg({id:s,type:a,isOpen:!0,...e})),a){case v.ModalType.CONFIRM:return new Promise(i=>{const u=t.subscribe(()=>{var p;const{modals:l}=t.getState(),f=l.list.find(h=>h.id===s);if(f&&!f.isOpen){const h=f.closeReason===v.ModalCloseReason.CONFIRMED,y=Ce.entries((p=f.views)==null?void 0:p.toggles).reduce((_,E)=>({..._,[E[0]]:E[1].value}),{});r(Xg(s)),u(),i({confirmed:h,options:y})}})});default:return{}}}),Qg=()=>v.getFileContent({name:v.ROLES_TAB_PATH}),Zg="Roles & Privileges",Ss=Q("roles/fetchRoles",async(e,{dispatch:r,rejectWithValue:t})=>{var i;let a;try{a=await Qg()}catch(u){if(!Array.isArray((i=u==null?void 0:u.data)==null?void 0:i.__ERROR))return t("Error while loading the roles");a={name:v.ROLES_TAB_PATH,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const s={name:Zg,type:v.FileFolderType.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:v.ROLES_TAB_PATH,flags:{},extra:{editor:{key:"editors:roles"}},content:{}};return r(At(s)),{...a,content:Us(a.content)}}),ev=Q("roles/fetchRolesChanges",async(e,{getState:r})=>{const{tabs:t}=r().root;if(t.find(s=>s.path===v.ROLES_TAB_PATH)){const{date:s}=r().roles;if(s&&await el(s))return{old:!0}}return{}}),el=async e=>{if(!e)return!1;try{const r=await Qg();if(r.date){const t=new Date(e),a=new Date(r.date);if(t>a)return!0}}catch(r){if(!Array.isArray(r==null?void 0:r.data.__ERROR))throw r}return!1},gu=Q("roles/saveRoles",async(e,{getState:r,rejectWithValue:t,dispatch:a})=>{try{const{flags:s,date:i}=r().roles;if(s.old||await el(i)){const{confirmed:f}=await a(ar({title:Zg,message:"New content has been found on the server. Are you sure you want to continue?",type:v.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!f)return t({old:!0})}return await v.setFileContent({name:v.ROLES_TAB_PATH,content:qs(e)})}catch{return t("Error while loading the roles")}}),tv=Gt({name:"roles",initialState:()=>{const{roles:e}=Zn(),{roles:r={},privileges:t={},flags:a={touched:!1},date:s,selectedTab:i="roles"}=e||{};return{flags:a,roles:r,privileges:t,date:s,selectedTab:i}},reducers:{updatePrivileges:(e,r)=>{e.privileges=r.payload,e.flags.touched=!0},updateRoles:(e,r)=>{e.roles=r.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,r)=>{e.roles=r.payload.roles,e.privileges=r.payload.privileges},toggleTab:(e,r)=>{e.selectedTab=r.payload},toggleForceLogin:(e,r)=>{e.forceLogin!==r.payload&&(e.forceLogin=r.payload,e.flags.touched=!0)},setRolesContent(e,r){const{content:t,flags:a={},...s}=r.payload,i=Us(t),u={...e.flags,...a};return{...e,...i,...s,flags:u}}},extraReducers(e){e.addCase(Ss.fulfilled,(r,t)=>{const{content:a,date:s}=t.payload;r={...r,...a,date:s}}).addCase(Ss.rejected,r=>({...r,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(gu.fulfilled,(r,t)=>({...r,flags:{...r.flags,confirmed:!0,touched:!1,old:!1},date:t.payload.date})).addCase(gu.rejected,(r,t)=>C1.isString(t.payload)?r:{...r,flags:{...r.flags,...t.payload}}).addCase(ev.fulfilled,(r,t)=>({...r,flags:{...r.flags,...t.payload}})).addCase(Vn.fulfilled,(r,t)=>{!t.payload||t.payload.path!==v.ROLES_TAB_PATH||(r.flags.touched=!1,r.flags.old=!1)}).addCase(il.fulfilled,(r,t)=>{t.meta.arg!==v.ROLES_TAB_PATH||!t.payload||(r.flags.touched=!1,r.flags.old=!1)})}}),{updatePrivileges:rv,updateRoles:nv,setRolesContent:tl,toggleTab:hP,toggleForceLogin:gP,updateRolesAndPrivileges:rl}=tv.actions,vP=tv.reducer,nl=Q("settings/fetch",async()=>await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:v.SETTINGS_TAB_PATH,content:!0,as:"json"})),av=Q("settings/app",v.getAppSettings),mP=Lu(),Kp={session:{"studio.tips":!0,"studio.notifications":!0,"studio.enablePreview":!1,"studio.tipsBaseUrl":"https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build","webforms.tooltip.behavior":zu.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"webforms.renderer.showUnsavedPopOver":!0,"webforms.renderer.unsavedPopOverChoice":Ku.NONE,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0,"webforms.i18n.current":"","model.viewport":{zoom:1,y:0,x:0}},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral","webforms.i18n":{supported:[],primary:""}},server:{projectOpened:!1,remoteDebuggerMode:v.RemoteDebuggerMode.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},yP={...Kp,session:{...Kp.session,...mP},welcometour:{}},ov=Gt({name:"settings",initialState:yP,reducers:{setSetting(e,r){const{path:t,settingsKey:a,value:s}=r.payload;e[t][a]=s},setSettings(e,r){const{path:t,value:a}=r.payload;e[t]={...e[t],...a}},setSettingsAsText(e,r){const{path:t,settings:a}=r.payload;e[t]=a}},extraReducers(e){e.addCase(nl.fulfilled,(r,t)=>{r.project={...r.project,...t.payload.content}}),e.addCase(av.fulfilled,(r,t)=>{r.server=t.payload,r.server.qodly&&(r.project["webforms.display-mode"]="airy")})}}),{setSetting:vu,setSettings:Gs,setSettingsAsText:bP}=ov.actions,_P=ov.reducer,mu=e=>{const r=["folder","file"];return e.sort((t,a)=>t.type===a.type?t.name.localeCompare(a.name):r.indexOf(t.type)-r.indexOf(a.type))},Re=(e,r)=>e.reduce((t,a)=>a.path===r.path&&a.type===r.type&&a.id===r.id?[...t,r]:a.children?[...t,{...a,children:mu(Re(a.children,r))}]:[...t,a],[]),nt=(e,r)=>e.reduce((t,a)=>t||(a.path===r?a:a.children?nt(a.children,r):null),null),sv=[{name:v.FolderRootPath.WEBFORMS,type:v.FileFolderType.FOLDER,children:[],path:v.FolderRootPath.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:v.FolderRootPath.METHODS,type:v.FileFolderType.FOLDER,children:[],path:v.FolderRootPath.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:v.FolderRootPath.CLASSES,type:v.FileFolderType.FOLDER,children:[],path:v.FolderRootPath.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:v.FolderRootPath.SHARED,type:v.FileFolderType.FOLDER,children:[],path:v.FolderRootPath.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:v.FileFolderType.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:v.FileFolderType.FILE,ext:"json",path:v.ROLES_TAB_PATH,error:null,flags:{},config:{editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},isRoot:!0},{name:"Model",type:v.FileFolderType.MODEL,ext:"4DModel",path:v.MODEL_TAB_PATH,error:null,flags:{},config:{editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]}},{name:"HTTP Handlers",type:v.FileFolderType.HTTP_HANDLERS,ext:"json",path:v.HTTP_HANDLERS_PATH,error:null,flags:{},config:{editor:{key:"editors:http-handlers"},supportedEditors:[{key:"editors:code",config:{language:"json"}}]}},{name:"Settings",type:v.FileFolderType.FILE,ext:"json",path:"qodlyApp.json",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],EP=Lu(),SP=!!Ce.get(EP,"features.experimental.reports");SP&&sv.unshift({name:v.FolderRootPath.REPORTS,type:v.FileFolderType.FOLDER,children:[],path:v.FolderRootPath.REPORTS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:report:explorer:reports",config:{},isRoot:!0});const iv=Gt({name:"explorer",initialState:sv,reducers:{renameClassesFolder:(e,r)=>{const{payload:t}=r,a=e.find(u=>u.name==="Classes");if(!a||!a.children||a.children.length===0)return e;const s=e.findIndex(u=>u.name==="Classes"),i=(u,l)=>{switch(u){case"dataclass":return l;case"entity":return`${l}Entity`;default:return`${l}Selection`}};return t.forEach(({newName:u,prevName:l})=>{var f;a.children=(f=a.children)==null?void 0:f.map(p=>{var h;return p.path.endsWith("[<QODLY_ID>]")&&p.name===l?{...p,name:u,path:`Classes/${u}___[<QODLY_ID>]`,children:(h=p.children)==null?void 0:h.map(y=>{var _;return{...y,path:y.path.replace(l,u),info:{...y.info,filename:i((_=y.info)==null?void 0:_.kind,u),dataclass:u}}})}:p})}),e[s]=a,e},removeClassesFolder:(e,r)=>{const{payload:t}=r;if(!t||t.length===0)return e;const a=e.find(u=>u.name==="Classes");if(!(a!=null&&a.children)||a.children.length===0)return e;const s=e.findIndex(u=>u.name==="Classes");let i=[];return t.forEach(u=>{var f,p;const l=(f=a.children)==null?void 0:f.find(h=>h.name===u);if(l){let h=(p=l.children)==null?void 0:p.filter(y=>{var _;return(_=y.info)==null?void 0:_.exist});h&&(h==null?void 0:h.length)>0&&(h=h.map(y=>{var _;return{...y,name:(_=y.info)==null?void 0:_.filename,info:{...y.info,kind:"userClass"}}}),i=i.concat(h))}}),a.children=a.children.filter(u=>!t.includes(u.name)),a.children=a.children.concat(i),a.children.sort((u,l)=>u.name==="DataStore"?-1:l.name==="DataStore"?1:u.type===v.FileFolderType.CLASS_FOLDER&&l.type===v.FileFolderType.CLASS_FOLDER||u.type===v.FileFolderType.CLASS&&l.type===v.FileFolderType.CLASS?u.name.localeCompare(l.name):u.type===v.FileFolderType.CLASS_FOLDER&&l.type!==v.FileFolderType.CLASS_FOLDER?-1:1),e[s]=a,e},addClassesFolder:(e,r)=>{const{payload:t}=r;if(t.length===0)return e;const a=e.find(u=>u.name==="Classes");if(!(a!=null&&a.children)||a.children.length===0)return e;const s=e.findIndex(u=>u.name==="Classes");let i=0;return a.children.forEach((u,l)=>{u.type===v.FileFolderType.CLASS_FOLDER&&(i=l)}),t.forEach(u=>{var l;a.children=(l=a.children)==null?void 0:l.filter(f=>{var h,y;const p=(h=u.children)==null?void 0:h.find(_=>{var E;return((E=_.info)==null?void 0:E.filename)===f.name});return p&&(u.children=(y=u.children)==null?void 0:y.map(_=>{var E;return((E=_.info)==null?void 0:E.filename)===f.name?{..._,info:{..._.info,exist:!0}}:_})),!p})}),t.forEach(u=>{var l;(l=a==null?void 0:a.children)==null||l.splice(i+1,0,u)}),a.children.sort((u,l)=>u.name==="DataStore"?-1:l.name==="DataStore"?1:u.type===v.FileFolderType.CLASS_FOLDER&&l.type===v.FileFolderType.CLASS_FOLDER?u.name.localeCompare(l.name):u.type===v.FileFolderType.CLASS_FOLDER&&l.type!==v.FileFolderType.CLASS_FOLDER?-1:1),e[s]=a,e},toggleExpandFolder:(e,r)=>(e=Re(e,{...r.payload,flags:{...r.payload.flags,expanded:!r.payload.flags.expanded}}),e),expandFolder:(e,r)=>(e=Re(e,{...r.payload,flags:{...r.payload.flags,expanded:!0}}),e),openAddFileInput:(e,r)=>Re(e,{...r.payload,flags:{...r.payload.flags,adding:!0}}),addNewFile:(e,r)=>{const{parent:t,child:a}=r.payload;return Re(e,{...t,children:[a,...t.children||[]]})},removeFile:(e,r)=>{const{parent:t,child:a}=r.payload;return Re(e,{...t,children:t.children.filter(s=>s.path!==a.path)})},refreshFile:(e,r)=>{const{parent:t,child:a}=r.payload,s=(t.children||[]).filter(i=>i.path!==a.path&&!a.error);return Re(e,{...t,children:[a,...s]})},setFolderChildren:(e,r)=>{const t=nt(e,r.payload.parentPath);return t?Re(e,{...t,children:r.payload.children}):e}},extraReducers:e=>{e.addCase(Yn.pending,(r,t)=>{const{file:a,newname:s}=t.meta.arg,i=nt(r,a.path);if(!i)return r;const u=a.path.split("/");u.pop();const l=`${u.join("/")}/${a.name}.${a.ext}`,f=`${u.join("/")}/${s}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":v.lspSubject.next({action:v.LspActions.WILL_RENAME,payload:{oldPath:l,newPath:f}});break}return Re(r,{...i,flags:{...i.flags,loading:!0}})}),e.addCase(Yn.fulfilled,(r,t)=>{const{meta:{arg:{file:a}},payload:s}=t,i=nt(r,a.path);if(!i)return r;switch(s.old.ext){case"4dm":case"4qs":v.lspSubject.next({action:v.LspActions.DID_RENAME,payload:{oldPath:s.old.path,newPath:s.new.path}});break}return Re(r,{...i,flags:{...i.flags,loading:!1}})}),e.addCase(Yn.rejected,(r,t)=>{const{file:a}=t.meta.arg,s=nt(r,a.path);return s?Re(r,{...s,flags:{...s.flags,loading:!1}}):r}),e.addCase(tn.pending,(r,t)=>{const a=typeof t.meta.arg=="string"?t.meta.arg:t.meta.arg.nodePath,s=nt(r,a);return s?Re(r,{...s,flags:{...s.flags,loading:!0}}):r}),e.addCase(tn.fulfilled,(r,t)=>{const a=typeof t.meta.arg=="string"?t.meta.arg:t.meta.arg.nodePath,s=nt(r,a);return s?Re(r,{...s,children:mu(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!0},error:null}):r}),e.addCase(tn.rejected,(r,t)=>{const a=typeof t.meta.arg=="string"?t.meta.arg:t.meta.arg.nodePath,s=nt(r,a);return s?Re(r,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!0}}):r}),e.addCase(Ia.pending,(r,t)=>{const a=t.meta.arg,s=nt(r,a);return s?Re(r,{...s,flags:{...s.flags,loading:!0}}):r}),e.addCase(Ia.fulfilled,(r,t)=>{const a=t.meta.arg,s=nt(r,a);return s?Re(r,{...s,children:mu(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!1},error:null}):r}),e.addCase(Ia.rejected,(r,t)=>{const a=t.meta.arg,s=nt(r,a);return s?Re(r,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!1}}):r}),e.addCase(rs.pending,(r,t)=>{const{fileName:a,parentNode:s,path:i,type:u}=t.meta.arg,l=v.getFileExtentionFromType(u),f=`${i}/${a}${l?`.${l}`:""}`;return Re(r,{...s,children:[{name:a,path:f,type:u,error:null,flags:{loading:!0},config:{}},...s.children]})}),e.addCase(rs.fulfilled,(r,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg,u=v.getFileExtentionFromType(i),l=`${a}${u?`.${u}`:""}`,{editor:f,supportedEditors:p}=Tt(l);return Re(r,{id:`${l}-${Date.now()}`,name:s,path:l,type:i,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:p}})}),e.addCase(rs.rejected,(r,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg,u=v.getFileExtentionFromType(i),l=`${a}${u?`.${u}`:""}`;return Re(r,{name:s,path:l,type:i,error:{message:t.payload},flags:{loading:!1},config:{}})}),e.addCase(ns.pending,(r,t)=>{const{node:a,parentNode:s}=t.meta.arg,i=`${a.name}_copy`,u=`${a.path}/${i}${a.ext?`.${a.ext}`:""}`;return Re(r,{...s,children:[{name:i,path:u,type:a.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...s.children]})}),e.addCase(ns.fulfilled,(r,t)=>{const{node:a}=t.payload,s=ng(a.name),i=`${a.path}/${a.name}`,{editor:u,supportedEditors:l}=Tt(i);return Re(r,{name:s,path:i,type:a.type,error:null,flags:{loading:!1},config:{editor:u,supportedEditors:l}})}),e.addCase(ns.rejected,(r,t)=>{const a=t.payload,{node:s}=t.meta.arg,i=`${s.name}_copy`,u=`${s.path}/${i}${s.ext?`.${s.ext}`:""}`;return Re(r,{name:i,path:u,type:s.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase($a.pending,()=>{}),e.addCase($a.fulfilled,(r,t)=>{var y;const{draggedNode:a,newLocation:s}=t.meta.arg,i=rg(a.path),u=nt(r,i),l=nt(r,s.path),f=(y=u==null?void 0:u.children)==null?void 0:y.filter(_=>_.path!==a.path),p=s.path.split("/").length,h=a.path.split("/").length;return p>=h?(r=Re(r,{...u,children:f}),r=Re(r,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l.children:[]],flags:{...l.flags,expanded:!0}})):(r=Re(r,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l.children:[]],flags:{...l.flags,expanded:!0}}),r=Re(r,{...u,children:f})),r}),e.addCase($a.rejected,()=>{v.toastSubject.next({message:"Error moving file",kind:"danger"})}),e.addCase(Gn.pending,(r,t)=>{var C;const{fileName:a,parentNode:s,path:i,type:u,qodly:l}=t.meta.arg,f=v.getFileExtentionFromType(u,l),p=`${i}/${a}${f?`.${f}`:""}`,{editor:h,supportedEditors:y}=Tt(p);switch(u){case v.FileFolderType.CLASS:case v.FileFolderType.METHOD:v.lspSubject.next({action:v.LspActions.WILL_CREATE,payload:{filePath:p}});break}const E=[...(C=s.children)==null?void 0:C.filter(O=>O.path!==p),{name:a,path:p,type:u===v.FileFolderType.CLASS?u:v.FileFolderType.FILE,error:null,flags:{loading:!0},config:{editor:h,supportedEditors:y},ext:f,date:new Date().toISOString(),info:{exist:!0,kind:u===v.FileFolderType.CLASS?"userClass":""}}],T=Re(r,{...s,children:E});return Ce.merge(r,T)}),e.addCase(Gn.fulfilled,(r,t)=>{const{fileName:a,path:s,type:i,qodly:u}=t.meta.arg,l=v.getFileExtentionFromType(i,u),f=`${s}/${a}${l?`.${l}`:""}`,{editor:p,supportedEditors:h}=Tt(f),y=Re(r,{name:a,path:f,type:v.FileFolderType.FILE,error:null,flags:{},config:{editor:p,supportedEditors:h},ext:l,date:new Date().toISOString(),info:{exist:!0,kind:i===v.FileFolderType.CLASS?"userClass":""}});switch(i){case v.FileFolderType.CLASS:case v.FileFolderType.METHOD:v.lspSubject.next({action:v.LspActions.DID_CREATE,payload:{filePath:f}});break}return r=y,r}),e.addCase(Gn.rejected,(r,t)=>{const{fileName:a,path:s,type:i}=t.meta.arg,u=v.getFileExtentionFromType(i),l=`${s}${u?`.${u}`:""}`,{editor:f,supportedEditors:p}=Tt(l);return r=Re(r,{name:a,path:l,type:v.FileFolderType.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:p},ext:u,date:new Date().toISOString()}),r}),e.addCase(pv.rejected,r=>{const t=nt(r,v.HTTP_HANDLERS_PATH);return t&&(r=Re(r,{...t,flags:{...t.flags,disabled:!0}})),r}),e.addMatcher(Sh(Ma),(r,t)=>{const a=nt(r,t.meta.arg.file.path);return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!0}})),r}),e.addMatcher(wh(Ma),(r,t)=>{const a=nt(r,t.meta.arg.file.path),s=a!=null&&a.info?{...a.info,exist:!0}:void 0;return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!1,disabled:!1},info:s})),r}),e.addMatcher(Th(Ma),(r,t)=>{const a=nt(r,t.meta.arg.file.path);return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!1}})),v.toastSubject.next({message:"Failed to open file, try again",kind:"danger"}),r})}}),{toggleExpandFolder:TP,expandFolder:wP,openAddFileInput:CP,addNewFile:cv,refreshFile:xP,removeFile:yu,setFolderChildren:OP,addClassesFolder:AP,removeClassesFolder:RP,renameClassesFolder:DP}=iv.actions,Jp=[{name:"onServerStartup.4qs",content:`var error : object
|
|
143
|
+
`),E}return pd(function(){f.current=e,d.current=m,p.current=g,c.current=void 0}),pd(function(){function E(){try{var S=r.getState();if(S===d.current)return;var T=f.current(S);if(t(T,p.current))return;p.current=T,d.current=S}catch(C){c.current=C}o()}return u.onStateChange=E,u.trySubscribe(),E(),function(){return u.tryUnsubscribe()}},[r,u]),g}function U2(e){e===void 0&&(e=$n);var t=e===$n?Yb:function(){return Y.useContext(e)};return function(n,a){if(a===void 0&&(a=z2),process.env.NODE_ENV!=="production"){if(!n)throw new Error("You must pass a selector to useSelector");if(typeof n!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof a!="function")throw new Error("You must pass a function as an equality function to useSelector")}var o=t(),u=o.store,c=o.subscription,f=H2(n,a,u,c);return Y.useDebugValue(f),f}}var G2=U2();M2(hx.unstable_batchedUpdates);const q2=()=>B2(),ln=G2,ic=B(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),Y2=B(e=>e,({catalog:e})=>e.state),Vb=B(ic,e=>e?e.dataClasses:[]),K2=B(ic,e=>e?e.singletons:[]),V2=B(Vb,e=>Object.values(e).filter(({virtual:t})=>t)),Z2=B(ic,e=>e?e.methods:[]),Zb=e=>B(t=>t,t=>{switch(t.catalog.state){case"loaded":const r=e?t.catalog.model.dataClasses[e]:t.catalog.model;return(r==null?void 0:r.methods)||[];default:return[]}}),J2=e=>ln(Zb(e),qb),X2=(e,t)=>B(Zb(e),r=>r.find(n=>`${n.applyTo}.${n.name}`===t)),Q2=(e,t,r)=>ln(X2(e,`${r}.${t}`),qb),Jb=B(e=>e,e=>e),ej=e=>B(In,t=>{var a;const r=t.tabs.find(({path:o})=>o===e),n=r==null?void 0:r.content.components;return!r||!n?[]:(a=Object.keys(n))==null?void 0:a.map(o=>({id:o,...n[o]}))}),Xb=e=>B(In,t=>{var n,a;const r=t.tabs.find(({path:o})=>o===e);return((a=(n=r==null?void 0:r.content)==null?void 0:n.metadata)==null?void 0:a.datasources)||[]}),tj=(e,t,r)=>B(Jb,n=>{var a,o;if(t){const u=n.sharedDatasources.sources[t];return u?u.find(c=>c.id===e):void 0}else{const u=n.root.tabs.find(f=>f.path===r);return u?(o=(a=u.content.metadata)==null?void 0:a.datasources)==null?void 0:o.find(f=>f.id===e):void 0}}),Qb=B(e=>e,e=>{var t;return((t=e.sharedDatasources)==null?void 0:t.sources)||[]}),rj=(e,t,r,n)=>B(Xb(e),Qb,(a,o)=>{const u=oe.flatten(oe.values(o)),c=[...t!=="private"?a:[],...t!=="shared"?u:[]];return r?c.filter(f=>(!n||n.every(({id:d,namespace:p=""})=>f.id!==d||(f.namespace||"")!==p))&&(r.includes(f.type)||f.dataType&&(r.includes(f.dataType)||r.includes("objectFromArray")&&f.dataType==="object"&&f.from))):c}),nj=B(e=>e.debugger,e=>e.meta),Na=B(e=>e.debugger,e=>e.list),Xt=B(e=>e.debugger,e=>e.sessions),aj=B(Xt,e=>e.length),Ra=(e,t,r,n)=>e.find(a=>a.filePath===t&&a.methodName===r&&(!n||a.className===n)),pt=(e,t)=>e.find(r=>r.threadId===t),eS=(e,t)=>e.find(r=>r.tabPath===t),ij=(e,t)=>B(Na,r=>{var n;return((n=Ra(r,e,t))==null?void 0:n.breakpoints.saved.locations)||[]}),oj=(e,t)=>B(Na,r=>{var n;return((n=Ra(r,e,t))==null?void 0:n.breakpoints.draft.locations)||[]}),sj=e=>B(Na,t=>t.filter(r=>r.filePath===e).reduce((r,n)=>[...r,...n.breakpoints.saved.locations.map(a=>({...a,line:a.line+(n.breakpoints.saved.offset||0)}))],[]).sort((r,n)=>r.line-n.line)),uj=e=>B(Na,t=>t.filter(r=>r.filePath===e).reduce((r,n)=>[...r,...n.breakpoints.draft.locations.map(a=>({...a,line:a.line+(n.breakpoints.draft.offset||0)}))],[]).sort((r,n)=>r.line-n.line)),cj=e=>B(Xt,t=>{const r=pt(t,e);return r!=null&&r.stopped?r.highlightedLines:null}),lj=e=>B(Xt,t=>{const r=pt(t,e);return r!=null&&r.stopped?r.activeLine:null}),fj=e=>B(Xt,t=>{var r;return((r=pt(t,e))==null?void 0:r.expressions)||[]}),dj=e=>B(Xt,t=>{var r;return((r=pt(t,e))==null?void 0:r.stopped)||!1}),pj=(e,t)=>B(Na,r=>{var n;return(n=Ra(r,e,t))==null?void 0:n.source}),hj=e=>B(Xt,t=>{var r;return((r=eS(t,e))==null?void 0:r.threadId)||-1}),mj=e=>B(Xt,t=>{var r,n;return(n=(r=pt(t,e))==null?void 0:r.currentStackFrame)==null?void 0:n.source}),gj=e=>B(Xt,t=>{var r;return(r=pt(t,e))==null?void 0:r.currentStackFrame}),vj=B(Xt,e=>e.map(({channelId:t,threadId:r})=>({id:t,threadId:r}))),yj=e=>B(Xt,t=>{var r;return((r=pt(t,e))==null?void 0:r.stackFrames)||[]}),bj=e=>B(Xt,t=>{var r,n;return((n=(r=pt(t,e))==null?void 0:r.variables)==null?void 0:n.callchain)||[]}),Sj=e=>B(Xt,t=>{var r,n;return((n=(r=pt(t,e))==null?void 0:r.variables)==null?void 0:n.expressions)||[]}),wj=(e,t="saved")=>B(Na,r=>{const n=r.find(a=>a.filePath===e);return(n==null?void 0:n.breakpoints[t].offset)||0}),Ej=(e,t,r,n)=>B(Xt,a=>{var d;const o=((d=pt(a,e))==null?void 0:d.exceptions)||[],u=t===N.CLASS,c=u&&n?`${n}.${r}`:r;return(c?o.filter(p=>p.location===c):o).map(p=>({...p,locationLine:u?p.locationLine:p.locationLine+1}))}),In=B(e=>e.root,e=>e),Ci=B(In,e=>e.tabs),_j=B(In,e=>e.activeTab),Tj=B(In,e=>e.recent.filter(({type:t})=>t!==N.DEBUGGER)),tS=B(In,({tabs:e,activeTab:t})=>e.find(({path:r})=>r===t)),Oj=B(In,({tabs:e})=>e.reduce((r,n)=>(n==null?void 0:n.weight)>((r==null?void 0:r.weight)||0)?n:r,null)),Cj=B(Ci,e=>e.filter(({type:t,flags:r})=>t===N.WEBFORM&&r.enabled===!1).map(({path:t})=>t)),Aj=B(Ci,e=>e.length>0),Mn=e=>B(In,t=>t.tabs.find(({path:r})=>r===e)),rS=(e,t="")=>B(Mn(e),r=>!r||!r.content||typeof r.content=="string"?r==null?void 0:r.content:oe.get(r.content,t)),xj=e=>B(Mn(e),t=>t==null?void 0:t.extra),Pj=(e,t=r=>r)=>B(rS(e,"components"),r=>t(r||{})),Sp=B(Ci,e=>e.filter(t=>t.flags.touched)),Rj=B(Sp,e=>e.length),Dj=B(Xt,e=>e.map(({threadId:t,currentStackFrame:{source:r},tabPath:n})=>({name:Lb(t,r),path:n,type:N.DEBUGGER,content:r==null?void 0:r.content,flags:{},extra:{source:r}}))),$j=B(e=>e,e=>e.explorer||[]),nS=B(e=>e,e=>e.explorer.find(t=>t.path===We.WEBFORMS)),aS=B(e=>e,e=>e.explorer.find(t=>t.path===We.METHODS)),iS=B(e=>e,e=>e.explorer.find(t=>t.path===We.CLASSES)),Ij=B(aS,e=>(e==null?void 0:e.children)||[]),Mj=B(nS,e=>{var t;return((t=e==null?void 0:e.children)==null?void 0:t.filter(r=>r.ext==="WebForm"))||[]}),Fj=B(iS,e=>(e==null?void 0:e.children)||[]),Nj=B(e=>e.modals,e=>e.list),Lj=B(e=>e.roles,e=>cc(e)),kj=B(e=>e.roles,({roles:e})=>e),jj=B(e=>e.roles,({privileges:e})=>e),Wj=B(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:t})=>t==="guest")),Bj=B(e=>e.roles,({flags:e})=>e),zj=B(e=>e.roles,({selectedTab:e})=>e),Hj=B(e=>e.roles,({forceLogin:e})=>e),Uj=B(e=>e.roles,({date:e})=>e),Ai=B(e=>e.settings,e=>e.session),Gj=(...e)=>B(Ai,t=>e.length>0?oe.pick(t,e):t),qj=e=>B(Ai,t=>t[e]),Yj=e=>B(Ai,t=>["states"].includes(e)?!0:!!t[`features.experimental.${e}`]),oS=B(e=>e.settings,e=>e.project),Kj=B(e=>e.settings,e=>e),wp=B(e=>e.settings,e=>e.server),Vj=B(wp,e=>e.remoteDebuggerMode),Zj=B(wp,e=>e.qodly),Jj=B(Ai,e=>e["monaco.zoom"]),Xj=B(oS,e=>e["webforms.i18n"]),Qj=B(Ai,e=>e["webforms.i18n.current"]),sS=["rounded-full","rounded-lg","border-gray-400","border-2","bg-red-500","bg-blue-500","bg-indigo-500","bg-transparent","bg-primary-dark","bg-green-500","bg-yellow-400","text-gray-500","text-4xl","text-white","px-4","py-2","primary","info","secondary","success","warning","danger","w-10","w-20","w-40","w-60","w-80","mb-2","mb-3","shadow","shadow-lg","shadow-xl","shadow-2xl"],uS=sS.map(e=>({id:xd(),content:"",name:e,parentId:null,scope:Pa.THEME})),Ep=e=>B(Mn(e),t=>{var r,n;return((n=(r=t==null?void 0:t.content)==null?void 0:r.metadata)==null?void 0:n.styles)||[]}),e4=(e,t)=>B(Ep(e),r=>t.map(n=>{switch(!0){case n===Pa.LOCAL:return r.map(a=>({...a,scope:Pa.LOCAL}));case n===Pa.THEME:return uS;default:return[]}}).flat()),t4=e=>B(Ep(e),t=>[...t.map(r=>({...r,scope:Pa.LOCAL})),...uS]),r4=B(e=>e,e=>{var t;return[...(((t=e.sharedCSS)==null?void 0:t.styles)||[]).map(r=>({...r,scope:Pa.SHARED}))]}),n4=e=>B(Mn(e),t=>t==null?void 0:t.flags),a4=e=>B(Mn(e),t=>t==null?void 0:t.history),i4=B(tS,e=>{const t=e!=null&&e.history?e.history.active>0:!1,r=e!=null&&e.history?e.history.active<e.history.stack.length-1:!1;return{canUndo:t,canRedo:r}}),zo=B(e=>e.webforms,e=>e),cS=B(zo,e=>(e==null?void 0:e.components)||[]),oc=B(zo,e=>e.inspector),o4=B(oc,e=>e.css),s4=B(oc,e=>e.datasource),lS=B(zo,e=>e.templates||{data:[]}),u4=B(lS,e=>e.data||[]),c4=e=>B(cS,t=>t.find(r=>r.id===e)),l4=e=>B(oc,t=>t[e]),f4=B(zo,e=>e.datasources.theme),d4=B(e=>e.root,e=>e.clipboard),p4=B(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,t,r)=>[e.state,t.state,r.state].every(n=>["loaded","error"].includes(n))),h4=e=>B(t=>t.root,t=>{var n;const r=t.tabs.find(({path:a})=>a===e);return((n=r==null?void 0:r.content)==null?void 0:n.metadata)||{}}),gi={label:"Base",id:"root"},_p=e=>e.id===gi.id,fS=(e,t=[])=>B(Mn(e),r=>{var o,u;let a=((u=(o=r==null?void 0:r.content)==null?void 0:o.metadata)==null?void 0:u.states)||[gi];return a.find(_p)||(a=[gi,...a]),a.filter(({id:c})=>!t.includes(c))}),m4=(e,t=[])=>B(fS(e,t),r=>r.map(({label:n})=>n)),g4=e=>B(Mn(e),t=>{var r,n;return((n=(r=t==null?void 0:t.content)==null?void 0:r.metadata)==null?void 0:n.defaultStates)||[]}),v4=e=>B(Mn(e),t=>{var n,a,o,u;const{currentState:r}=((n=t==null?void 0:t.content)==null?void 0:n.metadata)||{};return((u=(o=(a=t==null?void 0:t.content)==null?void 0:a.metadata)==null?void 0:o.states)==null?void 0:u.find(c=>c.id===r))||gi}),y4=B(e=>e,e=>{var t;return((t=e.savedConditions)==null?void 0:t.conditions)||[]});var Tp=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(Tp||{}),Op=(e=>(e.NONE="none",e.SAVE_ALL_AND_PROCEED="saved_all_and_proceed",e.PROCEED="proceed",e))(Op||{}),Cp=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Cp||{}),ne=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.DS_METHOD="dsMethod",e.DATACLASS_METHOD="dataclassMethod",e.ENTITY_METHOD="entityMethod",e.ENTITY_SEL_METHOD="entityselMethod",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e.SINGLETON="singleton",e.SINGLETON_METHOD="singletonMethod",e))(ne||{});const b4=[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE,ne.SINGLETON_METHOD,ne.SINGLETON,ne.METHOD],oy=e=>[ne.DS_METHOD,ne.ENTITY_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_SEL_METHOD].includes(e)?ne.METHOD:e,Ru="guest",Ap=[{key:"read",label:"Read",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.ATTRIBUTE]},{key:"execute",label:"Execute",canApplyTo:[ne.DATASTORE,ne.DATACLASS,ne.METHOD,ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD,ne.SINGLETON,ne.SINGLETON_METHOD]},{key:"promote",label:"Promote",canApplyTo:[ne.METHOD,ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD,ne.SINGLETON_METHOD]}];function Rr(e,...t){return Array.from(new Set([...e,...t]))}function dS(e){const t={},r=new Map;e.forEach(f=>{const d=f.id||fi.generate();t[d]={...f,id:d,parents:[],includes:Rr(f.includes||[]),resources:[]},r.set(f.privilege,d)}),Object.entries(t).forEach(([f,d])=>{const p=d.includes.map(m=>{const g=r.get(m);return g?(t[g].parents=Rr(t[g].parents,g),g):""}).filter(Boolean);t[f]={...d,includes:p}});const n=pS(t),a=new Set;function o(f){a.add(f.id),f.includes=f.includes.filter(d=>!a.has(d))}if(n.forEach(o),n.forEach(f=>f.parents=[]),n.forEach(f=>{f.includes.forEach(d=>t[d].parents.push(f.id))}),Object.values(t).find(({privilege:f})=>f===Ru))return t;const c=fi.generate();return{[c]:{id:c,privilege:Ru,includes:[],parents:[],resources:[]},...t}}function pS(e){return Object.values(e).sort((t,r)=>t.parents.length-r.parents.length)}function sc(e,t){const r=t[e];let n=[];return r&&r.parents.forEach(a=>{n=Rr(n,...sc(a,t),a)}),n}function Du(e,t){const r=t[e];let n=[];return r&&r.includes.forEach(a=>{n=Rr(n,...Du(a,t),a)}),n}function S4(e,t){const r=t[e];if(!r)return[];const n=[e,...sc(e,t),...r.includes];return Object.keys(t).filter(a=>!n.includes(a))}function w4(e,t){return t[e]?Object.keys(t).reduce((n,a)=>a===e?n:{...n,[a]:{...t[a],parents:t[a].parents.filter(o=>o!==e),includes:t[a].includes.filter(o=>o!==e)}},{}):t}function E4(e,t,r){const n=r[e],a=r[t];return!n||!a?r:{...r,[e]:{...r[e],includes:Rr(n.includes,t)},[t]:{...r[t],parents:Rr(a.parents,e)}}}function _4(e,t,r){const n=r[e],a=r[t];return!n||!a?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(o=>o!==t)},[t]:{...r[t],parents:r[t].parents.filter(o=>o!==e)}}}function hS(e,t){z0(e),Object.entries(t).forEach(([,{privilege:n}])=>{if(e.toLowerCase()===n.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=fi.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...t}}function T4(e,t,r,n,a){let o=hS(e,a);const u=Object.entries(o).find(([,c])=>c.privilege===e);return u?(o=yS(u[1].id,t,r,n,o),o):a}function O4(e,t,r){if(!e)throw new Error("Please enter a name");if(!r[t])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:n,id:a}])=>{if(e.toLowerCase()===n.toLowerCase()&&t!==a)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[t]:{...r[t],privilege:e}}}function C4(e,t){return e.map(r=>fn(r,t))}function fn(e,t){return t[e]?t[e]:null}function mS({applyTo:e,type:t,...r}){return Object.entries(r).reduce((n,[a,o])=>{const u=oe.find(Ap,["key",a]);return!u||!u.canApplyTo.includes(t)||(typeof o=="string"?o.split(","):o).forEach(f=>{n[f]=Rr(n[f]||[],a)}),n},{})}const hd=(e,t=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${t?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${t?"through the model (DataStore, Dataclasses, Entity selections, Entities) have the execute permission":"on this Dataclass, Entity selection class, Entity class have the execute permission"}`:`All ${t?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function xp(e){return{permissions:Ap.filter(({canApplyTo:t})=>t.includes(e.type)).map(({key:t,label:r})=>{const n={name:t,from:[]};switch(e.type){case ne.DATASTORE:return{...n,info:hd(r,!0)};case ne.DATACLASS:return{...n,info:hd(r)};default:return n}}),resource:e.applyTo,type:e.type}}function gS(e,t){const r=vS(t),n={};return e.filter(({type:a})=>b4.includes(a)).forEach(a=>{const o=mS(a);Object.entries(o).forEach(([u,c])=>{var p;const f=(p=r[u])==null?void 0:p.id;if(!f)return;n[f]=n[f]||{...t[f]};let d=oe.find(n[f].resources,{resource:a.applyTo,type:a.type});d||(d=xp(a),n[f].resources.push(d)),d.permissions=d.permissions.map(m=>({...m,checked:m.checked||c.includes(m.name)}))})}),{...t,...n}}function vS(e){return Object.values(e).reduce((t,r)=>({...t,[r.privilege]:r}),{})}function uc(e){var r;const t=dS(e.privileges||[]);return{forceLogin:(e==null?void 0:e.forceLogin)||!1,privileges:gS(((r=e.permissions)==null?void 0:r.allowed)||[],t),roles:(e.roles||[]).map(({id:n=fi.generate(),role:a,privileges:o=[]})=>({id:n,role:a,privileges:Rr(o).map(u=>{var c;return(c=Object.values(t).find(({privilege:f})=>f===u))==null?void 0:c.id}).filter(Boolean)})).reduce((n,a)=>({...n,[a.id]:{...a}}),{})}}function cc(e){const t=Object.values(e.privileges).filter(({includes:n})=>n.length===0).map(({id:n})=>n),r=[...t,...t.map(n=>sc(n,e.privileges).reverse())].flat().filter((n,a,o)=>o.indexOf(n)===a).map(n=>e.privileges[n]);return{forceLogin:e.forceLogin||!1,permissions:{allowed:Object.values(e.privileges).reduce((n,a)=>(a.resources.forEach(({permissions:o,resource:u,type:c})=>{let f=oe.find(n,{applyTo:u,type:oy(c)});f||(f={applyTo:u,type:oy(c)},n.push(f)),o.forEach(({name:d,checked:p})=>{p&&f&&(f[d]=f[d]||[],f[d].push(a.privilege))})}),n),[])},privileges:r.filter(({privilege:n})=>n!==Ru).map(({id:n,includes:a,privilege:o})=>({id:n,privilege:o,includes:a.map(u=>e.privileges[u].privilege)})),roles:Object.values(e.roles).map(n=>({...n,privileges:n.privileges.map(a=>{var o;return(o=e.privileges[a])==null?void 0:o.privilege}).filter(Boolean)}))}}function A4(e,t){const r=t[e],n={children:[],links:[],parents:[],selected:e};if(!r)return n;function a(c,f,d=[]){const p=c.reduce((m,g)=>[...m,...t[g][f]],[]);return p.length===0?d:(d.push(p),a(p,f,d))}function o(c){const f=[],d=[];for(let p=c.length-1;p>=0;p-=1){const m=c[p].filter(g=>f.includes(g)?!1:(f.push(g),!0));m.length>0&&d.unshift(Rr(m))}return d}function u(c,f){const d=[];return c.reduce((p,m)=>(m.forEach(g=>{t[g][f==="parents"?"includes":"parents"].forEach(E=>{d.includes(E)&&p.push(f==="parents"?{source:g,target:E}:{source:E,target:g})}),d.push(g)}),p),[])}return n.children=a([e],"includes"),n.children=o(n.children),n.parents=a([e],"parents"),n.parents=o(n.parents),n.links=[...u([[e],...n.parents],"parents"),...u([[e],...n.children],"includes")],n}function x4(e,t,r){const n=fn(e,r);if(!n||oe.find(n.resources,{resource:t.applyTo,type:t.type}))return r;const a={...n,resources:[...n.resources,xp(t)]};return{...r,[e]:a}}function P4(e,t,r){const n=fn(e,r);if(!n)return r;const a={...n,resources:n.resources.filter(({resource:o,type:u})=>o!==t.applyTo||u!==t.type)};return{...r,[e]:a}}function R4(e,t){const r=Object.entries(e).map(([n,a])=>{const o=fn(n,t);if(!o)return{[n]:t[n]};const u={...o,resources:o.resources.filter(({resource:c,type:f})=>!a.some(d=>d.applyTo===c&&d.type===f))};return{[n]:u}}).reduce((n,a)=>({...n,...a}),{});return{...t,...r}}function D4(e,t){const r=fn(e,t);if(!r)return t;const n={...r,resources:r.resources.filter(a=>a.permissions.some(o=>o.from.length)).map(a=>({...a,permissions:a.permissions.map(o=>({...o,checked:!1}))}))};return{...t,[e]:n}}function yS(e,t,r,n,a){const o=fn(e,a);if(!o)return a;const c=oe.find(o.resources,{type:r,resource:t})?{...o,resources:o.resources.map(f=>f.type===r&&f.resource===t?{...f,permissions:f.permissions.map(d=>d.name===n?{...d,checked:!d.checked,from:[]}:d)}:f)}:{...o,resources:[...o.resources,{type:r,resource:t,permissions:Ap.filter(f=>f.canApplyTo.includes(r)).map(f=>({from:[],name:f.key,checked:f.key===n,info:hd(f.key,r===ne.DATASTORE)}))}]};return{...a,[e]:c}}function $4(e,t,r,n){const a=fn(e,n);if(!a)return n;const u=oe.find(a.resources,{type:t.type,resource:t.resource})?{...a,resources:a.resources.map(c=>c.type===t.type&&c.resource===t.resource?{...c,permissions:t.permissions.map(f=>f.name===r.name?{...f,checked:!f.checked,from:[]}:f)}:c)}:{...a,resources:[...a.resources,{...t,permissions:t.permissions.map(c=>({...c,checked:r.name===c.name,from:[]}))}]};return{...n,[e]:u}}function I4(e,t){var f;const r=bS(e,t)||[],n=((f=fn(e,t))==null?void 0:f.resources)||[],u=([...r,...n].filter(({type:d})=>[ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD].includes(d))||[]).map(({resource:d})=>d);return Object.entries(t).reduce((d,[p,{resources:m}])=>(m.filter(({resource:g,type:y})=>[ne.DS_METHOD,ne.DATACLASS_METHOD,ne.ENTITY_METHOD,ne.ENTITY_SEL_METHOD].includes(y)&&u.includes(g)).forEach(({permissions:g,resource:y})=>{var S;((S=g.find(({name:T})=>T==="promote"))==null?void 0:S.checked)&&(d[y]=Rr(d[y]||[],p))}),d),{})}function bS(e,t){var u;const r=fn(e,t);if(!r)return[];const n=(u=Object.values(t).find(c=>c.privilege===Ru))==null?void 0:u.id;return(n&&n!==e?Rr(Du(e,t),n):Du(e,t)).reduce((c,f)=>(t[f].resources.forEach(p=>{if(p.permissions.filter(({checked:y,name:E})=>y&&E!=="promote").length===0)return;const g=oe.find(c,{type:p.type,resource:p.resource});if(!g){c.push({...p,permissions:p.permissions.map(y=>({...y,from:y.checked?[f]:[],checked:!1}))});return}g.permissions=g.permissions.map((y,E)=>{let{from:S=[]}=y;return p.permissions[E].checked&&!S.includes(f)&&(S=[...S,f]),{...y,from:S,checked:y.checked}})}),c),oe.clone(r.resources.map(c=>({...c,permissions:c.permissions.map(({checked:f,...d})=>({...d,checked:!!f}))}))))}const M4=e=>e.reduce((t,r)=>({...t,[r.id]:{...r}}),{}),F4=(e,t)=>t[e]?Object.values(t).reduce((r,n)=>e===n.id||n.role===""?r:{...r,[n.id]:n},{}):t,N4=(e,t,r)=>r[e]?Object.values(r).reduce((n,a)=>e===a.id?{...n,[a.id]:{...a,name:t}}:{...n,[a.id]:a},{}):r,L4=(e,t,r)=>{const n={id:e,role:t,privileges:[]};return{...r,[n.id]:n}},k4=(e,t)=>{if(z0(e.role),Object.values(t).find(n=>n.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(t).reduce((n,a)=>e.id===a.id?{...n,[e.id]:e}:{...n,[a.id]:a},{})},j4={list:[]},sy=(e,t)=>e.list.filter(r=>r.id!==t),SS=yr({name:"modals",initialState:j4,reducers:{createModal:(e,t)=>{e.list.push(t.payload)},editModal:(e,t)=>{const{id:r,...n}=t.payload,a=e.list.find(RM(r));a&&Object.assign(a,{...n})},removeModal:(e,t)=>{const r=t.payload;e.list=sy(e,r)},closeModal:(e,t)=>{const{id:r,reason:n}=t.payload;if(n){const a=e.list.find(o=>o.id===r);a&&(a.closeReason=n,a.isOpen=!1)}else e.list=sy(e,r)}}}),{createModal:wS,removeModal:ES,closeModal:W4,editModal:B4}=SS.actions,Dr=Z("modals/open",async(e,{dispatch:t})=>{const r=xw(),{type:n=gr.ALERT}=e,a=xd();switch(t(wS({id:a,type:n,isOpen:!0,...e})),n){case gr.CONFIRM:return new Promise(o=>{const u=r.subscribe(()=>{var d;const{modals:c}=r.getState(),f=c.list.find(p=>p.id===a);if(f&&!f.isOpen){const p=f.closeReason===x0.CONFIRMED,m=oe.entries((d=f.views)==null?void 0:d.toggles).reduce((g,y)=>({...g,[y[0]]:y[1].value}),{});t(ES(a)),u(),o({confirmed:p,options:m})}})});default:return{}}}),_S=()=>JF({name:Ot}),TS="Roles & Privileges",$u=Z("roles/fetchRoles",async(e,{dispatch:t,rejectWithValue:r})=>{var o;let n;try{n=await _S()}catch(u){if(!Array.isArray((o=u==null?void 0:u.data)==null?void 0:o.__ERROR))return r("Error while loading the roles");n={name:Ot,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const a={name:TS,type:N.ROLES,date:n.date,view:{panel:{isOpen:!1,type:"",current:""}},path:Ot,flags:{},extra:{editor:{key:"editors:roles"}},content:{}};return t(Jt(a)),{...n,content:uc(n.content)}}),OS=Z("roles/fetchRolesChanges",async(e,{getState:t})=>{const{tabs:r}=t().root;if(r.find(a=>a.path===Ot)){const{date:a}=t().roles;if(a&&await Pp(a))return{old:!0}}return{}}),Pp=async e=>{if(!e)return!1;try{const t=await _S();if(t.date){const r=new Date(e),n=new Date(t.date);if(r>n)return!0}}catch(t){if(!Array.isArray(t==null?void 0:t.data.__ERROR))throw t}return!1},md=Z("roles/saveRoles",async(e,{getState:t,rejectWithValue:r,dispatch:n})=>{try{const{flags:a,date:o}=t().roles;if(a.old||await Pp(o)){const{confirmed:f}=await n(Dr({title:TS,message:"New content has been found on the server. Are you sure you want to continue?",type:gr.CONFIRM,icon:"FdSave"})).unwrap();if(!f)return r({old:!0})}return await ra({name:Ot,content:cc(e)})}catch{return r("Error while loading the roles")}}),CS=yr({name:"roles",initialState:()=>{const{roles:e}=Si(),{roles:t={},privileges:r={},flags:n={touched:!1},date:a,selectedTab:o="roles"}=e||{};return{flags:n,roles:t,privileges:r,date:a,selectedTab:o}},reducers:{updatePrivileges:(e,t)=>{e.privileges=t.payload,e.flags.touched=!0},updateRoles:(e,t)=>{e.roles=t.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,t)=>{e.roles=t.payload.roles,e.privileges=t.payload.privileges},toggleTab:(e,t)=>{e.selectedTab=t.payload},toggleForceLogin:(e,t)=>{e.forceLogin!==t.payload&&(e.forceLogin=t.payload,e.flags.touched=!0)},setRolesContent(e,t){const{content:r,flags:n={},...a}=t.payload,o=uc(r),u={...e.flags,...n};return{...e,...o,...a,flags:u}}},extraReducers(e){e.addCase($u.fulfilled,(t,r)=>{const{content:n,date:a}=r.payload;t={...t,...n,date:a}}).addCase($u.rejected,t=>({...t,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(md.fulfilled,(t,r)=>({...t,flags:{...t.flags,confirmed:!0,touched:!1,old:!1},date:r.payload.date})).addCase(md.rejected,(t,r)=>rM.isString(r.payload)?t:{...t,flags:{...t.flags,...r.payload}}).addCase(OS.fulfilled,(t,r)=>({...t,flags:{...t.flags,...r.payload}})).addCase(si.fulfilled,(t,r)=>{!r.payload||r.payload.path!==Ot||(t.flags.touched=!1,t.flags.old=!1)}).addCase(Np.fulfilled,(t,r)=>{r.meta.arg!==Ot||!r.payload||(t.flags.touched=!1,t.flags.old=!1)})}}),{updatePrivileges:AS,updateRoles:xS,setRolesContent:Rp,toggleTab:z4,toggleForceLogin:H4,updateRolesAndPrivileges:Dp}=CS.actions,U4=CS.reducer,$p=Z("settings/fetch",async()=>await cn({verb:qe.GET_INFO,path:ca,content:!0,as:"json"})),PS=Z("settings/app",qF),G4=lp(),uy={session:{"studio.tips":!0,"studio.notifications":!0,"studio.enablePreview":!1,"studio.tipsBaseUrl":"https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build","webforms.tooltip.behavior":Tp.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"webforms.renderer.showUnsavedPopOver":!0,"webforms.renderer.unsavedPopOverChoice":Op.NONE,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0,"webforms.i18n.current":"","model.viewport":{zoom:1,y:0,x:0}},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral","webforms.i18n":{supported:[],primary:""}},server:{projectOpened:!1,remoteDebuggerMode:Zd.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},q4={...uy,session:{...uy.session,...G4},welcometour:{}},RS=yr({name:"settings",initialState:q4,reducers:{setSetting(e,t){const{path:r,settingsKey:n,value:a}=t.payload;e[r][n]=a},setSettings(e,t){const{path:r,value:n}=t.payload;e[r]={...e[r],...n}},setSettingsAsText(e,t){const{path:r,settings:n}=t.payload;e[r]=n}},extraReducers(e){e.addCase($p.fulfilled,(t,r)=>{t.project={...t.project,...r.payload.content}}),e.addCase(PS.fulfilled,(t,r)=>{t.server=r.payload,t.server.qodly&&(t.project["webforms.display-mode"]="airy")})}}),{setSetting:gd,setSettings:lc,setSettingsAsText:Y4}=RS.actions,K4=RS.reducer,vd=e=>{const t=["folder","file"];return e.sort((r,n)=>r.type===n.type?r.name.localeCompare(n.name):t.indexOf(r.type)-t.indexOf(n.type))},xe=(e,t)=>e.reduce((r,n)=>n.path===t.path&&n.type===t.type&&n.id===t.id?[...r,t]:n.children?[...r,{...n,children:vd(xe(n.children,t))}]:[...r,n],[]),dt=(e,t)=>e.reduce((r,n)=>r||(n.path===t?n:n.children?dt(n.children,t):null),null),DS=[{name:We.WEBFORMS,type:N.FOLDER,children:[],path:We.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:We.METHODS,type:N.FOLDER,children:[],path:We.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:We.CLASSES,type:N.FOLDER,children:[],path:We.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:We.SHARED,type:N.FOLDER,children:[],path:We.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:N.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:N.FILE,ext:"json",path:Ot,error:null,flags:{},config:{editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},isRoot:!0},{name:"Model",type:N.MODEL,ext:"4DModel",path:jo,error:null,flags:{},config:{editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]}},{name:"HTTP Handlers",type:N.HTTP_HANDLERS,ext:"json",path:Qr,error:null,flags:{},config:{editor:{key:"editors:http-handlers"},supportedEditors:[{key:"editors:code",config:{language:"json"}}]}},{name:"Settings",type:N.FILE,ext:"json",path:"qodlyApp.json",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],V4=lp(),Z4=!!oe.get(V4,"features.experimental.reports");Z4&&DS.unshift({name:We.REPORTS,type:N.FOLDER,children:[],path:We.REPORTS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:report:explorer:reports",config:{},isRoot:!0});const $S=yr({name:"explorer",initialState:DS,reducers:{renameClassesFolder:(e,t)=>{const{payload:r}=t,n=e.find(u=>u.name==="Classes");if(!n||!n.children||n.children.length===0)return e;const a=e.findIndex(u=>u.name==="Classes"),o=(u,c)=>{switch(u){case"dataclass":return c;case"entity":return`${c}Entity`;default:return`${c}Selection`}};return r.forEach(({newName:u,prevName:c})=>{var f;n.children=(f=n.children)==null?void 0:f.map(d=>{var p;return d.path.endsWith("[<QODLY_ID>]")&&d.name===c?{...d,name:u,path:`Classes/${u}___[<QODLY_ID>]`,children:(p=d.children)==null?void 0:p.map(m=>{var g;return{...m,path:m.path.replace(c,u),info:{...m.info,filename:o((g=m.info)==null?void 0:g.kind,u),dataclass:u}}})}:d})}),e[a]=n,e},removeClassesFolder:(e,t)=>{const{payload:r}=t;if(!r||r.length===0)return e;const n=e.find(u=>u.name==="Classes");if(!(n!=null&&n.children)||n.children.length===0)return e;const a=e.findIndex(u=>u.name==="Classes");let o=[];return r.forEach(u=>{var f,d;const c=(f=n.children)==null?void 0:f.find(p=>p.name===u);if(c){let p=(d=c.children)==null?void 0:d.filter(m=>{var g;return(g=m.info)==null?void 0:g.exist});p&&(p==null?void 0:p.length)>0&&(p=p.map(m=>{var g;return{...m,name:(g=m.info)==null?void 0:g.filename,info:{...m.info,kind:"userClass"}}}),o=o.concat(p))}}),n.children=n.children.filter(u=>!r.includes(u.name)),n.children=n.children.concat(o),n.children.sort((u,c)=>u.name==="DataStore"?-1:c.name==="DataStore"?1:u.type===N.CLASS_FOLDER&&c.type===N.CLASS_FOLDER||u.type===N.CLASS&&c.type===N.CLASS?u.name.localeCompare(c.name):u.type===N.CLASS_FOLDER&&c.type!==N.CLASS_FOLDER?-1:1),e[a]=n,e},addClassesFolder:(e,t)=>{const{payload:r}=t;if(r.length===0)return e;const n=e.find(u=>u.name==="Classes");if(!(n!=null&&n.children)||n.children.length===0)return e;const a=e.findIndex(u=>u.name==="Classes");let o=0;return n.children.forEach((u,c)=>{u.type===N.CLASS_FOLDER&&(o=c)}),r.forEach(u=>{var c;n.children=(c=n.children)==null?void 0:c.filter(f=>{var p,m;const d=(p=u.children)==null?void 0:p.find(g=>{var y;return((y=g.info)==null?void 0:y.filename)===f.name});return d&&(u.children=(m=u.children)==null?void 0:m.map(g=>{var y;return((y=g.info)==null?void 0:y.filename)===f.name?{...g,info:{...g.info,exist:!0}}:g})),!d})}),r.forEach(u=>{var c;(c=n==null?void 0:n.children)==null||c.splice(o+1,0,u)}),n.children.sort((u,c)=>u.name==="DataStore"?-1:c.name==="DataStore"?1:u.type===N.CLASS_FOLDER&&c.type===N.CLASS_FOLDER?u.name.localeCompare(c.name):u.type===N.CLASS_FOLDER&&c.type!==N.CLASS_FOLDER?-1:1),e[a]=n,e},toggleExpandFolder:(e,t)=>(e=xe(e,{...t.payload,flags:{...t.payload.flags,expanded:!t.payload.flags.expanded}}),e),expandFolder:(e,t)=>(e=xe(e,{...t.payload,flags:{...t.payload.flags,expanded:!0}}),e),openAddFileInput:(e,t)=>xe(e,{...t.payload,flags:{...t.payload.flags,adding:!0}}),addNewFile:(e,t)=>{const{parent:r,child:n}=t.payload;return xe(e,{...r,children:[n,...r.children||[]]})},removeFile:(e,t)=>{const{parent:r,child:n}=t.payload;return xe(e,{...r,children:r.children.filter(a=>a.path!==n.path)})},refreshFile:(e,t)=>{const{parent:r,child:n}=t.payload,a=(r.children||[]).filter(o=>o.path!==n.path&&!n.error);return xe(e,{...r,children:[n,...a]})},setFolderChildren:(e,t)=>{const r=dt(e,t.payload.parentPath);return r?xe(e,{...r,children:t.payload.children}):e}},extraReducers:e=>{e.addCase(oi.pending,(t,r)=>{const{file:n,newname:a}=r.meta.arg,o=dt(t,n.path);if(!o)return t;const u=n.path.split("/");u.pop();const c=`${u.join("/")}/${n.name}.${n.ext}`,f=`${u.join("/")}/${a}.${n.ext}`;switch(n.ext){case"4dm":case"4qs":Zr.next({action:Wr.WILL_RENAME,payload:{oldPath:c,newPath:f}});break}return xe(t,{...o,flags:{...o.flags,loading:!0}})}),e.addCase(oi.fulfilled,(t,r)=>{const{meta:{arg:{file:n}},payload:a}=r,o=dt(t,n.path);if(!o)return t;switch(a.old.ext){case"4dm":case"4qs":Zr.next({action:Wr.DID_RENAME,payload:{oldPath:a.old.path,newPath:a.new.path}});break}return xe(t,{...o,flags:{...o.flags,loading:!1}})}),e.addCase(oi.rejected,(t,r)=>{const{file:n}=r.meta.arg,a=dt(t,n.path);return a?xe(t,{...a,flags:{...a.flags,loading:!1}}):t}),e.addCase(na.pending,(t,r)=>{const n=typeof r.meta.arg=="string"?r.meta.arg:r.meta.arg.nodePath,a=dt(t,n);return a?xe(t,{...a,flags:{...a.flags,loading:!0}}):t}),e.addCase(na.fulfilled,(t,r)=>{const n=typeof r.meta.arg=="string"?r.meta.arg:r.meta.arg.nodePath,a=dt(t,n);return a?xe(t,{...a,children:vd(r.payload),flags:{...a.flags,loading:!1,cached:!0,expanded:!0},error:null}):t}),e.addCase(na.rejected,(t,r)=>{const n=typeof r.meta.arg=="string"?r.meta.arg:r.meta.arg.nodePath,a=dt(t,n);return a?xe(t,{...a,error:{message:r.payload},flags:{...a.flags,loading:!1,cached:!0,expanded:!0}}):t}),e.addCase(co.pending,(t,r)=>{const n=r.meta.arg,a=dt(t,n);return a?xe(t,{...a,flags:{...a.flags,loading:!0}}):t}),e.addCase(co.fulfilled,(t,r)=>{const n=r.meta.arg,a=dt(t,n);return a?xe(t,{...a,children:vd(r.payload),flags:{...a.flags,loading:!1,cached:!0,expanded:!1},error:null}):t}),e.addCase(co.rejected,(t,r)=>{const n=r.meta.arg,a=dt(t,n);return a?xe(t,{...a,error:{message:r.payload},flags:{...a.flags,loading:!1,cached:!0,expanded:!1}}):t}),e.addCase(Qs.pending,(t,r)=>{const{fileName:n,parentNode:a,path:o,type:u}=r.meta.arg,c=Yn(u),f=`${o}/${n}${c?`.${c}`:""}`;return xe(t,{...a,children:[{name:n,path:f,type:u,error:null,flags:{loading:!0},config:{}},...a.children]})}),e.addCase(Qs.fulfilled,(t,r)=>{const{path:n,fileName:a,type:o}=r.meta.arg,u=Yn(o),c=`${n}${u?`.${u}`:""}`,{editor:f,supportedEditors:d}=Ut(c);return xe(t,{id:`${c}-${Date.now()}`,name:a,path:c,type:o,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:d}})}),e.addCase(Qs.rejected,(t,r)=>{const{path:n,fileName:a,type:o}=r.meta.arg,u=Yn(o),c=`${n}${u?`.${u}`:""}`;return xe(t,{name:a,path:c,type:o,error:{message:r.payload},flags:{loading:!1},config:{}})}),e.addCase(eu.pending,(t,r)=>{const{node:n,parentNode:a}=r.meta.arg,o=`${n.name}_copy`,u=`${n.path}/${o}${n.ext?`.${n.ext}`:""}`;return xe(t,{...a,children:[{name:o,path:u,type:n.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...a.children]})}),e.addCase(eu.fulfilled,(t,r)=>{const{node:n}=r.payload,a=Bb(n.name),o=`${n.path}/${n.name}`,{editor:u,supportedEditors:c}=Ut(o);return xe(t,{name:a,path:o,type:n.type,error:null,flags:{loading:!1},config:{editor:u,supportedEditors:c}})}),e.addCase(eu.rejected,(t,r)=>{const n=r.payload,{node:a}=r.meta.arg,o=`${a.name}_copy`,u=`${a.path}/${o}${a.ext?`.${a.ext}`:""}`;return xe(t,{name:o,path:u,type:a.type,error:{message:n},flags:{loading:!1},config:{}})}),e.addCase(fo.pending,()=>{}),e.addCase(fo.fulfilled,(t,r)=>{var m;const{draggedNode:n,newLocation:a}=r.meta.arg,o=Wb(n.path),u=dt(t,o),c=dt(t,a.path),f=(m=u==null?void 0:u.children)==null?void 0:m.filter(g=>g.path!==n.path),d=a.path.split("/").length,p=n.path.split("/").length;return d>=p?(t=xe(t,{...u,children:f}),t=xe(t,{...c,children:[{...n,path:`${c.path}/${n.name}`},...c!=null&&c.children?c.children:[]],flags:{...c.flags,expanded:!0}})):(t=xe(t,{...c,children:[{...n,path:`${c.path}/${n.name}`},...c!=null&&c.children?c.children:[]],flags:{...c.flags,expanded:!0}}),t=xe(t,{...u,children:f})),t}),e.addCase(fo.rejected,()=>{Hr.next({message:"Error moving file",kind:"danger"})}),e.addCase(ii.pending,(t,r)=>{var S;const{fileName:n,parentNode:a,path:o,type:u,qodly:c}=r.meta.arg,f=Yn(u,c),d=`${o}/${n}${f?`.${f}`:""}`,{editor:p,supportedEditors:m}=Ut(d);switch(u){case N.CLASS:case N.METHOD:Zr.next({action:Wr.WILL_CREATE,payload:{filePath:d}});break}const y=[...(S=a.children)==null?void 0:S.filter(T=>T.path!==d),{name:n,path:d,type:u===N.CLASS?u:N.FILE,error:null,flags:{loading:!0},config:{editor:p,supportedEditors:m},ext:f,date:new Date().toISOString(),info:{exist:!0,kind:u===N.CLASS?"userClass":""}}],E=xe(t,{...a,children:y});return oe.merge(t,E)}),e.addCase(ii.fulfilled,(t,r)=>{const{fileName:n,path:a,type:o,qodly:u}=r.meta.arg,c=Yn(o,u),f=`${a}/${n}${c?`.${c}`:""}`,{editor:d,supportedEditors:p}=Ut(f),m=xe(t,{name:n,path:f,type:N.FILE,error:null,flags:{},config:{editor:d,supportedEditors:p},ext:c,date:new Date().toISOString(),info:{exist:!0,kind:o===N.CLASS?"userClass":""}});switch(o){case N.CLASS:case N.METHOD:Zr.next({action:Wr.DID_CREATE,payload:{filePath:f}});break}return t=m,t}),e.addCase(ii.rejected,(t,r)=>{const{fileName:n,path:a,type:o}=r.meta.arg,u=Yn(o),c=`${a}${u?`.${u}`:""}`,{editor:f,supportedEditors:d}=Ut(c);return t=xe(t,{name:n,path:c,type:N.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:d},ext:u,date:new Date().toISOString()}),t}),e.addCase(kS.rejected,t=>{const r=dt(t,Qr);return r&&(t=xe(t,{...r,flags:{...r.flags,disabled:!0}})),t}),e.addMatcher(Iy(lo),(t,r)=>{const n=dt(t,r.meta.arg.file.path);return n&&(t=xe(t,{...n,flags:{...n.flags,loading:!0}})),t}),e.addMatcher(Fy(lo),(t,r)=>{const n=dt(t,r.meta.arg.file.path),a=n!=null&&n.info?{...n.info,exist:!0}:void 0;return n&&(t=xe(t,{...n,flags:{...n.flags,loading:!1,disabled:!1},info:a})),t}),e.addMatcher(My(lo),(t,r)=>{const n=dt(t,r.meta.arg.file.path);return n&&(t=xe(t,{...n,flags:{...n.flags,loading:!1}})),Hr.next({message:"Failed to open file, try again",kind:"danger"}),t})}}),{toggleExpandFolder:J4,expandFolder:X4,openAddFileInput:Q4,addNewFile:IS,refreshFile:e3,removeFile:yd,setFolderChildren:t3,addClassesFolder:r3,removeClassesFolder:n3,renameClassesFolder:a3}=$S.actions,cy=[{name:"onServerStartup.4qs",content:`var error : object
|
|
90
144
|
var obj : object
|
|
91
145
|
var startUpExists : boolean
|
|
92
146
|
var myWebServer : object = webServer
|
|
@@ -152,35 +206,10 @@ catch
|
|
|
152
206
|
end
|
|
153
207
|
|
|
154
208
|
end
|
|
155
|
-
`}];function
|
|
156
|
-
`;default:return""}}function lv(e,r,t){switch(r){case v.FileFolderType.MOBILEFORM:return`${e}.MForm`;case v.FileFolderType.WEBFORM:return`${e}.WebForm`;case v.FileFolderType.REPORT:return`${e}.QoDoc`;case v.FileFolderType.METHOD:case v.FileFolderType.CLASS:return`${e}.${t?"4qs":"4dm"}`;default:return e}}function PP(e){switch(e){case v.FolderRootPath.WEBFORMS:return v.FileFolderType.WEBFORMS;case v.FolderRootPath.METHODS:return v.FileFolderType.METHODS;case v.FolderRootPath.CLASSES:return v.FileFolderType.CLASSES;case v.FolderRootPath.REPORTS:case"Reports":return v.FileFolderType.REPORT;case"Mobile":return v.FileFolderType.MOBILE;default:return e}}function fv(e){switch(e){case v.FileFolderType.WEBFORMS:return v.FileFolderType.WEBFORM;case v.FileFolderType.REPORT:return v.FileFolderType.REPORT;case v.FileFolderType.CLASSES:return v.FileFolderType.CLASS;case v.FileFolderType.METHODS:return v.FileFolderType.METHOD;case v.FileFolderType.FOLDER:return v.FileFolderType.FOLDER;case v.FileFolderType.MOBILE:return v.FileFolderType.MOBILEFORM;default:return e}}const FP=Q("files/tryEditMethod",async({method:e},{dispatch:r})=>{const t=e.filePath.split("/"),[a]=t[1].split("."),{editor:s}=Tt(e.filePath);return await r(al({file:{name:a,path:e.filePath,date:new Date().toISOString(),type:v.FileFolderType.CLASS,editor:s},line:e.startingLine+1})).unwrap()}),bu=Q("explorer/createModelFiles",async(e,{dispatch:r,getState:t})=>{var y;const a=t(),s=v.FolderRootPath.CLASSES,i=a.settings.server.qodly,u=nt(a.explorer,s);if(!u)return;await r(tn(s));const f=((y=t().explorer.find(_=>_.name===s))==null?void 0:y.children)||[];let p=[{content:"",name:""}];if(e.type==="dataclass"&&!e.toCreate){const{className:_,collectionName:E}=e;p=[{...Sn().dataclass({name:_,qodly:i})},{...Sn().collection({name:E,qodly:i})},{...Sn().entity({name:_,qodly:i})}]}else if(e.type==="dataclass"&&e.toCreate){const{className:_,collectionName:E}=e;p=[{...Sn()[e.toCreate]({name:_||E,qodly:i})}]}else p=[{...Sn().model({name:"DataStore",qodly:i})}];p=p.filter(_=>!f.find(({name:E,ext:T,info:{exist:C=!0}={}})=>E===_.name&&T===(i?"4qs":"4dm")&&C)),await Promise.all(p.map(async({name:_,content:E})=>{await r(Gn({type:v.FileFolderType.CLASS,path:s,fileName:_,parentNode:u,content:E,qodly:a.settings.server.qodly}))}));const h=e.type==="dataclass"&&e.expand?e.className:"";await r(tn({nodePath:s,expandDataclass:h}))}),tn=Q("explorer/fetchFolderContent",async(e,{rejectWithValue:r,getState:t})=>{const{nodePath:a,expandDataclass:s=""}=typeof e=="string"?{nodePath:e}:e,i=t();try{const u=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:a});return i.catalog.state!=="loaded"?[]:a==="Classes"?ou(i,u,s):u.map(l=>{const f=`${a}/${l.name}${l.ext?`.${l.ext}`:""}`,{editor:p,supportedEditors:h}=Tt(f);return{name:l.name,size:l.size,type:l.type,date:`${l.date}`,flags:{},error:null,path:f,ext:l.ext,config:l.type==="folder"?{}:{editor:p,supportedEditors:h}}})}catch{return r("Failed loading file content please Reload"),a==="Classes"?ou(i,[],s):[]}},{getPendingMeta:()=>{}}),Ia=Q("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:r})=>{try{return(await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e})).map(a=>{const s=`${e}/${a.name}${a.ext?`.${a.ext}`:""}`,{editor:i,supportedEditors:u}=Tt(s);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:s,ext:a.ext,config:a.type==="folder"?{}:{editor:i,supportedEditors:u}}})}catch{return r("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function IP(e){const r=e.split(".");return r.pop(),{name:r.join("."),ext:e.split(".")[e.split(".").length-1]}}const MP=Q("explorer/uploadFileAndGetResponse",async e=>{const r=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const t=await fetch(`/rest/$upload?${r}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:t.status,data:await t.json()}}catch{return{status:500,data:null}}}),$P=Q("explorer/uploadFile",async({file:e,path:r,parentNode:t},{dispatch:a})=>{const{editor:s,supportedEditors:i}=Tt(r),{name:u,ext:l}=IP(e.name);a(cv({parent:t,child:{name:u,path:`${r}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:s,supportedEditors:i},ext:l}}));try{const f=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${r}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return f.status>=300?(a(yu({parent:t,child:{name:u,path:`${r}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),f.status!==413&&v.toastSubject.next({message:"error uploading file",kind:"danger"})):await a(tn(t.path)),{status:f.status,fileName:e.name}}catch{return a(yu({parent:t,child:{name:u,path:`${r}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),v.toastSubject.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),Gn=Q("explorer/createNewFile",async({fileName:e,type:r,path:t,parentNode:a,content:s},{dispatch:i,rejectWithValue:u,getState:l})=>{const{server:{qodly:f},project:p}=l().settings;try{const h=await v.setFileContent({name:lv(e,r,f),content:s||uv(r,p),path:t,asText:[v.FileFolderType.CLASS,v.FileFolderType.METHOD].includes(r)});return a.error&&(a.flags.expanded?await i(tn(a.path)):await i(Ia(a.path))),{qodly:f,file:h,parentNode:a}}catch{return u("failed to create folder")}});function dv(e,r){const{qodly:t=!0,withExtension:a=!0}=r||{},s=v.getFileExtentionFromType(e.type,t);let i="";switch(e.type){case v.FileFolderType.WEBFORM:i=`${v.FolderRootPath.WEBFORMS}/${e.name}`;break;case v.FileFolderType.METHOD:i=`${v.FolderRootPath.METHODS}/${e.name}`;break;case v.FileFolderType.CLASS:i=`${v.FolderRootPath.CLASSES}/${e.name}`;break;default:return""}return`${i}${a?`.${s}`:""}`}const LP=Q("explorer/createNewFileAndOpen",async(e,{dispatch:r,getState:t})=>{const a=await r(Gn(e)).unwrap(),{qodly:s}=t().settings.server;if(a){const{file:i}=a,u=dv(i,{withExtension:!1,qodly:s}),{editor:l}=Tt(u);await r(Ma({file:{name:e.fileName,type:i.type,path:u,editor:l,date:new Date().toISOString()}}))}}),rs=Q("explorer/createNewNode",async({fileName:e,path:r,parentNode:t},{rejectWithValue:a})=>{try{return{file:await v.createFolder({verb:v.DesignerRequestVerb.CREATE_FOLDER,path:`${r}/${e}`,recursive:!0}),parentNode:t}}catch{return v.toastSubject.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),Ha=async({file:e,flags:r={},node:t={}})=>{var a;try{const s=e.path.split(".").at(-1),i=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e.path,content:((a=e.editor)==null?void 0:a.key)!=="editors:img",as:$h(s)?"json":"text"}),u={editor:e.editor};t!=null&&t.info&&(u.kind=t.info.kind);const l=v.getTypeFromExtension(e.path);l===v.FileFolderType.METHOD&&(u.attributes=v.parseAttributes(i.content),i.content=v.addAttributesToContent(i.content,{}));const{content:f,date:p,ext:h}=i;return r.confirmed===void 0&&(r.confirmed=!0),{date:p,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(h),confirmed:r.confirmed},extra:u,name:e.name,path:e.path,type:l,initialContent:f,content:f,history:{stack:[],active:-1,locked:!1}}}catch(s){const{data:i}=s;if(i.__ERROR.find(u=>u.errCode===v.ERROR_CODES.FILE_NOT_FOUND))switch(e.path){case v.ROLES_TAB_PATH:{const u={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:r,extra:{editor:{key:"editors:roles"},kind:"roles"},name:"Roles & Privileges",path:e.path,type:v.FileFolderType.ROLES,initialContent:u,content:u}}case v.SETTINGS_TAB_PATH:{const u={};return{date:new Date().toISOString(),flags:r,extra:{editor:{key:"editors:settings"},kind:"qodlyApp"},name:"Settings",path:e.path,type:v.FileFolderType.SETTINGS,initialContent:u,content:u}}}throw s}},pv=Q("HTTPHandlers/fetch",async(e,{rejectWithValue:r})=>{const t=(await v.getFilesInfo({path:v.HTTP_HANDLERS_PATH})).files.find(a=>a.path===v.HTTP_HANDLERS_PATH);if(t!=null&&t.deleted)return r("not found")}),Ys=(e,r)=>{const t=(a,s)=>{for(const i of a){if(i.path===s)return i;if(i.children){const u=t(i.children,s);if(u)return u}}};return t(e,r)},Ma=Q("explorer/openFile",async({file:e,inactive:r,isNew:t,flags:a={},info:s},{getState:i,dispatch:u})=>{const{root:{tabs:l},roles:f,explorer:p,debugger:{sessions:h},settings:{server:{qodly:y}}}=i(),_=l.find(({path:O})=>e.path===O);if(_){const O={..._,extra:{..._==null?void 0:_.extra,editor:e.editor},flags:{..._==null?void 0:_.flags,...a}};return u(At(O)),O}if(e.path.startsWith("Debugger")){const O=h.find(D=>`Debugger/${D.threadId}`===e.path);if(O){const{source:{content:D},source:F}=O.currentStackFrame,M={name:e.name,type:v.FileFolderType.DEBUGGER,date:new Date().toISOString(),path:e.path,content:D,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:D,flags:{confirmed:!0},extra:{source:F,editor:e.editor}};return u(At(M)),M}}const E=Ys(p,e.path);let T=null;try{T=await Ha({file:e,flags:a,node:E})}catch(O){const{data:D}=O;if(D.__ERROR.find(F=>[v.ERROR_CODES.JSON_MALFORMED,v.ERROR_CODES.JSON_MALFORMED_AT_LINE].includes(F.errCode))){const{confirmed:F}=await u(ar({title:"Corrupt file",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,message:"Open in code editor ?"})).unwrap();if(F){const M=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:"text"}),{content:L,date:I,ext:G}=M;T={date:I,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm","QoDoc"].includes(G),confirmed:!0},extra:{editor:v.EDITOR.Code},name:e.name,path:e.path,type:v.getTypeFromExtension(e.path),initialContent:L,content:L,history:{stack:[],active:-1,locked:!1}}}}if(e.type===v.FileFolderType.CLASS&&s){const F=s.kind,M=`${e.name}.${y?"4qs":"4dm"}`,L=Sn()[F]({name:M,qodly:y}).content;if(T={date:(await v.setFileContent({name:M,content:L,path:"Classes",asText:!0})).date,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:!1,confirmed:!0},extra:{editor:v.EDITOR.Code},name:e.name,path:e.path,type:v.getTypeFromExtension(e.path),initialContent:L,content:L,history:{stack:[],active:-1,locked:!1}},F==="app"){const G=await v.getFilesInfo(...Jp.map(W=>({path:`DatabaseMethods/${W.name}`})));Jp.forEach(W=>{const q=G.files.find(ee=>ee.path===`DatabaseMethods/${W.name}`);q!=null&&q.deleted&&v.setFileContent({name:W.name,content:W.content,path:"DatabaseMethods",asText:!0})})}}if(e.path===v.HTTP_HANDLERS_PATH){const F=(await v.getFilesInfo({path:v.HTTP_HANDLERS_PATH})).files.find(M=>M.path===v.HTTP_HANDLERS_PATH);F!=null&&F.deleted&&await v.setFileContent({name:v.HTTP_HANDLERS_PATH,content:"[]",path:"./",asText:!0}).then(async()=>{T=await Ha({file:e,flags:a,node:E})})}}return T&&(e.path===v.ROLES_TAB_PATH&&!f.flags.touched?u(tl({content:T.content,date:T.date,flags:a})):e.path===v.SETTINGS_TAB_PATH&&u(Gs({path:"project",value:T.content})),u((r?Gv:At)({...T,isNew:t})),T)}),al=Q("explorer/openFileAtLine",async({file:e},{getState:r,dispatch:t})=>{const{root:{tabs:a},explorer:s}=r(),i=a.find(({path:f})=>e.path===f);if(i){const f={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return t(At(f)),f}const u=Ys(s,e.path),l=await Ha({file:e,node:u});return t(At(l)),l}),hv=Q("explorer/injectContentAtLine",async(e,{getState:r,dispatch:t,rejectWithValue:a})=>{const{explorer:s}=r();e.path.split("/").pop();const u=nt(s,e.path);if(!u)return a(`Error while trying to inject content in file ${e.path}`);const l=`${u.path}.${u.ext}`,f=Ys(s,l),p=await Ha({file:{name:u.name,date:u.date||new Date().toISOString(),path:l,type:v.FileFolderType.CLASS,editor:u.config.editor},node:f});return await t(At(p)),{...e,path:`${u.path}.${u.ext}`}}),gv=Q("explorer/openFileAtSelection",async({file:e},{getState:r,dispatch:t})=>{const{root:{tabs:a},explorer:s}=r(),i=a.find(({path:f})=>e.path===f);if(i){const f={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return t(At(f)),f}const u=Ys(s,e.path),l=await Ha({file:e,node:u});return t(At(l)),l}),_u=Q("explorer/deleteFile",async e=>{const{name:r,type:t,path:a,flags:s}=e;if(s.error)return{deleted:!0,node:e};const i=a.split("/");return i.pop(),{deleted:await v.dropFile({root:v.FolderRootType.ROOT,type:fv(t),verb:v.DesignerRequestVerb.DROP,name:r,path:i.join("/")}),node:e}}),NP=Q("explorer/deleteFolder",async(e,{getState:r,dispatch:t})=>{const{path:a,flags:s}=e;if(s.error)return{deleted:!0,node:e};const{deleted:i}=await v.removeItem({force:!0,path:a,verb:v.DesignerRequestVerb.REMOVE_ITEM}).catch(console.error)||{deleted:!1};if(e.children){const{tabs:u}=r().root;e.children.forEach(l=>{const f=u.findIndex(p=>p.path===l.path);t(Xs(f))})}return{deleted:i,node:e}}),Eu=Q("explorer/removeFileNode",async(e,{getState:r,dispatch:t})=>{await v.removeItem({verb:v.DesignerRequestVerb.REMOVE_ITEM,path:e.path,force:!0}).catch(console.error);const{root:{tabs:a},catalog:s}=r();if((e.path==="Classes/DataStore"||vv(s,e))&&setTimeout(()=>{t(rn())},Ya),e.ext){const i=a.findIndex(u=>u.path===e.path);i>=0&&t(Xs(i))}return{deleted:!0,node:e}}),vv=(e,r)=>{const{model:{singletons:t}}=e;return Ce.values(t).some(a=>a.name===r.name)},Yn=Q("explorer/renameFile",async({file:e,newname:r},{dispatch:t,getState:a})=>{if(e.type!=="folder"){const i=e.path.split("/");i.pop();const u=`${i.join("/")}/${e.name}.${e.ext}`,l=`${i.join("/")}/${r}.${e.ext}`;await v.moveItem({verb:v.DesignerRequestVerb.MOVE_ITEM,path:u,newpath:l});const{catalog:f}=a();return vv(f,e)&&setTimeout(()=>{t(rn())},Ya),{old:{...e,path:u},new:{...e,name:r,path:l}}}const s=e.path.split("/");return s.pop(),await v.moveItem({verb:v.DesignerRequestVerb.MOVE_ITEM,path:`${s.join("/")}/${e.name}`,newpath:`${s.join("/")}/${r}`}),{old:e,new:{...e,name:r,path:`${s.join("/")}/${r}`}}}),$a=Q("explorer/relocateNode",async({draggedNode:e,newLocation:r},{rejectWithValue:t})=>{try{await v.moveItem({verb:v.DesignerRequestVerb.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${r.path}/${e.name}.${e.ext}`})}catch{return t("can't move item")}}),ns=Q("explorer/duplicateNode",async({node:e,duplicateName:r},{rejectWithValue:t,fulfillWithValue:a,getState:s})=>{const i=e.path.split("/");i.pop();try{const{tabs:u}=s().root,l=u.find(({path:y})=>y===e.path),f=["4dm","4qm","4qs"].includes(e.ext),{content:p}=l||await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:f?"text":"json"}),h=await v.setFileContent({name:`${r}.${e.ext}`,content:p,path:i.join("/"),asText:f});return a({node:{...h,path:i.join("/")}})}catch{return t("failed to duplicate file")}}),kP=Q("explorer/executeMethod",async({methodName:e,params:r=[],resultingDataSource:t={},namespace:a=""},{rejectWithValue:s})=>{var i,u;try{const f=await window.Method4D.buildMethod({methodName:e,parameters:r,resultingDataSource:t},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return f!=null&&f.__NOTIFICATION?v.toastSubject.next({message:`${((i=f.__NOTIFICATION)==null?void 0:i.message)||""}`,kind:`${((u=f.__NOTIFICATION)==null?void 0:u.type)||"info"}`}):v.toastSubject.next({message:"Method executed Successfully",kind:"message"}),f}catch(l){return v.toastSubject.next({message:l.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),s("can't execute method")}}),jP=e=>{const{dataClasses:r,...t}=e;return{...t,dataClasses:r==null?void 0:r.map(a=>{let s={...a};if(s.uuid||(s={...s,uuid:v.generateUUID()}),s.attributes){const i=["storage","relatedEntity"],u=s.attributes.map(l=>i.includes(l.kind)&&!l.uuid?{...l,uuid:v.generateUUID()}:l);s={...s,attributes:[...u]}}return s})}},BP=Q("files/fetchFiles",async()=>v.getFolders(v.FolderRootType.WEBFORMS,v.FolderRootType.METHODS,v.FolderRootType.CLASSES)),ol=Q("tabs/renameDatasource",async(e,{dispatch:r,getState:t})=>{var E,T;const a=!!e.datasourceNamespace,{confirmed:s}=await r(ar({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,views:{toggles:{},tips:a?[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated on opened web forms only"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]:[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]}})).unwrap();if(!s)return null;const{autoUpdateReferences:i,datasourceId:u,datasourceNamespace:l,value:f,path:p}=e,h=t();let y=[];if(a){const C=h.sharedDatasources.sources[l]||[];y.push(...C)}else if(p){const C=h.root.tabs.find(v.by("path",p));if(y=(T=(E=C==null?void 0:C.content)==null?void 0:E.metadata)==null?void 0:T.datasources,!y)return null}const _=new RegExp(`^${u}\\b`,"");if(y=y.map(C=>{const O=(v.isObjectDatasource(C)||!v.isSimpleDatasource(C))&&C.from&&_.test(C.from),D=C.events?C.events.map(F=>{var M,L,I,G;switch(F==null?void 0:F.type){case"method":{const W=F;return W.params?{...W,params:W.params.map(q=>{var ee;return{...q,datasource:(ee=q.datasource)==null?void 0:ee.replace(new RegExp(`^${u}`,""),f)}}),returns:(M=W.returns)!=null&&M.datasource?{...W.returns,datasource:(L=W.returns.datasource)==null?void 0:L.replace(new RegExp(`^${u}`,""),f)}:W.returns}:W}case"simple-action":{const W=F;return W.datasource?{...W,datasource:{...W.datasource,name:(I=W.datasource.name)==null?void 0:I.replace(new RegExp(`^${u}`,""),f),from:(G=W.datasource.from)==null?void 0:G.replace(new RegExp(`^${u}`,""),f)}}:W}default:return F}}):C.events;return C.id===u?{...C,id:f,events:D}:O&&C.from?{...C,from:C.from.replace(new RegExp(`^${u}`,""),f),events:D}:{...C,events:D}}),i){const C=a?`${l}:${u}`:`${u}`,O=a?`${l}:${f}`:`${f}`;v.datasourcesSubject.next({path:p??"",action:v.DatasourcesActions.RENAME,old_reference:C,new_reference:O,is_shared:a})}return{path:p,namespace:l,datasources:y}}),sl=Q("tabs/edit-datasource",(e,{getState:r})=>{var i,u;const t=r();let a=[];if(e.namespace)a=t.sharedDatasources.sources[e.namespace];else{const l=t.root.tabs.find(v.by("path",e.path));l&&(a=((u=(i=l.content)==null?void 0:i.metadata)==null?void 0:u.datasources)||[])}return a.map(l=>l.id===e.datasourceId?Object.assign({},l,{[e.propertyKey]:e.value}):l)}),mv=Q("tabs/fetchChanges",async(e,{getState:r})=>{const a=oa(r()).filter(s=>[v.FileFolderType.METHOD,v.FileFolderType.CLASS].includes(s.type));return v.getFilesInfo(...a.map(s=>{const[i]=s.path.split("/").filter(Boolean);return{name:s.name,type:s.type,root:i,path:"."}}))}),WP=Q("files/saveAll",async(e,{getState:r,dispatch:t})=>{const a=qu(r());for(const s of a)t(Vn({tab:s}))}),il=Q("files/tryCloseTab",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root,s=a.findIndex(u=>u.path===e);if(s===-1)return!1;const i=a[s];if(i!=null&&i.flags.touched){const{confirmed:u}=await t(ar({title:Rs(i),message:"Your unsaved changes will be lost. Proceed anyway?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!u)return!1}return t(Xs(s)),i.path===v.ROLES_TAB_PATH&&i.flags.touched&&(async()=>{const l=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:v.ROLES_TAB_PATH,content:!0,as:"json"});t(tl({content:l.content,date:l.date}))})(),!0}),HP=Q("files/tryCloseOtherTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;if(a.some(i=>i.path!==e&&i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(Hv(e))}),UP=Q("files/tryCloseAllTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;if(a.some(i=>i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(Bv())}),qP=Q("files/tryCloseRightTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;let s=!1;for(let i=a.length-1;i>e;i-=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(Wv(e))}),GP=Q("files/tryCloseLeftTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;let s=!1;for(let i=0;i<e;i+=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(Uv(e))}),as=Q("files/reloadTab",async(e,{dispatch:r})=>{if(e.flags.touched){const{confirmed:s}=await r(ar({title:Rs(e),message:"Changes made to the file will be lost. Continue?",type:v.ModalType.CONFIRM,color:v.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!s)throw new Error("Cancel modal!")}const t=Bu(e.path),a=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:t});if(e.path===v.ROLES_TAB_PATH){const{roles:s,privileges:i}=Us(a.content);r(rl({roles:s,privileges:i}))}else if(e.path===v.SETTINGS_TAB_PATH){const{content:s}=a;r(Gs({path:"project",value:s}))}else{const{content:s}=a;e.type===v.FileFolderType.WEBFORM?v.webformSubject.next({path:e.path,action:v.WebformActions.RELOAD,payload:s.components}):e.type===v.FileFolderType.MODEL&&lg.next({action:"reload",payload:s})}return a}),Vn=Q("files/saveTab",async({tab:e},{dispatch:r,getState:t})=>{let{path:a,content:s}=e;if(e.type===v.FileFolderType.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const u=await v.getFilesInfo({path:a});if(u.files[0]){const y=new Date(e.date),_=new Date(u.files[0].date);if(y.getTime()<_.getTime()){const{confirmed:E}=await r(ar({title:Rs(e),message:"New content has been found on the server. Are you sure you want to continue?",type:v.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!E)return r(jv({path:a,flags:{old:!0}})),null}}const l=YP(e,t()),f=await v.saveContent({verb:v.DesignerRequestVerb.SAVE_CONTENT,content:l,path:a});(e.type===v.FileFolderType.CLASS||e.type===v.FileFolderType.MODEL)&&setTimeout(()=>{r(rn())},Ya);const p=(f.modelErrors||[]).map(y=>y.message),h=(f.permissionsErrors||[]).map(y=>y.message);return v.FileFolderType.MODEL===e.type&&(s=l),{...e,content:s,date:f.date,initialContent:s,errors:p.length>0||h.length>0?[{title:"Model errors",messages:p},{title:"Permissions errors",messages:h}]:[]}}),YP=(e,r)=>{var t,a;switch(!0){case e.path==="settings.json":case e.path===v.SETTINGS_TAB_PATH:return r.settings.project;case e.type===v.FileFolderType.ROLES:return((a=(t=e.extra)==null?void 0:t.editor)==null?void 0:a.key)==="editors:roles"?qs(r.roles):e.content;case e.type===v.FileFolderType.MODEL:{const s=e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};return jP(s)}default:return e.content}},Xp=async e=>{if(e.type===v.FileFolderType.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const r=Bu(e.path),t=await v.getNodeInfo({verb:v.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:r}),a={};t.type===v.FileFolderType.METHOD&&(a.attributes=v.parseAttributes(t.content));const{date:s,name:i,type:u,content:l}=t;return{date:s,flags:{enabled:e.type===v.FileFolderType.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:i,path:e.path,type:u,initialContent:l,content:u===v.FileFolderType.MODEL?Mh(l):l,history:{stack:[],active:-1,locked:!1}}},yv=Ce.debounce((e,r)=>{r(Kv(e))},300),VP=Q("tabs/setTabContent",(e,{getState:r,dispatch:t})=>{var u;const{root:{tabs:a}}=r(),s=a.find(l=>l.path===e.path),i=!!((u=s==null?void 0:s.history)!=null&&u.locked);t(fl(e)),i?t(dl(e.path)):yv(e.path,t)}),zP=Q("tabs/setCurrentWebformState",(e,{getState:r,dispatch:t})=>{var u;const{root:{tabs:a}}=r(),s=a.find(l=>l.path===e.path),i=!!((u=s==null?void 0:s.history)!=null&&u.locked);t(Yv(e)),i?t(dl(e.path)):yv(e.path,t)}),bv=Q("files/tryInjectMethod",async({type:e,dataclass:r,expand:t},{getState:a,dispatch:s})=>{const{root:{tabs:i},settings:{server:{qodly:u}}}=a(),l=v.getFileExtentionFromType("class",u);let f="",p="",h=null;if(!r)f="DataStore",p=`Classes/DataStore.${l}`;else switch(e){case"dataclass":f=r,p=`Classes/${r}.${l}`;break;case"collection":f=`${r}Selection`,p=`Classes/${r}Selection.${l}`;break;case"entity":f=`${r}Entity`,p=`Classes/${r}Entity.${l}`;break;default:return h}const y=i.find(v.by("path",p));if(y)return s(At(y)),y;try{h=await Xp({name:f,date:new Date().toISOString(),path:p,type:v.FileFolderType.CLASS})}catch{r?await s(bu({type:"dataclass",className:r,collectionName:`${r}Selection`,toCreate:e,expand:t})):await s(bu({type:"model"}))}return h=await Xp({name:f,date:new Date().toISOString(),path:p,type:v.FileFolderType.CLASS}),h.path=p,s(At(h)),h}),KP=Q("roles/open",async(e,{dispatch:r,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path===v.ROLES_TAB_PATH);if(s)return r(At(s)),s;r(Ss())});function Qp(e,r){const{line:t,offset:a,type:s="saved"}=r;e.breakpoints[s].locations.push({line:t}),Ce.isNumber(a)&&(e.breakpoints[s].offset=a)}function Zp(e,r,t,a){e.breakpoints[t].locations=r,Ce.isNumber(a)&&(e.breakpoints[t].offset=a)}function eh({filePath:e,fileType:r,methodName:t,className:a,ext:s,source:i}){return{filePath:e,fileType:r,methodName:t,className:a,ext:s,source:i,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function th(e,r,t){let a=!1;const s=e.map(i=>i[t]!==r[t]?i:(a=!0,{...i,...r}));return a?s:[...s,r]}function Zo(e){return e.map(({label:r})=>({label:r}))}const _v=Gt({name:"debugger",initialState:()=>{var r,t;const{debugger:e={meta:{state:Jr.DETACHED},list:[],sessions:[],expressions:[]}}=Zn();return{meta:{...e.meta,state:((r=e.meta)==null?void 0:r.state)===Jr.ATTACHED?(t=e.meta)==null?void 0:t.state:Jr.DETACHED},list:e.list||[],sessions:e.sessions||[],expressions:e.expressions||[]}},reducers:{addBreakpointDecoration(e,r){const{filePath:t,fileType:a,methodName:s,className:i,ext:u,source:l,breakpoint:f}=r.payload,p=wn(e.list,t,s,i);if(p)Qp(p,f);else{if(a===v.FileFolderType.CLASS&&f.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${i} class.`);const h=eh({filePath:t,fileType:a,methodName:s,className:i,ext:u,source:l});Qp(h,f),e.list.push(h)}},removeBreakpointDecoration(e,r){const{filePath:t,methodName:a,line:s,offset:i=0,type:u="saved"}=r.payload;if(t.startsWith("Classes/")){const l=e.list.filter(f=>f.filePath===t);if(l.length>0){const f=s+i;l.forEach(p=>{const h=p.breakpoints[u].offset||0;p.breakpoints[u].locations=p.breakpoints[u].locations.filter(y=>y.line+h!==f),u==="saved"&&(p.breakpoints.draft.locations=p.breakpoints.draft.locations.filter(y=>y.line+h!==f))})}}else{const l=wn(e.list,t,a);l&&(l.breakpoints[u].locations=l.breakpoints[u].locations.filter(f=>f.line!==s),u==="saved"&&(l.breakpoints.draft.locations=l.breakpoints.draft.locations.filter(f=>f.line!==s)))}},setBreakpointsDecoration(e,r){const{filePath:t,fileType:a,methodName:s,className:i,ext:u,source:l,breakpoints:f,offset:p,type:h="saved",clearDraft:y}=r.payload,_=wn(e.list,t,s);if(_)Zp(_,f,h,p),y&&h!=="draft"&&(_.breakpoints.draft.locations=[]);else{const E=eh({filePath:t,fileType:a,methodName:s,className:i,ext:u,source:l});Zp(E,f,h,p),e.list.push(E)}},clearBreakpoints(e,r){const{filePath:t,type:a="saved"}=r.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath===t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearBreakpointsExcept(e,r){const{exceptedFilePath:t,type:a="saved"}=r.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath!==t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearAllBreakpoints(e){e.list=e.list.map(r=>({...r,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}))},setActiveLine(e,r){const{threadId:t,line:a,highlight:s}=r.payload,i=at(e.sessions,t);i&&(i.activeLine=a,s&&(i.highlightedLines={start:a,end:a}))},addExpression(e,r){const{threadId:t,label:a,save:s}=r.payload,i=at(e.sessions,t);i&&i.stopped&&(i.expressions=[...i.expressions||[],{label:a}],s&&(e.expressions=Zo(i.expressions)))},removeExpression(e,r){const{threadId:t,index:a,save:s}=r.payload,i=at(e.sessions,t);i&&(i.expressions=i.expressions.filter((u,l)=>l!==a),s&&(e.expressions=Zo(i.expressions)))},removeAllExpressions(e,r){const{threadId:t,save:a}=r.payload,s=at(e.sessions,t);s&&(s.expressions=[],a&&(e.expressions=[]))},renameExpression(e,r){const{threadId:t,index:a,replacement:s,save:i}=r.payload,u=at(e.sessions,t);u&&u.expressions[a]&&(u.expressions[a].label=s,i&&(e.expressions=Zo(u.expressions)))},setExpression(e,r){const{threadId:t,expression:a}=r.payload,s=at(e.sessions,t);if(s){const i=a.index>=0?a.index:s.expressions.length>0?s.expressions.length-1:0,u=s.expressions[i];u?(u.result=a.result,u.nakedResult=a.nakedResult,u.variablesReference=a.variablesReference||0,u.presentationHint=a.presentationHint):s.expressions.push(a)}},updateExpressionAt(e,r){const{threadId:t,index:a,value:s}=r.payload,i=at(e.sessions,t);if(i){const u=i.expressions[a];u&&(u.result=`"${s}"`,u.nakedResult=s)}},saveExpressions(e,r){const{expressions:t}=r.payload;e.expressions=Zo(t)},addSession(e,r){const{threadId:t,channelId:a,stackFrames:s,exceptions:i=[]}=r.payload,u=at(e.sessions,t),l=s[0],{expressions:f=[]}=e;if(u)u.expressions=f;else{const p=ku(t);e.sessions.push({tabPath:p,threadId:t,channelId:a,stackFrames:s,currentStackFrame:l,exceptions:i,expressions:f,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,r){const{threadId:t,changes:a}=r.payload;e.sessions=e.sessions.map(s=>s.threadId===t?{...s,...a}:s)},removeSession(e,r){const{threadId:t}=r.payload;e.sessions=e.sessions.filter(a=>a.threadId!==t)},removeSessionByIndex(e,r){const t=r.payload;e.sessions.splice(t,1)},setSessions(e,r){const t=r.payload;e.sessions=t},setCallChainVariables(e,r){const{threadId:t,frameId:a,variables:s}=r.payload;e.sessions=e.sessions.map(i=>{var u;return i.threadId===t?{...i,variables:{...i.variables,callchain:th((u=i.variables)==null?void 0:u.callchain,{frameId:a,items:s},"frameId")}}:i})},setExpressionVariables(e,r){const{threadId:t,variablesReference:a,variables:s}=r.payload;e.sessions=e.sessions.map(i=>{var u;return i.threadId===t?{...i,variables:{...i.variables,expressions:th((u=i.variables)==null?void 0:u.expressions,{variablesReference:a,items:s},"variablesReference")}}:i})},setSourceContent(e,r){const{threadId:t,content:a}=r.payload,s=at(e.sessions,t);s&&(s.currentStackFrame.source={...s.currentStackFrame.source,content:a})},setDebuggerMeta(e,r){if(r.payload.state===Jr.ERROR){const{error:t={code:null,reason:"",type:ps.SOCKET_ERROR}}=r.payload;if(e.meta.error={...e.meta.error,...t,time:Date.now()},(t==null?void 0:t.type)===ps.SOCKET_CLOSURE&&(t==null?void 0:t.code)===1e3&&!(t!=null&&t.reason)&&e.meta.state===Jr.DETACHED)return}e.meta.state=r.payload.state}},extraReducers:e=>{e.addCase(Sv.fulfilled,r=>{r.sessions=[]})}}),{addBreakpointDecoration:JP,removeBreakpointDecoration:XP,setBreakpointsDecoration:QP,clearBreakpoints:ZP,clearBreakpointsExcept:eF,clearAllBreakpoints:tF,setActiveLine:rF,addExpression:nF,renameExpression:aF,removeExpression:oF,removeAllExpressions:sF,setExpression:iF,updateExpressionAt:cF,saveExpressions:uF,addSession:lF,updateSession:fF,removeSession:dF,removeSessionByIndex:pF,setSessions:Ev,setCallChainVariables:hF,setExpressionVariables:gF,setSourceContent:vF,setDebuggerMeta:mF}=_v.actions,Sv=Q("files/wipeDebuggerSessions",async(e,{getState:r,dispatch:t})=>{const{sessions:a}=r().debugger;for(const{threadId:s}of a){const i=ku(s);t(il(i))}}),Tv=Q("files/removeDebuggerSessionsNotIn",async(e,{getState:r,dispatch:t})=>{const{threadIds:a}=e,{sessions:s}=r().debugger,i=[],u=s.filter(l=>{const f=a.includes(l.threadId);return f||i.push(l.threadId),f});return t(Ev(u)),{staleThreadIds:i}}),Ts=Q("models/fetch",async()=>(await v.http(v.API_PREFIX,{method:"POST",body:JSON.stringify({verb:v.DesignerRequestVerb.GET_INFO,path:v.MODEL_TAB_PATH,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content),ws=Q("models/save",async(e,{getState:r,dispatch:t,rejectWithValue:a})=>{const{tabs:s}=r().root,i=s.find(u=>u.path===v.MODEL_TAB_PATH);if(!i)return a("Error while saving the model");try{const u=await v.http(v.API_PREFIX,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return setTimeout(()=>{t(rn())},Ya),{...u,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return a("Error while saving the model")}}),yF=Q("models/open",async(e,{dispatch:r,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path==="models/main");if(s)return r(At(s)),s;r(Ts())}),bF=Q("model/rename-dataclass",async(e,{getState:r,dispatch:t})=>{var y,_;const{dataclassId:a,selectionId:s,name:i}=e;let u=r();if(!u.explorer.find(E=>E.path===v.FolderRootPath.CLASSES))throw new Error("Classes folder was not found!");u=r();const f={class:{found:!1,newNameTaken:!1,file:null,filename_update:i},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Selection`}};(_=(y=u.explorer.find(E=>E.path===v.FolderRootPath.CLASSES))==null?void 0:y.children)==null||_.forEach(E=>{var T;E.path===`Classes/${a}___[<QODLY_ID>]`?(T=E.children)==null||T.forEach(C=>{var D,F,M,L;const O={...C,name:(D=C.info)==null?void 0:D.filename};((F=C.info)==null?void 0:F.filename)===a?(f.class.found=!0,f.class.file=O):((M=C.info)==null?void 0:M.filename)===`${a}Entity`?(f.entity.found=!0,f.entity.file=O):((L=C.info)==null?void 0:L.filename)===s&&(f.selection.found=!0,f.selection.file=O)}):(E.name===f.class.filename_update&&(f.class.newNameTaken=!0),E.name===f.entity.filename_update&&(f.entity.newNameTaken=!0),E.name===f.selection.filename_update&&(f.selection.newNameTaken=!0))});const p=Object.entries(f).reduce((E,T)=>{const[C,O]=T;return O.found?O.newNameTaken?[...E,{type:"error",message:`Cannot rename ${C} file to ${O.filename_update} because it already exists. The existing file will be used instead!`}]:E:[...E,{type:"warning",message:`${a} ${C} file was not found`}]},[]);p.length>0&&t(ar({message:"The following errors were encountered during dataclass rename:",views:{tips:p}}));const h=Object.values(f).filter(E=>E.found&&E.file&&!E.newNameTaken);await Promise.all(h.map(async E=>await t(Yn({file:E.file,newname:E.filename_update}))))}),Ua={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},_F={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Ua.DATACLASS_DELETE]:!0,[Ua.DATACLASS_DRAGGABLE]:!0}},wv=Gt({name:"Models",initialState:_F,reducers:{setModelFlag(e,r){e.flags={...e.flags,...r.payload}}},extraReducers(e){e.addCase(Ts.fulfilled,(r,t)=>{var u;const a={},s={},i=t.payload.extraProperties||{};(u=t.payload.dataClasses)==null||u.forEach(l=>{a[l.name]=l,s[l.collectionName]=l}),r.draft.dataClasses=a,r.draft.collections=s,r.draft.extraProperties=i,r.model.dataClasses=a,r.model.collections=s,r.model.extraProperties=i}),e.addCase(Ts.rejected,r=>{r.errored=!0}),e.addCase(ws.pending,()=>{}).addCase(ws.fulfilled,(r,t)=>{const a={},s={},i=t.payload.content.extraProperties||{};t.payload.content.dataClasses.forEach(u=>{a[u.name]=u,s[u.collectionName]=u}),r.draft.dataClasses=a,r.draft.collections=s,r.draft.extraProperties=i,r.model.dataClasses=a,r.model.collections=s,r.model.extraProperties=i})}}),{setModelFlag:EF}=wv.actions;var Cv=(e=>(e.UUID="uuid",e.STRING="string",e.TEXT="text",e.DATE="date",e.TIME="duration",e.BOOLEAN="bool",e.BYTE="byte",e.INTEGER="word",e.LONG="long",e.LONG64="long64",e.FLOAT="number",e.BLOB="blob",e.IMAGE="image",e.OBJECT="object",e))(Cv||{}),Vs=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Vs||{});const SF=e=>["string","uuid","number","long"].includes(e.type),TF=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],wF=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],CF=[{title:"String",kind:"storage",value:"string",calculatedType:"string",calculatedKind:"storage"},{title:"Text",kind:"storage",value:"text",calculatedType:"text",calculatedKind:"storage"},{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Date",kind:"storage",value:"date",calculatedType:"date",calculatedKind:"storage"},{title:"Duration",kind:"storage",value:"duration",calculatedType:"duration",calculatedKind:"storage"},{title:"Bool",kind:"storage",value:"bool",calculatedType:"bool",calculatedKind:"storage"},{title:"Byte",kind:"storage",value:"byte",calculatedType:"byte",calculatedKind:"storage"},{title:"Word",kind:"storage",value:"word",calculatedType:"word",calculatedKind:"storage"},{title:"Number",kind:"storage",value:"number",calculatedType:"number",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"},{title:"Object",kind:"storage",value:"object",calculatedType:"object",calculatedKind:"storage"},{title:"Image",kind:"storage",value:"image",calculatedType:"image",calculatedKind:"storage"},{title:"Blob",kind:"storage",value:"blob",calculatedType:"blob",calculatedKind:"storage"}],xF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],OF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],AF=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],RF=(e,r)=>({toJSON:!0,extraProperties:r,dataClasses:e.map(t=>{var a;return{...t.data,extraProperties:{position:{x:t.position.x,y:t.position.y},panelColor:(a=t.data.extraProperties)==null?void 0:a.panelColor}}})});function DF(e,r,t){const a=e;let s=0;for(;t[`${a}${s||""}`];)s++;return`${a}${s||""}`}const xv=e=>e.kind===Vs.RELATEDENTITY,Ov=e=>e.kind===Vs.RELATEDENTITIES,PF=e=>Ov(e)||xv(e),FF=()=>br(e=>e.model),IF=()=>br(e=>e.model.draft.dataClasses),MF=()=>br(e=>e.model.draft.collections),$F=e=>br(r=>r.model.draft.dataClasses[e]),LF=(e,r)=>br(t=>t.model.draft.dataClasses[e].attributes.find(v.by("name",r))),NF=()=>br(e=>e.settings.session["model.viewport"]),kF=()=>{const e=br(s=>s.model.flags),r=s=>s in e?e[s]:void 0,t=r(Ua.DATACLASS_DELETE),a=r(Ua.DATACLASS_DRAGGABLE);return{deleteDataclass:t,draggableDataclass:a,flags:e}},jF=wv.reducer;function Gc(e,r){const t=e.tabs.find(({path:a})=>a===v.SETTINGS_TAB_PATH);t&&(t.flags.touched=r)}const Av={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},Rv={[Av.SIDEBAR_SECTION_RESIZABLE]:!0},Dv=Gt({name:"webforms",initialState:()=>{const{webforms:e}=Zn();return{...e,templates:{data:[],selectedGroup:""},datasources:{...$u.webforms.datasources,...e==null?void 0:e.datasources},flags:Rv}},reducers:{toggleInspector:(e,r)=>{const{type:t}=r.payload;e.inspector[t].active=!e.inspector[t].active,e.inspector[t].active||(e.inspector[t].data=void 0)},inspect:(e,r)=>{const{type:t,data:a}=r.payload;e.inspector[t].active&&(e.inspector[t].data=a)},addComponent:(e,r)=>{e.components.push(r.payload)},editComponent:(e,r)=>{const{id:t,changes:a}=r.payload;e.components=e.components.map(s=>s.id===t?{...s,...a}:s)},removeComponent:(e,r)=>{const{payload:t}=r,a=e.components.findIndex(s=>s.id===t);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,r)=>{e.templates.selectedGroup=r.payload.selectedGroup},setTemplatesData:(e,r)=>{e.templates.data=r.payload},setTemplateData:(e,r)=>{const{group:t,components:a}=r.payload,s=e.templates.data.find(i=>i.group===t);s&&(s.components=a)},setDatasourcesTheme:(e,r)=>{e.datasources.theme=r.payload},setWebformsFlag(e,r){e.flags={...e.flags,...r.payload}}},extraReducers(e){e.addCase(Lv.fulfilled,(r,t)=>{r.components=t.payload})}}),{toggleInspector:BF,inspect:WF,addComponent:Pv,editComponent:Fv,removeComponent:Iv,setSelectedGroup:HF,setTemplatesData:Mv,setTemplateData:$v,setDatasourcesTheme:UF,setWebformsFlag:qF}=Dv.actions,GF=Dv.reducer,cl=Ce.curry((e,r)=>{var s,i;const t={...r.sharedDatasources.sources},a=(i=((s=r.root.tabs.find(v.by("path",e)))==null?void 0:s.content).metadata)==null?void 0:i.datasources;return a&&(t[e]=a),Ce.cloneDeep(t)}),YF=Q("webforms/fetchTemplates",async(e,{dispatch:r,getState:t})=>{const{data:a}=t().webforms.templates,s=t().settings.session["studio.tipsBaseUrl"]||"";if(!Ce.isEmpty(a))return a;try{const u=await(await fetch(`${s}/build/index.json?t=${Date.now()}`)).json();return r(Mv(u)),u}catch{return[]}}),VF=Q("webforms/fetchTemplate",async({name:e},{dispatch:r,getState:t})=>{const{data:a}=t().webforms.templates,s=a.find(i=>i.group===e);if(s&&!Ce.isEmpty(s.components))return s.components;try{const u=await(await fetch(`${s==null?void 0:s.link}?t=${Date.now()}`)).json();return r($v({group:e,components:u})),u}catch{return[]}}),Lv=Q("webforms/fetchCraftedComponents",async(e,{rejectWithValue:r})=>{try{return(await v.getNodeInfo({path:"WebForms/crafted_components.json",verb:v.DesignerRequestVerb.GET_INFO,content:!0,as:"json"})).content}catch{return r("Error while loading the crafted components")}}),zF=Q("webforms/addCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(Pv(e));const{webforms:{components:s}}=a();v.setCraftedComponents(s)}catch{return t("Error while adding the crafted component")}}),KF=Q("webforms/editCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(Fv(e));const{webforms:{components:s}}=a();v.setCraftedComponents(s)}catch{return t("Error while editing the crafted component")}}),JF=Q("webforms/removeCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(Iv(e));const{webforms:{components:s}}=a();v.setCraftedComponents(s)}catch{return t("Error while removing the crafted component")}}),ul=Q("datasources/add-datasource",async(e,{getState:r,rejectWithValue:t})=>{var a,s;try{const i=r(),u=e.datasource,l=!!u.namespace,f=[];if(l){const p={...i.sharedDatasources.sources,[u.namespace]:[...i.sharedDatasources.sources[u.namespace],u]};f.push(...p[u.namespace]),await v.setSharedSources(p)}else(((s=(a=i.root.tabs.find(v.by("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]).push(u);return{list:f,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),t("Error while adding the datasource")}}),ll=Q("datasources/edit-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const{namespace:a,path:s}=e,i=r(),u=!!e.namespace,l=cl(s,i);let f=Ce.defaultTo(l[a||s],[]);const p=f.find(E=>E.id===e.id&&(E.namespace||"")===(e.namespace||"")),h=e.changes,y=h??{[e.property]:e.value};return f=f.map(E=>E.id===e.id?{...E,...y}:E),u&&await v.setSharedSources({...i.sharedDatasources.sources,[e.namespace]:f}),(Ce.isObject(h)?Object.keys(h):[]).includes("dataType")&&e.updateRefs&&v.datasourcesSubject.next({datasource:{id:e.id,namespace:e.namespace},path:s??"",action:v.DatasourcesActions.TYPE_CHANGE,old_type:(p==null?void 0:p.dataType)||"",new_type:y.dataType,is_shared:u}),{list:f,path:e.path,namespace:e.namespace}}catch{t(`Error while editing datasource ${e.id}`)}}),XF=e=>e.type===zn.fulfilled.type,zn=Q("datasources/rename-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const a=r(),s=!!e.namespace,i=e.namespace||e.path,u=cl(e.path,a),l=Ce.defaultTo(u[i],[]),f=new RegExp(`^${e.id}\\b`,"");if(l.forEach(p=>{var y;const h=(v.isObjectDatasource(p)||!v.isSimpleDatasource(p))&&p.from&&f.test(p.from);e.updateRefs&&((y=p.events)==null||y.forEach(_=>{var E,T,C,O,D;switch(_.type){case"method":{const F=_;F.params.forEach(M=>{M.datasource&&Object.assign(M,{datasource:M.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),F.returns&&Object.assign(F.returns,{datasource:(T=(E=F.returns)==null?void 0:E.datasource)==null?void 0:T.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const F=_;F.datasource&&Object.assign(F.datasource,{name:(C=F.datasource.name)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(O=F.datasource.from)==null?void 0:O.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(D=F.datasource.target)==null?void 0:D.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),p.id===e.id?p.id=e.new_name:h&&p.from&&(p.from=p.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const p=v.getDatasourceId({id:e.id,namespace:e.namespace}),h=v.getDatasourceId({id:e.new_name,namespace:e.namespace});v.datasourcesSubject.next({path:e.path??"",action:v.DatasourcesActions.RENAME,old_reference:p,new_reference:h,is_shared:s})}return s&&await v.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),La=Q("datasources/delete-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const a=r(),s=!!e.namespace,i=e.namespace||e.path,l=cl(e.path,a)[i].filter(v.outById(e.id));return s&&await v.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while removing datasource ${e.id}`)}}),os=Q("saved_conditions/fetchSavedConditions",async(e,{rejectWithValue:r})=>{try{const{conditions:t=[]}=await v.getSavedConditions({createIfNotExists:!0});return t}catch{return r("Error while loading the shared conditions")}}),zs=(e,r,t)=>{switch(e.type){case"datasource":return{...e,path:e.path===r?t:e.path,value:e.valueType==="datasource"&&e.value===r?t:e.value,compareValue:e.compareValueType==="datasource"&&e.compareValue===r?t:e.compareValue};case"privilege":case"currentState":case"parentState":if(e.valueType==="datasource")return{...e,value:e.value===r?t:e.value};break;case"combination":return{...e,conditions:(e.conditions||[]).map(a=>zs(a,r,t))}}return e},QF=v.queue();async function Aa(e){const r={verb:v.DesignerRequestVerb.SET_FILE_CONTENT,asText:!1,name:"saved_conditions.json",path:"",root:"shared",content:{conditions:e}};await QF(()=>v.http(v.API_PREFIX,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}))}const Ks=(e,r)=>{if(e.id===r)return null;if(e.type==="reference"&&e.ref===r)return null;if(e.type==="combination"&&e.conditions){const t=e.conditions.map(a=>Ks(a,r)).filter(Boolean);return t.length===1?{...t[0],id:e.id}:{...e,conditions:t}}return e},Js=e=>{if(e.id){if(e.type==="combination"&&e.conditions)return{...e,conditions:e.conditions.map(Js)}}else return{...e,id:Wa.generate()};return e},Nv=Gt({name:"shared-conditions",initialState:{state:"unknown",conditions:[]},reducers:{updateSavedConditions:(e,r)=>(e.conditions=r.payload.conditions,Aa(r.payload.conditions),e),setSavedCondition:(e,r)=>{const{payload:t}=r;return e.conditions=e.conditions.map(a=>a.id===t.id?{...Js(t.condition),id:a.id}:a),Aa(e.conditions),e},updateSavedConditionDs:(e,r)=>{const{old_reference:t,new_reference:a}=r.payload;e.conditions=e.conditions.map(s=>zs(s,t,a)),Aa(e.conditions)},addSavedCondition:(e,r)=>(e.conditions=[...e.conditions,r.payload],Aa(e.conditions),e),removeSavedCondition:(e,r)=>{const{id:t}=r.payload;return e.conditions=e.conditions.map(a=>Ks(a,t)).filter(Boolean),Aa(e.conditions),e},initSavedConditions:(e,r)=>(e.conditions=r.payload.conditions,e)},extraReducers(e){e.addCase(os.pending,r=>({...r,state:"loading"})).addCase(os.fulfilled,(r,{payload:t})=>({state:"loaded",conditions:t})).addCase(os.rejected,(r,t)=>({...r,state:"error",error:t.payload||"Error while loading the shared conditions"})),e.addMatcher(Ht(Vv),(r,t)=>{const{state:a,oldLabel:s}=t.payload;r.conditions=r.conditions.map(i=>Xn(i,s,a.label))}),e.addMatcher(Ht(zv),(r,t)=>{const{payload:a}=t;r.conditions=r.conditions.map(s=>{var i;return Xn(s,(i=a.state)==null?void 0:i.label)})})}}),{updateSavedConditions:ZF,setSavedCondition:eI,updateSavedConditionDs:tI,addSavedCondition:rI,removeSavedCondition:kv,initSavedConditions:nI}=Nv.actions,aI=Nv.reducer,qa=Gt({name:"root",initialState:()=>{const e=Zn();return{filesLoading:!1,tabs:e.tabs||[],activeTab:e.activeTab,recent:e.recent||[],clipboard:null}},reducers:{setWebformState(e,r){const{path:t,currentState:a}=r.payload;e.tabs.forEach(s=>{s.path===t&&(s.content.metadata.currentState=a.id)})},copyToClipBoard(e,r){e.clipboard=r.payload},setPanelState(e,r){const{path:t,...a}=r.payload;e.tabs.forEach(s=>{s.path===t&&(s.view||(s.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(s.view.panel,a))})},openSettingsTab(e){const r={date:new Date().toISOString(),flags:{confirmed:!0},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:v.SETTINGS_TAB_PATH,type:v.FileFolderType.SETTINGS,initialContent:{},content:{}};let t=e.tabs.find(a=>a.path===r.path);if(t||(e.tabs.push(r),t=e.tabs[e.tabs.length-1]),e.activeTab!==r.path){const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=r.path,t.weight=((a==null?void 0:a.weight)||0)+1}},addDataSource(e,r){var i;const{payload:{path:t,datasourceDef:a}}=r,s=e.tabs.find(u=>u.path===t);s&&(s.content.metadata.datasources=s.content.metadata.datasources||[],(i=s.content.metadata.datasources)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.datasources=[...s.content.metadata.datasources,{...a,events:[]}],s.flags={...s.flags,touched:!0,confirmed:!0}))},addWebformState(e,r){var i;const{payload:{path:t,stateDef:a}}=r,s=e.tabs.find(u=>u.path===t);s&&(s.content.metadata.states=s.content.metadata.states||[Qn],(i=s.content.metadata.states)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.states=[...s.content.metadata.states,a],s.flags={...s.flags,touched:!0,confirmed:!0}))},removeWebformState(e,r){const{payload:t}=r;e.tabs=e.tabs.map(a=>a.path===t.path?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:Lh(a.content,t.state)}:a)},editWebformState(e,r){const{path:t,state:a,oldLabel:s}=r.payload;e.tabs=e.tabs.map(i=>i.path===t?{...i,flags:{...i.flags,touched:!0,confirmed:!0},content:{...i.content,metadata:{...i.content.metadata,states:i.content.metadata.states.map(u=>Vu(u)?u:u.id===a.id?a.conditions?{...a,conditions:Js(a.conditions)}:a:{...u,conditions:u.conditions?Xn(u.conditions,s,a.label):u.conditions})}}}:i)},updateStateConditionDs(e,r){const{path:t,old_reference:a,new_reference:s}=r.payload;e.tabs=e.tabs.map(i=>{var u,l;return i.path===t?{...i,flags:{...i.flags,touched:!0,confirmed:!0},content:{...i.content,metadata:{...i.content.metadata,states:(((l=(u=i.content)==null?void 0:u.metadata)==null?void 0:l.states)||[]).map(f=>f.conditions?{...f,conditions:zs(f.conditions,a,s)}:f)}}}:i})},resetComponentState(e,r){const{path:t,id:a,state:s}=r.payload;e.tabs=e.tabs.map(i=>i.path===t?{...i,flags:{...i.flags,touched:!0,confirmed:!0},content:{...i.content,components:{...i.content.components,[a]:{...i.content.components[a],custom:{...Ce.omit(i.content.components[a].custom,`states:${s.id}`)}}}}}:i)},setDefaultWebformStates(e,r){const{path:t,states:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,defaultStates:a.map(({id:i})=>i)}}}:s)},addDefaultWebformState(e,r){const{payload:t}=r;e.tabs=e.tabs.map(a=>{var s;return a.path===t.path?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:{...a.content,metadata:{...a.content.metadata,defaultStates:Array.from(new Set([...((s=a.content.metadata)==null?void 0:s.defaultStates)||[],t.state.id]))}}}:a})},removeDefaultWebformState(e,r){const{payload:t}=r;e.tabs=e.tabs.map(a=>{var s;return a.path===t.path?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:{...a.content,metadata:{...a.content.metadata,defaultStates:(((s=a.content.metadata)==null?void 0:s.defaultStates)||[]).filter(i=>i!==t.state.id)}}}:a})},removeDataSource(e,r){const{path:t,datasourceID:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,datasources:s.content.metadata.datasources.filter(i=>i.id!==a)}}}:s)},setDataSources(e,r){const{payload:{path:t,datasourceArr:a}}=r;e.tabs=e.tabs.map(s=>{var i;return s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...(i=s.content)==null?void 0:i.metadata,datasources:a}}}:s})},setTabs(e,r){e.tabs=r.payload},closeTab(e,r){const t=r.payload;e.tabs.splice(t,1);const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=(a==null?void 0:a.path)||""},closeOthers(e,r){e.tabs=e.tabs.filter(t=>t.path===r.payload),e.activeTab=r.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,r){e.tabs.splice(r.payload+1),e.activeTab=e.tabs[r.payload].path},closeLeftTabs(e,r){e.tabs.splice(0,r.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:t}})=>t);const r=e.tabs.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null);e.activeTab=(r==null?void 0:r.path)||""},confirmTab(e,r){const t=e.tabs.find(({path:a})=>a===r.payload);t&&(t.flags.confirmed||qa.caseReducers.setTabFlags(e,{type:r.type,payload:{path:r.payload,flags:{confirmed:!0}}}))},selectTab(e,r){const t=e.tabs.find(({path:s})=>s===r.payload);if(!t||e.activeTab===r.payload)return;const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);t.weight=a?(a.weight||0)+1:1,e.activeTab=r.payload},openTabUnselected(e,r){const t=r.payload;let a=e.tabs.find(({path:i})=>t.path===i);a||(e.tabs.push(t),a=e.tabs[e.tabs.length-1]);const s=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);a.weight=s?(s.weight||0)+1:1,a.extra={...a.extra,...t.extra}},selectTabByReference(e,r){const t=[v.FileFolderType.DEBUGGER],{isNew:a,...s}=r.payload;let i=s,u=e.tabs.find(({path:l})=>i.path===l);if(i.history||(i.history={stack:[],active:-1,locked:!1}),(t.includes(i.type)||u!=null&&u.flags.confirmed)&&(i={...i,flags:{...i.flags,confirmed:!0}}),!u){const l=e.tabs.findIndex(({flags:{confirmed:f}})=>f===!1);l!==-1&&!t.includes(i.type)&&!a?e.activeTab===e.tabs[l].path?(e.tabs[l]=i,u=e.tabs[l]):(e.tabs.push(i),u=e.tabs[e.tabs.length-1],e.tabs.splice(l,1)):(e.tabs.push(i),u=e.tabs[e.tabs.length-1])}if(e.activeTab!==i.path){const l=e.tabs.reduce((f,p)=>(p==null?void 0:p.weight)>((f==null?void 0:f.weight)||0)?p:f,null);e.activeTab=i.path,u.weight=((l==null?void 0:l.weight)||0)+1}u.extra={...u.extra,...i.extra},u.flags={...u.flags||{},...i.flags||{}}},setContent(e,r){const{path:t,content:a,contentPath:s}=r.payload;e.tabs=e.tabs.map(i=>{if(i.path!==t)return i;let u=!1,l=i.flags.confirmed;if(typeof a=="string")u=i.initialContent!==a,l=!l&&u?!0:l;else{const f=Ce.get(i.initialContent,s||"",i.initialContent),p=Ce.get(a,s||"",a);u=!Ce.isEqual(f,p),l=!l&&u?!0:l}return a&&typeof a=="object"&&(s?Ce.set(i.content,s,a):i.content=a),typeof a=="string"&&(i.content=a),{...i,flags:{...i.flags,touched:u,confirmed:l}}})},setTabFlags(e,r){const{path:t,flags:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,...a}}:s)},setTabsFlags(e,r){const{tabs:t,flags:a}=r.payload;e.tabs=e.tabs.map(s=>t.includes(s.path)?{...s,flags:{...s.flags,...a}}:s)},setTabExtra(e,r){const{path:t,extra:a,flags:s}=r.payload;e.tabs=e.tabs.map(i=>i.path===t?{...i,extra:{...i.extra,...a},flags:s?{...i.flags,...s}:i.flags}:i)},addWebFormStyles(e,r){const{path:t,styles:a=[]}=r.payload,s=e.tabs.find(i=>i.path===t);if(s){const i=s.content.metadata.styles.map(({name:l})=>l),u=a.filter(({name:l})=>!i.includes(l));s.content.metadata.styles=[...s.content.metadata.styles,...u].map(({scope:l,...f})=>({...f}))}},changeTabEditor(e,r){return e.tabs=e.tabs.map(t=>t.path===r.payload.path?r.payload:t),e},setHistoryContent(e,r){const t=r.payload;e.tabs=e.tabs.map(a=>{var i,u;if(a.path!==t)return a;const s=!Ce.isEqual(a.content,(i=a.history)==null?void 0:i.stack[a.history.active]);return a.history&&s&&(a.history.stack=[...(u=a.history)==null?void 0:u.stack.slice(0,a.history.active+1),a.content],a.history.active=a.history.stack.length-1),{...a}})},unlockHistory(e,r){const t=r.payload;e.tabs=e.tabs.map(a=>a.path!==t?a:(a.history&&(a.history.locked=!1),{...a}))},undo(e){e.tabs=e.tabs.map(r=>r.path!==e.activeTab?r:(r.history&&r.history.active>0&&(r.history.locked=!0,r.history.active--,r.content=r.history.stack[r.history.active]),{...r}))},redo(e){e.tabs=e.tabs.map(r=>r.path!==e.activeTab?r:(r.history&&r.history.active<r.history.stack.length-1&&(r.history.locked=!0,r.history.active++,r.content=r.history.stack[r.history.active]),{...r}))}},extraReducers:e=>{e.addCase(vu,(r,t)=>{if(t.payload.settingsKey==="studio.enablePreview"&&t.payload.value===!1){const a=r.tabs.find(({flags:{confirmed:s}})=>s===!1);a&&qa.caseReducers.setTabFlags(r,{type:"",payload:{path:a.path,flags:{confirmed:!0}}})}}),e.addCase(hv.fulfilled,(r,t)=>{if(!t.payload)return;const{content:a,line:s,path:i}=t.payload,u=r.tabs.find(l=>l.path===i);if(u&&typeof u.content=="string"){const l=u.content.trim().split(`
|
|
157
|
-
`);
|
|
158
|
-
`)}}),e.addCase(
|
|
159
|
-
exposed Function ${
|
|
160
|
-
`,
|
|
161
|
-
`);a.path.startsWith("Classes/")&&(a.type=v.FileFolderType.CLASS),a.extra={...a.extra,editor:v.EDITOR.Code,initialLineInfo:{line:s.length-1,lastModification:Date.now()}}}),e.addCase(ol.fulfilled,(r,t)=>{var i,u;if(!((i=t.payload)!=null&&i.path)||(u=t.payload)!=null&&u.namespace)return;const a=t.payload.path,s=r.tabs.find(v.by("path",a));!s||!s.content||!s.content.metadata||(Object.assign(s.content.metadata,{datasources:t.payload.datasources}),s.flags.touched=!0,s.flags.confirmed=!0)}),e.addCase(sl.fulfilled,(r,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace||r.tabs.forEach(i=>{i.path===s.path&&Object.assign(i.content,{metadata:{...i.content.metadata,datasources:a}})})}),e.addCase(Tv.fulfilled,(r,t)=>{const{staleThreadIds:a}=t.payload;if(a.length===0)return;const s=a.map(i=>`Debugger/${i}`);if(r.tabs=r.tabs.filter(i=>!s.includes(i.path)),r.recent=r.recent.filter(({path:i})=>!s.includes(i)),r.tabs.length){r.activeTab=r.tabs[r.tabs.length-1].path;return}r.activeTab=""}),e.addCase(nl.pending,r=>Gc(r,!1)),e.addCase(kv,(r,t)=>{const{id:a}=t.payload;r.tabs=r.tabs.map(s=>{var i;return{...s,content:{...s.content,metadata:{...s.content.metadata,states:(((i=s.content.metadata)==null?void 0:i.states)||[]).map(u=>{if(u.conditions){const l=Ks(u.conditions,a);return l?{...u,conditions:l}:Ce.omit(u,"conditions")}return u})}}}})}),e.addMatcher(Ht(vu),(r,t)=>{["project"].includes(t.payload.path)&&Gc(r,!0)}),e.addMatcher(Ht(Gs),r=>{Gc(r,!1)}),e.addMatcher(Ht(qv,At),(r,t)=>{const{payload:a}=t;let s;typeof a=="string"?s=r.tabs.find(({path:i})=>a===i):s=a,s&&(r.recent=[s,...r.recent.filter(({path:i})=>![s.path,"settings"].includes(i))])}),e.addMatcher(Ht(nv,rv),r=>{r.tabs=r.tabs.map(t=>t.path===v.ROLES_TAB_PATH?{...t,flags:{...t.flags,confirmed:!0,touched:!0}}:t)}),e.addMatcher(Ht(rl),r=>{r.tabs=r.tabs.map(t=>t.path===v.ROLES_TAB_PATH?{...t,flags:{...t.flags,touched:!1}}:t)}),e.addMatcher(Ht(ul.fulfilled,ll.fulfilled,La.fulfilled,zn.fulfilled),(r,t)=>{var s,i,u;const a=r.tabs.find(v.by("path",((s=t.payload)==null?void 0:s.path)||t.meta.arg.path));!a||(i=t.payload)!=null&&i.namespace||(a.flags.touched=!0,a.flags.confirmed=!0,Object.assign(a.content,{metadata:{...a.content.metadata,datasources:(u=t.payload)==null?void 0:u.list}}))}),e.addMatcher(Ht(La.fulfilled,zn.fulfilled),(r,t)=>{var l;const a=r.tabs.find(v.by("path",((l=t.payload)==null?void 0:l.path)||t.meta.arg.path));if(!a)return;const{panel:s}=a.view,i=v.getDatasourceId({id:t.meta.arg.id,namespace:t.meta.arg.namespace});if(s.type==="datasource"&&s.current===i)switch(t.type){case La.fulfilled.type:Object.assign(a.view.panel,{type:"component",current:HO});break;case zn.fulfilled.type:const f=v.getDatasourceId({id:t.meta.arg.new_name,namespace:t.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",current:f});break}})}}),{copyToClipBoard:oI,setTabs:sI,closeTab:Xs,setContent:fl,setTabFlags:jv,setTabsFlags:iI,setTabExtra:cI,closeAllTabs:Bv,addDataSource:uI,closeRightTabs:Wv,closeOthers:Hv,closeLeftTabs:Uv,closeSavedTabs:lI,setDataSources:fI,removeDataSource:dI,confirmTab:pI,selectTab:qv,selectTabByReference:At,openTabUnselected:Gv,addWebFormStyles:hI,changeTabEditor:gI,openSettingsTab:vI,setWebformState:Yv,setPanelState:mI,addWebformState:yI,editWebformState:Vv,updateStateConditionDs:bI,removeWebformState:zv,resetComponentState:_I,addDefaultWebformState:EI,removeDefaultWebformState:SI,setDefaultWebformStates:TI,setHistoryContent:Kv,unlockHistory:dl,undo:wI,redo:CI}=qa.actions,Jv=qa.reducer,xI=_v.reducer,rn=Q("catalog/fetchCatalog",async(e,{rejectWithValue:r})=>{var t,a;try{const s=await v.getCatalog(),i=new Map,u=new Map,l=new Map;return(t=s.singletons)==null||t.forEach(({methods:f=[],...p})=>{const h={...p,methods:f};l.set(p.name,h)}),(a=s==null?void 0:s.dataClasses)==null||a.forEach(({methods:f=[],...p})=>{if(p.uuid||Object.assign(p,{uuid:v.generateUUID()}),p.attributes){const y=["storage","relatedEntity"];p.attributes=p.attributes.map(_=>(y.includes(_.kind)&&!_.uuid&&Object.assign(_,{uuid:v.generateUUID()}),_))}const h={...p,methods:f};u.set(p.className,h),i.set(p.collectionName,h)}),{__BASEID:s.__BASEID,__UNIQID:s.__UNIQID,dataClassByCollectionName:Object.fromEntries(i.entries()),methods:s.methods||[],dataClasses:Object.fromEntries(u.entries()),singletons:Object.fromEntries(l.entries())}}catch{return r("Error while loading the catalog")}}),OI=Gt({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(rn.pending,()=>({state:"loading"})).addCase(rn.fulfilled,(r,{payload:t})=>({state:"loaded",model:t})).addCase(rn.rejected,(r,t)=>({state:"error",error:t.payload||"Error while loading the catalog"}))}}),AI=OI.reducer,RI=Kg.reducer,ss=Q("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:r})=>{try{return await v.getSharedDatasources({createIfNotExists:!0})}catch{return r("Error while loading the shared datasources")}}),Xv=Q("shared_datasources/addSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a=JSON.parse(JSON.stringify(t().sharedDatasources));if(e.namespace)a.sources[e.namespace]?a.sources[e.namespace].push(e):a.sources[e.namespace]=[e];else return r("Namespace is required");return await v.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),Qv=Q("shared_datasources/editSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a=t().sharedDatasources;if(!e.namespace)return r("Namespace is required");if(a.sources[e.namespace])a.sources[e.namespace]=a.sources[e.namespace].map(s=>s.id===e.id?{...e,id:s.id}:s);else return r("Namespace not found");return await v.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),Zv=Q("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a={...t().sharedDatasources};if(a.sources[e.namespace]){const s=a.sources[e.namespace].filter(i=>i.id!==e.id);if(s.length===0){const{[e.namespace]:i,...u}=a.sources;a.sources=u}else a.sources={...a.sources,[e.namespace]:s}}return await v.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),pl=Q("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:r,getState:t})=>{try{const a={...t().sharedDatasources};for(const s of e){if(!s.namespace)return r("Namespace is required");if(a.sources[s.namespace])a.sources[s.namespace]=a.sources[s.namespace].map(i=>i.id===s.id?s:i);else return r("Namespace not found")}return await v.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),DI=Q("shared_datasources/setDatasourceEvents",async({tabPath:e,name:r,namespace:t,events:a},{getState:s,dispatch:i})=>{var E,T,C;const{root:{tabs:u},sharedDatasources:l}=s(),f=((C=(T=(E=u.find(({path:O})=>O===e))==null?void 0:E.content)==null?void 0:T.metadata)==null?void 0:C.datasources)||[],p={local:!1,shared:!1},h=(O,D)=>O.id===r&&(!t&&!O.namespace||O.namespace===t)?(D==null||D(),{...O,events:a}):O,y=f.map(O=>h(O,()=>{p.local=!0})),_=Ce.flatten(Ce.values(l.sources)).map(O=>h(O,()=>{p.shared=!0}));p.local&&i(fl({path:e,content:y,contentPath:"metadata.datasources"})),p.shared&&i(pl(_))}),em=Gt({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,r){e.sources[r.payload.name]=[]}},extraReducers(e){e.addCase(ss.pending,r=>({state:"loading",sources:{}})).addCase(ss.fulfilled,(r,t)=>({state:"loaded",sources:t.payload})).addCase(ss.rejected,(r,t)=>({state:"error",sources:{},error:t.payload||"Error while loading the shared datasources"})).addCase(pl.fulfilled,(r,t)=>({state:"loaded",sources:t.payload})).addCase(sl.fulfilled,(r,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace&&Object.assign(r.sources,{[s.namespace]:a})}).addCase(Xv.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(Zv.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(Qv.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(ol.fulfilled,(r,t)=>{if(!t.payload)return r;const{datasources:a,namespace:s}=t.payload;s&&r.sources[s]&&Object.assign(r.sources[s],{[s]:a})}).addMatcher(Ht(ul.fulfilled,La.fulfilled,ll.fulfilled,zn.fulfilled),(r,t)=>{if(!t.payload)return;const{namespace:a,list:s}=t.payload;a&&Object.assign(r.sources,{[a]:s})})}}),{addEmptyNamespace:PI}=em.actions,FI=em.reducer,II=iv.reducer,is=Q("shared_css/fetchSharedCSS",async(e,{rejectWithValue:r})=>{try{const{classes:t}=await v.getSharedCSS({createIfNotExists:!0});return t}catch{return r("Error while loading the shared CSS")}}),MI=v.queue();async function $I(e){const r={verb:v.DesignerRequestVerb.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:t,...a})=>({...a}))}};await MI(()=>v.http(v.API_PREFIX,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}))}const tm=Gt({name:"shared-css",initialState:()=>{const{sharedCSS:e}=Zn();return e||{state:"loading",styles:[]}},reducers:{updateSharedCss:(e,r)=>(e.styles=r.payload.classes,$I(r.payload.classes),e),initSharedCss:(e,r)=>(e.styles=r.payload.classes,e)},extraReducers(e){e.addCase(is.pending,r=>({...r,state:"loading"})).addCase(is.fulfilled,(r,{payload:t})=>({state:"loaded",styles:t})).addCase(is.rejected,(r,t)=>({...r,state:"error",error:t.payload||"Error while loading the shared css"}))}}),{updateSharedCss:LI,initSharedCss:NI}=tm.actions,kI=tm.reducer,jI={},BI=Gt({name:"tabs",initialState:jI,reducers:{}}),WI=e=>j(oa,r=>{var t,a;return(a=(t=r.find(s=>s.path===e))==null?void 0:t.view)==null?void 0:a.panel});BI.reducer;const rm=lh({root:Jv,explorer:II,debugger:xI,settings:_P,catalog:AI,roles:vP,sharedDatasources:FI,savedConditions:aI,webforms:GF,modals:RI,sharedCSS:kI,model:jF});let Ra;const nm=()=>{if(!Ra){Ra=dw({reducer:rm});const e=({ignorePreferences:r=!1}={})=>{const{root:{activeTab:t,tabs:a,recent:s},roles:i,debugger:u,webforms:l,sharedCSS:f,settings:{session:p}}=Ra.getState();r||Ih({...p}),Fh({tabs:a,activeTab:t,recent:s,roles:i,debugger:u,webforms:l,sharedCSS:f})};Ra.subscribe(w1(e,1e3)),window.addEventListener("beforeunload",()=>{e({ignorePreferences:!0})})}return Ra};var Su={exports:{}},Un={};/** @license React v17.0.2
|
|
162
|
-
* react-jsx-runtime.production.min.js
|
|
163
|
-
*
|
|
164
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the MIT license found in the
|
|
167
|
-
* LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/var rh;function HI(){if(rh)return Un;rh=1,Hu();var e=lt,r=60103;if(Un.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;r=t("react.element"),Un.Fragment=t("react.fragment")}var a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function u(l,f,p){var h,y={},_=null,E=null;p!==void 0&&(_=""+p),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(E=f.ref);for(h in f)s.call(f,h)&&!i.hasOwnProperty(h)&&(y[h]=f[h]);if(l&&l.defaultProps)for(h in f=l.defaultProps,f)y[h]===void 0&&(y[h]=f[h]);return{$$typeof:r,type:l,key:_,ref:E,props:y,_owner:a.current}}return Un.jsx=u,Un.jsxs=u,Un}var Yc={};/** @license React v17.0.2
|
|
169
|
-
* react-jsx-runtime.development.js
|
|
170
|
-
*
|
|
171
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the MIT license found in the
|
|
174
|
-
* LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/var nh;function UI(){return nh||(nh=1,function(e){process.env.NODE_ENV!=="production"&&function(){var r=lt,t=Hu(),a=60103,s=60106;e.Fragment=60107;var i=60108,u=60114,l=60109,f=60110,p=60112,h=60113,y=60120,_=60115,E=60116,T=60121,C=60122,O=60117,D=60129,F=60131;if(typeof Symbol=="function"&&Symbol.for){var M=Symbol.for;a=M("react.element"),s=M("react.portal"),e.Fragment=M("react.fragment"),i=M("react.strict_mode"),u=M("react.profiler"),l=M("react.provider"),f=M("react.context"),p=M("react.forward_ref"),h=M("react.suspense"),y=M("react.suspense_list"),_=M("react.memo"),E=M("react.lazy"),T=M("react.block"),C=M("react.server.block"),O=M("react.fundamental"),M("react.scope"),M("react.opaque.id"),D=M("react.debug_trace_mode"),M("react.offscreen"),F=M("react.legacy_hidden")}var L=typeof Symbol=="function"&&Symbol.iterator,I="@@iterator";function G(w){if(w===null||typeof w!="object")return null;var U=L&&w[L]||w[I];return typeof U=="function"?U:null}var W=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function q(w){{for(var U=arguments.length,K=new Array(U>1?U-1:0),ie=1;ie<U;ie++)K[ie-1]=arguments[ie];ee("error",w,K)}}function ee(w,U,K){{var ie=W.ReactDebugCurrentFrame,$e=ie.getStackAddendum();$e!==""&&(U+="%s",K=K.concat([$e]));var Le=K.map(function(Oe){return""+Oe});Le.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Le)}}var De=!1;function Ee(w){return!!(typeof w=="string"||typeof w=="function"||w===e.Fragment||w===u||w===D||w===i||w===h||w===y||w===F||De||typeof w=="object"&&w!==null&&(w.$$typeof===E||w.$$typeof===_||w.$$typeof===l||w.$$typeof===f||w.$$typeof===p||w.$$typeof===O||w.$$typeof===T||w[0]===C))}function We(w,U,K){var ie=U.displayName||U.name||"";return w.displayName||(ie!==""?K+"("+ie+")":K)}function X(w){return w.displayName||"Context"}function ke(w){if(w==null)return null;if(typeof w.tag=="number"&&q("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case e.Fragment:return"Fragment";case s:return"Portal";case u:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case y:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case f:var U=w;return X(U)+".Consumer";case l:var K=w;return X(K._context)+".Provider";case p:return We(w,w.render,"ForwardRef");case _:return ke(w.type);case T:return ke(w._render);case E:{var ie=w,$e=ie._payload,Le=ie._init;try{return ke(Le($e))}catch{return null}}}return null}var ft=0,rt,Ge,ct,dr,H,V,ge;function de(){}de.__reactDisabledLog=!0;function ce(){{if(ft===0){rt=console.log,Ge=console.info,ct=console.warn,dr=console.error,H=console.group,V=console.groupCollapsed,ge=console.groupEnd;var w={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}ft++}}function pe(){{if(ft--,ft===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},w,{value:rt}),info:t({},w,{value:Ge}),warn:t({},w,{value:ct}),error:t({},w,{value:dr}),group:t({},w,{value:H}),groupCollapsed:t({},w,{value:V}),groupEnd:t({},w,{value:ge})})}ft<0&&q("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=W.ReactCurrentDispatcher,le;function ue(w,U,K){{if(le===void 0)try{throw Error()}catch($e){var ie=$e.stack.trim().match(/\n( *(at )?)/);le=ie&&ie[1]||""}return`
|
|
176
|
-
`+le+w}}var ve=!1,me;{var J=typeof WeakMap=="function"?WeakMap:Map;me=new J}function Y(w,U){if(!w||ve)return"";{var K=me.get(w);if(K!==void 0)return K}var ie;ve=!0;var $e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=se.current,se.current=null,ce();try{if(U){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(sr){ie=sr}Reflect.construct(w,[],Oe)}else{try{Oe.call()}catch(sr){ie=sr}w.call(Oe.prototype)}}else{try{throw Error()}catch(sr){ie=sr}w()}}catch(sr){if(sr&&ie&&typeof sr.stack=="string"){for(var Te=sr.stack.split(`
|
|
177
|
-
`),dt=ie.stack.split(`
|
|
178
|
-
`),ze=Te.length-1,Je=dt.length-1;ze>=1&&Je>=0&&Te[ze]!==dt[Je];)Je--;for(;ze>=1&&Je>=0;ze--,Je--)if(Te[ze]!==dt[Je]){if(ze!==1||Je!==1)do if(ze--,Je--,Je<0||Te[ze]!==dt[Je]){var Vt=`
|
|
179
|
-
`+Te[ze].replace(" at new "," at ");return typeof w=="function"&&me.set(w,Vt),Vt}while(ze>=1&&Je>=0);break}}}finally{ve=!1,se.current=Le,pe(),Error.prepareStackTrace=$e}var jr=w?w.displayName||w.name:"",ao=jr?ue(jr):"";return typeof w=="function"&&me.set(w,ao),ao}function Qe(w,U,K){return Y(w,!1)}function Ze(w){var U=w.prototype;return!!(U&&U.isReactComponent)}function $t(w,U,K){if(w==null)return"";if(typeof w=="function")return Y(w,Ze(w));if(typeof w=="string")return ue(w);switch(w){case h:return ue("Suspense");case y:return ue("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case p:return Qe(w.render);case _:return $t(w.type,U,K);case T:return Qe(w._render);case E:{var ie=w,$e=ie._payload,Le=ie._init;try{return $t(Le($e),U,K)}catch{}}}return""}var Ja={},Yt=W.ReactDebugCurrentFrame;function an(w){if(w){var U=w._owner,K=$t(w.type,w._source,U?U.type:null);Yt.setExtraStackFrame(K)}else Yt.setExtraStackFrame(null)}function Qs(w,U,K,ie,$e){{var Le=Function.call.bind(Object.prototype.hasOwnProperty);for(var Oe in w)if(Le(w,Oe)){var Te=void 0;try{if(typeof w[Oe]!="function"){var dt=Error((ie||"React class")+": "+K+" type `"+Oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[Oe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dt.name="Invariant Violation",dt}Te=w[Oe](U,Oe,ie,K,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){Te=ze}Te&&!(Te instanceof Error)&&(an($e),q("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ie||"React class",K,Oe,typeof Te),an(null)),Te instanceof Error&&!(Te.message in Ja)&&(Ja[Te.message]=!0,an($e),q("Failed %s type: %s",K,Te.message),an(null))}}}var or=W.ReactCurrentOwner,wt=Object.prototype.hasOwnProperty,on={key:!0,ref:!0,__self:!0,__source:!0},sn,Xa,Er;Er={};function Zs(w){if(wt.call(w,"ref")){var U=Object.getOwnPropertyDescriptor(w,"ref").get;if(U&&U.isReactWarning)return!1}return w.ref!==void 0}function cn(w){if(wt.call(w,"key")){var U=Object.getOwnPropertyDescriptor(w,"key").get;if(U&&U.isReactWarning)return!1}return w.key!==void 0}function kr(w,U){if(typeof w.ref=="string"&&or.current&&U&&or.current.stateNode!==U){var K=ke(or.current.type);Er[K]||(q('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ke(or.current.type),w.ref),Er[K]=!0)}}function ia(w,U){{var K=function(){sn||(sn=!0,q("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"key",{get:K,configurable:!0})}}function ca(w,U){{var K=function(){Xa||(Xa=!0,q("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"ref",{get:K,configurable:!0})}}var ua=function(w,U,K,ie,$e,Le,Oe){var Te={$$typeof:a,type:w,key:U,ref:K,props:Oe,_owner:Le};return Te._store={},Object.defineProperty(Te._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Te,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(Te,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$e}),Object.freeze&&(Object.freeze(Te.props),Object.freeze(Te)),Te};function la(w,U,K,ie,$e){{var Le,Oe={},Te=null,dt=null;K!==void 0&&(Te=""+K),cn(U)&&(Te=""+U.key),Zs(U)&&(dt=U.ref,kr(U,$e));for(Le in U)wt.call(U,Le)&&!on.hasOwnProperty(Le)&&(Oe[Le]=U[Le]);if(w&&w.defaultProps){var ze=w.defaultProps;for(Le in ze)Oe[Le]===void 0&&(Oe[Le]=ze[Le])}if(Te||dt){var Je=typeof w=="function"?w.displayName||w.name||"Unknown":w;Te&&ia(Oe,Je),dt&&ca(Oe,Je)}return ua(w,Te,dt,$e,ie,or.current,Oe)}}var un=W.ReactCurrentOwner,xn=W.ReactDebugCurrentFrame;function pr(w){if(w){var U=w._owner,K=$t(w.type,w._source,U?U.type:null);xn.setExtraStackFrame(K)}else xn.setExtraStackFrame(null)}var ln;ln=!1;function fn(w){return typeof w=="object"&&w!==null&&w.$$typeof===a}function Qa(){{if(un.current){var w=ke(un.current.type);if(w)return`
|
|
180
|
-
|
|
181
|
-
Check the render method of \``+w+"`."}return""}}function ei(w){{if(w!==void 0){var U=w.fileName.replace(/^.*[\\\/]/,""),K=w.lineNumber;return`
|
|
182
|
-
|
|
183
|
-
Check your code at `+U+":"+K+"."}return""}}var Za={};function eo(w){{var U=Qa();if(!U){var K=typeof w=="string"?w:w.displayName||w.name;K&&(U=`
|
|
184
|
-
|
|
185
|
-
Check the top-level render call using <`+K+">.")}return U}}function fa(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var K=eo(U);if(Za[K])return;Za[K]=!0;var ie="";w&&w._owner&&w._owner!==un.current&&(ie=" It was passed a child from "+ke(w._owner.type)+"."),pr(w),q('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,ie),pr(null)}}function to(w,U){{if(typeof w!="object")return;if(Array.isArray(w))for(var K=0;K<w.length;K++){var ie=w[K];fn(ie)&&fa(ie,U)}else if(fn(w))w._store&&(w._store.validated=!0);else if(w){var $e=G(w);if(typeof $e=="function"&&$e!==w.entries)for(var Le=$e.call(w),Oe;!(Oe=Le.next()).done;)fn(Oe.value)&&fa(Oe.value,U)}}}function ti(w){{var U=w.type;if(U==null||typeof U=="string")return;var K;if(typeof U=="function")K=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===p||U.$$typeof===_))K=U.propTypes;else return;if(K){var ie=ke(U);Qs(K,w.props,"prop",ie,w)}else if(U.PropTypes!==void 0&&!ln){ln=!0;var $e=ke(U);q("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$e||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&q("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ri(w){{for(var U=Object.keys(w.props),K=0;K<U.length;K++){var ie=U[K];if(ie!=="children"&&ie!=="key"){pr(w),q("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),pr(null);break}}w.ref!==null&&(pr(w),q("Invalid attribute `ref` supplied to `React.Fragment`."),pr(null))}}function ro(w,U,K,ie,$e,Le){{var Oe=Ee(w);if(!Oe){var Te="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(Te+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var dt=ei($e);dt?Te+=dt:Te+=Qa();var ze;w===null?ze="null":Array.isArray(w)?ze="array":w!==void 0&&w.$$typeof===a?(ze="<"+(ke(w.type)||"Unknown")+" />",Te=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof w,q("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,Te)}var Je=la(w,U,K,$e,Le);if(Je==null)return Je;if(Oe){var Vt=U.children;if(Vt!==void 0)if(ie)if(Array.isArray(Vt)){for(var jr=0;jr<Vt.length;jr++)to(Vt[jr],w);Object.freeze&&Object.freeze(Vt)}else q("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else to(Vt,w)}return w===e.Fragment?ri(Je):ti(Je),Je}}function no(w,U,K){return ro(w,U,K,!0)}function ni(w,U,K){return ro(w,U,K,!1)}var ai=ni,oi=no;e.jsx=ai,e.jsxs=oi}()}(Yc)),Yc}process.env.NODE_ENV==="production"?Su.exports=HI():Su.exports=UI();var qI=Su.exports;const GI=({children:e,store:r})=>qI.jsx(hg,{store:r,children:e});exports.CATALOG_REFRESH_DELAY=Ya;exports.DEFAULT_CACHE=$u;exports.EAttributeKind=Vs;exports.EAttributeTypes=Cv;exports.EDebuggerErrorReason=Ah;exports.EDebuggerErrorType=ps;exports.EDebuggerState=Jr;exports.EDisplayMode=Ju;exports.EPermissionType=ne;exports.ETooltipBehavior=zu;exports.EUnsavedPopOverChoice=Ku;exports.ExpressionIndex=Oh;exports.FLAGS_INIT_STATE=Rv;exports.FLAGS_KEYS=Ua;exports.ROOT_WEBFORM_STATE=Qn;exports.ReduxProvider=GI;exports.THEME_CLASSES=Fg;exports.WT_FLAGS_KEYS=Av;exports.actionsToPrivs=qg;exports.addBreakpointDecoration=JP;exports.addClassesFolder=AP;exports.addComponent=Pv;exports.addCraftedComponent=zF;exports.addDataSource=uI;exports.addDatasource=ul;exports.addDefaultWebformState=EI;exports.addEmptyNamespace=PI;exports.addExpression=nF;exports.addIn=zD;exports.addNewFile=cv;exports.addPermission=eP;exports.addSavedCondition=rI;exports.addSession=lF;exports.addSharedSource=Xv;exports.addWebFormStyles=hI;exports.addWebformState=yI;exports.allowed=YD;exports.attributeKinds=TF;exports.attributeScopes=OF;exports.attributeTypes=CF;exports.castToFileFolder=PP;exports.changeTabEditor=gI;exports.children=Es;exports.clearAllBreakpoints=tF;exports.clearBreakpoints=ZP;exports.clearBreakpointsExcept=eF;exports.closeAllTabs=Bv;exports.closeLeftTabs=Uv;exports.closeModal=dP;exports.closeOthers=Hv;exports.closeRightTabs=Wv;exports.closeSavedTabs=lI;exports.closeTab=Xs;exports.confirmTab=pI;exports.copyToClipBoard=oI;exports.create=Ug;exports.createClassesFolderContent=ou;exports.createModal=Jg;exports.createModelFiles=bu;exports.createNewFile=Gn;exports.createNewFileAndOpen=LP;exports.createNewNode=rs;exports.createRole=uP;exports.createWithResource=JD;exports.dataclassScopes=xF;exports.deepDeleteCondition=Ks;exports.deepSanitizeCondition=Js;exports.deleteDatasource=La;exports.deleteFile=_u;exports.deleteFolder=NP;exports.deleteSharedSource=Zv;exports.deserializeModel=Mh;exports.duplicateNode=ns;exports.editComponent=Fv;exports.editCraftedComponent=KF;exports.editDataSource=sl;exports.editDatasource=ll;exports.editModal=pP;exports.editRole=cP;exports.editSharedSource=Qv;exports.editWebformState=Vv;exports.editors=eg;exports.executeMethod=kP;exports.expandFolder=wP;exports.extensions=tg;exports.fetchAppSettings=av;exports.fetchCatalog=rn;exports.fetchChanges=mv;exports.fetchCraftedComponents=Lv;exports.fetchFiles=BP;exports.fetchFolderContent=tn;exports.fetchFolderContentWithoutExpanding=Ia;exports.fetchHTTPHandlers=pv;exports.fetchModel=Ts;exports.fetchRoles=Ss;exports.fetchRolesChanges=ev;exports.fetchSavedConditions=os;exports.fetchSettings=nl;exports.fetchSharedCss=is;exports.fetchSharedDatasources=ss;exports.fetchTemplate=VF;exports.fetchTemplates=YF;exports.findNodeByPath=nt;exports.findOne=wn;exports.findSession=at;exports.findSessionByPath=Cg;exports.getCachedState=Zn;exports.getCashedPrefrences=Lu;exports.getContent=Sn;exports.getDebuggerTabName=Wh;exports.getDebuggerTabPath=ku;exports.getDefaultContent=uv;exports.getDefaultName=DF;exports.getDictByName=Yg;exports.getEditors=Tt;exports.getExtension=Bu;exports.getFileNameWithoutExtension=ng;exports.getFilePath=dv;exports.getFileType=fv;exports.getFilenameFromType=lv;exports.getGraphData=ZD;exports.getInheritedResources=zg;exports.getModalTitle=Rs;exports.getNodeRelativePath=rg;exports.getPrivilegeById=_r;exports.getPromotions=oP;exports.getResourceFromType=Zu;exports.getStore=nm;exports.indexTypes=AF;exports.initSavedConditions=nI;exports.initSharedCss=NI;exports.injectContentAtLine=hv;exports.inspect=WF;exports.isBaseState=Vu;exports.isJSON=$h;exports.isRelatedAttr=PF;exports.isRelatedEntitiesAttr=Ov;exports.isRelatedEntityAttr=xv;exports.isRenameDatasource=XF;exports.isRolesOutdated=el;exports.isValidPrimaryKey=SF;exports.modelSubject=lg;exports.openAddFileInput=CP;exports.openFile=Ma;exports.openFileAtLine=al;exports.openFileAtSelection=gv;exports.openModal=ar;exports.openModel=yF;exports.openRoles=KP;exports.openSettingsTab=vI;exports.openTabUnselected=Gv;exports.parents=Hs;exports.populateShallow=QD;exports.primaryKeyAttributes=wF;exports.redo=CI;exports.refactorConditions=Xn;exports.refactorWebform=Lh;exports.refreshFile=xP;exports.reloadTab=as;exports.relocateNode=$a;exports.remove=VD;exports.removeAllExpressions=sF;exports.removeBreakpointDecoration=XP;exports.removeClassesFolder=RP;exports.removeComponent=Iv;exports.removeCraftedComponent=JF;exports.removeDataSource=dI;exports.removeDebuggerSessionsNotIn=Tv;exports.removeDefaultWebformState=SI;exports.removeExpression=oF;exports.removeFile=yu;exports.removeFileNode=Eu;exports.removeFrom=KD;exports.removeModal=Xg;exports.removeMultiplePermissions=rP;exports.removePermission=tP;exports.removeRole=iP;exports.removeSavedCondition=kv;exports.removeSession=dF;exports.removeSessionByIndex=pF;exports.removeWebformState=zv;exports.rename=XD;exports.renameClassesFolder=DP;exports.renameDataSource=ol;exports.renameDatasource=zn;exports.renameExpression=aF;exports.renameFile=Yn;exports.resetComponentState=_I;exports.resetResources=nP;exports.rootReducer=Jv;exports.sanitize=Us;exports.sanitizePermissions=Gg;exports.sanitizePrivileges=Wg;exports.saveAll=WP;exports.saveExpressions=uF;exports.saveModel=ws;exports.savePrefrences=Ih;exports.saveRole=lP;exports.saveRoles=gu;exports.saveState=Fh;exports.saveTab=Vn;exports.selectActiveLine=iR;exports.selectActiveTab=_R;exports.selectActiveTabHistoryActions=rD;exports.selectAllDatasourcesByPath=ZA;exports.selectAppState=Sg;exports.selectBreakpoints=rR;exports.selectCSSClassesByPath=QR;exports.selectCallChainVariables=vR;exports.selectCatalog=Ns;exports.selectCatalogMethods=VA;exports.selectCatalogState=qA;exports.selectClassBreakpoints=aR;exports.selectClassOffset=yR;exports.selectClasses=FR;exports.selectClassesFolder=Dg;exports.selectClipBoard=uD;exports.selectComponents=Mg;exports.selectComponentsByPath=XA;exports.selectContentByPath=Og;exports.selectCraftedComponent=sD;exports.selectCurrentFrameByThreadId=pR;exports.selectCurrentTab=xg;exports.selectCurrentWebformStateByPath=hD;exports.selectDataclasses=_g;exports.selectDatasource=QA;exports.selectDatasourcesByPath=Tg;exports.selectDatasourcesTheme=cD;exports.selectDebuggerChannels=hR;exports.selectDebuggerData=Cn;exports.selectDebuggerMeta=eR;exports.selectDebuggerSessions=Rt;exports.selectDebuggerSessionsCount=tR;exports.selectDebuggers=AR;exports.selectDefaultWebformStatesByPath=pD;exports.selectDraftBreakpoints=nR;exports.selectDraftClassBreakpoints=oR;exports.selectExceptions=bR;exports.selectExplorer=RR;exports.selectExpressions=cR;exports.selectExpressionsVariables=mR;exports.selectFeatureFlag=qR;exports.selectFlagsByPath=eD;exports.selectForceLogin=BR;exports.selectGuestPrivilege=NR;exports.selectHasTabs=wR;exports.selectHighlightedLines=sR;exports.selectHistoryByPath=tD;exports.selectI18nCurrent=JR;exports.selectI18nSetting=KR;exports.selectInspectedCSSClass=nD;exports.selectInspectedDatasource=aD;exports.selectInspector=ks;exports.selectInspectorStateByType=iD;exports.selectIsLoaded=lD;exports.selectMethods=DR;exports.selectMethodsFolder=Rg;exports.selectModals=IR;exports.selectMonacoZoom=zR;exports.selectPanelByPath=WI;exports.selectPartialSessionSettings=HR;exports.selectPreferences=GR;exports.selectPreviewedWebformsPaths=TR;exports.selectPrivileges=LR;exports.selectProjectSettings=Pg;exports.selectQodly=VR;exports.selectRecentFiles=ER;exports.selectRemoteDebuggerMode=YR;exports.selectRoles=$R;exports.selectRolesAndPrivileges=MR;exports.selectRolesDate=WR;exports.selectRolesFlags=kR;exports.selectRoot=Lr;exports.selectSavedConditions=gD;exports.selectSelectedTab=jR;exports.selectServerSettings=Gu;exports.selectSessionSetting=UR;exports.selectSessionSettings=sa;exports.selectSharedCSS=ZR;exports.selectSharedDatasources=wg;exports.selectSingletons=GA;exports.selectSourceByPath=lR;exports.selectSourceByThreadId=dR;exports.selectStackFrames=gR;exports.selectStoppedFromDebugSession=uR;exports.selectStylesByPath=XR;exports.selectTab=qv;exports.selectTabByPath=Nr;exports.selectTabByReference=At;exports.selectTabExtraByPath=CR;exports.selectTabMaxWeight=SR;exports.selectTabs=oa;exports.selectTemplates=$g;exports.selectTemplatesData=oD;exports.selectThreadIdByPath=fR;exports.selectTouchedTabs=qu;exports.selectTouchedTabsLength=OR;exports.selectVirtualDataClasses=YA;exports.selectWebForms=PR;exports.selectWebFormsFolder=Ag;exports.selectWebformMetadataByPath=fD;exports.selectWebformNodes=xR;exports.selectWebformStatesByPath=Lg;exports.selectWebformStatesLabelsByPath=dD;exports.selectWebformStylesByPath=Yu;exports.selectWebforms=za;exports.selectorEqualityFn=x1;exports.serializeModel=RF;exports.setActiveLine=rF;exports.setBreakpointsDecoration=QP;exports.setCallChainVariables=hF;exports.setContent=fl;exports.setCurrentWebformState=zP;exports.setDataSources=fI;exports.setDatasourceEvents=DI;exports.setDatasourcesTheme=UF;exports.setDebuggerMeta=mF;exports.setDefaultWebformStates=TI;exports.setExpression=iF;exports.setExpressionVariables=gF;exports.setFolderChildren=OP;exports.setHistoryContent=Kv;exports.setModelFlag=EF;exports.setPanelState=mI;exports.setRolesContent=tl;exports.setSavedCondition=eI;exports.setSelectedGroup=HF;exports.setSessions=Ev;exports.setSetting=vu;exports.setSettings=Gs;exports.setSettingsAsText=bP;exports.setSourceContent=vF;exports.setTabContent=VP;exports.setTabExtra=cI;exports.setTabFlags=jv;exports.setTabs=sI;exports.setTabsFlags=iI;exports.setTemplateData=$v;exports.setTemplatesData=Mv;exports.setWebformState=Yv;exports.setWebformsFlag=qF;exports.sort=Hg;exports.stateReducer=rm;exports.stateSlice=qa;exports.toAPI=qs;exports.toState=sP;exports.toggleExpandFolder=TP;exports.toggleForceLogin=gP;exports.toggleInspector=BF;exports.togglePermission=aP;exports.togglePrivilegePermission=Vg;exports.toggleTab=hP;exports.tryCloseAllTabs=UP;exports.tryCloseLeftTabs=GP;exports.tryCloseOtherTabs=HP;exports.tryCloseRightTabs=qP;exports.tryCloseTab=il;exports.tryEditMethod=FP;exports.tryInjectMethod=bv;exports.tryRenameDataclass=bF;exports.undo=wI;exports.uniquePush=nr;exports.unlockHistory=dl;exports.updateDsCondition=zs;exports.updateExpressionAt=cF;exports.updatePrivileges=rv;exports.updateRoles=nv;exports.updateRolesAndPrivileges=rl;exports.updateSavedConditionDs=tI;exports.updateSavedConditions=ZF;exports.updateSession=fF;exports.updateSharedCss=LI;exports.updateSharedDatasources=pl;exports.updateStateConditionDs=bI;exports.uploadFile=$P;exports.uploadFileAndGetResponse=MP;exports.useAppDispatch=UA;exports.useAppSelector=br;exports.useAttribute=LF;exports.useCollections=MF;exports.useDataclass=$F;exports.useDataclasses=IF;exports.useMethod=JA;exports.useMethods=zA;exports.useModelFlags=kF;exports.useModelSelector=FF;exports.useModelViewport=NF;exports.wipeDebuggerSessions=Sv;
|
|
186
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
209
|
+
`}];function MS(e,t){switch(e){case N.WEBFORMS:{const r={metadata:{v:"1.0",datasources:[],styles:[]},components:{ROOT:{parent:"",type:{resolvedName:"Container"},isCanvas:!0,props:{airyMode:!1,className:"bg-white h-full w-full px-6",classNames:[],events:[]},displayName:"Page",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}};return t["webforms.display-mode"]===Cp.AIRY&&(r.components.ROOT.props.airyMode=!0),r}case N.REPORT:return{metadata:{v:"1.0",datasources:[],styles:[]},pages:[{name:"doc",id:"index",components:{ROOT:{type:{resolvedName:"Document"},isCanvas:!0,props:{classNames:[],events:[],airyMode:!1,className:"bg-white h-full w-full px-6"},displayName:"Document",custom:{},parent:"",hidden:!1,nodes:[],linkedNodes:{}}}}]};case N.METHODS:return`//%attributes = {}
|
|
210
|
+
`;default:return""}}function FS(e,t,r){switch(t){case N.MOBILEFORM:return`${e}.MForm`;case N.WEBFORM:return`${e}.WebForm`;case N.REPORT:return`${e}.QoDoc`;case N.METHOD:case N.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}function i3(e){switch(e){case We.WEBFORMS:return N.WEBFORMS;case We.METHODS:return N.METHODS;case We.CLASSES:return N.CLASSES;case We.REPORTS:case"Reports":return N.REPORT;case"Mobile":return N.MOBILE;default:return e}}function NS(e){switch(e){case N.WEBFORMS:return N.WEBFORM;case N.REPORT:return N.REPORT;case N.CLASSES:return N.CLASS;case N.METHODS:return N.METHOD;case N.FOLDER:return N.FOLDER;case N.MOBILE:return N.MOBILEFORM;default:return e}}const o3=Z("files/tryEditMethod",async({method:e},{dispatch:t})=>{const r=e.filePath.split("/"),[n]=r[1].split("."),{editor:a}=Ut(e.filePath);return await t(Ip({file:{name:n,path:e.filePath,date:new Date().toISOString(),type:N.CLASS,editor:a},line:e.startingLine+1})).unwrap()}),bd=Z("explorer/createModelFiles",async(e,{dispatch:t,getState:r})=>{var m;const n=r(),a=We.CLASSES,o=n.settings.server.qodly,u=dt(n.explorer,a);if(!u)return;await t(na(a));const f=((m=r().explorer.find(g=>g.name===a))==null?void 0:m.children)||[];let d=[{content:"",name:""}];if(e.type==="dataclass"&&!e.toCreate){const{className:g,collectionName:y}=e;d=[{...Oa().dataclass({name:g,qodly:o})},{...Oa().collection({name:y,qodly:o})},{...Oa().entity({name:g,qodly:o})}]}else if(e.type==="dataclass"&&e.toCreate){const{className:g,collectionName:y}=e;d=[{...Oa()[e.toCreate]({name:g||y,qodly:o})}]}else d=[{...Oa().model({name:"DataStore",qodly:o})}];d=d.filter(g=>!f.find(({name:y,ext:E,info:{exist:S=!0}={}})=>y===g.name&&E===(o?"4qs":"4dm")&&S)),await Promise.all(d.map(async({name:g,content:y})=>{await t(ii({type:N.CLASS,path:a,fileName:g,parentNode:u,content:y,qodly:n.settings.server.qodly}))}));const p=e.type==="dataclass"&&e.expand?e.className:"";await t(na({nodePath:a,expandDataclass:p}))}),na=Z("explorer/fetchFolderContent",async(e,{rejectWithValue:t,getState:r})=>{const{nodePath:n,expandDataclass:a=""}=typeof e=="string"?{nodePath:e}:e,o=r();try{const u=await cn({verb:qe.GET_INFO,path:n});return o.catalog.state!=="loaded"?[]:n==="Classes"?dd(o,u,a):u.map(c=>{const f=`${n}/${c.name}${c.ext?`.${c.ext}`:""}`,{editor:d,supportedEditors:p}=Ut(f);return{name:c.name,size:c.size,type:c.type,date:`${c.date}`,flags:{},error:null,path:f,ext:c.ext,config:c.type==="folder"?{}:{editor:d,supportedEditors:p}}})}catch{return t("Failed loading file content please Reload"),n==="Classes"?dd(o,[],a):[]}},{getPendingMeta:()=>{}}),co=Z("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:t})=>{try{return(await cn({verb:qe.GET_INFO,path:e})).map(n=>{const a=`${e}/${n.name}${n.ext?`.${n.ext}`:""}`,{editor:o,supportedEditors:u}=Ut(a);return{name:n.name,size:n.size,type:n.type,date:`${n.date}`,flags:{},error:null,path:a,ext:n.ext,config:n.type==="folder"?{}:{editor:o,supportedEditors:u}}})}catch{return t("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function s3(e){const t=e.split(".");return t.pop(),{name:t.join("."),ext:e.split(".")[e.split(".").length-1]}}const u3=Z("explorer/uploadFileAndGetResponse",async e=>{const t=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const r=await fetch(`/rest/$upload?${t}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:r.status,data:await r.json()}}catch{return{status:500,data:null}}}),c3=Z("explorer/uploadFile",async({file:e,path:t,parentNode:r},{dispatch:n})=>{const{editor:a,supportedEditors:o}=Ut(t),{name:u,ext:c}=s3(e.name);n(IS({parent:r,child:{name:u,path:`${t}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:a,supportedEditors:o},ext:c}}));try{const f=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${t}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return f.status>=300?(n(yd({parent:r,child:{name:u,path:`${t}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:a,supportedEditors:o},ext:c}})),f.status!==413&&Hr.next({message:"error uploading file",kind:"danger"})):await n(na(r.path)),{status:f.status,fileName:e.name}}catch{return n(yd({parent:r,child:{name:u,path:`${t}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:a,supportedEditors:o},ext:c}})),Hr.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),ii=Z("explorer/createNewFile",async({fileName:e,type:t,path:r,parentNode:n,content:a},{dispatch:o,rejectWithValue:u,getState:c})=>{const{server:{qodly:f},project:d}=c().settings;try{const p=await ra({name:FS(e,t,f),content:a||MS(t,d),path:r,asText:[N.CLASS,N.METHOD].includes(t)});return n.error&&(n.flags.expanded?await o(na(n.path)):await o(co(n.path))),{qodly:f,file:p,parentNode:n}}catch{return u("failed to create folder")}});function LS(e,t){const{qodly:r=!0,withExtension:n=!0}=t||{},a=Yn(e.type,r);let o="";switch(e.type){case N.WEBFORM:o=`${We.WEBFORMS}/${e.name}`;break;case N.METHOD:o=`${We.METHODS}/${e.name}`;break;case N.CLASS:o=`${We.CLASSES}/${e.name}`;break;default:return""}return`${o}${n?`.${a}`:""}`}const l3=Z("explorer/createNewFileAndOpen",async(e,{dispatch:t,getState:r})=>{const n=await t(ii(e)).unwrap(),{qodly:a}=r().settings.server;if(n){const{file:o}=n,u=LS(o,{withExtension:!1,qodly:a}),{editor:c}=Ut(u);await t(lo({file:{name:e.fileName,type:o.type,path:u,editor:c,date:new Date().toISOString()}}))}}),Qs=Z("explorer/createNewNode",async({fileName:e,path:t,parentNode:r},{rejectWithValue:n})=>{try{return{file:await rN({verb:qe.CREATE_FOLDER,path:`${t}/${e}`,recursive:!0}),parentNode:r}}catch{return Hr.next({message:"failed to create folder",kind:"danger"}),n("failed to create folder")}}),Oo=async({file:e,flags:t={},node:r={}})=>{var n;try{const a=e.path.split(".").at(-1),o=await cn({verb:qe.GET_INFO,path:e.path,content:((n=e.editor)==null?void 0:n.key)!=="editors:img",as:Pb(a)?"json":"text"}),u={editor:e.editor};r!=null&&r.info&&(u.kind=r.info.kind);const c=gu(e.path);c===N.METHOD&&(u.attributes=Qd(o.content),o.content=G0(o.content,{}));const{content:f,date:d,ext:p}=o;return t.confirmed===void 0&&(t.confirmed=!0),{date:d,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(p),confirmed:t.confirmed},extra:u,name:e.name,path:e.path,type:c,initialContent:f,content:f,history:{stack:[],active:-1,locked:!1}}}catch(a){const{data:o}=a;if(o.__ERROR.find(u=>u.errCode===Eu.FILE_NOT_FOUND))switch(e.path){case Ot:{const u={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:t,extra:{editor:{key:"editors:roles"},kind:"roles"},name:"Roles & Privileges",path:e.path,type:N.ROLES,initialContent:u,content:u}}case ca:{const u={};return{date:new Date().toISOString(),flags:t,extra:{editor:{key:"editors:settings"},kind:"qodlyApp"},name:"Settings",path:e.path,type:N.SETTINGS,initialContent:u,content:u}}}throw a}},kS=Z("HTTPHandlers/fetch",async(e,{rejectWithValue:t})=>{const r=(await Eo({path:Qr})).files.find(n=>n.path===Qr);if(r!=null&&r.deleted)return t("not found")}),fc=(e,t)=>{const r=(n,a)=>{for(const o of n){if(o.path===a)return o;if(o.children){const u=r(o.children,a);if(u)return u}}};return r(e,t)},lo=Z("explorer/openFile",async({file:e,inactive:t,isNew:r,flags:n={},info:a},{getState:o,dispatch:u})=>{const{root:{tabs:c},roles:f,explorer:d,debugger:{sessions:p},settings:{server:{qodly:m}}}=o(),g=c.find(({path:T})=>e.path===T);if(g){const T={...g,extra:{...g==null?void 0:g.extra,editor:e.editor},flags:{...g==null?void 0:g.flags,...n}};return u(Jt(T)),T}if(e.path.startsWith("Debugger")){const T=p.find(C=>`Debugger/${C.threadId}`===e.path);if(T){const{source:{content:C},source:A}=T.currentStackFrame,P={name:e.name,type:N.DEBUGGER,date:new Date().toISOString(),path:e.path,content:C,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:C,flags:{confirmed:!0},extra:{source:A,editor:e.editor}};return u(Jt(P)),P}}const y=fc(d,e.path);let E=null;try{E=await Oo({file:e,flags:n,node:y})}catch(T){const{data:C}=T;if(C.__ERROR.find(A=>[Eu.JSON_MALFORMED,Eu.JSON_MALFORMED_AT_LINE].includes(A.errCode))){const{confirmed:A}=await u(Dr({title:"Corrupt file",type:gr.CONFIRM,color:Pr.WARNING,message:"Open in code editor ?"})).unwrap();if(A){const P=await cn({verb:qe.GET_INFO,path:e.path,content:!0,as:"text"}),{content:$,date:_,ext:M}=P;E={date:_,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm","QoDoc"].includes(M),confirmed:!0},extra:{editor:rd.Code},name:e.name,path:e.path,type:gu(e.path),initialContent:$,content:$,history:{stack:[],active:-1,locked:!1}}}}if(e.type===N.CLASS&&a){const A=a.kind,P=`${e.name}.${m?"4qs":"4dm"}`,$=Oa()[A]({name:P,qodly:m}).content;if(E={date:(await ra({name:P,content:$,path:"Classes",asText:!0})).date,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:!1,confirmed:!0},extra:{editor:rd.Code},name:e.name,path:e.path,type:gu(e.path),initialContent:$,content:$,history:{stack:[],active:-1,locked:!1}},A==="app"){const M=await Eo(...cy.map(W=>({path:`DatabaseMethods/${W.name}`})));cy.forEach(W=>{const G=M.files.find(Q=>Q.path===`DatabaseMethods/${W.name}`);G!=null&&G.deleted&&ra({name:W.name,content:W.content,path:"DatabaseMethods",asText:!0})})}}if(e.path===Qr){const A=(await Eo({path:Qr})).files.find(P=>P.path===Qr);A!=null&&A.deleted&&await ra({name:Qr,content:"[]",path:"./",asText:!0}).then(async()=>{E=await Oo({file:e,flags:n,node:y})})}}return E&&(e.path===Ot&&!f.flags.touched?u(Rp({content:E.content,date:E.date,flags:n})):e.path===ca&&u(lc({path:"project",value:E.content})),u((t?gw:Jt)({...E,isNew:r})),E)}),Ip=Z("explorer/openFileAtLine",async({file:e},{getState:t,dispatch:r})=>{const{root:{tabs:n},explorer:a}=t(),o=n.find(({path:f})=>e.path===f);if(o){const f={...o,extra:{...o==null?void 0:o.extra,editor:e.editor}};return r(Jt(f)),f}const u=fc(a,e.path),c=await Oo({file:e,node:u});return r(Jt(c)),c}),jS=Z("explorer/injectContentAtLine",async(e,{getState:t,dispatch:r,rejectWithValue:n})=>{const{explorer:a}=t();e.path.split("/").pop();const u=dt(a,e.path);if(!u)return n(`Error while trying to inject content in file ${e.path}`);const c=`${u.path}.${u.ext}`,f=fc(a,c),d=await Oo({file:{name:u.name,date:u.date||new Date().toISOString(),path:c,type:N.CLASS,editor:u.config.editor},node:f});return await r(Jt(d)),{...e,path:`${u.path}.${u.ext}`}}),WS=Z("explorer/openFileAtSelection",async({file:e},{getState:t,dispatch:r})=>{const{root:{tabs:n},explorer:a}=t(),o=n.find(({path:f})=>e.path===f);if(o){const f={...o,extra:{...o==null?void 0:o.extra,editor:e.editor}};return r(Jt(f)),f}const u=fc(a,e.path),c=await Oo({file:e,node:u});return r(Jt(c)),c}),Sd=Z("explorer/deleteFile",async e=>{const{name:t,type:r,path:n,flags:a}=e;if(a.error)return{deleted:!0,node:e};const o=n.split("/");return o.pop(),{deleted:await VF({root:ai.ROOT,type:NS(r),verb:qe.DROP,name:t,path:o.join("/")}),node:e}}),f3=Z("explorer/deleteFolder",async(e,{getState:t,dispatch:r})=>{const{path:n,flags:a}=e;if(a.error)return{deleted:!0,node:e};const{deleted:o}=await Sb({force:!0,path:n,verb:qe.REMOVE_ITEM}).catch(console.error)||{deleted:!1};if(e.children){const{tabs:u}=t().root;e.children.forEach(c=>{const f=u.findIndex(d=>d.path===c.path);r(gc(f))})}return{deleted:o,node:e}}),wd=Z("explorer/removeFileNode",async(e,{getState:t,dispatch:r})=>{await Sb({verb:qe.REMOVE_ITEM,path:e.path,force:!0}).catch(console.error);const{root:{tabs:n},catalog:a}=t();if((e.path==="Classes/DataStore"||BS(a,e))&&setTimeout(()=>{r(aa())},Wo),e.ext){const o=n.findIndex(u=>u.path===e.path);o>=0&&r(gc(o))}return{deleted:!0,node:e}}),BS=(e,t)=>{const{model:{singletons:r}}=e;return oe.values(r).some(n=>n.name===t.name)},oi=Z("explorer/renameFile",async({file:e,newname:t},{dispatch:r,getState:n})=>{if(e.type!=="folder"){const o=e.path.split("/");o.pop();const u=`${o.join("/")}/${e.name}.${e.ext}`,c=`${o.join("/")}/${t}.${e.ext}`;await td({verb:qe.MOVE_ITEM,path:u,newpath:c});const{catalog:f}=n();return BS(f,e)&&setTimeout(()=>{r(aa())},Wo),{old:{...e,path:u},new:{...e,name:t,path:c}}}const a=e.path.split("/");return a.pop(),await td({verb:qe.MOVE_ITEM,path:`${a.join("/")}/${e.name}`,newpath:`${a.join("/")}/${t}`}),{old:e,new:{...e,name:t,path:`${a.join("/")}/${t}`}}}),fo=Z("explorer/relocateNode",async({draggedNode:e,newLocation:t},{rejectWithValue:r})=>{try{await td({verb:qe.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${t.path}/${e.name}.${e.ext}`})}catch{return r("can't move item")}}),eu=Z("explorer/duplicateNode",async({node:e,duplicateName:t},{rejectWithValue:r,fulfillWithValue:n,getState:a})=>{const o=e.path.split("/");o.pop();try{const{tabs:u}=a().root,c=u.find(({path:m})=>m===e.path),f=["4dm","4qm","4qs"].includes(e.ext),{content:d}=c||await cn({verb:qe.GET_INFO,path:e.path,content:!0,as:f?"text":"json"}),p=await ra({name:`${t}.${e.ext}`,content:d,path:o.join("/"),asText:f});return n({node:{...p,path:o.join("/")}})}catch{return r("failed to duplicate file")}}),d3=Z("explorer/executeMethod",async({methodName:e,params:t=[],resultingDataSource:r={},namespace:n=""},{rejectWithValue:a})=>{var o,u;try{const f=await window.Method4D.buildMethod({methodName:e,parameters:t,resultingDataSource:r},{namespace:n},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return f!=null&&f.__NOTIFICATION?Hr.next({message:`${((o=f.__NOTIFICATION)==null?void 0:o.message)||""}`,kind:`${((u=f.__NOTIFICATION)==null?void 0:u.type)||"info"}`}):Hr.next({message:"Method executed Successfully",kind:"message"}),f}catch(c){return Hr.next({message:c.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),a("can't execute method")}}),p3=e=>{const{dataClasses:t,...r}=e;return{...r,dataClasses:t==null?void 0:t.map(n=>{let a={...n};if(a.uuid||(a={...a,uuid:bu()}),a.attributes){const o=["storage","relatedEntity"],u=a.attributes.map(c=>o.includes(c.kind)&&!c.uuid?{...c,uuid:bu()}:c);a={...a,attributes:[...u]}}return a})}},h3=Z("files/fetchFiles",async()=>KF(ai.WEBFORMS,ai.METHODS,ai.CLASSES)),Mp=Z("tabs/renameDatasource",async(e,{dispatch:t,getState:r})=>{var y,E;const n=!!e.datasourceNamespace,{confirmed:a}=await t(Dr({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:gr.CONFIRM,color:Pr.WARNING,views:{toggles:{},tips:n?[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated on opened web forms only"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]:[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]}})).unwrap();if(!a)return null;const{autoUpdateReferences:o,datasourceId:u,datasourceNamespace:c,value:f,path:d}=e,p=r();let m=[];if(n){const S=p.sharedDatasources.sources[c]||[];m.push(...S)}else if(d){const S=p.root.tabs.find(en("path",d));if(m=(E=(y=S==null?void 0:S.content)==null?void 0:y.metadata)==null?void 0:E.datasources,!m)return null}const g=new RegExp(`^${u}\\b`,"");if(m=m.map(S=>{const T=(Xd(S)||!H0(S))&&S.from&&g.test(S.from),C=S.events?S.events.map(A=>{var P,$,_,M;switch(A==null?void 0:A.type){case"method":{const W=A;return W.params?{...W,params:W.params.map(G=>{var Q;return{...G,datasource:(Q=G.datasource)==null?void 0:Q.replace(new RegExp(`^${u}`,""),f)}}),returns:(P=W.returns)!=null&&P.datasource?{...W.returns,datasource:($=W.returns.datasource)==null?void 0:$.replace(new RegExp(`^${u}`,""),f)}:W.returns}:W}case"simple-action":{const W=A;return W.datasource?{...W,datasource:{...W.datasource,name:(_=W.datasource.name)==null?void 0:_.replace(new RegExp(`^${u}`,""),f),from:(M=W.datasource.from)==null?void 0:M.replace(new RegExp(`^${u}`,""),f)}}:W}default:return A}}):S.events;return S.id===u?{...S,id:f,events:C}:T&&S.from?{...S,from:S.from.replace(new RegExp(`^${u}`,""),f),events:C}:{...S,events:C}}),o){const S=n?`${c}:${u}`:`${u}`,T=n?`${c}:${f}`:`${f}`;Vd.next({path:d??"",action:Vu.RENAME,old_reference:S,new_reference:T,is_shared:n})}return{path:d,namespace:c,datasources:m}}),Fp=Z("tabs/edit-datasource",(e,{getState:t})=>{var o,u;const r=t();let n=[];if(e.namespace)n=r.sharedDatasources.sources[e.namespace];else{const c=r.root.tabs.find(en("path",e.path));c&&(n=((u=(o=c.content)==null?void 0:o.metadata)==null?void 0:u.datasources)||[])}return n.map(c=>c.id===e.datasourceId?Object.assign({},c,{[e.propertyKey]:e.value}):c)}),zS=Z("tabs/fetchChanges",async(e,{getState:t})=>{const n=Ci(t()).filter(a=>[N.METHOD,N.CLASS].includes(a.type));return Eo(...n.map(a=>{const[o]=a.path.split("/").filter(Boolean);return{name:a.name,type:a.type,root:o,path:"."}}))}),m3=Z("files/saveAll",async(e,{getState:t,dispatch:r})=>{const n=Sp(t());for(const a of n)r(si({tab:a}))}),Np=Z("files/tryCloseTab",async(e,{getState:t,dispatch:r})=>{const{tabs:n}=t().root,a=n.findIndex(u=>u.path===e);if(a===-1)return!1;const o=n[a];if(o!=null&&o.flags.touched){const{confirmed:u}=await r(Dr({title:Xu(o),message:"Your unsaved changes will be lost. Proceed anyway?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!u)return!1}return r(gc(a)),o.path===Ot&&o.flags.touched&&(async()=>{const c=await cn({verb:qe.GET_INFO,path:Ot,content:!0,as:"json"});r(Rp({content:c.content,date:c.date}))})(),!0}),g3=Z("files/tryCloseOtherTabs",async(e,{getState:t,dispatch:r})=>{const{tabs:n}=t().root;if(n.some(o=>o.path!==e&&o.flags.touched===!0)){const{confirmed:o}=await r(Dr({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!o)return}r(pw(e))}),v3=Z("files/tryCloseAllTabs",async(e,{getState:t,dispatch:r})=>{const{tabs:n}=t().root;if(n.some(o=>o.flags.touched===!0)){const{confirmed:o}=await r(Dr({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!o)return}r(fw())}),y3=Z("files/tryCloseRightTabs",async(e,{getState:t,dispatch:r})=>{const{tabs:n}=t().root;let a=!1;for(let o=n.length-1;o>e;o-=1)if(n[o].flags.touched){a=!0;break}if(a){const{confirmed:o}=await r(Dr({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!o)return}r(dw(e))}),b3=Z("files/tryCloseLeftTabs",async(e,{getState:t,dispatch:r})=>{const{tabs:n}=t().root;let a=!1;for(let o=0;o<e;o+=1)if(n[o].flags.touched){a=!0;break}if(a){const{confirmed:o}=await r(Dr({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!o)return}r(hw(e))}),tu=Z("files/reloadTab",async(e,{dispatch:t})=>{if(e.flags.touched){const{confirmed:a}=await t(Dr({title:Xu(e),message:"Changes made to the file will be lost. Continue?",type:gr.CONFIRM,color:Pr.WARNING,icon:"FdWarningDanger"})).unwrap();if(!a)throw new Error("Cancel modal!")}const r=bp(e.path),n=await cn({verb:qe.GET_INFO,path:e.path,content:!0,as:r});if(e.path===Ot){const{roles:a,privileges:o}=uc(n.content);t(Dp({roles:a,privileges:o}))}else if(e.path===ca){const{content:a}=n;t(lc({path:"project",value:a}))}else{const{content:a}=n;e.type===N.WEBFORM?CM.next({path:e.path,action:j0.RELOAD,payload:a.components}):e.type===N.MODEL&&zb.next({action:"reload",payload:a})}return n}),si=Z("files/saveTab",async({tab:e},{dispatch:t,getState:r})=>{let{path:n,content:a}=e;if(e.type===N.DEBUGGER)return{...e,errors:[]};n.split("/").pop();const u=await Eo({path:n});if(u.files[0]){const m=new Date(e.date),g=new Date(u.files[0].date);if(m.getTime()<g.getTime()){const{confirmed:y}=await t(Dr({title:Xu(e),message:"New content has been found on the server. Are you sure you want to continue?",type:gr.CONFIRM,icon:"FdSave"})).unwrap();if(!y)return t(lw({path:n,flags:{old:!0}})),null}}const c=S3(e,r()),f=await nN({verb:qe.SAVE_CONTENT,content:c,path:n});(e.type===N.CLASS||e.type===N.MODEL)&&setTimeout(()=>{t(aa())},Wo);const d=(f.modelErrors||[]).map(m=>m.message),p=(f.permissionsErrors||[]).map(m=>m.message);return N.MODEL===e.type&&(a=c),{...e,content:a,date:f.date,initialContent:a,errors:d.length>0||p.length>0?[{title:"Model errors",messages:d},{title:"Permissions errors",messages:p}]:[]}}),S3=(e,t)=>{var r,n;switch(!0){case e.path==="settings.json":case e.path===ca:return t.settings.project;case e.type===N.ROLES:return((n=(r=e.extra)==null?void 0:r.editor)==null?void 0:n.key)==="editors:roles"?cc(t.roles):e.content;case e.type===N.MODEL:{const a=e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};return p3(a)}default:return e.content}},ly=async e=>{if(e.type===N.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const t=bp(e.path),r=await cn({verb:qe.GET_INFO,path:e.path,content:!0,as:t}),n={};r.type===N.METHOD&&(n.attributes=Qd(r.content));const{date:a,name:o,type:u,content:c}=r;return{date:a,flags:{enabled:e.type===N.WEBFORM},extra:n,view:{panel:{isOpen:!1,type:"",current:""}},name:o,path:e.path,type:u,initialContent:c,content:u===N.MODEL?xb(c):c,history:{stack:[],active:-1,locked:!1}}},HS=oe.debounce((e,t)=>{t(Sw(e))},300),w3=Z("tabs/setTabContent",(e,{getState:t,dispatch:r})=>{var u;const{root:{tabs:n}}=t(),a=n.find(c=>c.path===e.path),o=!!((u=a==null?void 0:a.history)!=null&&u.locked);r(Wp(e)),o?r(Bp(e.path)):HS(e.path,r)}),E3=Z("tabs/setCurrentWebformState",(e,{getState:t,dispatch:r})=>{var u;const{root:{tabs:n}}=t(),a=n.find(c=>c.path===e.path),o=!!((u=a==null?void 0:a.history)!=null&&u.locked);r(vw(e)),o?r(Bp(e.path)):HS(e.path,r)}),US=Z("files/tryInjectMethod",async({type:e,dataclass:t,expand:r},{getState:n,dispatch:a})=>{const{root:{tabs:o},settings:{server:{qodly:u}}}=n(),c=Yn("class",u);let f="",d="",p=null;if(!t)f="DataStore",d=`Classes/DataStore.${c}`;else switch(e){case"dataclass":f=t,d=`Classes/${t}.${c}`;break;case"collection":f=`${t}Selection`,d=`Classes/${t}Selection.${c}`;break;case"entity":f=`${t}Entity`,d=`Classes/${t}Entity.${c}`;break;default:return p}const m=o.find(en("path",d));if(m)return a(Jt(m)),m;try{p=await ly({name:f,date:new Date().toISOString(),path:d,type:N.CLASS})}catch{t?await a(bd({type:"dataclass",className:t,collectionName:`${t}Selection`,toCreate:e,expand:r})):await a(bd({type:"model"}))}return p=await ly({name:f,date:new Date().toISOString(),path:d,type:N.CLASS}),p.path=d,a(Jt(p)),p}),_3=Z("roles/open",async(e,{dispatch:t,getState:r})=>{const{tabs:n}=r().root,a=n.find(o=>o.path===Ot);if(a)return t(Jt(a)),a;t($u())});function fy(e,t){const{line:r,offset:n,type:a="saved"}=t;e.breakpoints[a].locations.push({line:r}),oe.isNumber(n)&&(e.breakpoints[a].offset=n)}function dy(e,t,r,n){e.breakpoints[r].locations=t,oe.isNumber(n)&&(e.breakpoints[r].offset=n)}function py({filePath:e,fileType:t,methodName:r,className:n,ext:a,source:o}){return{filePath:e,fileType:t,methodName:r,className:n,ext:a,source:o,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function hy(e,t,r){let n=!1;const a=e.map(o=>o[r]!==t[r]?o:(n=!0,{...o,...t}));return n?a:[...a,t]}function Gs(e){return e.map(({label:t})=>({label:t}))}const GS=yr({name:"debugger",initialState:()=>{var t,r;const{debugger:e={meta:{state:Vn.DETACHED},list:[],sessions:[],expressions:[]}}=Si();return{meta:{...e.meta,state:((t=e.meta)==null?void 0:t.state)===Vn.ATTACHED?(r=e.meta)==null?void 0:r.state:Vn.DETACHED},list:e.list||[],sessions:e.sessions||[],expressions:e.expressions||[]}},reducers:{addBreakpointDecoration(e,t){const{filePath:r,fileType:n,methodName:a,className:o,ext:u,source:c,breakpoint:f}=t.payload,d=Ra(e.list,r,a,o);if(d)fy(d,f);else{if(n===N.CLASS&&f.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${o} class.`);const p=py({filePath:r,fileType:n,methodName:a,className:o,ext:u,source:c});fy(p,f),e.list.push(p)}},removeBreakpointDecoration(e,t){const{filePath:r,methodName:n,line:a,offset:o=0,type:u="saved"}=t.payload;if(r.startsWith("Classes/")){const c=e.list.filter(f=>f.filePath===r);if(c.length>0){const f=a+o;c.forEach(d=>{const p=d.breakpoints[u].offset||0;d.breakpoints[u].locations=d.breakpoints[u].locations.filter(m=>m.line+p!==f),u==="saved"&&(d.breakpoints.draft.locations=d.breakpoints.draft.locations.filter(m=>m.line+p!==f))})}}else{const c=Ra(e.list,r,n);c&&(c.breakpoints[u].locations=c.breakpoints[u].locations.filter(f=>f.line!==a),u==="saved"&&(c.breakpoints.draft.locations=c.breakpoints.draft.locations.filter(f=>f.line!==a)))}},setBreakpointsDecoration(e,t){const{filePath:r,fileType:n,methodName:a,className:o,ext:u,source:c,breakpoints:f,offset:d,type:p="saved",clearDraft:m}=t.payload,g=Ra(e.list,r,a);if(g)dy(g,f,p,d),m&&p!=="draft"&&(g.breakpoints.draft.locations=[]);else{const y=py({filePath:r,fileType:n,methodName:a,className:o,ext:u,source:c});dy(y,f,p,d),e.list.push(y)}},clearBreakpoints(e,t){const{filePath:r,type:n="saved"}=t.payload;e.list=e.list.map(a=>({...a,breakpoints:a.filePath===r?{draft:!n||n==="draft"||n==="any"?{locations:[],offset:0}:a.breakpoints.draft,saved:!n||n==="saved"||n==="any"?{locations:[],offset:0}:a.breakpoints.saved}:a.breakpoints}))},clearBreakpointsExcept(e,t){const{exceptedFilePath:r,type:n="saved"}=t.payload;e.list=e.list.map(a=>({...a,breakpoints:a.filePath!==r?{draft:!n||n==="draft"||n==="any"?{locations:[],offset:0}:a.breakpoints.draft,saved:!n||n==="saved"||n==="any"?{locations:[],offset:0}:a.breakpoints.saved}:a.breakpoints}))},clearAllBreakpoints(e){e.list=e.list.map(t=>({...t,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}))},setActiveLine(e,t){const{threadId:r,line:n,highlight:a}=t.payload,o=pt(e.sessions,r);o&&(o.activeLine=n,a&&(o.highlightedLines={start:n,end:n}))},addExpression(e,t){const{threadId:r,label:n,save:a}=t.payload,o=pt(e.sessions,r);o&&o.stopped&&(o.expressions=[...o.expressions||[],{label:n}],a&&(e.expressions=Gs(o.expressions)))},removeExpression(e,t){const{threadId:r,index:n,save:a}=t.payload,o=pt(e.sessions,r);o&&(o.expressions=o.expressions.filter((u,c)=>c!==n),a&&(e.expressions=Gs(o.expressions)))},removeAllExpressions(e,t){const{threadId:r,save:n}=t.payload,a=pt(e.sessions,r);a&&(a.expressions=[],n&&(e.expressions=[]))},renameExpression(e,t){const{threadId:r,index:n,replacement:a,save:o}=t.payload,u=pt(e.sessions,r);u&&u.expressions[n]&&(u.expressions[n].label=a,o&&(e.expressions=Gs(u.expressions)))},setExpression(e,t){const{threadId:r,expression:n}=t.payload,a=pt(e.sessions,r);if(a){const o=n.index>=0?n.index:a.expressions.length>0?a.expressions.length-1:0,u=a.expressions[o];u?(u.result=n.result,u.nakedResult=n.nakedResult,u.variablesReference=n.variablesReference||0,u.presentationHint=n.presentationHint):a.expressions.push(n)}},updateExpressionAt(e,t){const{threadId:r,index:n,value:a}=t.payload,o=pt(e.sessions,r);if(o){const u=o.expressions[n];u&&(u.result=`"${a}"`,u.nakedResult=a)}},saveExpressions(e,t){const{expressions:r}=t.payload;e.expressions=Gs(r)},addSession(e,t){const{threadId:r,channelId:n,stackFrames:a,exceptions:o=[]}=t.payload,u=pt(e.sessions,r),c=a[0],{expressions:f=[]}=e;if(u)u.expressions=f;else{const d=yp(r);e.sessions.push({tabPath:d,threadId:r,channelId:n,stackFrames:a,currentStackFrame:c,exceptions:o,expressions:f,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,t){const{threadId:r,changes:n}=t.payload;e.sessions=e.sessions.map(a=>a.threadId===r?{...a,...n}:a)},removeSession(e,t){const{threadId:r}=t.payload;e.sessions=e.sessions.filter(n=>n.threadId!==r)},removeSessionByIndex(e,t){const r=t.payload;e.sessions.splice(r,1)},setSessions(e,t){const r=t.payload;e.sessions=r},setCallChainVariables(e,t){const{threadId:r,frameId:n,variables:a}=t.payload;e.sessions=e.sessions.map(o=>{var u;return o.threadId===r?{...o,variables:{...o.variables,callchain:hy((u=o.variables)==null?void 0:u.callchain,{frameId:n,items:a},"frameId")}}:o})},setExpressionVariables(e,t){const{threadId:r,variablesReference:n,variables:a}=t.payload;e.sessions=e.sessions.map(o=>{var u;return o.threadId===r?{...o,variables:{...o.variables,expressions:hy((u=o.variables)==null?void 0:u.expressions,{variablesReference:n,items:a},"variablesReference")}}:o})},setSourceContent(e,t){const{threadId:r,content:n}=t.payload,a=pt(e.sessions,r);a&&(a.currentStackFrame.source={...a.currentStackFrame.source,content:n})},setDebuggerMeta(e,t){if(t.payload.state===Vn.ERROR){const{error:r={code:null,reason:"",type:_u.SOCKET_ERROR}}=t.payload;if(e.meta.error={...e.meta.error,...r,time:Date.now()},(r==null?void 0:r.type)===_u.SOCKET_CLOSURE&&(r==null?void 0:r.code)===1e3&&!(r!=null&&r.reason)&&e.meta.state===Vn.DETACHED)return}e.meta.state=t.payload.state}},extraReducers:e=>{e.addCase(YS.fulfilled,t=>{t.sessions=[]})}}),{addBreakpointDecoration:T3,removeBreakpointDecoration:O3,setBreakpointsDecoration:C3,clearBreakpoints:A3,clearBreakpointsExcept:x3,clearAllBreakpoints:P3,setActiveLine:R3,addExpression:D3,renameExpression:$3,removeExpression:I3,removeAllExpressions:M3,setExpression:F3,updateExpressionAt:N3,saveExpressions:L3,addSession:k3,updateSession:j3,removeSession:W3,removeSessionByIndex:B3,setSessions:qS,setCallChainVariables:z3,setExpressionVariables:H3,setSourceContent:U3,setDebuggerMeta:G3}=GS.actions,YS=Z("files/wipeDebuggerSessions",async(e,{getState:t,dispatch:r})=>{const{sessions:n}=t().debugger;for(const{threadId:a}of n){const o=yp(a);r(Np(o))}}),KS=Z("files/removeDebuggerSessionsNotIn",async(e,{getState:t,dispatch:r})=>{const{threadIds:n}=e,{sessions:a}=t().debugger,o=[],u=a.filter(c=>{const f=n.includes(c.threadId);return f||o.push(c.threadId),f});return r(qS(u)),{staleThreadIds:o}}),Iu=Z("models/fetch",async()=>(await bt(Gt,{method:"POST",body:JSON.stringify({verb:qe.GET_INFO,path:jo,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content),Mu=Z("models/save",async(e,{getState:t,dispatch:r,rejectWithValue:n})=>{const{tabs:a}=t().root,o=a.find(u=>u.path===jo);if(!o)return n("Error while saving the model");try{const u=await bt(Gt,{method:"POST",body:JSON.stringify({verb:"save",path:o.path,content:o.content}),headers:new Headers({"Content-Type":"application/json"})});return setTimeout(()=>{r(aa())},Wo),{...u,path:o.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return n("Error while saving the model")}}),q3=Z("models/open",async(e,{dispatch:t,getState:r})=>{const{tabs:n}=r().root,a=n.find(o=>o.path==="models/main");if(a)return t(Jt(a)),a;t(Iu())}),Y3=Z("model/rename-dataclass",async(e,{getState:t,dispatch:r})=>{var m,g;const{dataclassId:n,selectionId:a,name:o}=e;let u=t();if(!u.explorer.find(y=>y.path===We.CLASSES))throw new Error("Classes folder was not found!");u=t();const f={class:{found:!1,newNameTaken:!1,file:null,filename_update:o},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${o}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${o}Selection`}};(g=(m=u.explorer.find(y=>y.path===We.CLASSES))==null?void 0:m.children)==null||g.forEach(y=>{var E;y.path===`Classes/${n}___[<QODLY_ID>]`?(E=y.children)==null||E.forEach(S=>{var C,A,P,$;const T={...S,name:(C=S.info)==null?void 0:C.filename};((A=S.info)==null?void 0:A.filename)===n?(f.class.found=!0,f.class.file=T):((P=S.info)==null?void 0:P.filename)===`${n}Entity`?(f.entity.found=!0,f.entity.file=T):(($=S.info)==null?void 0:$.filename)===a&&(f.selection.found=!0,f.selection.file=T)}):(y.name===f.class.filename_update&&(f.class.newNameTaken=!0),y.name===f.entity.filename_update&&(f.entity.newNameTaken=!0),y.name===f.selection.filename_update&&(f.selection.newNameTaken=!0))});const d=Object.entries(f).reduce((y,E)=>{const[S,T]=E;return T.found?T.newNameTaken?[...y,{type:"error",message:`Cannot rename ${S} file to ${T.filename_update} because it already exists. The existing file will be used instead!`}]:y:[...y,{type:"warning",message:`${n} ${S} file was not found`}]},[]);d.length>0&&r(Dr({message:"The following errors were encountered during dataclass rename:",views:{tips:d}}));const p=Object.values(f).filter(y=>y.found&&y.file&&!y.newNameTaken);await Promise.all(p.map(async y=>await r(oi({file:y.file,newname:y.filename_update}))))}),Co={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},K3={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Co.DATACLASS_DELETE]:!0,[Co.DATACLASS_DRAGGABLE]:!0}},VS=yr({name:"Models",initialState:K3,reducers:{setModelFlag(e,t){e.flags={...e.flags,...t.payload}}},extraReducers(e){e.addCase(Iu.fulfilled,(t,r)=>{var u;const n={},a={},o=r.payload.extraProperties||{};(u=r.payload.dataClasses)==null||u.forEach(c=>{n[c.name]=c,a[c.collectionName]=c}),t.draft.dataClasses=n,t.draft.collections=a,t.draft.extraProperties=o,t.model.dataClasses=n,t.model.collections=a,t.model.extraProperties=o}),e.addCase(Iu.rejected,t=>{t.errored=!0}),e.addCase(Mu.pending,()=>{}).addCase(Mu.fulfilled,(t,r)=>{const n={},a={},o=r.payload.content.extraProperties||{};r.payload.content.dataClasses.forEach(u=>{n[u.name]=u,a[u.collectionName]=u}),t.draft.dataClasses=n,t.draft.collections=a,t.draft.extraProperties=o,t.model.dataClasses=n,t.model.collections=a,t.model.extraProperties=o})}}),{setModelFlag:V3}=VS.actions;var ZS=(e=>(e.UUID="uuid",e.STRING="string",e.TEXT="text",e.DATE="date",e.TIME="duration",e.BOOLEAN="bool",e.BYTE="byte",e.INTEGER="word",e.LONG="long",e.LONG64="long64",e.FLOAT="number",e.BLOB="blob",e.IMAGE="image",e.OBJECT="object",e))(ZS||{}),dc=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(dc||{});const Z3=e=>["string","uuid","number","long"].includes(e.type),J3=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],X3=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],Q3=[{title:"String",kind:"storage",value:"string",calculatedType:"string",calculatedKind:"storage"},{title:"Text",kind:"storage",value:"text",calculatedType:"text",calculatedKind:"storage"},{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Date",kind:"storage",value:"date",calculatedType:"date",calculatedKind:"storage"},{title:"Duration",kind:"storage",value:"duration",calculatedType:"duration",calculatedKind:"storage"},{title:"Bool",kind:"storage",value:"bool",calculatedType:"bool",calculatedKind:"storage"},{title:"Byte",kind:"storage",value:"byte",calculatedType:"byte",calculatedKind:"storage"},{title:"Word",kind:"storage",value:"word",calculatedType:"word",calculatedKind:"storage"},{title:"Number",kind:"storage",value:"number",calculatedType:"number",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"},{title:"Object",kind:"storage",value:"object",calculatedType:"object",calculatedKind:"storage"},{title:"Image",kind:"storage",value:"image",calculatedType:"image",calculatedKind:"storage"},{title:"Blob",kind:"storage",value:"blob",calculatedType:"blob",calculatedKind:"storage"}],eW=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],tW=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],rW=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],nW=(e,t)=>({toJSON:!0,extraProperties:t,dataClasses:e.map(r=>{var n;return{...r.data,extraProperties:{position:{x:r.position.x,y:r.position.y},panelColor:(n=r.data.extraProperties)==null?void 0:n.panelColor}}})});function aW(e,t,r){const n=e;let a=0;for(;r[`${n}${a||""}`];)a++;return`${n}${a||""}`}const JS=e=>e.kind===dc.RELATEDENTITY,XS=e=>e.kind===dc.RELATEDENTITIES,iW=e=>XS(e)||JS(e),oW=()=>ln(e=>e.model),sW=()=>ln(e=>e.model.draft.dataClasses),uW=()=>ln(e=>e.model.draft.collections),cW=e=>ln(t=>t.model.draft.dataClasses[e]),lW=(e,t)=>ln(r=>r.model.draft.dataClasses[e].attributes.find(en("name",t))),fW=()=>ln(e=>e.settings.session["model.viewport"]),dW=()=>{const e=ln(a=>a.model.flags),t=a=>a in e?e[a]:void 0,r=t(Co.DATACLASS_DELETE),n=t(Co.DATACLASS_DRAGGABLE);return{deleteDataclass:r,draggableDataclass:n,flags:e}},pW=VS.reducer;function Cf(e,t){const r=e.tabs.find(({path:n})=>n===ca);r&&(r.flags.touched=t)}const QS={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},ew={[QS.SIDEBAR_SECTION_RESIZABLE]:!0},tw=yr({name:"webforms",initialState:()=>{const{webforms:e}=Si();return{...e,templates:{data:[],selectedGroup:""},datasources:{...cp.webforms.datasources,...e==null?void 0:e.datasources},flags:ew}},reducers:{toggleInspector:(e,t)=>{const{type:r}=t.payload;e.inspector[r].active=!e.inspector[r].active,e.inspector[r].active||(e.inspector[r].data=void 0)},inspect:(e,t)=>{const{type:r,data:n}=t.payload;e.inspector[r].active&&(e.inspector[r].data=n)},addComponent:(e,t)=>{e.components.push(t.payload)},editComponent:(e,t)=>{const{id:r,changes:n}=t.payload;e.components=e.components.map(a=>a.id===r?{...a,...n}:a)},removeComponent:(e,t)=>{const{payload:r}=t,n=e.components.findIndex(a=>a.id===r);n!==-1&&e.components.splice(n,1)},setSelectedGroup:(e,t)=>{e.templates.selectedGroup=t.payload.selectedGroup},setTemplatesData:(e,t)=>{e.templates.data=t.payload},setTemplateData:(e,t)=>{const{group:r,components:n}=t.payload,a=e.templates.data.find(o=>o.group===r);a&&(a.components=n)},setDatasourcesTheme:(e,t)=>{e.datasources.theme=t.payload},setWebformsFlag(e,t){e.flags={...e.flags,...t.payload}}},extraReducers(e){e.addCase(sw.fulfilled,(t,r)=>{t.components=r.payload})}}),{toggleInspector:hW,inspect:mW,addComponent:rw,editComponent:nw,removeComponent:aw,setSelectedGroup:gW,setTemplatesData:iw,setTemplateData:ow,setDatasourcesTheme:vW,setWebformsFlag:yW}=tw.actions,bW=tw.reducer,Lp=oe.curry((e,t)=>{var a,o;const r={...t.sharedDatasources.sources},n=(o=((a=t.root.tabs.find(en("path",e)))==null?void 0:a.content).metadata)==null?void 0:o.datasources;return n&&(r[e]=n),oe.cloneDeep(r)}),SW=Z("webforms/fetchTemplates",async(e,{dispatch:t,getState:r})=>{const{data:n}=r().webforms.templates,a=r().settings.session["studio.tipsBaseUrl"]||"";if(!oe.isEmpty(n))return n;try{const u=await(await fetch(`${a}/build/index.json?t=${Date.now()}`)).json();return t(iw(u)),u}catch{return[]}}),wW=Z("webforms/fetchTemplate",async({name:e},{dispatch:t,getState:r})=>{const{data:n}=r().webforms.templates,a=n.find(o=>o.group===e);if(a&&!oe.isEmpty(a.components))return a.components;try{const u=await(await fetch(`${a==null?void 0:a.link}?t=${Date.now()}`)).json();return t(ow({group:e,components:u})),u}catch{return[]}}),sw=Z("webforms/fetchCraftedComponents",async(e,{rejectWithValue:t})=>{try{return(await cn({path:"WebForms/crafted_components.json",verb:qe.GET_INFO,content:!0,as:"json"})).content}catch{return t("Error while loading the crafted components")}}),EW=Z("webforms/addCraftedComponent",async(e,{dispatch:t,rejectWithValue:r,getState:n})=>{try{t(rw(e));const{webforms:{components:a}}=n();up(a)}catch{return r("Error while adding the crafted component")}}),_W=Z("webforms/editCraftedComponent",async(e,{dispatch:t,rejectWithValue:r,getState:n})=>{try{t(nw(e));const{webforms:{components:a}}=n();up(a)}catch{return r("Error while editing the crafted component")}}),TW=Z("webforms/removeCraftedComponent",async(e,{dispatch:t,rejectWithValue:r,getState:n})=>{try{t(aw(e));const{webforms:{components:a}}=n();up(a)}catch{return r("Error while removing the crafted component")}}),kp=Z("datasources/add-datasource",async(e,{getState:t,rejectWithValue:r})=>{var n,a;try{const o=t(),u=e.datasource,c=!!u.namespace,f=[];if(c){const d={...o.sharedDatasources.sources,[u.namespace]:[...o.sharedDatasources.sources[u.namespace],u]};f.push(...d[u.namespace]),await da(d)}else(((a=(n=o.root.tabs.find(en("path",e.path)).content)==null?void 0:n.metadata)==null?void 0:a.datasources)||[]).push(u);return{list:f,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),r("Error while adding the datasource")}}),jp=Z("datasources/edit-datasource",async(e,{getState:t,rejectWithValue:r})=>{try{const{namespace:n,path:a}=e,o=t(),u=!!e.namespace,c=Lp(a,o);let f=oe.defaultTo(c[n||a],[]);const d=f.find(y=>y.id===e.id&&(y.namespace||"")===(e.namespace||"")),p=e.changes,m=p??{[e.property]:e.value};return f=f.map(y=>y.id===e.id?{...y,...m}:y),u&&await da({...o.sharedDatasources.sources,[e.namespace]:f}),(oe.isObject(p)?Object.keys(p):[]).includes("dataType")&&e.updateRefs&&Vd.next({datasource:{id:e.id,namespace:e.namespace},path:a??"",action:Vu.TYPE_CHANGE,old_type:(d==null?void 0:d.dataType)||"",new_type:m.dataType,is_shared:u}),{list:f,path:e.path,namespace:e.namespace}}catch{r(`Error while editing datasource ${e.id}`)}}),OW=e=>e.type===ui.fulfilled.type,ui=Z("datasources/rename-datasource",async(e,{getState:t,rejectWithValue:r})=>{try{const n=t(),a=!!e.namespace,o=e.namespace||e.path,u=Lp(e.path,n),c=oe.defaultTo(u[o],[]),f=new RegExp(`^${e.id}\\b`,"");if(c.forEach(d=>{var m;const p=(Xd(d)||!H0(d))&&d.from&&f.test(d.from);e.updateRefs&&((m=d.events)==null||m.forEach(g=>{var y,E,S,T,C;switch(g.type){case"method":{const A=g;A.params.forEach(P=>{P.datasource&&Object.assign(P,{datasource:P.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),A.returns&&Object.assign(A.returns,{datasource:(E=(y=A.returns)==null?void 0:y.datasource)==null?void 0:E.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const A=g;A.datasource&&Object.assign(A.datasource,{name:(S=A.datasource.name)==null?void 0:S.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(T=A.datasource.from)==null?void 0:T.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(C=A.datasource.target)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),d.id===e.id?d.id=e.new_name:p&&d.from&&(d.from=d.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const d=vu({id:e.id,namespace:e.namespace}),p=vu({id:e.new_name,namespace:e.namespace});Vd.next({path:e.path??"",action:Vu.RENAME,old_reference:d,new_reference:p,is_shared:a})}return a&&await da({...n.sharedDatasources.sources,[e.namespace]:c}),{list:c,path:e.path,namespace:e.namespace}}catch{return r(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),po=Z("datasources/delete-datasource",async(e,{getState:t,rejectWithValue:r})=>{try{const n=t(),a=!!e.namespace,o=e.namespace||e.path,c=Lp(e.path,n)[o].filter(PM(e.id));return a&&await da({...n.sharedDatasources.sources,[e.namespace]:c}),{list:c,path:e.path,namespace:e.namespace}}catch{return r(`Error while removing datasource ${e.id}`)}}),ru=Z("saved_conditions/fetchSavedConditions",async(e,{rejectWithValue:t})=>{try{const{conditions:r=[]}=await eN({createIfNotExists:!0});return r}catch{return t("Error while loading the shared conditions")}}),pc=(e,t,r)=>{switch(e.type){case"datasource":return{...e,path:e.path===t?r:e.path,value:e.valueType==="datasource"&&e.value===t?r:e.value,compareValue:e.compareValueType==="datasource"&&e.compareValue===t?r:e.compareValue};case"privilege":case"currentState":case"parentState":if(e.valueType==="datasource")return{...e,value:e.value===t?r:e.value};break;case"combination":return{...e,conditions:(e.conditions||[]).map(n=>pc(n,t,r))}}return e},CW=Jd();async function Ji(e){const t={verb:qe.SET_FILE_CONTENT,asText:!1,name:"saved_conditions.json",path:"",root:"shared",content:{conditions:e}};await CW(()=>bt(Gt,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}))}const hc=(e,t)=>{if(e.id===t)return null;if(e.type==="reference"&&e.ref===t)return null;if(e.type==="combination"&&e.conditions){const r=e.conditions.map(n=>hc(n,t)).filter(Boolean);return r.length===1?{...r[0],id:e.id}:{...e,conditions:r}}return e},mc=e=>{if(e.id){if(e.type==="combination"&&e.conditions)return{...e,conditions:e.conditions.map(mc)}}else return{...e,id:fi.generate()};return e},uw=yr({name:"shared-conditions",initialState:{state:"unknown",conditions:[]},reducers:{updateSavedConditions:(e,t)=>(e.conditions=t.payload.conditions,Ji(t.payload.conditions),e),setSavedCondition:(e,t)=>{const{payload:r}=t;return e.conditions=e.conditions.map(n=>n.id===r.id?{...mc(r.condition),id:n.id}:n),Ji(e.conditions),e},updateSavedConditionDs:(e,t)=>{const{old_reference:r,new_reference:n}=t.payload;e.conditions=e.conditions.map(a=>pc(a,r,n)),Ji(e.conditions)},addSavedCondition:(e,t)=>(e.conditions=[...e.conditions,t.payload],Ji(e.conditions),e),removeSavedCondition:(e,t)=>{const{id:r}=t.payload;return e.conditions=e.conditions.map(n=>hc(n,r)).filter(Boolean),Ji(e.conditions),e},initSavedConditions:(e,t)=>(e.conditions=t.payload.conditions,e)},extraReducers(e){e.addCase(ru.pending,t=>({...t,state:"loading"})).addCase(ru.fulfilled,(t,{payload:r})=>({state:"loaded",conditions:r})).addCase(ru.rejected,(t,r)=>({...t,state:"error",error:r.payload||"Error while loading the shared conditions"})),e.addMatcher(fr(yw),(t,r)=>{const{state:n,oldLabel:a}=r.payload;t.conditions=t.conditions.map(o=>hi(o,a,n.label))}),e.addMatcher(fr(bw),(t,r)=>{const{payload:n}=r;t.conditions=t.conditions.map(a=>{var o;return hi(a,(o=n.state)==null?void 0:o.label)})})}}),{updateSavedConditions:AW,setSavedCondition:xW,updateSavedConditionDs:PW,addSavedCondition:RW,removeSavedCondition:cw,initSavedConditions:DW}=uw.actions,$W=uw.reducer,Ao=yr({name:"root",initialState:()=>{const e=Si();return{filesLoading:!1,tabs:e.tabs||[],activeTab:e.activeTab,recent:e.recent||[],clipboard:null}},reducers:{setWebformState(e,t){const{path:r,currentState:n}=t.payload;e.tabs.forEach(a=>{a.path===r&&(a.content.metadata.currentState=n.id)})},copyToClipBoard(e,t){e.clipboard=t.payload},setPanelState(e,t){const{path:r,...n}=t.payload;e.tabs.forEach(a=>{a.path===r&&(a.view||(a.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(a.view.panel,n))})},openSettingsTab(e){const t={date:new Date().toISOString(),flags:{confirmed:!0},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:ca,type:N.SETTINGS,initialContent:{},content:{}};let r=e.tabs.find(n=>n.path===t.path);if(r||(e.tabs.push(t),r=e.tabs[e.tabs.length-1]),e.activeTab!==t.path){const n=e.tabs.reduce((a,o)=>(o==null?void 0:o.weight)>((a==null?void 0:a.weight)||0)?o:a,null);e.activeTab=t.path,r.weight=((n==null?void 0:n.weight)||0)+1}},addDataSource(e,t){var o;const{payload:{path:r,datasourceDef:n}}=t,a=e.tabs.find(u=>u.path===r);a&&(a.content.metadata.datasources=a.content.metadata.datasources||[],(o=a.content.metadata.datasources)!=null&&o.find(c=>c.id===n.id)||(a.content.metadata.datasources=[...a.content.metadata.datasources,{...n,events:[]}],a.flags={...a.flags,touched:!0,confirmed:!0}))},addWebformState(e,t){var o;const{payload:{path:r,stateDef:n}}=t,a=e.tabs.find(u=>u.path===r);a&&(a.content.metadata.states=a.content.metadata.states||[gi],(o=a.content.metadata.states)!=null&&o.find(c=>c.id===n.id)||(a.content.metadata.states=[...a.content.metadata.states,n],a.flags={...a.flags,touched:!0,confirmed:!0}))},removeWebformState(e,t){const{payload:r}=t;e.tabs=e.tabs.map(n=>n.path===r.path?{...n,flags:{...n.flags,touched:!0,confirmed:!0},content:Rb(n.content,r.state)}:n)},editWebformState(e,t){const{path:r,state:n,oldLabel:a}=t.payload;e.tabs=e.tabs.map(o=>o.path===r?{...o,flags:{...o.flags,touched:!0,confirmed:!0},content:{...o.content,metadata:{...o.content.metadata,states:o.content.metadata.states.map(u=>_p(u)?u:u.id===n.id?n.conditions?{...n,conditions:mc(n.conditions)}:n:{...u,conditions:u.conditions?hi(u.conditions,a,n.label):u.conditions})}}}:o)},updateStateConditionDs(e,t){const{path:r,old_reference:n,new_reference:a}=t.payload;e.tabs=e.tabs.map(o=>{var u,c;return o.path===r?{...o,flags:{...o.flags,touched:!0,confirmed:!0},content:{...o.content,metadata:{...o.content.metadata,states:(((c=(u=o.content)==null?void 0:u.metadata)==null?void 0:c.states)||[]).map(f=>f.conditions?{...f,conditions:pc(f.conditions,n,a)}:f)}}}:o})},resetComponentState(e,t){const{path:r,id:n,state:a}=t.payload;e.tabs=e.tabs.map(o=>o.path===r?{...o,flags:{...o.flags,touched:!0,confirmed:!0},content:{...o.content,components:{...o.content.components,[n]:{...o.content.components[n],custom:{...oe.omit(o.content.components[n].custom,`states:${a.id}`)}}}}}:o)},setDefaultWebformStates(e,t){const{path:r,states:n}=t.payload;e.tabs=e.tabs.map(a=>a.path===r?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:{...a.content,metadata:{...a.content.metadata,defaultStates:n.map(({id:o})=>o)}}}:a)},addDefaultWebformState(e,t){const{payload:r}=t;e.tabs=e.tabs.map(n=>{var a;return n.path===r.path?{...n,flags:{...n.flags,touched:!0,confirmed:!0},content:{...n.content,metadata:{...n.content.metadata,defaultStates:Array.from(new Set([...((a=n.content.metadata)==null?void 0:a.defaultStates)||[],r.state.id]))}}}:n})},removeDefaultWebformState(e,t){const{payload:r}=t;e.tabs=e.tabs.map(n=>{var a;return n.path===r.path?{...n,flags:{...n.flags,touched:!0,confirmed:!0},content:{...n.content,metadata:{...n.content.metadata,defaultStates:(((a=n.content.metadata)==null?void 0:a.defaultStates)||[]).filter(o=>o!==r.state.id)}}}:n})},removeDataSource(e,t){const{path:r,datasourceID:n}=t.payload;e.tabs=e.tabs.map(a=>a.path===r?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:{...a.content,metadata:{...a.content.metadata,datasources:a.content.metadata.datasources.filter(o=>o.id!==n)}}}:a)},setDataSources(e,t){const{payload:{path:r,datasourceArr:n}}=t;e.tabs=e.tabs.map(a=>{var o;return a.path===r?{...a,flags:{...a.flags,touched:!0,confirmed:!0},content:{...a.content,metadata:{...(o=a.content)==null?void 0:o.metadata,datasources:n}}}:a})},setTabs(e,t){e.tabs=t.payload},closeTab(e,t){const r=t.payload;e.tabs.splice(r,1);const n=e.tabs.reduce((a,o)=>(o==null?void 0:o.weight)>((a==null?void 0:a.weight)||0)?o:a,null);e.activeTab=(n==null?void 0:n.path)||""},closeOthers(e,t){e.tabs=e.tabs.filter(r=>r.path===t.payload),e.activeTab=t.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,t){e.tabs.splice(t.payload+1),e.activeTab=e.tabs[t.payload].path},closeLeftTabs(e,t){e.tabs.splice(0,t.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:r}})=>r);const t=e.tabs.reduce((r,n)=>(n==null?void 0:n.weight)>((r==null?void 0:r.weight)||0)?n:r,null);e.activeTab=(t==null?void 0:t.path)||""},confirmTab(e,t){const r=e.tabs.find(({path:n})=>n===t.payload);r&&(r.flags.confirmed||Ao.caseReducers.setTabFlags(e,{type:t.type,payload:{path:t.payload,flags:{confirmed:!0}}}))},selectTab(e,t){const r=e.tabs.find(({path:a})=>a===t.payload);if(!r||e.activeTab===t.payload)return;const n=e.tabs.reduce((a,o)=>(o==null?void 0:o.weight)>((a==null?void 0:a.weight)||0)?o:a,null);r.weight=n?(n.weight||0)+1:1,e.activeTab=t.payload},openTabUnselected(e,t){const r=t.payload;let n=e.tabs.find(({path:o})=>r.path===o);n||(e.tabs.push(r),n=e.tabs[e.tabs.length-1]);const a=e.tabs.reduce((o,u)=>(u==null?void 0:u.weight)>((o==null?void 0:o.weight)||0)?u:o,null);n.weight=a?(a.weight||0)+1:1,n.extra={...n.extra,...r.extra}},selectTabByReference(e,t){const r=[N.DEBUGGER],{isNew:n,...a}=t.payload;let o=a,u=e.tabs.find(({path:c})=>o.path===c);if(o.history||(o.history={stack:[],active:-1,locked:!1}),(r.includes(o.type)||u!=null&&u.flags.confirmed)&&(o={...o,flags:{...o.flags,confirmed:!0}}),!u){const c=e.tabs.findIndex(({flags:{confirmed:f}})=>f===!1);c!==-1&&!r.includes(o.type)&&!n?e.activeTab===e.tabs[c].path?(e.tabs[c]=o,u=e.tabs[c]):(e.tabs.push(o),u=e.tabs[e.tabs.length-1],e.tabs.splice(c,1)):(e.tabs.push(o),u=e.tabs[e.tabs.length-1])}if(e.activeTab!==o.path){const c=e.tabs.reduce((f,d)=>(d==null?void 0:d.weight)>((f==null?void 0:f.weight)||0)?d:f,null);e.activeTab=o.path,u.weight=((c==null?void 0:c.weight)||0)+1}u.extra={...u.extra,...o.extra},u.flags={...u.flags||{},...o.flags||{}}},setContent(e,t){const{path:r,content:n,contentPath:a}=t.payload;e.tabs=e.tabs.map(o=>{if(o.path!==r)return o;let u=!1,c=o.flags.confirmed;if(typeof n=="string")u=o.initialContent!==n,c=!c&&u?!0:c;else{const f=oe.get(o.initialContent,a||"",o.initialContent),d=oe.get(n,a||"",n);u=!oe.isEqual(f,d),c=!c&&u?!0:c}return n&&typeof n=="object"&&(a?oe.set(o.content,a,n):o.content=n),typeof n=="string"&&(o.content=n),{...o,flags:{...o.flags,touched:u,confirmed:c}}})},setTabFlags(e,t){const{path:r,flags:n}=t.payload;e.tabs=e.tabs.map(a=>a.path===r?{...a,flags:{...a.flags,...n}}:a)},setTabsFlags(e,t){const{tabs:r,flags:n}=t.payload;e.tabs=e.tabs.map(a=>r.includes(a.path)?{...a,flags:{...a.flags,...n}}:a)},setTabExtra(e,t){const{path:r,extra:n,flags:a}=t.payload;e.tabs=e.tabs.map(o=>o.path===r?{...o,extra:{...o.extra,...n},flags:a?{...o.flags,...a}:o.flags}:o)},addWebFormStyles(e,t){const{path:r,styles:n=[]}=t.payload,a=e.tabs.find(o=>o.path===r);if(a){const o=a.content.metadata.styles.map(({name:c})=>c),u=n.filter(({name:c})=>!o.includes(c));a.content.metadata.styles=[...a.content.metadata.styles,...u].map(({scope:c,...f})=>({...f}))}},changeTabEditor(e,t){return e.tabs=e.tabs.map(r=>r.path===t.payload.path?t.payload:r),e},setHistoryContent(e,t){const r=t.payload;e.tabs=e.tabs.map(n=>{var o,u;if(n.path!==r)return n;const a=!oe.isEqual(n.content,(o=n.history)==null?void 0:o.stack[n.history.active]);return n.history&&a&&(n.history.stack=[...(u=n.history)==null?void 0:u.stack.slice(0,n.history.active+1),n.content],n.history.active=n.history.stack.length-1),{...n}})},unlockHistory(e,t){const r=t.payload;e.tabs=e.tabs.map(n=>n.path!==r?n:(n.history&&(n.history.locked=!1),{...n}))},undo(e){e.tabs=e.tabs.map(t=>t.path!==e.activeTab?t:(t.history&&t.history.active>0&&(t.history.locked=!0,t.history.active--,t.content=t.history.stack[t.history.active]),{...t}))},redo(e){e.tabs=e.tabs.map(t=>t.path!==e.activeTab?t:(t.history&&t.history.active<t.history.stack.length-1&&(t.history.locked=!0,t.history.active++,t.content=t.history.stack[t.history.active]),{...t}))}},extraReducers:e=>{e.addCase(gd,(t,r)=>{if(r.payload.settingsKey==="studio.enablePreview"&&r.payload.value===!1){const n=t.tabs.find(({flags:{confirmed:a}})=>a===!1);n&&Ao.caseReducers.setTabFlags(t,{type:"",payload:{path:n.path,flags:{confirmed:!0}}})}}),e.addCase(jS.fulfilled,(t,r)=>{if(!r.payload)return;const{content:n,line:a,path:o}=r.payload,u=t.tabs.find(c=>c.path===o);if(u&&typeof u.content=="string"){const c=u.content.trim().split(`
|
|
211
|
+
`);c.splice(a,0,n),u.content=c.join(`
|
|
212
|
+
`)}}),e.addCase(si.pending,(t,r)=>{const{tab:n}=r.meta.arg;switch(n.type){case N.CLASS:case N.METHOD:Zr.next({action:Wr.WILL_SAVE,payload:{filePath:n.path}});break}}),e.addCase(si.fulfilled,(t,r)=>{if(!r.payload)return;const n=t.tabs.find(({path:a})=>{var o;return a===((o=r.payload)==null?void 0:o.path)});if(n){switch(n.content=r.payload.content,n.date=r.payload.date,n.initialContent=r.payload.initialContent,n.flags.touched=!1,n.flags.confirmed=!0,n.flags.old=!1,n.type){case N.CLASS:case N.METHOD:Zr.next({action:Wr.DID_SAVE,payload:{filePath:n.path,content:n.content}});break}r.payload.errors.length>0&&Hr.next({kind:"error",message:r.payload.errors})}}),e.addCase(si.rejected,()=>{Hr.next({kind:"danger",message:"Cannot save file"})}),e.addCase(zS.fulfilled,(t,r)=>{const n=[...r.payload.files];t.tabs=t.tabs.map(a=>{if([N.CLASS,N.METHOD].includes(a.type)){const o=n.find(u=>u.name===a.name&&u.type===a.type);if(o){const u=new Date(a.date),c=new Date(o.date);if(u.getTime()!==c.getTime())return{...a,flags:{...a.flags,old:!0}}}}return a})}),e.addCase(tu.pending,(t,r)=>{t.tabs=t.tabs.map(n=>n.path===r.meta.arg.path?{...n,flags:{...n.flags,loading:!0}}:n)}),e.addCase(tu.fulfilled,(t,r)=>{const n=r.payload;if(n){const a=r.meta.arg;t.tabs=t.tabs.map(o=>{if(o.name===a.name&&o.type===a.type){const u=o.extra||{};return o.type===N.METHOD?(u.attributes=Qd(n.content),n.content=G0(n.content,{})):o.type===N.SETTINGS&&(n.content={}),{...o,initialContent:n.content,content:n.content,date:n.date,flags:{enabled:o.flags.enabled,confirmed:o.flags.confirmed},extra:u}}return o})}}),e.addCase(tu.rejected,(t,r)=>{const n=r.meta.arg.path;t.tabs=t.tabs.map(a=>a.path===n?{...a,flags:{...a.flags,loading:!1}}:a)}),e.addCase(Ip.fulfilled,(t,r)=>{if(!r.payload)return;const{line:n,offset:a}=r.meta.arg,o=t.tabs.find(({path:u})=>{var c;return u===((c=r.payload)==null?void 0:c.path)});o&&(o.extra={...o.extra,initialLineInfo:{line:n,offset:a,lastModification:Date.now()}})}),e.addCase(WS.fulfilled,(t,r)=>{if(!r.payload)return;const{selection:n}=r.meta.arg,a=t.tabs.find(({path:o})=>{var u;return o===((u=r.payload)==null?void 0:u.path)});a&&(a.extra={...a.extra,initialSelectionInfo:{selection:n,lastModification:Date.now()}})}),e.addCase(oi.fulfilled,(t,r)=>{r.payload.new!==r.payload.old&&(t.tabs=[...t.tabs].map(n=>n.path===r.payload.old.path?{...n,path:r.payload.new.path,name:r.payload.new.name}:n),t.activeTab===r.payload.old.path&&(t.activeTab=r.payload.new.path))}),e.addCase(Sd.pending,(t,r)=>{const n=r.meta.arg,a=`${n.path}${n.ext?`.${n.ext}`:""}`;switch(n.ext){case"4dm":case"4qs":Zr.next({action:Wr.WILL_DELETE,payload:{filePath:a}});break}}),e.addCase(Sd.fulfilled,(t,r)=>{const{deleted:n,node:a}=r.payload;if(!n)return;const o=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":Zr.next({action:Wr.DID_DELETE,payload:{filePath:o}});break}if(t.tabs=t.tabs.filter(u=>u.path!==o),t.recent=t.recent.filter(({path:u})=>o!==u),t.tabs.length){t.activeTab=t.tabs[t.tabs.length-1].path;return}t.activeTab=""}),e.addCase(wd.pending,(t,r)=>{const n=r.meta.arg,a=`${n.path}${n.ext?`.${n.ext}`:""}`;switch(n.ext){case"4dm":case"4qs":Zr.next({action:Wr.WILL_DELETE,payload:{filePath:a}});break}}),e.addCase(wd.fulfilled,(t,r)=>{const{node:n}=r.payload,a=`${n.path}${n.ext?`.${n.ext}`:""}`;switch(n.ext){case"4dm":case"4qs":Zr.next({action:Wr.DID_DELETE,payload:{filePath:a}});break}}),e.addCase(fo.fulfilled,(t,r)=>{const{draggedNode:n,newLocation:a}=r.meta.arg;if(t.tabs.find(o=>o.path===`${n.path}${n.ext?`.${n.ext}`:""}`))return t.tabs=t.tabs.map(o=>o.path===`${n.path}${n.ext?`.${n.ext}`:""}`?{...o,path:`${a.path}/${n.name}.${n.ext}`}:o),t.recent=t.recent.map(o=>o.path===`${n.path}${n.ext?`.${n.ext}`:""}`?{...o,path:`${a.path}/${n.name}.${n.ext}`}:o),t.activeTab=`${a.path}/${n.name}.${n.ext}`,t}),e.addCase(Mu.fulfilled,(t,r)=>{const n=t.tabs.find(a=>a.path===r.payload.path);n&&(n.flags.touched=!1,n.flags.confirmed=!0,n.date=r.payload.date,n.content=r.payload.content,n.initialContent=r.payload.content)}),e.addCase(US.fulfilled,(t,r)=>{var o;if(!((o=r.payload)!=null&&o.path))return;const n=t.tabs.find(en("path",r.payload.path));if(!n)return;n.content=n.content+`
|
|
213
|
+
exposed Function ${r.meta.arg.name}()
|
|
214
|
+
`,n.flags={...n.flags,touched:!0,confirmed:!0};const a=n.content.split(`
|
|
215
|
+
`);n.path.startsWith("Classes/")&&(n.type=N.CLASS),n.extra={...n.extra,editor:rd.Code,initialLineInfo:{line:a.length-1,lastModification:Date.now()}}}),e.addCase(Mp.fulfilled,(t,r)=>{var o,u;if(!((o=r.payload)!=null&&o.path)||(u=r.payload)!=null&&u.namespace)return;const n=r.payload.path,a=t.tabs.find(en("path",n));!a||!a.content||!a.content.metadata||(Object.assign(a.content.metadata,{datasources:r.payload.datasources}),a.flags.touched=!0,a.flags.confirmed=!0)}),e.addCase(Fp.fulfilled,(t,r)=>{const{payload:n,meta:{arg:a}}=r;a.namespace||t.tabs.forEach(o=>{o.path===a.path&&Object.assign(o.content,{metadata:{...o.content.metadata,datasources:n}})})}),e.addCase(KS.fulfilled,(t,r)=>{const{staleThreadIds:n}=r.payload;if(n.length===0)return;const a=n.map(o=>`Debugger/${o}`);if(t.tabs=t.tabs.filter(o=>!a.includes(o.path)),t.recent=t.recent.filter(({path:o})=>!a.includes(o)),t.tabs.length){t.activeTab=t.tabs[t.tabs.length-1].path;return}t.activeTab=""}),e.addCase($p.pending,t=>Cf(t,!1)),e.addCase(cw,(t,r)=>{const{id:n}=r.payload;t.tabs=t.tabs.map(a=>{var o;return{...a,content:{...a.content,metadata:{...a.content.metadata,states:(((o=a.content.metadata)==null?void 0:o.states)||[]).map(u=>{if(u.conditions){const c=hc(u.conditions,n);return c?{...u,conditions:c}:oe.omit(u,"conditions")}return u})}}}})}),e.addMatcher(fr(gd),(t,r)=>{["project"].includes(r.payload.path)&&Cf(t,!0)}),e.addMatcher(fr(lc),t=>{Cf(t,!1)}),e.addMatcher(fr(mw,Jt),(t,r)=>{const{payload:n}=r;let a;typeof n=="string"?a=t.tabs.find(({path:o})=>n===o):a=n,a&&(t.recent=[a,...t.recent.filter(({path:o})=>![a.path,"settings"].includes(o))])}),e.addMatcher(fr(xS,AS),t=>{t.tabs=t.tabs.map(r=>r.path===Ot?{...r,flags:{...r.flags,confirmed:!0,touched:!0}}:r)}),e.addMatcher(fr(Dp),t=>{t.tabs=t.tabs.map(r=>r.path===Ot?{...r,flags:{...r.flags,touched:!1}}:r)}),e.addMatcher(fr(kp.fulfilled,jp.fulfilled,po.fulfilled,ui.fulfilled),(t,r)=>{var a,o,u;const n=t.tabs.find(en("path",((a=r.payload)==null?void 0:a.path)||r.meta.arg.path));!n||(o=r.payload)!=null&&o.namespace||(n.flags.touched=!0,n.flags.confirmed=!0,Object.assign(n.content,{metadata:{...n.content.metadata,datasources:(u=r.payload)==null?void 0:u.list}}))}),e.addMatcher(fr(po.fulfilled,ui.fulfilled),(t,r)=>{var c;const n=t.tabs.find(en("path",((c=r.payload)==null?void 0:c.path)||r.meta.arg.path));if(!n)return;const{panel:a}=n.view,o=vu({id:r.meta.arg.id,namespace:r.meta.arg.namespace});if(a.type==="datasource"&&a.current===o)switch(r.type){case po.fulfilled.type:Object.assign(n.view.panel,{type:"component",current:$2});break;case ui.fulfilled.type:const f=vu({id:r.meta.arg.new_name,namespace:r.meta.arg.namespace});Object.assign(n.view.panel,{type:"datasource",current:f});break}})}}),{copyToClipBoard:IW,setTabs:MW,closeTab:gc,setContent:Wp,setTabFlags:lw,setTabsFlags:FW,setTabExtra:NW,closeAllTabs:fw,addDataSource:LW,closeRightTabs:dw,closeOthers:pw,closeLeftTabs:hw,closeSavedTabs:kW,setDataSources:jW,removeDataSource:WW,confirmTab:BW,selectTab:mw,selectTabByReference:Jt,openTabUnselected:gw,addWebFormStyles:zW,changeTabEditor:HW,openSettingsTab:UW,setWebformState:vw,setPanelState:GW,addWebformState:qW,editWebformState:yw,updateStateConditionDs:YW,removeWebformState:bw,resetComponentState:KW,addDefaultWebformState:VW,removeDefaultWebformState:ZW,setDefaultWebformStates:JW,setHistoryContent:Sw,unlockHistory:Bp,undo:XW,redo:QW}=Ao.actions,ww=Ao.reducer,e9=GS.reducer,aa=Z("catalog/fetchCatalog",async(e,{rejectWithValue:t})=>{var r,n;try{const a=await ZF(),o=new Map,u=new Map,c=new Map;return(r=a.singletons)==null||r.forEach(({methods:f=[],...d})=>{const p={...d,methods:f};c.set(d.name,p)}),(n=a==null?void 0:a.dataClasses)==null||n.forEach(({methods:f=[],...d})=>{if(d.uuid||Object.assign(d,{uuid:bu()}),d.attributes){const m=["storage","relatedEntity"];d.attributes=d.attributes.map(g=>(m.includes(g.kind)&&!g.uuid&&Object.assign(g,{uuid:bu()}),g))}const p={...d,methods:f};u.set(d.className,p),o.set(d.collectionName,p)}),{__BASEID:a.__BASEID,__UNIQID:a.__UNIQID,dataClassByCollectionName:Object.fromEntries(o.entries()),methods:a.methods||[],dataClasses:Object.fromEntries(u.entries()),singletons:Object.fromEntries(c.entries())}}catch{return t("Error while loading the catalog")}}),t9=yr({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(aa.pending,()=>({state:"loading"})).addCase(aa.fulfilled,(t,{payload:r})=>({state:"loaded",model:r})).addCase(aa.rejected,(t,r)=>({state:"error",error:r.payload||"Error while loading the catalog"}))}}),r9=t9.reducer,n9=SS.reducer,nu=Z("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:t})=>{try{return await XF({createIfNotExists:!0})}catch{return t("Error while loading the shared datasources")}}),Ew=Z("shared_datasources/addSharedSource",async(e,{rejectWithValue:t,getState:r})=>{try{const n=JSON.parse(JSON.stringify(r().sharedDatasources));if(e.namespace)n.sources[e.namespace]?n.sources[e.namespace].push(e):n.sources[e.namespace]=[e];else return t("Namespace is required");return await da(n.sources),n.sources}catch{return t("Error while saving the shared datasources")}}),_w=Z("shared_datasources/editSharedSource",async(e,{rejectWithValue:t,getState:r})=>{try{const n=r().sharedDatasources;if(!e.namespace)return t("Namespace is required");if(n.sources[e.namespace])n.sources[e.namespace]=n.sources[e.namespace].map(a=>a.id===e.id?{...e,id:a.id}:a);else return t("Namespace not found");return await da(n.sources),n.sources}catch{return t("Error while saving the shared datasources")}}),Tw=Z("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:t,getState:r})=>{try{const n={...r().sharedDatasources};if(n.sources[e.namespace]){const a=n.sources[e.namespace].filter(o=>o.id!==e.id);if(a.length===0){const{[e.namespace]:o,...u}=n.sources;n.sources=u}else n.sources={...n.sources,[e.namespace]:a}}return await da(n.sources),n.sources}catch{return t("Error while saving the shared datasources")}}),zp=Z("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:t,getState:r})=>{try{const n={...r().sharedDatasources};for(const a of e){if(!a.namespace)return t("Namespace is required");if(n.sources[a.namespace])n.sources[a.namespace]=n.sources[a.namespace].map(o=>o.id===a.id?a:o);else return t("Namespace not found")}return await da(n.sources),n.sources}catch{return t("Error while saving the shared datasources")}}),a9=Z("shared_datasources/setDatasourceEvents",async({tabPath:e,name:t,namespace:r,events:n},{getState:a,dispatch:o})=>{var y,E,S;const{root:{tabs:u},sharedDatasources:c}=a(),f=((S=(E=(y=u.find(({path:T})=>T===e))==null?void 0:y.content)==null?void 0:E.metadata)==null?void 0:S.datasources)||[],d={local:!1,shared:!1},p=(T,C)=>T.id===t&&(!r&&!T.namespace||T.namespace===r)?(C==null||C(),{...T,events:n}):T,m=f.map(T=>p(T,()=>{d.local=!0})),g=oe.flatten(oe.values(c.sources)).map(T=>p(T,()=>{d.shared=!0}));d.local&&o(Wp({path:e,content:m,contentPath:"metadata.datasources"})),d.shared&&o(zp(g))}),Ow=yr({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,t){e.sources[t.payload.name]=[]}},extraReducers(e){e.addCase(nu.pending,t=>({state:"loading",sources:{}})).addCase(nu.fulfilled,(t,r)=>({state:"loaded",sources:r.payload})).addCase(nu.rejected,(t,r)=>({state:"error",sources:{},error:r.payload||"Error while loading the shared datasources"})).addCase(zp.fulfilled,(t,r)=>({state:"loaded",sources:r.payload})).addCase(Fp.fulfilled,(t,r)=>{const{payload:n,meta:{arg:a}}=r;a.namespace&&Object.assign(t.sources,{[a.namespace]:n})}).addCase(Ew.fulfilled,(t,r)=>({...t,sources:r.payload})).addCase(Tw.fulfilled,(t,r)=>({...t,sources:r.payload})).addCase(_w.fulfilled,(t,r)=>({...t,sources:r.payload})).addCase(Mp.fulfilled,(t,r)=>{if(!r.payload)return t;const{datasources:n,namespace:a}=r.payload;a&&t.sources[a]&&Object.assign(t.sources[a],{[a]:n})}).addMatcher(fr(kp.fulfilled,po.fulfilled,jp.fulfilled,ui.fulfilled),(t,r)=>{if(!r.payload)return;const{namespace:n,list:a}=r.payload;n&&Object.assign(t.sources,{[n]:a})})}}),{addEmptyNamespace:i9}=Ow.actions,o9=Ow.reducer,s9=$S.reducer,au=Z("shared_css/fetchSharedCSS",async(e,{rejectWithValue:t})=>{try{const{classes:r}=await QF({createIfNotExists:!0});return r}catch{return t("Error while loading the shared CSS")}}),u9=Jd();async function c9(e){const t={verb:qe.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:r,...n})=>({...n}))}};await u9(()=>bt(Gt,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}))}const Cw=yr({name:"shared-css",initialState:()=>{const{sharedCSS:e}=Si();return e||{state:"loading",styles:[]}},reducers:{updateSharedCss:(e,t)=>(e.styles=t.payload.classes,c9(t.payload.classes),e),initSharedCss:(e,t)=>(e.styles=t.payload.classes,e)},extraReducers(e){e.addCase(au.pending,t=>({...t,state:"loading"})).addCase(au.fulfilled,(t,{payload:r})=>({state:"loaded",styles:r})).addCase(au.rejected,(t,r)=>({...t,state:"error",error:r.payload||"Error while loading the shared css"}))}}),{updateSharedCss:l9,initSharedCss:f9}=Cw.actions,d9=Cw.reducer,p9={},h9=yr({name:"tabs",initialState:p9,reducers:{}}),m9=e=>B(Ci,t=>{var r,n;return(n=(r=t.find(a=>a.path===e))==null?void 0:r.view)==null?void 0:n.panel});h9.reducer;const Aw=Ey({root:ww,explorer:s9,debugger:e9,settings:K4,catalog:r9,roles:U4,sharedDatasources:o9,savedConditions:$W,webforms:bW,modals:n9,sharedCSS:d9,model:pW});let Xi;const xw=()=>{if(!Xi){Xi=dP({reducer:Aw});const e=({ignorePreferences:t=!1}={})=>{const{root:{activeTab:r,tabs:n,recent:a},roles:o,debugger:u,webforms:c,sharedCSS:f,settings:{session:d}}=Xi.getState();t||Ab({...d}),Cb({tabs:n,activeTab:r,recent:a,roles:o,debugger:u,webforms:c,sharedCSS:f})};Xi.subscribe(TR(e,1e3)),window.addEventListener("beforeunload",()=>{e({ignorePreferences:!0})})}return Xi},g9=({children:e,store:t})=>ao.jsx(Gb,{store:t,children:e});exports.CATALOG_REFRESH_DELAY=Wo;exports.DEFAULT_CACHE=cp;exports.EAttributeKind=dc;exports.EAttributeTypes=ZS;exports.EDebuggerErrorReason=Eb;exports.EDebuggerErrorType=_u;exports.EDebuggerState=Vn;exports.EDisplayMode=Cp;exports.EPermissionType=ne;exports.ETooltipBehavior=Tp;exports.EUnsavedPopOverChoice=Op;exports.ExpressionIndex=wb;exports.FLAGS_INIT_STATE=ew;exports.FLAGS_KEYS=Co;exports.ROOT_WEBFORM_STATE=gi;exports.ReduxProvider=g9;exports.THEME_CLASSES=sS;exports.WT_FLAGS_KEYS=QS;exports.actionsToPrivs=mS;exports.addBreakpointDecoration=T3;exports.addClassesFolder=r3;exports.addComponent=rw;exports.addCraftedComponent=EW;exports.addDataSource=LW;exports.addDatasource=kp;exports.addDefaultWebformState=VW;exports.addEmptyNamespace=i9;exports.addExpression=D3;exports.addIn=E4;exports.addNewFile=IS;exports.addPermission=x4;exports.addSavedCondition=RW;exports.addSession=k3;exports.addSharedSource=Ew;exports.addWebFormStyles=zW;exports.addWebformState=qW;exports.allowed=S4;exports.attributeKinds=J3;exports.attributeScopes=tW;exports.attributeTypes=Q3;exports.castToFileFolder=i3;exports.changeTabEditor=HW;exports.children=Du;exports.clearAllBreakpoints=P3;exports.clearBreakpoints=A3;exports.clearBreakpointsExcept=x3;exports.closeAllTabs=fw;exports.closeLeftTabs=hw;exports.closeModal=W4;exports.closeOthers=pw;exports.closeRightTabs=dw;exports.closeSavedTabs=kW;exports.closeTab=gc;exports.confirmTab=BW;exports.copyToClipBoard=IW;exports.create=hS;exports.createClassesFolderContent=dd;exports.createModal=wS;exports.createModelFiles=bd;exports.createNewFile=ii;exports.createNewFileAndOpen=l3;exports.createNewNode=Qs;exports.createRole=L4;exports.createWithResource=T4;exports.dataclassScopes=eW;exports.deepDeleteCondition=hc;exports.deepSanitizeCondition=mc;exports.deleteDatasource=po;exports.deleteFile=Sd;exports.deleteFolder=f3;exports.deleteSharedSource=Tw;exports.deserializeModel=xb;exports.duplicateNode=eu;exports.editComponent=nw;exports.editCraftedComponent=_W;exports.editDataSource=Fp;exports.editDatasource=jp;exports.editModal=B4;exports.editRole=N4;exports.editSharedSource=_w;exports.editWebformState=yw;exports.editors=kb;exports.executeMethod=d3;exports.expandFolder=X4;exports.extensions=jb;exports.fetchAppSettings=PS;exports.fetchCatalog=aa;exports.fetchChanges=zS;exports.fetchCraftedComponents=sw;exports.fetchFiles=h3;exports.fetchFolderContent=na;exports.fetchFolderContentWithoutExpanding=co;exports.fetchHTTPHandlers=kS;exports.fetchModel=Iu;exports.fetchRoles=$u;exports.fetchRolesChanges=OS;exports.fetchSavedConditions=ru;exports.fetchSettings=$p;exports.fetchSharedCss=au;exports.fetchSharedDatasources=nu;exports.fetchTemplate=wW;exports.fetchTemplates=SW;exports.findNodeByPath=dt;exports.findOne=Ra;exports.findSession=pt;exports.findSessionByPath=eS;exports.getCachedState=Si;exports.getCashedPrefrences=lp;exports.getContent=Oa;exports.getDebuggerTabName=Lb;exports.getDebuggerTabPath=yp;exports.getDefaultContent=MS;exports.getDefaultName=aW;exports.getDictByName=vS;exports.getEditors=Ut;exports.getExtension=bp;exports.getFileNameWithoutExtension=Bb;exports.getFilePath=LS;exports.getFileType=NS;exports.getFilenameFromType=FS;exports.getGraphData=A4;exports.getInheritedResources=bS;exports.getModalTitle=Xu;exports.getNodeRelativePath=Wb;exports.getPrivilegeById=fn;exports.getPromotions=I4;exports.getResourceFromType=xp;exports.getStore=xw;exports.indexTypes=rW;exports.initSavedConditions=DW;exports.initSharedCss=f9;exports.injectContentAtLine=jS;exports.inspect=mW;exports.isBaseState=_p;exports.isJSON=Pb;exports.isRelatedAttr=iW;exports.isRelatedEntitiesAttr=XS;exports.isRelatedEntityAttr=JS;exports.isRenameDatasource=OW;exports.isRolesOutdated=Pp;exports.isValidPrimaryKey=Z3;exports.modelSubject=zb;exports.openAddFileInput=Q4;exports.openFile=lo;exports.openFileAtLine=Ip;exports.openFileAtSelection=WS;exports.openModal=Dr;exports.openModel=q3;exports.openRoles=_3;exports.openSettingsTab=UW;exports.openTabUnselected=gw;exports.parents=sc;exports.populateShallow=C4;exports.primaryKeyAttributes=X3;exports.redo=QW;exports.refactorConditions=hi;exports.refactorWebform=Rb;exports.refreshFile=e3;exports.reloadTab=tu;exports.relocateNode=fo;exports.remove=w4;exports.removeAllExpressions=M3;exports.removeBreakpointDecoration=O3;exports.removeClassesFolder=n3;exports.removeComponent=aw;exports.removeCraftedComponent=TW;exports.removeDataSource=WW;exports.removeDebuggerSessionsNotIn=KS;exports.removeDefaultWebformState=ZW;exports.removeExpression=I3;exports.removeFile=yd;exports.removeFileNode=wd;exports.removeFrom=_4;exports.removeModal=ES;exports.removeMultiplePermissions=R4;exports.removePermission=P4;exports.removeRole=F4;exports.removeSavedCondition=cw;exports.removeSession=W3;exports.removeSessionByIndex=B3;exports.removeWebformState=bw;exports.rename=O4;exports.renameClassesFolder=a3;exports.renameDataSource=Mp;exports.renameDatasource=ui;exports.renameExpression=$3;exports.renameFile=oi;exports.resetComponentState=KW;exports.resetResources=D4;exports.rootReducer=ww;exports.sanitize=uc;exports.sanitizePermissions=gS;exports.sanitizePrivileges=dS;exports.saveAll=m3;exports.saveExpressions=L3;exports.saveModel=Mu;exports.savePrefrences=Ab;exports.saveRole=k4;exports.saveRoles=md;exports.saveState=Cb;exports.saveTab=si;exports.selectActiveLine=lj;exports.selectActiveTab=_j;exports.selectActiveTabHistoryActions=i4;exports.selectAllDatasourcesByPath=rj;exports.selectAppState=Jb;exports.selectBreakpoints=ij;exports.selectCSSClassesByPath=t4;exports.selectCallChainVariables=bj;exports.selectCatalog=ic;exports.selectCatalogMethods=Z2;exports.selectCatalogState=Y2;exports.selectClassBreakpoints=sj;exports.selectClassOffset=wj;exports.selectClasses=Fj;exports.selectClassesFolder=iS;exports.selectClipBoard=d4;exports.selectComponents=cS;exports.selectComponentsByPath=ej;exports.selectContentByPath=rS;exports.selectCraftedComponent=c4;exports.selectCurrentFrameByThreadId=gj;exports.selectCurrentTab=tS;exports.selectCurrentWebformStateByPath=v4;exports.selectDataclasses=Vb;exports.selectDatasource=tj;exports.selectDatasourcesByPath=Xb;exports.selectDatasourcesTheme=f4;exports.selectDebuggerChannels=vj;exports.selectDebuggerData=Na;exports.selectDebuggerMeta=nj;exports.selectDebuggerSessions=Xt;exports.selectDebuggerSessionsCount=aj;exports.selectDebuggers=Dj;exports.selectDefaultWebformStatesByPath=g4;exports.selectDraftBreakpoints=oj;exports.selectDraftClassBreakpoints=uj;exports.selectExceptions=Ej;exports.selectExplorer=$j;exports.selectExpressions=fj;exports.selectExpressionsVariables=Sj;exports.selectFeatureFlag=Yj;exports.selectFlagsByPath=n4;exports.selectForceLogin=Hj;exports.selectGuestPrivilege=Wj;exports.selectHasTabs=Aj;exports.selectHighlightedLines=cj;exports.selectHistoryByPath=a4;exports.selectI18nCurrent=Qj;exports.selectI18nSetting=Xj;exports.selectInspectedCSSClass=o4;exports.selectInspectedDatasource=s4;exports.selectInspector=oc;exports.selectInspectorStateByType=l4;exports.selectIsLoaded=p4;exports.selectMethods=Ij;exports.selectMethodsFolder=aS;exports.selectModals=Nj;exports.selectMonacoZoom=Jj;exports.selectPanelByPath=m9;exports.selectPartialSessionSettings=Gj;exports.selectPreferences=Kj;exports.selectPreviewedWebformsPaths=Cj;exports.selectPrivileges=jj;exports.selectProjectSettings=oS;exports.selectQodly=Zj;exports.selectRecentFiles=Tj;exports.selectRemoteDebuggerMode=Vj;exports.selectRoles=kj;exports.selectRolesAndPrivileges=Lj;exports.selectRolesDate=Uj;exports.selectRolesFlags=Bj;exports.selectRoot=In;exports.selectSavedConditions=y4;exports.selectSelectedTab=zj;exports.selectServerSettings=wp;exports.selectSessionSetting=qj;exports.selectSessionSettings=Ai;exports.selectSharedCSS=r4;exports.selectSharedDatasources=Qb;exports.selectSingletons=K2;exports.selectSourceByPath=pj;exports.selectSourceByThreadId=mj;exports.selectStackFrames=yj;exports.selectStoppedFromDebugSession=dj;exports.selectStylesByPath=e4;exports.selectTab=mw;exports.selectTabByPath=Mn;exports.selectTabByReference=Jt;exports.selectTabExtraByPath=xj;exports.selectTabMaxWeight=Oj;exports.selectTabs=Ci;exports.selectTemplates=lS;exports.selectTemplatesData=u4;exports.selectThreadIdByPath=hj;exports.selectTouchedTabs=Sp;exports.selectTouchedTabsLength=Rj;exports.selectVirtualDataClasses=V2;exports.selectWebForms=Mj;exports.selectWebFormsFolder=nS;exports.selectWebformMetadataByPath=h4;exports.selectWebformNodes=Pj;exports.selectWebformStatesByPath=fS;exports.selectWebformStatesLabelsByPath=m4;exports.selectWebformStylesByPath=Ep;exports.selectWebforms=zo;exports.selectorEqualityFn=aN;exports.serializeModel=nW;exports.setActiveLine=R3;exports.setBreakpointsDecoration=C3;exports.setCallChainVariables=z3;exports.setContent=Wp;exports.setCurrentWebformState=E3;exports.setDataSources=jW;exports.setDatasourceEvents=a9;exports.setDatasourcesTheme=vW;exports.setDebuggerMeta=G3;exports.setDefaultWebformStates=JW;exports.setExpression=F3;exports.setExpressionVariables=H3;exports.setFolderChildren=t3;exports.setHistoryContent=Sw;exports.setModelFlag=V3;exports.setPanelState=GW;exports.setRolesContent=Rp;exports.setSavedCondition=xW;exports.setSelectedGroup=gW;exports.setSessions=qS;exports.setSetting=gd;exports.setSettings=lc;exports.setSettingsAsText=Y4;exports.setSourceContent=U3;exports.setTabContent=w3;exports.setTabExtra=NW;exports.setTabFlags=lw;exports.setTabs=MW;exports.setTabsFlags=FW;exports.setTemplateData=ow;exports.setTemplatesData=iw;exports.setWebformState=vw;exports.setWebformsFlag=yW;exports.sort=pS;exports.stateReducer=Aw;exports.stateSlice=Ao;exports.toAPI=cc;exports.toState=M4;exports.toggleExpandFolder=J4;exports.toggleForceLogin=H4;exports.toggleInspector=hW;exports.togglePermission=$4;exports.togglePrivilegePermission=yS;exports.toggleTab=z4;exports.tryCloseAllTabs=v3;exports.tryCloseLeftTabs=b3;exports.tryCloseOtherTabs=g3;exports.tryCloseRightTabs=y3;exports.tryCloseTab=Np;exports.tryEditMethod=o3;exports.tryInjectMethod=US;exports.tryRenameDataclass=Y3;exports.undo=XW;exports.uniquePush=Rr;exports.unlockHistory=Bp;exports.updateDsCondition=pc;exports.updateExpressionAt=N3;exports.updatePrivileges=AS;exports.updateRoles=xS;exports.updateRolesAndPrivileges=Dp;exports.updateSavedConditionDs=PW;exports.updateSavedConditions=AW;exports.updateSession=j3;exports.updateSharedCss=l9;exports.updateSharedDatasources=zp;exports.updateStateConditionDs=YW;exports.uploadFile=c3;exports.uploadFileAndGetResponse=u3;exports.useAppDispatch=q2;exports.useAppSelector=ln;exports.useAttribute=lW;exports.useCollections=uW;exports.useDataclass=cW;exports.useDataclasses=sW;exports.useMethod=Q2;exports.useMethods=J2;exports.useModelFlags=dW;exports.useModelSelector=oW;exports.useModelViewport=fW;exports.wipeDebuggerSessions=YS;
|