@ws-ui/shared 1.8.4-rc5 → 1.8.4-rc7
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.
|
@@ -6,7 +6,6 @@ type TooltipProps = {
|
|
|
6
6
|
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
7
7
|
sideOffset?: number;
|
|
8
8
|
alignOffset?: number;
|
|
9
|
-
portalled?: boolean;
|
|
10
9
|
};
|
|
11
10
|
export declare function FloatingTooltip(props: PropsWithChildren<TooltipProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
package/dist/index.cjs.js
CHANGED
|
@@ -198,7 +198,7 @@ __p += '`),Re&&(ee+=`' +
|
|
|
198
198
|
function print() { __p += __j.call(arguments, '') }
|
|
199
199
|
`:`;
|
|
200
200
|
`)+ee+`return __p
|
|
201
|
-
}`;var Se=Jp(function(){return Pe(T,le+"return "+ee).apply(n,P)});if(Se.source=ee,tl(Se))throw Se;return Se}function u_(r){return ke(r).toLowerCase()}function l_(r){return ke(r).toUpperCase()}function c_(r,o,u){if(r=ke(r),r&&(u||o===n))return ad(r);if(!r||!(o=Nt(o)))return r;var y=un(r),_=un(o),T=ud(y,_),P=ld(y,_)+1;return ir(y,T,P).join("")}function f_(r,o,u){if(r=ke(r),r&&(u||o===n))return r.slice(0,fd(r)+1);if(!r||!(o=Nt(o)))return r;var y=un(r),_=ld(y,un(o))+1;return ir(y,0,_).join("")}function d_(r,o,u){if(r=ke(r),r&&(u||o===n))return r.replace(tu,"");if(!r||!(o=Nt(o)))return r;var y=un(r),_=ud(y,un(o));return ir(y,_).join("")}function p_(r,o){var u=G,y=j;if(Ze(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}r=ke(r);var T=r.length;if(Xr(r)){var P=un(r);T=P.length}if(u>=T)return r;var I=u-Yr(y);if(I<1)return y;var z=P?ir(P,0,I).join(""):r.slice(0,I);if(_===n)return z+y;if(P&&(I+=z.length-I),nl(_)){if(r.slice(I).search(_)){var V,Y=z;for(_.global||(_=yu(_.source,ke(Pf.exec(_))+"g")),_.lastIndex=0;V=_.exec(Y);)var ee=V.index;z=z.slice(0,ee===n?I:ee)}}else if(r.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function h_(r){return r=ke(r),r&&Oy.test(r)?r.replace(Af,Uw):r}var g_=ii(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),ol=Qd("toUpperCase");function Yp(r,o,u){return r=ke(r),o=u?n:o,o===n?Nw(r)?Zw(r):Pw(r):r.match(o)||[]}var Jp=_e(function(r,o){try{return Ft(r,n,o)}catch(u){return tl(u)?u:new we(u)}}),v_=Dn(function(r,o){return Vt(o,function(u){u=bn(u),Mn(r,u,Qu(r[u],r))}),r});function m_(r){var o=r==null?0:r.length,u=pe();return r=o?Be(r,function(y){if(typeof y[1]!="function")throw new Xt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=r[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function y_(r){return Ub(Jt(r,g))}function sl(r){return function(){return r}}function w_(r,o){return r==null||r!==r?o:r}var b_=tp(),x_=tp(!0);function $t(r){return r}function al(r){return kd(typeof r=="function"?r:Jt(r,g))}function S_(r){return Id(Jt(r,g))}function E_(r,o){return Ld(r,Jt(o,g))}var __=_e(function(r,o){return function(u){return Li(u,r,o)}}),O_=_e(function(r,o){return function(u){return Li(r,u,o)}});function ul(r,o,u){var y=lt(o),_=hs(o,y);u==null&&!(Ze(o)&&(_.length||!y.length))&&(u=o,o=r,r=this,_=hs(o,lt(o)));var T=!(Ze(u)&&"chain"in u)||!!u.chain,P=jn(r);return Vt(_,function(I){var z=o[I];r[I]=z,P&&(r.prototype[I]=function(){var V=this.__chain__;if(T||V){var Y=r(this.__wrapped__),ee=Y.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:r}),Y.__chain__=V,Y}return z.apply(r,Jn([this.value()],arguments))})}),r}function A_(){return dt._===this&&(dt._=Jw),this}function ll(){}function T_(r){return r=xe(r),_e(function(o){return Md(o,r)})}var R_=zu(Be),P_=zu(nd),C_=zu(fu);function Qp(r){return Ku(r)?du(bn(r)):s1(r)}function k_(r){return function(o){return r==null?n:Or(r,o)}}var $_=rp(),I_=rp(!0);function cl(){return[]}function fl(){return!1}function L_(){return{}}function M_(){return""}function F_(){return!0}function D_(r,o){if(r=xe(r),r<1||r>te)return[];var u=Q,y=wt(r,Q);o=pe(o),r-=Q;for(var _=gu(y,o);++u<r;)o(u);return _}function N_(r){return be(r)?Be(r,bn):jt(r)?[r]:Pt(wp(ke(r)))}function j_(r){var o=++Xw;return ke(r)+o}var z_=bs(function(r,o){return r+o},0),W_=Wu("ceil"),B_=bs(function(r,o){return r/o},1),U_=Wu("floor");function H_(r){return r&&r.length?ps(r,$t,Au):n}function q_(r,o){return r&&r.length?ps(r,pe(o,2),Au):n}function Z_(r){return od(r,$t)}function K_(r,o){return od(r,pe(o,2))}function G_(r){return r&&r.length?ps(r,$t,Cu):n}function V_(r,o){return r&&r.length?ps(r,pe(o,2),Cu):n}var X_=bs(function(r,o){return r*o},1),Y_=Wu("round"),J_=bs(function(r,o){return r-o},0);function Q_(r){return r&&r.length?hu(r,$t):0}function eO(r,o){return r&&r.length?hu(r,pe(o,2)):0}return A.after=SS,A.ary=Cp,A.assign=lE,A.assignIn=Hp,A.assignInWith=Is,A.assignWith=cE,A.at=fE,A.before=kp,A.bind=Qu,A.bindAll=v_,A.bindKey=$p,A.castArray=LS,A.chain=Tp,A.chunk=U1,A.compact=H1,A.concat=q1,A.cond=m_,A.conforms=y_,A.constant=sl,A.countBy=Qx,A.create=dE,A.curry=Ip,A.curryRight=Lp,A.debounce=Mp,A.defaults=pE,A.defaultsDeep=hE,A.defer=ES,A.delay=_S,A.difference=Z1,A.differenceBy=K1,A.differenceWith=G1,A.drop=V1,A.dropRight=X1,A.dropRightWhile=Y1,A.dropWhile=J1,A.fill=Q1,A.filter=tS,A.flatMap=iS,A.flatMapDeep=oS,A.flatMapDepth=sS,A.flatten=Ep,A.flattenDeep=ex,A.flattenDepth=tx,A.flip=OS,A.flow=b_,A.flowRight=x_,A.fromPairs=nx,A.functions=xE,A.functionsIn=SE,A.groupBy=aS,A.initial=ix,A.intersection=ox,A.intersectionBy=sx,A.intersectionWith=ax,A.invert=_E,A.invertBy=OE,A.invokeMap=lS,A.iteratee=al,A.keyBy=cS,A.keys=lt,A.keysIn=kt,A.map=Ts,A.mapKeys=TE,A.mapValues=RE,A.matches=S_,A.matchesProperty=E_,A.memoize=Ps,A.merge=PE,A.mergeWith=qp,A.method=__,A.methodOf=O_,A.mixin=ul,A.negate=Cs,A.nthArg=T_,A.omit=CE,A.omitBy=kE,A.once=AS,A.orderBy=fS,A.over=R_,A.overArgs=TS,A.overEvery=P_,A.overSome=C_,A.partial=el,A.partialRight=Fp,A.partition=dS,A.pick=$E,A.pickBy=Zp,A.property=Qp,A.propertyOf=k_,A.pull=fx,A.pullAll=Op,A.pullAllBy=dx,A.pullAllWith=px,A.pullAt=hx,A.range=$_,A.rangeRight=I_,A.rearg=RS,A.reject=gS,A.remove=gx,A.rest=PS,A.reverse=Yu,A.sampleSize=mS,A.set=LE,A.setWith=ME,A.shuffle=yS,A.slice=vx,A.sortBy=xS,A.sortedUniq=Ex,A.sortedUniqBy=_x,A.split=i_,A.spread=CS,A.tail=Ox,A.take=Ax,A.takeRight=Tx,A.takeRightWhile=Rx,A.takeWhile=Px,A.tap=Hx,A.throttle=kS,A.thru=As,A.toArray=Wp,A.toPairs=Kp,A.toPairsIn=Gp,A.toPath=N_,A.toPlainObject=Up,A.transform=FE,A.unary=$S,A.union=Cx,A.unionBy=kx,A.unionWith=$x,A.uniq=Ix,A.uniqBy=Lx,A.uniqWith=Mx,A.unset=DE,A.unzip=Ju,A.unzipWith=Ap,A.update=NE,A.updateWith=jE,A.values=ai,A.valuesIn=zE,A.without=Fx,A.words=Yp,A.wrap=IS,A.xor=Dx,A.xorBy=Nx,A.xorWith=jx,A.zip=zx,A.zipObject=Wx,A.zipObjectDeep=Bx,A.zipWith=Ux,A.entries=Kp,A.entriesIn=Gp,A.extend=Hp,A.extendWith=Is,ul(A,A),A.add=z_,A.attempt=Jp,A.camelCase=HE,A.capitalize=Vp,A.ceil=W_,A.clamp=WE,A.clone=MS,A.cloneDeep=DS,A.cloneDeepWith=NS,A.cloneWith=FS,A.conformsTo=jS,A.deburr=Xp,A.defaultTo=w_,A.divide=B_,A.endsWith=qE,A.eq=cn,A.escape=ZE,A.escapeRegExp=KE,A.every=eS,A.find=nS,A.findIndex=xp,A.findKey=gE,A.findLast=rS,A.findLastIndex=Sp,A.findLastKey=vE,A.floor=U_,A.forEach=Rp,A.forEachRight=Pp,A.forIn=mE,A.forInRight=yE,A.forOwn=wE,A.forOwnRight=bE,A.get=rl,A.gt=zS,A.gte=WS,A.has=EE,A.hasIn=il,A.head=_p,A.identity=$t,A.includes=uS,A.indexOf=rx,A.inRange=BE,A.invoke=AE,A.isArguments=Rr,A.isArray=be,A.isArrayBuffer=BS,A.isArrayLike=Ct,A.isArrayLikeObject=Ye,A.isBoolean=US,A.isBuffer=or,A.isDate=HS,A.isElement=qS,A.isEmpty=ZS,A.isEqual=KS,A.isEqualWith=GS,A.isError=tl,A.isFinite=VS,A.isFunction=jn,A.isInteger=Dp,A.isLength=ks,A.isMap=Np,A.isMatch=XS,A.isMatchWith=YS,A.isNaN=JS,A.isNative=QS,A.isNil=tE,A.isNull=eE,A.isNumber=jp,A.isObject=Ze,A.isObjectLike=Ge,A.isPlainObject=zi,A.isRegExp=nl,A.isSafeInteger=nE,A.isSet=zp,A.isString=$s,A.isSymbol=jt,A.isTypedArray=si,A.isUndefined=rE,A.isWeakMap=iE,A.isWeakSet=oE,A.join=ux,A.kebabCase=GE,A.last=en,A.lastIndexOf=lx,A.lowerCase=VE,A.lowerFirst=XE,A.lt=sE,A.lte=aE,A.max=H_,A.maxBy=q_,A.mean=Z_,A.meanBy=K_,A.min=G_,A.minBy=V_,A.stubArray=cl,A.stubFalse=fl,A.stubObject=L_,A.stubString=M_,A.stubTrue=F_,A.multiply=X_,A.nth=cx,A.noConflict=A_,A.noop=ll,A.now=Rs,A.pad=YE,A.padEnd=JE,A.padStart=QE,A.parseInt=e_,A.random=UE,A.reduce=pS,A.reduceRight=hS,A.repeat=t_,A.replace=n_,A.result=IE,A.round=Y_,A.runInContext=N,A.sample=vS,A.size=wS,A.snakeCase=r_,A.some=bS,A.sortedIndex=mx,A.sortedIndexBy=yx,A.sortedIndexOf=wx,A.sortedLastIndex=bx,A.sortedLastIndexBy=xx,A.sortedLastIndexOf=Sx,A.startCase=o_,A.startsWith=s_,A.subtract=J_,A.sum=Q_,A.sumBy=eO,A.template=a_,A.times=D_,A.toFinite=zn,A.toInteger=xe,A.toLength=Bp,A.toLower=u_,A.toNumber=tn,A.toSafeInteger=uE,A.toString=ke,A.toUpper=l_,A.trim=c_,A.trimEnd=f_,A.trimStart=d_,A.truncate=p_,A.unescape=h_,A.uniqueId=j_,A.upperCase=g_,A.upperFirst=ol,A.each=Rp,A.eachRight=Pp,A.first=_p,ul(A,(function(){var r={};return yn(A,function(o,u){Fe.call(A.prototype,u)||(r[u]=o)}),r})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){A[r].placeholder=A}),Vt(["drop","take"],function(r,o){Te.prototype[r]=function(u){u=u===n?1:st(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=wt(u,y.__takeCount__):y.__views__.push({size:wt(u,Q),type:r+(y.__dir__<0?"Right":"")}),y},Te.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Vt(["filter","map","takeWhile"],function(r,o){var u=o+1,y=u==q||u==J;Te.prototype[r]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(r,o){var u="take"+(o?"Right":"");Te.prototype[r]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");Te.prototype[r]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(r){return this.filter(r).head()},Te.prototype.findLast=function(r){return this.reverse().find(r)},Te.prototype.invokeMap=_e(function(r,o){return typeof r=="function"?new Te(this):this.map(function(u){return Li(u,r,o)})}),Te.prototype.reject=function(r){return this.filter(Cs(pe(r)))},Te.prototype.slice=function(r,o){r=xe(r);var u=this;return u.__filtered__&&(r>0||o<0)?new Te(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},Te.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Te.prototype.toArray=function(){return this.take(Q)},yn(Te.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),_=A[y?"take"+(o=="last"?"Right":""):o],T=y||/^find/.test(o);_&&(A.prototype[o]=function(){var P=this.__wrapped__,I=y?[1]:arguments,z=P instanceof Te,V=I[0],Y=z||be(P),ee=function(Oe){var Re=_.apply(A,Jn([Oe],I));return y&&oe?Re[0]:Re};Y&&u&&typeof V=="function"&&V.length!=1&&(z=Y=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&Y){P=Se?P:new Te(this);var ge=r.apply(P,I);return ge.__actions__.push({func:As,args:[ee],thisArg:n}),new Yt(ge,oe)}return he&&Se?r.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(r){var o=Jo[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",y=/^(?:pop|shift)$/.test(r);A.prototype[r]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(be(T)?T:[],_)}return this[u](function(P){return o.apply(be(P)?P:[],_)})}}),yn(Te.prototype,function(r,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ti,y)||(ti[y]=[]),ti[y].push({name:o,func:u})}}),ti[ws(n,h).name]=[{name:"wrapper",func:n}],Te.prototype.clone=hb,Te.prototype.reverse=gb,Te.prototype.value=vb,A.prototype.at=qx,A.prototype.chain=Zx,A.prototype.commit=Kx,A.prototype.next=Gx,A.prototype.plant=Xx,A.prototype.reverse=Yx,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=Jx,A.prototype.first=A.prototype.head,Ti&&(A.prototype[Ti]=Vx),A}),Jr=Kw();br?((br.exports=Jr)._=Jr,au._=Jr):dt._=Jr}).call(mk)})(ho,ho.exports)),ho.exports}var tt=yk();const mc={FdSave:et.FdSave,FdWarningDanger:et.FdWarningDanger,FdInfoCircle:et.FdInfoCircle,FdInfoBold:et.FdInfoBold};var af=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(af||{}),jr=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(jr||{}),di=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(di||{});const h0={[jr.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[jr.DANGER]:{icon:"red-500",button:"primary-dark"},[jr.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Ul=({color:e=jr.PRIMARY,variant:t="solid",children:n,autoFocus:i,...s})=>{const a=h0[e].button,l=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:nt("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:n})},wk=({name:e,color:t=jr.PRIMARY,className:n="w-8 h-8"})=>{const i=mc[e]||mc.FdInfoCircle,s=`text-${h0[t].icon}`;return D.jsx(i,{className:nt(n,s)})},bk=({id:e,title:t,message:n,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:m=!0,container:v,onClose:g,onEdit:p})=>{const w=b=>{g({id:e,reason:b})};W.useEffect(()=>{function b(h){h.key==="Escape"&&w(di.CANCELED)}return window.addEventListener("keyup",b),()=>{window.removeEventListener("keyup",b)}},[]);const x=tt.merge(tt.values(c==null?void 0:c.toggles).flatMap(b=>b.value?b.warnings||[]:[]),c==null?void 0:c.tips),d=(b,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=tt.cloneDeep(c);(E=S.toggles)!=null&&E[b]&&(S.toggles[b].value=h),p({id:e,views:S})};return Lo.createPortal(D.jsx(va,{appear:!0,show:!0,as:W.Fragment,children:D.jsx("div",{className:nt("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":m}),style:{zIndex:l},onClick:()=>w(di.CANCELED),children:D.jsx(va.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:b=>b.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(wk,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(xk,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:n}),D.jsx("div",{className:"text-xs text-white",children:tt.values(c==null?void 0:c.toggles).map(b=>D.jsx("div",{children:D.jsxs("label",{htmlFor:b.key,className:"flex items-center",children:[D.jsx(Qm,{size:"xs",value:b.value,onChange:h=>d(b.key,h)}),D.jsx("span",{className:"ml-1",children:b.title})]})},b.key))}),D.jsx(Sk,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===af.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(Ul,{autoFocus:!0,color:a,onClick:()=>w(di.CONFIRMED),children:"Confirm"}),D.jsx(Ul,{color:a,variant:"outlined",onClick:()=>w(di.CANCELED),children:"Cancel"})]}):D.jsx(Ul,{autoFocus:!0,onClick:()=>w(),children:"OK"})})]})})})})}),v||document.body)},xk=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,Sk=e=>e.warnings?D.jsx(va,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,n)=>D.jsx(va.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(et.FdWarningDanger,{className:nt({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${n}`))})}):null;var g0=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(g0||{});const Ek=({zoom:e,minZoom:t=.5,maxZoom:n=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(et.FdMinusNaked,{onClick:s,className:nt("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(et.FdPlusNaked,{onClick:i,className:nt("h-5 w-5 p-1",{"text-grey-200":e>=n,"cursor-pointer rounded hover:bg-purple-800":e<n})})]}),_k=$.forwardRef(((e,t)=>$.createElement(mr.span,Xe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),Ok=_k;function tv(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[v0]=Wc("Tooltip",[Ia]),uf=Ia(),Ak=700,[RL,Tk]=v0("TooltipProvider",{isOpenDelayed:!0,delayDuration:Ak,onOpen:()=>{},onClose:()=>{}}),[Rk,ja]=v0("Tooltip"),Pk=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=Tk("Tooltip",t),f=uf(t),[m,v]=$.useState(null),g=vm(),p=$.useRef(0),w=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:b}=c,[h=!1,S]=Rm({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>h?x.current?"delayed-open":"instant-open":"closed"),[h]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),w)}),[w,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Om,f,$.createElement(Rk,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:m,onTriggerChange:v,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),b()}),[S,b])},n))},Ck=$.forwardRef(((e,t)=>{const{__scopeTooltip:n,...i}=e,s=ja("TooltipTrigger",n),a=uf(n),l=vr(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Am,Xe({asChild:!0},a),$.createElement(mr.button,Xe({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Ut(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Ut(e.onMouseLeave,s.onClose),onMouseDown:Ut(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Ut(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Ut(e.onBlur,s.onClose),onClick:Ut(e.onClick,(m=>{m.detail===0&&s.onClose()}))})))})),kk=$.forwardRef(((e,t)=>{const{forceMount:n,...i}=e,s=ja("TooltipContent",e.__scopeTooltip);return $.createElement(jc,{present:n||s.open},$.createElement($k,Xe({ref:t},i)))})),$k=$.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=ja("TooltipContent",n),f=uf(n),m=a?zc:$.Fragment,{onClose:v}=c;return bm((()=>v())),$.useEffect((()=>(document.addEventListener("tooltip.open",v),()=>document.removeEventListener("tooltip.open",v))),[v]),$.createElement(m,null,$.createElement(Ik,{__scopeTooltip:n}),$.createElement(Tm,Xe({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(wm,null,i),$.createElement(Ok,{id:c.contentId,role:"tooltip"},s||i)))}));function Ik(e){const{__scopeTooltip:t}=e,n=ja("CheckTriggerMoved",t),i=Sm(n.trigger),s=i==null?void 0:i.left,a=tv(s),l=i==null?void 0:i.top,c=tv(l),f=n.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const Lk=Pk,Mk=Ck,Fk=kk;function Dk(e){return D.jsxs(Lk,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(Mk,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(Fk,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,portalled:e.portalled!==!1,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const $r=30,la=500,Nk=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),jk=e=>{const[t,n]=W.useState($r),i=W.useRef(),s=t>$r,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&n(la),!e.isOpen&&s&&n($r)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(iO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:$r,onResizeStart:()=>{i.current&&Date.now()-i.current<200?n(s?$r:la):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var m;(m=e.onResize)==null||m.call(e),a.current=null})},onResizeStop:(l,c,f,m)=>{n(t+m.height)},handleComponent:{top:D.jsx(Nk,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${tt.kebabCase(e.path)}`,children:[D.jsxs("div",{className:nt("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(Wm,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(n($r),e.onClose()):(n(la),e.onOpen())},children:s?D.jsx(et.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(et.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(oa,{of:s,children:[D.jsx(oa,{of:e.render,children:e.render}),D.jsx(oa,{of:!e.render,children:e.children})]})]})]})};function m0({children:e,viewBox:t="0 0 24 24",...n}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...n,children:e})}function y0(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(m0,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function zk({isChecked:e,isIndeterminate:t,isInvalid:n,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),m=i||D.jsx(y0,{}),v=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=v||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:l,"data-invalid":n,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:v,...c,"aria-invalid":n||void 0}),D.jsx("span",{className:"base-checkbox-control",children:g&&m&&W.cloneElement(m,{isChecked:v,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}function Wk(e,t){const n=W.useRef(!1);W.useEffect(()=>{if(n.current)return e();n.current=!0},t)}const Hl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function ql(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on".concat(t),n)}function co(e,t,n,i){e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on".concat(t),n)}function w0(e,t){const n=t.slice(0,t.length-1);for(let i=0;i<n.length;i++)n[i]=e[n[i].toLowerCase()];return n}function b0(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let n=t.lastIndexOf("");for(;n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function Bk(e,t){const n=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<n.length;a++)i.indexOf(n[a])===-1&&(s=!1);return s}const Ao={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,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,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,"-":Hl?173:189,"=":Hl?61:187,";":Hl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},vn={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},go={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},gt={16:!1,18:!1,17:!1,91:!1},Ke={};for(let e=1;e<20;e++)Ao["f".concat(e)]=111+e;let He=[],Eo=null,x0="all";const Un=new Map,Ei=e=>Ao[e.toLowerCase()]||vn[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),Uk=e=>Object.keys(Ao).find(t=>Ao[t]===e),Hk=e=>Object.keys(vn).find(t=>vn[t]===e);function S0(e){x0=e||"all"}function To(){return x0||"all"}function qk(){return He.slice(0)}function Zk(){return He.map(e=>Uk(e)||Hk(e)||String.fromCharCode(e))}function Kk(){const e=[];return Object.keys(Ke).forEach(t=>{Ke[t].forEach(n=>{let{key:i,scope:s,mods:a,shortcut:l}=n;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>Ei(c))})})}),e}function Gk(e){const t=e.target||e.srcElement,{tagName:n}=t;let i=!0;const s=n==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(i=!1),i}function Vk(e){return typeof e=="string"&&(e=Ei(e)),He.indexOf(e)!==-1}function Xk(e,t){let n,i;e||(e=To());for(const s in Ke)if(Object.prototype.hasOwnProperty.call(Ke,s))for(n=Ke[s],i=0;i<n.length;)n[i].scope===e?n.splice(i,1).forEach(l=>{let{element:c}=l;return lf(c)}):i++;To()===e&&S0(t||"all")}function Yk(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=Ei(e.key));const n=He.indexOf(t);if(n>=0&&He.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&He.splice(0,He.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in vn)vn[i]===t&&(gn[i]=!1)}}function E0(e){if(typeof e>"u")Object.keys(Ke).forEach(s=>{Array.isArray(Ke[s])&&Ke[s].forEach(a=>Ys(a)),delete Ke[s]}),lf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&Ys(s)});else if(typeof e=="object")e.key&&Ys(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let[s,a]=n;typeof s=="function"&&(a=s,s=""),Ys({key:e,scope:s,method:a,splitKey:"+"})}}const Ys=e=>{let{key:t,scope:n,method:i,splitKey:s="+"}=e;b0(t).forEach(l=>{const c=l.split(s),f=c.length,m=c[f-1],v=m==="*"?"*":Ei(m);if(!Ke[v])return;n||(n=To());const g=f>1?w0(vn,c):[],p=[];Ke[v]=Ke[v].filter(w=>{const d=(i?w.method===i:!0)&&w.scope===n&&Bk(w.mods,g);return d&&p.push(w.element),!d}),p.forEach(w=>lf(w))})};function nv(e,t,n,i){if(t.element!==i)return;let s;if(t.scope===n||t.scope==="all"){s=t.mods.length>0;for(const a in gt)Object.prototype.hasOwnProperty.call(gt,a)&&(!gt[a]&&t.mods.indexOf(+a)>-1||gt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!gt[16]&&!gt[18]&&!gt[17]&&!gt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(He),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function rv(e,t){const n=Ke["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!gn.filter.call(this,e))return;if((i===93||i===224)&&(i=91),He.indexOf(i)===-1&&i!==229&&He.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=go[c];e[c]&&He.indexOf(f)===-1?He.push(f):!e[c]&&He.indexOf(f)>-1?He.splice(He.indexOf(f),1):c==="metaKey"&&e[c]&&(He=He.filter(m=>m in go||m===i))}),i in gt){gt[i]=!0;for(const c in vn)if(Object.prototype.hasOwnProperty.call(vn,c)){const f=go[vn[c]];gn[c]=e[f]}if(!n)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[go[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(He.indexOf(17)===-1&&He.push(17),He.indexOf(18)===-1&&He.push(18),gt[17]=!0,gt[18]=!0);const s=To();if(n)for(let c=0;c<n.length;c++)n[c].scope===s&&(e.type==="keydown"&&n[c].keydown||e.type==="keyup"&&n[c].keyup)&&nv(e,n[c],s,t);if(!(i in Ke))return;const a=Ke[i],l=a.length;for(let c=0;c<l;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:m}=f,v=f.key.split(m),g=[];for(let p=0;p<v.length;p++)g.push(Ei(v[p]));g.sort().join("")===He.sort().join("")&&nv(e,f,s,t)}}function gn(e,t,n){He=[];const i=b0(e);let s=[],a="all",l=document,c=0,f=!1,m=!0,v="+",g=!1,p=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(l=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(v=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&E0(e,a);c<i.length;c++)e=i[c].split(v),s=[],e.length>1&&(s=w0(vn,e)),e=e[e.length-1],e=e==="*"?"*":Ei(e),e in Ke||(Ke[e]=[]),Ke[e].push({keyup:f,keydown:m,scope:a,mods:s,shortcut:i[c],method:n,key:i[c],splitKey:v,element:l});if(typeof l<"u"&&window){if(!Un.has(l)){const w=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return rv(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;rv(d,l),Yk(d)};Un.set(l,{keydownListener:w,keyupListenr:x,capture:g}),ql(l,"keydown",w,g),ql(l,"keyup",x,g)}if(!Eo){const w=()=>{He=[]};Eo={listener:w,capture:g},ql(window,"focus",w,g)}}}function Jk(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ke).forEach(n=>{Ke[n].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function lf(e){const t=Object.values(Ke).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Un.get(e)||{};i&&s&&(co(e,"keyup",s,a),co(e,"keydown",i,a),Un.delete(e))}if((t.length<=0||Un.size<=0)&&(Object.keys(Un).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Un.get(s)||{};a&&l&&(co(s,"keyup",l,c),co(s,"keydown",a,c),Un.delete(s))}),Un.clear(),Object.keys(Ke).forEach(s=>delete Ke[s]),Eo)){const{listener:s,capture:a}=Eo;co(window,"focus",s,a),Eo=null}}const Zl={getPressedKeyString:Zk,setScope:S0,getScope:To,deleteScope:Xk,getPressedKeyCodes:qk,getAllKeyCodes:Kk,isPressed:Vk,filter:Gk,trigger:Jk,unbind:E0,keyMap:Ao,modifier:vn,modifierMap:go};for(const e in Zl)Object.prototype.hasOwnProperty.call(Zl,e)&&(gn[e]=Zl[e]);if(typeof window<"u"){const e=window.hotkeys;gn.noConflict=t=>(t&&window.hotkeys===gn&&(window.hotkeys=e),gn),window.hotkeys=gn}gn.filter=()=>!0;function Qk(e,t,n,i){n instanceof Array&&(i=n,n=void 0),i=i||[],n=n||{};const{preventDefault:s=!0}=n,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{gn.unbind(e,a)};W.useEffect(()=>(gn(e,n,a),l),[e,n,a])}const e$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const n=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",n,!0),()=>{document.removeEventListener("click",n,!0)}},[e]),t};function t$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function n$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function r$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function i$(e){const[t,n]=W.useState(e),i=(a,l)=>{n(c=>({...c,features:{...c.features,[a]:{enabled:l}}}))},s=W.useCallback((...a)=>a.every(l=>{var c;return(c=t.features[l])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const _0=W.createContext(""),o$=e=>D.jsx(_0.Provider,{value:e.value,children:e.children}),s$=()=>{const e=W.useContext(_0);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function a$(e){const[t,n]=W.useState(e),i=W.useMemo(()=>u$(t,n),[]);return{state:t,actions:{...i,set:s=>{n(typeof s=="function"?s:a=>({...a,...s}))}}}}function u$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${tt.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const l$=(e,t,n={})=>{n={timeout:200,...n};const i=W.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return W.useCallback((a,...l)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...l)},n.timeout)),a.detail%2===0&&e(a,...l)},[t,e,n.timeout])};function vt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=v$[e],a=s?typeof s=="function"?s.apply(null,n):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function xi(e){return!!e&&!!e[qt]}function Ur(e){var t;return!!e&&((function(n){if(!n||typeof n!="object")return!1;var i=Object.getPrototypeOf(n);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===m$})(e)||Array.isArray(e)||!!e[fv]||!!(!((t=e.constructor)===null||t===void 0)&&t[fv])||cf(e)||ff(e))}function Ro(e,t,n){n===void 0&&(n=!1),_i(e)===0?(n?Object.keys:gf)(e).forEach((function(i){n&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function _i(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:cf(e)?2:ff(e)?3:0}function yc(e,t){return _i(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c$(e,t){return _i(e)===2?e.get(t):e[t]}function O0(e,t,n){var i=_i(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function f$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cf(e){return h$&&e instanceof Map}function ff(e){return g$&&e instanceof Set}function Ir(e){return e.o||e.t}function df(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=y$(e);delete t[qt];for(var n=gf(t),i=0;i<n.length;i++){var s=n[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function Po(e,t){return t===void 0&&(t=!1),pf(e)||xi(e)||!Ur(e)||(_i(e)>1&&(e.set=e.add=e.clear=e.delete=d$),Object.freeze(e),t&&Ro(e,(function(n,i){return Po(i,!0)}),!0)),e}function d$(){vt(2)}function pf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rn(e){var t=w$[e];return t||vt(18,e),t}function iv(){return process.env.NODE_ENV==="production"||Si||vt(0),Si}function Kl(e,t){t&&(Rn("Patches"),e.u=[],e.s=[],e.v=t)}function ba(e){wc(e),e.p.forEach(p$),e.p=null}function wc(e){e===Si&&(Si=e.l)}function ov(e){return Si={p:[],l:Si,h:e,m:!0,_:0}}function p$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function Gl(e,t){t._=t.p.length;var n=t.p[0],i=e!==void 0&&e!==n;return t.h.O||Rn("ES5").S(t,e,i),i?(n[qt].P&&(ba(t),vt(4)),Ur(e)&&(e=xa(t,e),t.l||Sa(t,e)),t.u&&Rn("Patches").M(n[qt].t,e,t.u,t.s)):e=xa(t,n,[]),ba(t),t.u&&t.v(t.u,t.s),e!==T0?e:void 0}function xa(e,t,n){if(pf(t))return t;var i=t[qt];if(!i)return Ro(t,(function(c,f){return sv(e,i,t,c,f,n)}),!0),t;if(i.A!==e)return t;if(!i.P)return Sa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=df(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),Ro(a,(function(c,f){return sv(e,i,s,c,f,n,l)})),Sa(e,s,!1),n&&e.u&&Rn("Patches").N(i,n,e.u,e.s)}return i.o}function sv(e,t,n,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===n&&vt(5),xi(s)){var c=xa(e,s,a&&t&&t.i!==3&&!yc(t.R,i)?a.concat(i):void 0);if(O0(n,i,c),!xi(c))return;e.m=!1}else l&&n.add(s);if(Ur(s)&&!pf(s)){if(!e.h.D&&e._<1)return;xa(e,s),t&&t.A.l||Sa(e,s)}}function Sa(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Po(t,n)}function Vl(e,t){var n=e[qt];return(n?Ir(n):e)[t]}function av(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Object.getPrototypeOf(n)}}function bc(e){e.P||(e.P=!0,e.l&&bc(e.l))}function Xl(e){e.o||(e.o=df(e.t))}function xc(e,t,n){var i=cf(t)?Rn("MapSet").F(t,n):ff(t)?Rn("MapSet").T(t,n):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:iv(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,m=Sc;l&&(f=[c],m=vo);var v=Proxy.revocable(f,m),g=v.revoke,p=v.proxy;return c.k=p,c.j=g,p})(t,n):Rn("ES5").J(t,n);return(n?n.A:iv()).p.push(i),i}function A0(e){return xi(e)||vt(22,e),(function t(n){if(!Ur(n))return n;var i,s=n[qt],a=_i(n);if(s){if(!s.P&&(s.i<4||!Rn("ES5").K(s)))return s.t;s.I=!0,i=uv(n,a),s.I=!1}else i=uv(n,a);return Ro(i,(function(l,c){s&&c$(s.t,l)===c||O0(i,l,t(c))})),a===3?new Set(i):i})(e)}function uv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return df(e)}var lv,Si,hf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",h$=typeof Map<"u",g$=typeof Set<"u",cv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",T0=hf?Symbol.for("immer-nothing"):((lv={})["immer-nothing"]=!0,lv),fv=hf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=hf?Symbol.for("immer-state"):"__$immer_state",v$={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"},m$=""+Object.prototype.constructor,gf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,y$=Object.getOwnPropertyDescriptors||function(e){var t={};return gf(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},w$={},Sc={get:function(e,t){if(t===qt)return e;var n=Ir(e);if(!yc(n,t))return(function(s,a,l){var c,f=av(a,l);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,n,t);var i=n[t];return e.I||!Ur(i)?i:i===Vl(e.t,t)?(Xl(e),e.o[t]=xc(e.A.h,i,e)):i},has:function(e,t){return t in Ir(e)},ownKeys:function(e){return Reflect.ownKeys(Ir(e))},set:function(e,t,n){var i=av(Ir(e),t);if(i!=null&&i.set)return i.set.call(e.k,n),!0;if(!e.P){var s=Vl(Ir(e),t),a=s==null?void 0:s[qt];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(f$(n,s)&&(n!==void 0||yc(e.t,t)))return!0;Xl(e),bc(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Vl(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Xl(e),bc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ir(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:n[t]}},defineProperty:function(){vt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vt(12)}},vo={};Ro(Sc,(function(e,t){vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),vo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),vo.set.call(this,e,t,void 0)},vo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Sc.set.call(this,e[0],t,n,e[0])};var b$=(function(){function e(n){var i=this;this.O=cv,this.D=!0,this.produce=function(s,a,l){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var b=this;d===void 0&&(d=c);for(var h=arguments.length,S=Array(h>1?h-1:0),E=1;E<h;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[b,R].concat(S))}))}}var m;if(typeof a!="function"&&vt(6),l!==void 0&&typeof l!="function"&&vt(7),Ur(s)){var v=ov(i),g=xc(i,s,void 0),p=!0;try{m=a(g),p=!1}finally{p?ba(v):wc(v)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(d){return Kl(v,l),Gl(d,v)}),(function(d){throw ba(v),d})):(Kl(v,l),Gl(m,v))}if(!s||typeof s!="object"){if((m=a(s))===void 0&&(m=s),m===T0&&(m=void 0),i.D&&Po(m,!0),l){var w=[],x=[];Rn("Patches").M(s,m,w,x),l(w,x)}return m}vt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(m){for(var v=arguments.length,g=Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];return i.produceWithPatches(m,(function(w){return s.apply(void 0,[w].concat(g))}))};var l,c,f=i.produce(s,a,(function(m,v){l=m,c=v}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(m){return[m,l,c]})):[f,l,c]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Ur(n)||vt(8),xi(n)&&(n=A0(n));var i=ov(this),s=xc(this,n,void 0);return s[qt].C=!0,wc(i),s},t.finishDraft=function(n,i){var s=n&&n[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||vt(9),s.I&&vt(10));var a=s.A;return Kl(a,i),Gl(void 0,a)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!cv&&vt(20),this.O=n},t.applyPatches=function(n,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rn("Patches").$;return xi(n)?l(n,i):this.produce(n,(function(c){return l(c,i)}))},e})(),Zt=new b$,x$=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function S$(e){var t=W.useState(function(){return Po(typeof e=="function"?e():e,!0)}),n=t[1];return[t[0],W.useCallback(function(i){n(typeof i=="function"?x$(i):Po(i))},[])]}const E$=process.env.NODE_ENV==="development",Yl=E$&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,_$=(e,t,n)=>{const[i,s]=S$(e),a=W.useRef(null);W.useEffect(()=>{var f;return n&&(a.current=Yl==null?void 0:Yl.connect({name:n,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var m,v;(v=(m=a.current)==null?void 0:m.disconnect)==null||v.call(m)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,m)=>({...f,[m]:v=>(s(g=>{var p;l[m](g,v),(p=a.current)==null||p.send({type:l[m].name},A0(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zn(e){return typeof e=="function"}function R0(e){var t=function(i){Error.call(i),i.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Jl=R0(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
201
|
+
}`;var Se=Jp(function(){return Pe(T,le+"return "+ee).apply(n,P)});if(Se.source=ee,tl(Se))throw Se;return Se}function u_(r){return ke(r).toLowerCase()}function l_(r){return ke(r).toUpperCase()}function c_(r,o,u){if(r=ke(r),r&&(u||o===n))return ad(r);if(!r||!(o=Nt(o)))return r;var y=un(r),_=un(o),T=ud(y,_),P=ld(y,_)+1;return ir(y,T,P).join("")}function f_(r,o,u){if(r=ke(r),r&&(u||o===n))return r.slice(0,fd(r)+1);if(!r||!(o=Nt(o)))return r;var y=un(r),_=ld(y,un(o))+1;return ir(y,0,_).join("")}function d_(r,o,u){if(r=ke(r),r&&(u||o===n))return r.replace(tu,"");if(!r||!(o=Nt(o)))return r;var y=un(r),_=ud(y,un(o));return ir(y,_).join("")}function p_(r,o){var u=G,y=j;if(Ze(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}r=ke(r);var T=r.length;if(Xr(r)){var P=un(r);T=P.length}if(u>=T)return r;var I=u-Yr(y);if(I<1)return y;var z=P?ir(P,0,I).join(""):r.slice(0,I);if(_===n)return z+y;if(P&&(I+=z.length-I),nl(_)){if(r.slice(I).search(_)){var V,Y=z;for(_.global||(_=yu(_.source,ke(Pf.exec(_))+"g")),_.lastIndex=0;V=_.exec(Y);)var ee=V.index;z=z.slice(0,ee===n?I:ee)}}else if(r.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function h_(r){return r=ke(r),r&&Oy.test(r)?r.replace(Af,Uw):r}var g_=ii(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),ol=Qd("toUpperCase");function Yp(r,o,u){return r=ke(r),o=u?n:o,o===n?Nw(r)?Zw(r):Pw(r):r.match(o)||[]}var Jp=_e(function(r,o){try{return Ft(r,n,o)}catch(u){return tl(u)?u:new we(u)}}),v_=Dn(function(r,o){return Vt(o,function(u){u=bn(u),Mn(r,u,Qu(r[u],r))}),r});function m_(r){var o=r==null?0:r.length,u=pe();return r=o?Be(r,function(y){if(typeof y[1]!="function")throw new Xt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=r[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function y_(r){return Ub(Jt(r,g))}function sl(r){return function(){return r}}function w_(r,o){return r==null||r!==r?o:r}var b_=tp(),x_=tp(!0);function $t(r){return r}function al(r){return kd(typeof r=="function"?r:Jt(r,g))}function S_(r){return Id(Jt(r,g))}function E_(r,o){return Ld(r,Jt(o,g))}var __=_e(function(r,o){return function(u){return Li(u,r,o)}}),O_=_e(function(r,o){return function(u){return Li(r,u,o)}});function ul(r,o,u){var y=lt(o),_=hs(o,y);u==null&&!(Ze(o)&&(_.length||!y.length))&&(u=o,o=r,r=this,_=hs(o,lt(o)));var T=!(Ze(u)&&"chain"in u)||!!u.chain,P=jn(r);return Vt(_,function(I){var z=o[I];r[I]=z,P&&(r.prototype[I]=function(){var V=this.__chain__;if(T||V){var Y=r(this.__wrapped__),ee=Y.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:r}),Y.__chain__=V,Y}return z.apply(r,Jn([this.value()],arguments))})}),r}function A_(){return dt._===this&&(dt._=Jw),this}function ll(){}function T_(r){return r=xe(r),_e(function(o){return Md(o,r)})}var R_=zu(Be),P_=zu(nd),C_=zu(fu);function Qp(r){return Ku(r)?du(bn(r)):s1(r)}function k_(r){return function(o){return r==null?n:Or(r,o)}}var $_=rp(),I_=rp(!0);function cl(){return[]}function fl(){return!1}function L_(){return{}}function M_(){return""}function F_(){return!0}function D_(r,o){if(r=xe(r),r<1||r>te)return[];var u=Q,y=wt(r,Q);o=pe(o),r-=Q;for(var _=gu(y,o);++u<r;)o(u);return _}function N_(r){return be(r)?Be(r,bn):jt(r)?[r]:Pt(wp(ke(r)))}function j_(r){var o=++Xw;return ke(r)+o}var z_=bs(function(r,o){return r+o},0),W_=Wu("ceil"),B_=bs(function(r,o){return r/o},1),U_=Wu("floor");function H_(r){return r&&r.length?ps(r,$t,Au):n}function q_(r,o){return r&&r.length?ps(r,pe(o,2),Au):n}function Z_(r){return od(r,$t)}function K_(r,o){return od(r,pe(o,2))}function G_(r){return r&&r.length?ps(r,$t,Cu):n}function V_(r,o){return r&&r.length?ps(r,pe(o,2),Cu):n}var X_=bs(function(r,o){return r*o},1),Y_=Wu("round"),J_=bs(function(r,o){return r-o},0);function Q_(r){return r&&r.length?hu(r,$t):0}function eO(r,o){return r&&r.length?hu(r,pe(o,2)):0}return A.after=SS,A.ary=Cp,A.assign=lE,A.assignIn=Hp,A.assignInWith=Is,A.assignWith=cE,A.at=fE,A.before=kp,A.bind=Qu,A.bindAll=v_,A.bindKey=$p,A.castArray=LS,A.chain=Tp,A.chunk=U1,A.compact=H1,A.concat=q1,A.cond=m_,A.conforms=y_,A.constant=sl,A.countBy=Qx,A.create=dE,A.curry=Ip,A.curryRight=Lp,A.debounce=Mp,A.defaults=pE,A.defaultsDeep=hE,A.defer=ES,A.delay=_S,A.difference=Z1,A.differenceBy=K1,A.differenceWith=G1,A.drop=V1,A.dropRight=X1,A.dropRightWhile=Y1,A.dropWhile=J1,A.fill=Q1,A.filter=tS,A.flatMap=iS,A.flatMapDeep=oS,A.flatMapDepth=sS,A.flatten=Ep,A.flattenDeep=ex,A.flattenDepth=tx,A.flip=OS,A.flow=b_,A.flowRight=x_,A.fromPairs=nx,A.functions=xE,A.functionsIn=SE,A.groupBy=aS,A.initial=ix,A.intersection=ox,A.intersectionBy=sx,A.intersectionWith=ax,A.invert=_E,A.invertBy=OE,A.invokeMap=lS,A.iteratee=al,A.keyBy=cS,A.keys=lt,A.keysIn=kt,A.map=Ts,A.mapKeys=TE,A.mapValues=RE,A.matches=S_,A.matchesProperty=E_,A.memoize=Ps,A.merge=PE,A.mergeWith=qp,A.method=__,A.methodOf=O_,A.mixin=ul,A.negate=Cs,A.nthArg=T_,A.omit=CE,A.omitBy=kE,A.once=AS,A.orderBy=fS,A.over=R_,A.overArgs=TS,A.overEvery=P_,A.overSome=C_,A.partial=el,A.partialRight=Fp,A.partition=dS,A.pick=$E,A.pickBy=Zp,A.property=Qp,A.propertyOf=k_,A.pull=fx,A.pullAll=Op,A.pullAllBy=dx,A.pullAllWith=px,A.pullAt=hx,A.range=$_,A.rangeRight=I_,A.rearg=RS,A.reject=gS,A.remove=gx,A.rest=PS,A.reverse=Yu,A.sampleSize=mS,A.set=LE,A.setWith=ME,A.shuffle=yS,A.slice=vx,A.sortBy=xS,A.sortedUniq=Ex,A.sortedUniqBy=_x,A.split=i_,A.spread=CS,A.tail=Ox,A.take=Ax,A.takeRight=Tx,A.takeRightWhile=Rx,A.takeWhile=Px,A.tap=Hx,A.throttle=kS,A.thru=As,A.toArray=Wp,A.toPairs=Kp,A.toPairsIn=Gp,A.toPath=N_,A.toPlainObject=Up,A.transform=FE,A.unary=$S,A.union=Cx,A.unionBy=kx,A.unionWith=$x,A.uniq=Ix,A.uniqBy=Lx,A.uniqWith=Mx,A.unset=DE,A.unzip=Ju,A.unzipWith=Ap,A.update=NE,A.updateWith=jE,A.values=ai,A.valuesIn=zE,A.without=Fx,A.words=Yp,A.wrap=IS,A.xor=Dx,A.xorBy=Nx,A.xorWith=jx,A.zip=zx,A.zipObject=Wx,A.zipObjectDeep=Bx,A.zipWith=Ux,A.entries=Kp,A.entriesIn=Gp,A.extend=Hp,A.extendWith=Is,ul(A,A),A.add=z_,A.attempt=Jp,A.camelCase=HE,A.capitalize=Vp,A.ceil=W_,A.clamp=WE,A.clone=MS,A.cloneDeep=DS,A.cloneDeepWith=NS,A.cloneWith=FS,A.conformsTo=jS,A.deburr=Xp,A.defaultTo=w_,A.divide=B_,A.endsWith=qE,A.eq=cn,A.escape=ZE,A.escapeRegExp=KE,A.every=eS,A.find=nS,A.findIndex=xp,A.findKey=gE,A.findLast=rS,A.findLastIndex=Sp,A.findLastKey=vE,A.floor=U_,A.forEach=Rp,A.forEachRight=Pp,A.forIn=mE,A.forInRight=yE,A.forOwn=wE,A.forOwnRight=bE,A.get=rl,A.gt=zS,A.gte=WS,A.has=EE,A.hasIn=il,A.head=_p,A.identity=$t,A.includes=uS,A.indexOf=rx,A.inRange=BE,A.invoke=AE,A.isArguments=Rr,A.isArray=be,A.isArrayBuffer=BS,A.isArrayLike=Ct,A.isArrayLikeObject=Ye,A.isBoolean=US,A.isBuffer=or,A.isDate=HS,A.isElement=qS,A.isEmpty=ZS,A.isEqual=KS,A.isEqualWith=GS,A.isError=tl,A.isFinite=VS,A.isFunction=jn,A.isInteger=Dp,A.isLength=ks,A.isMap=Np,A.isMatch=XS,A.isMatchWith=YS,A.isNaN=JS,A.isNative=QS,A.isNil=tE,A.isNull=eE,A.isNumber=jp,A.isObject=Ze,A.isObjectLike=Ge,A.isPlainObject=zi,A.isRegExp=nl,A.isSafeInteger=nE,A.isSet=zp,A.isString=$s,A.isSymbol=jt,A.isTypedArray=si,A.isUndefined=rE,A.isWeakMap=iE,A.isWeakSet=oE,A.join=ux,A.kebabCase=GE,A.last=en,A.lastIndexOf=lx,A.lowerCase=VE,A.lowerFirst=XE,A.lt=sE,A.lte=aE,A.max=H_,A.maxBy=q_,A.mean=Z_,A.meanBy=K_,A.min=G_,A.minBy=V_,A.stubArray=cl,A.stubFalse=fl,A.stubObject=L_,A.stubString=M_,A.stubTrue=F_,A.multiply=X_,A.nth=cx,A.noConflict=A_,A.noop=ll,A.now=Rs,A.pad=YE,A.padEnd=JE,A.padStart=QE,A.parseInt=e_,A.random=UE,A.reduce=pS,A.reduceRight=hS,A.repeat=t_,A.replace=n_,A.result=IE,A.round=Y_,A.runInContext=N,A.sample=vS,A.size=wS,A.snakeCase=r_,A.some=bS,A.sortedIndex=mx,A.sortedIndexBy=yx,A.sortedIndexOf=wx,A.sortedLastIndex=bx,A.sortedLastIndexBy=xx,A.sortedLastIndexOf=Sx,A.startCase=o_,A.startsWith=s_,A.subtract=J_,A.sum=Q_,A.sumBy=eO,A.template=a_,A.times=D_,A.toFinite=zn,A.toInteger=xe,A.toLength=Bp,A.toLower=u_,A.toNumber=tn,A.toSafeInteger=uE,A.toString=ke,A.toUpper=l_,A.trim=c_,A.trimEnd=f_,A.trimStart=d_,A.truncate=p_,A.unescape=h_,A.uniqueId=j_,A.upperCase=g_,A.upperFirst=ol,A.each=Rp,A.eachRight=Pp,A.first=_p,ul(A,(function(){var r={};return yn(A,function(o,u){Fe.call(A.prototype,u)||(r[u]=o)}),r})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){A[r].placeholder=A}),Vt(["drop","take"],function(r,o){Te.prototype[r]=function(u){u=u===n?1:st(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=wt(u,y.__takeCount__):y.__views__.push({size:wt(u,Q),type:r+(y.__dir__<0?"Right":"")}),y},Te.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Vt(["filter","map","takeWhile"],function(r,o){var u=o+1,y=u==q||u==J;Te.prototype[r]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(r,o){var u="take"+(o?"Right":"");Te.prototype[r]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");Te.prototype[r]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(r){return this.filter(r).head()},Te.prototype.findLast=function(r){return this.reverse().find(r)},Te.prototype.invokeMap=_e(function(r,o){return typeof r=="function"?new Te(this):this.map(function(u){return Li(u,r,o)})}),Te.prototype.reject=function(r){return this.filter(Cs(pe(r)))},Te.prototype.slice=function(r,o){r=xe(r);var u=this;return u.__filtered__&&(r>0||o<0)?new Te(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},Te.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Te.prototype.toArray=function(){return this.take(Q)},yn(Te.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),_=A[y?"take"+(o=="last"?"Right":""):o],T=y||/^find/.test(o);_&&(A.prototype[o]=function(){var P=this.__wrapped__,I=y?[1]:arguments,z=P instanceof Te,V=I[0],Y=z||be(P),ee=function(Oe){var Re=_.apply(A,Jn([Oe],I));return y&&oe?Re[0]:Re};Y&&u&&typeof V=="function"&&V.length!=1&&(z=Y=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&Y){P=Se?P:new Te(this);var ge=r.apply(P,I);return ge.__actions__.push({func:As,args:[ee],thisArg:n}),new Yt(ge,oe)}return he&&Se?r.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(r){var o=Jo[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",y=/^(?:pop|shift)$/.test(r);A.prototype[r]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(be(T)?T:[],_)}return this[u](function(P){return o.apply(be(P)?P:[],_)})}}),yn(Te.prototype,function(r,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ti,y)||(ti[y]=[]),ti[y].push({name:o,func:u})}}),ti[ws(n,h).name]=[{name:"wrapper",func:n}],Te.prototype.clone=hb,Te.prototype.reverse=gb,Te.prototype.value=vb,A.prototype.at=qx,A.prototype.chain=Zx,A.prototype.commit=Kx,A.prototype.next=Gx,A.prototype.plant=Xx,A.prototype.reverse=Yx,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=Jx,A.prototype.first=A.prototype.head,Ti&&(A.prototype[Ti]=Vx),A}),Jr=Kw();br?((br.exports=Jr)._=Jr,au._=Jr):dt._=Jr}).call(mk)})(ho,ho.exports)),ho.exports}var tt=yk();const mc={FdSave:et.FdSave,FdWarningDanger:et.FdWarningDanger,FdInfoCircle:et.FdInfoCircle,FdInfoBold:et.FdInfoBold};var af=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(af||{}),jr=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(jr||{}),di=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(di||{});const h0={[jr.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[jr.DANGER]:{icon:"red-500",button:"primary-dark"},[jr.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Ul=({color:e=jr.PRIMARY,variant:t="solid",children:n,autoFocus:i,...s})=>{const a=h0[e].button,l=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:nt("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:n})},wk=({name:e,color:t=jr.PRIMARY,className:n="w-8 h-8"})=>{const i=mc[e]||mc.FdInfoCircle,s=`text-${h0[t].icon}`;return D.jsx(i,{className:nt(n,s)})},bk=({id:e,title:t,message:n,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:m=!0,container:v,onClose:g,onEdit:p})=>{const w=b=>{g({id:e,reason:b})};W.useEffect(()=>{function b(h){h.key==="Escape"&&w(di.CANCELED)}return window.addEventListener("keyup",b),()=>{window.removeEventListener("keyup",b)}},[]);const x=tt.merge(tt.values(c==null?void 0:c.toggles).flatMap(b=>b.value?b.warnings||[]:[]),c==null?void 0:c.tips),d=(b,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=tt.cloneDeep(c);(E=S.toggles)!=null&&E[b]&&(S.toggles[b].value=h),p({id:e,views:S})};return Lo.createPortal(D.jsx(va,{appear:!0,show:!0,as:W.Fragment,children:D.jsx("div",{className:nt("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":m}),style:{zIndex:l},onClick:()=>w(di.CANCELED),children:D.jsx(va.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:b=>b.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(wk,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(xk,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:n}),D.jsx("div",{className:"text-xs text-white",children:tt.values(c==null?void 0:c.toggles).map(b=>D.jsx("div",{children:D.jsxs("label",{htmlFor:b.key,className:"flex items-center",children:[D.jsx(Qm,{size:"xs",value:b.value,onChange:h=>d(b.key,h)}),D.jsx("span",{className:"ml-1",children:b.title})]})},b.key))}),D.jsx(Sk,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===af.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(Ul,{autoFocus:!0,color:a,onClick:()=>w(di.CONFIRMED),children:"Confirm"}),D.jsx(Ul,{color:a,variant:"outlined",onClick:()=>w(di.CANCELED),children:"Cancel"})]}):D.jsx(Ul,{autoFocus:!0,onClick:()=>w(),children:"OK"})})]})})})})}),v||document.body)},xk=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,Sk=e=>e.warnings?D.jsx(va,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,n)=>D.jsx(va.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(et.FdWarningDanger,{className:nt({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${n}`))})}):null;var g0=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(g0||{});const Ek=({zoom:e,minZoom:t=.5,maxZoom:n=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(et.FdMinusNaked,{onClick:s,className:nt("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(et.FdPlusNaked,{onClick:i,className:nt("h-5 w-5 p-1",{"text-grey-200":e>=n,"cursor-pointer rounded hover:bg-purple-800":e<n})})]}),_k=$.forwardRef(((e,t)=>$.createElement(mr.span,Xe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),Ok=_k;function tv(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[v0]=Wc("Tooltip",[Ia]),uf=Ia(),Ak=700,[RL,Tk]=v0("TooltipProvider",{isOpenDelayed:!0,delayDuration:Ak,onOpen:()=>{},onClose:()=>{}}),[Rk,ja]=v0("Tooltip"),Pk=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=Tk("Tooltip",t),f=uf(t),[m,v]=$.useState(null),g=vm(),p=$.useRef(0),w=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:b}=c,[h=!1,S]=Rm({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>h?x.current?"delayed-open":"instant-open":"closed"),[h]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),w)}),[w,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Om,f,$.createElement(Rk,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:m,onTriggerChange:v,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),b()}),[S,b])},n))},Ck=$.forwardRef(((e,t)=>{const{__scopeTooltip:n,...i}=e,s=ja("TooltipTrigger",n),a=uf(n),l=vr(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Am,Xe({asChild:!0},a),$.createElement(mr.button,Xe({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Ut(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Ut(e.onMouseLeave,s.onClose),onMouseDown:Ut(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Ut(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Ut(e.onBlur,s.onClose),onClick:Ut(e.onClick,(m=>{m.detail===0&&s.onClose()}))})))})),kk=$.forwardRef(((e,t)=>{const{forceMount:n,...i}=e,s=ja("TooltipContent",e.__scopeTooltip);return $.createElement(jc,{present:n||s.open},$.createElement($k,Xe({ref:t},i)))})),$k=$.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=ja("TooltipContent",n),f=uf(n),m=a?zc:$.Fragment,{onClose:v}=c;return bm((()=>v())),$.useEffect((()=>(document.addEventListener("tooltip.open",v),()=>document.removeEventListener("tooltip.open",v))),[v]),$.createElement(m,null,$.createElement(Ik,{__scopeTooltip:n}),$.createElement(Tm,Xe({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(wm,null,i),$.createElement(Ok,{id:c.contentId,role:"tooltip"},s||i)))}));function Ik(e){const{__scopeTooltip:t}=e,n=ja("CheckTriggerMoved",t),i=Sm(n.trigger),s=i==null?void 0:i.left,a=tv(s),l=i==null?void 0:i.top,c=tv(l),f=n.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const Lk=Pk,Mk=Ck,Fk=kk;function Dk(e){return D.jsxs(Lk,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(Mk,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(Fk,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const $r=30,la=500,Nk=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),jk=e=>{const[t,n]=W.useState($r),i=W.useRef(),s=t>$r,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&n(la),!e.isOpen&&s&&n($r)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(iO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:$r,onResizeStart:()=>{i.current&&Date.now()-i.current<200?n(s?$r:la):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var m;(m=e.onResize)==null||m.call(e),a.current=null})},onResizeStop:(l,c,f,m)=>{n(t+m.height)},handleComponent:{top:D.jsx(Nk,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${tt.kebabCase(e.path)}`,children:[D.jsxs("div",{className:nt("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(Wm,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(n($r),e.onClose()):(n(la),e.onOpen())},children:s?D.jsx(et.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(et.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(oa,{of:s,children:[D.jsx(oa,{of:e.render,children:e.render}),D.jsx(oa,{of:!e.render,children:e.children})]})]})]})};function m0({children:e,viewBox:t="0 0 24 24",...n}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...n,children:e})}function y0(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(m0,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function zk({isChecked:e,isIndeterminate:t,isInvalid:n,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),m=i||D.jsx(y0,{}),v=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=v||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:l,"data-invalid":n,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:v,...c,"aria-invalid":n||void 0}),D.jsx("span",{className:"base-checkbox-control",children:g&&m&&W.cloneElement(m,{isChecked:v,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}function Wk(e,t){const n=W.useRef(!1);W.useEffect(()=>{if(n.current)return e();n.current=!0},t)}const Hl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function ql(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on".concat(t),n)}function co(e,t,n,i){e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on".concat(t),n)}function w0(e,t){const n=t.slice(0,t.length-1);for(let i=0;i<n.length;i++)n[i]=e[n[i].toLowerCase()];return n}function b0(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let n=t.lastIndexOf("");for(;n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function Bk(e,t){const n=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<n.length;a++)i.indexOf(n[a])===-1&&(s=!1);return s}const Ao={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,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,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,"-":Hl?173:189,"=":Hl?61:187,";":Hl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},vn={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},go={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},gt={16:!1,18:!1,17:!1,91:!1},Ke={};for(let e=1;e<20;e++)Ao["f".concat(e)]=111+e;let He=[],Eo=null,x0="all";const Un=new Map,Ei=e=>Ao[e.toLowerCase()]||vn[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),Uk=e=>Object.keys(Ao).find(t=>Ao[t]===e),Hk=e=>Object.keys(vn).find(t=>vn[t]===e);function S0(e){x0=e||"all"}function To(){return x0||"all"}function qk(){return He.slice(0)}function Zk(){return He.map(e=>Uk(e)||Hk(e)||String.fromCharCode(e))}function Kk(){const e=[];return Object.keys(Ke).forEach(t=>{Ke[t].forEach(n=>{let{key:i,scope:s,mods:a,shortcut:l}=n;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>Ei(c))})})}),e}function Gk(e){const t=e.target||e.srcElement,{tagName:n}=t;let i=!0;const s=n==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(i=!1),i}function Vk(e){return typeof e=="string"&&(e=Ei(e)),He.indexOf(e)!==-1}function Xk(e,t){let n,i;e||(e=To());for(const s in Ke)if(Object.prototype.hasOwnProperty.call(Ke,s))for(n=Ke[s],i=0;i<n.length;)n[i].scope===e?n.splice(i,1).forEach(l=>{let{element:c}=l;return lf(c)}):i++;To()===e&&S0(t||"all")}function Yk(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=Ei(e.key));const n=He.indexOf(t);if(n>=0&&He.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&He.splice(0,He.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in vn)vn[i]===t&&(gn[i]=!1)}}function E0(e){if(typeof e>"u")Object.keys(Ke).forEach(s=>{Array.isArray(Ke[s])&&Ke[s].forEach(a=>Ys(a)),delete Ke[s]}),lf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&Ys(s)});else if(typeof e=="object")e.key&&Ys(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let[s,a]=n;typeof s=="function"&&(a=s,s=""),Ys({key:e,scope:s,method:a,splitKey:"+"})}}const Ys=e=>{let{key:t,scope:n,method:i,splitKey:s="+"}=e;b0(t).forEach(l=>{const c=l.split(s),f=c.length,m=c[f-1],v=m==="*"?"*":Ei(m);if(!Ke[v])return;n||(n=To());const g=f>1?w0(vn,c):[],p=[];Ke[v]=Ke[v].filter(w=>{const d=(i?w.method===i:!0)&&w.scope===n&&Bk(w.mods,g);return d&&p.push(w.element),!d}),p.forEach(w=>lf(w))})};function nv(e,t,n,i){if(t.element!==i)return;let s;if(t.scope===n||t.scope==="all"){s=t.mods.length>0;for(const a in gt)Object.prototype.hasOwnProperty.call(gt,a)&&(!gt[a]&&t.mods.indexOf(+a)>-1||gt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!gt[16]&&!gt[18]&&!gt[17]&&!gt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(He),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function rv(e,t){const n=Ke["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!gn.filter.call(this,e))return;if((i===93||i===224)&&(i=91),He.indexOf(i)===-1&&i!==229&&He.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=go[c];e[c]&&He.indexOf(f)===-1?He.push(f):!e[c]&&He.indexOf(f)>-1?He.splice(He.indexOf(f),1):c==="metaKey"&&e[c]&&(He=He.filter(m=>m in go||m===i))}),i in gt){gt[i]=!0;for(const c in vn)if(Object.prototype.hasOwnProperty.call(vn,c)){const f=go[vn[c]];gn[c]=e[f]}if(!n)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[go[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(He.indexOf(17)===-1&&He.push(17),He.indexOf(18)===-1&&He.push(18),gt[17]=!0,gt[18]=!0);const s=To();if(n)for(let c=0;c<n.length;c++)n[c].scope===s&&(e.type==="keydown"&&n[c].keydown||e.type==="keyup"&&n[c].keyup)&&nv(e,n[c],s,t);if(!(i in Ke))return;const a=Ke[i],l=a.length;for(let c=0;c<l;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:m}=f,v=f.key.split(m),g=[];for(let p=0;p<v.length;p++)g.push(Ei(v[p]));g.sort().join("")===He.sort().join("")&&nv(e,f,s,t)}}function gn(e,t,n){He=[];const i=b0(e);let s=[],a="all",l=document,c=0,f=!1,m=!0,v="+",g=!1,p=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(l=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(v=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&E0(e,a);c<i.length;c++)e=i[c].split(v),s=[],e.length>1&&(s=w0(vn,e)),e=e[e.length-1],e=e==="*"?"*":Ei(e),e in Ke||(Ke[e]=[]),Ke[e].push({keyup:f,keydown:m,scope:a,mods:s,shortcut:i[c],method:n,key:i[c],splitKey:v,element:l});if(typeof l<"u"&&window){if(!Un.has(l)){const w=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return rv(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;rv(d,l),Yk(d)};Un.set(l,{keydownListener:w,keyupListenr:x,capture:g}),ql(l,"keydown",w,g),ql(l,"keyup",x,g)}if(!Eo){const w=()=>{He=[]};Eo={listener:w,capture:g},ql(window,"focus",w,g)}}}function Jk(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ke).forEach(n=>{Ke[n].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function lf(e){const t=Object.values(Ke).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Un.get(e)||{};i&&s&&(co(e,"keyup",s,a),co(e,"keydown",i,a),Un.delete(e))}if((t.length<=0||Un.size<=0)&&(Object.keys(Un).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Un.get(s)||{};a&&l&&(co(s,"keyup",l,c),co(s,"keydown",a,c),Un.delete(s))}),Un.clear(),Object.keys(Ke).forEach(s=>delete Ke[s]),Eo)){const{listener:s,capture:a}=Eo;co(window,"focus",s,a),Eo=null}}const Zl={getPressedKeyString:Zk,setScope:S0,getScope:To,deleteScope:Xk,getPressedKeyCodes:qk,getAllKeyCodes:Kk,isPressed:Vk,filter:Gk,trigger:Jk,unbind:E0,keyMap:Ao,modifier:vn,modifierMap:go};for(const e in Zl)Object.prototype.hasOwnProperty.call(Zl,e)&&(gn[e]=Zl[e]);if(typeof window<"u"){const e=window.hotkeys;gn.noConflict=t=>(t&&window.hotkeys===gn&&(window.hotkeys=e),gn),window.hotkeys=gn}gn.filter=()=>!0;function Qk(e,t,n,i){n instanceof Array&&(i=n,n=void 0),i=i||[],n=n||{};const{preventDefault:s=!0}=n,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{gn.unbind(e,a)};W.useEffect(()=>(gn(e,n,a),l),[e,n,a])}const e$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const n=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",n,!0),()=>{document.removeEventListener("click",n,!0)}},[e]),t};function t$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function n$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function r$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function i$(e){const[t,n]=W.useState(e),i=(a,l)=>{n(c=>({...c,features:{...c.features,[a]:{enabled:l}}}))},s=W.useCallback((...a)=>a.every(l=>{var c;return(c=t.features[l])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const _0=W.createContext(""),o$=e=>D.jsx(_0.Provider,{value:e.value,children:e.children}),s$=()=>{const e=W.useContext(_0);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function a$(e){const[t,n]=W.useState(e),i=W.useMemo(()=>u$(t,n),[]);return{state:t,actions:{...i,set:s=>{n(typeof s=="function"?s:a=>({...a,...s}))}}}}function u$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${tt.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const l$=(e,t,n={})=>{n={timeout:200,...n};const i=W.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return W.useCallback((a,...l)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...l)},n.timeout)),a.detail%2===0&&e(a,...l)},[t,e,n.timeout])};function vt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=v$[e],a=s?typeof s=="function"?s.apply(null,n):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function xi(e){return!!e&&!!e[qt]}function Ur(e){var t;return!!e&&((function(n){if(!n||typeof n!="object")return!1;var i=Object.getPrototypeOf(n);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===m$})(e)||Array.isArray(e)||!!e[fv]||!!(!((t=e.constructor)===null||t===void 0)&&t[fv])||cf(e)||ff(e))}function Ro(e,t,n){n===void 0&&(n=!1),_i(e)===0?(n?Object.keys:gf)(e).forEach((function(i){n&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function _i(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:cf(e)?2:ff(e)?3:0}function yc(e,t){return _i(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c$(e,t){return _i(e)===2?e.get(t):e[t]}function O0(e,t,n){var i=_i(e);i===2?e.set(t,n):i===3?e.add(n):e[t]=n}function f$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cf(e){return h$&&e instanceof Map}function ff(e){return g$&&e instanceof Set}function Ir(e){return e.o||e.t}function df(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=y$(e);delete t[qt];for(var n=gf(t),i=0;i<n.length;i++){var s=n[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function Po(e,t){return t===void 0&&(t=!1),pf(e)||xi(e)||!Ur(e)||(_i(e)>1&&(e.set=e.add=e.clear=e.delete=d$),Object.freeze(e),t&&Ro(e,(function(n,i){return Po(i,!0)}),!0)),e}function d$(){vt(2)}function pf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rn(e){var t=w$[e];return t||vt(18,e),t}function iv(){return process.env.NODE_ENV==="production"||Si||vt(0),Si}function Kl(e,t){t&&(Rn("Patches"),e.u=[],e.s=[],e.v=t)}function ba(e){wc(e),e.p.forEach(p$),e.p=null}function wc(e){e===Si&&(Si=e.l)}function ov(e){return Si={p:[],l:Si,h:e,m:!0,_:0}}function p$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function Gl(e,t){t._=t.p.length;var n=t.p[0],i=e!==void 0&&e!==n;return t.h.O||Rn("ES5").S(t,e,i),i?(n[qt].P&&(ba(t),vt(4)),Ur(e)&&(e=xa(t,e),t.l||Sa(t,e)),t.u&&Rn("Patches").M(n[qt].t,e,t.u,t.s)):e=xa(t,n,[]),ba(t),t.u&&t.v(t.u,t.s),e!==T0?e:void 0}function xa(e,t,n){if(pf(t))return t;var i=t[qt];if(!i)return Ro(t,(function(c,f){return sv(e,i,t,c,f,n)}),!0),t;if(i.A!==e)return t;if(!i.P)return Sa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=df(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),Ro(a,(function(c,f){return sv(e,i,s,c,f,n,l)})),Sa(e,s,!1),n&&e.u&&Rn("Patches").N(i,n,e.u,e.s)}return i.o}function sv(e,t,n,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===n&&vt(5),xi(s)){var c=xa(e,s,a&&t&&t.i!==3&&!yc(t.R,i)?a.concat(i):void 0);if(O0(n,i,c),!xi(c))return;e.m=!1}else l&&n.add(s);if(Ur(s)&&!pf(s)){if(!e.h.D&&e._<1)return;xa(e,s),t&&t.A.l||Sa(e,s)}}function Sa(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Po(t,n)}function Vl(e,t){var n=e[qt];return(n?Ir(n):e)[t]}function av(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=Object.getPrototypeOf(n)}}function bc(e){e.P||(e.P=!0,e.l&&bc(e.l))}function Xl(e){e.o||(e.o=df(e.t))}function xc(e,t,n){var i=cf(t)?Rn("MapSet").F(t,n):ff(t)?Rn("MapSet").T(t,n):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:iv(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,m=Sc;l&&(f=[c],m=vo);var v=Proxy.revocable(f,m),g=v.revoke,p=v.proxy;return c.k=p,c.j=g,p})(t,n):Rn("ES5").J(t,n);return(n?n.A:iv()).p.push(i),i}function A0(e){return xi(e)||vt(22,e),(function t(n){if(!Ur(n))return n;var i,s=n[qt],a=_i(n);if(s){if(!s.P&&(s.i<4||!Rn("ES5").K(s)))return s.t;s.I=!0,i=uv(n,a),s.I=!1}else i=uv(n,a);return Ro(i,(function(l,c){s&&c$(s.t,l)===c||O0(i,l,t(c))})),a===3?new Set(i):i})(e)}function uv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return df(e)}var lv,Si,hf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",h$=typeof Map<"u",g$=typeof Set<"u",cv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",T0=hf?Symbol.for("immer-nothing"):((lv={})["immer-nothing"]=!0,lv),fv=hf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=hf?Symbol.for("immer-state"):"__$immer_state",v$={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"},m$=""+Object.prototype.constructor,gf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,y$=Object.getOwnPropertyDescriptors||function(e){var t={};return gf(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},w$={},Sc={get:function(e,t){if(t===qt)return e;var n=Ir(e);if(!yc(n,t))return(function(s,a,l){var c,f=av(a,l);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,n,t);var i=n[t];return e.I||!Ur(i)?i:i===Vl(e.t,t)?(Xl(e),e.o[t]=xc(e.A.h,i,e)):i},has:function(e,t){return t in Ir(e)},ownKeys:function(e){return Reflect.ownKeys(Ir(e))},set:function(e,t,n){var i=av(Ir(e),t);if(i!=null&&i.set)return i.set.call(e.k,n),!0;if(!e.P){var s=Vl(Ir(e),t),a=s==null?void 0:s[qt];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(f$(n,s)&&(n!==void 0||yc(e.t,t)))return!0;Xl(e),bc(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Vl(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Xl(e),bc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ir(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:n[t]}},defineProperty:function(){vt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vt(12)}},vo={};Ro(Sc,(function(e,t){vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),vo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),vo.set.call(this,e,t,void 0)},vo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Sc.set.call(this,e[0],t,n,e[0])};var b$=(function(){function e(n){var i=this;this.O=cv,this.D=!0,this.produce=function(s,a,l){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var b=this;d===void 0&&(d=c);for(var h=arguments.length,S=Array(h>1?h-1:0),E=1;E<h;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[b,R].concat(S))}))}}var m;if(typeof a!="function"&&vt(6),l!==void 0&&typeof l!="function"&&vt(7),Ur(s)){var v=ov(i),g=xc(i,s,void 0),p=!0;try{m=a(g),p=!1}finally{p?ba(v):wc(v)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(d){return Kl(v,l),Gl(d,v)}),(function(d){throw ba(v),d})):(Kl(v,l),Gl(m,v))}if(!s||typeof s!="object"){if((m=a(s))===void 0&&(m=s),m===T0&&(m=void 0),i.D&&Po(m,!0),l){var w=[],x=[];Rn("Patches").M(s,m,w,x),l(w,x)}return m}vt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(m){for(var v=arguments.length,g=Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];return i.produceWithPatches(m,(function(w){return s.apply(void 0,[w].concat(g))}))};var l,c,f=i.produce(s,a,(function(m,v){l=m,c=v}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(m){return[m,l,c]})):[f,l,c]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Ur(n)||vt(8),xi(n)&&(n=A0(n));var i=ov(this),s=xc(this,n,void 0);return s[qt].C=!0,wc(i),s},t.finishDraft=function(n,i){var s=n&&n[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||vt(9),s.I&&vt(10));var a=s.A;return Kl(a,i),Gl(void 0,a)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!cv&&vt(20),this.O=n},t.applyPatches=function(n,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rn("Patches").$;return xi(n)?l(n,i):this.produce(n,(function(c){return l(c,i)}))},e})(),Zt=new b$,x$=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function S$(e){var t=W.useState(function(){return Po(typeof e=="function"?e():e,!0)}),n=t[1];return[t[0],W.useCallback(function(i){n(typeof i=="function"?x$(i):Po(i))},[])]}const E$=process.env.NODE_ENV==="development",Yl=E$&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,_$=(e,t,n)=>{const[i,s]=S$(e),a=W.useRef(null);W.useEffect(()=>{var f;return n&&(a.current=Yl==null?void 0:Yl.connect({name:n,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var m,v;(v=(m=a.current)==null?void 0:m.disconnect)==null||v.call(m)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,m)=>({...f,[m]:v=>(s(g=>{var p;l[m](g,v),(p=a.current)==null||p.send({type:l[m].name},A0(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zn(e){return typeof e=="function"}function R0(e){var t=function(i){Error.call(i),i.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Jl=R0(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
202
202
|
`+n.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
|
203
203
|
`):"",this.name="UnsubscriptionError",this.errors=n}});function Ec(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var za=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,i,s,a;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=oc(l),f=c.next();!f.done;f=c.next()){var m=f.value;m.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}else l.remove(this);var v=this.initialTeardown;if(Zn(v))try{v()}catch(d){a=d instanceof Jl?d.errors:[d]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var p=oc(g),w=p.next();!w.done;w=p.next()){var x=w.value;try{dv(x)}catch(d){a=a??[],d instanceof Jl?a=ha(ha([],sc(a)),sc(d.errors)):a.push(d)}}}catch(d){i={error:d}}finally{try{w&&!w.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}if(a)throw new Jl(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)dv(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Ec(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ec(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),P0=za.EMPTY;function C0(e){return e instanceof za||e&&"closed"in e&&Zn(e.remove)&&Zn(e.add)&&Zn(e.unsubscribe)}function dv(e){Zn(e)?e():e.unsubscribe()}var O$={Promise:void 0},A$={setTimeout:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,ha([e,t],sc(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function T$(e){A$.setTimeout(function(){throw e})}function pv(){}function ca(e){e()}var k0=(function(e){ka(t,e);function t(n){var i=e.call(this)||this;return i.isStopped=!1,n?(i.destination=n,C0(n)&&n.add(i)):i.destination=C$,i}return t.create=function(n,i,s){return new _c(n,i,s)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},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(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(za),R$=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(i){Js(i)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(i){Js(i)}else Js(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Js(n)}},e})(),_c=(function(e){ka(t,e);function t(n,i,s){var a=e.call(this)||this,l;return Zn(n)||!n?l={next:n??void 0,error:i??void 0,complete:s??void 0}:l=n,a.destination=new R$(l),a}return t})(k0);function Js(e){T$(e)}function P$(e){throw e}var C$={closed:!0,next:pv,error:P$,complete:pv},k$=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function $$(e){return e}function I$(e){return e.length===0?$$:e.length===1?e[0]:function(n){return e.reduce(function(i,s){return s(i)},n)}}var hv=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,i){var s=this,a=M$(t)?t:new _c(t,n,i);return ca(function(){var l=s,c=l.operator,f=l.source;a.add(c?c.call(a,f):f?s._subscribe(a):s._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var i=this;return n=gv(n),new n(function(s,a){var l=new _c({next:function(c){try{t(c)}catch(f){a(f),l.unsubscribe()}},error:a,complete:s});i.subscribe(l)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[k$]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return I$(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=gv(t),new t(function(i,s){var a;n.subscribe(function(l){return a=l},function(l){return s(l)},function(){return i(a)})})},e.create=function(t){return new e(t)},e})();function gv(e){var t;return(t=e??O$.Promise)!==null&&t!==void 0?t:Promise}function L$(e){return e&&Zn(e.next)&&Zn(e.error)&&Zn(e.complete)}function M$(e){return e&&e instanceof k0||L$(e)&&C0(e)}var F$=R0(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),kn=(function(e){ka(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var i=new vv(this,this);return i.operator=n,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new F$},t.prototype.next=function(n){var i=this;ca(function(){var s,a;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=oc(i.currentObservers),c=l.next();!c.done;c=l.next()){var f=c.value;f.next(n)}}catch(m){s={error:m}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}}})},t.prototype.error=function(n){var i=this;ca(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=n;for(var s=i.observers;s.length;)s.shift().error(n)}})},t.prototype.complete=function(){var n=this;ca(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var i=n.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var i=this,s=this,a=s.hasError,l=s.isStopped,c=s.observers;return a||l?P0:(this.currentObservers=null,c.push(n),new za(function(){i.currentObservers=null,Ec(c,n)}))},t.prototype._checkFinalizedStatuses=function(n){var i=this,s=i.hasError,a=i.thrownError,l=i.isStopped;s?n.error(a):l&&n.complete()},t.prototype.asObservable=function(){var n=new hv;return n.source=this,n},t.create=function(n,i){return new vv(n,i)},t})(hv),vv=(function(e){ka(t,e);function t(n,i){var s=e.call(this)||this;return s.destination=n,s.source=i,s}return t.prototype.next=function(n){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,n)},t.prototype.error=function(n){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,n)},t.prototype.complete=function(){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||i===void 0||i.call(n)},t.prototype._subscribe=function(n){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(n))!==null&&s!==void 0?s:P0},t})(kn),$0=(e=>(e.RELOAD="reload",e.RECOMPUTE="recompute",e))($0||{}),I0=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(I0||{});const D$=new kn,N$=new kn,L0=new kn;var M0=(e=>(e.SAVE_ALL="save-all",e))(M0||{});const j$=new kn;var F0=(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))(F0||{});const z$=new kn;var D0=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(D0||{});const W$=new kn,B$=new kn;var Co=(e=>(e.EVENT_STARTED="event-started",e.EVENT_ENDED="event-ended",e.EVENT_EMITED="event-emited",e.REQUEST_SENT="request-sent",e))(Co||{});const Ea=new kn,U$=new kn,vf=31;var mf=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${vf} characters`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(mf||{});function N0(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>vf)throw new Error(mf.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 H$(e){if(!e)return null;if(typeof e=="string")try{N0(e)}catch(t){return t.message}}function q$(e,t){let n="";if(["array","object"].includes(t))try{const i=JSON.parse(e);t==="array"&&(!Array.isArray(i)||!tt.isObject(i))&&(n=`Invalid value for type ${t}`),t==="object"&&(!tt.isObject(i)||Array.isArray(i))&&(n=`Invalid value for type ${t}`)}catch{n=`Invalid value for type ${t}`}return t==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(n=`Invalid value for type ${t}`)),t==="number"&&isNaN(+e)&&(n=`Invalid value for type ${t}`),["boolean","bool"].includes(t)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(n=`Invalid value for type ${t}`),n}function Z$(){return{PLACEHOLDER_PREFIX:`@!MASK_${Date.now().toString(36)+Math.random().toString(36).substring(2,8)}_`,counter:0}}function Wa(e){const{PLACEHOLDER_PREFIX:t,counter:n}=Z$();let i=n;const s=[],a="@!",l=v=>(s.push(v),`${t}${i++}${a}`);let c=e.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,l);c=c.replace(/([\{\s]\s*\w+\s*)(:\s*\d+)/g,(v,g,p)=>g+l(p)),c=c.replace(/:\d{2}:\d{2}/g,l);const f=new RegExp(":(?!4D\\.\\w+)[CPK]?\\d+","g");let m=c.replace(f,"");for(let v=0;v<s.length;v++){const p=`${t}${v}${a}`.replace(/([.*+?^${}()|[\]\\])/g,"\\$1"),w=new RegExp(p,"g");m=m.replace(w,s[v])}return m}var yf=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(yf||{});const pr={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var ft=(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.LOCALIZATION="localization",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(ft||{}),yr=(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))(yr||{}),wf=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(wf||{});const j0="roles.json",z0="qodlyApp.json",K$="model.4DModel",W0="HTTPHandlers.json",B0="Shared/i18n.json";function G$(e){const t=bf(e);switch(t){case ft.SETTINGS:return{filename:"Settings",type:t};case ft.HTTP_HANDLERS:return{filename:"HTTP Handlers",type:t};case ft.ROLES:return{filename:"Roles & Privileges",type:t};case ft.LOCALIZATION:return{filename:"Localization",type:t};case ft.MODEL:return{filename:"Model",type:t};default:{const n=e.split("/"),[i]=n[1].split(".");return{filename:i,type:t}}}}function bf(e){const t=e.split("."),n=t.pop(),i=t.join(".").split("/")[0];switch(!0){case n==="4DModel":return ft.MODEL;case n==="WebForm":return ft.WEBFORM;case(["4dm","4qs","4qm"].includes(n)&&i===pr.METHODS):return ft.METHOD;case(["4dm","4qs","4qm"].includes(n)&&i===pr.CLASSES):return ft.CLASS;case e===j0:return ft.ROLES;case e===W0:return ft.HTTP_HANDLERS;case e===z0:return ft.SETTINGS;case e===B0:return ft.LOCALIZATION;default:return ft.TEXT}}function V$(e,t=!1){switch(e){case pr.REPORTS:case"report":return"QoDoc";case pr.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case pr.CLASSES:case pr.METHODS:return t?"4qs":"4dm";default:return""}}function X$(e,t=""){const n=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return n?n[1]:t}class U0{constructor(){this.current=Promise.resolve()}lock(){let t;const n=new Promise(s=>{t=s}),i=this.current.then(()=>t);return this.current=n,i}}function xf(){const e=new U0;return async t=>{const n=await e.lock();try{const i=await t();return n(),i}catch(i){console.error(i),n();return}}}const H0=tt.curry((e,t,n)=>e&&tt.get(n,e)===t),Y$=tt.curry((e,t,n)=>tt.get(n,e)!==t),J$=tt.curry((e,t)=>tt.get(t,"id")!==e),Q$=tt.curry((e,t)=>tt.get(t,"id")===e),eI=tt.curry((e,t)=>tt.get(t,"path")===e);function tI(e="id",t,n){return n.findIndex(H0(e,t))!==-1}function nI(e){if(!e)return"";const{id:t,namespace:n}=e;return n&&t?`${n}:${t}`:t}function q0(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function rI(e){return e.type==="object"}function Z0(e){var t;return e.kind==="relatedEntities"||((t=e.type)==null?void 0:t.includes("Selection"))||e.behavior==="relatedEntities"}function K0(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!q0(e)}function iI(e){return Z0(e)||K0(e)}function oI(e){return e.applyTo==="dataStore"}function sI(e){return e.applyTo==="dataClass"}function aI(e){return e.applyTo==="entity"}function uI(e){return e.applyTo==="entityCollection"}function lI(e){return e.type==="entity"}function cI(e){return e.type==="entitysel"}function G0(e){return e.dataType==="array"}function V0(e){return e.dataType==="object"}function X0(e){return e.type==="scalar"}function fI(e){return G0(e)||V0(e)||X0(e)}const dI=e=>e!=null&&e.type==="entity",pI=e=>e.type==="entitysel",hI=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",gI=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",vI=e=>e.type==="scalar"&&e.dataType==="date";function mI(){return new Promise((e,t)=>{window.addEventListener("bundle:ready",n=>n.data?e():t(n.caughtErr))})}function yI(){return new Promise(e=>{window.addEventListener("i18n:ready",()=>e())})}var ko=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(ko||{}),Y0=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(Y0||{}),Sf=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Sf||{});const wI={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function bI(e){var a;let t={};try{const l=((a=e.match(/\/\/%attributes = (.*)/))==null?void 0:a[1])||"";t=JSON.parse(l)}catch{}const{published4DMobile:n,...i}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:ko.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!n,publishedRestOptions:n||{table:"",scope:Sf.table}},...i}}function J0(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[ko.capable,ko.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 xI(e,t,n=!1){const i=tt.isString(t)?t:J0(t);if(!n&&Q0(e))return e;const s=ey(e);return`//%attributes = ${i}\r
|
|
204
204
|
${s}`}function Q0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function ey(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const SI=()=>Dc.uuid().replaceAll("-","").toUpperCase(),it="/rest/$designer",Wo="/rest/$designer-ext";function EI(...e){return t=>{if(e.length===0)return t;const n={...t};return e.forEach(i=>{typeof n[i]=="string"&&(n[i]=new Date(n[i]))}),n}}class Oc extends Error{constructor(t,n,i){super(),this.url=t,this.response=n,this.data=i}log(){console.error("Error while sending the request",this)}}async function Me(e,t){var s;Ea.next({action:Co.REQUEST_SENT});const n=await window.fetch(e,t);if(/401/.test(n.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(n.status.toString())){let a;try{const l=await n.json();((s=l==null?void 0:l.__ERROR)==null?void 0:s.some(f=>f.errCode===1651))&&Ea.next({action:Co.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),a=new Oc(e,n,l)}catch{a=new Oc(e,n)}throw a.log(),a}return await n.json()}function _I(e){return Ea.next({action:Co.REQUEST_SENT}),e}var Sn={},ht={},mv;function Mr(){if(mv)return ht;mv=1;var e=ht.ValidationError=function(d,b,h,S,E,R){if(Array.isArray(S)?(this.path=S,this.property=S.reduce(function(k,U){return k+c(U)},"instance")):S!==void 0&&(this.property=S),d&&(this.message=d),h){var O=h.$id||h.id;this.schema=O||h}b!==void 0&&(this.instance=b),this.name=E,this.argument=R,this.stack=this.toString()};e.prototype.toString=function(){return this.property+" "+this.message};var t=ht.ValidatorResult=function(d,b,h,S){this.instance=d,this.schema=b,this.options=h,this.path=S.path,this.propertyPath=S.propertyPath,this.errors=[],this.throwError=h&&h.throwError,this.throwFirst=h&&h.throwFirst,this.throwAll=h&&h.throwAll,this.disableFormat=h&&h.disableFormat===!0};t.prototype.addError=function(d){var b;if(typeof d=="string")b=new e(d,this.instance,this.schema,this.path);else{if(!d)throw new Error("Missing error detail");if(!d.message)throw new Error("Missing error message");if(!d.name)throw new Error("Missing validator type");b=new e(d.message,this.instance,this.schema,this.path,d.name,d.argument)}if(this.errors.push(b),this.throwFirst)throw new i(this);if(this.throwError)throw b;return b},t.prototype.importErrors=function(d){typeof d=="string"||d&&d.validatorType?this.addError(d):d&&d.errors&&(this.errors=this.errors.concat(d.errors))};function n(x,d){return d+": "+x.toString()+`
|