@ws-ui/shared 0.2.22 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -27
- package/dist/declarations/datasources/cache.d.ts +26 -26
- package/dist/declarations/datasources/dataclass.d.ts +47 -47
- package/dist/declarations/datasources/datasource.d.ts +373 -373
- package/dist/declarations/datasources/datastore.d.ts +62 -62
- package/dist/declarations/datasources/entitysel.d.ts +68 -68
- package/dist/declarations/datasources/interfaces/catalog.d.ts +115 -115
- package/dist/declarations/datasources/interfaces/dataclass-attribute.d.ts +88 -88
- package/dist/declarations/datasources/methods.d.ts +88 -88
- package/dist/declarations/datasources/rest.d.ts +18 -18
- package/dist/declarations/http-methods.d.ts +70 -70
- package/dist/declarations/index.d.ts +9 -9
- package/dist/declarations/webform/webform.d.ts +259 -259
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/tailwind.preset.js +148 -148
- package/dist/types/webform-editor.d.ts +1 -0
- package/dist/utils/subjects.d.ts +31 -3
- package/package.json +73 -73
package/dist/index.cjs.js
CHANGED
|
@@ -201,6 +201,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
201
201
|
`)+K+`return __p
|
|
202
202
|
}`;var Pe=Wd(function(){return Fe(b,re+"return "+K).apply(n,x)});if(Pe.source=K,vu(Pe))throw Pe;return Pe}function u_(t){return He(t).toLowerCase()}function l_(t){return He(t).toUpperCase()}function c_(t,i,s){if(t=He(t),t&&(s||i===n))return Yc(t);if(!t||!(i=Jt(i)))return t;var c=_n(t),h=_n(i),b=Xc(c,h),x=Vc(c,h)+1;return dr(c,b,x).join("")}function f_(t,i,s){if(t=He(t),t&&(s||i===n))return t.slice(0,Zc(t)+1);if(!t||!(i=Jt(i)))return t;var c=_n(t),h=Vc(c,_n(i))+1;return dr(c,0,h).join("")}function d_(t,i,s){if(t=He(t),t&&(s||i===n))return t.replace(F,"");if(!t||!(i=Jt(i)))return t;var c=_n(t),h=Xc(c,_n(i));return dr(c,h).join("")}function p_(t,i){var s=ee,c=ge;if(tt(i)){var h="separator"in i?i.separator:h;s="length"in i?Re(i.length):s,c="omission"in i?Jt(i.omission):c}t=He(t);var b=t.length;if(si(t)){var x=_n(t);b=x.length}if(s>=b)return t;var R=s-ui(c);if(R<1)return c;var M=x?dr(x,0,R).join(""):t.slice(0,R);if(h===n)return M+c;if(x&&(R+=M.length-R),mu(h)){if(t.slice(R).search(h)){var z,q=M;for(h.global||(h=Ls(h.source,He(ot.exec(h))+"g")),h.lastIndex=0;z=h.exec(q);)var K=z.index;M=M.slice(0,K===n?R:K)}}else if(t.indexOf(Jt(h),R)!=R){var Z=M.lastIndexOf(h);Z>-1&&(M=M.slice(0,Z))}return M+c}function h_(t){return t=He(t),t&&Pr.test(t)?t.replace(ri,Bg):t}var v_=vi(function(t,i,s){return t+(s?" ":"")+i.toUpperCase()}),wu=Hf("toUpperCase");function Fd(t,i,s){return t=He(t),i=s?n:i,i===n?jg(t)?Gg(t):Pg(t):t.match(i)||[]}var Wd=Ae(function(t,i){try{return Xt(t,n,i)}catch(s){return vu(s)?s:new Ee(s)}}),m_=Kn(function(t,i){return sn(i,function(s){s=Mn(s),qn(t,s,pu(t[s],t))}),t});function g_(t){var i=t==null?0:t.length,s=he();return t=i?et(t,function(c){if(typeof c[1]!="function")throw new un(l);return[s(c[0]),c[1]]}):[],Ae(function(c){for(var h=-1;++h<i;){var b=t[h];if(Xt(b[0],this,c))return Xt(b[1],this,c)}})}function y_(t){return B0(cn(t,_))}function bu(t){return function(){return t}}function w_(t,i){return t==null||t!==t?i:t}var b_=Bf(),__=Bf(!0);function zt(t){return t}function _u(t){return wf(typeof t=="function"?t:cn(t,_))}function S_(t){return _f(cn(t,_))}function E_(t,i){return Sf(t,cn(i,_))}var x_=Ae(function(t,i){return function(s){return Yi(s,t,i)}}),O_=Ae(function(t,i){return function(s){return Yi(t,s,i)}});function Su(t,i,s){var c=yt(i),h=Zo(i,c);s==null&&!(tt(i)&&(h.length||!c.length))&&(s=i,i=t,t=this,h=Zo(i,yt(i)));var b=!(tt(s)&&"chain"in s)||!!s.chain,x=Xn(t);return sn(h,function(R){var M=i[R];t[R]=M,x&&(t.prototype[R]=function(){var z=this.__chain__;if(b||z){var q=t(this.__wrapped__),K=q.__actions__=Ht(this.__actions__);return K.push({func:M,args:arguments,thisArg:t}),q.__chain__=z,q}return M.apply(t,ar([this.value()],arguments))})}),t}function T_(){return _t._===this&&(_t._=Zg),this}function Eu(){}function C_(t){return t=Re(t),Ae(function(i){return Ef(i,t)})}var R_=eu(et),P_=eu(Bc),A_=eu(Os);function Hd(t){return su(t)?Ts(Mn(t)):ay(t)}function I_(t){return function(i){return t==null?n:$r(t,i)}}var L_=qf(),M_=qf(!0);function xu(){return[]}function Ou(){return!1}function D_(){return{}}function k_(){return""}function N_(){return!0}function $_(t,i){if(t=Re(t),t<1||t>We)return[];var s=X,c=Ct(t,X);i=he(i),t-=X;for(var h=Ps(c,i);++s<t;)i(s);return h}function j_(t){return Te(t)?et(t,Mn):Zt(t)?[t]:Ht(sd(He(t)))}function F_(t){var i=++Vg;return He(t)+i}var W_=ia(function(t,i){return t+i},0),H_=tu("ceil"),U_=ia(function(t,i){return t/i},1),B_=tu("floor");function z_(t){return t&&t.length?Jo(t,zt,Ws):n}function q_(t,i){return t&&t.length?Jo(t,he(i,2),Ws):n}function G_(t){return Gc(t,zt)}function K_(t,i){return Gc(t,he(i,2))}function Y_(t){return t&&t.length?Jo(t,zt,zs):n}function X_(t,i){return t&&t.length?Jo(t,he(i,2),zs):n}var V_=ia(function(t,i){return t*i},1),J_=tu("round"),Z_=ia(function(t,i){return t-i},0);function Q_(t){return t&&t.length?Rs(t,zt):0}function eS(t,i){return t&&t.length?Rs(t,he(i,2)):0}return w.after=Sw,w.ary=yd,w.assign=lb,w.assignIn=Ld,w.assignInWith=ga,w.assignWith=cb,w.at=fb,w.before=wd,w.bind=pu,w.bindAll=m_,w.bindKey=bd,w.castArray=Dw,w.chain=vd,w.chunk=By,w.compact=zy,w.concat=qy,w.cond=g_,w.conforms=y_,w.constant=bu,w.countBy=Q1,w.create=db,w.curry=_d,w.curryRight=Sd,w.debounce=Ed,w.defaults=pb,w.defaultsDeep=hb,w.defer=Ew,w.delay=xw,w.difference=Gy,w.differenceBy=Ky,w.differenceWith=Yy,w.drop=Xy,w.dropRight=Vy,w.dropRightWhile=Jy,w.dropWhile=Zy,w.fill=Qy,w.filter=tw,w.flatMap=iw,w.flatMapDeep=ow,w.flatMapDepth=aw,w.flatten=fd,w.flattenDeep=e1,w.flattenDepth=t1,w.flip=Ow,w.flow=b_,w.flowRight=__,w.fromPairs=n1,w.functions=_b,w.functionsIn=Sb,w.groupBy=sw,w.initial=i1,w.intersection=o1,w.intersectionBy=a1,w.intersectionWith=s1,w.invert=xb,w.invertBy=Ob,w.invokeMap=lw,w.iteratee=_u,w.keyBy=cw,w.keys=yt,w.keysIn=Bt,w.map=fa,w.mapKeys=Cb,w.mapValues=Rb,w.matches=S_,w.matchesProperty=E_,w.memoize=pa,w.merge=Pb,w.mergeWith=Md,w.method=x_,w.methodOf=O_,w.mixin=Su,w.negate=ha,w.nthArg=C_,w.omit=Ab,w.omitBy=Ib,w.once=Tw,w.orderBy=fw,w.over=R_,w.overArgs=Cw,w.overEvery=P_,w.overSome=A_,w.partial=hu,w.partialRight=xd,w.partition=dw,w.pick=Lb,w.pickBy=Dd,w.property=Hd,w.propertyOf=I_,w.pull=f1,w.pullAll=pd,w.pullAllBy=d1,w.pullAllWith=p1,w.pullAt=h1,w.range=L_,w.rangeRight=M_,w.rearg=Rw,w.reject=vw,w.remove=v1,w.rest=Pw,w.reverse=fu,w.sampleSize=gw,w.set=Db,w.setWith=kb,w.shuffle=yw,w.slice=m1,w.sortBy=_w,w.sortedUniq=E1,w.sortedUniqBy=x1,w.split=i_,w.spread=Aw,w.tail=O1,w.take=T1,w.takeRight=C1,w.takeRightWhile=R1,w.takeWhile=P1,w.tap=z1,w.throttle=Iw,w.thru=ca,w.toArray=Pd,w.toPairs=kd,w.toPairsIn=Nd,w.toPath=j_,w.toPlainObject=Id,w.transform=Nb,w.unary=Lw,w.union=A1,w.unionBy=I1,w.unionWith=L1,w.uniq=M1,w.uniqBy=D1,w.uniqWith=k1,w.unset=$b,w.unzip=du,w.unzipWith=hd,w.update=jb,w.updateWith=Fb,w.values=yi,w.valuesIn=Wb,w.without=N1,w.words=Fd,w.wrap=Mw,w.xor=$1,w.xorBy=j1,w.xorWith=F1,w.zip=W1,w.zipObject=H1,w.zipObjectDeep=U1,w.zipWith=B1,w.entries=kd,w.entriesIn=Nd,w.extend=Ld,w.extendWith=ga,Su(w,w),w.add=W_,w.attempt=Wd,w.camelCase=zb,w.capitalize=$d,w.ceil=H_,w.clamp=Hb,w.clone=kw,w.cloneDeep=$w,w.cloneDeepWith=jw,w.cloneWith=Nw,w.conformsTo=Fw,w.deburr=jd,w.defaultTo=w_,w.divide=U_,w.endsWith=qb,w.eq=En,w.escape=Gb,w.escapeRegExp=Kb,w.every=ew,w.find=nw,w.findIndex=ld,w.findKey=vb,w.findLast=rw,w.findLastIndex=cd,w.findLastKey=mb,w.floor=B_,w.forEach=md,w.forEachRight=gd,w.forIn=gb,w.forInRight=yb,w.forOwn=wb,w.forOwnRight=bb,w.get=gu,w.gt=Ww,w.gte=Hw,w.has=Eb,w.hasIn=yu,w.head=dd,w.identity=zt,w.includes=uw,w.indexOf=r1,w.inRange=Ub,w.invoke=Tb,w.isArguments=Wr,w.isArray=Te,w.isArrayBuffer=Uw,w.isArrayLike=Ut,w.isArrayLikeObject=ct,w.isBoolean=Bw,w.isBuffer=pr,w.isDate=zw,w.isElement=qw,w.isEmpty=Gw,w.isEqual=Kw,w.isEqualWith=Yw,w.isError=vu,w.isFinite=Xw,w.isFunction=Xn,w.isInteger=Od,w.isLength=va,w.isMap=Td,w.isMatch=Vw,w.isMatchWith=Jw,w.isNaN=Zw,w.isNative=Qw,w.isNil=tb,w.isNull=eb,w.isNumber=Cd,w.isObject=tt,w.isObjectLike=at,w.isPlainObject=eo,w.isRegExp=mu,w.isSafeInteger=nb,w.isSet=Rd,w.isString=ma,w.isSymbol=Zt,w.isTypedArray=gi,w.isUndefined=rb,w.isWeakMap=ib,w.isWeakSet=ob,w.join=u1,w.kebabCase=Yb,w.last=dn,w.lastIndexOf=l1,w.lowerCase=Xb,w.lowerFirst=Vb,w.lt=ab,w.lte=sb,w.max=z_,w.maxBy=q_,w.mean=G_,w.meanBy=K_,w.min=Y_,w.minBy=X_,w.stubArray=xu,w.stubFalse=Ou,w.stubObject=D_,w.stubString=k_,w.stubTrue=N_,w.multiply=V_,w.nth=c1,w.noConflict=T_,w.noop=Eu,w.now=da,w.pad=Jb,w.padEnd=Zb,w.padStart=Qb,w.parseInt=e_,w.random=Bb,w.reduce=pw,w.reduceRight=hw,w.repeat=t_,w.replace=n_,w.result=Mb,w.round=J_,w.runInContext=A,w.sample=mw,w.size=ww,w.snakeCase=r_,w.some=bw,w.sortedIndex=g1,w.sortedIndexBy=y1,w.sortedIndexOf=w1,w.sortedLastIndex=b1,w.sortedLastIndexBy=_1,w.sortedLastIndexOf=S1,w.startCase=o_,w.startsWith=a_,w.subtract=Z_,w.sum=Q_,w.sumBy=eS,w.template=s_,w.times=$_,w.toFinite=Vn,w.toInteger=Re,w.toLength=Ad,w.toLower=u_,w.toNumber=pn,w.toSafeInteger=ub,w.toString=He,w.toUpper=l_,w.trim=c_,w.trimEnd=f_,w.trimStart=d_,w.truncate=p_,w.unescape=h_,w.uniqueId=F_,w.upperCase=v_,w.upperFirst=wu,w.each=md,w.eachRight=gd,w.first=dd,Su(w,function(){var t={};return In(w,function(i,s){qe.call(w.prototype,s)||(t[s]=i)}),t}(),{chain:!1}),w.VERSION=o,sn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){w[t].placeholder=w}),sn(["drop","take"],function(t,i){ke.prototype[t]=function(s){s=s===n?1:vt(Re(s),0);var c=this.__filtered__&&!i?new ke(this):this.clone();return c.__filtered__?c.__takeCount__=Ct(s,c.__takeCount__):c.__views__.push({size:Ct(s,X),type:t+(c.__dir__<0?"Right":"")}),c},ke.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),sn(["filter","map","takeWhile"],function(t,i){var s=i+1,c=s==se||s==we;ke.prototype[t]=function(h){var b=this.clone();return b.__iteratees__.push({iteratee:he(h,3),type:s}),b.__filtered__=b.__filtered__||c,b}}),sn(["head","last"],function(t,i){var s="take"+(i?"Right":"");ke.prototype[t]=function(){return this[s](1).value()[0]}}),sn(["initial","tail"],function(t,i){var s="drop"+(i?"":"Right");ke.prototype[t]=function(){return this.__filtered__?new ke(this):this[s](1)}}),ke.prototype.compact=function(){return this.filter(zt)},ke.prototype.find=function(t){return this.filter(t).head()},ke.prototype.findLast=function(t){return this.reverse().find(t)},ke.prototype.invokeMap=Ae(function(t,i){return typeof t=="function"?new ke(this):this.map(function(s){return Yi(s,t,i)})}),ke.prototype.reject=function(t){return this.filter(ha(he(t)))},ke.prototype.slice=function(t,i){t=Re(t);var s=this;return s.__filtered__&&(t>0||i<0)?new ke(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),i!==n&&(i=Re(i),s=i<0?s.dropRight(-i):s.take(i-t)),s)},ke.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ke.prototype.toArray=function(){return this.take(X)},In(ke.prototype,function(t,i){var s=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),h=w[c?"take"+(i=="last"?"Right":""):i],b=c||/^find/.test(i);h&&(w.prototype[i]=function(){var x=this.__wrapped__,R=c?[1]:arguments,M=x instanceof ke,z=R[0],q=M||Te(x),K=function(De){var Ne=h.apply(w,ar([De],R));return c&&Z?Ne[0]:Ne};q&&s&&typeof z=="function"&&z.length!=1&&(M=q=!1);var Z=this.__chain__,re=!!this.__actions__.length,ve=b&&!Z,Pe=M&&!re;if(!b&&q){x=Pe?x:new ke(this);var me=t.apply(x,R);return me.__actions__.push({func:ca,args:[K],thisArg:n}),new ln(me,Z)}return ve&&Pe?t.apply(this,R):(me=this.thru(K),ve?c?me.value()[0]:me.value():me)})}),sn(["pop","push","shift","sort","splice","unshift"],function(t){var i=No[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);w.prototype[t]=function(){var h=arguments;if(c&&!this.__chain__){var b=this.value();return i.apply(Te(b)?b:[],h)}return this[s](function(x){return i.apply(Te(x)?x:[],h)})}}),In(ke.prototype,function(t,i){var s=w[i];if(s){var c=s.name+"";qe.call(di,c)||(di[c]=[]),di[c].push({name:i,func:s})}}),di[ra(n,D).name]=[{name:"wrapper",func:n}],ke.prototype.clone=h0,ke.prototype.reverse=v0,ke.prototype.value=m0,w.prototype.at=q1,w.prototype.chain=G1,w.prototype.commit=K1,w.prototype.next=Y1,w.prototype.plant=V1,w.prototype.reverse=J1,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=Z1,w.prototype.first=w.prototype.head,Hi&&(w.prototype[Hi]=X1),w},li=Kg();Lr?((Lr.exports=li)._=li,_s._=li):_t._=li}).call(zr)})(Qa,Qa.exports);var pt=Qa.exports;const Ml={FdSave:RE,FdWarningDanger:Kl,FdInfoCircle:OE,FdInfoBold:yl};var fc=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(fc||{}),Xr=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(Xr||{}),Oi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(Oi||{});const rm={[Xr.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[Xr.DANGER]:{icon:"red-500",button:"primary-dark"},[Xr.WARNING]:{icon:"yellow-400",button:"primary-dark"}},ol=({color:e=Xr.PRIMARY,variant:r="solid",children:n,autoFocus:o,...a})=>{const u=rm[e].button,l=r==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${u}`:`text-white bg-${u} border border-${u} hover:border-white hover:bg-white hover:text-${u}`;return $.jsx("button",{autoFocus:o,className:Ot("w-28 rounded p-1.5 text-xs font-medium hover:font-bold focus:outline-none",l),...a,children:n})},oP=({name:e,color:r=Xr.PRIMARY,className:n="w-10 h-10"})=>{const o=Ml[e]||Ml.FdInfoCircle,a=`text-${rm[r].icon}`;return $.jsx(o,{className:Ot(n,a)})},aP=({id:e,title:r,message:n,icon:o,type:a,color:u,zIndex:l=3e3,views:f,width:d=520,hasOverlay:v=!0,onClose:g,onEdit:_})=>{const O=y=>{g({id:e,reason:y})};N.useEffect(()=>{function y(E){E.key==="Escape"&&O(Oi.CANCELED)}return window.addEventListener("keyup",y),()=>{window.removeEventListener("keyup",y)}},[]);const m=pt.merge(pt.values(f==null?void 0:f.toggles).flatMap(y=>y.value?y.warnings||[]:[]),f==null?void 0:f.tips),S=(y,E)=>{var I;if(!(f!=null&&f.toggles))return;const D=pt.cloneDeep(f);(I=D.toggles)!=null&&I[y]&&(D.toggles[y].value=E),_({id:e,views:D})};return go.createPortal($.jsx(Za,{appear:!0,show:!0,as:N.Fragment,children:$.jsx("div",{className:Ot("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:()=>O(Oi.CANCELED),children:$.jsx(Za.Child,{as:N.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:$.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-200 bg-grey-500",style:{width:d},onClick:y=>y.stopPropagation(),children:$.jsxs("div",{className:"flex flex-col items-center gap-5 p-6 px-12",children:[o?$.jsx("div",{className:"flex items-center justify-center",children:$.jsx(oP,{name:o,color:u})}):null,$.jsx(sP,{condition:r,children:$.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:r})}),$.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:n}),$.jsx("div",{className:"text-xs text-white",children:pt.values(f==null?void 0:f.toggles).map(y=>$.jsx("div",{children:$.jsxs("label",{htmlFor:y.key,className:"flex items-center",children:[$.jsx(tm,{size:"xs",value:y.value,onChange:E=>S(y.key,E)}),$.jsx("span",{className:"ml-1",children:y.title})]})},y.key))}),$.jsx(uP,{warnings:m}),$.jsx("div",{className:"flex items-center gap-4 p-1",children:a===fc.CONFIRM?$.jsxs($.Fragment,{children:[$.jsx(ol,{autoFocus:!0,color:u,onClick:()=>O(Oi.CONFIRMED),children:"Confirm"}),$.jsx(ol,{color:u,variant:"outlined",onClick:()=>O(Oi.CANCELED),children:"Cancel"})]}):$.jsx(ol,{autoFocus:!0,onClick:()=>O(),children:"OK"})})]})})})})}),document.querySelector("body"))},sP=e=>e.condition?$.jsx($.Fragment,{children:e.children}):null,uP=e=>e.warnings?$.jsx(Za,{appear:!0,show:!!e.warnings.length,as:N.Fragment,children:$.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((r,n)=>$.jsx(Za.Child,{as:N.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:$.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[$.jsx(Kl,{className:Ot({"h-3 w-3":!0,"text-orange-400":r.type==="warning","text-red-400":r.type==="error","text-primary-dark":r.type==="info"},"mr-3")}),$.jsx("div",{className:"flex-1",children:r.message})]})},`modal-warnings-${n}`))})}):null;function lP(e,r){const n=N.useRef(!1);N.useEffect(()=>{if(n.current)return e();n.current=!0},r)}var al=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function sl(e,r,n,o){e.addEventListener?e.addEventListener(r,n,o):e.attachEvent&&e.attachEvent("on".concat(r),function(){n(window.event)})}function im(e,r){for(var n=r.slice(0,r.length-1),o=0;o<n.length;o++)n[o]=e[n[o].toLowerCase()];return n}function om(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var r=e.split(","),n=r.lastIndexOf("");n>=0;)r[n-1]+=",",r.splice(n,1),n=r.lastIndexOf("");return r}function cP(e,r){for(var n=e.length>=r.length?e:r,o=e.length>=r.length?r:e,a=!0,u=0;u<n.length;u++)o.indexOf(n[u])===-1&&(a=!1);return a}var ho={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":al?173:189,"=":al?61:187,";":al?59:186,"'":222,"[":219,"]":221,"\\":220},Hn={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Dl={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},xt={16:!1,18:!1,17:!1,91:!1},st={};for(var Da=1;Da<20;Da++)ho["f".concat(Da)]=111+Da;var Ve=[],fh=!1,am="all",sm=[],Ro=function(r){return ho[r.toLowerCase()]||Hn[r.toLowerCase()]||r.toUpperCase().charCodeAt(0)},fP=function(r){return Object.keys(ho).find(function(n){return ho[n]===r})},dP=function(r){return Object.keys(Hn).find(function(n){return Hn[n]===r})};function um(e){am=e||"all"}function vo(){return am||"all"}function pP(){return Ve.slice(0)}function hP(){return Ve.map(function(e){return fP(e)||dP(e)||String.fromCharCode(e)})}function vP(){var e=[];return Object.keys(st).forEach(function(r){st[r].forEach(function(n){var o=n.key,a=n.scope,u=n.mods,l=n.shortcut;e.push({scope:a,shortcut:l,mods:u,keys:o.split("+").map(function(f){return Ro(f)})})})}),e}function mP(e){var r=e.target||e.srcElement,n=r.tagName,o=!0;return(r.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!r.readOnly)&&(o=!1),o}function gP(e){return typeof e=="string"&&(e=Ro(e)),Ve.indexOf(e)!==-1}function yP(e,r){var n,o;e||(e=vo());for(var a in st)if(Object.prototype.hasOwnProperty.call(st,a))for(n=st[a],o=0;o<n.length;)n[o].scope===e?n.splice(o,1):o++;vo()===e&&um(r||"all")}function wP(e){var r=e.keyCode||e.which||e.charCode,n=Ve.indexOf(r);if(n>=0&&Ve.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Ve.splice(0,Ve.length),(r===93||r===224)&&(r=91),r in xt){xt[r]=!1;for(var o in Hn)Hn[o]===r&&(Pn[o]=!1)}}function bP(e){if(typeof e>"u")Object.keys(st).forEach(function(l){return delete st[l]});else if(Array.isArray(e))e.forEach(function(l){l.key&&ul(l)});else if(typeof e=="object")e.key&&ul(e);else if(typeof e=="string"){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=n[0],u=n[1];typeof a=="function"&&(u=a,a=""),ul({key:e,scope:a,method:u,splitKey:"+"})}}var ul=function(r){var n=r.key,o=r.scope,a=r.method,u=r.splitKey,l=u===void 0?"+":u,f=om(n);f.forEach(function(d){var v=d.split(l),g=v.length,_=v[g-1],O=_==="*"?"*":Ro(_);if(st[O]){o||(o=vo());var m=g>1?im(Hn,v):[];st[O]=st[O].filter(function(S){var y=a?S.method===a:!0;return!(y&&S.scope===o&&cP(S.mods,m))})}})};function dh(e,r,n,o){if(r.element===o){var a;if(r.scope===n||r.scope==="all"){a=r.mods.length>0;for(var u in xt)Object.prototype.hasOwnProperty.call(xt,u)&&(!xt[u]&&r.mods.indexOf(+u)>-1||xt[u]&&r.mods.indexOf(+u)===-1)&&(a=!1);(r.mods.length===0&&!xt[16]&&!xt[18]&&!xt[17]&&!xt[91]||a||r.shortcut==="*")&&(r.keys=[],r.keys=r.keys.concat(Ve),r.method(e,r)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}}function ph(e,r){var n=st["*"],o=e.keyCode||e.which||e.charCode;if(Pn.filter.call(this,e)){if((o===93||o===224)&&(o=91),Ve.indexOf(o)===-1&&o!==229&&Ve.push(o),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var y=Dl[S];e[S]&&Ve.indexOf(y)===-1?Ve.push(y):!e[S]&&Ve.indexOf(y)>-1?Ve.splice(Ve.indexOf(y),1):S==="metaKey"&&e[S]&&Ve.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Ve=Ve.slice(Ve.indexOf(y))))}),o in xt){xt[o]=!0;for(var a in Hn)Hn[a]===o&&(Pn[a]=!0);if(!n)return}for(var u in xt)Object.prototype.hasOwnProperty.call(xt,u)&&(xt[u]=e[Dl[u]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Ve.indexOf(17)===-1&&Ve.push(17),Ve.indexOf(18)===-1&&Ve.push(18),xt[17]=!0,xt[18]=!0);var l=vo();if(n)for(var f=0;f<n.length;f++)n[f].scope===l&&(e.type==="keydown"&&n[f].keydown||e.type==="keyup"&&n[f].keyup)&&dh(e,n[f],l,r);if(o in st){for(var d=0;d<st[o].length;d++)if((e.type==="keydown"&&st[o][d].keydown||e.type==="keyup"&&st[o][d].keyup)&&st[o][d].key){for(var v=st[o][d],g=v.splitKey,_=v.key.split(g),O=[],m=0;m<_.length;m++)O.push(Ro(_[m]));O.sort().join("")===Ve.sort().join("")&&dh(e,v,l,r)}}}}function _P(e){return sm.indexOf(e)>-1}function Pn(e,r,n){Ve=[];var o=om(e),a=[],u="all",l=document,f=0,d=!1,v=!0,g="+",_=!1;for(n===void 0&&typeof r=="function"&&(n=r),Object.prototype.toString.call(r)==="[object Object]"&&(r.scope&&(u=r.scope),r.element&&(l=r.element),r.keyup&&(d=r.keyup),r.keydown!==void 0&&(v=r.keydown),r.capture!==void 0&&(_=r.capture),typeof r.splitKey=="string"&&(g=r.splitKey)),typeof r=="string"&&(u=r);f<o.length;f++)e=o[f].split(g),a=[],e.length>1&&(a=im(Hn,e)),e=e[e.length-1],e=e==="*"?"*":Ro(e),e in st||(st[e]=[]),st[e].push({keyup:d,keydown:v,scope:u,mods:a,shortcut:o[f],method:n,key:o[f],splitKey:g,element:l});typeof l<"u"&&!_P(l)&&window&&(sm.push(l),sl(l,"keydown",function(O){ph(O,l)},_),fh||(fh=!0,sl(window,"focus",function(){Ve=[]},_)),sl(l,"keyup",function(O){ph(O,l),wP(O)},_))}function SP(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(st).forEach(function(n){var o=st[n].filter(function(a){return a.scope===r&&a.shortcut===e});o.forEach(function(a){a&&a.method&&a.method()})})}var ll={getPressedKeyString:hP,setScope:um,getScope:vo,deleteScope:yP,getPressedKeyCodes:pP,getAllKeyCodes:vP,isPressed:gP,filter:mP,trigger:SP,unbind:bP,keyMap:ho,modifier:Hn,modifierMap:Dl};for(var cl in ll)Object.prototype.hasOwnProperty.call(ll,cl)&&(Pn[cl]=ll[cl]);if(typeof window<"u"){var EP=window.hotkeys;Pn.noConflict=function(e){return e&&window.hotkeys===Pn&&(window.hotkeys=EP),Pn},window.hotkeys=Pn}Pn.filter=()=>!0;function xP(e,r,n,o){n instanceof Array&&(o=n,n=void 0),o=o||[],n=n||{};const{preventDefault:a=!0}=n,u=N.useCallback((f,d)=>{a&&f.preventDefault(),setTimeout(()=>r(f,d))},o),l=()=>{Pn.unbind(e,u)};N.useEffect(()=>(Pn(e,n,u),l),[e,n,u])}const OP=e=>{const r=N.useRef(null);return N.useEffect(()=>{const n=o=>{r.current&&!r.current.contains(o.target)&&e(o)};return document.addEventListener("click",n,!0),()=>{document.removeEventListener("click",n,!0)}},[e]),r};function TP(e){const r=N.useRef();return N.useEffect(()=>{r.current=e},[e]),r.current}function CP(e){const r=N.useRef(e);return N.useEffect(()=>{r.current=e},[e]),r}function RP(e){const r=N.useRef(null);return N.useEffect(()=>{e&&(typeof e=="function"?e(r.current):e.current=r.current)}),r}function PP(e){const[r,n]=N.useState(e),o=(u,l)=>{n(f=>({...f,features:{...f.features,[u]:{enabled:l}}}))},a=N.useCallback((...u)=>u.every(l=>{var f;return(f=r.features[l])==null?void 0:f.enabled}),[r.features]);return{setFeature:o,isFeatureEnabled:a}}const lm=N.createContext(""),AP=e=>$.jsx(lm.Provider,{value:e.value,children:e.children}),IP=()=>{const e=N.useContext(lm);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function LP(e){const[r,n]=N.useState(e),o=N.useMemo(()=>MP(r,n),[]);return{state:r,actions:{...o,set:a=>{n(typeof a=="function"?a:u=>({...u,...a}))}}}}function MP(e,r=()=>{}){return Object.keys(e).reduce((o,a)=>({...o,[`set${pt.upperFirst(a)}`]:u=>r(l=>({...l,[a]:u}))}),{})}const DP=(e,r,n={})=>{n={timeout:200,...n};const o=N.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)};return N.useCallback((u,...l)=>{a(),r&&u.detail===1&&(o.current=setTimeout(()=>{r(u,...l)},n.timeout)),u.detail%2===0&&e(u,...l)},[r,e,n.timeout])};function tr(e){return typeof e=="function"}function cm(e){var r=function(o){Error.call(o),o.stack=new Error().stack},n=e(r);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var fl=cm(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
203
203
|
`+n.map(function(o,a){return a+1+") "+o.toString()}).join(`
|
|
204
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function kl(e,r){if(e){var n=e.indexOf(r);0<=n&&e.splice(n,1)}}var ps=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,n,o,a,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=Sl(l),d=f.next();!d.done;d=f.next()){var v=d.value;v.remove(this)}}catch(y){r={error:y}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else l.remove(this);var g=this.initialTeardown;if(tr(g))try{g()}catch(y){u=y instanceof fl?y.errors:[y]}var _=this._finalizers;if(_){this._finalizers=null;try{for(var O=Sl(_),m=O.next();!m.done;m=O.next()){var S=m.value;try{hh(S)}catch(y){u=u??[],y instanceof fl?u=fo(fo([],Ka(u)),Ka(y.errors)):u.push(y)}}}catch(y){o={error:y}}finally{try{m&&!m.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}}if(u)throw new fl(u)}},e.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)hh(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},e.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},e.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},e.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&kl(n,r)},e.prototype.remove=function(r){var n=this._finalizers;n&&kl(n,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),fm=ps.EMPTY;function dm(e){return e instanceof ps||e&&"closed"in e&&tr(e.remove)&&tr(e.add)&&tr(e.unsubscribe)}function hh(e){tr(e)?e():e.unsubscribe()}var pm={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Nl={setTimeout:function(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=Nl.delegate;return a!=null&&a.setTimeout?a.setTimeout.apply(a,fo([e,r],Ka(n))):setTimeout.apply(void 0,fo([e,r],Ka(n)))},clearTimeout:function(e){var r=Nl.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function kP(e){Nl.setTimeout(function(){throw e})}function vh(){}function Ua(e){e()}var hm=function(e){is(r,e);function r(n){var o=e.call(this)||this;return o.isStopped=!1,n?(o.destination=n,dm(n)&&n.add(o)):o.destination=FP,o}return r.create=function(n,o,a){return new $l(n,o,a)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(ps),NP=Function.prototype.bind;function dl(e,r){return NP.call(e,r)}var $P=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(o){ka(o)}},e.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(o){ka(o)}else ka(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){ka(n)}},e}(),$l=function(e){is(r,e);function r(n,o,a){var u=e.call(this)||this,l;if(tr(n)||!n)l={next:n??void 0,error:o??void 0,complete:a??void 0};else{var f;u&&pm.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return u.unsubscribe()},l={next:n.next&&dl(n.next,f),error:n.error&&dl(n.error,f),complete:n.complete&&dl(n.complete,f)}):l=n}return u.destination=new $P(l),u}return r}(hm);function ka(e){kP(e)}function jP(e){throw e}var FP={closed:!0,next:vh,error:jP,complete:vh},WP=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function HP(e){return e}function UP(e){return e.length===0?HP:e.length===1?e[0]:function(n){return e.reduce(function(o,a){return a(o)},n)}}var mh=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var n=new e;return n.source=this,n.operator=r,n},e.prototype.subscribe=function(r,n,o){var a=this,u=zP(r)?r:new $l(r,n,o);return Ua(function(){var l=a,f=l.operator,d=l.source;u.add(f?f.call(u,d):d?a._subscribe(u):a._trySubscribe(u))}),u},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},e.prototype.forEach=function(r,n){var o=this;return n=gh(n),new n(function(a,u){var l=new $l({next:function(f){try{r(f)}catch(d){u(d),l.unsubscribe()}},error:u,complete:a});o.subscribe(l)})},e.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},e.prototype[WP]=function(){return this},e.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return UP(r)(this)},e.prototype.toPromise=function(r){var n=this;return r=gh(r),new r(function(o,a){var u;n.subscribe(function(l){return u=l},function(l){return a(l)},function(){return o(u)})})},e.create=function(r){return new e(r)},e}();function gh(e){var r;return(r=e??pm.Promise)!==null&&r!==void 0?r:Promise}function BP(e){return e&&tr(e.next)&&tr(e.error)&&tr(e.complete)}function zP(e){return e&&e instanceof hm||BP(e)&&dm(e)}var qP=cm(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ti=function(e){is(r,e);function r(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var o=new yh(this,this);return o.operator=n,o},r.prototype._throwIfClosed=function(){if(this.closed)throw new qP},r.prototype.next=function(n){var o=this;Ua(function(){var a,u;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var l=Sl(o.currentObservers),f=l.next();!f.done;f=l.next()){var d=f.value;d.next(n)}}catch(v){a={error:v}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}}})},r.prototype.error=function(n){var o=this;Ua(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=n;for(var a=o.observers;a.length;)a.shift().error(n)}})},r.prototype.complete=function(){var n=this;Ua(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var o=n.observers;o.length;)o.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var o=this,a=this,u=a.hasError,l=a.isStopped,f=a.observers;return u||l?fm:(this.currentObservers=null,f.push(n),new ps(function(){o.currentObservers=null,kl(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var o=this,a=o.hasError,u=o.thrownError,l=o.isStopped;a?n.error(u):l&&n.complete()},r.prototype.asObservable=function(){var n=new mh;return n.source=this,n},r.create=function(n,o){return new yh(n,o)},r}(mh),yh=function(e){is(r,e);function r(n,o){var a=e.call(this)||this;return a.destination=n,a.source=o,a}return r.prototype.next=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.next)===null||a===void 0||a.call(o,n)},r.prototype.error=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.error)===null||a===void 0||a.call(o,n)},r.prototype.complete=function(){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||o===void 0||o.call(n)},r.prototype._subscribe=function(n){var o,a;return(a=(o=this.source)===null||o===void 0?void 0:o.subscribe(n))!==null&&a!==void 0?a:fm},r}(ti),vm=(e=>(e.RELOAD="reload",e))(vm||{}),mm=(e=>(e.RENAME="rename",e))(mm||{});const GP=new ti,KP=new ti,YP=new ti;var gm=(e=>(e.SAVE_ALL="save-all",e))(gm||{});const XP=new ti;var ym=(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))(ym||{});const VP=new ti;var wm=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(wm||{});const JP=new ti,dc=31;var pc=(e=>(e.EMPTY="Please enter a valid name",e[e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${dc} characters`]="LENGTH_EXCEEDED",e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(pc||{});function bm(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>dc)throw new Error(pc.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(e))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(e))throw new Error("Invalid name");return!0}function ZP(e){if(!e)return null;if(typeof e=="string")try{bm(e)}catch(r){return r.message}}function QP(e,r){let n="";if(["array","object"].includes(r))try{const o=JSON.parse(e);r==="array"&&(!Array.isArray(o)||!pt.isObject(o))&&(n=`Invalid value for type ${r}`),r==="object"&&(!pt.isObject(o)||Array.isArray(o))&&(n=`Invalid value for type ${r}`)}catch{n=`Invalid value for type ${r}`}return r==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(n=`Invalid value for type ${r}`)),r==="number"&&isNaN(+e)&&(n=`Invalid value for type ${r}`),["boolean","bool"].includes(r)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(n=`Invalid value for type ${r}`),n}function hs(e){const r=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(r,"")}var hc=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(hc||{});const br={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports"};var Cn=(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.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(Cn||{}),ni=(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))(ni||{}),vc=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(vc||{});const _m="roles.json",Sm="qodlyApp.json",eA="model.4DModel",tA="HTTPHandlers.json";function Em(e){const r=e.split("."),n=r.pop(),o=r.join(".").split("/")[0];switch(!0){case n==="4DModel":return Cn.MODEL;case n==="WebForm":return Cn.WEBFORM;case(["4dm","4qs","4qm"].includes(n)&&o===br.METHODS):return Cn.METHOD;case(["4dm","4qs","4qm"].includes(n)&&o===br.CLASSES):return Cn.CLASS;case e===_m:return Cn.ROLES;case e===Sm:return Cn.SETTINGS;default:return Cn.TEXT}}function nA(e,r=!1){switch(e){case br.REPORTS:case"report":return"QoDoc";case br.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case br.CLASSES:case br.METHODS:return r?"4qs":"4dm";default:return""}}function rA(e,r=""){const n=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return n?n[1]:r}class xm{constructor(){Bd(this,"current",Promise.resolve())}lock(){let r;const n=new Promise(a=>{r=a}),o=this.current.then(()=>r);return this.current=n,o}}function Om(){const e=new xm;return async r=>{const n=await e.lock();try{const o=await r();return n(),o}catch(o){console.error(o),n();return}}}const Tm=pt.curry((e,r,n)=>e&&pt.get(n,e)===r),iA=pt.curry((e,r,n)=>pt.get(n,e)!==r),oA=pt.curry((e,r)=>pt.get(r,"id")!==e),aA=pt.curry((e,r)=>pt.get(r,"id")===e),sA=pt.curry((e,r)=>pt.get(r,"path")===e);function uA(e="id",r,n){return n.findIndex(Tm(e,r))!==-1}function lA(e){if(!e)return"";const{id:r,namespace:n}=e;return n&&r?`${n}:${r}`:r}function Cm(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function cA(e){return e.type==="object"}function Rm(e){var r;return e.kind==="relatedEntities"||((r=e.type)==null?void 0:r.includes("Selection"))||e.behavior==="relatedEntities"}function Pm(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!Cm(e)}function fA(e){return Rm(e)||Pm(e)}function dA(e){return e.applyTo==="dataStore"}function pA(e){return e.applyTo==="dataClass"}function hA(e){return e.applyTo==="entity"}function vA(e){return e.applyTo==="entityCollection"}function mA(e){return e.type==="entity"}function gA(e){return e.type==="entitysel"}function Am(e){return e.dataType==="array"}function Im(e){return e.dataType==="object"}function Lm(e){return e.type==="scalar"}function yA(e){return Am(e)||Im(e)||Lm(e)}const wA=e=>e!=null&&e.type==="entity",bA=e=>e.type==="entitysel",_A=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",SA=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",EA=e=>e.type==="scalar"&&e.dataType==="date";function xA(){return new Promise((e,r)=>{window.addEventListener("bundle:ready",n=>n.data?e():r(n.caughtErr))})}var mo=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(mo||{}),Mm=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(Mm||{}),mc=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(mc||{});const OA={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function TA(e){var u;let r={};try{const l=((u=e.match(/\/\/%attributes = (.*)/))==null?void 0:u[1])||"";r=JSON.parse(l)}catch{}const{published4DMobile:n,...o}=r;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:mo.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!n,publishedRestOptions:n||{table:"",scope:mc.table}},...o}}function Dm(e){const r={};return e.invisible&&(r.invisible=!0),e.shared&&(r.shared=!0),e.executedOnServer&&(r.executedOnServer=!0),e.preemptive&&[mo.capable,mo.incapable].includes(e.preemptive)&&(r.preemptive=e.preemptive),e.publishedSoap&&(r.publishedSoap=!0,e.publishedWsdl&&(r.publishedWsdl=!0)),e.publishedWeb&&(r.publishedWeb=!0),e.publishedSql&&(r.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(r.published4DMobile=e.publishedRestOptions),JSON.stringify(r).replace(/"(true|false)"/g,"$1")}function CA(e,r,n=!1){const o=pt.isString(r)?r:Dm(r);if(!n&&km(e))return e;const a=Nm(e);return`//%attributes = ${o}\r
|
|
204
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function kl(e,r){if(e){var n=e.indexOf(r);0<=n&&e.splice(n,1)}}var ps=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,n,o,a,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=Sl(l),d=f.next();!d.done;d=f.next()){var v=d.value;v.remove(this)}}catch(y){r={error:y}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else l.remove(this);var g=this.initialTeardown;if(tr(g))try{g()}catch(y){u=y instanceof fl?y.errors:[y]}var _=this._finalizers;if(_){this._finalizers=null;try{for(var O=Sl(_),m=O.next();!m.done;m=O.next()){var S=m.value;try{hh(S)}catch(y){u=u??[],y instanceof fl?u=fo(fo([],Ka(u)),Ka(y.errors)):u.push(y)}}}catch(y){o={error:y}}finally{try{m&&!m.done&&(a=O.return)&&a.call(O)}finally{if(o)throw o.error}}}if(u)throw new fl(u)}},e.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)hh(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},e.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},e.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},e.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&kl(n,r)},e.prototype.remove=function(r){var n=this._finalizers;n&&kl(n,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),fm=ps.EMPTY;function dm(e){return e instanceof ps||e&&"closed"in e&&tr(e.remove)&&tr(e.add)&&tr(e.unsubscribe)}function hh(e){tr(e)?e():e.unsubscribe()}var pm={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Nl={setTimeout:function(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=Nl.delegate;return a!=null&&a.setTimeout?a.setTimeout.apply(a,fo([e,r],Ka(n))):setTimeout.apply(void 0,fo([e,r],Ka(n)))},clearTimeout:function(e){var r=Nl.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function kP(e){Nl.setTimeout(function(){throw e})}function vh(){}function Ua(e){e()}var hm=function(e){is(r,e);function r(n){var o=e.call(this)||this;return o.isStopped=!1,n?(o.destination=n,dm(n)&&n.add(o)):o.destination=FP,o}return r.create=function(n,o,a){return new $l(n,o,a)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(ps),NP=Function.prototype.bind;function dl(e,r){return NP.call(e,r)}var $P=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(o){ka(o)}},e.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(o){ka(o)}else ka(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){ka(n)}},e}(),$l=function(e){is(r,e);function r(n,o,a){var u=e.call(this)||this,l;if(tr(n)||!n)l={next:n??void 0,error:o??void 0,complete:a??void 0};else{var f;u&&pm.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return u.unsubscribe()},l={next:n.next&&dl(n.next,f),error:n.error&&dl(n.error,f),complete:n.complete&&dl(n.complete,f)}):l=n}return u.destination=new $P(l),u}return r}(hm);function ka(e){kP(e)}function jP(e){throw e}var FP={closed:!0,next:vh,error:jP,complete:vh},WP=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function HP(e){return e}function UP(e){return e.length===0?HP:e.length===1?e[0]:function(n){return e.reduce(function(o,a){return a(o)},n)}}var mh=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var n=new e;return n.source=this,n.operator=r,n},e.prototype.subscribe=function(r,n,o){var a=this,u=zP(r)?r:new $l(r,n,o);return Ua(function(){var l=a,f=l.operator,d=l.source;u.add(f?f.call(u,d):d?a._subscribe(u):a._trySubscribe(u))}),u},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},e.prototype.forEach=function(r,n){var o=this;return n=gh(n),new n(function(a,u){var l=new $l({next:function(f){try{r(f)}catch(d){u(d),l.unsubscribe()}},error:u,complete:a});o.subscribe(l)})},e.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},e.prototype[WP]=function(){return this},e.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return UP(r)(this)},e.prototype.toPromise=function(r){var n=this;return r=gh(r),new r(function(o,a){var u;n.subscribe(function(l){return u=l},function(l){return a(l)},function(){return o(u)})})},e.create=function(r){return new e(r)},e}();function gh(e){var r;return(r=e??pm.Promise)!==null&&r!==void 0?r:Promise}function BP(e){return e&&tr(e.next)&&tr(e.error)&&tr(e.complete)}function zP(e){return e&&e instanceof hm||BP(e)&&dm(e)}var qP=cm(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ti=function(e){is(r,e);function r(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var o=new yh(this,this);return o.operator=n,o},r.prototype._throwIfClosed=function(){if(this.closed)throw new qP},r.prototype.next=function(n){var o=this;Ua(function(){var a,u;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var l=Sl(o.currentObservers),f=l.next();!f.done;f=l.next()){var d=f.value;d.next(n)}}catch(v){a={error:v}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}}})},r.prototype.error=function(n){var o=this;Ua(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=n;for(var a=o.observers;a.length;)a.shift().error(n)}})},r.prototype.complete=function(){var n=this;Ua(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var o=n.observers;o.length;)o.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var o=this,a=this,u=a.hasError,l=a.isStopped,f=a.observers;return u||l?fm:(this.currentObservers=null,f.push(n),new ps(function(){o.currentObservers=null,kl(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var o=this,a=o.hasError,u=o.thrownError,l=o.isStopped;a?n.error(u):l&&n.complete()},r.prototype.asObservable=function(){var n=new mh;return n.source=this,n},r.create=function(n,o){return new yh(n,o)},r}(mh),yh=function(e){is(r,e);function r(n,o){var a=e.call(this)||this;return a.destination=n,a.source=o,a}return r.prototype.next=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.next)===null||a===void 0||a.call(o,n)},r.prototype.error=function(n){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.error)===null||a===void 0||a.call(o,n)},r.prototype.complete=function(){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||o===void 0||o.call(n)},r.prototype._subscribe=function(n){var o,a;return(a=(o=this.source)===null||o===void 0?void 0:o.subscribe(n))!==null&&a!==void 0?a:fm},r}(ti),vm=(e=>(e.RELOAD="reload",e))(vm||{}),mm=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(mm||{});const GP=new ti,KP=new ti,YP=new ti;var gm=(e=>(e.SAVE_ALL="save-all",e))(gm||{});const XP=new ti;var ym=(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))(ym||{});const VP=new ti;var wm=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(wm||{});const JP=new ti,dc=31;var pc=(e=>(e.EMPTY="Please enter a valid name",e[e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${dc} characters`]="LENGTH_EXCEEDED",e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(pc||{});function bm(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>dc)throw new Error(pc.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(e))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(e))throw new Error("Invalid name");return!0}function ZP(e){if(!e)return null;if(typeof e=="string")try{bm(e)}catch(r){return r.message}}function QP(e,r){let n="";if(["array","object"].includes(r))try{const o=JSON.parse(e);r==="array"&&(!Array.isArray(o)||!pt.isObject(o))&&(n=`Invalid value for type ${r}`),r==="object"&&(!pt.isObject(o)||Array.isArray(o))&&(n=`Invalid value for type ${r}`)}catch{n=`Invalid value for type ${r}`}return r==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(n=`Invalid value for type ${r}`)),r==="number"&&isNaN(+e)&&(n=`Invalid value for type ${r}`),["boolean","bool"].includes(r)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(n=`Invalid value for type ${r}`),n}function hs(e){const r=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(r,"")}var hc=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(hc||{});const br={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports"};var Cn=(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.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(Cn||{}),ni=(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))(ni||{}),vc=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(vc||{});const _m="roles.json",Sm="qodlyApp.json",eA="model.4DModel",tA="HTTPHandlers.json";function Em(e){const r=e.split("."),n=r.pop(),o=r.join(".").split("/")[0];switch(!0){case n==="4DModel":return Cn.MODEL;case n==="WebForm":return Cn.WEBFORM;case(["4dm","4qs","4qm"].includes(n)&&o===br.METHODS):return Cn.METHOD;case(["4dm","4qs","4qm"].includes(n)&&o===br.CLASSES):return Cn.CLASS;case e===_m:return Cn.ROLES;case e===Sm:return Cn.SETTINGS;default:return Cn.TEXT}}function nA(e,r=!1){switch(e){case br.REPORTS:case"report":return"QoDoc";case br.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case br.CLASSES:case br.METHODS:return r?"4qs":"4dm";default:return""}}function rA(e,r=""){const n=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return n?n[1]:r}class xm{constructor(){Bd(this,"current",Promise.resolve())}lock(){let r;const n=new Promise(a=>{r=a}),o=this.current.then(()=>r);return this.current=n,o}}function Om(){const e=new xm;return async r=>{const n=await e.lock();try{const o=await r();return n(),o}catch(o){console.error(o),n();return}}}const Tm=pt.curry((e,r,n)=>e&&pt.get(n,e)===r),iA=pt.curry((e,r,n)=>pt.get(n,e)!==r),oA=pt.curry((e,r)=>pt.get(r,"id")!==e),aA=pt.curry((e,r)=>pt.get(r,"id")===e),sA=pt.curry((e,r)=>pt.get(r,"path")===e);function uA(e="id",r,n){return n.findIndex(Tm(e,r))!==-1}function lA(e){if(!e)return"";const{id:r,namespace:n}=e;return n&&r?`${n}:${r}`:r}function Cm(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function cA(e){return e.type==="object"}function Rm(e){var r;return e.kind==="relatedEntities"||((r=e.type)==null?void 0:r.includes("Selection"))||e.behavior==="relatedEntities"}function Pm(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!Cm(e)}function fA(e){return Rm(e)||Pm(e)}function dA(e){return e.applyTo==="dataStore"}function pA(e){return e.applyTo==="dataClass"}function hA(e){return e.applyTo==="entity"}function vA(e){return e.applyTo==="entityCollection"}function mA(e){return e.type==="entity"}function gA(e){return e.type==="entitysel"}function Am(e){return e.dataType==="array"}function Im(e){return e.dataType==="object"}function Lm(e){return e.type==="scalar"}function yA(e){return Am(e)||Im(e)||Lm(e)}const wA=e=>e!=null&&e.type==="entity",bA=e=>e.type==="entitysel",_A=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",SA=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",EA=e=>e.type==="scalar"&&e.dataType==="date";function xA(){return new Promise((e,r)=>{window.addEventListener("bundle:ready",n=>n.data?e():r(n.caughtErr))})}var mo=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(mo||{}),Mm=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(Mm||{}),mc=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(mc||{});const OA={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function TA(e){var u;let r={};try{const l=((u=e.match(/\/\/%attributes = (.*)/))==null?void 0:u[1])||"";r=JSON.parse(l)}catch{}const{published4DMobile:n,...o}=r;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:mo.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!n,publishedRestOptions:n||{table:"",scope:mc.table}},...o}}function Dm(e){const r={};return e.invisible&&(r.invisible=!0),e.shared&&(r.shared=!0),e.executedOnServer&&(r.executedOnServer=!0),e.preemptive&&[mo.capable,mo.incapable].includes(e.preemptive)&&(r.preemptive=e.preemptive),e.publishedSoap&&(r.publishedSoap=!0,e.publishedWsdl&&(r.publishedWsdl=!0)),e.publishedWeb&&(r.publishedWeb=!0),e.publishedSql&&(r.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(r.published4DMobile=e.publishedRestOptions),JSON.stringify(r).replace(/"(true|false)"/g,"$1")}function CA(e,r,n=!1){const o=pt.isString(r)?r:Dm(r);if(!n&&km(e))return e;const a=Nm(e);return`//%attributes = ${o}\r
|
|
205
205
|
${a}`}function km(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function Nm(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const RA=()=>Jl.uuid().replaceAll("-","").toUpperCase(),mt="/rest/$designer",Po="/rest/$designer-ext",vs="/$shared";function PA(...e){return r=>{if(e.length===0)return r;const n={...r};return e.forEach(o=>{typeof n[o]=="string"&&(n[o]=new Date(n[o]))}),n}}class jl extends Error{constructor(r,n,o){super(),this.url=r,this.response=n,this.data=o}log(){console.error("Error while sending the request",this)}}async function ze(e,r){const n=await window.fetch(e,r);if(/401/.test(n.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(n.status.toString())){let a;try{const u=await n.json();a=new jl(e,n,u)}catch{a=new jl(e,n)}throw a.log(),a}return await n.json()}function AA(e){return ze(Po,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function IA(e){return ze(Po,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const $m=()=>{const{host:e,protocol:r}=window.location,n=r==="https:";return{projectOpened:!1,remoteDebuggerMode:vc.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${n?"s":""}://${e}/remoteDebugger`,lsp:`ws${n?"s":""}://${e}/LSP`},isRestActive:!0}};async function LA(){const{hostname:e,host:r,protocol:n}=window.location,o=n==="https:";try{const a=await ze(mt,{method:"POST",body:JSON.stringify({verb:ni.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(a.rendererPath)return a.rendererPath;const l=`http://${e}:${a.webServerHTTPPort}`,f=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?o?f:l:a.webServerHTTPPort?l:f})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:u,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${o?"s":""}://${r}/remoteDebugger`,lsp:`ws${o?"s":""}://${r}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),$m()}}async function jm(e){return await ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function MA(...e){return(await Promise.all(e.map(o=>jm({root:o,verb:ni.GET_FOLDER})))).map(({children:o})=>o.map(({name:a,date:u,type:l})=>({name:a,type:l,date:u,path:`${l}/${a}`}))).flat()}function DA(e,r={}){const{sanitize:n=!0}=r;return ze(`/rest/$getWebForm/${e}`,{method:"GET"}).then(o=>{if(!(o!=null&&o.components)||!n)return o;const a=new Map;return{...o,components:pt.entries(o.components).map(([u,l])=>{const{resolvedName:f}=l.type;if(f==="WebformLoader"){const d=Jl.generate();a.set(u,d),u=d}return[u,l]}).reduce((u,[l,f])=>{var d;return f.nodes&&(f.nodes=f.nodes.map(v=>a.get(v)||v)),f.linkedNodes&&(f.linkedNodes=pt.entries(f.linkedNodes).reduce((v,[g,_])=>({...v,[g]:a.get(_)||_}),{})),(d=f.props)!=null&&d.events&&(f.props.events=f.props.events.map(v=>(v.type==="navigation"&&v.loader&&(v.loader=a.get(v.loader)||v.loader),v))),{...u,[l]:f}},{})}})}function kA(e){return ze(mt,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(r=>({...r,content:[Cn.METHOD,Cn.CLASS].includes(r.type)?hs(r.content):r.content}))}function NA(e){return e.type==="folder"?ze(Po,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function $A(e){return e.type==="folder"?(await ze(Po,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function jA(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function FA(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function WA(e){return(await ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function HA(...e){return await ze(mt,{method:"POST",body:JSON.stringify({verb:ni.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function UA(e){const r=await ze("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return r.isLogged&&r.success}async function BA(){return await ze("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function zA({name:e,path:r="",root:n="root",asText:o=!1}){return ze(mt,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:n,path:r,name:e,asText:o}),headers:new Headers({"Content-Type":"application/json"})})}async function qA(){try{const e=await ze(`${vs}/shared_datasources.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{}}}async function GA(){try{const e=await ze(`${vs}/shared_css.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{classes:[]}}}async function KA(){try{const e=await ze(`${vs}/saved_conditions.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{conditions:[]}}}async function YA(){try{return await ze("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function XA(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const VA=Om(),JA=async e=>{const r={verb:ni.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return VA(async()=>(await ze(mt,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},Fm=async e=>{const r=await ze(mt,{method:"POST",body:JSON.stringify({...e,verb:ni.SET_FILE_CONTENT,root:hc.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),n=Em(`${e.path||"Sources"}/${e.name}`);return{...r,type:n,size:0}},ZA=async e=>await Fm({name:"crafted_components.json",path:br.WEBFORMS,content:e});function QA(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function eI(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function tI(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function nI(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(r=>Array.isArray(r)?r:{...r,content:["4dm","4qm","4qs"].includes(r.ext)?hs(r.content):r.content})}function rI(e){return ze(mt,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function iI(e){const r=new RegExp(/^\((.+)(?=\))/gi).exec(e);return r!==null?r[1]:""}function oI(e){const r=new RegExp(/(->)(.*)/gi).exec(e);if(r!==null)return r[0].replace("->","");const n=/:([^)]*)$/.exec(e);return n!==null?`result : ${n[1].trim()}`:""}function aI(e){const r=iI(e).split(/[;,]/g).filter(Boolean).map(a=>{const u=a.split(":")[0].trim(),l=a.split(":")[1].trim();return{name:u,type:l}}),n=oI(e),o=n?{name:n.split(":")[0].trim(),type:n.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:r,result:o}}async function sI(e,r){const o=e.split(".").pop();try{const a=await ze(mt,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:r,functionName:o}),headers:new Headers({"Content-Type":"application/json"})});a.content=hs(a.content);const{params:u,result:l}=aI(a.parameters);return{...a,params:u,returns:l}}catch(a){return console.error(a),{className:r,functionName:o,filePath:e,content:"",params:[]}}}var Wm=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(Wm||{});function uI(e,r){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...r}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(n=>{})}var Hm=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(Hm||{}),Um=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))(Um||{}),Bm=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(Bm||{});const lI={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},cI={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=mt;exports.AppLoader=iP;exports.ControlledSwitch=tm;exports.DATASOURCE_THEMES=lI;exports.DatasourcesActions=mm;exports.DebuggerActions=wm;exports.DesignerRequestVerb=ni;exports.Dialog=bE;exports.DialogBody=Mh;exports.EActivity=Wm;exports.EDITOR=cI;exports.EIDENTIFIERS=Um;exports.ERROR_CODES=Bm;exports.EWebFormStyleClassScope=Hm;exports.EXT_API_PREFIX=Po;exports.FileFolderType=Cn;exports.FolderRootPath=br;exports.FolderRootType=hc;exports.HTTPError=jl;exports.HTTP_HANDLERS_PATH=tA;exports.IPreemptive=mo;exports.IPublished=Mm;exports.IPublishedRestScope=mc;exports.IdentityProvider=AP;exports.Incase=dO;exports.IndentLines=uv;exports.LogoSVG=nm;exports.LspActions=ym;exports.MAX_FILE_NAME_LENGTH=dc;exports.MODEL_TAB_PATH=eA;exports.Modal=aP;exports.ModalCloseReason=Oi;exports.ModalColor=Xr;exports.ModalIcons=Ml;exports.ModalType=fc;exports.Mutex=xm;exports.NameError=pc;exports.Overlay=Lh;exports.Portal=_h;exports.PublishOptions=OA;exports.ROLES_TAB_PATH=_m;exports.RemoteDebuggerMode=vc;exports.SETTINGS_TAB_PATH=Sm;exports.SHARED_API_PREFIX=vs;exports.Switcher=lv;exports.TabEventsActions=gm;exports.Tip=aR;exports.TipsProvider=iR;exports.Toast=Lx;exports.Tooltip=nP;exports.Tree=fO;exports.TreeIcon=rv;exports.TreeNode=Zl;exports.WebformActions=vm;exports._isArrayDatasource=_A;exports._isObjectDatasource=SA;exports.addAttributesToContent=CA;exports.addFolder=jA;exports.by=Tm;exports.byId=aA;exports.byPath=sA;exports.checkUpdates=AA;exports.createFolder=QA;exports.datasourcesSubject=GP;exports.debuggerSubject=JP;exports.dropFile=$A;exports.dropFolder=WA;exports.exists=uA;exports.extractWebformName=rA;exports.generateUUID=RA;exports.getAppSettings=LA;exports.getCatalog=BA;exports.getDatasourceId=lA;exports.getDefaultAppSettings=$m;exports.getFile=kA;exports.getFileContent=zA;exports.getFileExtentionFromType=nA;exports.getFilesInfo=HA;exports.getFolder=jm;exports.getFolders=MA;exports.getFunctionContent=sI;exports.getMonacoTheme=XA;exports.getNodeInfo=nI;exports.getSavedConditions=KA;exports.getSharedCSS=GA;exports.getSharedDatasources=qA;exports.getTypeFromExtension=Em;exports.getUserPrivileges=YA;exports.getWebForm=DA;exports.hasAttributesString=km;exports.http=ze;exports.installUpdates=IA;exports.isArrayDatasource=Am;exports.isDataClassMethod=pA;exports.isDataStoreMethod=dA;exports.isDateDatasource=EA;exports.isEntity=wA;exports.isEntityDatasource=mA;exports.isEntityMethod=hA;exports.isEntitySelection=bA;exports.isEntitySelectionDatasource=gA;exports.isEntitySelectionMethod=vA;exports.isObjectAttribute=cA;exports.isObjectDatasource=Im;exports.isRelatedAttribute=fA;exports.isRelatedEntitiesAttribute=Rm;exports.isRelatedEntityAttribute=Pm;exports.isScalarDatasource=Lm;exports.isSimpleAttribute=Cm;exports.isSimpleDatasource=yA;exports.loadDS=xA;exports.log=uI;exports.login=UA;exports.lspSubject=VP;exports.moveItem=tI;exports.outBy=iA;exports.outById=oA;exports.parseAttributes=TA;exports.queue=Om;exports.removeAttributesString=Nm;exports.removeItem=eI;exports.renameFile=NA;exports.renameFolder=FA;exports.sanitizeContent=hs;exports.saveContent=rI;exports.setCraftedComponents=ZA;exports.setFileContent=Fm;exports.setSharedSources=JA;exports.stringifyAttributes=Dm;exports.tabEventsSubject=XP;exports.toastSubject=YP;exports.transformDates=PA;exports.useDidMountEffect=lP;exports.useDoubleClick=DP;exports.useFeatureFlags=PP;exports.useForwardedRef=RP;exports.useHotkeys=xP;exports.useIdentity=IP;exports.useOutsideClick=OP;exports.usePrevious=TP;exports.useStateObject=LP;exports.useStateRef=CP;exports.useTip=Bv;exports.validateName=bm;exports.validateServerSide=ZP;exports.validateValue=QP;exports.webformSubject=KP;
|
|
206
206
|
//# sourceMappingURL=index.cjs.js.map
|