@ws-ui/shared 1.12.0 → 1.12.1
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.
|
@@ -170,17 +170,19 @@ declare namespace webforms {
|
|
|
170
170
|
[event: string]: string[];
|
|
171
171
|
};
|
|
172
172
|
minutes?: number;
|
|
173
|
+
delayType?: 'debounce' | 'throttle';
|
|
174
|
+
delayTime?: number;
|
|
173
175
|
};
|
|
174
176
|
|
|
175
177
|
interface BaseEvent {
|
|
176
178
|
id: string;
|
|
177
179
|
events: string[];
|
|
178
180
|
type:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
| 'method'
|
|
182
|
+
| 'navigation'
|
|
183
|
+
| 'simple-action'
|
|
184
|
+
| 'dialog'
|
|
185
|
+
| 'qodly-pro-action';
|
|
184
186
|
disabled?: boolean;
|
|
185
187
|
extra?: EventExtra;
|
|
186
188
|
}
|
|
@@ -189,18 +191,18 @@ declare namespace webforms {
|
|
|
189
191
|
type: 'method';
|
|
190
192
|
params: MethodParam[];
|
|
191
193
|
} & Partial<{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
194
|
+
method: string;
|
|
195
|
+
dataclass: string;
|
|
196
|
+
returns: Omit<MethodParam, 'id'>;
|
|
197
|
+
namespace: string;
|
|
198
|
+
code: string;
|
|
199
|
+
feedback: boolean;
|
|
200
|
+
datasource: string;
|
|
201
|
+
variadicType: string;
|
|
202
|
+
methodType?: 'dataclass' | 'singleton';
|
|
203
|
+
openIn: string;
|
|
204
|
+
allowedOnHTTPGET?: boolean;
|
|
205
|
+
}>;
|
|
204
206
|
|
|
205
207
|
type WebformStateActionType = 'add' | 'delete' | 'clear';
|
|
206
208
|
|
|
@@ -247,12 +249,12 @@ declare namespace webforms {
|
|
|
247
249
|
type: 'qodly-pro-action';
|
|
248
250
|
actionType: '4d-method' | 'auth';
|
|
249
251
|
} & Partial<{
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
action: string;
|
|
253
|
+
method: string;
|
|
254
|
+
params: MethodParam[];
|
|
255
|
+
returns: Omit<MethodParam, 'id'>;
|
|
256
|
+
variadicType: string;
|
|
257
|
+
}>;
|
|
256
258
|
|
|
257
259
|
interface NavigationEvent extends BaseEvent {
|
|
258
260
|
type: 'navigation';
|
|
@@ -286,7 +288,7 @@ declare namespace webforms {
|
|
|
286
288
|
|
|
287
289
|
type MethodReturn = Omit<MethodParam, 'name'>;
|
|
288
290
|
|
|
289
|
-
interface QueryParam extends MethodParam {}
|
|
291
|
+
interface QueryParam extends MethodParam { }
|
|
290
292
|
|
|
291
293
|
interface OrderBy {
|
|
292
294
|
name: string; // replace with attribute
|
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=oh(function(){return Pe(T,le+"return "+ee).apply(r,P)});if(Se.source=ee,sl(Se))throw Se;return Se}function R_(n){return ke(n).toLowerCase()}function P_(n){return ke(n).toUpperCase()}function C_(n,o,u){if(n=ke(n),n&&(u||o===r))return hd(n);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=ar(o),T=gd(y,_),P=md(y,_)+1;return on(y,T,P).join("")}function k_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.slice(0,yd(n)+1);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=md(y,ar(o))+1;return on(y,0,_).join("")}function $_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.replace(su,"");if(!n||!(o=Nt(o)))return n;var y=ar(n),_=gd(y,ar(o));return on(y,_).join("")}function I_(n,o){var u=G,y=j;if(Ge(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}n=ke(n);var T=n.length;if(Xn(n)){var P=ar(n);T=P.length}if(u>=T)return n;var I=u-Jn(y);if(I<1)return y;var z=P?on(P,0,I).join(""):n.slice(0,I);if(_===r)return z+y;if(P&&(I+=z.length-I),al(_)){if(n.slice(I).search(_)){var V,X=z;for(_.global||(_=Eu(_.source,ke(Ff.exec(_))+"g")),_.lastIndex=0;V=_.exec(X);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function L_(n){return n=ke(n),n&&q0.test(n)?n.replace(If,lw):n}var M_=oi(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),cl=sp("toUpperCase");function ih(n,o,u){return n=ke(n),o=u?r:o,o===r?iw(n)?dw(n):Vb(n):n.match(o)||[]}var oh=_e(function(n,o){try{return Ft(n,r,o)}catch(u){return sl(u)?u:new be(u)}}),F_=Dr(function(n,o){return Vt(o,function(u){u=br(u),Mr(n,u,il(n[u],n))}),n});function D_(n){var o=n==null?0:n.length,u=pe();return n=o?Be(n,function(y){if(typeof y[1]!="function")throw new Yt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=n[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function N_(n){return l1(Jt(n,g))}function fl(n){return function(){return n}}function j_(n,o){return n==null||n!==n?o:n}var z_=up(),W_=up(!0);function $t(n){return n}function dl(n){return Nd(typeof n=="function"?n:Jt(n,g))}function U_(n){return zd(Jt(n,g))}function B_(n,o){return Wd(n,Jt(o,g))}var H_=_e(function(n,o){return function(u){return Mi(u,n,o)}}),q_=_e(function(n,o){return function(u){return Mi(n,u,o)}});function pl(n,o,u){var y=ct(o),_=vs(o,y);u==null&&!(Ge(o)&&(_.length||!y.length))&&(u=o,o=n,n=this,_=vs(o,ct(o)));var T=!(Ge(u)&&"chain"in u)||!!u.chain,P=jr(n);return Vt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(T||V){var X=n(this.__wrapped__),ee=X.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),X.__chain__=V,X}return z.apply(n,Jr([this.value()],arguments))})}),n}function Z_(){return dt._===this&&(dt._=yw),this}function hl(){}function G_(n){return n=xe(n),_e(function(o){return Ud(o,n)})}var K_=qu(Be),V_=qu(ld),Y_=qu(mu);function sh(n){return Ju(n)?vu(br(n)):A1(n)}function X_(n){return function(o){return n==null?r:An(n,o)}}var J_=cp(),Q_=cp(!0);function gl(){return[]}function ml(){return!1}function eO(){return{}}function tO(){return""}function rO(){return!0}function nO(n,o){if(n=xe(n),n<1||n>te)return[];var u=Q,y=bt(n,Q);o=pe(o),n-=Q;for(var _=wu(y,o);++u<n;)o(u);return _}function iO(n){return we(n)?Be(n,br):jt(n)?[n]:Pt(Ap(ke(n)))}function oO(n){var o=++mw;return ke(n)+o}var sO=Es(function(n,o){return n+o},0),aO=Zu("ceil"),uO=Es(function(n,o){return n/o},1),lO=Zu("floor");function cO(n){return n&&n.length?ms(n,$t,ku):r}function fO(n,o){return n&&n.length?ms(n,pe(o,2),ku):r}function dO(n){return dd(n,$t)}function pO(n,o){return dd(n,pe(o,2))}function hO(n){return n&&n.length?ms(n,$t,Mu):r}function gO(n,o){return n&&n.length?ms(n,pe(o,2),Mu):r}var mO=Es(function(n,o){return n*o},1),vO=Zu("round"),yO=Es(function(n,o){return n-o},0);function bO(n){return n&&n.length?bu(n,$t):0}function wO(n,o){return n&&n.length?bu(n,pe(o,2)):0}return A.after=US,A.ary=Dp,A.assign=PE,A.assignIn=Xp,A.assignInWith=Fs,A.assignWith=CE,A.at=kE,A.before=Np,A.bind=il,A.bindAll=F_,A.bindKey=jp,A.castArray=eE,A.chain=Lp,A.chunk=lx,A.compact=cx,A.concat=fx,A.cond=D_,A.conforms=N_,A.constant=fl,A.countBy=bS,A.create=$E,A.curry=zp,A.curryRight=Wp,A.debounce=Up,A.defaults=IE,A.defaultsDeep=LE,A.defer=BS,A.delay=HS,A.difference=dx,A.differenceBy=px,A.differenceWith=hx,A.drop=gx,A.dropRight=mx,A.dropRightWhile=vx,A.dropWhile=yx,A.fill=bx,A.filter=xS,A.flatMap=_S,A.flatMapDeep=OS,A.flatMapDepth=AS,A.flatten=Cp,A.flattenDeep=wx,A.flattenDepth=xx,A.flip=qS,A.flow=z_,A.flowRight=W_,A.fromPairs=Sx,A.functions=WE,A.functionsIn=UE,A.groupBy=TS,A.initial=_x,A.intersection=Ox,A.intersectionBy=Ax,A.intersectionWith=Tx,A.invert=HE,A.invertBy=qE,A.invokeMap=PS,A.iteratee=dl,A.keyBy=CS,A.keys=ct,A.keysIn=kt,A.map=Cs,A.mapKeys=GE,A.mapValues=KE,A.matches=U_,A.matchesProperty=B_,A.memoize=$s,A.merge=VE,A.mergeWith=Jp,A.method=H_,A.methodOf=q_,A.mixin=pl,A.negate=Is,A.nthArg=G_,A.omit=YE,A.omitBy=XE,A.once=ZS,A.orderBy=kS,A.over=K_,A.overArgs=GS,A.overEvery=V_,A.overSome=Y_,A.partial=ol,A.partialRight=Bp,A.partition=$S,A.pick=JE,A.pickBy=Qp,A.property=sh,A.propertyOf=X_,A.pull=kx,A.pullAll=$p,A.pullAllBy=$x,A.pullAllWith=Ix,A.pullAt=Lx,A.range=J_,A.rangeRight=Q_,A.rearg=KS,A.reject=MS,A.remove=Mx,A.rest=VS,A.reverse=rl,A.sampleSize=DS,A.set=e_,A.setWith=t_,A.shuffle=NS,A.slice=Fx,A.sortBy=WS,A.sortedUniq=Bx,A.sortedUniqBy=Hx,A.split=__,A.spread=YS,A.tail=qx,A.take=Zx,A.takeRight=Gx,A.takeRightWhile=Kx,A.takeWhile=Vx,A.tap=cS,A.throttle=XS,A.thru=Ps,A.toArray=Kp,A.toPairs=eh,A.toPairsIn=th,A.toPath=iO,A.toPlainObject=Yp,A.transform=r_,A.unary=JS,A.union=Yx,A.unionBy=Xx,A.unionWith=Jx,A.uniq=Qx,A.uniqBy=eS,A.uniqWith=tS,A.unset=n_,A.unzip=nl,A.unzipWith=Ip,A.update=i_,A.updateWith=o_,A.values=ui,A.valuesIn=s_,A.without=rS,A.words=ih,A.wrap=QS,A.xor=nS,A.xorBy=iS,A.xorWith=oS,A.zip=sS,A.zipObject=aS,A.zipObjectDeep=uS,A.zipWith=lS,A.entries=eh,A.entriesIn=th,A.extend=Xp,A.extendWith=Fs,pl(A,A),A.add=sO,A.attempt=oh,A.camelCase=c_,A.capitalize=rh,A.ceil=aO,A.clamp=a_,A.clone=tE,A.cloneDeep=nE,A.cloneDeepWith=iE,A.cloneWith=rE,A.conformsTo=oE,A.deburr=nh,A.defaultTo=j_,A.divide=uO,A.endsWith=f_,A.eq=lr,A.escape=d_,A.escapeRegExp=p_,A.every=wS,A.find=SS,A.findIndex=Rp,A.findKey=ME,A.findLast=ES,A.findLastIndex=Pp,A.findLastKey=FE,A.floor=lO,A.forEach=Mp,A.forEachRight=Fp,A.forIn=DE,A.forInRight=NE,A.forOwn=jE,A.forOwnRight=zE,A.get=ul,A.gt=sE,A.gte=aE,A.has=BE,A.hasIn=ll,A.head=kp,A.identity=$t,A.includes=RS,A.indexOf=Ex,A.inRange=u_,A.invoke=ZE,A.isArguments=Pn,A.isArray=we,A.isArrayBuffer=uE,A.isArrayLike=Ct,A.isArrayLikeObject=tt,A.isBoolean=lE,A.isBuffer=sn,A.isDate=cE,A.isElement=fE,A.isEmpty=dE,A.isEqual=pE,A.isEqualWith=hE,A.isError=sl,A.isFinite=gE,A.isFunction=jr,A.isInteger=Hp,A.isLength=Ls,A.isMap=qp,A.isMatch=mE,A.isMatchWith=vE,A.isNaN=yE,A.isNative=bE,A.isNil=xE,A.isNull=wE,A.isNumber=Zp,A.isObject=Ge,A.isObjectLike=Je,A.isPlainObject=Wi,A.isRegExp=al,A.isSafeInteger=SE,A.isSet=Gp,A.isString=Ms,A.isSymbol=jt,A.isTypedArray=ai,A.isUndefined=EE,A.isWeakMap=_E,A.isWeakSet=OE,A.join=Rx,A.kebabCase=h_,A.last=er,A.lastIndexOf=Px,A.lowerCase=g_,A.lowerFirst=m_,A.lt=AE,A.lte=TE,A.max=cO,A.maxBy=fO,A.mean=dO,A.meanBy=pO,A.min=hO,A.minBy=gO,A.stubArray=gl,A.stubFalse=ml,A.stubObject=eO,A.stubString=tO,A.stubTrue=rO,A.multiply=mO,A.nth=Cx,A.noConflict=Z_,A.noop=hl,A.now=ks,A.pad=v_,A.padEnd=y_,A.padStart=b_,A.parseInt=w_,A.random=l_,A.reduce=IS,A.reduceRight=LS,A.repeat=x_,A.replace=S_,A.result=QE,A.round=vO,A.runInContext=N,A.sample=FS,A.size=jS,A.snakeCase=E_,A.some=zS,A.sortedIndex=Dx,A.sortedIndexBy=Nx,A.sortedIndexOf=jx,A.sortedLastIndex=zx,A.sortedLastIndexBy=Wx,A.sortedLastIndexOf=Ux,A.startCase=O_,A.startsWith=A_,A.subtract=yO,A.sum=bO,A.sumBy=wO,A.template=T_,A.times=nO,A.toFinite=zr,A.toInteger=xe,A.toLength=Vp,A.toLower=R_,A.toNumber=tr,A.toSafeInteger=RE,A.toString=ke,A.toUpper=P_,A.trim=C_,A.trimEnd=k_,A.trimStart=$_,A.truncate=I_,A.unescape=L_,A.uniqueId=oO,A.upperCase=M_,A.upperFirst=cl,A.each=Mp,A.eachRight=Fp,A.first=kp,pl(A,(function(){var n={};return vr(A,function(o,u){Fe.call(A.prototype,u)||(n[u]=o)}),n})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){A[n].placeholder=A}),Vt(["drop","take"],function(n,o){Te.prototype[n]=function(u){u=u===r?1:at(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=bt(u,y.__takeCount__):y.__views__.push({size:bt(u,Q),type:n+(y.__dir__<0?"Right":"")}),y},Te.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Vt(["filter","map","takeWhile"],function(n,o){var u=o+1,y=u==q||u==J;Te.prototype[n]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(n,o){var u="take"+(o?"Right":"");Te.prototype[n]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");Te.prototype[n]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(n){return this.filter(n).head()},Te.prototype.findLast=function(n){return this.reverse().find(n)},Te.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Te(this):this.map(function(u){return Mi(u,n,o)})}),Te.prototype.reject=function(n){return this.filter(Is(pe(n)))},Te.prototype.slice=function(n,o){n=xe(n);var u=this;return u.__filtered__&&(n>0||o<0)?new Te(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==r&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},Te.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Te.prototype.toArray=function(){return this.take(Q)},vr(Te.prototype,function(n,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],X=z||we(P),ee=function(Oe){var Re=_.apply(A,Jr([Oe],I));return y&&oe?Re[0]:Re};X&&u&&typeof V=="function"&&V.length!=1&&(z=X=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&X){P=Se?P:new Te(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Ps,args:[ee],thisArg:r}),new Xt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(n){var o=ts[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",y=/^(?:pop|shift)$/.test(n);A.prototype[n]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(we(T)?T:[],_)}return this[u](function(P){return o.apply(we(P)?P:[],_)})}}),vr(Te.prototype,function(n,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ri,y)||(ri[y]=[]),ri[y].push({name:o,func:u})}}),ri[Ss(r,h).name]=[{name:"wrapper",func:r}],Te.prototype.clone=Lw,Te.prototype.reverse=Mw,Te.prototype.value=Fw,A.prototype.at=fS,A.prototype.chain=dS,A.prototype.commit=pS,A.prototype.next=hS,A.prototype.plant=mS,A.prototype.reverse=vS,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=yS,A.prototype.first=A.prototype.head,Ri&&(A.prototype[Ri]=gS),A}),Qn=pw();xn?((xn.exports=Qn)._=Qn,du._=Qn):dt._=Qn}).call(t$)})(go,go.exports)),go.exports}var Ve=r$();const _c={FdSave:et.FdSave,FdWarningDanger:et.FdWarningDanger,FdInfoCircle:et.FdInfoCircle,FdInfoBold:et.FdInfoBold};var hf=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(hf||{}),zn=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(zn||{}),pi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(pi||{});const Ry={[zn.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[zn.DANGER]:{icon:"red-500",button:"primary-dark"},[zn.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Vl=({color:e=zn.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=Ry[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 M.jsx("button",{autoFocus:i,className:We("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:r})},n$=({name:e,color:t=zn.PRIMARY,className:r="w-8 h-8"})=>{const i=_c[e]||_c.FdInfoCircle,s=`text-${Ry[t].icon}`;return M.jsx(i,{className:We(r,s)})},i$=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:v=!0,container:m,onClose:g,onEdit:p})=>{const b=w=>{g({id:e,reason:w})};W.useEffect(()=>{function w(h){h.key==="Escape"&&b(pi.CANCELED)}return window.addEventListener("keyup",w),()=>{window.removeEventListener("keyup",w)}},[]);const x=Ve.merge(Ve.values(c==null?void 0:c.toggles).flatMap(w=>w.value?w.warnings||[]:[]),c==null?void 0:c.tips),d=(w,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=Ve.cloneDeep(c);(E=S.toggles)!=null&&E[w]&&(S.toggles[w].value=h),p({id:e,views:S})};return Do.createPortal(M.jsx(wa,{appear:!0,show:!0,as:W.Fragment,children:M.jsx("div",{className:We("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":v}),style:{zIndex:l},onClick:()=>b(pi.CANCELED),children:M.jsx(wa.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:M.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:w=>w.stopPropagation(),children:M.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?M.jsx("div",{className:"flex items-center justify-center",children:M.jsx(n$,{name:i,color:a,className:"w-6 h-6"})}):null,M.jsx(o$,{condition:t,children:M.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),M.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),M.jsx("div",{className:"text-xs text-white",children:Ve.values(c==null?void 0:c.toggles).map(w=>M.jsx("div",{children:M.jsxs("label",{htmlFor:w.key,className:"flex items-center",children:[M.jsx(py,{size:"xs",value:w.value,onChange:h=>d(w.key,h)}),M.jsx("span",{className:"ml-1",children:w.title})]})},w.key))}),M.jsx(s$,{warnings:x}),M.jsx("div",{className:"flex items-center gap-4",children:s===hf.CONFIRM?M.jsxs(M.Fragment,{children:[M.jsx(Vl,{autoFocus:!0,color:a,onClick:()=>b(pi.CONFIRMED),children:"Confirm"}),M.jsx(Vl,{color:a,variant:"outlined",onClick:()=>b(pi.CANCELED),children:"Cancel"})]}):M.jsx(Vl,{autoFocus:!0,onClick:()=>b(),children:"OK"})})]})})})})}),m||document.body)},o$=e=>e.condition?M.jsx(M.Fragment,{children:e.children}):null,s$=e=>e.warnings?M.jsx(wa,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:M.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>M.jsx(wa.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:M.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[M.jsx(et.FdWarningDanger,{className:We({"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")}),M.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var Py=(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))(Py||{});const a$=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>M.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[M.jsx(et.FdMinusNaked,{onClick:s,className:We("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),M.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),M.jsx(et.FdPlusNaked,{onClick:i,className:We("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),u$=$.forwardRef(((e,t)=>$.createElement(yn.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}})))),l$=u$;function pm(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[Cy]=Kc("Tooltip",[Na]),gf=Na(),c$=700,[bM,f$]=Cy("TooltipProvider",{isOpenDelayed:!0,delayDuration:c$,onOpen:()=>{},onClose:()=>{}}),[d$,Ha]=Cy("Tooltip"),p$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=f$("Tooltip",t),f=gf(t),[v,m]=$.useState(null),g=Cv(),p=$.useRef(0),b=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:w}=c,[h=!1,S]=Uv({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)}),b)}),[b,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(jv,f,$.createElement(d$,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:v,onTriggerChange:m,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),w()}),[S,w])},r))},h$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Ha("TooltipTrigger",r),a=gf(r),l=vn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(zv,Xe({asChild:!0},a),$.createElement(yn.button,Xe({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Bt(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Bt(e.onMouseLeave,s.onClose),onMouseDown:Bt(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Bt(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Bt(e.onBlur,s.onClose),onClick:Bt(e.onClick,(v=>{v.detail===0&&s.onClose()}))})))})),g$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Ha("TooltipContent",e.__scopeTooltip);return $.createElement(Zc,{present:r||s.open},$.createElement(m$,Xe({ref:t},i)))})),m$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=Ha("TooltipContent",r),f=gf(r),v=a?Gc:$.Fragment,{onClose:m}=c;return Lv((()=>m())),$.useEffect((()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m))),[m]),$.createElement(v,null,$.createElement(v$,{__scopeTooltip:r}),$.createElement(Wv,Xe({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(Iv,null,i),$.createElement(l$,{id:c.contentId,role:"tooltip"},s||i)))}));function v$(e){const{__scopeTooltip:t}=e,r=Ha("CheckTriggerMoved",t),i=Fv(r.trigger),s=i==null?void 0:i.left,a=pm(s),l=i==null?void 0:i.top,c=pm(l),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const y$=p$,b$=h$,w$=g$;function x$(e){return M.jsxs(y$,{delayDuration:e.delayDuration,open:e.open,children:[M.jsx(b$,{tabIndex:-1,asChild:!0,children:M.jsx("span",{children:e.children})}),M.jsxs(w$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&M.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 In=30,da=500,S$=()=>M.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),E$=e=>{const[t,r]=W.useState(In),i=W.useRef(),s=t>In,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&r(da),!e.isOpen&&s&&r(In)},[e.isOpen]),M.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[M.jsx(EO.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:In,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?In:da):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var v;(v=e.onResize)==null||v.call(e),a.current=null})},onResizeStop:(l,c,f,v)=>{r(t+v.height)},handleComponent:{top:M.jsx(S$,{})}}),M.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${Ve.kebabCase(e.path)}`,children:[M.jsxs("div",{className:We("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[M.jsxs("div",{className:"group flex items-center justify-start",children:[M.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),M.jsx("span",{}),e.tipKey?M.jsx(ty,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,M.jsx("button",{"data-cy":`contextualPanel-toggle-button-${s?"close":"open"}`,className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(In),e.onClose()):(r(da),e.onOpen())},children:s?M.jsx(et.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):M.jsx(et.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),M.jsxs(ua,{of:s,children:[M.jsx(ua,{of:e.render,children:e.render}),M.jsx(ua,{of:!e.render,children:e.children})]})]})]})};function ky({children:e,viewBox:t="0 0 24 24",...r}){return M.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...r,children:e})}function $y(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return M.jsx(ky,{viewBox:"0 0 24 24",...e,children:M.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function _$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),v=i||M.jsx($y,{}),m=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=m||t,p=["base-checkbox-container",a].join(" ");return M.jsxs("label",{className:p,style:l,"data-invalid":r,children:[M.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:m,...c,"aria-invalid":r||void 0}),M.jsx("span",{className:"base-checkbox-control",children:g&&v&&W.cloneElement(v,{isChecked:m,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&M.jsx("span",{className:"base-checkbox-label",children:s})]})}const O$=({title:e="Invalid page structure",error:t,onClose:r,onOpenInTextEditor:i,onReset:s})=>M.jsx("div",{className:"flex h-full w-full items-center justify-center",children:M.jsxs("div",{className:"flex flex-col items-center rounded bg-grey-300 px-10 py-6 text-center shadow-md",children:[M.jsxs("div",{className:"relative",children:[M.jsx(et.FdSanityCheckDefault,{className:"relative z-20 h-12 w-12 text-red-500 rounded-full"}),M.jsx("div",{className:"w-1/2 h-1/2 absolute z-0 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white"})]}),M.jsx("p",{className:"mb-2 mt-4 text-2xl text-white",children:e}),M.jsx("p",{className:"text-md mb-4 font-extralight text-grey-100",children:t}),M.jsxs("div",{className:"flex gap-4",children:[i&&M.jsx("button",{className:"text-md rounded border border-primary-dark hover:border-primary-hover bg-primary-dark hover:bg-primary-hover px-3 py-1 text-white focus:outline-none",onClick:i,children:"Open in Text Editor"}),s&&M.jsx("button",{className:"text-md rounded border border-red-500 bg-red-500 hover:bg-red-400 focus:ring-red-500 px-3 py-1 text-white focus:outline-none",onClick:s,children:"Reset Page"}),r&&M.jsx("button",{className:"text-md rounded border border-grey-50 bg-transparent hover:bg-grey-50 text-white hover:text-primary-dark px-3 py-1 focus:outline-none",onClick:r,children:"Close"})]})]})});function A$(e,t){const r=W.useRef(!1);W.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const Yl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Xl(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function fo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function Iy(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function Ly(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function T$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Po={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,"-":Yl?173:189,"=":Yl?61:187,";":Yl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},gr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},mo={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},Ye={};for(let e=1;e<20;e++)Po["f".concat(e)]=111+e;let qe=[],Oo=null,My="all";const Br=new Map,_i=e=>Po[e.toLowerCase()]||gr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),R$=e=>Object.keys(Po).find(t=>Po[t]===e),P$=e=>Object.keys(gr).find(t=>gr[t]===e);function Fy(e){My=e||"all"}function Co(){return My||"all"}function C$(){return qe.slice(0)}function k$(){return qe.map(e=>R$(e)||P$(e)||String.fromCharCode(e))}function $$(){const e=[];return Object.keys(Ye).forEach(t=>{Ye[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:l}=r;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>_i(c))})})}),e}function I$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function L$(e){return typeof e=="string"&&(e=_i(e)),qe.indexOf(e)!==-1}function M$(e,t){let r,i;e||(e=Co());for(const s in Ye)if(Object.prototype.hasOwnProperty.call(Ye,s))for(r=Ye[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(l=>{let{element:c}=l;return mf(c)}):i++;Co()===e&&Fy(t||"all")}function F$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=_i(e.key));const r=qe.indexOf(t);if(r>=0&&qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&qe.splice(0,qe.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in gr)gr[i]===t&&(hr[i]=!1)}}function Dy(e){if(typeof e>"u")Object.keys(Ye).forEach(s=>{Array.isArray(Ye[s])&&Ye[s].forEach(a=>ea(a)),delete Ye[s]}),mf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&ea(s)});else if(typeof e=="object")e.key&&ea(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),ea({key:e,scope:s,method:a,splitKey:"+"})}}const ea=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;Ly(t).forEach(l=>{const c=l.split(s),f=c.length,v=c[f-1],m=v==="*"?"*":_i(v);if(!Ye[m])return;r||(r=Co());const g=f>1?Iy(gr,c):[],p=[];Ye[m]=Ye[m].filter(b=>{const d=(i?b.method===i:!0)&&b.scope===r&&T$(b.mods,g);return d&&p.push(b.element),!d}),p.forEach(b=>mf(b))})};function hm(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||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(qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function gm(e,t){const r=Ye["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!hr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),qe.indexOf(i)===-1&&i!==229&&qe.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=mo[c];e[c]&&qe.indexOf(f)===-1?qe.push(f):!e[c]&&qe.indexOf(f)>-1?qe.splice(qe.indexOf(f),1):c==="metaKey"&&e[c]&&(qe=qe.filter(v=>v in mo||v===i))}),i in gt){gt[i]=!0;for(const c in gr)if(Object.prototype.hasOwnProperty.call(gr,c)){const f=mo[gr[c]];hr[c]=e[f]}if(!r)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[mo[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(qe.indexOf(17)===-1&&qe.push(17),qe.indexOf(18)===-1&&qe.push(18),gt[17]=!0,gt[18]=!0);const s=Co();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&hm(e,r[c],s,t);if(!(i in Ye))return;const a=Ye[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:v}=f,m=f.key.split(v),g=[];for(let p=0;p<m.length;p++)g.push(_i(m[p]));g.sort().join("")===qe.sort().join("")&&hm(e,f,s,t)}}function hr(e,t,r){qe=[];const i=Ly(e);let s=[],a="all",l=document,c=0,f=!1,v=!0,m="+",g=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=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&&(v=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(m=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&Dy(e,a);c<i.length;c++)e=i[c].split(m),s=[],e.length>1&&(s=Iy(gr,e)),e=e[e.length-1],e=e==="*"?"*":_i(e),e in Ye||(Ye[e]=[]),Ye[e].push({keyup:f,keydown:v,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:m,element:l});if(typeof l<"u"&&window){if(!Br.has(l)){const b=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return gm(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;gm(d,l),F$(d)};Br.set(l,{keydownListener:b,keyupListenr:x,capture:g}),Xl(l,"keydown",b,g),Xl(l,"keyup",x,g)}if(!Oo){const b=()=>{qe=[]};Oo={listener:b,capture:g},Xl(window,"focus",b,g)}}}function D$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ye).forEach(r=>{Ye[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function mf(e){const t=Object.values(Ye).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Br.get(e)||{};i&&s&&(fo(e,"keyup",s,a),fo(e,"keydown",i,a),Br.delete(e))}if((t.length<=0||Br.size<=0)&&(Object.keys(Br).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Br.get(s)||{};a&&l&&(fo(s,"keyup",l,c),fo(s,"keydown",a,c),Br.delete(s))}),Br.clear(),Object.keys(Ye).forEach(s=>delete Ye[s]),Oo)){const{listener:s,capture:a}=Oo;fo(window,"focus",s,a),Oo=null}}const Jl={getPressedKeyString:k$,setScope:Fy,getScope:Co,deleteScope:M$,getPressedKeyCodes:C$,getAllKeyCodes:$$,isPressed:L$,filter:I$,trigger:D$,unbind:Dy,keyMap:Po,modifier:gr,modifierMap:mo};for(const e in Jl)Object.prototype.hasOwnProperty.call(Jl,e)&&(hr[e]=Jl[e]);if(typeof window<"u"){const e=window.hotkeys;hr.noConflict=t=>(t&&window.hotkeys===hr&&(window.hotkeys=e),hr),window.hotkeys=hr}hr.filter=()=>!0;function N$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{hr.unbind(e,a)};W.useEffect(()=>(hr(e,r,a),l),[e,r,a])}const j$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function z$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function W$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function U$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function B$(e){const[t,r]=W.useState(e),i=(a,l)=>{r(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 Ny=W.createContext(""),H$=e=>M.jsx(Ny.Provider,{value:e.value,children:e.children}),q$=()=>{const e=W.useContext(Ny);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function Z$(e){const[t,r]=W.useState(e),i=W.useMemo(()=>G$(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function G$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${Ve.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const K$=(e,t,r={})=>{r={timeout:200,...r};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)},r.timeout)),a.detail%2===0&&e(a,...l)},[t,e,r.timeout])};function mt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=tI[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Si(e){return!!e&&!!e[qt]}function Hn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===rI})(e)||Array.isArray(e)||!!e[Em]||!!(!((t=e.constructor)===null||t===void 0)&&t[Em])||vf(e)||yf(e))}function ko(e,t,r){r===void 0&&(r=!1),Oi(e)===0?(r?Object.keys:Sf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function Oi(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:vf(e)?2:yf(e)?3:0}function Oc(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V$(e,t){return Oi(e)===2?e.get(t):e[t]}function jy(e,t,r){var i=Oi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function Y$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function vf(e){return Q$&&e instanceof Map}function yf(e){return eI&&e instanceof Set}function Ln(e){return e.o||e.t}function bf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=nI(e);delete t[qt];for(var r=Sf(t),i=0;i<r.length;i++){var s=r[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 $o(e,t){return t===void 0&&(t=!1),wf(e)||Si(e)||!Hn(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=X$),Object.freeze(e),t&&ko(e,(function(r,i){return $o(i,!0)}),!0)),e}function X$(){mt(2)}function wf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rr(e){var t=iI[e];return t||mt(18,e),t}function mm(){return process.env.NODE_ENV==="production"||Ei||mt(0),Ei}function Ql(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function _a(e){Ac(e),e.p.forEach(J$),e.p=null}function Ac(e){e===Ei&&(Ei=e.l)}function vm(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function J$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function ec(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Rr("ES5").S(t,e,i),i?(r[qt].P&&(_a(t),mt(4)),Hn(e)&&(e=Oa(t,e),t.l||Aa(t,e)),t.u&&Rr("Patches").M(r[qt].t,e,t.u,t.s)):e=Oa(t,r,[]),_a(t),t.u&&t.v(t.u,t.s),e!==Wy?e:void 0}function Oa(e,t,r){if(wf(t))return t;var i=t[qt];if(!i)return ko(t,(function(c,f){return ym(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Aa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=bf(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),ko(a,(function(c,f){return ym(e,i,s,c,f,r,l)})),Aa(e,s,!1),r&&e.u&&Rr("Patches").N(i,r,e.u,e.s)}return i.o}function ym(e,t,r,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===r&&mt(5),Si(s)){var c=Oa(e,s,a&&t&&t.i!==3&&!Oc(t.R,i)?a.concat(i):void 0);if(jy(r,i,c),!Si(c))return;e.m=!1}else l&&r.add(s);if(Hn(s)&&!wf(s)){if(!e.h.D&&e._<1)return;Oa(e,s),t&&t.A.l||Aa(e,s)}}function Aa(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&$o(t,r)}function tc(e,t){var r=e[qt];return(r?Ln(r):e)[t]}function bm(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Tc(e){e.P||(e.P=!0,e.l&&Tc(e.l))}function rc(e){e.o||(e.o=bf(e.t))}function Rc(e,t,r){var i=vf(t)?Rr("MapSet").F(t,r):yf(t)?Rr("MapSet").T(t,r):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:mm(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,v=Pc;l&&(f=[c],v=vo);var m=Proxy.revocable(f,v),g=m.revoke,p=m.proxy;return c.k=p,c.j=g,p})(t,r):Rr("ES5").J(t,r);return(r?r.A:mm()).p.push(i),i}function zy(e){return Si(e)||mt(22,e),(function t(r){if(!Hn(r))return r;var i,s=r[qt],a=Oi(r);if(s){if(!s.P&&(s.i<4||!Rr("ES5").K(s)))return s.t;s.I=!0,i=wm(r,a),s.I=!1}else i=wm(r,a);return ko(i,(function(l,c){s&&V$(s.t,l)===c||jy(i,l,t(c))})),a===3?new Set(i):i})(e)}function wm(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return bf(e)}var xm,Ei,xf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Q$=typeof Map<"u",eI=typeof Set<"u",Sm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Wy=xf?Symbol.for("immer-nothing"):((xm={})["immer-nothing"]=!0,xm),Em=xf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=xf?Symbol.for("immer-state"):"__$immer_state",tI={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"},rI=""+Object.prototype.constructor,Sf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,nI=Object.getOwnPropertyDescriptors||function(e){var t={};return Sf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},iI={},Pc={get:function(e,t){if(t===qt)return e;var r=Ln(e);if(!Oc(r,t))return(function(s,a,l){var c,f=bm(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,r,t);var i=r[t];return e.I||!Hn(i)?i:i===tc(e.t,t)?(rc(e),e.o[t]=Rc(e.A.h,i,e)):i},has:function(e,t){return t in Ln(e)},ownKeys:function(e){return Reflect.ownKeys(Ln(e))},set:function(e,t,r){var i=bm(Ln(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=tc(Ln(e),t),a=s==null?void 0:s[qt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Y$(r,s)&&(r!==void 0||Oc(e.t,t)))return!0;rc(e),Tc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return tc(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,rc(e),Tc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ln(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){mt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){mt(12)}},vo={};ko(Pc,(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))&&mt(13),vo.set.call(this,e,t,void 0)},vo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&mt(14),Pc.set.call(this,e[0],t,r,e[0])};var oI=(function(){function e(r){var i=this;this.O=Sm,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 w=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,[w,R].concat(S))}))}}var v;if(typeof a!="function"&&mt(6),l!==void 0&&typeof l!="function"&&mt(7),Hn(s)){var m=vm(i),g=Rc(i,s,void 0),p=!0;try{v=a(g),p=!1}finally{p?_a(m):Ac(m)}return typeof Promise<"u"&&v instanceof Promise?v.then((function(d){return Ql(m,l),ec(d,m)}),(function(d){throw _a(m),d})):(Ql(m,l),ec(v,m))}if(!s||typeof s!="object"){if((v=a(s))===void 0&&(v=s),v===Wy&&(v=void 0),i.D&&$o(v,!0),l){var b=[],x=[];Rr("Patches").M(s,v,b,x),l(b,x)}return v}mt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(v){for(var m=arguments.length,g=Array(m>1?m-1:0),p=1;p<m;p++)g[p-1]=arguments[p];return i.produceWithPatches(v,(function(b){return s.apply(void 0,[b].concat(g))}))};var l,c,f=i.produce(s,a,(function(v,m){l=v,c=m}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(v){return[v,l,c]})):[f,l,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Hn(r)||mt(8),Si(r)&&(r=zy(r));var i=vm(this),s=Rc(this,r,void 0);return s[qt].C=!0,Ac(i),s},t.finishDraft=function(r,i){var s=r&&r[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||mt(9),s.I&&mt(10));var a=s.A;return Ql(a,i),ec(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Sm&&mt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rr("Patches").$;return Si(r)?l(r,i):this.produce(r,(function(c){return l(c,i)}))},e})(),Zt=new oI,sI=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 aI(e){var t=W.useState(function(){return $o(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],W.useCallback(function(i){r(typeof i=="function"?sI(i):$o(i))},[])]}const uI=process.env.NODE_ENV==="development",nc=uI&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,lI=(e,t,r)=>{const[i,s]=aI(e),a=W.useRef(null);W.useEffect(()=>{var f;return r&&(a.current=nc==null?void 0:nc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var v,m;(m=(v=a.current)==null?void 0:v.disconnect)==null||m.call(v)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,v)=>({...f,[v]:m=>(s(g=>{var p;l[v](g,m),(p=a.current)==null||p.send({type:l[v].name},zy(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zr(e){return typeof e=="function"}function Uy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var ic=Uy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
201
|
+
}`;var Se=oh(function(){return Pe(T,le+"return "+ee).apply(r,P)});if(Se.source=ee,sl(Se))throw Se;return Se}function R_(n){return ke(n).toLowerCase()}function P_(n){return ke(n).toUpperCase()}function C_(n,o,u){if(n=ke(n),n&&(u||o===r))return hd(n);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=ar(o),T=gd(y,_),P=md(y,_)+1;return on(y,T,P).join("")}function k_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.slice(0,yd(n)+1);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=md(y,ar(o))+1;return on(y,0,_).join("")}function $_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.replace(su,"");if(!n||!(o=Nt(o)))return n;var y=ar(n),_=gd(y,ar(o));return on(y,_).join("")}function I_(n,o){var u=G,y=j;if(Ge(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}n=ke(n);var T=n.length;if(Xn(n)){var P=ar(n);T=P.length}if(u>=T)return n;var I=u-Jn(y);if(I<1)return y;var z=P?on(P,0,I).join(""):n.slice(0,I);if(_===r)return z+y;if(P&&(I+=z.length-I),al(_)){if(n.slice(I).search(_)){var V,X=z;for(_.global||(_=Eu(_.source,ke(Ff.exec(_))+"g")),_.lastIndex=0;V=_.exec(X);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function L_(n){return n=ke(n),n&&q0.test(n)?n.replace(If,lw):n}var M_=oi(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),cl=sp("toUpperCase");function ih(n,o,u){return n=ke(n),o=u?r:o,o===r?iw(n)?dw(n):Vb(n):n.match(o)||[]}var oh=_e(function(n,o){try{return Ft(n,r,o)}catch(u){return sl(u)?u:new be(u)}}),F_=Dr(function(n,o){return Vt(o,function(u){u=br(u),Mr(n,u,il(n[u],n))}),n});function D_(n){var o=n==null?0:n.length,u=pe();return n=o?Be(n,function(y){if(typeof y[1]!="function")throw new Yt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=n[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function N_(n){return l1(Jt(n,g))}function fl(n){return function(){return n}}function j_(n,o){return n==null||n!==n?o:n}var z_=up(),W_=up(!0);function $t(n){return n}function dl(n){return Nd(typeof n=="function"?n:Jt(n,g))}function U_(n){return zd(Jt(n,g))}function B_(n,o){return Wd(n,Jt(o,g))}var H_=_e(function(n,o){return function(u){return Mi(u,n,o)}}),q_=_e(function(n,o){return function(u){return Mi(n,u,o)}});function pl(n,o,u){var y=ct(o),_=vs(o,y);u==null&&!(Ge(o)&&(_.length||!y.length))&&(u=o,o=n,n=this,_=vs(o,ct(o)));var T=!(Ge(u)&&"chain"in u)||!!u.chain,P=jr(n);return Vt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(T||V){var X=n(this.__wrapped__),ee=X.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),X.__chain__=V,X}return z.apply(n,Jr([this.value()],arguments))})}),n}function Z_(){return dt._===this&&(dt._=yw),this}function hl(){}function G_(n){return n=xe(n),_e(function(o){return Ud(o,n)})}var K_=qu(Be),V_=qu(ld),Y_=qu(mu);function sh(n){return Ju(n)?vu(br(n)):A1(n)}function X_(n){return function(o){return n==null?r:An(n,o)}}var J_=cp(),Q_=cp(!0);function gl(){return[]}function ml(){return!1}function eO(){return{}}function tO(){return""}function rO(){return!0}function nO(n,o){if(n=xe(n),n<1||n>te)return[];var u=Q,y=bt(n,Q);o=pe(o),n-=Q;for(var _=wu(y,o);++u<n;)o(u);return _}function iO(n){return we(n)?Be(n,br):jt(n)?[n]:Pt(Ap(ke(n)))}function oO(n){var o=++mw;return ke(n)+o}var sO=Es(function(n,o){return n+o},0),aO=Zu("ceil"),uO=Es(function(n,o){return n/o},1),lO=Zu("floor");function cO(n){return n&&n.length?ms(n,$t,ku):r}function fO(n,o){return n&&n.length?ms(n,pe(o,2),ku):r}function dO(n){return dd(n,$t)}function pO(n,o){return dd(n,pe(o,2))}function hO(n){return n&&n.length?ms(n,$t,Mu):r}function gO(n,o){return n&&n.length?ms(n,pe(o,2),Mu):r}var mO=Es(function(n,o){return n*o},1),vO=Zu("round"),yO=Es(function(n,o){return n-o},0);function bO(n){return n&&n.length?bu(n,$t):0}function wO(n,o){return n&&n.length?bu(n,pe(o,2)):0}return A.after=US,A.ary=Dp,A.assign=PE,A.assignIn=Xp,A.assignInWith=Fs,A.assignWith=CE,A.at=kE,A.before=Np,A.bind=il,A.bindAll=F_,A.bindKey=jp,A.castArray=eE,A.chain=Lp,A.chunk=lx,A.compact=cx,A.concat=fx,A.cond=D_,A.conforms=N_,A.constant=fl,A.countBy=bS,A.create=$E,A.curry=zp,A.curryRight=Wp,A.debounce=Up,A.defaults=IE,A.defaultsDeep=LE,A.defer=BS,A.delay=HS,A.difference=dx,A.differenceBy=px,A.differenceWith=hx,A.drop=gx,A.dropRight=mx,A.dropRightWhile=vx,A.dropWhile=yx,A.fill=bx,A.filter=xS,A.flatMap=_S,A.flatMapDeep=OS,A.flatMapDepth=AS,A.flatten=Cp,A.flattenDeep=wx,A.flattenDepth=xx,A.flip=qS,A.flow=z_,A.flowRight=W_,A.fromPairs=Sx,A.functions=WE,A.functionsIn=UE,A.groupBy=TS,A.initial=_x,A.intersection=Ox,A.intersectionBy=Ax,A.intersectionWith=Tx,A.invert=HE,A.invertBy=qE,A.invokeMap=PS,A.iteratee=dl,A.keyBy=CS,A.keys=ct,A.keysIn=kt,A.map=Cs,A.mapKeys=GE,A.mapValues=KE,A.matches=U_,A.matchesProperty=B_,A.memoize=$s,A.merge=VE,A.mergeWith=Jp,A.method=H_,A.methodOf=q_,A.mixin=pl,A.negate=Is,A.nthArg=G_,A.omit=YE,A.omitBy=XE,A.once=ZS,A.orderBy=kS,A.over=K_,A.overArgs=GS,A.overEvery=V_,A.overSome=Y_,A.partial=ol,A.partialRight=Bp,A.partition=$S,A.pick=JE,A.pickBy=Qp,A.property=sh,A.propertyOf=X_,A.pull=kx,A.pullAll=$p,A.pullAllBy=$x,A.pullAllWith=Ix,A.pullAt=Lx,A.range=J_,A.rangeRight=Q_,A.rearg=KS,A.reject=MS,A.remove=Mx,A.rest=VS,A.reverse=rl,A.sampleSize=DS,A.set=e_,A.setWith=t_,A.shuffle=NS,A.slice=Fx,A.sortBy=WS,A.sortedUniq=Bx,A.sortedUniqBy=Hx,A.split=__,A.spread=YS,A.tail=qx,A.take=Zx,A.takeRight=Gx,A.takeRightWhile=Kx,A.takeWhile=Vx,A.tap=cS,A.throttle=XS,A.thru=Ps,A.toArray=Kp,A.toPairs=eh,A.toPairsIn=th,A.toPath=iO,A.toPlainObject=Yp,A.transform=r_,A.unary=JS,A.union=Yx,A.unionBy=Xx,A.unionWith=Jx,A.uniq=Qx,A.uniqBy=eS,A.uniqWith=tS,A.unset=n_,A.unzip=nl,A.unzipWith=Ip,A.update=i_,A.updateWith=o_,A.values=ui,A.valuesIn=s_,A.without=rS,A.words=ih,A.wrap=QS,A.xor=nS,A.xorBy=iS,A.xorWith=oS,A.zip=sS,A.zipObject=aS,A.zipObjectDeep=uS,A.zipWith=lS,A.entries=eh,A.entriesIn=th,A.extend=Xp,A.extendWith=Fs,pl(A,A),A.add=sO,A.attempt=oh,A.camelCase=c_,A.capitalize=rh,A.ceil=aO,A.clamp=a_,A.clone=tE,A.cloneDeep=nE,A.cloneDeepWith=iE,A.cloneWith=rE,A.conformsTo=oE,A.deburr=nh,A.defaultTo=j_,A.divide=uO,A.endsWith=f_,A.eq=lr,A.escape=d_,A.escapeRegExp=p_,A.every=wS,A.find=SS,A.findIndex=Rp,A.findKey=ME,A.findLast=ES,A.findLastIndex=Pp,A.findLastKey=FE,A.floor=lO,A.forEach=Mp,A.forEachRight=Fp,A.forIn=DE,A.forInRight=NE,A.forOwn=jE,A.forOwnRight=zE,A.get=ul,A.gt=sE,A.gte=aE,A.has=BE,A.hasIn=ll,A.head=kp,A.identity=$t,A.includes=RS,A.indexOf=Ex,A.inRange=u_,A.invoke=ZE,A.isArguments=Pn,A.isArray=we,A.isArrayBuffer=uE,A.isArrayLike=Ct,A.isArrayLikeObject=tt,A.isBoolean=lE,A.isBuffer=sn,A.isDate=cE,A.isElement=fE,A.isEmpty=dE,A.isEqual=pE,A.isEqualWith=hE,A.isError=sl,A.isFinite=gE,A.isFunction=jr,A.isInteger=Hp,A.isLength=Ls,A.isMap=qp,A.isMatch=mE,A.isMatchWith=vE,A.isNaN=yE,A.isNative=bE,A.isNil=xE,A.isNull=wE,A.isNumber=Zp,A.isObject=Ge,A.isObjectLike=Je,A.isPlainObject=Wi,A.isRegExp=al,A.isSafeInteger=SE,A.isSet=Gp,A.isString=Ms,A.isSymbol=jt,A.isTypedArray=ai,A.isUndefined=EE,A.isWeakMap=_E,A.isWeakSet=OE,A.join=Rx,A.kebabCase=h_,A.last=er,A.lastIndexOf=Px,A.lowerCase=g_,A.lowerFirst=m_,A.lt=AE,A.lte=TE,A.max=cO,A.maxBy=fO,A.mean=dO,A.meanBy=pO,A.min=hO,A.minBy=gO,A.stubArray=gl,A.stubFalse=ml,A.stubObject=eO,A.stubString=tO,A.stubTrue=rO,A.multiply=mO,A.nth=Cx,A.noConflict=Z_,A.noop=hl,A.now=ks,A.pad=v_,A.padEnd=y_,A.padStart=b_,A.parseInt=w_,A.random=l_,A.reduce=IS,A.reduceRight=LS,A.repeat=x_,A.replace=S_,A.result=QE,A.round=vO,A.runInContext=N,A.sample=FS,A.size=jS,A.snakeCase=E_,A.some=zS,A.sortedIndex=Dx,A.sortedIndexBy=Nx,A.sortedIndexOf=jx,A.sortedLastIndex=zx,A.sortedLastIndexBy=Wx,A.sortedLastIndexOf=Ux,A.startCase=O_,A.startsWith=A_,A.subtract=yO,A.sum=bO,A.sumBy=wO,A.template=T_,A.times=nO,A.toFinite=zr,A.toInteger=xe,A.toLength=Vp,A.toLower=R_,A.toNumber=tr,A.toSafeInteger=RE,A.toString=ke,A.toUpper=P_,A.trim=C_,A.trimEnd=k_,A.trimStart=$_,A.truncate=I_,A.unescape=L_,A.uniqueId=oO,A.upperCase=M_,A.upperFirst=cl,A.each=Mp,A.eachRight=Fp,A.first=kp,pl(A,(function(){var n={};return vr(A,function(o,u){Fe.call(A.prototype,u)||(n[u]=o)}),n})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){A[n].placeholder=A}),Vt(["drop","take"],function(n,o){Te.prototype[n]=function(u){u=u===r?1:at(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=bt(u,y.__takeCount__):y.__views__.push({size:bt(u,Q),type:n+(y.__dir__<0?"Right":"")}),y},Te.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Vt(["filter","map","takeWhile"],function(n,o){var u=o+1,y=u==q||u==J;Te.prototype[n]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(n,o){var u="take"+(o?"Right":"");Te.prototype[n]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");Te.prototype[n]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(n){return this.filter(n).head()},Te.prototype.findLast=function(n){return this.reverse().find(n)},Te.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Te(this):this.map(function(u){return Mi(u,n,o)})}),Te.prototype.reject=function(n){return this.filter(Is(pe(n)))},Te.prototype.slice=function(n,o){n=xe(n);var u=this;return u.__filtered__&&(n>0||o<0)?new Te(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==r&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},Te.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Te.prototype.toArray=function(){return this.take(Q)},vr(Te.prototype,function(n,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],X=z||we(P),ee=function(Oe){var Re=_.apply(A,Jr([Oe],I));return y&&oe?Re[0]:Re};X&&u&&typeof V=="function"&&V.length!=1&&(z=X=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&X){P=Se?P:new Te(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Ps,args:[ee],thisArg:r}),new Xt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(n){var o=ts[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",y=/^(?:pop|shift)$/.test(n);A.prototype[n]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(we(T)?T:[],_)}return this[u](function(P){return o.apply(we(P)?P:[],_)})}}),vr(Te.prototype,function(n,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ri,y)||(ri[y]=[]),ri[y].push({name:o,func:u})}}),ri[Ss(r,h).name]=[{name:"wrapper",func:r}],Te.prototype.clone=Lw,Te.prototype.reverse=Mw,Te.prototype.value=Fw,A.prototype.at=fS,A.prototype.chain=dS,A.prototype.commit=pS,A.prototype.next=hS,A.prototype.plant=mS,A.prototype.reverse=vS,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=yS,A.prototype.first=A.prototype.head,Ri&&(A.prototype[Ri]=gS),A}),Qn=pw();xn?((xn.exports=Qn)._=Qn,du._=Qn):dt._=Qn}).call(t$)})(go,go.exports)),go.exports}var Ve=r$();const _c={FdSave:et.FdSave,FdWarningDanger:et.FdWarningDanger,FdInfoCircle:et.FdInfoCircle,FdInfoBold:et.FdInfoBold};var hf=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(hf||{}),zn=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(zn||{}),pi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(pi||{});const Ry={[zn.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[zn.DANGER]:{icon:"red-500",button:"primary-dark"},[zn.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Vl=({color:e=zn.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=Ry[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 M.jsx("button",{autoFocus:i,className:We("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:r})},n$=({name:e,color:t=zn.PRIMARY,className:r="w-8 h-8"})=>{const i=_c[e]||_c.FdInfoCircle,s=`text-${Ry[t].icon}`;return M.jsx(i,{className:We(r,s)})},i$=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:v=!0,container:m,onClose:g,onEdit:p})=>{const b=w=>{g({id:e,reason:w})};W.useEffect(()=>{function w(h){h.key==="Escape"&&b(pi.CANCELED)}return window.addEventListener("keyup",w),()=>{window.removeEventListener("keyup",w)}},[]);const x=Ve.merge(Ve.values(c==null?void 0:c.toggles).flatMap(w=>w.value?w.warnings||[]:[]),c==null?void 0:c.tips),d=(w,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=Ve.cloneDeep(c);(E=S.toggles)!=null&&E[w]&&(S.toggles[w].value=h),p({id:e,views:S})};return Do.createPortal(M.jsx(wa,{appear:!0,show:!0,as:W.Fragment,children:M.jsx("div",{className:We("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":v}),style:{zIndex:l},onClick:()=>b(pi.CANCELED),children:M.jsx(wa.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:M.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:w=>w.stopPropagation(),children:M.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?M.jsx("div",{className:"flex items-center justify-center",children:M.jsx(n$,{name:i,color:a,className:"w-6 h-6"})}):null,M.jsx(o$,{condition:t,children:M.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),M.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),M.jsx("div",{className:"text-xs text-white",children:Ve.values(c==null?void 0:c.toggles).map(w=>M.jsx("div",{children:M.jsxs("label",{htmlFor:w.key,className:"flex items-center",children:[M.jsx(py,{size:"xs",value:w.value,onChange:h=>d(w.key,h)}),M.jsx("span",{className:"ml-1",children:w.title})]})},w.key))}),M.jsx(s$,{warnings:x}),M.jsx("div",{className:"flex items-center gap-4",children:s===hf.CONFIRM?M.jsxs(M.Fragment,{children:[M.jsx(Vl,{autoFocus:!0,color:a,onClick:()=>b(pi.CONFIRMED),children:"Confirm"}),M.jsx(Vl,{color:a,variant:"outlined",onClick:()=>b(pi.CANCELED),children:"Cancel"})]}):M.jsx(Vl,{autoFocus:!0,onClick:()=>b(),children:"OK"})})]})})})})}),m||document.body)},o$=e=>e.condition?M.jsx(M.Fragment,{children:e.children}):null,s$=e=>e.warnings?M.jsx(wa,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:M.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>M.jsx(wa.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:M.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[M.jsx(et.FdWarningDanger,{className:We({"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")}),M.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var Py=(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))(Py||{});const a$=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>M.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[M.jsx(et.FdMinusNaked,{onClick:s,className:We("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),M.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),M.jsx(et.FdPlusNaked,{onClick:i,className:We("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),u$=$.forwardRef(((e,t)=>$.createElement(yn.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}})))),l$=u$;function pm(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[Cy]=Kc("Tooltip",[Na]),gf=Na(),c$=700,[bM,f$]=Cy("TooltipProvider",{isOpenDelayed:!0,delayDuration:c$,onOpen:()=>{},onClose:()=>{}}),[d$,Ha]=Cy("Tooltip"),p$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=f$("Tooltip",t),f=gf(t),[v,m]=$.useState(null),g=Cv(),p=$.useRef(0),b=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:w}=c,[h=!1,S]=Uv({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)}),b)}),[b,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(jv,f,$.createElement(d$,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:v,onTriggerChange:m,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),w()}),[S,w])},r))},h$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Ha("TooltipTrigger",r),a=gf(r),l=vn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(zv,Xe({asChild:!0},a),$.createElement(yn.button,Xe({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Bt(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Bt(e.onMouseLeave,s.onClose),onMouseDown:Bt(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Bt(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Bt(e.onBlur,s.onClose),onClick:Bt(e.onClick,(v=>{v.detail===0&&s.onClose()}))})))})),g$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Ha("TooltipContent",e.__scopeTooltip);return $.createElement(Zc,{present:r||s.open},$.createElement(m$,Xe({ref:t},i)))})),m$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=Ha("TooltipContent",r),f=gf(r),v=a?Gc:$.Fragment,{onClose:m}=c;return Lv((()=>m())),$.useEffect((()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m))),[m]),$.createElement(v,null,$.createElement(v$,{__scopeTooltip:r}),$.createElement(Wv,Xe({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(Iv,null,i),$.createElement(l$,{id:c.contentId,role:"tooltip"},s||i)))}));function v$(e){const{__scopeTooltip:t}=e,r=Ha("CheckTriggerMoved",t),i=Fv(r.trigger),s=i==null?void 0:i.left,a=pm(s),l=i==null?void 0:i.top,c=pm(l),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const y$=p$,b$=h$,w$=g$;function x$(e){return M.jsxs(y$,{delayDuration:e.delayDuration,open:e.open,children:[M.jsx(b$,{tabIndex:-1,asChild:!0,children:M.jsx("span",{children:e.children})}),M.jsxs(w$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&M.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 In=30,da=500,S$=()=>M.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),E$=e=>{const[t,r]=W.useState(In),i=W.useRef(),s=t>In,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&r(da),!e.isOpen&&s&&r(In)},[e.isOpen]),M.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[M.jsx(EO.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:In,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?In:da):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var v;(v=e.onResize)==null||v.call(e),a.current=null})},onResizeStop:(l,c,f,v)=>{r(t+v.height)},handleComponent:{top:M.jsx(S$,{})}}),M.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${Ve.kebabCase(e.path)}`,children:[M.jsxs("div",{className:We("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[M.jsxs("div",{className:"group flex items-center justify-start",children:[M.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),M.jsx("span",{}),e.tipKey?M.jsx(ty,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,M.jsx("button",{"data-cy":`contextualPanel-toggle-button-${s?"close":"open"}`,className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(In),e.onClose()):(r(da),e.onOpen())},children:s?M.jsx(et.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):M.jsx(et.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),M.jsxs(ua,{of:s,children:[M.jsx(ua,{of:e.render,children:e.render}),M.jsx(ua,{of:!e.render,children:e.children})]})]})]})};function ky({children:e,viewBox:t="0 0 24 24",...r}){return M.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...r,children:e})}function $y(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return M.jsx(ky,{viewBox:"0 0 24 24",...e,children:M.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function _$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),v=i||M.jsx($y,{}),m=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=m||t,p=["base-checkbox-container",a].join(" ");return M.jsxs("label",{className:p,style:l,"data-invalid":r,children:[M.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:m,...c,"aria-invalid":r||void 0}),M.jsx("span",{className:"base-checkbox-control",children:g&&v&&W.cloneElement(v,{isChecked:m,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&M.jsx("span",{className:"base-checkbox-label",children:s})]})}const O$=({title:e="Invalid page structure",error:t,onClose:r,onOpenInTextEditor:i,onReset:s,resetButtonLabel:a="Reset Page"})=>M.jsx("div",{className:"flex h-full w-full items-center justify-center",children:M.jsxs("div",{className:"flex flex-col items-center rounded bg-grey-300 px-10 py-6 text-center shadow-md",children:[M.jsxs("div",{className:"relative",children:[M.jsx(et.FdSanityCheckDefault,{className:"relative z-20 h-12 w-12 text-red-500 rounded-full"}),M.jsx("div",{className:"w-1/2 h-1/2 absolute z-0 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white"})]}),M.jsx("p",{className:"mb-2 mt-4 text-2xl text-white",children:e}),M.jsx("p",{className:"text-md mb-4 font-extralight text-grey-100",children:t}),M.jsxs("div",{className:"flex gap-4",children:[i&&M.jsx("button",{className:"text-md rounded border border-primary-dark hover:border-primary-hover bg-primary-dark hover:bg-primary-hover px-3 py-1 text-white focus:outline-none",onClick:i,children:"Open in Text Editor"}),s&&M.jsx("button",{className:"text-md rounded border border-red-500 bg-red-500 hover:bg-red-400 focus:ring-red-500 px-3 py-1 text-white focus:outline-none",onClick:s,children:a}),r&&M.jsx("button",{className:"text-md rounded border border-grey-50 bg-transparent hover:bg-grey-50 text-white hover:text-primary-dark px-3 py-1 focus:outline-none",onClick:r,children:"Close"})]})]})});function A$(e,t){const r=W.useRef(!1);W.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const Yl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Xl(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function fo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function Iy(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function Ly(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function T$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Po={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,"-":Yl?173:189,"=":Yl?61:187,";":Yl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},gr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},mo={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},Ye={};for(let e=1;e<20;e++)Po["f".concat(e)]=111+e;let qe=[],Oo=null,My="all";const Br=new Map,_i=e=>Po[e.toLowerCase()]||gr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),R$=e=>Object.keys(Po).find(t=>Po[t]===e),P$=e=>Object.keys(gr).find(t=>gr[t]===e);function Fy(e){My=e||"all"}function Co(){return My||"all"}function C$(){return qe.slice(0)}function k$(){return qe.map(e=>R$(e)||P$(e)||String.fromCharCode(e))}function $$(){const e=[];return Object.keys(Ye).forEach(t=>{Ye[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:l}=r;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>_i(c))})})}),e}function I$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function L$(e){return typeof e=="string"&&(e=_i(e)),qe.indexOf(e)!==-1}function M$(e,t){let r,i;e||(e=Co());for(const s in Ye)if(Object.prototype.hasOwnProperty.call(Ye,s))for(r=Ye[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(l=>{let{element:c}=l;return mf(c)}):i++;Co()===e&&Fy(t||"all")}function F$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=_i(e.key));const r=qe.indexOf(t);if(r>=0&&qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&qe.splice(0,qe.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in gr)gr[i]===t&&(hr[i]=!1)}}function Dy(e){if(typeof e>"u")Object.keys(Ye).forEach(s=>{Array.isArray(Ye[s])&&Ye[s].forEach(a=>ea(a)),delete Ye[s]}),mf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&ea(s)});else if(typeof e=="object")e.key&&ea(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),ea({key:e,scope:s,method:a,splitKey:"+"})}}const ea=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;Ly(t).forEach(l=>{const c=l.split(s),f=c.length,v=c[f-1],m=v==="*"?"*":_i(v);if(!Ye[m])return;r||(r=Co());const g=f>1?Iy(gr,c):[],p=[];Ye[m]=Ye[m].filter(b=>{const d=(i?b.method===i:!0)&&b.scope===r&&T$(b.mods,g);return d&&p.push(b.element),!d}),p.forEach(b=>mf(b))})};function hm(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||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(qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function gm(e,t){const r=Ye["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!hr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),qe.indexOf(i)===-1&&i!==229&&qe.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=mo[c];e[c]&&qe.indexOf(f)===-1?qe.push(f):!e[c]&&qe.indexOf(f)>-1?qe.splice(qe.indexOf(f),1):c==="metaKey"&&e[c]&&(qe=qe.filter(v=>v in mo||v===i))}),i in gt){gt[i]=!0;for(const c in gr)if(Object.prototype.hasOwnProperty.call(gr,c)){const f=mo[gr[c]];hr[c]=e[f]}if(!r)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[mo[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(qe.indexOf(17)===-1&&qe.push(17),qe.indexOf(18)===-1&&qe.push(18),gt[17]=!0,gt[18]=!0);const s=Co();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&hm(e,r[c],s,t);if(!(i in Ye))return;const a=Ye[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:v}=f,m=f.key.split(v),g=[];for(let p=0;p<m.length;p++)g.push(_i(m[p]));g.sort().join("")===qe.sort().join("")&&hm(e,f,s,t)}}function hr(e,t,r){qe=[];const i=Ly(e);let s=[],a="all",l=document,c=0,f=!1,v=!0,m="+",g=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=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&&(v=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(m=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&Dy(e,a);c<i.length;c++)e=i[c].split(m),s=[],e.length>1&&(s=Iy(gr,e)),e=e[e.length-1],e=e==="*"?"*":_i(e),e in Ye||(Ye[e]=[]),Ye[e].push({keyup:f,keydown:v,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:m,element:l});if(typeof l<"u"&&window){if(!Br.has(l)){const b=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return gm(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;gm(d,l),F$(d)};Br.set(l,{keydownListener:b,keyupListenr:x,capture:g}),Xl(l,"keydown",b,g),Xl(l,"keyup",x,g)}if(!Oo){const b=()=>{qe=[]};Oo={listener:b,capture:g},Xl(window,"focus",b,g)}}}function D$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ye).forEach(r=>{Ye[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function mf(e){const t=Object.values(Ye).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Br.get(e)||{};i&&s&&(fo(e,"keyup",s,a),fo(e,"keydown",i,a),Br.delete(e))}if((t.length<=0||Br.size<=0)&&(Object.keys(Br).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Br.get(s)||{};a&&l&&(fo(s,"keyup",l,c),fo(s,"keydown",a,c),Br.delete(s))}),Br.clear(),Object.keys(Ye).forEach(s=>delete Ye[s]),Oo)){const{listener:s,capture:a}=Oo;fo(window,"focus",s,a),Oo=null}}const Jl={getPressedKeyString:k$,setScope:Fy,getScope:Co,deleteScope:M$,getPressedKeyCodes:C$,getAllKeyCodes:$$,isPressed:L$,filter:I$,trigger:D$,unbind:Dy,keyMap:Po,modifier:gr,modifierMap:mo};for(const e in Jl)Object.prototype.hasOwnProperty.call(Jl,e)&&(hr[e]=Jl[e]);if(typeof window<"u"){const e=window.hotkeys;hr.noConflict=t=>(t&&window.hotkeys===hr&&(window.hotkeys=e),hr),window.hotkeys=hr}hr.filter=()=>!0;function N$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{hr.unbind(e,a)};W.useEffect(()=>(hr(e,r,a),l),[e,r,a])}const j$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function z$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function W$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function U$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function B$(e){const[t,r]=W.useState(e),i=(a,l)=>{r(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 Ny=W.createContext(""),H$=e=>M.jsx(Ny.Provider,{value:e.value,children:e.children}),q$=()=>{const e=W.useContext(Ny);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function Z$(e){const[t,r]=W.useState(e),i=W.useMemo(()=>G$(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function G$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${Ve.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const K$=(e,t,r={})=>{r={timeout:200,...r};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)},r.timeout)),a.detail%2===0&&e(a,...l)},[t,e,r.timeout])};function mt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=tI[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Si(e){return!!e&&!!e[qt]}function Hn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===rI})(e)||Array.isArray(e)||!!e[Em]||!!(!((t=e.constructor)===null||t===void 0)&&t[Em])||vf(e)||yf(e))}function ko(e,t,r){r===void 0&&(r=!1),Oi(e)===0?(r?Object.keys:Sf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function Oi(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:vf(e)?2:yf(e)?3:0}function Oc(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function V$(e,t){return Oi(e)===2?e.get(t):e[t]}function jy(e,t,r){var i=Oi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function Y$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function vf(e){return Q$&&e instanceof Map}function yf(e){return eI&&e instanceof Set}function Ln(e){return e.o||e.t}function bf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=nI(e);delete t[qt];for(var r=Sf(t),i=0;i<r.length;i++){var s=r[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 $o(e,t){return t===void 0&&(t=!1),wf(e)||Si(e)||!Hn(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=X$),Object.freeze(e),t&&ko(e,(function(r,i){return $o(i,!0)}),!0)),e}function X$(){mt(2)}function wf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rr(e){var t=iI[e];return t||mt(18,e),t}function mm(){return process.env.NODE_ENV==="production"||Ei||mt(0),Ei}function Ql(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function _a(e){Ac(e),e.p.forEach(J$),e.p=null}function Ac(e){e===Ei&&(Ei=e.l)}function vm(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function J$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function ec(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Rr("ES5").S(t,e,i),i?(r[qt].P&&(_a(t),mt(4)),Hn(e)&&(e=Oa(t,e),t.l||Aa(t,e)),t.u&&Rr("Patches").M(r[qt].t,e,t.u,t.s)):e=Oa(t,r,[]),_a(t),t.u&&t.v(t.u,t.s),e!==Wy?e:void 0}function Oa(e,t,r){if(wf(t))return t;var i=t[qt];if(!i)return ko(t,(function(c,f){return ym(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Aa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=bf(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),ko(a,(function(c,f){return ym(e,i,s,c,f,r,l)})),Aa(e,s,!1),r&&e.u&&Rr("Patches").N(i,r,e.u,e.s)}return i.o}function ym(e,t,r,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===r&&mt(5),Si(s)){var c=Oa(e,s,a&&t&&t.i!==3&&!Oc(t.R,i)?a.concat(i):void 0);if(jy(r,i,c),!Si(c))return;e.m=!1}else l&&r.add(s);if(Hn(s)&&!wf(s)){if(!e.h.D&&e._<1)return;Oa(e,s),t&&t.A.l||Aa(e,s)}}function Aa(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&$o(t,r)}function tc(e,t){var r=e[qt];return(r?Ln(r):e)[t]}function bm(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Tc(e){e.P||(e.P=!0,e.l&&Tc(e.l))}function rc(e){e.o||(e.o=bf(e.t))}function Rc(e,t,r){var i=vf(t)?Rr("MapSet").F(t,r):yf(t)?Rr("MapSet").T(t,r):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:mm(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,v=Pc;l&&(f=[c],v=vo);var m=Proxy.revocable(f,v),g=m.revoke,p=m.proxy;return c.k=p,c.j=g,p})(t,r):Rr("ES5").J(t,r);return(r?r.A:mm()).p.push(i),i}function zy(e){return Si(e)||mt(22,e),(function t(r){if(!Hn(r))return r;var i,s=r[qt],a=Oi(r);if(s){if(!s.P&&(s.i<4||!Rr("ES5").K(s)))return s.t;s.I=!0,i=wm(r,a),s.I=!1}else i=wm(r,a);return ko(i,(function(l,c){s&&V$(s.t,l)===c||jy(i,l,t(c))})),a===3?new Set(i):i})(e)}function wm(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return bf(e)}var xm,Ei,xf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Q$=typeof Map<"u",eI=typeof Set<"u",Sm=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Wy=xf?Symbol.for("immer-nothing"):((xm={})["immer-nothing"]=!0,xm),Em=xf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=xf?Symbol.for("immer-state"):"__$immer_state",tI={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"},rI=""+Object.prototype.constructor,Sf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,nI=Object.getOwnPropertyDescriptors||function(e){var t={};return Sf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},iI={},Pc={get:function(e,t){if(t===qt)return e;var r=Ln(e);if(!Oc(r,t))return(function(s,a,l){var c,f=bm(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,r,t);var i=r[t];return e.I||!Hn(i)?i:i===tc(e.t,t)?(rc(e),e.o[t]=Rc(e.A.h,i,e)):i},has:function(e,t){return t in Ln(e)},ownKeys:function(e){return Reflect.ownKeys(Ln(e))},set:function(e,t,r){var i=bm(Ln(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=tc(Ln(e),t),a=s==null?void 0:s[qt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Y$(r,s)&&(r!==void 0||Oc(e.t,t)))return!0;rc(e),Tc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return tc(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,rc(e),Tc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ln(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){mt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){mt(12)}},vo={};ko(Pc,(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))&&mt(13),vo.set.call(this,e,t,void 0)},vo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&mt(14),Pc.set.call(this,e[0],t,r,e[0])};var oI=(function(){function e(r){var i=this;this.O=Sm,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 w=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,[w,R].concat(S))}))}}var v;if(typeof a!="function"&&mt(6),l!==void 0&&typeof l!="function"&&mt(7),Hn(s)){var m=vm(i),g=Rc(i,s,void 0),p=!0;try{v=a(g),p=!1}finally{p?_a(m):Ac(m)}return typeof Promise<"u"&&v instanceof Promise?v.then((function(d){return Ql(m,l),ec(d,m)}),(function(d){throw _a(m),d})):(Ql(m,l),ec(v,m))}if(!s||typeof s!="object"){if((v=a(s))===void 0&&(v=s),v===Wy&&(v=void 0),i.D&&$o(v,!0),l){var b=[],x=[];Rr("Patches").M(s,v,b,x),l(b,x)}return v}mt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(v){for(var m=arguments.length,g=Array(m>1?m-1:0),p=1;p<m;p++)g[p-1]=arguments[p];return i.produceWithPatches(v,(function(b){return s.apply(void 0,[b].concat(g))}))};var l,c,f=i.produce(s,a,(function(v,m){l=v,c=m}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(v){return[v,l,c]})):[f,l,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Hn(r)||mt(8),Si(r)&&(r=zy(r));var i=vm(this),s=Rc(this,r,void 0);return s[qt].C=!0,Ac(i),s},t.finishDraft=function(r,i){var s=r&&r[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||mt(9),s.I&&mt(10));var a=s.A;return Ql(a,i),ec(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Sm&&mt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rr("Patches").$;return Si(r)?l(r,i):this.produce(r,(function(c){return l(c,i)}))},e})(),Zt=new oI,sI=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 aI(e){var t=W.useState(function(){return $o(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],W.useCallback(function(i){r(typeof i=="function"?sI(i):$o(i))},[])]}const uI=process.env.NODE_ENV==="development",nc=uI&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,lI=(e,t,r)=>{const[i,s]=aI(e),a=W.useRef(null);W.useEffect(()=>{var f;return r&&(a.current=nc==null?void 0:nc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var v,m;(m=(v=a.current)==null?void 0:v.disconnect)==null||m.call(v)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,v)=>({...f,[v]:m=>(s(g=>{var p;l[v](g,m),(p=a.current)==null||p.send({type:l[v].name},zy(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zr(e){return typeof e=="function"}function Uy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var ic=Uy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
202
202
|
`+r.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
|
203
203
|
`):"",this.name="UnsubscriptionError",this.errors=r}});function Cc(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var qa=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,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=dc(l),f=c.next();!f.done;f=c.next()){var v=f.value;v.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else l.remove(this);var m=this.initialTeardown;if(Zr(m))try{m()}catch(d){a=d instanceof ic?d.errors:[d]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var p=dc(g),b=p.next();!b.done;b=p.next()){var x=b.value;try{_m(x)}catch(d){a=a??[],d instanceof ic?a=ya(ya([],pc(a)),pc(d.errors)):a.push(d)}}}catch(d){i={error:d}}finally{try{b&&!b.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}if(a)throw new ic(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)_m(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Cc(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Cc(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),By=qa.EMPTY;function Hy(e){return e instanceof qa||e&&"closed"in e&&Zr(e.remove)&&Zr(e.add)&&Zr(e.unsubscribe)}function _m(e){Zr(e)?e():e.unsubscribe()}var cI={Promise:void 0},fI={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ya([e,t],pc(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function dI(e){fI.setTimeout(function(){throw e})}function Om(){}function pa(e){e()}var qy=(function(e){Fa(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,Hy(r)&&r.add(i)):i.destination=gI,i}return t.create=function(r,i,s){return new kc(r,i,s)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(qa),pI=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){ta(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){ta(i)}else ta(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ta(r)}},e})(),kc=(function(e){Fa(t,e);function t(r,i,s){var a=e.call(this)||this,l;return Zr(r)||!r?l={next:r??void 0,error:i??void 0,complete:s??void 0}:l=r,a.destination=new pI(l),a}return t})(qy);function ta(e){dI(e)}function hI(e){throw e}var gI={closed:!0,next:Om,error:hI,complete:Om},mI=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function vI(e){return e}function yI(e){return e.length===0?vI:e.length===1?e[0]:function(r){return e.reduce(function(i,s){return s(i)},r)}}var Am=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var s=this,a=wI(t)?t:new kc(t,r,i);return pa(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(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Tm(r),new r(function(s,a){var l=new kc({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 r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[mI]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return yI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Tm(t),new t(function(i,s){var a;r.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 Tm(e){var t;return(t=e??cI.Promise)!==null&&t!==void 0?t:Promise}function bI(e){return e&&Zr(e.next)&&Zr(e.error)&&Zr(e.complete)}function wI(e){return e&&e instanceof qy||bI(e)&&Hy(e)}var xI=Uy(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),kr=(function(e){Fa(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Rm(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new xI},t.prototype.next=function(r){var i=this;pa(function(){var s,a;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=dc(i.currentObservers),c=l.next();!c.done;c=l.next()){var f=c.value;f.next(r)}}catch(v){s={error:v}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var i=this;pa(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var s=i.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;pa(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.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 r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,s=this,a=s.hasError,l=s.isStopped,c=s.observers;return a||l?By:(this.currentObservers=null,c.push(r),new qa(function(){i.currentObservers=null,Cc(c,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,s=i.hasError,a=i.thrownError,l=i.isStopped;s?r.error(a):l&&r.complete()},t.prototype.asObservable=function(){var r=new Am;return r.source=this,r},t.create=function(r,i){return new Rm(r,i)},t})(Am),Rm=(function(e){Fa(t,e);function t(r,i){var s=e.call(this)||this;return s.destination=r,s.source=i,s}return t.prototype.next=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,r)},t.prototype.error=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&s!==void 0?s:By},t})(kr),Zy=(e=>(e.RELOAD="reload",e.RECOMPUTE="recompute",e))(Zy||{}),Gy=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(Gy||{});const SI=new kr,EI=new kr,Ky=new kr;var Vy=(e=>(e.SAVE_ALL="save-all",e))(Vy||{});const _I=new kr;var Yy=(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))(Yy||{});const OI=new kr;var Xy=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(Xy||{});const AI=new kr,TI=new kr;var Io=(e=>(e.EVENT_STARTED="event-started",e.EVENT_ENDED="event-ended",e.EVENT_EMITED="event-emited",e.REQUEST_SENT="request-sent",e))(Io||{});const Ta=new kr,RI=new kr,Ef=255;var _f=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${Ef} characters (including extension)`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(_f||{});function Jy(e,t){const r=t?e.replace(/\.[^.]+$/,""):e;if(e==="")throw new Error("Please enter a valid name");if(e.length>Ef)throw new Error(_f.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(r))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(r))throw new Error("Invalid name");return!0}function PI(e){if(!e)return null;if(typeof e=="string")try{Jy(e)}catch(t){return t.message}}function CI(e,t){let r="";if(["array","object"].includes(t))try{const i=JSON.parse(e);t==="array"&&(!Array.isArray(i)||!Ve.isObject(i))&&(r=`Invalid value for type ${t}`),t==="object"&&(!Ve.isObject(i)||Array.isArray(i))&&(r=`Invalid value for type ${t}`)}catch{r=`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)||(r=`Invalid value for type ${t}`)),t==="number"&&isNaN(+e)&&(r=`Invalid value for type ${t}`),["boolean","bool"].includes(t)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(r=`Invalid value for type ${t}`),r}function kI(){return{PLACEHOLDER_PREFIX:`@!MASK_${Date.now().toString(36)+Math.random().toString(36).substring(2,8)}_`,counter:0}}function Za(e){const{PLACEHOLDER_PREFIX:t,counter:r}=kI();let i=r;const s=[],a="@!",l=m=>(s.push(m),`${t}${i++}${a}`);let c=e.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,l);c=c.replace(/([\{\s]\s*\w+\s*)(:\s*\d+)/g,(m,g,p)=>g+l(p)),c=c.replace(/:\d{2}:\d{2}/g,l);const f=new RegExp(":(?!4D\\.\\w+)[CPK]?\\d+","g");let v=c.replace(f,"");for(let m=0;m<s.length;m++){const p=`${t}${m}${a}`.replace(/([.*+?^${}()|[\]\\])/g,"\\$1"),b=new RegExp(p,"g");v=v.replace(b,s[m])}return v}var Of=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(Of||{});const hn={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var Ke=(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))(Ke||{}),bn=(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))(bn||{}),Af=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(Af||{});const Qy="roles.json",e0="qodlyApp.json",$I="model.4DModel",t0="HTTPHandlers.json",r0="Shared/i18n.json";function II(e){const t=Tf(e);switch(t){case Ke.SETTINGS:return{filename:"Settings",type:t};case Ke.HTTP_HANDLERS:return{filename:"HTTP Handlers",type:t};case Ke.ROLES:return{filename:"Roles & Privileges",type:t};case Ke.LOCALIZATION:return{filename:"Localization",type:t};case Ke.MODEL:return{filename:"Model",type:t};default:{const r=e.split("/"),[i]=r[1].split(".");return{filename:i,type:t}}}}function Tf(e){const t=e.split("."),r=t.pop(),i=t.join(".").split("/")[0];switch(!0){case r==="4DModel":return Ke.MODEL;case r==="WebForm":return Ke.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&i===hn.METHODS):return Ke.METHOD;case(["4dm","4qs","4qm"].includes(r)&&i===hn.CLASSES):return Ke.CLASS;case e===Qy:return Ke.ROLES;case e===t0:return Ke.HTTP_HANDLERS;case e===e0:return Ke.SETTINGS;case e===r0:return Ke.LOCALIZATION;default:return Ke.TEXT}}function LI(e,t=!1){switch(e){case hn.REPORTS:case"report":return"QoDoc";case hn.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case hn.CLASSES:case hn.METHODS:return t?"4qs":"4dm";default:return""}}function MI(e,t=""){const r=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return r?r[1]:t}function FI(e,t,r){switch(t){case Ke.MOBILEFORM:return`${e}.MForm`;case Ke.WEBFORM:return`${e}.WebForm`;case Ke.REPORT:return`${e}.QoDoc`;case Ke.METHOD:case Ke.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}class n0{constructor(){this.current=Promise.resolve()}lock(){let t;const r=new Promise(s=>{t=s}),i=this.current.then(()=>t);return this.current=r,i}}function Rf(){const e=new n0;return async t=>{const r=await e.lock();try{const i=await t();return r(),i}catch(i){console.error(i),r();return}}}const i0=Ve.curry((e,t,r)=>e&&Ve.get(r,e)===t),DI=Ve.curry((e,t,r)=>Ve.get(r,e)!==t),NI=Ve.curry((e,t)=>Ve.get(t,"id")!==e),jI=Ve.curry((e,t)=>Ve.get(t,"id")===e),zI=Ve.curry((e,t)=>Ve.get(t,"path")===e);function WI(e="id",t,r){return r.findIndex(i0(e,t))!==-1}function o0(e,t){return e.localeCompare(t,void 0,{numeric:!0})}function UI(e){if(!e)return"";const{id:t,namespace:r}=e;return r&&t?`${r}:${t}`:t}function BI(e=""){const t=e.trim().split(":")||[];let r="",i="";return t.length>1?(r=t[1],i=t[0]):r=t[0],{id:r,namespace:i,root:r.split(".").filter(Boolean)[0],original:i?`${i}:${r}`:r,parts:t}}function s0(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function HI(e){return e.type==="object"}function a0(e){var t;return e.kind==="relatedEntities"||((t=e.type)==null?void 0:t.includes("Selection"))||e.behavior==="relatedEntities"}function u0(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!s0(e)}function qI(e){return a0(e)||u0(e)}function ZI(e){return e.applyTo==="dataStore"}function GI(e){return e.applyTo==="dataClass"}function KI(e){return e.applyTo==="entity"}function VI(e){return e.applyTo==="entityCollection"}function YI(e){return e.type==="entity"}function XI(e){return e.type==="entitysel"}function l0(e){return e.dataType==="array"}function c0(e){return e.dataType==="object"}function f0(e){return e.type==="scalar"}function JI(e){return l0(e)||c0(e)||f0(e)}const QI=e=>e!=null&&e.type==="entity",e2=e=>e.type==="entitysel",t2=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",r2=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",n2=e=>e.type==="scalar"&&e.dataType==="date",i2=(e,t)=>(e||"")===(t||"");function o2(){return new Promise((e,t)=>{window.addEventListener("bundle:ready",r=>r.data?e():t(r.caughtErr))})}function s2(){return new Promise(e=>{window.addEventListener("i18n:ready",()=>e())})}const yo="Qodly",d0="Location",p0="UserLanguage",h0="Title",Ra={[yo]:[{id:h0,dataType:"string",type:"scalar",namespace:yo,initialValue:""},{id:d0,dataType:"object",type:"scalar",namespace:yo,initialValue:{urlQuery:[],urlPath:{},Anchor:""},schema:{type:"object",properties:[{name:"urlQuery",type:"object",initialValue:{}},{name:"urlPath",type:"array",initialValue:[]},{name:"Anchor",type:"string",initialValue:""}]}},{id:p0,dataType:"object",type:"scalar",namespace:yo,initialValue:{selected:{},supported:[]},schema:{type:"object",properties:[{name:"selected",type:"object",initialValue:{},attributes:[{name:"isocode",type:"string"},{name:"local",type:"string"},{name:"native",type:"string"},{name:"flag",type:"string"}]},{name:"supported",type:"array",initialValue:[],attributes:[{name:"isocode",type:"string"},{name:"local",type:"string"},{name:"native",type:"string"},{name:"flag",type:"string"}]}]}}]};var Lo=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(Lo||{}),g0=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(g0||{}),Pf=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Pf||{});const a2={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function u2(e){var a;let t={};try{const l=((a=e.match(/\/\/%attributes = (.*)/))==null?void 0:a[1])||"";t=JSON.parse(l)}catch{}const{published4DMobile:r,...i}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:Lo.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!r,publishedRestOptions:r||{table:"",scope:Pf.table}},...i}}function m0(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[Lo.capable,Lo.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 l2(e,t,r=!1){const i=Ve.isString(t)?t:m0(t);if(!r&&v0(e))return e;const s=y0(e);return`//%attributes = ${i}\r
|
|
204
204
|
${s}`}function v0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function y0(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const c2=()=>Hc.uuid().replaceAll("-","").toUpperCase(),f2=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_{2,}/g,"_").replace(/^_|_$/g,"");function b0(e){var r;if(!e||typeof e!="object")return[];const t=((r=e.__STATUS)==null?void 0:r.errors)??e.__ERRORS??e.errorStack;return Array.isArray(t)?t:[]}function w0(e,t){return t?e.filter(r=>r.seriousError===!0):[]}function d2(e,t){const r=b0(e);return w0(r,t)}function p2(e){const t=e.map(r=>typeof r.message=="string"?r.message:String(r));return t.length===0?[]:[{messages:t}]}const ot="/rest/$designer",Ho="/rest/$designer-ext";function h2(...e){return t=>{if(e.length===0)return t;const r={...t};return e.forEach(i=>{typeof r[i]=="string"&&(r[i]=new Date(r[i]))}),r}}class $c extends Error{constructor(t,r,i){super(),this.url=t,this.response=r,this.data=i}log(){console.error("Error while sending the request",this)}}async function Me(e,t){var s;Ta.next({action:Io.REQUEST_SENT});const r=await window.fetch(e,t);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const l=await r.json();((s=l==null?void 0:l.__ERROR)==null?void 0:s.some(f=>f.errCode===1651))&&Ta.next({action:Io.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),a=new $c(e,r,l)}catch{a=new $c(e,r)}throw a.log(),a}return await r.json()}function g2(e){return Ta.next({action:Io.REQUEST_SENT}),e}var xr={},ht={},Pm;function Fn(){if(Pm)return ht;Pm=1;var e=ht.ValidationError=function(d,w,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}w!==void 0&&(this.instance=w),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,w,h,S){this.instance=d,this.schema=w,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 w;if(typeof d=="string")w=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");w=new e(d.message,this.instance,this.schema,this.path,d.name,d.argument)}if(this.errors.push(w),this.throwFirst)throw new i(this);if(this.throwError)throw w;return w},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 r(x,d){return d+": "+x.toString()+`
|