formue-crud 0.1.49 → 0.1.51

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.
@@ -5249,7 +5249,9 @@ const { event: jt } = je, F0 = (l = "myStore") => Dd(l, {
5249
5249
  },
5250
5250
  generateRoute(e = this.mainKey, t = !1) {
5251
5251
  let i = W.get(this.routes, e + ".index", ""), n = i.indexOf("?") > -1 ? "&page=" : "?page=";
5252
- return n += t, this.searchParam && (n += "&search=" + this.searchParam), i + n + "&" + this.convertToFilterForm();
5252
+ n += t, this.searchParam && (n += "&search=" + this.searchParam);
5253
+ const r = inject("formue.query") || !1;
5254
+ return console.log(r), i + n + "&" + this.convertToFilterForm() + (r ? "&" + r : "");
5253
5255
  },
5254
5256
  async loadItems(e = this.mainKey, t = 1) {
5255
5257
  this.loadings[e] = !0, this.loadings.mainLoading = e === this.mainKey;
@@ -27,7 +27,7 @@ function print() { __p += __j.call(arguments, '') }
27
27
  }`;var te=rc(function(){return le(y,W+"return "+P).apply(t,C)});if(te.source=P,Sa(te))throw te;return te}function v_(r){return he(r).toLowerCase()}function w_(r){return he(r).toUpperCase()}function y_(r,o,h){if(r=he(r),r&&(h||o===t))return fu(r);if(!r||!(o=Xe(o)))return r;var c=ft(r),m=ft(o),y=pu(c,m),C=gu(c,m)+1;return ii(c,y,C).join("")}function C_(r,o,h){if(r=he(r),r&&(h||o===t))return r.slice(0,bu(r)+1);if(!r||!(o=Xe(o)))return r;var c=ft(r),m=gu(c,ft(o))+1;return ii(c,0,m).join("")}function E_(r,o,h){if(r=he(r),r&&(h||o===t))return r.replace(So,"");if(!r||!(o=Xe(o)))return r;var c=ft(r),m=pu(c,ft(o));return ii(c,m).join("")}function x_(r,o){var h=Z,c=ge;if(ve(o)){var m="separator"in o?o.separator:m;h="length"in o?Q(o.length):h,c="omission"in o?Xe(o.omission):c}r=he(r);var y=r.length;if(Vi(r)){var C=ft(r);y=C.length}if(h>=y)return r;var x=h-Wi(c);if(x<1)return c;var T=C?ii(C,0,x).join(""):r.slice(0,x);if(m===t)return T+c;if(C&&(x+=T.length-x),ka(m)){if(r.slice(x).search(m)){var A,F=T;for(m.global||(m=$o(m.source,he(Oh.exec(m))+"g")),m.lastIndex=0;A=m.exec(F);)var P=A.index;T=T.slice(0,P===t?x:P)}}else if(r.indexOf(Xe(m),x)!=x){var H=T.lastIndexOf(m);H>-1&&(T=T.slice(0,H))}return T+c}function R_(r){return r=he(r),r&&Oy.test(r)?r.replace(Ah,QC):r}var __=Ji(function(r,o,h){return r+(h?" ":"")+o.toUpperCase()}),Da=sd("toUpperCase");function nc(r,o,h){return r=he(r),o=h?t:o,o===t?qC(r)?iE(r):IC(r):r.match(o)||[]}var rc=ie(function(r,o){try{return qe(r,t,o)}catch(h){return Sa(h)?h:new X(h)}}),T_=Ot(function(r,o){return tt(o,function(h){h=_t(h),Ft(r,h,_a(r[h],r))}),r});function S_(r){var o=r==null?0:r.length,h=U();return r=o?be(r,function(c){if(typeof c[1]!="function")throw new it(a);return[h(c[0]),c[1]]}):[],ie(function(c){for(var m=-1;++m<o;){var y=r[m];if(qe(y[0],this,c))return qe(y[1],this,c)}})}function k_(r){return QE(rt(r,w))}function Aa(r){return function(){return r}}function M_(r,o){return r==null||r!==r?o:r}var L_=ad(),D_=ad(!0);function je(r){return r}function Fa(r){return Hu(typeof r=="function"?r:rt(r,w))}function A_(r){return Iu(rt(r,w))}function F_(r,o){return Nu(r,rt(o,w))}var P_=ie(function(r,o){return function(h){return Fn(h,r,o)}}),O_=ie(function(r,o){return function(h){return Fn(r,h,o)}});function Pa(r,o,h){var c=Le(o),m=zr(o,c);h==null&&!(ve(o)&&(m.length||!c.length))&&(h=o,o=r,r=this,m=zr(o,Le(o)));var y=!(ve(h)&&"chain"in h)||!!h.chain,C=Ht(r);return tt(m,function(x){var T=o[x];r[x]=T,C&&(r.prototype[x]=function(){var A=this.__chain__;if(y||A){var F=r(this.__wrapped__),P=F.__actions__=Ge(this.__actions__);return P.push({func:T,args:arguments,thisArg:r}),F.__chain__=A,F}return T.apply(r,Xt([this.value()],arguments))})}),r}function z_(){return Ae._===this&&(Ae._=lE),this}function Oa(){}function H_(r){return r=Q(r),ie(function(o){return Vu(o,r)})}var B_=ca(be),I_=ca(lu),N_=ca(Ho);function sc(r){return wa(r)?Bo(_t(r)):m0(r)}function V_(r){return function(o){return r==null?t:yi(r,o)}}var W_=hd(),G_=hd(!0);function za(){return[]}function Ha(){return!1}function $_(){return{}}function U_(){return""}function j_(){return!0}function K_(r,o){if(r=Q(r),r<1||r>Ct)return[];var h=Et,c=Oe(r,Et);o=U(o),r-=Et;for(var m=Vo(c,o);++h<r;)o(h);return m}function q_(r){return Y(r)?be(r,_t):Ye(r)?[r]:Ge(_d(he(r)))}function J_(r){var o=++oE;return he(r)+o}var X_=Wr(function(r,o){return r+o},0),Y_=fa("ceil"),Z_=Wr(function(r,o){return r/o},1),Q_=fa("floor");function eT(r){return r&&r.length?Or(r,je,Zo):t}function tT(r,o){return r&&r.length?Or(r,U(o,2),Zo):t}function iT(r){return du(r,je)}function nT(r,o){return du(r,U(o,2))}function rT(r){return r&&r.length?Or(r,je,ia):t}function sT(r,o){return r&&r.length?Or(r,U(o,2),ia):t}var oT=Wr(function(r,o){return r*o},1),aT=fa("round"),lT=Wr(function(r,o){return r-o},0);function hT(r){return r&&r.length?No(r,je):0}function uT(r,o){return r&&r.length?No(r,U(o,2)):0}return v.after=Ax,v.ary=zd,v.assign=wR,v.assignIn=Xd,v.assignInWith=ts,v.assignWith=yR,v.at=CR,v.before=Hd,v.bind=_a,v.bindAll=T_,v.bindKey=Bd,v.castArray=$x,v.chain=Fd,v.chunk=Q0,v.compact=e1,v.concat=t1,v.cond=S_,v.conforms=k_,v.constant=Aa,v.countBy=hx,v.create=ER,v.curry=Id,v.curryRight=Nd,v.debounce=Vd,v.defaults=xR,v.defaultsDeep=RR,v.defer=Fx,v.delay=Px,v.difference=i1,v.differenceBy=n1,v.differenceWith=r1,v.drop=s1,v.dropRight=o1,v.dropRightWhile=a1,v.dropWhile=l1,v.fill=h1,v.filter=dx,v.flatMap=px,v.flatMapDeep=gx,v.flatMapDepth=mx,v.flatten=Md,v.flattenDeep=u1,v.flattenDepth=d1,v.flip=Ox,v.flow=L_,v.flowRight=D_,v.fromPairs=c1,v.functions=DR,v.functionsIn=AR,v.groupBy=bx,v.initial=p1,v.intersection=g1,v.intersectionBy=m1,v.intersectionWith=b1,v.invert=PR,v.invertBy=OR,v.invokeMap=wx,v.iteratee=Fa,v.keyBy=yx,v.keys=Le,v.keysIn=Ue,v.map=Jr,v.mapKeys=HR,v.mapValues=BR,v.matches=A_,v.matchesProperty=F_,v.memoize=Yr,v.merge=IR,v.mergeWith=Yd,v.method=P_,v.methodOf=O_,v.mixin=Pa,v.negate=Zr,v.nthArg=H_,v.omit=NR,v.omitBy=VR,v.once=zx,v.orderBy=Cx,v.over=B_,v.overArgs=Hx,v.overEvery=I_,v.overSome=N_,v.partial=Ta,v.partialRight=Wd,v.partition=Ex,v.pick=WR,v.pickBy=Zd,v.property=sc,v.propertyOf=V_,v.pull=C1,v.pullAll=Dd,v.pullAllBy=E1,v.pullAllWith=x1,v.pullAt=R1,v.range=W_,v.rangeRight=G_,v.rearg=Bx,v.reject=_x,v.remove=_1,v.rest=Ix,v.reverse=xa,v.sampleSize=Sx,v.set=$R,v.setWith=UR,v.shuffle=kx,v.slice=T1,v.sortBy=Dx,v.sortedUniq=F1,v.sortedUniqBy=P1,v.split=p_,v.spread=Nx,v.tail=O1,v.take=z1,v.takeRight=H1,v.takeRightWhile=B1,v.takeWhile=I1,v.tap=ex,v.throttle=Vx,v.thru=qr,v.toArray=Kd,v.toPairs=Qd,v.toPairsIn=ec,v.toPath=q_,v.toPlainObject=Jd,v.transform=jR,v.unary=Wx,v.union=N1,v.unionBy=V1,v.unionWith=W1,v.uniq=G1,v.uniqBy=$1,v.uniqWith=U1,v.unset=KR,v.unzip=Ra,v.unzipWith=Ad,v.update=qR,v.updateWith=JR,v.values=Zi,v.valuesIn=XR,v.without=j1,v.words=nc,v.wrap=Gx,v.xor=K1,v.xorBy=q1,v.xorWith=J1,v.zip=X1,v.zipObject=Y1,v.zipObjectDeep=Z1,v.zipWith=Q1,v.entries=Qd,v.entriesIn=ec,v.extend=Xd,v.extendWith=ts,Pa(v,v),v.add=X_,v.attempt=rc,v.camelCase=e_,v.capitalize=tc,v.ceil=Y_,v.clamp=YR,v.clone=Ux,v.cloneDeep=Kx,v.cloneDeepWith=qx,v.cloneWith=jx,v.conformsTo=Jx,v.deburr=ic,v.defaultTo=M_,v.divide=Z_,v.endsWith=t_,v.eq=gt,v.escape=i_,v.escapeRegExp=n_,v.every=ux,v.find=cx,v.findIndex=Sd,v.findKey=_R,v.findLast=fx,v.findLastIndex=kd,v.findLastKey=TR,v.floor=Q_,v.forEach=Pd,v.forEachRight=Od,v.forIn=SR,v.forInRight=kR,v.forOwn=MR,v.forOwnRight=LR,v.get=Ma,v.gt=Xx,v.gte=Yx,v.has=FR,v.hasIn=La,v.head=Ld,v.identity=je,v.includes=vx,v.indexOf=f1,v.inRange=ZR,v.invoke=zR,v.isArguments=xi,v.isArray=Y,v.isArrayBuffer=Zx,v.isArrayLike=$e,v.isArrayLikeObject=Ee,v.isBoolean=Qx,v.isBuffer=ni,v.isDate=eR,v.isElement=tR,v.isEmpty=iR,v.isEqual=nR,v.isEqualWith=rR,v.isError=Sa,v.isFinite=sR,v.isFunction=Ht,v.isInteger=Gd,v.isLength=Qr,v.isMap=$d,v.isMatch=oR,v.isMatchWith=aR,v.isNaN=lR,v.isNative=hR,v.isNil=dR,v.isNull=uR,v.isNumber=Ud,v.isObject=ve,v.isObjectLike=ye,v.isPlainObject=In,v.isRegExp=ka,v.isSafeInteger=cR,v.isSet=jd,v.isString=es,v.isSymbol=Ye,v.isTypedArray=Yi,v.isUndefined=fR,v.isWeakMap=pR,v.isWeakSet=gR,v.join=v1,v.kebabCase=r_,v.last=ot,v.lastIndexOf=w1,v.lowerCase=s_,v.lowerFirst=o_,v.lt=mR,v.lte=bR,v.max=eT,v.maxBy=tT,v.mean=iT,v.meanBy=nT,v.min=rT,v.minBy=sT,v.stubArray=za,v.stubFalse=Ha,v.stubObject=$_,v.stubString=U_,v.stubTrue=j_,v.multiply=oT,v.nth=y1,v.noConflict=z_,v.noop=Oa,v.now=Xr,v.pad=a_,v.padEnd=l_,v.padStart=h_,v.parseInt=u_,v.random=QR,v.reduce=xx,v.reduceRight=Rx,v.repeat=d_,v.replace=c_,v.result=GR,v.round=aT,v.runInContext=_,v.sample=Tx,v.size=Mx,v.snakeCase=f_,v.some=Lx,v.sortedIndex=S1,v.sortedIndexBy=k1,v.sortedIndexOf=M1,v.sortedLastIndex=L1,v.sortedLastIndexBy=D1,v.sortedLastIndexOf=A1,v.startCase=g_,v.startsWith=m_,v.subtract=lT,v.sum=hT,v.sumBy=uT,v.template=b_,v.times=K_,v.toFinite=Bt,v.toInteger=Q,v.toLength=qd,v.toLower=v_,v.toNumber=at,v.toSafeInteger=vR,v.toString=he,v.toUpper=w_,v.trim=y_,v.trimEnd=C_,v.trimStart=E_,v.truncate=x_,v.unescape=R_,v.uniqueId=J_,v.upperCase=__,v.upperFirst=Da,v.each=Pd,v.eachRight=Od,v.first=Ld,Pa(v,function(){var r={};return xt(v,function(o,h){ue.call(v.prototype,h)||(r[h]=o)}),r}(),{chain:!1}),v.VERSION=i,tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),tt(["drop","take"],function(r,o){se.prototype[r]=function(h){h=h===t?1:ke(Q(h),0);var c=this.__filtered__&&!o?new se(this):this.clone();return c.__filtered__?c.__takeCount__=Oe(h,c.__takeCount__):c.__views__.push({size:Oe(h,Et),type:r+(c.__dir__<0?"Right":"")}),c},se.prototype[r+"Right"]=function(h){return this.reverse()[r](h).reverse()}}),tt(["filter","map","takeWhile"],function(r,o){var h=o+1,c=h==We||h==pi;se.prototype[r]=function(m){var y=this.clone();return y.__iteratees__.push({iteratee:U(m,3),type:h}),y.__filtered__=y.__filtered__||c,y}}),tt(["head","last"],function(r,o){var h="take"+(o?"Right":"");se.prototype[r]=function(){return this[h](1).value()[0]}}),tt(["initial","tail"],function(r,o){var h="drop"+(o?"":"Right");se.prototype[r]=function(){return this.__filtered__?new se(this):this[h](1)}}),se.prototype.compact=function(){return this.filter(je)},se.prototype.find=function(r){return this.filter(r).head()},se.prototype.findLast=function(r){return this.reverse().find(r)},se.prototype.invokeMap=ie(function(r,o){return typeof r=="function"?new se(this):this.map(function(h){return Fn(h,r,o)})}),se.prototype.reject=function(r){return this.filter(Zr(U(r)))},se.prototype.slice=function(r,o){r=Q(r);var h=this;return h.__filtered__&&(r>0||o<0)?new se(h):(r<0?h=h.takeRight(-r):r&&(h=h.drop(r)),o!==t&&(o=Q(o),h=o<0?h.dropRight(-o):h.take(o-r)),h)},se.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},se.prototype.toArray=function(){return this.take(Et)},xt(se.prototype,function(r,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),c=/^(?:head|last)$/.test(o),m=v[c?"take"+(o=="last"?"Right":""):o],y=c||/^find/.test(o);m&&(v.prototype[o]=function(){var C=this.__wrapped__,x=c?[1]:arguments,T=C instanceof se,A=x[0],F=T||Y(C),P=function(re){var oe=m.apply(v,Xt([re],x));return c&&H?oe[0]:oe};F&&h&&typeof A=="function"&&A.length!=1&&(T=F=!1);var H=this.__chain__,W=!!this.__actions__.length,j=y&&!H,te=T&&!W;if(!y&&F){C=te?C:new se(this);var K=r.apply(C,x);return K.__actions__.push({func:qr,args:[P],thisArg:t}),new nt(K,H)}return j&&te?r.apply(this,x):(K=this.thru(P),j?c?K.value()[0]:K.value():K)})}),tt(["pop","push","shift","sort","splice","unshift"],function(r){var o=yr[r],h=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",c=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var m=arguments;if(c&&!this.__chain__){var y=this.value();return o.apply(Y(y)?y:[],m)}return this[h](function(C){return o.apply(Y(C)?C:[],m)})}}),xt(se.prototype,function(r,o){var h=v[o];if(h){var c=h.name+"";ue.call(ji,c)||(ji[c]=[]),ji[c].push({name:o,func:h})}}),ji[Vr(t,L).name]=[{name:"wrapper",func:t}],se.prototype.clone=RE,se.prototype.reverse=_E,se.prototype.value=TE,v.prototype.at=tx,v.prototype.chain=ix,v.prototype.commit=nx,v.prototype.next=rx,v.prototype.plant=ox,v.prototype.reverse=ax,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=lx,v.prototype.first=v.prototype.head,Tn&&(v.prototype[Tn]=sx),v},Gi=nE();gi?((gi.exports=Gi)._=Gi,Fo._=Gi):Ae._=Gi}).call(ri)}(Nn,Nn.exports);var V=Nn.exports,Ri=TypeError;const uc=hc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var is=typeof Map=="function"&&Map.prototype,ns=Object.getOwnPropertyDescriptor&&is?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Vn=is&&ns&&typeof ns.get=="function"?ns.get:null,Ia=is&&Map.prototype.forEach,rs=typeof Set=="function"&&Set.prototype,ss=Object.getOwnPropertyDescriptor&&rs?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wn=rs&&ss&&typeof ss.get=="function"?ss.get:null,Na=rs&&Set.prototype.forEach,dc=typeof WeakMap=="function"&&WeakMap.prototype,Qi=dc?WeakMap.prototype.has:null,cc=typeof WeakSet=="function"&&WeakSet.prototype,en=cc?WeakSet.prototype.has:null,fc=typeof WeakRef=="function"&&WeakRef.prototype,Va=fc?WeakRef.prototype.deref:null,pc=Boolean.prototype.valueOf,gc=Object.prototype.toString,mc=Function.prototype.toString,bc=String.prototype.match,os=String.prototype.slice,Nt=String.prototype.replace,vc=String.prototype.toUpperCase,Wa=String.prototype.toLowerCase,Ga=RegExp.prototype.test,$a=Array.prototype.concat,vt=Array.prototype.join,wc=Array.prototype.slice,Ua=Math.floor,as=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ls=Object.getOwnPropertySymbols,hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_i=typeof Symbol=="function"&&typeof Symbol.iterator=="object",tn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_i||"symbol")?Symbol.toStringTag:null,ja=Object.prototype.propertyIsEnumerable,Ka=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(l){return l.__proto__}:null);function qa(l,e){if(l===1/0||l===-1/0||l!==l||l&&l>-1e3&&l<1e3||Ga.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof l=="number"){var i=l<0?-Ua(-l):Ua(l);if(i!==l){var n=String(i),s=os.call(e,n.length+1);return Nt.call(n,t,"$&_")+"."+Nt.call(Nt.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Nt.call(e,t,"$&_")}var us=uc,Ja=us.custom,Xa=el(Ja)?Ja:null,Ya={__proto__:null,double:'"',single:"'"},yc={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Gn=function l(e,t,i,n){var s=t||{};if(Tt(s,"quoteStyle")&&!Tt(Ya,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Tt(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Tt(s,"customInspect")?s.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Tt(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Tt(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return il(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return u?qa(e,d):d}if(typeof e=="bigint"){var f=String(e)+"n";return u?qa(e,f):f}var g=typeof s.depth>"u"?5:s.depth;if(typeof i>"u"&&(i=0),i>=g&&g>0&&typeof e=="object")return ds(e)?"[Array]":"[Object]";var w=Bc(s,i);if(typeof n>"u")n=[];else if(tl(n,e)>=0)return"[Circular]";function b(Ve,We,ht){if(We&&(n=wc.call(n),n.push(We)),ht){var pi={depth:s.depth};return Tt(s,"quoteStyle")&&(pi.quoteStyle=s.quoteStyle),l(Ve,pi,i+1,n)}return l(Ve,s,i+1,n)}if(typeof e=="function"&&!Qa(e)){var E=Mc(e),R=$n(e,b);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(R.length>0?" { "+vt.call(R,", ")+" }":"")}if(el(e)){var S=_i?Nt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):hs.call(e);return typeof e=="object"&&!_i?nn(S):S}if(Oc(e)){for(var D="<"+Wa.call(String(e.nodeName)),L=e.attributes||[],G=0;G<L.length;G++)D+=" "+L[G].name+"="+Za(Cc(L[G].value),"double",s);return D+=">",e.childNodes&&e.childNodes.length&&(D+="..."),D+="</"+Wa.call(String(e.nodeName))+">",D}if(ds(e)){if(e.length===0)return"[]";var B=$n(e,b);return w&&!Hc(B)?"["+fs(B,w)+"]":"[ "+vt.call(B,", ")+" ]"}if(xc(e)){var N=$n(e,b);return!("cause"in Error.prototype)&&"cause"in e&&!ja.call(e,"cause")?"{ ["+String(e)+"] "+vt.call($a.call("[cause]: "+b(e.cause),N),", ")+" }":N.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+vt.call(N,", ")+" }"}if(typeof e=="object"&&a){if(Xa&&typeof e[Xa]=="function"&&us)return us(e,{depth:g-i});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Lc(e)){var z=[];return Ia&&Ia.call(e,function(Ve,We){z.push(b(We,e,!0)+" => "+b(Ve,e))}),nl("Map",Vn.call(e),z,w)}if(Fc(e)){var ae=[];return Na&&Na.call(e,function(Ve){ae.push(b(Ve,e))}),nl("Set",Wn.call(e),ae,w)}if(Dc(e))return cs("WeakMap");if(Pc(e))return cs("WeakSet");if(Ac(e))return cs("WeakRef");if(_c(e))return nn(b(Number(e)));if(Sc(e))return nn(b(as.call(e)));if(Tc(e))return nn(pc.call(e));if(Rc(e))return nn(b(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof ri<"u"&&e===ri)return"{ [object globalThis] }";if(!Ec(e)&&!Qa(e)){var J=$n(e,b),$=Ka?Ka(e)===Object.prototype:e instanceof Object||e.constructor===Object,_e=e instanceof Object?"":"null prototype",Z=!$&&tn&&Object(e)===e&&tn in e?os.call(Vt(e),8,-1):_e?"Object":"",ge=$||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",q=ge+(Z||_e?"["+vt.call($a.call([],Z||[],_e||[]),": ")+"] ":"");return J.length===0?q+"{}":w?q+"{"+fs(J,w)+"}":q+"{ "+vt.call(J,", ")+" }"}return String(e)};function Za(l,e,t){var i=t.quoteStyle||e,n=Ya[i];return n+l+n}function Cc(l){return Nt.call(String(l),/"/g,"&quot;")}function si(l){return!tn||!(typeof l=="object"&&(tn in l||typeof l[tn]<"u"))}function ds(l){return Vt(l)==="[object Array]"&&si(l)}function Ec(l){return Vt(l)==="[object Date]"&&si(l)}function Qa(l){return Vt(l)==="[object RegExp]"&&si(l)}function xc(l){return Vt(l)==="[object Error]"&&si(l)}function Rc(l){return Vt(l)==="[object String]"&&si(l)}function _c(l){return Vt(l)==="[object Number]"&&si(l)}function Tc(l){return Vt(l)==="[object Boolean]"&&si(l)}function el(l){if(_i)return l&&typeof l=="object"&&l instanceof Symbol;if(typeof l=="symbol")return!0;if(!l||typeof l!="object"||!hs)return!1;try{return hs.call(l),!0}catch{}return!1}function Sc(l){if(!l||typeof l!="object"||!as)return!1;try{return as.call(l),!0}catch{}return!1}var kc=Object.prototype.hasOwnProperty||function(l){return l in this};function Tt(l,e){return kc.call(l,e)}function Vt(l){return gc.call(l)}function Mc(l){if(l.name)return l.name;var e=bc.call(mc.call(l),/^function\s*([\w$]+)/);return e?e[1]:null}function tl(l,e){if(l.indexOf)return l.indexOf(e);for(var t=0,i=l.length;t<i;t++)if(l[t]===e)return t;return-1}function Lc(l){if(!Vn||!l||typeof l!="object")return!1;try{Vn.call(l);try{Wn.call(l)}catch{return!0}return l instanceof Map}catch{}return!1}function Dc(l){if(!Qi||!l||typeof l!="object")return!1;try{Qi.call(l,Qi);try{en.call(l,en)}catch{return!0}return l instanceof WeakMap}catch{}return!1}function Ac(l){if(!Va||!l||typeof l!="object")return!1;try{return Va.call(l),!0}catch{}return!1}function Fc(l){if(!Wn||!l||typeof l!="object")return!1;try{Wn.call(l);try{Vn.call(l)}catch{return!0}return l instanceof Set}catch{}return!1}function Pc(l){if(!en||!l||typeof l!="object")return!1;try{en.call(l,en);try{Qi.call(l,Qi)}catch{return!0}return l instanceof WeakSet}catch{}return!1}function Oc(l){return!l||typeof l!="object"?!1:typeof HTMLElement<"u"&&l instanceof HTMLElement?!0:typeof l.nodeName=="string"&&typeof l.getAttribute=="function"}function il(l,e){if(l.length>e.maxStringLength){var t=l.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return il(os.call(l,0,e.maxStringLength),e)+i}var n=yc[e.quoteStyle||"single"];n.lastIndex=0;var s=Nt.call(Nt.call(l,n,"\\$1"),/[\x00-\x1f]/g,zc);return Za(s,"single",e)}function zc(l){var e=l.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+vc.call(e.toString(16))}function nn(l){return"Object("+l+")"}function cs(l){return l+" { ? }"}function nl(l,e,t,i){var n=i?fs(t,i):vt.call(t,", ");return l+" ("+e+") {"+n+"}"}function Hc(l){for(var e=0;e<l.length;e++)if(tl(l[e],`
28
28
  `)>=0)return!1;return!0}function Bc(l,e){var t;if(l.indent===" ")t=" ";else if(typeof l.indent=="number"&&l.indent>0)t=vt.call(Array(l.indent+1)," ");else return null;return{base:t,prev:vt.call(Array(e+1),t)}}function fs(l,e){if(l.length===0)return"";var t=`
29
29
  `+e.prev+e.base;return t+vt.call(l,","+t)+`
30
- `+e.prev}function $n(l,e){var t=ds(l),i=[];if(t){i.length=l.length;for(var n=0;n<l.length;n++)i[n]=Tt(l,n)?e(l[n],l):""}var s=typeof ls=="function"?ls(l):[],a;if(_i){a={};for(var u=0;u<s.length;u++)a["$"+s[u]]=s[u]}for(var d in l)Tt(l,d)&&(t&&String(Number(d))===d&&d<l.length||_i&&a["$"+d]instanceof Symbol||(Ga.call(/[^\w$]/,d)?i.push(e(d,l)+": "+e(l[d],l)):i.push(d+": "+e(l[d],l))));if(typeof ls=="function")for(var f=0;f<s.length;f++)ja.call(l,s[f])&&i.push("["+e(s[f])+"]: "+e(l[s[f]],l));return i}var Ic=Gn,Nc=Ri,Un=function(l,e,t){for(var i=l,n;(n=i.next)!=null;i=n)if(n.key===e)return i.next=n.next,t||(n.next=l.next,l.next=n),n},Vc=function(l,e){if(l){var t=Un(l,e);return t&&t.value}},Wc=function(l,e,t){var i=Un(l,e);i?i.value=t:l.next={key:e,next:l.next,value:t}},Gc=function(l,e){return l?!!Un(l,e):!1},$c=function(l,e){if(l)return Un(l,e,!0)},Uc=function(){var e,t={assert:function(i){if(!t.has(i))throw new Nc("Side channel does not contain "+Ic(i))},delete:function(i){var n=e&&e.next,s=$c(e,i);return s&&n&&n===s&&(e=void 0),!!s},get:function(i){return Vc(e,i)},has:function(i){return Gc(e,i)},set:function(i,n){e||(e={next:void 0}),Wc(e,i,n)}};return t},rl=Object,jc=Error,Kc=EvalError,qc=RangeError,Jc=ReferenceError,Xc=SyntaxError,Yc=URIError,Zc=Math.abs,Qc=Math.floor,ef=Math.max,tf=Math.min,nf=Math.pow,rf=Math.round,sf=Number.isNaN||function(e){return e!==e},of=sf,af=function(e){return of(e)||e===0?e:e<0?-1:1},lf=Object.getOwnPropertyDescriptor,jn=lf;if(jn)try{jn([],"length")}catch{jn=null}var sl=jn,Kn=Object.defineProperty||!1;if(Kn)try{Kn({},"a",{value:1})}catch{Kn=!1}var hf=Kn,ps,ol;function uf(){return ol||(ol=1,ps=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==n||u.enumerable!==!0)return!1}return!0}),ps}var gs,al;function df(){if(al)return gs;al=1;var l=typeof Symbol<"u"&&Symbol,e=uf();return gs=function(){return typeof l!="function"||typeof Symbol!="function"||typeof l("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},gs}var ms,ll;function hl(){return ll||(ll=1,ms=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ms}var bs,ul;function dl(){if(ul)return bs;ul=1;var l=rl;return bs=l.getPrototypeOf||null,bs}var vs,cl;function cf(){if(cl)return vs;cl=1;var l="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(d,f){for(var g=[],w=0;w<d.length;w+=1)g[w]=d[w];for(var b=0;b<f.length;b+=1)g[b+d.length]=f[b];return g},s=function(d,f){for(var g=[],w=f||0,b=0;w<d.length;w+=1,b+=1)g[b]=d[w];return g},a=function(u,d){for(var f="",g=0;g<u.length;g+=1)f+=u[g],g+1<u.length&&(f+=d);return f};return vs=function(d){var f=this;if(typeof f!="function"||e.apply(f)!==i)throw new TypeError(l+f);for(var g=s(arguments,1),w,b=function(){if(this instanceof w){var L=f.apply(this,n(g,arguments));return Object(L)===L?L:this}return f.apply(d,n(g,arguments))},E=t(0,f.length-g.length),R=[],S=0;S<E;S++)R[S]="$"+S;if(w=Function("binder","return function ("+a(R,",")+"){ return binder.apply(this,arguments); }")(b),f.prototype){var D=function(){};D.prototype=f.prototype,w.prototype=new D,D.prototype=null}return w},vs}var ws,fl;function qn(){if(fl)return ws;fl=1;var l=cf();return ws=Function.prototype.bind||l,ws}var ys,pl;function Cs(){return pl||(pl=1,ys=Function.prototype.call),ys}var Es,gl;function ml(){return gl||(gl=1,Es=Function.prototype.apply),Es}var ff=typeof Reflect<"u"&&Reflect&&Reflect.apply,pf=qn(),gf=ml(),mf=Cs(),bf=ff,vf=bf||pf.call(mf,gf),wf=qn(),yf=Ri,Cf=Cs(),Ef=vf,bl=function(e){if(e.length<1||typeof e[0]!="function")throw new yf("a function is required");return Ef(wf,Cf,e)},xs,vl;function xf(){if(vl)return xs;vl=1;var l=bl,e=sl,t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var i=!!t&&e&&e(Object.prototype,"__proto__"),n=Object,s=n.getPrototypeOf;return xs=i&&typeof i.get=="function"?l([i.get]):typeof s=="function"?function(u){return s(u==null?u:n(u))}:!1,xs}var Rs,wl;function Rf(){if(wl)return Rs;wl=1;var l=hl(),e=dl(),t=xf();return Rs=l?function(n){return l(n)}:e?function(n){if(!n||typeof n!="object"&&typeof n!="function")throw new TypeError("getProto: not an object");return e(n)}:t?function(n){return t(n)}:null,Rs}var _s,yl;function _f(){if(yl)return _s;yl=1;var l=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=qn();return _s=t.call(l,e),_s}var ne,Tf=rl,Sf=jc,kf=Kc,Mf=qc,Lf=Jc,Ti=Xc,Si=Ri,Df=Yc,Af=Zc,Ff=Qc,Pf=ef,Of=tf,zf=nf,Hf=rf,Bf=af,Cl=Function,Ts=function(l){try{return Cl('"use strict"; return ('+l+").constructor;")()}catch{}},rn=sl,If=hf,Ss=function(){throw new Si},Nf=rn?function(){try{return arguments.callee,Ss}catch{try{return rn(arguments,"callee").get}catch{return Ss}}}():Ss,ki=df()(),Me=Rf(),Vf=dl(),Wf=hl(),El=ml(),sn=Cs(),Mi={},Gf=typeof Uint8Array>"u"||!Me?ne:Me(Uint8Array),oi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ne:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ne:ArrayBuffer,"%ArrayIteratorPrototype%":ki&&Me?Me([][Symbol.iterator]()):ne,"%AsyncFromSyncIteratorPrototype%":ne,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%Atomics%":typeof Atomics>"u"?ne:Atomics,"%BigInt%":typeof BigInt>"u"?ne:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ne:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ne:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ne:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Sf,"%eval%":eval,"%EvalError%":kf,"%Float16Array%":typeof Float16Array>"u"?ne:Float16Array,"%Float32Array%":typeof Float32Array>"u"?ne:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ne:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ne:FinalizationRegistry,"%Function%":Cl,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?ne:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ne:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ne:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ki&&Me?Me(Me([][Symbol.iterator]())):ne,"%JSON%":typeof JSON=="object"?JSON:ne,"%Map%":typeof Map>"u"?ne:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ki||!Me?ne:Me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Tf,"%Object.getOwnPropertyDescriptor%":rn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ne:Promise,"%Proxy%":typeof Proxy>"u"?ne:Proxy,"%RangeError%":Mf,"%ReferenceError%":Lf,"%Reflect%":typeof Reflect>"u"?ne:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ne:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ki||!Me?ne:Me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ne:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ki&&Me?Me(""[Symbol.iterator]()):ne,"%Symbol%":ki?Symbol:ne,"%SyntaxError%":Ti,"%ThrowTypeError%":Nf,"%TypedArray%":Gf,"%TypeError%":Si,"%Uint8Array%":typeof Uint8Array>"u"?ne:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ne:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ne:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ne:Uint32Array,"%URIError%":Df,"%WeakMap%":typeof WeakMap>"u"?ne:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ne:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ne:WeakSet,"%Function.prototype.call%":sn,"%Function.prototype.apply%":El,"%Object.defineProperty%":If,"%Object.getPrototypeOf%":Vf,"%Math.abs%":Af,"%Math.floor%":Ff,"%Math.max%":Pf,"%Math.min%":Of,"%Math.pow%":zf,"%Math.round%":Hf,"%Math.sign%":Bf,"%Reflect.getPrototypeOf%":Wf};if(Me)try{null.error}catch(l){var $f=Me(Me(l));oi["%Error.prototype%"]=$f}var Uf=function l(e){var t;if(e==="%AsyncFunction%")t=Ts("async function () {}");else if(e==="%GeneratorFunction%")t=Ts("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ts("async function* () {}");else if(e==="%AsyncGenerator%"){var i=l("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=l("%AsyncGenerator%");n&&Me&&(t=Me(n.prototype))}return oi[e]=t,t},xl={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},on=qn(),Jn=_f(),jf=on.call(sn,Array.prototype.concat),Kf=on.call(El,Array.prototype.splice),Rl=on.call(sn,String.prototype.replace),Xn=on.call(sn,String.prototype.slice),qf=on.call(sn,RegExp.prototype.exec),Jf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xf=/\\(\\)?/g,Yf=function(e){var t=Xn(e,0,1),i=Xn(e,-1);if(t==="%"&&i!=="%")throw new Ti("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Ti("invalid intrinsic syntax, expected opening `%`");var n=[];return Rl(e,Jf,function(s,a,u,d){n[n.length]=u?Rl(d,Xf,"$1"):a||s}),n},Zf=function(e,t){var i=e,n;if(Jn(xl,i)&&(n=xl[i],i="%"+n[0]+"%"),Jn(oi,i)){var s=oi[i];if(s===Mi&&(s=Uf(i)),typeof s>"u"&&!t)throw new Si("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new Ti("intrinsic "+e+" does not exist!")},ks=function(e,t){if(typeof e!="string"||e.length===0)throw new Si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Si('"allowMissing" argument must be a boolean');if(qf(/^%?[^%]*%?$/,e)===null)throw new Ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Yf(e),n=i.length>0?i[0]:"",s=Zf("%"+n+"%",t),a=s.name,u=s.value,d=!1,f=s.alias;f&&(n=f[0],Kf(i,jf([0,1],f)));for(var g=1,w=!0;g<i.length;g+=1){var b=i[g],E=Xn(b,0,1),R=Xn(b,-1);if((E==='"'||E==="'"||E==="`"||R==='"'||R==="'"||R==="`")&&E!==R)throw new Ti("property names with quotes must have matching quotes");if((b==="constructor"||!w)&&(d=!0),n+="."+b,a="%"+n+"%",Jn(oi,a))u=oi[a];else if(u!=null){if(!(b in u)){if(!t)throw new Si("base intrinsic for "+e+" exists, but the property is not available.");return}if(rn&&g+1>=i.length){var S=rn(u,b);w=!!S,w&&"get"in S&&!("originalValue"in S.get)?u=S.get:u=u[b]}else w=Jn(u,b),u=u[b];w&&!d&&(oi[a]=u)}}return u},_l=ks,Tl=bl,Qf=Tl([_l("%String.prototype.indexOf%")]),Sl=function(e,t){var i=_l(e,!!t);return typeof i=="function"&&Qf(e,".prototype.")>-1?Tl([i]):i},ep=ks,an=Sl,tp=Gn,ip=Ri,kl=ep("%Map%",!0),np=an("Map.prototype.get",!0),rp=an("Map.prototype.set",!0),sp=an("Map.prototype.has",!0),op=an("Map.prototype.delete",!0),ap=an("Map.prototype.size",!0),Ml=!!kl&&function(){var e,t={assert:function(i){if(!t.has(i))throw new ip("Side channel does not contain "+tp(i))},delete:function(i){if(e){var n=op(e,i);return ap(e)===0&&(e=void 0),n}return!1},get:function(i){if(e)return np(e,i)},has:function(i){return e?sp(e,i):!1},set:function(i,n){e||(e=new kl),rp(e,i,n)}};return t},lp=ks,Yn=Sl,hp=Gn,Zn=Ml,up=Ri,Li=lp("%WeakMap%",!0),dp=Yn("WeakMap.prototype.get",!0),cp=Yn("WeakMap.prototype.set",!0),fp=Yn("WeakMap.prototype.has",!0),pp=Yn("WeakMap.prototype.delete",!0),gp=Li?function(){var e,t,i={assert:function(n){if(!i.has(n))throw new up("Side channel does not contain "+hp(n))},delete:function(n){if(Li&&n&&(typeof n=="object"||typeof n=="function")){if(e)return pp(e,n)}else if(Zn&&t)return t.delete(n);return!1},get:function(n){return Li&&n&&(typeof n=="object"||typeof n=="function")&&e?dp(e,n):t&&t.get(n)},has:function(n){return Li&&n&&(typeof n=="object"||typeof n=="function")&&e?fp(e,n):!!t&&t.has(n)},set:function(n,s){Li&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new Li),cp(e,n,s)):Zn&&(t||(t=Zn()),t.set(n,s))}};return i}:Zn,mp=Ri,bp=Gn,vp=Uc,wp=Ml,yp=gp,Cp=yp||wp||vp,Ep=function(){var e,t={assert:function(i){if(!t.has(i))throw new mp("Side channel does not contain "+bp(i))},delete:function(i){return!!e&&e.delete(i)},get:function(i){return e&&e.get(i)},has:function(i){return!!e&&e.has(i)},set:function(i,n){e||(e=Cp()),e.set(i,n)}};return t},xp=String.prototype.replace,Rp=/%20/g,Ms={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ls={default:Ms.RFC3986,formatters:{RFC1738:function(l){return xp.call(l,Rp,"+")},RFC3986:function(l){return String(l)}},RFC1738:Ms.RFC1738,RFC3986:Ms.RFC3986},_p=Ls,Ds=Object.prototype.hasOwnProperty,ai=Array.isArray,wt=function(){for(var l=[],e=0;e<256;++e)l.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return l}(),Tp=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(ai(i)){for(var n=[],s=0;s<i.length;++s)typeof i[s]<"u"&&n.push(i[s]);t.obj[t.prop]=n}}},Ll=function(e,t){for(var i=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},Sp=function l(e,t,i){if(!t)return e;if(typeof t!="object"&&typeof t!="function"){if(ai(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!Ds.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return ai(e)&&!ai(t)&&(n=Ll(e,i)),ai(e)&&ai(t)?(t.forEach(function(s,a){if(Ds.call(e,a)){var u=e[a];u&&typeof u=="object"&&s&&typeof s=="object"?e[a]=l(u,s,i):e.push(s)}else e[a]=s}),e):Object.keys(t).reduce(function(s,a){var u=t[a];return Ds.call(s,a)?s[a]=l(s[a],u,i):s[a]=u,s},n)},kp=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},Mp=function(l,e,t){var i=l.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},As=1024,Lp=function(e,t,i,n,s){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),i==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",d=0;d<a.length;d+=As){for(var f=a.length>=As?a.slice(d,d+As):a,g=[],w=0;w<f.length;++w){var b=f.charCodeAt(w);if(b===45||b===46||b===95||b===126||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||s===_p.RFC1738&&(b===40||b===41)){g[g.length]=f.charAt(w);continue}if(b<128){g[g.length]=wt[b];continue}if(b<2048){g[g.length]=wt[192|b>>6]+wt[128|b&63];continue}if(b<55296||b>=57344){g[g.length]=wt[224|b>>12]+wt[128|b>>6&63]+wt[128|b&63];continue}w+=1,b=65536+((b&1023)<<10|f.charCodeAt(w)&1023),g[g.length]=wt[240|b>>18]+wt[128|b>>12&63]+wt[128|b>>6&63]+wt[128|b&63]}u+=g.join("")}return u},Dp=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var s=t[n],a=s.obj[s.prop],u=Object.keys(a),d=0;d<u.length;++d){var f=u[d],g=a[f];typeof g=="object"&&g!==null&&i.indexOf(g)===-1&&(t.push({obj:a,prop:f}),i.push(g))}return Tp(t),e},Ap=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Fp=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pp=function(e,t){return[].concat(e,t)},Op=function(e,t){if(ai(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},Dl={arrayToObject:Ll,assign:kp,combine:Pp,compact:Dp,decode:Mp,encode:Lp,isBuffer:Fp,isRegExp:Ap,maybeMap:Op,merge:Sp},Al=Ep,Qn=Dl,ln=Ls,zp=Object.prototype.hasOwnProperty,Fl={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},yt=Array.isArray,Hp=Array.prototype.push,Pl=function(l,e){Hp.apply(l,yt(e)?e:[e])},Bp=Date.prototype.toISOString,Ol=ln.default,Te={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Qn.encode,encodeValuesOnly:!1,filter:void 0,format:Ol,formatter:ln.formatters[Ol],indices:!1,serializeDate:function(e){return Bp.call(e)},skipNulls:!1,strictNullHandling:!1},Ip=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Fs={},Np=function l(e,t,i,n,s,a,u,d,f,g,w,b,E,R,S,D,L,G){for(var B=e,N=G,z=0,ae=!1;(N=N.get(Fs))!==void 0&&!ae;){var J=N.get(e);if(z+=1,typeof J<"u"){if(J===z)throw new RangeError("Cyclic object value");ae=!0}typeof N.get(Fs)>"u"&&(z=0)}if(typeof g=="function"?B=g(t,B):B instanceof Date?B=E(B):i==="comma"&&yt(B)&&(B=Qn.maybeMap(B,function(qt){return qt instanceof Date?E(qt):qt})),B===null){if(a)return f&&!D?f(t,Te.encoder,L,"key",R):t;B=""}if(Ip(B)||Qn.isBuffer(B)){if(f){var $=D?t:f(t,Te.encoder,L,"key",R);return[S($)+"="+S(f(B,Te.encoder,L,"value",R))]}return[S(t)+"="+S(String(B))]}var _e=[];if(typeof B>"u")return _e;var Z;if(i==="comma"&&yt(B))D&&f&&(B=Qn.maybeMap(B,f)),Z=[{value:B.length>0?B.join(",")||null:void 0}];else if(yt(g))Z=g;else{var ge=Object.keys(B);Z=w?ge.sort(w):ge}var q=d?String(t).replace(/\./g,"%2E"):String(t),Ve=n&&yt(B)&&B.length===1?q+"[]":q;if(s&&yt(B)&&B.length===0)return Ve+"[]";for(var We=0;We<Z.length;++We){var ht=Z[We],pi=typeof ht=="object"&&ht&&typeof ht.value<"u"?ht.value:B[ht];if(!(u&&pi===null)){var ut=b&&d?String(ht).replace(/\./g,"%2E"):String(ht),Ct=yt(B)?typeof i=="function"?i(Ve,ut):Ve:Ve+(b?"."+ut:"["+ut+"]");G.set(e,z);var hr=Al();hr.set(Fs,G),Pl(_e,l(pi,Ct,i,n,s,a,u,d,i==="comma"&&D&&yt(B)?null:f,g,w,b,E,R,S,D,L,hr))}}return _e},Vp=function(e){if(!e)return Te;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||Te.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=ln.default;if(typeof e.format<"u"){if(!zp.call(ln.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=ln.formatters[i],s=Te.filter;(typeof e.filter=="function"||yt(e.filter))&&(s=e.filter);var a;if(e.arrayFormat in Fl?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=Te.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Te.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Te.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Te.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Te.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Te.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Te.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Te.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Te.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Te.encodeValuesOnly,filter:s,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Te.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Te.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Te.strictNullHandling}},Wp=function(l,e){var t=l,i=Vp(e),n,s;typeof i.filter=="function"?(s=i.filter,t=s("",t)):yt(i.filter)&&(s=i.filter,n=s);var a=[];if(typeof t!="object"||t===null)return"";var u=Fl[i.arrayFormat],d=u==="comma"&&i.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var f=Al(),g=0;g<n.length;++g){var w=n[g],b=t[w];i.skipNulls&&b===null||Pl(a,Np(b,w,u,d,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,f))}var E=a.join(i.delimiter),R=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),E.length>0?R+E:""},li=Dl,Ps=Object.prototype.hasOwnProperty,zl=Array.isArray,we={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:li.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},Gp=function(l){return l.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Hl=function(l,e,t){if(l&&typeof l=="string"&&e.comma&&l.indexOf(",")>-1)return l.split(",");if(e.throwOnLimitExceeded&&t>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return l},$p="utf8=%26%2310003%3B",Up="utf8=%E2%9C%93",jp=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=t.parameterLimit===1/0?void 0:t.parameterLimit,a=n.split(t.delimiter,t.throwOnLimitExceeded?s+1:s);if(t.throwOnLimitExceeded&&a.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var u=-1,d,f=t.charset;if(t.charsetSentinel)for(d=0;d<a.length;++d)a[d].indexOf("utf8=")===0&&(a[d]===Up?f="utf-8":a[d]===$p&&(f="iso-8859-1"),u=d,d=a.length);for(d=0;d<a.length;++d)if(d!==u){var g=a[d],w=g.indexOf("]="),b=w===-1?g.indexOf("="):w+1,E,R;b===-1?(E=t.decoder(g,we.decoder,f,"key"),R=t.strictNullHandling?null:""):(E=t.decoder(g.slice(0,b),we.decoder,f,"key"),R=li.maybeMap(Hl(g.slice(b+1),t,zl(i[E])?i[E].length:0),function(D){return t.decoder(D,we.decoder,f,"value")})),R&&t.interpretNumericEntities&&f==="iso-8859-1"&&(R=Gp(String(R))),g.indexOf("[]=")>-1&&(R=zl(R)?[R]:R);var S=Ps.call(i,E);S&&t.duplicates==="combine"?i[E]=li.combine(i[E],R):(!S||t.duplicates==="last")&&(i[E]=R)}return i},Kp=function(l,e,t,i){var n=0;if(l.length>0&&l[l.length-1]==="[]"){var s=l.slice(0,-1).join("");n=Array.isArray(e)&&e[s]?e[s].length:0}for(var a=i?e:Hl(e,t,n),u=l.length-1;u>=0;--u){var d,f=l[u];if(f==="[]"&&t.parseArrays)d=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:li.combine([],a);else{d=t.plainObjects?{__proto__:null}:{};var g=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,w=t.decodeDotInKeys?g.replace(/%2E/g,"."):g,b=parseInt(w,10);!t.parseArrays&&w===""?d={0:a}:!isNaN(b)&&f!==w&&String(b)===w&&b>=0&&t.parseArrays&&b<=t.arrayLimit?(d=[],d[b]=a):w!=="__proto__"&&(d[w]=a)}a=d}return a},qp=function(e,t,i,n){if(e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,d=i.depth>0&&a.exec(s),f=d?s.slice(0,d.index):s,g=[];if(f){if(!i.plainObjects&&Ps.call(Object.prototype,f)&&!i.allowPrototypes)return;g.push(f)}for(var w=0;i.depth>0&&(d=u.exec(s))!==null&&w<i.depth;){if(w+=1,!i.plainObjects&&Ps.call(Object.prototype,d[1].slice(1,-1))&&!i.allowPrototypes)return;g.push(d[1])}if(d){if(i.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+i.depth+" and strictDepth is true");g.push("["+s.slice(d.index)+"]")}return Kp(g,t,i,n)}},Jp=function(e){if(!e)return we;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=typeof e.charset>"u"?we.charset:e.charset,i=typeof e.duplicates>"u"?we.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var n=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:we.allowDots:!!e.allowDots;return{allowDots:n,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:we.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:we.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:we.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:we.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:we.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:we.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:we.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:we.decoder,delimiter:typeof e.delimiter=="string"||li.isRegExp(e.delimiter)?e.delimiter:we.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:we.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:we.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:we.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:we.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:we.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:we.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},Xp=function(l,e){var t=Jp(e);if(l===""||l===null||typeof l>"u")return t.plainObjects?{__proto__:null}:{};for(var i=typeof l=="string"?jp(l,t):l,n=t.plainObjects?{__proto__:null}:{},s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],d=qp(u,i[u],t,typeof l=="string");n=li.merge(n,d,t)}return t.allowSparse===!0?n:li.compact(n)},Yp=Wp,Zp=Xp,Qp=Ls,eg={formats:Qp,parse:Zp,stringify:Yp};const tg=lc(eg),Os=l=>V.upperFirst(V.camelCase(l));function ig(l){let e=[];function t(i){for(let n in i)typeof i[n]=="object"&&i[n]!==null&&(!["schema","columns"].includes(n)&&!V.has(i[n],"schema")&&V.get(i[n],"type")!="group"?(V.has(i[n],"placeholder")||(i[n].placeholder=V.get(i[n],"title")),i[n].field=n,e.push(i[n])):t(i[n]))}return t(l),e}const{event:St}=Ce.emitter,ng=(l="myStore")=>Ba.defineStore(l,{state:()=>({mainKey:"",form:{},items:{},routes:{},fields:[],options:[],filters:[],loadings:{},dialog:!1,structure:{},paginations:{},searchParam:"",isEditing:!1,panelName:!1,editItemId:!1,hiddenActions:[],isFiltering:!1,sorts:["id:desc"],selected:new Set([])}),getters:{getItems(e){return t=>V.get(e.items,t,[])},getPaginations(e){return t=>V.get(e.paginations,t,[])},mainItems(e){return V.get(e.items,e.mainKey,[])},mainPagination(e){return this.getPaginations(e.mainKey)},mainRoute(e){return V.get(e.routes,e.mainKey,"")},flatFields(e){let t=ig(e.fields);return t.unshift(p.reactive({title:"",type:"hidden",value:"_select_",field:"_select_",align:"center",headerSort:!1})),t},formFields(e){return e.fields},flatFieldsWithoutActions(){return this.flatFields.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))},headers(){return fg(this.flatFields)},headersWithoutActions(){return this.headers.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(e,t){this.items[e]=t},addData(e){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey]=[e,...this.items[this.mainKey]]},editData(e){let t=this.items[this.mainKey];t=t.map(i=>i.id==e.id?{_index_:i._index_,...e}:i),this.items[this.mainKey]=[...t]},removeData(e){let t=this.items[this.mainKey];t=t.filter(i=>i.id!=e),this.items[this.mainKey]=[...t]},getModelKey(e){let t=typeof e=="string"?e.substr(e.lastIndexOf("/")+1):e.key;return this.mainKey=this.mainKey||Os(t),Os(t)},setPagination(e,t){t in this.paginations||(this.paginations[t]={total:0,currentPage:0,lastPage:0}),this.paginations[t].total=V.get(e,"total"),this.paginations[t].currentPage=V.get(e,"current_page"),this.paginations[t].lastPage=V.get(e,"last_page")},paginate(e){this.isFiltering?this.getWithFilter(e):this.loadItems(this.mainKey,e)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},convertToFilterForm(){var t,i,n;let e={};for(const s of this.filters)if((t=s==null?void 0:s.field)!=null&&t.field){if((i=s==null?void 0:s.field)!=null&&i.query){const a=(n=s==null?void 0:s.field)==null?void 0:n.query(s);e=V.merge(e,a);continue}e[s.field.field]={[s.op]:s.value}}return tg.stringify({filters:e,sort:this.sorts},{encodeValuesOnly:!0})},generateQuery(e=this.mainKey){let t=V.get(this.routes,e+".index","");const[i,n]=t.split("?");return i+"/export?"+(n?n+"&":"")+this.convertToFilterForm()},generateRoute(e=this.mainKey,t=!1){let i=V.get(this.routes,e+".index",""),n=i.indexOf("?")>-1?"&page=":"?page=";return n+=t,this.searchParam&&(n+="&search="+this.searchParam),i+n+"&"+this.convertToFilterForm()},async loadItems(e=this.mainKey,t=1){this.loadings[e]=!0,this.loadings.mainLoading=e===this.mainKey;const i=this.generateRoute(e,t);return bt.get(i).then(n=>{n=V.get(n,"data",{}),this.items[e]=V.get(n,"data"),this.setPagination(n,e)}).finally(()=>{this.loadings[e]=!1,this.loadings.mainLoading=!1})},customLoadItems(e,t=1,i=()=>({})){this.loadings[e]=!0,i(n=>{this.items[e]=n.data,this.setPagination(n,e)},()=>{},()=>{this.loadings[e]=!1},t)},getWithFilter(e=1,t=15){const i="http://192.168.190.10:9090/api/filter";return this.loadings.filter=!0,bt.post(`${i}?page=${e}`,{model:this.mainKey,itemPerPage:t,filters:this.filters}).then(n=>{n=V.get(n,"data",{}),this.items[this.mainKey]=n.data,this.setPagination(n,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(e){this.loadings.mainLoading=!0;let t=V.get(this.routes,this.mainKey+".create",""),i=Wl(e,this.flatFields);return bt.post(t,i).then(async()=>{this.reloadData(),St("alert",{text:"با موفقیت ثبت شد",color:"green"}),St("handleDialogForm",!1)}).catch(n=>{St("alert",{text:V.get(n,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(e){let t=V.get(this.routes,this.mainKey+".update","");t=t.split("?")[0];let i=Wl(e,this.flatFields);return this.loadings.mainLoading=!0,bt.patch(t+"/"+this.editItemId,i).then(async()=>{this.reloadData(),St("alert",{text:"با موفقیت ویرایش شد",color:"green"}),St("handleDialogForm",!1)}).catch(n=>{St("alert",{text:V.get(n,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(e){const t=Array.isArray(e)?e:[e];let i=V.get(this.routes,this.mainKey+".delete","");i=i.split("?")[0],this.loadings.mainLoading=!0,t.forEach(n=>{bt.delete(i+"/"+n).then(()=>{St("alert",{text:"با موفقیت حذف شد",color:"green"}),St("handleDeleteDialog",!1),this.removeData(e),this.reloadData()}).catch(s=>{St("alert",{text:V.get(s,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),rg=l=>ng(l)(),sg=["create","update","delete","show","print","importExcel","exportExcel","filter"],zs=p.ref([]);function Hs(){function l(t){zs.value=sg.filter(i=>!t.includes(i))}function e(t){return zs.value.includes(t)}return{can:e,setPermissions:l,permissions:zs}}const og=l=>({onChange:(...e)=>{const t=e[2].form$.el$(l);t&&"clear"in t&&t.clear(),t&&"updateItems"in t&&t.updateItems()}}),ag=(l={})=>({search:!0,clearOnSearch:!0,type:"select",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),lg=(l={})=>({search:!0,clearOnSearch:!0,type:"select",object:!0,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp"),e.getValue()),...l}),hg=(l={})=>({search:!0,clearOnSearch:!0,type:"multiselect",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),Bl=(l={})=>({search:!0,clearOnSearch:!0,type:"tags",delay:1e3,object:!0,filterResults:!1,hideSelected:!0,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),Il=(l={})=>({type:"date",...l}),Nl={normalSelect:lg,multiSelect:hg,multiFile:(l={})=>({type:"multifile",label:l==null?void 0:l.title,placeholder:l==null?void 0:l.title,drop:!0,filename:"name",url:"http://192.168.190.69:9090/api/file/show",uploadTempEndpoint:"http://192.168.190.69:9090/api/file/upload",accept:[".jpg",".png",".gif",".docx",".txt",".zip",".rar"],sort:!0,clickable:!0,object:!0,storeFile:"hash",...l}),hasRel:og,select:ag,group:(l,e={})=>({addClass:["bg-gray-100","p-4","rounded-lg",""],type:"group",label:l,schema:e}),tags:Bl,date:Il};let Vl={};function ug({form:l,fieldName:e,field:t}){return Array.isArray(V.get(l,e))&&V.has(t,"valueProp")}function Wl(l,e){let t={},i=!1;for(let n in l){let s=cg(n,e);if(!s)continue;i=!0;let a=dg(s),u=n;const d=V.get(s,"valueProp",!1);if(d&&(u+="."+d),ug({form:l,fieldName:n,field:s})){t[a]=V.get(l,n).map(f=>V.get(f,d));continue}t[a]=V.get(l,u,V.get(l,n))}return i?t:l}function dg(l){return"sendKey"in l?l.sendKey:l.field}function cg(l,e){return e.find(t=>t.field==l)}function fg(l){let e=l.filter(s=>s.isHeader&&s.field!=="_actions_");const t=l.find(s=>s.field==="_actions_");let i={title:"",value:"_actions_",field:"_actions_",type:"text",align:"left",headerSort:!1,hozAlign:"left",headerHozAlign:"left"};t&&(i={...i,...t}),e.push(i);let n=0;return l.find(s=>s.field==="_select_"&&s.isHeader)&&(n=1),e.splice(n,0,{title:"#",type:"text",value:"_index_",field:"_index_",maxWidth:"100px",align:"center",headerSort:!1}),e}function pg(l){for(const e of l)"init"in e&&e.init()}const gg=l=>{const e=V.get(Vl,l);return e?p.markRaw(e):""},mg=l=>({url:e,key:t,foreignKey:i,dataKey:n,change:s}={url:!1,key:!1,foreignKey:!1,dataKey:!1,change:a=>a})=>async(...a)=>{let u=a[0],d=e;if(i&&n){d+=d.includes("?")?"&":"?";const E=i.split(".");let R="filters";for(const S of E)R+=`[${S.replace("|",".")}]`;d+=`${R}[$eq]={${n}}`}!t&&typeof d=="string"&&(t=(E=>{const R=E.lastIndexOf("/");let S;return E.includes("?")?S=E.substring(R+1,E.indexOf("?")):S=E.substring(R+1),Os(S)})(d)),(d.match(/\{(.*?)\}/g)||[]).forEach(E=>{const R=E.replace(/[{}]/g,"");d=d.replace(E,V.get(l.form,R,""))});const w=d.includes("?")?"&":"?";u=typeof u=="string"?u:"";const b=await bt.get(d+w+"search="+u);return s||(s=E=>E),s(V.get(b,"data.data",[]))},bg=(l,e)=>l({getRegisterField:gg,axios:bt,get:mg(e),getSafe:V.get,useFields:Nl}),Gl=l=>{Vl=l};function vg({fields:l,hiddenActions:e,options:t,route:i,structure:n}){const{setPermissions:s}=Hs(),a=rg("Store-"+parseInt(Math.random()*1e7));a.fields=bg(l,a),Ce.emitter.event("beforeFormueInit");const u=a.getModelKey(i),d={create:typeof i=="string"?i:i.create,update:typeof i=="string"?i:i.update,delete:typeof i=="string"?i:i.delete,index:typeof i=="string"?i:i.index};return a.routes[u]=d,a.loadItems(),a.options=t,s(e),a.structure=n,pg(a.flatFields),a}const wg={en:{clear:"Clear",no:"No",yes:"yes",alert_to_delete:"Are you sure to delete?",first:"First",previous:"Previous",next:"Next",last:"Last",apply_filter:"Apply filter",filter:"Filter",add_filter:"Add filter",clear_all:"Clear all",add:"Add",save:"Save",edit:"Edit",cancel:"Cancel",choose_filter:"Choose filter",select_type:"Select type",equal_to:"Equal to",not_equal_to:"Not equal to",greater_than:"Greater than",less_than:"Less than",look_like:"Look like",search:"Search ...",range:"Range",add:"Add",export:"Export",export_as_pdf:"Export as PDF",export_as_excel:" Export as Excel",print:"Print",reload:"Reload",select_row:"Select row",custom_column:"Custom column",filter_data:"Filter data",active_filter:"Active filter",not_null:"Not Null",null:"Null"},fa:{clear:"پاک کردن",no:"خیر",yes:"بله",alert_to_delete:"آیا از حذف کردن مطمئن هستید؟",first:"ابتدا",previous:"قبلی",next:"بعدی",last:"آخرین",apply_filter:"اعمال فیلتر",filter:"فیلتر",add_filter:"افزودن فیلتر",clear_all:"حذف فیلترها",add:"افرودن",save:"ذخیره",edit:"ویرایش",cancel:"لغو",choose_filter:"انتخاب فیلتر",select_type:"انتخاب کنید",equal_to:"برابر با",not_equal_to:"نابرابر با",greater_than:"بزرگتر از",less_than:"کوچکتر از",look_like:"مشابه",search:"جستجو ...",range:"محدوده",edit_filter:"ویرایش فیلتر",export:"خروجی‌گرفتن",export_as_pdf:"PDF خروجی",export_as_excel:"Excel خروجی",print:"خروجی چاپی",reload:"بارگذاری مجدد",select_row:"انتخاب ردیف",custom_column:"ستون سفارشی",filter_data:"فیلترکردن ",active_filter:"فیلترهای فعال",not_load_or_existing_data:"دیتایی وجود ندارد :(",filter_save_placeholder:"اسم فیلتر",not_filter_create_yes:"هنوز فیلتری ایجاد نشده است",operator:"عملگر",in:"برابر با مقادیر",not_in:"نابرابر با مقادیر",value:"مقدار",between:"از میان",not_null:"دارای مقدار",null:"بدون مقدار"}},Di=Ba.defineStore("formuCrudLangs",{state:()=>({lang:"fa",dir:"rtl",langs:wg}),getters:{currentLang(l){return V.get(l.langs,l.lang,"fa")}},actions:{translate(l){return V.get(this.currentLang,l,l)}}});class De{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class ce{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var n=e?t.split(e):[t],s=n.length,a;for(let u=0;u<s&&(i=i[n[u]],a=i,!!i);u++);return a}static deepClone(e,t,i=[]){var n={}.__proto__,s=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let u=e[a],d,f;u!=null&&typeof u=="object"&&(u.__proto__===n||u.__proto__===s)&&(d=i.findIndex(g=>g.subject===u),d>-1?t[a]=i[d].copy:(f=Object.assign(Array.isArray(u)?[]:{},u),i.unshift({subject:u,copy:f}),t[a]=this.deepClone(u,f,i)))}return t}}let yg=class ac extends De{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,n=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let s=ce.elOffset(this.container);i-=s.left,n-=s.top}return{x:i,y:n}}elementPositionCoords(e,t="right"){var i=ce.elOffset(e),n,s,a;switch(this.container!==document.body&&(n=ce.elOffset(this.container),i.left-=n.left,i.top-=n.top),t){case"right":s=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":s=i.left,a=i.top+e.offsetHeight;break;case"left":s=i.left,a=i.top-1;break;case"top":s=i.left,a=i.top;break;case"center":s=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:s,y:a,offset:i}}show(e,t){var i,n,s,a,u;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(s=e,u=this.elementPositionCoords(e,t),a=u.offset,i=u.x,n=u.y):typeof e=="number"?(a={top:0,left:0},i=e,n=t):(u=this.containerEventCoords(e),i=u.x,n=u.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,n,s,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",d=>{d.stopPropagation()}),this)}_fitToScreen(e,t,i,n,s){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-n.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let u=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>u)if(i)switch(s){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=u+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new ac(this.table,e,this),this.childPopup}};class ee extends De{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(n=>n.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new yg(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Cg={rownum:function(l,e,t,i,n,s){return s.getPosition()}};const Fi=class Fi extends ee{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var s="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[s]&&(a=this.lookupAccessor(e.definition[s]),a&&(t=!0,i[s]={accessor:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Fi.accessors[e]?t=Fi.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),s=ce.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var u,d,f,g;a.modules.accessor&&(d=a.modules.accessor[i]||a.modules.accessor.accessor||!1,d&&(u=a.getFieldValue(s),u!="undefined"&&(g=a.getComponent(),f=typeof d.params=="function"?d.params(u,s,t,g,n):d.params,a.setFieldValue(s,d.accessor(u,s,t,f,g,n)))))}),s}};O(Fi,"moduleName","accessor"),O(Fi,"accessors",Cg);let Bs=Fi;var Eg={method:"GET"};function Is(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((n,s)=>{t=t.concat(Is(n,e?e+"["+s+"]":s))});else if(typeof l=="object")for(var i in l)t=t.concat(Is(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function xg(l){var e=Is(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function $l(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+xg(t)),l}function Rg(l,e,t){var i;return new Promise((n,s)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(u=>{u.ok?u.json().then(d=>{n(d)}).catch(d=>{s(d),console.warn("Ajax Load Error - Invalid JSON returned",d)}):(console.error("Ajax Load Error - Connection Error: "+u.status,u.statusText),s(u))}).catch(u=>{console.error("Ajax Load Error - Connection Error: ",u),s(u)})):(console.warn("Ajax Load Error - No URL Set"),n([]))})}function Ns(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((n,s)=>{t=t.concat(Ns(n,e?e+"["+s+"]":s))});else if(typeof l=="object")for(var i in l)t=t.concat(Ns(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var _g={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=Ns(t),n=new FormData;return i.forEach(function(s){n.append(s.key,s.value)}),n}}};const lt=class lt extends ee{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=lt.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||lt.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||lt.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,n){var s=this.table.options.ajaxParams;return s&&(typeof s=="function"&&(s=s.call(this.table)),n=Object.assign(Object.assign({},s),n)),n}requestDataCheck(e,t,i,n){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,n,s){var a;return!s&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):s}setDefaultConfig(e={}){this.config=Object.assign({},lt.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n)):Promise.reject()}};O(lt,"moduleName","ajax"),O(lt,"defaultConfig",Eg),O(lt,"defaultURLGenerator",$l),O(lt,"defaultLoaderPromise",Rg),O(lt,"contentTypeFormatters",_g);let Vs=lt;var Tg={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},Sg={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,n=[],s=[];return l=l.split(`
30
+ `+e.prev}function $n(l,e){var t=ds(l),i=[];if(t){i.length=l.length;for(var n=0;n<l.length;n++)i[n]=Tt(l,n)?e(l[n],l):""}var s=typeof ls=="function"?ls(l):[],a;if(_i){a={};for(var u=0;u<s.length;u++)a["$"+s[u]]=s[u]}for(var d in l)Tt(l,d)&&(t&&String(Number(d))===d&&d<l.length||_i&&a["$"+d]instanceof Symbol||(Ga.call(/[^\w$]/,d)?i.push(e(d,l)+": "+e(l[d],l)):i.push(d+": "+e(l[d],l))));if(typeof ls=="function")for(var f=0;f<s.length;f++)ja.call(l,s[f])&&i.push("["+e(s[f])+"]: "+e(l[s[f]],l));return i}var Ic=Gn,Nc=Ri,Un=function(l,e,t){for(var i=l,n;(n=i.next)!=null;i=n)if(n.key===e)return i.next=n.next,t||(n.next=l.next,l.next=n),n},Vc=function(l,e){if(l){var t=Un(l,e);return t&&t.value}},Wc=function(l,e,t){var i=Un(l,e);i?i.value=t:l.next={key:e,next:l.next,value:t}},Gc=function(l,e){return l?!!Un(l,e):!1},$c=function(l,e){if(l)return Un(l,e,!0)},Uc=function(){var e,t={assert:function(i){if(!t.has(i))throw new Nc("Side channel does not contain "+Ic(i))},delete:function(i){var n=e&&e.next,s=$c(e,i);return s&&n&&n===s&&(e=void 0),!!s},get:function(i){return Vc(e,i)},has:function(i){return Gc(e,i)},set:function(i,n){e||(e={next:void 0}),Wc(e,i,n)}};return t},rl=Object,jc=Error,Kc=EvalError,qc=RangeError,Jc=ReferenceError,Xc=SyntaxError,Yc=URIError,Zc=Math.abs,Qc=Math.floor,ef=Math.max,tf=Math.min,nf=Math.pow,rf=Math.round,sf=Number.isNaN||function(e){return e!==e},of=sf,af=function(e){return of(e)||e===0?e:e<0?-1:1},lf=Object.getOwnPropertyDescriptor,jn=lf;if(jn)try{jn([],"length")}catch{jn=null}var sl=jn,Kn=Object.defineProperty||!1;if(Kn)try{Kn({},"a",{value:1})}catch{Kn=!1}var hf=Kn,ps,ol;function uf(){return ol||(ol=1,ps=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==n||u.enumerable!==!0)return!1}return!0}),ps}var gs,al;function df(){if(al)return gs;al=1;var l=typeof Symbol<"u"&&Symbol,e=uf();return gs=function(){return typeof l!="function"||typeof Symbol!="function"||typeof l("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},gs}var ms,ll;function hl(){return ll||(ll=1,ms=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ms}var bs,ul;function dl(){if(ul)return bs;ul=1;var l=rl;return bs=l.getPrototypeOf||null,bs}var vs,cl;function cf(){if(cl)return vs;cl=1;var l="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",n=function(d,f){for(var g=[],w=0;w<d.length;w+=1)g[w]=d[w];for(var b=0;b<f.length;b+=1)g[b+d.length]=f[b];return g},s=function(d,f){for(var g=[],w=f||0,b=0;w<d.length;w+=1,b+=1)g[b]=d[w];return g},a=function(u,d){for(var f="",g=0;g<u.length;g+=1)f+=u[g],g+1<u.length&&(f+=d);return f};return vs=function(d){var f=this;if(typeof f!="function"||e.apply(f)!==i)throw new TypeError(l+f);for(var g=s(arguments,1),w,b=function(){if(this instanceof w){var L=f.apply(this,n(g,arguments));return Object(L)===L?L:this}return f.apply(d,n(g,arguments))},E=t(0,f.length-g.length),R=[],S=0;S<E;S++)R[S]="$"+S;if(w=Function("binder","return function ("+a(R,",")+"){ return binder.apply(this,arguments); }")(b),f.prototype){var D=function(){};D.prototype=f.prototype,w.prototype=new D,D.prototype=null}return w},vs}var ws,fl;function qn(){if(fl)return ws;fl=1;var l=cf();return ws=Function.prototype.bind||l,ws}var ys,pl;function Cs(){return pl||(pl=1,ys=Function.prototype.call),ys}var Es,gl;function ml(){return gl||(gl=1,Es=Function.prototype.apply),Es}var ff=typeof Reflect<"u"&&Reflect&&Reflect.apply,pf=qn(),gf=ml(),mf=Cs(),bf=ff,vf=bf||pf.call(mf,gf),wf=qn(),yf=Ri,Cf=Cs(),Ef=vf,bl=function(e){if(e.length<1||typeof e[0]!="function")throw new yf("a function is required");return Ef(wf,Cf,e)},xs,vl;function xf(){if(vl)return xs;vl=1;var l=bl,e=sl,t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var i=!!t&&e&&e(Object.prototype,"__proto__"),n=Object,s=n.getPrototypeOf;return xs=i&&typeof i.get=="function"?l([i.get]):typeof s=="function"?function(u){return s(u==null?u:n(u))}:!1,xs}var Rs,wl;function Rf(){if(wl)return Rs;wl=1;var l=hl(),e=dl(),t=xf();return Rs=l?function(n){return l(n)}:e?function(n){if(!n||typeof n!="object"&&typeof n!="function")throw new TypeError("getProto: not an object");return e(n)}:t?function(n){return t(n)}:null,Rs}var _s,yl;function _f(){if(yl)return _s;yl=1;var l=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=qn();return _s=t.call(l,e),_s}var ne,Tf=rl,Sf=jc,kf=Kc,Mf=qc,Lf=Jc,Ti=Xc,Si=Ri,Df=Yc,Af=Zc,Ff=Qc,Pf=ef,Of=tf,zf=nf,Hf=rf,Bf=af,Cl=Function,Ts=function(l){try{return Cl('"use strict"; return ('+l+").constructor;")()}catch{}},rn=sl,If=hf,Ss=function(){throw new Si},Nf=rn?function(){try{return arguments.callee,Ss}catch{try{return rn(arguments,"callee").get}catch{return Ss}}}():Ss,ki=df()(),Me=Rf(),Vf=dl(),Wf=hl(),El=ml(),sn=Cs(),Mi={},Gf=typeof Uint8Array>"u"||!Me?ne:Me(Uint8Array),oi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ne:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ne:ArrayBuffer,"%ArrayIteratorPrototype%":ki&&Me?Me([][Symbol.iterator]()):ne,"%AsyncFromSyncIteratorPrototype%":ne,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%Atomics%":typeof Atomics>"u"?ne:Atomics,"%BigInt%":typeof BigInt>"u"?ne:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ne:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ne:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ne:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Sf,"%eval%":eval,"%EvalError%":kf,"%Float16Array%":typeof Float16Array>"u"?ne:Float16Array,"%Float32Array%":typeof Float32Array>"u"?ne:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ne:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ne:FinalizationRegistry,"%Function%":Cl,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?ne:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ne:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ne:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ki&&Me?Me(Me([][Symbol.iterator]())):ne,"%JSON%":typeof JSON=="object"?JSON:ne,"%Map%":typeof Map>"u"?ne:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ki||!Me?ne:Me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Tf,"%Object.getOwnPropertyDescriptor%":rn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ne:Promise,"%Proxy%":typeof Proxy>"u"?ne:Proxy,"%RangeError%":Mf,"%ReferenceError%":Lf,"%Reflect%":typeof Reflect>"u"?ne:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ne:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ki||!Me?ne:Me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ne:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ki&&Me?Me(""[Symbol.iterator]()):ne,"%Symbol%":ki?Symbol:ne,"%SyntaxError%":Ti,"%ThrowTypeError%":Nf,"%TypedArray%":Gf,"%TypeError%":Si,"%Uint8Array%":typeof Uint8Array>"u"?ne:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ne:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ne:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ne:Uint32Array,"%URIError%":Df,"%WeakMap%":typeof WeakMap>"u"?ne:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ne:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ne:WeakSet,"%Function.prototype.call%":sn,"%Function.prototype.apply%":El,"%Object.defineProperty%":If,"%Object.getPrototypeOf%":Vf,"%Math.abs%":Af,"%Math.floor%":Ff,"%Math.max%":Pf,"%Math.min%":Of,"%Math.pow%":zf,"%Math.round%":Hf,"%Math.sign%":Bf,"%Reflect.getPrototypeOf%":Wf};if(Me)try{null.error}catch(l){var $f=Me(Me(l));oi["%Error.prototype%"]=$f}var Uf=function l(e){var t;if(e==="%AsyncFunction%")t=Ts("async function () {}");else if(e==="%GeneratorFunction%")t=Ts("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ts("async function* () {}");else if(e==="%AsyncGenerator%"){var i=l("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=l("%AsyncGenerator%");n&&Me&&(t=Me(n.prototype))}return oi[e]=t,t},xl={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},on=qn(),Jn=_f(),jf=on.call(sn,Array.prototype.concat),Kf=on.call(El,Array.prototype.splice),Rl=on.call(sn,String.prototype.replace),Xn=on.call(sn,String.prototype.slice),qf=on.call(sn,RegExp.prototype.exec),Jf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xf=/\\(\\)?/g,Yf=function(e){var t=Xn(e,0,1),i=Xn(e,-1);if(t==="%"&&i!=="%")throw new Ti("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Ti("invalid intrinsic syntax, expected opening `%`");var n=[];return Rl(e,Jf,function(s,a,u,d){n[n.length]=u?Rl(d,Xf,"$1"):a||s}),n},Zf=function(e,t){var i=e,n;if(Jn(xl,i)&&(n=xl[i],i="%"+n[0]+"%"),Jn(oi,i)){var s=oi[i];if(s===Mi&&(s=Uf(i)),typeof s>"u"&&!t)throw new Si("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new Ti("intrinsic "+e+" does not exist!")},ks=function(e,t){if(typeof e!="string"||e.length===0)throw new Si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Si('"allowMissing" argument must be a boolean');if(qf(/^%?[^%]*%?$/,e)===null)throw new Ti("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Yf(e),n=i.length>0?i[0]:"",s=Zf("%"+n+"%",t),a=s.name,u=s.value,d=!1,f=s.alias;f&&(n=f[0],Kf(i,jf([0,1],f)));for(var g=1,w=!0;g<i.length;g+=1){var b=i[g],E=Xn(b,0,1),R=Xn(b,-1);if((E==='"'||E==="'"||E==="`"||R==='"'||R==="'"||R==="`")&&E!==R)throw new Ti("property names with quotes must have matching quotes");if((b==="constructor"||!w)&&(d=!0),n+="."+b,a="%"+n+"%",Jn(oi,a))u=oi[a];else if(u!=null){if(!(b in u)){if(!t)throw new Si("base intrinsic for "+e+" exists, but the property is not available.");return}if(rn&&g+1>=i.length){var S=rn(u,b);w=!!S,w&&"get"in S&&!("originalValue"in S.get)?u=S.get:u=u[b]}else w=Jn(u,b),u=u[b];w&&!d&&(oi[a]=u)}}return u},_l=ks,Tl=bl,Qf=Tl([_l("%String.prototype.indexOf%")]),Sl=function(e,t){var i=_l(e,!!t);return typeof i=="function"&&Qf(e,".prototype.")>-1?Tl([i]):i},ep=ks,an=Sl,tp=Gn,ip=Ri,kl=ep("%Map%",!0),np=an("Map.prototype.get",!0),rp=an("Map.prototype.set",!0),sp=an("Map.prototype.has",!0),op=an("Map.prototype.delete",!0),ap=an("Map.prototype.size",!0),Ml=!!kl&&function(){var e,t={assert:function(i){if(!t.has(i))throw new ip("Side channel does not contain "+tp(i))},delete:function(i){if(e){var n=op(e,i);return ap(e)===0&&(e=void 0),n}return!1},get:function(i){if(e)return np(e,i)},has:function(i){return e?sp(e,i):!1},set:function(i,n){e||(e=new kl),rp(e,i,n)}};return t},lp=ks,Yn=Sl,hp=Gn,Zn=Ml,up=Ri,Li=lp("%WeakMap%",!0),dp=Yn("WeakMap.prototype.get",!0),cp=Yn("WeakMap.prototype.set",!0),fp=Yn("WeakMap.prototype.has",!0),pp=Yn("WeakMap.prototype.delete",!0),gp=Li?function(){var e,t,i={assert:function(n){if(!i.has(n))throw new up("Side channel does not contain "+hp(n))},delete:function(n){if(Li&&n&&(typeof n=="object"||typeof n=="function")){if(e)return pp(e,n)}else if(Zn&&t)return t.delete(n);return!1},get:function(n){return Li&&n&&(typeof n=="object"||typeof n=="function")&&e?dp(e,n):t&&t.get(n)},has:function(n){return Li&&n&&(typeof n=="object"||typeof n=="function")&&e?fp(e,n):!!t&&t.has(n)},set:function(n,s){Li&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new Li),cp(e,n,s)):Zn&&(t||(t=Zn()),t.set(n,s))}};return i}:Zn,mp=Ri,bp=Gn,vp=Uc,wp=Ml,yp=gp,Cp=yp||wp||vp,Ep=function(){var e,t={assert:function(i){if(!t.has(i))throw new mp("Side channel does not contain "+bp(i))},delete:function(i){return!!e&&e.delete(i)},get:function(i){return e&&e.get(i)},has:function(i){return!!e&&e.has(i)},set:function(i,n){e||(e=Cp()),e.set(i,n)}};return t},xp=String.prototype.replace,Rp=/%20/g,Ms={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ls={default:Ms.RFC3986,formatters:{RFC1738:function(l){return xp.call(l,Rp,"+")},RFC3986:function(l){return String(l)}},RFC1738:Ms.RFC1738,RFC3986:Ms.RFC3986},_p=Ls,Ds=Object.prototype.hasOwnProperty,ai=Array.isArray,wt=function(){for(var l=[],e=0;e<256;++e)l.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return l}(),Tp=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(ai(i)){for(var n=[],s=0;s<i.length;++s)typeof i[s]<"u"&&n.push(i[s]);t.obj[t.prop]=n}}},Ll=function(e,t){for(var i=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},Sp=function l(e,t,i){if(!t)return e;if(typeof t!="object"&&typeof t!="function"){if(ai(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!Ds.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return ai(e)&&!ai(t)&&(n=Ll(e,i)),ai(e)&&ai(t)?(t.forEach(function(s,a){if(Ds.call(e,a)){var u=e[a];u&&typeof u=="object"&&s&&typeof s=="object"?e[a]=l(u,s,i):e.push(s)}else e[a]=s}),e):Object.keys(t).reduce(function(s,a){var u=t[a];return Ds.call(s,a)?s[a]=l(s[a],u,i):s[a]=u,s},n)},kp=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},Mp=function(l,e,t){var i=l.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},As=1024,Lp=function(e,t,i,n,s){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),i==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",d=0;d<a.length;d+=As){for(var f=a.length>=As?a.slice(d,d+As):a,g=[],w=0;w<f.length;++w){var b=f.charCodeAt(w);if(b===45||b===46||b===95||b===126||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122||s===_p.RFC1738&&(b===40||b===41)){g[g.length]=f.charAt(w);continue}if(b<128){g[g.length]=wt[b];continue}if(b<2048){g[g.length]=wt[192|b>>6]+wt[128|b&63];continue}if(b<55296||b>=57344){g[g.length]=wt[224|b>>12]+wt[128|b>>6&63]+wt[128|b&63];continue}w+=1,b=65536+((b&1023)<<10|f.charCodeAt(w)&1023),g[g.length]=wt[240|b>>18]+wt[128|b>>12&63]+wt[128|b>>6&63]+wt[128|b&63]}u+=g.join("")}return u},Dp=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var s=t[n],a=s.obj[s.prop],u=Object.keys(a),d=0;d<u.length;++d){var f=u[d],g=a[f];typeof g=="object"&&g!==null&&i.indexOf(g)===-1&&(t.push({obj:a,prop:f}),i.push(g))}return Tp(t),e},Ap=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Fp=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pp=function(e,t){return[].concat(e,t)},Op=function(e,t){if(ai(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},Dl={arrayToObject:Ll,assign:kp,combine:Pp,compact:Dp,decode:Mp,encode:Lp,isBuffer:Fp,isRegExp:Ap,maybeMap:Op,merge:Sp},Al=Ep,Qn=Dl,ln=Ls,zp=Object.prototype.hasOwnProperty,Fl={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},yt=Array.isArray,Hp=Array.prototype.push,Pl=function(l,e){Hp.apply(l,yt(e)?e:[e])},Bp=Date.prototype.toISOString,Ol=ln.default,Te={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Qn.encode,encodeValuesOnly:!1,filter:void 0,format:Ol,formatter:ln.formatters[Ol],indices:!1,serializeDate:function(e){return Bp.call(e)},skipNulls:!1,strictNullHandling:!1},Ip=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Fs={},Np=function l(e,t,i,n,s,a,u,d,f,g,w,b,E,R,S,D,L,G){for(var B=e,N=G,z=0,ae=!1;(N=N.get(Fs))!==void 0&&!ae;){var J=N.get(e);if(z+=1,typeof J<"u"){if(J===z)throw new RangeError("Cyclic object value");ae=!0}typeof N.get(Fs)>"u"&&(z=0)}if(typeof g=="function"?B=g(t,B):B instanceof Date?B=E(B):i==="comma"&&yt(B)&&(B=Qn.maybeMap(B,function(qt){return qt instanceof Date?E(qt):qt})),B===null){if(a)return f&&!D?f(t,Te.encoder,L,"key",R):t;B=""}if(Ip(B)||Qn.isBuffer(B)){if(f){var $=D?t:f(t,Te.encoder,L,"key",R);return[S($)+"="+S(f(B,Te.encoder,L,"value",R))]}return[S(t)+"="+S(String(B))]}var _e=[];if(typeof B>"u")return _e;var Z;if(i==="comma"&&yt(B))D&&f&&(B=Qn.maybeMap(B,f)),Z=[{value:B.length>0?B.join(",")||null:void 0}];else if(yt(g))Z=g;else{var ge=Object.keys(B);Z=w?ge.sort(w):ge}var q=d?String(t).replace(/\./g,"%2E"):String(t),Ve=n&&yt(B)&&B.length===1?q+"[]":q;if(s&&yt(B)&&B.length===0)return Ve+"[]";for(var We=0;We<Z.length;++We){var ht=Z[We],pi=typeof ht=="object"&&ht&&typeof ht.value<"u"?ht.value:B[ht];if(!(u&&pi===null)){var ut=b&&d?String(ht).replace(/\./g,"%2E"):String(ht),Ct=yt(B)?typeof i=="function"?i(Ve,ut):Ve:Ve+(b?"."+ut:"["+ut+"]");G.set(e,z);var hr=Al();hr.set(Fs,G),Pl(_e,l(pi,Ct,i,n,s,a,u,d,i==="comma"&&D&&yt(B)?null:f,g,w,b,E,R,S,D,L,hr))}}return _e},Vp=function(e){if(!e)return Te;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||Te.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=ln.default;if(typeof e.format<"u"){if(!zp.call(ln.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=ln.formatters[i],s=Te.filter;(typeof e.filter=="function"||yt(e.filter))&&(s=e.filter);var a;if(e.arrayFormat in Fl?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=Te.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:Te.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Te.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Te.allowEmptyArrays,arrayFormat:a,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Te.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Te.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Te.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Te.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Te.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Te.encodeValuesOnly,filter:s,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Te.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Te.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Te.strictNullHandling}},Wp=function(l,e){var t=l,i=Vp(e),n,s;typeof i.filter=="function"?(s=i.filter,t=s("",t)):yt(i.filter)&&(s=i.filter,n=s);var a=[];if(typeof t!="object"||t===null)return"";var u=Fl[i.arrayFormat],d=u==="comma"&&i.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var f=Al(),g=0;g<n.length;++g){var w=n[g],b=t[w];i.skipNulls&&b===null||Pl(a,Np(b,w,u,d,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,f))}var E=a.join(i.delimiter),R=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?R+="utf8=%26%2310003%3B&":R+="utf8=%E2%9C%93&"),E.length>0?R+E:""},li=Dl,Ps=Object.prototype.hasOwnProperty,zl=Array.isArray,we={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:li.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},Gp=function(l){return l.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Hl=function(l,e,t){if(l&&typeof l=="string"&&e.comma&&l.indexOf(",")>-1)return l.split(",");if(e.throwOnLimitExceeded&&t>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return l},$p="utf8=%26%2310003%3B",Up="utf8=%E2%9C%93",jp=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;n=n.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=t.parameterLimit===1/0?void 0:t.parameterLimit,a=n.split(t.delimiter,t.throwOnLimitExceeded?s+1:s);if(t.throwOnLimitExceeded&&a.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var u=-1,d,f=t.charset;if(t.charsetSentinel)for(d=0;d<a.length;++d)a[d].indexOf("utf8=")===0&&(a[d]===Up?f="utf-8":a[d]===$p&&(f="iso-8859-1"),u=d,d=a.length);for(d=0;d<a.length;++d)if(d!==u){var g=a[d],w=g.indexOf("]="),b=w===-1?g.indexOf("="):w+1,E,R;b===-1?(E=t.decoder(g,we.decoder,f,"key"),R=t.strictNullHandling?null:""):(E=t.decoder(g.slice(0,b),we.decoder,f,"key"),R=li.maybeMap(Hl(g.slice(b+1),t,zl(i[E])?i[E].length:0),function(D){return t.decoder(D,we.decoder,f,"value")})),R&&t.interpretNumericEntities&&f==="iso-8859-1"&&(R=Gp(String(R))),g.indexOf("[]=")>-1&&(R=zl(R)?[R]:R);var S=Ps.call(i,E);S&&t.duplicates==="combine"?i[E]=li.combine(i[E],R):(!S||t.duplicates==="last")&&(i[E]=R)}return i},Kp=function(l,e,t,i){var n=0;if(l.length>0&&l[l.length-1]==="[]"){var s=l.slice(0,-1).join("");n=Array.isArray(e)&&e[s]?e[s].length:0}for(var a=i?e:Hl(e,t,n),u=l.length-1;u>=0;--u){var d,f=l[u];if(f==="[]"&&t.parseArrays)d=t.allowEmptyArrays&&(a===""||t.strictNullHandling&&a===null)?[]:li.combine([],a);else{d=t.plainObjects?{__proto__:null}:{};var g=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,w=t.decodeDotInKeys?g.replace(/%2E/g,"."):g,b=parseInt(w,10);!t.parseArrays&&w===""?d={0:a}:!isNaN(b)&&f!==w&&String(b)===w&&b>=0&&t.parseArrays&&b<=t.arrayLimit?(d=[],d[b]=a):w!=="__proto__"&&(d[w]=a)}a=d}return a},qp=function(e,t,i,n){if(e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,d=i.depth>0&&a.exec(s),f=d?s.slice(0,d.index):s,g=[];if(f){if(!i.plainObjects&&Ps.call(Object.prototype,f)&&!i.allowPrototypes)return;g.push(f)}for(var w=0;i.depth>0&&(d=u.exec(s))!==null&&w<i.depth;){if(w+=1,!i.plainObjects&&Ps.call(Object.prototype,d[1].slice(1,-1))&&!i.allowPrototypes)return;g.push(d[1])}if(d){if(i.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+i.depth+" and strictDepth is true");g.push("["+s.slice(d.index)+"]")}return Kp(g,t,i,n)}},Jp=function(e){if(!e)return we;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded<"u"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=typeof e.charset>"u"?we.charset:e.charset,i=typeof e.duplicates>"u"?we.duplicates:e.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var n=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:we.allowDots:!!e.allowDots;return{allowDots:n,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:we.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:we.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:we.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:we.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:we.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:we.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:we.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:we.decoder,delimiter:typeof e.delimiter=="string"||li.isRegExp(e.delimiter)?e.delimiter:we.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:we.depth,duplicates:i,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:we.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:we.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:we.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:we.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:we.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},Xp=function(l,e){var t=Jp(e);if(l===""||l===null||typeof l>"u")return t.plainObjects?{__proto__:null}:{};for(var i=typeof l=="string"?jp(l,t):l,n=t.plainObjects?{__proto__:null}:{},s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],d=qp(u,i[u],t,typeof l=="string");n=li.merge(n,d,t)}return t.allowSparse===!0?n:li.compact(n)},Yp=Wp,Zp=Xp,Qp=Ls,eg={formats:Qp,parse:Zp,stringify:Yp};const tg=lc(eg),Os=l=>V.upperFirst(V.camelCase(l));function ig(l){let e=[];function t(i){for(let n in i)typeof i[n]=="object"&&i[n]!==null&&(!["schema","columns"].includes(n)&&!V.has(i[n],"schema")&&V.get(i[n],"type")!="group"?(V.has(i[n],"placeholder")||(i[n].placeholder=V.get(i[n],"title")),i[n].field=n,e.push(i[n])):t(i[n]))}return t(l),e}const{event:St}=Ce.emitter,ng=(l="myStore")=>Ba.defineStore(l,{state:()=>({mainKey:"",form:{},items:{},routes:{},fields:[],options:[],filters:[],loadings:{},dialog:!1,structure:{},paginations:{},searchParam:"",isEditing:!1,panelName:!1,editItemId:!1,hiddenActions:[],isFiltering:!1,sorts:["id:desc"],selected:new Set([])}),getters:{getItems(e){return t=>V.get(e.items,t,[])},getPaginations(e){return t=>V.get(e.paginations,t,[])},mainItems(e){return V.get(e.items,e.mainKey,[])},mainPagination(e){return this.getPaginations(e.mainKey)},mainRoute(e){return V.get(e.routes,e.mainKey,"")},flatFields(e){let t=ig(e.fields);return t.unshift(p.reactive({title:"",type:"hidden",value:"_select_",field:"_select_",align:"center",headerSort:!1})),t},formFields(e){return e.fields},flatFieldsWithoutActions(){return this.flatFields.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))},headers(){return fg(this.flatFields)},headersWithoutActions(){return this.headers.filter(e=>!["_actions_","_index_","_select_"].includes(e.field))}},actions:{reset(){this.items={},this.loadings={},this.routes={},this.options=[]},setData(e,t){this.items[e]=t},addData(e){Array.isArray(this.items[this.mainKey])||(this.items[this.mainKey]=[]),this.items[this.mainKey]=[e,...this.items[this.mainKey]]},editData(e){let t=this.items[this.mainKey];t=t.map(i=>i.id==e.id?{_index_:i._index_,...e}:i),this.items[this.mainKey]=[...t]},removeData(e){let t=this.items[this.mainKey];t=t.filter(i=>i.id!=e),this.items[this.mainKey]=[...t]},getModelKey(e){let t=typeof e=="string"?e.substr(e.lastIndexOf("/")+1):e.key;return this.mainKey=this.mainKey||Os(t),Os(t)},setPagination(e,t){t in this.paginations||(this.paginations[t]={total:0,currentPage:0,lastPage:0}),this.paginations[t].total=V.get(e,"total"),this.paginations[t].currentPage=V.get(e,"current_page"),this.paginations[t].lastPage=V.get(e,"last_page")},paginate(e){this.isFiltering?this.getWithFilter(e):this.loadItems(this.mainKey,e)},reloadData(){this.isFiltering?this.getWithFilter():this.loadItems()},convertToFilterForm(){var t,i,n;let e={};for(const s of this.filters)if((t=s==null?void 0:s.field)!=null&&t.field){if((i=s==null?void 0:s.field)!=null&&i.query){const a=(n=s==null?void 0:s.field)==null?void 0:n.query(s);e=V.merge(e,a);continue}e[s.field.field]={[s.op]:s.value}}return tg.stringify({filters:e,sort:this.sorts},{encodeValuesOnly:!0})},generateQuery(e=this.mainKey){let t=V.get(this.routes,e+".index","");const[i,n]=t.split("?");return i+"/export?"+(n?n+"&":"")+this.convertToFilterForm()},generateRoute(e=this.mainKey,t=!1){let i=V.get(this.routes,e+".index",""),n=i.indexOf("?")>-1?"&page=":"?page=";n+=t,this.searchParam&&(n+="&search="+this.searchParam);const s=inject("formue.query")||!1;return console.log(s),i+n+"&"+this.convertToFilterForm()+(s?"&"+s:"")},async loadItems(e=this.mainKey,t=1){this.loadings[e]=!0,this.loadings.mainLoading=e===this.mainKey;const i=this.generateRoute(e,t);return bt.get(i).then(n=>{n=V.get(n,"data",{}),this.items[e]=V.get(n,"data"),this.setPagination(n,e)}).finally(()=>{this.loadings[e]=!1,this.loadings.mainLoading=!1})},customLoadItems(e,t=1,i=()=>({})){this.loadings[e]=!0,i(n=>{this.items[e]=n.data,this.setPagination(n,e)},()=>{},()=>{this.loadings[e]=!1},t)},getWithFilter(e=1,t=15){const i="http://192.168.190.10:9090/api/filter";return this.loadings.filter=!0,bt.post(`${i}?page=${e}`,{model:this.mainKey,itemPerPage:t,filters:this.filters}).then(n=>{n=V.get(n,"data",{}),this.items[this.mainKey]=n.data,this.setPagination(n,this.mainKey)}).finally(()=>{this.loadings.filter=!1})},addItem(e){this.loadings.mainLoading=!0;let t=V.get(this.routes,this.mainKey+".create",""),i=Wl(e,this.flatFields);return bt.post(t,i).then(async()=>{this.reloadData(),St("alert",{text:"با موفقیت ثبت شد",color:"green"}),St("handleDialogForm",!1)}).catch(n=>{St("alert",{text:V.get(n,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},editItem(e){let t=V.get(this.routes,this.mainKey+".update","");t=t.split("?")[0];let i=Wl(e,this.flatFields);return this.loadings.mainLoading=!0,bt.patch(t+"/"+this.editItemId,i).then(async()=>{this.reloadData(),St("alert",{text:"با موفقیت ویرایش شد",color:"green"}),St("handleDialogForm",!1)}).catch(n=>{St("alert",{text:V.get(n,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})},remove(e){const t=Array.isArray(e)?e:[e];let i=V.get(this.routes,this.mainKey+".delete","");i=i.split("?")[0],this.loadings.mainLoading=!0,t.forEach(n=>{bt.delete(i+"/"+n).then(()=>{St("alert",{text:"با موفقیت حذف شد",color:"green"}),St("handleDeleteDialog",!1),this.removeData(e),this.reloadData()}).catch(s=>{St("alert",{text:V.get(s,"response.data.message"),color:"red"})}).finally(()=>{this.loadings.mainLoading=!1})})}}}),rg=l=>ng(l)(),sg=["create","update","delete","show","print","importExcel","exportExcel","filter"],zs=p.ref([]);function Hs(){function l(t){zs.value=sg.filter(i=>!t.includes(i))}function e(t){return zs.value.includes(t)}return{can:e,setPermissions:l,permissions:zs}}const og=l=>({onChange:(...e)=>{const t=e[2].form$.el$(l);t&&"clear"in t&&t.clear(),t&&"updateItems"in t&&t.updateItems()}}),ag=(l={})=>({search:!0,clearOnSearch:!0,type:"select",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),lg=(l={})=>({search:!0,clearOnSearch:!0,type:"select",object:!0,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp"),e.getValue()),...l}),hg=(l={})=>({search:!0,clearOnSearch:!0,type:"multiselect",delay:1e3,object:!0,filterResults:!1,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),Bl=(l={})=>({search:!0,clearOnSearch:!0,type:"tags",delay:1e3,object:!0,filterResults:!1,hideSelected:!0,native:!1,formatter:e=>V.get(e.getValue(),V.get(l,"labelProp")),...l}),Il=(l={})=>({type:"date",...l}),Nl={normalSelect:lg,multiSelect:hg,multiFile:(l={})=>({type:"multifile",label:l==null?void 0:l.title,placeholder:l==null?void 0:l.title,drop:!0,filename:"name",url:"http://192.168.190.69:9090/api/file/show",uploadTempEndpoint:"http://192.168.190.69:9090/api/file/upload",accept:[".jpg",".png",".gif",".docx",".txt",".zip",".rar"],sort:!0,clickable:!0,object:!0,storeFile:"hash",...l}),hasRel:og,select:ag,group:(l,e={})=>({addClass:["bg-gray-100","p-4","rounded-lg",""],type:"group",label:l,schema:e}),tags:Bl,date:Il};let Vl={};function ug({form:l,fieldName:e,field:t}){return Array.isArray(V.get(l,e))&&V.has(t,"valueProp")}function Wl(l,e){let t={},i=!1;for(let n in l){let s=cg(n,e);if(!s)continue;i=!0;let a=dg(s),u=n;const d=V.get(s,"valueProp",!1);if(d&&(u+="."+d),ug({form:l,fieldName:n,field:s})){t[a]=V.get(l,n).map(f=>V.get(f,d));continue}t[a]=V.get(l,u,V.get(l,n))}return i?t:l}function dg(l){return"sendKey"in l?l.sendKey:l.field}function cg(l,e){return e.find(t=>t.field==l)}function fg(l){let e=l.filter(s=>s.isHeader&&s.field!=="_actions_");const t=l.find(s=>s.field==="_actions_");let i={title:"",value:"_actions_",field:"_actions_",type:"text",align:"left",headerSort:!1,hozAlign:"left",headerHozAlign:"left"};t&&(i={...i,...t}),e.push(i);let n=0;return l.find(s=>s.field==="_select_"&&s.isHeader)&&(n=1),e.splice(n,0,{title:"#",type:"text",value:"_index_",field:"_index_",maxWidth:"100px",align:"center",headerSort:!1}),e}function pg(l){for(const e of l)"init"in e&&e.init()}const gg=l=>{const e=V.get(Vl,l);return e?p.markRaw(e):""},mg=l=>({url:e,key:t,foreignKey:i,dataKey:n,change:s}={url:!1,key:!1,foreignKey:!1,dataKey:!1,change:a=>a})=>async(...a)=>{let u=a[0],d=e;if(i&&n){d+=d.includes("?")?"&":"?";const E=i.split(".");let R="filters";for(const S of E)R+=`[${S.replace("|",".")}]`;d+=`${R}[$eq]={${n}}`}!t&&typeof d=="string"&&(t=(E=>{const R=E.lastIndexOf("/");let S;return E.includes("?")?S=E.substring(R+1,E.indexOf("?")):S=E.substring(R+1),Os(S)})(d)),(d.match(/\{(.*?)\}/g)||[]).forEach(E=>{const R=E.replace(/[{}]/g,"");d=d.replace(E,V.get(l.form,R,""))});const w=d.includes("?")?"&":"?";u=typeof u=="string"?u:"";const b=await bt.get(d+w+"search="+u);return s||(s=E=>E),s(V.get(b,"data.data",[]))},bg=(l,e)=>l({getRegisterField:gg,axios:bt,get:mg(e),getSafe:V.get,useFields:Nl}),Gl=l=>{Vl=l};function vg({fields:l,hiddenActions:e,options:t,route:i,structure:n}){const{setPermissions:s}=Hs(),a=rg("Store-"+parseInt(Math.random()*1e7));a.fields=bg(l,a),Ce.emitter.event("beforeFormueInit");const u=a.getModelKey(i),d={create:typeof i=="string"?i:i.create,update:typeof i=="string"?i:i.update,delete:typeof i=="string"?i:i.delete,index:typeof i=="string"?i:i.index};return a.routes[u]=d,a.loadItems(),a.options=t,s(e),a.structure=n,pg(a.flatFields),a}const wg={en:{clear:"Clear",no:"No",yes:"yes",alert_to_delete:"Are you sure to delete?",first:"First",previous:"Previous",next:"Next",last:"Last",apply_filter:"Apply filter",filter:"Filter",add_filter:"Add filter",clear_all:"Clear all",add:"Add",save:"Save",edit:"Edit",cancel:"Cancel",choose_filter:"Choose filter",select_type:"Select type",equal_to:"Equal to",not_equal_to:"Not equal to",greater_than:"Greater than",less_than:"Less than",look_like:"Look like",search:"Search ...",range:"Range",add:"Add",export:"Export",export_as_pdf:"Export as PDF",export_as_excel:" Export as Excel",print:"Print",reload:"Reload",select_row:"Select row",custom_column:"Custom column",filter_data:"Filter data",active_filter:"Active filter",not_null:"Not Null",null:"Null"},fa:{clear:"پاک کردن",no:"خیر",yes:"بله",alert_to_delete:"آیا از حذف کردن مطمئن هستید؟",first:"ابتدا",previous:"قبلی",next:"بعدی",last:"آخرین",apply_filter:"اعمال فیلتر",filter:"فیلتر",add_filter:"افزودن فیلتر",clear_all:"حذف فیلترها",add:"افرودن",save:"ذخیره",edit:"ویرایش",cancel:"لغو",choose_filter:"انتخاب فیلتر",select_type:"انتخاب کنید",equal_to:"برابر با",not_equal_to:"نابرابر با",greater_than:"بزرگتر از",less_than:"کوچکتر از",look_like:"مشابه",search:"جستجو ...",range:"محدوده",edit_filter:"ویرایش فیلتر",export:"خروجی‌گرفتن",export_as_pdf:"PDF خروجی",export_as_excel:"Excel خروجی",print:"خروجی چاپی",reload:"بارگذاری مجدد",select_row:"انتخاب ردیف",custom_column:"ستون سفارشی",filter_data:"فیلترکردن ",active_filter:"فیلترهای فعال",not_load_or_existing_data:"دیتایی وجود ندارد :(",filter_save_placeholder:"اسم فیلتر",not_filter_create_yes:"هنوز فیلتری ایجاد نشده است",operator:"عملگر",in:"برابر با مقادیر",not_in:"نابرابر با مقادیر",value:"مقدار",between:"از میان",not_null:"دارای مقدار",null:"بدون مقدار"}},Di=Ba.defineStore("formuCrudLangs",{state:()=>({lang:"fa",dir:"rtl",langs:wg}),getters:{currentLang(l){return V.get(l.langs,l.lang,"fa")}},actions:{translate(l){return V.get(this.currentLang,l,l)}}});class De{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class ce{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var n=e?t.split(e):[t],s=n.length,a;for(let u=0;u<s&&(i=i[n[u]],a=i,!!i);u++);return a}static deepClone(e,t,i=[]){var n={}.__proto__,s=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let u=e[a],d,f;u!=null&&typeof u=="object"&&(u.__proto__===n||u.__proto__===s)&&(d=i.findIndex(g=>g.subject===u),d>-1?t[a]=i[d].copy:(f=Object.assign(Array.isArray(u)?[]:{},u),i.unshift({subject:u,copy:f}),t[a]=this.deepClone(u,f,i)))}return t}}let yg=class ac extends De{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,n=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let s=ce.elOffset(this.container);i-=s.left,n-=s.top}return{x:i,y:n}}elementPositionCoords(e,t="right"){var i=ce.elOffset(e),n,s,a;switch(this.container!==document.body&&(n=ce.elOffset(this.container),i.left-=n.left,i.top-=n.top),t){case"right":s=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":s=i.left,a=i.top+e.offsetHeight;break;case"left":s=i.left,a=i.top-1;break;case"top":s=i.left,a=i.top;break;case"center":s=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:s,y:a,offset:i}}show(e,t){var i,n,s,a,u;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(s=e,u=this.elementPositionCoords(e,t),a=u.offset,i=u.x,n=u.y):typeof e=="number"?(a={top:0,left:0},i=e,n=t):(u=this.containerEventCoords(e),i=u.x,n=u.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,n,s,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",d=>{d.stopPropagation()}),this)}_fitToScreen(e,t,i,n,s){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-n.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let u=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>u)if(i)switch(s){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=u+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new ac(this.table,e,this),this.childPopup}};class ee extends De{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(n=>n.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new yg(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Cg={rownum:function(l,e,t,i,n,s){return s.getPosition()}};const Fi=class Fi extends ee{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var s="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[s]&&(a=this.lookupAccessor(e.definition[s]),a&&(t=!0,i[s]={accessor:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Fi.accessors[e]?t=Fi.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),s=ce.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var u,d,f,g;a.modules.accessor&&(d=a.modules.accessor[i]||a.modules.accessor.accessor||!1,d&&(u=a.getFieldValue(s),u!="undefined"&&(g=a.getComponent(),f=typeof d.params=="function"?d.params(u,s,t,g,n):d.params,a.setFieldValue(s,d.accessor(u,s,t,f,g,n)))))}),s}};O(Fi,"moduleName","accessor"),O(Fi,"accessors",Cg);let Bs=Fi;var Eg={method:"GET"};function Is(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((n,s)=>{t=t.concat(Is(n,e?e+"["+s+"]":s))});else if(typeof l=="object")for(var i in l)t=t.concat(Is(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function xg(l){var e=Is(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function $l(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+xg(t)),l}function Rg(l,e,t){var i;return new Promise((n,s)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(u=>{u.ok?u.json().then(d=>{n(d)}).catch(d=>{s(d),console.warn("Ajax Load Error - Invalid JSON returned",d)}):(console.error("Ajax Load Error - Connection Error: "+u.status,u.statusText),s(u))}).catch(u=>{console.error("Ajax Load Error - Connection Error: ",u),s(u)})):(console.warn("Ajax Load Error - No URL Set"),n([]))})}function Ns(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((n,s)=>{t=t.concat(Ns(n,e?e+"["+s+"]":s))});else if(typeof l=="object")for(var i in l)t=t.concat(Ns(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var _g={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=Ns(t),n=new FormData;return i.forEach(function(s){n.append(s.key,s.value)}),n}}};const lt=class lt extends ee{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=lt.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||lt.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||lt.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,n){var s=this.table.options.ajaxParams;return s&&(typeof s=="function"&&(s=s.call(this.table)),n=Object.assign(Object.assign({},s),n)),n}requestDataCheck(e,t,i,n){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,n,s){var a;return!s&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):s}setDefaultConfig(e={}){this.config=Object.assign({},lt.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n)):Promise.reject()}};O(lt,"moduleName","ajax"),O(lt,"defaultConfig",Eg),O(lt,"defaultURLGenerator",$l),O(lt,"defaultLoaderPromise",Rg),O(lt,"contentTypeFormatters",_g);let Vs=lt;var Tg={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},Sg={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,n=[],s=[];return l=l.split(`
31
31
  `),l.forEach(function(a){e.push(a.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(a){var u=i.find(function(d){return a&&d.definition.title&&a.trim()&&d.definition.title.trim()===a.trim()});u?n.push(u):t=!1}),t||(t=!0,n=[],e[0].forEach(function(a){var u=i.find(function(d){return a&&d.field&&a.trim()&&d.field.trim()===a.trim()});u?n.push(u):t=!1}),t||(n=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(a){var u={};a.forEach(function(d,f){n[f]&&(u[n[f].field]=d)}),s.push(u)}),s):!1}},kg={copyToClipboard:["ctrl + 67","meta + 67"]},Mg={copyToClipboard:function(l){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Lg={keybindings:{bindings:kg,actions:Mg}};const Wt=class Wt extends ee{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,n;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(n=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(n),t=i?this.generatePlainContent(n):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var n=[];i.columns.forEach(s=>{var a="";if(s)if(i.type==="group"&&(s.value=s.component.getKey()),s.value===null)a="";else switch(typeof s.value){case"object":a=JSON.stringify(s.value);break;case"undefined":a="";break;default:a=s.value}n.push(a)}),t.push(n.join(" "))}),t.join(`
32
32
  `)}copy(e,t){var i,n;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(n=document.body.createTextRange(),n.moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Wt.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Wt.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,n;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}};O(Wt,"moduleName","clipboard"),O(Wt,"moduleExtensions",Lg),O(Wt,"pasteActions",Tg),O(Wt,"pasteParsers",Sg);let Ws=Wt;class Dg{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class Ul{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class hn extends De{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},n={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=n[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var s=this.column.definition.cssClass.split(" ");s.forEach(a=>{e.classList.add(a)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var n=this.setValueProcessData(e,t,i);n&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var n=!1;return(this.value!==e||i)&&(n=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),n&&this.dispatch("cell-value-changed",this),n}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new Ul(this)),this.component}}class jl{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Kl={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};const di=class di extends De{constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((n,s)=>{var a=new di(n,this);this.attachColumn(a)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(di.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{di.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",n=>{n.stopPropagation(),i.focus()}),i.addEventListener("mousedown",n=>{n.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,n=>{i.value=n||e.title||"&nbsp;"}):i.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,n=>{this._formatColumnHeaderTitle(t,n||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,n=i.length,s;for(let a=0;a<n&&(t=t[i[a]],s=t,!!t);a++);return s}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,n=this.fieldStructure,s=n.length;for(let a=0;a<s;a++)if(a==s-1)i[n[a]]=t;else{if(!i[n[a]])if(typeof t<"u")i[n[a]]={};else break;i=i[n[a]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(n){n.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(n){n.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let n=0;n<i;n++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new hn(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(n=>{n.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(n=>{var s=n.getWidth();s>t&&(t=s)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new jl(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof di?this.parent.getComponent():!1}};O(di,"defaultOptionList",Kl);let hi=di;class er{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class Pe extends De{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&ce.elVisible(this.element),i={},n;return new Promise((s,a)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),n=this.chain("row-data-changing",[this,i,e],null,e);for(let u in n)this.data[u]=n[u];this.dispatch("row-data-save-after",this);for(let u in e)this.table.columnManager.getColumnsByFieldRoot(u).forEach(f=>{let g=this.getCell(f.getField());if(g){let w=f.getFieldValue(n);g.getValue()!==w&&(g.setValueProcessData(w),t&&g.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new er(this)),this.component}}var Ag={avg:function(l,e,t){var i=0,n=typeof t.precision<"u"?t.precision:2;return l.length&&(i=l.reduce(function(s,a){return Number(s)+Number(a)}),i=i/l.length,i=n!==!1?i.toFixed(n):i),parseFloat(i).toString()},max:function(l,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(s){s=Number(s),(s>i||i===null)&&(i=s)}),i!==null?n!==!1?i.toFixed(n):i:""},min:function(l,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(s){s=Number(s),(s<i||i===null)&&(i=s)}),i!==null?n!==!1?i.toFixed(n):i:""},sum:function(l,e,t){var i=0,n=typeof t.precision<"u"?t.precision:!1;return l.length&&l.forEach(function(s){s=Number(s),i+=isNaN(s)?0:Number(s)}),n!==!1?i.toFixed(n):i},concat:function(l,e,t){var i=0;return l.length&&(i=l.reduce(function(n,s){return String(n)+String(s)})),i},count:function(l,e,t){var i=0;return l.length&&l.forEach(function(n){n&&i++}),i},unique:function(l,e,t){var i=l.filter((n,s)=>(l||n===0)&&l.indexOf(n)===s);return i.length}};const Gt=class Gt extends ee{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new hi({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":Gt.calculations[t.topCalc]?i.topCalc=Gt.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":Gt.calculations[t.bottomCalc]?i.botCalc=Gt.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,n=this.table.modules.dataTree;return e.forEach(s=>{var a;t.push(s.getData()),i&&((a=s.modules.dataTree)!=null&&a.open)&&this.rowsToData(n.getFilteredTreeChildren(s)).forEach(u=>{t.push(s)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),n;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),n=new Pe(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),n.component=!1,n.getComponent=()=>(n.component||(n.component=new Dg(n)),n.component),n.generateCells=()=>{var s=[];this.table.columnManager.columnsByIndex.forEach(a=>{this.genColumn.setField(a.getField()),this.genColumn.hozAlign=a.hozAlign,a.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(a.definition[e+"CalcFormatter"]),params:a.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=a.definition.cssClass;var u=new hn(this.genColumn,n);u.getElement(),u.column=a,u.setWidth(),a.cells.push(u),s.push(u),a.visible||u.hide()}),n.cells=s},n}generateRowData(e,t){var i={},n=e=="top"?this.topCalcs:this.botCalcs,s=e=="top"?"topCalc":"botCalc",a,u;return n.forEach(function(d){var f=[];d.modules.columnCalcs&&d.modules.columnCalcs[s]&&(t.forEach(function(g){f.push(d.getFieldValue(g))}),u=s+"Params",a=typeof d.modules.columnCalcs[u]=="function"?d.modules.columnCalcs[u](f,t):d.modules.columnCalcs[u],d.setFieldValue(i,d.modules.columnCalcs[s](f,t,a)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),n={},s={};return i.forEach(a=>{n[a.getKey()]=this.getGroupResults(a)}),s={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:n},s}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}};O(Gt,"moduleName","columnCalcs"),O(Gt,"calculations",Ag);let Gs=Gt;class ql extends ee{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,n){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,n){return t.dataTreeStartExpanded[n]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),n=i||!i&&typeof t=="object"&&t!==null;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:n?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&n?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&n?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:n}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(n.branchEl,i.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,n=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",s=>{s.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,n)=>{var s,a;t.push(i),i instanceof Pe&&(i.create(),s=i.modules.dataTree,!s.index&&s.children!==!1&&(a=this.getChildren(i,!1,!0),a.forEach(u=>{u.create(),t.push(u)})))}),t}getChildren(e,t,i){var n=e.modules.dataTree,s=[],a=[];return n.children!==!1&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(n.children):s=n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s,i),s.forEach(u=>{a.push(u);var d=this.getChildren(u,!1,!0);d.forEach(f=>{a.push(f)})})),a}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(n=>{var s=new Pe(n||{},this.table.rowManager);s.create(),s.modules.dataTree.index=e.modules.dataTree.index+1,s.modules.dataTree.parent=e,s.modules.dataTree.children&&(s.modules.dataTree.open=this.startOpen(s.getComponent(),s.modules.dataTree.index)),t.push(s)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],n;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(t.children):n=t.children,n.forEach(s=>{s instanceof Pe&&i.push(s)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof Pe&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,n){var s=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof n<"u"&&(s=this.findChildIndex(n,e),s!==!1&&e.data[this.field].splice(i?s:s+1,0,t)),s===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof Pe?i=e.data:e instanceof er?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(n=>n instanceof Pe?n.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(n=>n.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var n=e.modules.dataTree,s=[];return n&&n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(a=>{a instanceof Pe&&(s.push(t?a.getComponent():a),i&&this.getTreeChildren(a,t,i).forEach(u=>{s.push(u)}))})),s}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}O(ql,"moduleName","dataTree");function Fg(l,e={},t){var i=e.delimiter?e.delimiter:",",n=[],s=[];l.forEach(a=>{var u=[];switch(a.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":a.columns.forEach((d,f)=>{d&&d.depth===1&&(s[f]=typeof d.value>"u"||d.value===null?"":'"'+String(d.value).split('"').join('""')+'"')});break;case"row":a.columns.forEach(d=>{if(d){switch(typeof d.value){case"object":d.value=d.value!==null?JSON.stringify(d.value):"";break;case"undefined":d.value="";break}u.push('"'+String(d.value).split('"').join('""')+'"')}}),n.push(u.join(i));break}}),s.length&&n.unshift(s.join(i)),n=n.join(`
33
33
  `),e.bom&&(n="\uFEFF"+n),t(n,"text/csv")}function Pg(l,e,t){var i=[];l.forEach(n=>{var s={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(s);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function Og(l,e={},t){var i=[],n=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},u=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},d=e.jsPDF||{},f=e.title?e.title:"",g,w;d.orientation||(d.orientation=e.orientation||"landscape"),d.unit||(d.unit="pt"),l.forEach(E=>{switch(E.type){case"header":i.push(b(E));break;case"group":n.push(b(E,a));break;case"calc":n.push(b(E,u));break;case"row":n.push(b(E));break}});function b(E,R){var S=[];return E.columns.forEach(D=>{var L;if(D){switch(typeof D.value){case"object":D.value=D.value!==null?JSON.stringify(D.value):"";break;case"undefined":D.value="";break}L={content:D.value,colSpan:D.width,rowSpan:D.height},R&&(L.styles=R),S.push(L)}}),S}g=this.dependencyRegistry.lookup("jspdf","jsPDF"),w=new g(d),e.autoTable&&(typeof e.autoTable=="function"?s=e.autoTable(w)||{}:s=e.autoTable),f&&(s.didDrawPage=function(E){w.text(f,40,30)}),s.head=i,s.body=n,w.autoTable(s),e.documentProcessing&&e.documentProcessing(w),t(w.output("arraybuffer"),"application/pdf")}function zg(l,e,t){var i=this,n=e.sheetName||"Sheet1",s=this.dependencyRegistry.lookup("XLSX"),a=s.utils.book_new(),u=new De(this),d="compress"in e?e.compress:!0,f=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:d},g;f.type="binary",a.SheetNames=[],a.Sheets={};function w(){var R=[],S=[],D={},L={s:{c:0,r:0},e:{c:l[0]?l[0].columns.reduce((G,B)=>G+(B&&B.width?B.width:1),0):0,r:l.length}};return l.forEach((G,B)=>{var N=[];G.columns.forEach(function(z,ae){z?(N.push(!(z.value instanceof Date)&&typeof z.value=="object"?JSON.stringify(z.value):z.value),(z.width>1||z.height>-1)&&(z.height>1||z.width>1)&&S.push({s:{r:B,c:ae},e:{r:B+z.height-1,c:ae+z.width-1}})):N.push("")}),R.push(N)}),s.utils.sheet_add_aoa(D,R),D["!ref"]=s.utils.encode_range(L),S.length&&(D["!merges"]=S),D}if(e.sheetOnly){t(w());return}if(e.sheets)for(var b in e.sheets)e.sheets[b]===!0?(a.SheetNames.push(b),a.Sheets[b]=w()):(a.SheetNames.push(b),u.commsSend(e.sheets[b],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(R){a.Sheets[b]=R}}));else a.SheetNames.push(n),a.Sheets[n]=w();e.documentProcessing&&(a=e.documentProcessing(a));function E(R){for(var S=new ArrayBuffer(R.length),D=new Uint8Array(S),L=0;L!=R.length;++L)D[L]=R.charCodeAt(L)&255;return S}g=s.write(a,f),t(E(g),"application/octet-stream")}function Hg(l,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(l),"text/html")}function Bg(l,e,t){const i=[];l.forEach(n=>{const s={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(JSON.stringify(s));break}}),t(i.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formue-crud",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",