@signal24/vue-foundation 3.7.4 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ (function(x,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("jquery"),require("moment"),require("axios"),require("vue-stash-nested")):typeof define=="function"&&define.amd?define(["exports","vue","jquery","moment","axios","vue-stash-nested"],s):(x=typeof globalThis<"u"?globalThis:x||self,s(x.vueFoundatation={},x.Vue,x.$,x.moment,x.axios,x.VueStash))})(this,function(x,s,f,P,W,ar){"use strict";var je=document.createElement("style");je.textContent=`.vf-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100}.vf-modal-wrap{background:rgba(0,0,0,.25);display:flex;justify-content:center;align-items:center}.vf-modal{background:white;box-shadow:0 3px 6px #00000026;min-width:200px;max-width:95%;max-height:95%;display:flex;flex-direction:column}.vf-modal-header,.vf-modal-footer{flex-shrink:0;position:relative}.vf-modal.scrolls>.vf-modal-content{overflow:auto;flex-grow:1;flex-shrink:1;flex-basis:0%}.vf-modal-wrap.vf-alert .vf-modal{max-width:800px}.vf-modal-wrap.vf-alert .vf-modal>.vf-modal-content{padding:12px}.vf-modal-wrap.vf-alert.wait .vf-modal-content{text-align:center}.vf-modal-wrap.vf-alert.destructive button.primary{color:red}.vf-smart-select{position:relative}.vf-smart-select input{width:100%;padding-right:24px!important}.vf-smart-select input.nullable::-moz-placeholder{color:#000}.vf-smart-select input.nullable::placeholder{color:#000}.vf-smart-select:after{content:" ";display:block;position:absolute;top:50%;right:8px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#333333 transparent transparent transparent;pointer-events:none}.vf-smart-select.open:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:transparent transparent #333333 transparent}.vf-smart-select:not(.disabled) input{cursor:pointer}.vf-smart-select.disabled:after{opacity:.4}.vf-smart-select-options{position:absolute;min-height:20px;border:1px solid #e8e8e8;background:white;overflow:auto;z-index:101}.vf-smart-select-options .option,.vf-smart-select-options .no-results{padding:5px 8px}.vf-smart-select-options .option{cursor:pointer}.vf-smart-select-options .option.highlighted{background-color:#f5f5f5}
2
+ `,document.head.appendChild(je);let Ie;function sr(e){Ie=e}const d=s.createApp({data(){return{store:{session:null,globalError:window.gErr||null,rootInjections:[]}}},render(){return s.h(Ie)}}),q=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},or={props:["modelValue","url","params","itemsKey","preprocessor","textKey","nullText","loadingText"],data(){return{options:null,selectedItem:null}},watch:{params(){this.load()},selectedItem(){this.$emit("update:modelValue",this.selectedItem)},modelValue(){this.selectedItem=this.modelValue}},mounted(){this.load()},methods:{async load(){this.options=null;let e=this.params?{params:this.params}:void 0,t=await this.$http.get(this.url,e),r=this.itemsKey?t.data[this.itemsKey]:t.data;this.preprocessor&&this.preprocessor(r),this.options=r,this.selectedItem=this.modelValue}}},lr={key:0,disabled:""},cr={key:0,value:null},ur=["value"];function fr(e,t,r,n,i,a){return i.options?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:1,"onUpdate:modelValue":t[0]||(t[0]=o=>i.selectedItem=o)},[r.nullText?(s.openBlock(),s.createElementBlock("option",cr,s.toDisplayString(r.nullText),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.options,o=>(s.openBlock(),s.createElementBlock("option",{key:o.id,value:o},s.toDisplayString(r.textKey?o[r.textKey]:o),9,ur))),128))],512)),[[s.vModelSelect,i.selectedItem]]):(s.openBlock(),s.createElementBlock("select",lr,[s.createElementVNode("option",null,s.toDisplayString(r.loadingText||"Loading..."),1)]))}const dr=q(or,[["render",fr]]);var Y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hr(){this.__data__=[],this.size=0}var pr=hr;function gr(e,t){return e===t||e!==e&&t!==t}var fe=gr,mr=fe;function vr(e,t){for(var r=e.length;r--;)if(mr(e[r][0],t))return r;return-1}var X=vr,yr=X,br=Array.prototype,$r=br.splice;function _r(e){var t=this.__data__,r=yr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$r.call(t,r,1),--this.size,!0}var Tr=_r,Or=X;function wr(e){var t=this.__data__,r=Or(t,e);return r<0?void 0:t[r][1]}var Sr=wr,Ar=X;function xr(e){return Ar(this.__data__,e)>-1}var Cr=xr,Er=X;function kr(e,t){var r=this.__data__,n=Er(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var jr=kr,Ir=pr,Pr=Tr,Hr=Sr,Mr=Cr,Lr=jr;function B(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}B.prototype.clear=Ir,B.prototype.delete=Pr,B.prototype.get=Hr,B.prototype.has=Mr,B.prototype.set=Lr;var J=B,Dr=J;function Br(){this.__data__=new Dr,this.size=0}var Kr=Br;function Nr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Rr=Nr;function Fr(e){return this.__data__.get(e)}var Vr=Fr;function Ur(e){return this.__data__.has(e)}var Gr=Ur,zr=typeof Y=="object"&&Y&&Y.Object===Object&&Y,Pe=zr,Wr=Pe,qr=typeof self=="object"&&self&&self.Object===Object&&self,Yr=Wr||qr||Function("return this")(),C=Yr,Xr=C,Jr=Xr.Symbol,Z=Jr,He=Z,Me=Object.prototype,Zr=Me.hasOwnProperty,Qr=Me.toString,G=He?He.toStringTag:void 0;function en(e){var t=Zr.call(e,G),r=e[G];try{e[G]=void 0;var n=!0}catch{}var i=Qr.call(e);return n&&(t?e[G]=r:delete e[G]),i}var tn=en,rn=Object.prototype,nn=rn.toString;function an(e){return nn.call(e)}var sn=an,Le=Z,on=tn,ln=sn,cn="[object Null]",un="[object Undefined]",De=Le?Le.toStringTag:void 0;function fn(e){return e==null?e===void 0?un:cn:De&&De in Object(e)?on(e):ln(e)}var z=fn;function dn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var H=dn,hn=z,pn=H,gn="[object AsyncFunction]",mn="[object Function]",vn="[object GeneratorFunction]",yn="[object Proxy]";function bn(e){if(!pn(e))return!1;var t=hn(e);return t==mn||t==vn||t==gn||t==yn}var Be=bn,$n=C,_n=$n["__core-js_shared__"],Tn=_n,de=Tn,Ke=function(){var e=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function On(e){return!!Ke&&Ke in e}var wn=On,Sn=Function.prototype,An=Sn.toString;function xn(e){if(e!=null){try{return An.call(e)}catch{}try{return e+""}catch{}}return""}var Ne=xn,Cn=Be,En=wn,kn=H,jn=Ne,In=/[\\^$.*+?()[\]{}|]/g,Pn=/^\[object .+?Constructor\]$/,Hn=Function.prototype,Mn=Object.prototype,Ln=Hn.toString,Dn=Mn.hasOwnProperty,Bn=RegExp("^"+Ln.call(Dn).replace(In,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kn(e){if(!kn(e)||En(e))return!1;var t=Cn(e)?Bn:Pn;return t.test(jn(e))}var Nn=Kn;function Rn(e,t){return e==null?void 0:e[t]}var Fn=Rn,Vn=Nn,Un=Fn;function Gn(e,t){var r=Un(e,t);return Vn(r)?r:void 0}var M=Gn,zn=M,Wn=C,qn=zn(Wn,"Map"),he=qn,Yn=M,Xn=Yn(Object,"create"),Q=Xn,Re=Q;function Jn(){this.__data__=Re?Re(null):{},this.size=0}var Zn=Jn;function Qn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ei=Qn,ti=Q,ri="__lodash_hash_undefined__",ni=Object.prototype,ii=ni.hasOwnProperty;function ai(e){var t=this.__data__;if(ti){var r=t[e];return r===ri?void 0:r}return ii.call(t,e)?t[e]:void 0}var si=ai,oi=Q,li=Object.prototype,ci=li.hasOwnProperty;function ui(e){var t=this.__data__;return oi?t[e]!==void 0:ci.call(t,e)}var fi=ui,di=Q,hi="__lodash_hash_undefined__";function pi(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=di&&t===void 0?hi:t,this}var gi=pi,mi=Zn,vi=ei,yi=si,bi=fi,$i=gi;function K(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}K.prototype.clear=mi,K.prototype.delete=vi,K.prototype.get=yi,K.prototype.has=bi,K.prototype.set=$i;var _i=K,Fe=_i,Ti=J,Oi=he;function wi(){this.size=0,this.__data__={hash:new Fe,map:new(Oi||Ti),string:new Fe}}var Si=wi;function Ai(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var xi=Ai,Ci=xi;function Ei(e,t){var r=e.__data__;return Ci(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ee=Ei,ki=ee;function ji(e){var t=ki(this,e).delete(e);return this.size-=t?1:0,t}var Ii=ji,Pi=ee;function Hi(e){return Pi(this,e).get(e)}var Mi=Hi,Li=ee;function Di(e){return Li(this,e).has(e)}var Bi=Di,Ki=ee;function Ni(e,t){var r=Ki(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ri=Ni,Fi=Si,Vi=Ii,Ui=Mi,Gi=Bi,zi=Ri;function N(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}N.prototype.clear=Fi,N.prototype.delete=Vi,N.prototype.get=Ui,N.prototype.has=Gi,N.prototype.set=zi;var Ve=N,Wi=J,qi=he,Yi=Ve,Xi=200;function Ji(e,t){var r=this.__data__;if(r instanceof Wi){var n=r.__data__;if(!qi||n.length<Xi-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yi(n)}return r.set(e,t),this.size=r.size,this}var Zi=Ji,Qi=J,ea=Kr,ta=Rr,ra=Vr,na=Gr,ia=Zi;function R(e){var t=this.__data__=new Qi(e);this.size=t.size}R.prototype.clear=ea,R.prototype.delete=ta,R.prototype.get=ra,R.prototype.has=na,R.prototype.set=ia;var Ue=R;function aa(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var sa=aa,oa=M,la=function(){try{var e=oa(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ca=la,Ge=ca;function ua(e,t,r){t=="__proto__"&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ze=ua,fa=ze,da=fe,ha=Object.prototype,pa=ha.hasOwnProperty;function ga(e,t,r){var n=e[t];(!(pa.call(e,t)&&da(n,r))||r===void 0&&!(t in e))&&fa(e,t,r)}var We=ga,ma=We,va=ze;function ya(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=n?n(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),i?va(r,l,c):ma(r,l,c)}return r}var te=ya;function ba(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var $a=ba;function _a(e){return e!=null&&typeof e=="object"}var L=_a,Ta=z,Oa=L,wa="[object Arguments]";function Sa(e){return Oa(e)&&Ta(e)==wa}var Aa=Sa,qe=Aa,xa=L,Ye=Object.prototype,Ca=Ye.hasOwnProperty,Ea=Ye.propertyIsEnumerable,ka=qe(function(){return arguments}())?qe:function(e){return xa(e)&&Ca.call(e,"callee")&&!Ea.call(e,"callee")},ja=ka,Ia=Array.isArray,re=Ia,F={},Pa={get exports(){return F},set exports(e){F=e}};function Ha(){return!1}var Ma=Ha;(function(e,t){var r=C,n=Ma,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(Pa,F);var La=9007199254740991,Da=/^(?:0|[1-9]\d*)$/;function Ba(e,t){var r=typeof e;return t=t??La,!!t&&(r=="number"||r!="symbol"&&Da.test(e))&&e>-1&&e%1==0&&e<t}var Ka=Ba,Na=9007199254740991;function Ra(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Na}var Xe=Ra,Fa=z,Va=Xe,Ua=L,Ga="[object Arguments]",za="[object Array]",Wa="[object Boolean]",qa="[object Date]",Ya="[object Error]",Xa="[object Function]",Ja="[object Map]",Za="[object Number]",Qa="[object Object]",es="[object RegExp]",ts="[object Set]",rs="[object String]",ns="[object WeakMap]",is="[object ArrayBuffer]",as="[object DataView]",ss="[object Float32Array]",os="[object Float64Array]",ls="[object Int8Array]",cs="[object Int16Array]",us="[object Int32Array]",fs="[object Uint8Array]",ds="[object Uint8ClampedArray]",hs="[object Uint16Array]",ps="[object Uint32Array]",b={};b[ss]=b[os]=b[ls]=b[cs]=b[us]=b[fs]=b[ds]=b[hs]=b[ps]=!0,b[Ga]=b[za]=b[is]=b[Wa]=b[as]=b[qa]=b[Ya]=b[Xa]=b[Ja]=b[Za]=b[Qa]=b[es]=b[ts]=b[rs]=b[ns]=!1;function gs(e){return Ua(e)&&Va(e.length)&&!!b[Fa(e)]}var ms=gs;function vs(e){return function(t){return e(t)}}var pe=vs,V={},ys={get exports(){return V},set exports(e){V=e}};(function(e,t){var r=Pe,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ys,V);var bs=ms,$s=pe,Je=V,Ze=Je&&Je.isTypedArray,_s=Ze?$s(Ze):bs,Qe=_s,Ts=$a,Os=ja,ws=re,Ss=F,As=Ka,xs=Qe,Cs=Object.prototype,Es=Cs.hasOwnProperty;function ks(e,t){var r=ws(e),n=!r&&Os(e),i=!r&&!n&&Ss(e),a=!r&&!n&&!i&&xs(e),o=r||n||i||a,l=o?Ts(e.length,String):[],c=l.length;for(var u in e)(t||Es.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||As(u,c)))&&l.push(u);return l}var et=ks,js=Object.prototype;function Is(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||js;return e===r}var ge=Is;function Ps(e,t){return function(r){return e(t(r))}}var tt=Ps,Hs=tt,Ms=Hs(Object.keys,Object),Ls=Ms,Ds=ge,Bs=Ls,Ks=Object.prototype,Ns=Ks.hasOwnProperty;function Rs(e){if(!Ds(e))return Bs(e);var t=[];for(var r in Object(e))Ns.call(e,r)&&r!="constructor"&&t.push(r);return t}var Fs=Rs,Vs=Be,Us=Xe;function Gs(e){return e!=null&&Us(e.length)&&!Vs(e)}var rt=Gs,zs=et,Ws=Fs,qs=rt;function Ys(e){return qs(e)?zs(e):Ws(e)}var me=Ys,Xs=te,Js=me;function Zs(e,t){return e&&Xs(t,Js(t),e)}var Qs=Zs;function eo(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var to=eo,ro=H,no=ge,io=to,ao=Object.prototype,so=ao.hasOwnProperty;function oo(e){if(!ro(e))return io(e);var t=no(e),r=[];for(var n in e)n=="constructor"&&(t||!so.call(e,n))||r.push(n);return r}var lo=oo,co=et,uo=lo,fo=rt;function ho(e){return fo(e)?co(e,!0):uo(e)}var ve=ho,po=te,go=ve;function mo(e,t){return e&&po(t,go(t),e)}var vo=mo,ne={},yo={get exports(){return ne},set exports(e){ne=e}};(function(e,t){var r=C,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a?r.Buffer:void 0,l=o?o.allocUnsafe:void 0;function c(u,_){if(_)return u.slice();var h=u.length,p=l?l(h):new u.constructor(h);return u.copy(p),p}e.exports=c})(yo,ne);function bo(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var $o=bo;function _o(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var To=_o;function Oo(){return[]}var nt=Oo,wo=To,So=nt,Ao=Object.prototype,xo=Ao.propertyIsEnumerable,it=Object.getOwnPropertySymbols,Co=it?function(e){return e==null?[]:(e=Object(e),wo(it(e),function(t){return xo.call(e,t)}))}:So,ye=Co,Eo=te,ko=ye;function jo(e,t){return Eo(e,ko(e),t)}var Io=jo;function Po(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var at=Po,Ho=tt,Mo=Ho(Object.getPrototypeOf,Object),st=Mo,Lo=at,Do=st,Bo=ye,Ko=nt,No=Object.getOwnPropertySymbols,Ro=No?function(e){for(var t=[];e;)Lo(t,Bo(e)),e=Do(e);return t}:Ko,ot=Ro,Fo=te,Vo=ot;function Uo(e,t){return Fo(e,Vo(e),t)}var Go=Uo,zo=at,Wo=re;function qo(e,t,r){var n=t(e);return Wo(e)?n:zo(n,r(e))}var lt=qo,Yo=lt,Xo=ye,Jo=me;function Zo(e){return Yo(e,Jo,Xo)}var ct=Zo,Qo=lt,el=ot,tl=ve;function rl(e){return Qo(e,tl,el)}var nl=rl,il=M,al=C,sl=il(al,"DataView"),ol=sl,ll=M,cl=C,ul=ll(cl,"Promise"),fl=ul,dl=M,hl=C,pl=dl(hl,"Set"),gl=pl,ml=M,vl=C,yl=ml(vl,"WeakMap"),bl=yl,be=ol,$e=he,_e=fl,Te=gl,Oe=bl,ut=z,U=Ne,ft="[object Map]",$l="[object Object]",dt="[object Promise]",ht="[object Set]",pt="[object WeakMap]",gt="[object DataView]",_l=U(be),Tl=U($e),Ol=U(_e),wl=U(Te),Sl=U(Oe),D=ut;(be&&D(new be(new ArrayBuffer(1)))!=gt||$e&&D(new $e)!=ft||_e&&D(_e.resolve())!=dt||Te&&D(new Te)!=ht||Oe&&D(new Oe)!=pt)&&(D=function(e){var t=ut(e),r=t==$l?e.constructor:void 0,n=r?U(r):"";if(n)switch(n){case _l:return gt;case Tl:return ft;case Ol:return dt;case wl:return ht;case Sl:return pt}return t});var ie=D,Al=Object.prototype,xl=Al.hasOwnProperty;function Cl(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&xl.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var El=Cl,kl=C,jl=kl.Uint8Array,mt=jl,vt=mt;function Il(e){var t=new e.constructor(e.byteLength);return new vt(t).set(new vt(e)),t}var we=Il,Pl=we;function Hl(e,t){var r=t?Pl(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Ml=Hl,Ll=/\w*$/;function Dl(e){var t=new e.constructor(e.source,Ll.exec(e));return t.lastIndex=e.lastIndex,t}var Bl=Dl,yt=Z,bt=yt?yt.prototype:void 0,$t=bt?bt.valueOf:void 0;function Kl(e){return $t?Object($t.call(e)):{}}var Nl=Kl,Rl=we;function Fl(e,t){var r=t?Rl(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Vl=Fl,Ul=we,Gl=Ml,zl=Bl,Wl=Nl,ql=Vl,Yl="[object Boolean]",Xl="[object Date]",Jl="[object Map]",Zl="[object Number]",Ql="[object RegExp]",ec="[object Set]",tc="[object String]",rc="[object Symbol]",nc="[object ArrayBuffer]",ic="[object DataView]",ac="[object Float32Array]",sc="[object Float64Array]",oc="[object Int8Array]",lc="[object Int16Array]",cc="[object Int32Array]",uc="[object Uint8Array]",fc="[object Uint8ClampedArray]",dc="[object Uint16Array]",hc="[object Uint32Array]";function pc(e,t,r){var n=e.constructor;switch(t){case nc:return Ul(e);case Yl:case Xl:return new n(+e);case ic:return Gl(e,r);case ac:case sc:case oc:case lc:case cc:case uc:case fc:case dc:case hc:return ql(e,r);case Jl:return new n;case Zl:case tc:return new n(e);case Ql:return zl(e);case ec:return new n;case rc:return Wl(e)}}var gc=pc,mc=H,_t=Object.create,vc=function(){function e(){}return function(t){if(!mc(t))return{};if(_t)return _t(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),yc=vc,bc=yc,$c=st,_c=ge;function Tc(e){return typeof e.constructor=="function"&&!_c(e)?bc($c(e)):{}}var Oc=Tc,wc=ie,Sc=L,Ac="[object Map]";function xc(e){return Sc(e)&&wc(e)==Ac}var Cc=xc,Ec=Cc,kc=pe,Tt=V,Ot=Tt&&Tt.isMap,jc=Ot?kc(Ot):Ec,Ic=jc,Pc=ie,Hc=L,Mc="[object Set]";function Lc(e){return Hc(e)&&Pc(e)==Mc}var Dc=Lc,Bc=Dc,Kc=pe,wt=V,St=wt&&wt.isSet,Nc=St?Kc(St):Bc,Rc=Nc,Fc=Ue,Vc=sa,Uc=We,Gc=Qs,zc=vo,Wc=ne,qc=$o,Yc=Io,Xc=Go,Jc=ct,Zc=nl,Qc=ie,eu=El,tu=gc,ru=Oc,nu=re,iu=F,au=Ic,su=H,ou=Rc,lu=me,cu=ve,uu=1,fu=2,du=4,At="[object Arguments]",hu="[object Array]",pu="[object Boolean]",gu="[object Date]",mu="[object Error]",xt="[object Function]",vu="[object GeneratorFunction]",yu="[object Map]",bu="[object Number]",Ct="[object Object]",$u="[object RegExp]",_u="[object Set]",Tu="[object String]",Ou="[object Symbol]",wu="[object WeakMap]",Su="[object ArrayBuffer]",Au="[object DataView]",xu="[object Float32Array]",Cu="[object Float64Array]",Eu="[object Int8Array]",ku="[object Int16Array]",ju="[object Int32Array]",Iu="[object Uint8Array]",Pu="[object Uint8ClampedArray]",Hu="[object Uint16Array]",Mu="[object Uint32Array]",y={};y[At]=y[hu]=y[Su]=y[Au]=y[pu]=y[gu]=y[xu]=y[Cu]=y[Eu]=y[ku]=y[ju]=y[yu]=y[bu]=y[Ct]=y[$u]=y[_u]=y[Tu]=y[Ou]=y[Iu]=y[Pu]=y[Hu]=y[Mu]=!0,y[mu]=y[xt]=y[wu]=!1;function ae(e,t,r,n,i,a){var o,l=t&uu,c=t&fu,u=t&du;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!su(e))return e;var _=nu(e);if(_){if(o=eu(e),!l)return qc(e,o)}else{var h=Qc(e),p=h==xt||h==vu;if(iu(e))return Wc(e,l);if(h==Ct||h==At||p&&!i){if(o=c||p?{}:ru(e),!l)return c?Xc(e,zc(o,e)):Yc(e,Gc(o,e))}else{if(!y[h])return i?e:{};o=tu(e,h,l)}}a||(a=new Fc);var g=a.get(e);if(g)return g;a.set(e,o),ou(e)?e.forEach(function(T){o.add(ae(T,t,r,T,e,a))}):au(e)&&e.forEach(function(T,w){o.set(w,ae(T,t,r,w,e,a))});var m=u?c?Zc:Jc:c?cu:lu,O=_?void 0:m(e);return Vc(O||e,function(T,w){O&&(w=T,T=e[w]),Uc(o,w,ae(T,t,r,w,e,a))}),o}var Lu=ae,Du=Lu,Bu=1,Ku=4;function Nu(e){return Du(e,Bu|Ku)}var Ru=Nu;const lh="",Fu={props:["id","closeOnMaskClick","scrolls","closeX","class"],emits:["formSubmit"],beforeCreate(){const e=document.getElementById("vf-modal-target")??document.createElement("div");e.id="vf-modal-target",e.removeAttribute("inert"),document.body.appendChild(e)},mounted(){window.addEventListener("keydown",this.handleEscapeKey),document.body.classList.add("vf-modal-open"),this.$isPropTruthy(this.closeOnMaskClick)&&this.$el.addEventListener("click",e=>{e.target==this.$el&&this.$parent.$dismiss()})},unmounted(){window.removeEventListener("keydown",this.handleEscapeKey),document.body.querySelectorAll(".vf-modal").length>0||document.body.classList.remove("vf-modal-open")},methods:{handleEscapeKey(e){if(e.key==="Esc"||e.key==="Escape"){const t=document.querySelectorAll(".vf-modal-wrap");t[t.length-1]===this.$el&&this.$parent.$dismiss()}}}};let se={};function Vu(e){const t=se[e];this.$modalOpener=t.opener,this.$modalResult=void 0,this.$options.storeParent=this.$modalOpener;let r=this.$options.data;this.$options.data=function(){const n=t.injectedData||{},i=this.$options.keepOriginal||[];let a=r?r.apply(this):{};for(let o in n)i.includes(o)||(n[o]!==null&&typeof n[o]=="object"&&n[o].constructor===Object?a[o]=Ru(n[o]):a[o]=n[o]);return a},this.$dismiss=(...n)=>new Promise(i=>{setTimeout(()=>{delete se[e];let a=d.vm.store.rootInjections;const o=a.find(l=>l.__modalId===e);o&&(a.remove(o),this.$nextTick(()=>{t.resolve.apply(this,n[0]!==void 0?n:this.$modalResult),i()}))},0)}),t.instanceCreationCallback&&t.instanceCreationCallback(this)}d.mixin({beforeCreate(){const e=this.$options.__modalId||this.$options.__file;e&&se[e]&&Vu.call(this,e)}}),d.config.globalProperties.$modal=function(e,t,r){return new Promise((n,i)=>{const a=e.__modalId||e.__file||Math.random().toString(36).substring(2,10);e.__modalId=a,se[a]={opener:this,injectedData:t,instanceCreationCallback:r,resolve:n},this.$nextTick(()=>{d.vm.store.rootInjections.push(s.markRaw(e))})})};const Uu=["id"],Gu={key:0,class:"vf-modal-header"},zu={class:"vf-modal-content"},Wu={key:1,class:"vf-modal-footer"};function qu(e,t,r,n,i,a){return s.openBlock(),s.createBlock(s.Teleport,{to:"#vf-modal-target"},[s.createElementVNode("div",{id:r.id,class:s.normalizeClass(["vf-overlay vf-modal-wrap",r.class])},[s.createElementVNode("form",{action:".",class:s.normalizeClass(["vf-modal",{scrolls:e.$isPropTruthy(this.scrolls)}]),onSubmit:t[1]||(t[1]=s.withModifiers(o=>e.$emit("formSubmit"),["prevent"]))},[e.$slots.header?(s.openBlock(),s.createElementBlock("div",Gu,[s.renderSlot(e.$slots,"header"),e.$isPropTruthy(this.closeX)?(s.openBlock(),s.createElementBlock("i",{key:0,class:"close",onClick:t[0]||(t[0]=o=>e.$parent.$dismiss())})):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",zu,[s.renderSlot(e.$slots,"default")]),e.$slots.footer?(s.openBlock(),s.createElementBlock("div",Wu,[s.renderSlot(e.$slots,"footer")])):s.createCommentVNode("",!0)],34)],10,Uu)])}const Et=q(Fu,[["render",qu]]),ch="",oe={components:{Modal:Et},data(){return{isBare:!1,isHtml:!1,classes:[],title:null,message:null,shouldConfirm:!1}},created(){if(typeof this.message=="object"){if(this.message.html)this.isHtml=!0,this.message=this.message.html;else if(this.message instanceof Error){let e=this.message;e.handle(),this.message=e.userMessage}}},methods:{ok(){this.$dismiss(!0)}}},Yu=oe;async function Se(e,t,...r){return t={...t,__modalId:Math.random().toString(36).substring(2,10)},await e.$modal.apply(e,[t,...r])}d.config.globalProperties.$alert=async function(e,t){return await Se(this,oe,{title:e,message:t})},d.config.globalProperties.$confirm=async function(e,t,r){return r=r||{},!!await Se(this,oe,{title:e,message:t,shouldConfirm:!0,...r})},d.config.globalProperties.$confirmDestroy=function(e,t,r){return r=r||{},r.classes=r.classes||[],r.classes.push("destructive"),this.$confirm(e,t,r)},d.config.globalProperties.$wait=function(e,t){e&&!t?(t=e,e=void 0):!e&&!t&&(t="Please wait...");let r=null,n=new Promise((i,a)=>{Se(this,oe,{title:e,message:t,isBare:!0,classes:["wait"]},i)}).then(i=>r=i);return this.$endWait=async()=>{delete this.$endWait,r?await r.$dismiss():await n.then(()=>r.$dismiss())},this.$endWait};const Xu=["innerHTML"],Ju={key:1};function Zu(e,t,r,n,i,a){const o=s.resolveComponent("Modal"),l=s.resolveDirective("user-text"),c=s.resolveDirective("autofocus");return s.openBlock(),s.createBlock(o,{class:s.normalizeClass(["vf-alert",e.classes])},s.createSlots({default:s.withCtx(()=>[e.isHtml?(s.openBlock(),s.createElementBlock("div",{key:0,innerHTML:e.message,class:"user-message"},null,8,Xu)):s.withDirectives((s.openBlock(),s.createElementBlock("div",Ju,null,512)),[[l,e.message]])]),_:2},[this.isBare?void 0:{name:"header",fn:s.withCtx(()=>[s.createElementVNode("h1",null,s.toDisplayString(e.title),1)]),key:"0"},this.isBare?void 0:{name:"footer",fn:s.withCtx(()=>[e.shouldConfirm?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.withDirectives((s.openBlock(),s.createElementBlock("button",{class:"primary",onClick:t[0]||(t[0]=(...u)=>e.ok&&e.ok(...u))},[s.createTextVNode("Confirm")])),[[c]]),s.createElementVNode("button",{class:"default",onClick:t[1]||(t[1]=u=>e.$dismiss())},"Cancel")],64)):s.withDirectives((s.openBlock(),s.createElementBlock("button",{key:1,class:"default",onClick:t[2]||(t[2]=(...u)=>e.ok&&e.ok(...u))},[s.createTextVNode("OK")])),[[c]])]),key:"1"}]),1032,["class"])}const Qu=q(Yu,[["render",Zu]]);var ef=C,tf=function(){return ef.Date.now()},rf=tf,nf=/\s/;function af(e){for(var t=e.length;t--&&nf.test(e.charAt(t)););return t}var sf=af,of=sf,lf=/^\s+/;function cf(e){return e&&e.slice(0,of(e)+1).replace(lf,"")}var uf=cf,ff=z,df=L,hf="[object Symbol]";function pf(e){return typeof e=="symbol"||df(e)&&ff(e)==hf}var gf=pf,mf=uf,kt=H,vf=gf,jt=0/0,yf=/^[-+]0x[0-9a-f]+$/i,bf=/^0b[01]+$/i,$f=/^0o[0-7]+$/i,_f=parseInt;function Tf(e){if(typeof e=="number")return e;if(vf(e))return jt;if(kt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=mf(e);var r=bf.test(e);return r||$f.test(e)?_f(e.slice(2),r?2:8):yf.test(e)?jt:+e}var Of=Tf,wf=H,Ae=rf,It=Of,Sf="Expected a function",Af=Math.max,xf=Math.min;function Cf(e,t,r){var n,i,a,o,l,c,u=0,_=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(Sf);t=It(t)||0,wf(r)&&(_=!!r.leading,h="maxWait"in r,a=h?Af(It(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p);function g($){var A=n,j=i;return n=i=void 0,u=$,o=e.apply(j,A),o}function m($){return u=$,l=setTimeout(w,t),_?g($):o}function O($){var A=$-c,j=$-u,ir=t-A;return h?xf(ir,a-j):ir}function T($){var A=$-c,j=$-u;return c===void 0||A>=t||A<0||h&&j>=a}function w(){var $=Ae();if(T($))return v($);l=setTimeout(w,O($))}function v($){return l=void 0,p&&n?g($):(n=i=void 0,o)}function k(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function E(){return l===void 0?o:v(Ae())}function S(){var $=Ae(),A=T($);if(n=arguments,i=this,c=$,A){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(w,t),g(c)}return l===void 0&&(l=setTimeout(w,t)),o}return S.cancel=k,S.flush=E,S}var Ef=Cf,kf="__lodash_hash_undefined__";function jf(e){return this.__data__.set(e,kf),this}var If=jf;function Pf(e){return this.__data__.has(e)}var Hf=Pf,Mf=Ve,Lf=If,Df=Hf;function le(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Mf;++t<r;)this.add(e[t])}le.prototype.add=le.prototype.push=Lf,le.prototype.has=Df;var Bf=le;function Kf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Nf=Kf;function Rf(e,t){return e.has(t)}var Ff=Rf,Vf=Bf,Uf=Nf,Gf=Ff,zf=1,Wf=2;function qf(e,t,r,n,i,a){var o=r&zf,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=a.get(e),_=a.get(t);if(u&&_)return u==t&&_==e;var h=-1,p=!0,g=r&Wf?new Vf:void 0;for(a.set(e,t),a.set(t,e);++h<l;){var m=e[h],O=t[h];if(n)var T=o?n(O,m,h,t,e,a):n(m,O,h,e,t,a);if(T!==void 0){if(T)continue;p=!1;break}if(g){if(!Uf(t,function(w,v){if(!Gf(g,v)&&(m===w||i(m,w,r,n,a)))return g.push(v)})){p=!1;break}}else if(!(m===O||i(m,O,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var Pt=qf;function Yf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Xf=Yf;function Jf(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Zf=Jf,Ht=Z,Mt=mt,Qf=fe,ed=Pt,td=Xf,rd=Zf,nd=1,id=2,ad="[object Boolean]",sd="[object Date]",od="[object Error]",ld="[object Map]",cd="[object Number]",ud="[object RegExp]",fd="[object Set]",dd="[object String]",hd="[object Symbol]",pd="[object ArrayBuffer]",gd="[object DataView]",Lt=Ht?Ht.prototype:void 0,xe=Lt?Lt.valueOf:void 0;function md(e,t,r,n,i,a,o){switch(r){case gd:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pd:return!(e.byteLength!=t.byteLength||!a(new Mt(e),new Mt(t)));case ad:case sd:case cd:return Qf(+e,+t);case od:return e.name==t.name&&e.message==t.message;case ud:case dd:return e==t+"";case ld:var l=td;case fd:var c=n&nd;if(l||(l=rd),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=id,o.set(e,t);var _=ed(l(e),l(t),n,i,a,o);return o.delete(e),_;case hd:if(xe)return xe.call(e)==xe.call(t)}return!1}var vd=md,Dt=ct,yd=1,bd=Object.prototype,$d=bd.hasOwnProperty;function _d(e,t,r,n,i,a){var o=r&yd,l=Dt(e),c=l.length,u=Dt(t),_=u.length;if(c!=_&&!o)return!1;for(var h=c;h--;){var p=l[h];if(!(o?p in t:$d.call(t,p)))return!1}var g=a.get(e),m=a.get(t);if(g&&m)return g==t&&m==e;var O=!0;a.set(e,t),a.set(t,e);for(var T=o;++h<c;){p=l[h];var w=e[p],v=t[p];if(n)var k=o?n(v,w,p,t,e,a):n(w,v,p,e,t,a);if(!(k===void 0?w===v||i(w,v,r,n,a):k)){O=!1;break}T||(T=p=="constructor")}if(O&&!T){var E=e.constructor,S=t.constructor;E!=S&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof S=="function"&&S instanceof S)&&(O=!1)}return a.delete(e),a.delete(t),O}var Td=_d,Ce=Ue,Od=Pt,wd=vd,Sd=Td,Bt=ie,Kt=re,Nt=F,Ad=Qe,xd=1,Rt="[object Arguments]",Ft="[object Array]",ce="[object Object]",Cd=Object.prototype,Vt=Cd.hasOwnProperty;function Ed(e,t,r,n,i,a){var o=Kt(e),l=Kt(t),c=o?Ft:Bt(e),u=l?Ft:Bt(t);c=c==Rt?ce:c,u=u==Rt?ce:u;var _=c==ce,h=u==ce,p=c==u;if(p&&Nt(e)){if(!Nt(t))return!1;o=!0,_=!1}if(p&&!_)return a||(a=new Ce),o||Ad(e)?Od(e,t,r,n,i,a):wd(e,t,c,r,n,i,a);if(!(r&xd)){var g=_&&Vt.call(e,"__wrapped__"),m=h&&Vt.call(t,"__wrapped__");if(g||m){var O=g?e.value():e,T=m?t.value():t;return a||(a=new Ce),i(O,T,r,n,a)}}return p?(a||(a=new Ce),Sd(e,t,r,n,i,a)):!1}var kd=Ed,jd=kd,Ut=L;function Gt(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ut(e)&&!Ut(t)?e!==e&&t!==t:jd(e,t,r,n,Gt,i)}var Id=Gt,Pd=Id;function Hd(e,t){return Pd(e,t)}var Md=Hd;const uh="",Ee=Symbol(null),zt=Symbol("create"),Ld="`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>?qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",Dd={emits:["optionsLoaded","createItem","update:modelValue"],props:["modelValue","options","prependOptions","appendOptions","preload","url","urlParams","remoteSearch","searchFields","placeholder","valueKey","idKey","titleKey","titleFormatter","subtitleKey","subtitleFormatter","nullTitle","noResultsText","disabled","optionsListId","debug"],data(){return{isLoaded:!1,loadedOptions:[],isSearching:!1,searchText:"",selectedOption:null,selectedOptionTitle:null,shouldDisplayOptions:!1,highlightedOptionKey:null,shouldShowCreateOption:!1}},computed:{effectiveDisabled(){return this.disabled||!this.loadedOptions},effectivePlaceholder(){return!this.isLoaded&&this.$isPropTruthy(this.preload)?"Loading...":this.nullTitle?this.nullTitle:this.placeholder||""},effectiveIdKey(){return this.idKey||"id"},effectiveTitleKey(){return this.titleKey||"name"},effectiveValueKey(){if(this.valueKey)return this.valueKey;if(this.options&&!Array.isArray(this.options))return this.effectiveIdKey},effectiveNoResultsText(){return this.noResultsText||"No options match your search."},effectiveRemoteSearch(){return this.$isPropTruthy(this.remoteSearch)},loadedOptionsArray(){return this.arrayifyOptions(this.loadedOptions)},prependOptionsArray(){return this.prependOptions?this.arrayifyOptions(this.prependOptions):[]},appendOptionsArray(){return this.appendOptions?this.arrayifyOptions(this.appendOptions):[]},fullOptionsArray(){return[...this.prependOptionsArray,...this.loadedOptionsArray,...this.appendOptionsArray]},optionsDescriptors(){return this.fullOptionsArray.map((e,t)=>{const r=this.getOptionTitle(e),n=this.getOptionSubtitle(e),i=r?r.text.trim().toLowerCase():"",a=n?n.text.trim().toLowerCase():"";let o=[];return this.searchFields?this.searchFields.forEach(l=>{e[l]&&o.push(String(e[l]).toLowerCase())}):(o.push(i),a&&o.push(a)),{key:typeof e=="object"?e[this.effectiveIdKey]||t:e,titleHtml:r.html,subtitleHtml:n==null?void 0:n.html,searchContent:o.join(""),ref:e}})},effectiveOptions(){let e=[...this.optionsDescriptors];if(this.isSearching){const t=this.searchText.trim().toLowerCase();if(t.length){e=e.filter(i=>i.searchContent.includes(t));const r=this.searchText.escapeHtml().replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),n=new RegExp(`(${r})`,"ig");e=e.map(i=>(i={...i},i.titleHtml=i.titleHtml.replace(n,"<mark>$1</mark>"),i.subtitleHtml&&(i.subtitleHtml=i.subtitleHtml.replace(n,"<mark>$1</mark>")),i)),this.shouldShowCreateOption&&(e.find(a=>a.searchContent===t)!==void 0||e.push({key:zt,titleHtml:"Create <strong>"+this.searchText.trim()+"</strong>..."}))}}else this.nullTitle&&e.unshift({key:Ee,titleHtml:this.nullTitle});return e}},watch:{modelValue(){this.handleValueChanged()},options(){this.loadedOptions=this.options},url(){console.log("url changed"),this.handleSourceUpdate()},urlParams(e,t){Md(t,e)||this.handleSourceUpdate()},optionsDescriptors(){this.shouldDisplayOptions&&setTimeout(this.highlightInitialOption,0)},searchText(){this.isSearching&&!this.effectiveRemoteSearch&&!this.searchText.trim().length&&(this.isSearching=!1)},shouldDisplayOptions(){this.shouldDisplayOptions?setTimeout(this.handleOptionsDisplayed,0):(this.isSearching=!1,this.searchText=this.selectedOptionTitle||"")},effectiveOptions(){(!this.highlightedOptionKey||!this.effectiveOptions.find(e=>e.key==this.highlightedOptionKey))&&(this.highlightedOptionKey=this.effectiveOptions.length?this.effectiveOptions[0].key:null)}},async mounted(){this.shouldShowCreateOption=this.$attrs.onCreateItem!==void 0,this.options?(this.loadedOptions=this.options,this.isLoaded=!0):this.$isPropTruthy(this.preload)&&await this.loadRemoteOptions(),this.handleValueChanged(),this.$watch("selectedOption",()=>{const e=this.selectedOption&&this.effectiveValueKey?this.selectedOption[this.effectiveValueKey]:this.selectedOption;e!==this.modelValue&&this.$emit("update:modelValue",e)}),this.effectiveRemoteSearch&&this.$watch("searchText",Ef(this.reloadOptionsIfSearching,250))},methods:{async loadRemoteOptions(){await this.reloadOptions(),this.$emit("optionsLoaded",this.loadedOptions)},handleSourceUpdate(){if(console.log("source updated"),this.preload)return this.reloadOptions();this.isLoaded&&(this.isLoaded=!1,this.loadedOptions=[])},async reloadOptions(){let e={};this.urlParams&&Object.assign(e,this.urlParams),this.effectiveRemoteSearch&&this.isSearching&&this.searchText&&(e.q=this.searchText);const t=await this.$http.get(this.url,{params:e});this.loadedOptions=t.data,this.isLoaded=!0},reloadOptionsIfSearching(){this.isSearching&&(this.reloadOptions(),this.isSearching=this.searchText.trim().length>0)},handleKeyDown(e){if(e.key=="Escape"){e.stopPropagation(),e.target.blur();return}if(!(e.key=="ArrowLeft"||e.key=="ArrowRight")&&e.key!="Tab"){if(!this.isLoaded){this.isSearching||e.preventDefault();return}if(e.key=="ArrowUp"||e.key=="ArrowDown")return e.preventDefault(),this.incrementHighlightedOption(e.key=="ArrowUp"?-1:1);if(e.key=="PageUp"||e.key=="PageDown")return e.preventDefault(),this.incrementHighlightedOption(e.key=="PageUp"?-10:10);if(e.key=="Home"||e.key=="End")return e.preventDefault(),this.incrementHighlightedOption(e.key=="Home"?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);if(e.key=="Enter"){e.preventDefault();const t=this.effectiveOptions.find(r=>r.key==this.highlightedOptionKey);if(t)return this.selectOption(t)}if(e.key==="Delete"||e.key==="Backspace"){this.searchText.length>1&&(this.isSearching=!0);return}!e.metaKey&&Ld.includes(e.key)&&(this.isSearching=!0)}},handleInputFocused(){this.selectedOption?this.highlightedOptionKey=typeof this.selectedOption=="object"&&this.selectedOption!==null?this.selectedOption[this.effectiveIdKey]:this.selectedOption:this.nullTitle&&(this.highlightedOptionKey=Ee),this.shouldDisplayOptions=!0},handleInputBlurred(){this.$isPropTruthy(this.debug)||(!this.searchText.length&&this.nullTitle&&(this.selectedOption=null,this.selectedOptionTitle=null),this.shouldDisplayOptions=!1)},handleOptionsDisplayed(){this.isLoaded||this.loadRemoteOptions(),this.teleportOptionsContainer(),this.optionsListId&&this.$refs.optionsContainer.setAttribute("id",this.optionsListId)},teleportOptionsContainer(){const e=this.$el.getBoundingClientRect(),t=e.y+e.height+2,r=e.x,n=this.$refs.optionsContainer,i=window.getComputedStyle(this.$el);for(let a in i)/^(font|text)/.test(a)&&(n.style[a]=i[a]);if(n.style.top=t+"px",n.style.left=r+"px",n.style.minWidth=e.width+"px",!i.maxHeight||i.maxHeight=="none"){const a=window.innerHeight-t-12;n.style.maxHeight=a+"px"}document.body.appendChild(n),setTimeout(this.highlightInitialOption,0)},highlightInitialOption(){if(!this.isLoaded||!this.highlightedOptionKey)return;const e=this.effectiveOptions.findIndex(n=>n.key==this.highlightedOptionKey),t=this.$refs.optionsContainer,r=t.querySelectorAll(".option")[e];t.scrollTop=r.offsetTop},handleOptionHover(e){this.highlightedOptionKey=e?e.key:null},incrementHighlightedOption(e){const t=this.effectiveOptions.findIndex(a=>a.key==this.highlightedOptionKey);let r=t+e;if(r<0?r=0:r>=this.effectiveOptions.length&&(r=this.effectiveOptions.length-1),t==r)return;this.highlightedOptionKey=this.effectiveOptions[r].key;const n=this.$refs.optionsContainer,i=n.querySelectorAll(".option")[r];i.offsetTop<n.scrollTop?n.scrollTop=i.offsetTop:i.offsetTop+i.offsetHeight>n.scrollTop+n.clientHeight&&(n.scrollTop=i.offsetTop+i.offsetHeight-n.clientHeight)},selectOption(e){if(this.isSearching=!1,e.key==Ee)this.searchText="",this.selectedOption=null,this.selectedOptionTitle=null;else if(e.key===zt){const t=this.searchText.trim();this.searchText="",this.selectedOption=null,this.selectedOptionTitle=null,this.$emit("createItem",t)}else{const r=this.optionsDescriptors.find(n=>n.key==e.key).ref;this.selectedOption=r,this.selectedOptionTitle=this.getOptionTitle(this.selectedOption).text,this.searchText=this.selectedOptionTitle||""}this.$refs.searchField.blur()},handleValueChanged(){this.modelValue?(this.effectiveValueKey?this.selectedOption=this.fullOptionsArray.find(e=>e[this.effectiveValueKey]===this.modelValue):this.selectedOption=this.modelValue,this.selectedOptionTitle=this.getOptionTitle(this.selectedOption).text,this.searchText=this.selectedOptionTitle||""):(this.selectedOption=null,this.selectedOptionTitle=null,this.searchText="")},getOptionTitle(e){if(e===null)return null;if(this.titleFormatter){const r=this.titleFormatter(e);return typeof r=="object"?{text:r.text||r.html.replace(/<[^>]+>/g,""),html:r.html}:{text:r,html:r.escapeHtml()}}const t=String(typeof e!="object"?e:e[this.effectiveTitleKey]);return{text:t,html:t.escapeHtml()}},getOptionSubtitle(e){if(e===null)return null;if(this.subtitleFormatter){const r=this.subtitleFormatter(e);return r?typeof r=="object"?{text:r.text||r.html.replace(/<[^>]+>/g,""),html:r.html}:{text:r,html:r.escapeHtml()}:null}let t=typeof e!="object"?null:e[this.subtitleKey];return t?(t=String(t),{text:t,html:t.escapeHtml()}):null},addRemoteOption(e){this.loadedOptions.push(e)},arrayifyOptions(e){return Array.isArray(e)?e:Object.entries(e).map(t=>({[this.effectiveIdKey]:t[0],[this.effectiveTitleKey]:t[1]}))}}},Bd=["placeholder"],Kd={key:0,ref:"optionsContainer",class:"vf-smart-select-options"},Nd={key:0,class:"no-results"},Rd=["onMousemove","onMousedown"],Fd=["innerHTML"],Vd=["innerHTML"],Ud={key:0,class:"no-results"};function Gd(e,t,r,n,i,a){const o=s.resolveDirective("disabled");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vf-smart-select",{disabled:a.effectiveDisabled,open:i.shouldDisplayOptions}])},[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>i.searchText=l),ref:"searchField",type:"text",class:s.normalizeClass({nullable:!!r.nullTitle}),onKeydown:t[1]||(t[1]=(...l)=>a.handleKeyDown&&a.handleKeyDown(...l)),placeholder:a.effectivePlaceholder,onFocus:t[2]||(t[2]=(...l)=>a.handleInputFocused&&a.handleInputFocused(...l)),onBlur:t[3]||(t[3]=(...l)=>a.handleInputBlurred&&a.handleInputBlurred(...l))},null,42,Bd),[[s.vModelText,i.searchText],[o,a.effectiveDisabled]]),i.shouldDisplayOptions?(s.openBlock(),s.createElementBlock("div",Kd,[i.isLoaded?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.effectiveOptions,l=>(s.openBlock(),s.createElementBlock("div",{key:l.key,class:s.normalizeClass(["option",{highlighted:i.highlightedOptionKey===l.key}]),onMousemove:c=>a.handleOptionHover(l),onMousedown:c=>a.selectOption(l)},[s.createElementVNode("div",{class:"title",innerHTML:l.titleHtml},null,8,Fd),l.subtitleHtml?(s.openBlock(),s.createElementBlock("div",{key:0,class:"subtitle",innerHTML:l.subtitleHtml},null,8,Vd)):s.createCommentVNode("",!0)],42,Rd))),128)),!a.effectiveOptions.length&&i.searchText?(s.openBlock(),s.createElementBlock("div",Ud,s.toDisplayString(a.effectiveNoResultsText),1)):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock("div",Nd,"Loading..."))],512)):s.createCommentVNode("",!0)],2)}const zd=q(Dd,[["render",Gd]]);d.component("AjaxSelect",dr),d.component("Alert",Qu),d.component("Modal",Et),d.component("SmartSelect",zd),d.directive("autofocus",{mounted:Wt,updated:Wt});function Wt(e,t){t.value===void 0&&e.hasAutoFocused||t.value!==void 0&&!t.value||t.oldValue!==void 0&&t.value==t.oldValue||(e.hasAutoFocused=!0,e=["BUTTON","INPUT","TEXTAREA","SELECT"].indexOf(e.tagName)>-1?e:f(e).find("input:first")[0],setTimeout(()=>e.focus(),10))}d.directive("confirm-button",{mounted(e){e.addEventListener("click",t=>{let r=Date.now();if(e._isConfirming){if(r-e._confirmInitTime<300)return;e._resetHandler(),e.dispatchEvent(new Event("confirm"));return}t.preventDefault(),t.stopImmediatePropagation(),e._resetHandler=()=>{e.innerHTML=e._preConfirmHTML,e.blur(),e.removeEventListener("mouseout",e._resetHandler),delete e._isConfirming,delete e._preConfirmHTML,delete e._resetHandler},e._isConfirming=!0,e._confirmInitTime=r,e._preConfirmHTML=e.innerHTML,e.innerHTML="Confirm",e.addEventListener("mouseout",e._resetHandler)})}}),d.directive("datetime",{beforeMount:qt,updated:qt});function qt(e,t){t.value==t.oldValue&&e.innerHTML.length||(e.innerText=Wd(e,t))}function Wd(e,t){if(!t.value)return e.attributes.placeholder?e.attributes.placeholder.value:"";let r="",n=e.attributes.local?P(t.value):P.utc(t.value);e.attributes["display-utc"]||n.local();let i=e.attributes.format?e.attributes.format.value:null;if(!i&&e.attributes["relative-date"]){let o=P();o.year()==n.year()&&o.month()==n.month()&&o.date()==n.date()&&(r="at",i="HH:mm")}i||(i="MM/DD/YY HH:mm");let a=n.format(i);return r&&(a=r+" "+a),a}d.directive("date-input",{beforeMount:qd});function qd(e){e.addEventListener("blur",()=>{let t=e.value;/^[0-9]{1,2}\/[0-9]{1,2}$/.test(t)&&(t+="/"+P().format("YY"));let r=Date.parse(t);isNaN(r)?e.value="":e.value=P(r).format("MM/DD/YYYY"),e.dispatchEvent(new Event("input"))})}d.directive("disabled",{beforeMount:Yt,updated:Yt,unmounted:Yd});function Yt(e,t){e.tagName=="LABEL"&&(f(e).toggleClass("disabled",!!t.value),e=f(e).find("input")[0]),t.value?f(e).attr("disabled","disabled"):f(e).removeAttr("disabled")}function Yd(e){e.tagName=="LABEL"&&(f(e).removeClass("disabled"),e=f(e).find("input")[0]),f(e).removeAttr("disabled")}let ke=[];function Xd(){ke.forEach(Jt)}setInterval(Xd,1e3),d.directive("duration",{beforeMount:Xt,updated:Xt,unmounted:Zt});function Xt(e,t){if(t.value==t.oldValue)return;if(!t.value)return Zt(e);e.$includeSeconds=typeof e.attributes["no-seconds"]>"u";let r=e.attributes["base-time"];r?e.$startTs=P(r.value).valueOf()-t.value*1e3:e.$startTs=P(t.value).valueOf(),e.$isConfigured||(e.$isConfigured=!0,ke.push(e)),Jt(e)}function Jt(e){let t=e.$startTs,r=Math.round((Date.now()-t)/1e3);e.innerText=Jd(r,e.$includeSeconds===!1)}function Zt(e){e.$isConfigured&&(ke.remove(e),e.$isConfigured=!1),e.innerText="-"}function Jd(e,t){let r=[],n=Math.floor(e/86400);n&&r.push(n+"d"),e-=n*86400;let i=Math.floor(e/3600);(n||i)&&r.push(i+"h"),e-=i*3600;let a=Math.floor(e/60);return(n||i||a)&&r.push(a+"m"),t?r.length||r.push("0m"):(e-=a*60,r.push(e+"s")),r.join(" ")}class ue{constructor(t,r){this.el=t,this.handler=r,this.isTripped=!1,this.onScroll=this._onScroll.bind(this)}install(){this.el.addEventListener("scroll",this.onScroll)}uninstall(){this.el.removeEventListener("scroll",this.onScroll)}_onScroll(t){Math.ceil(this.el.scrollTop+this.el.clientHeight+5)>=this.el.scrollHeight?this.isTripped||(this.handler(t),this.isTripped=!0):this.isTripped&&(this.isTripped=!1)}}d.directive("infinite-scroll",{beforeMount(e,t){t.value&&(e._infiniteScrollHook=new ue(e,t.value),e._infiniteScrollHook.install())},unmounted(e){e._infiniteScrollHook&&e._infiniteScrollHook.uninstall()}}),d.directive("readonly",{beforeMount:Qt,updated:Qt});function Qt(e,t){e.tagName=="LABEL"&&(e=f(e).find("input")[0]),t.value?f(e).attr("readonly","readonly"):f(e).removeAttr("readonly")}d.directive("tip",{mounted:er,updated:er,unmounted:Zd});function er(e,t){let r=e.attributes.tip?e.attributes.tip.value:t.value;if(t.value===!1&&(r=null),r){let n={};n[t.modifiers.html?"html":"text"]=r,e.attributes["tip-class"]&&(n.class=e.attributes["tip-class"].value),f(e).vfTooltip(n)}else f(e).vfTooltip("destroy")}function Zd(e){f(e).vfTooltip("destroy")}f.fn.vfTooltip=function(e){return this.each(function(t,r){var n=f(r).data("vf-tooltip");if(typeof e=="string"){if(!n)return;n[e]()}else if(n)n.configure(e);else{var i=new Qd(r,e);f(r).data("vf-tooltip",i)}})};function Qd(e,t){this.configure=c,this.destroy=w;var r,n,i,a,o=!1;this.configure(t);var l=f(e);l.on("mouseenter",u),l.on("mouseleave",_),n.now&&u(n.now);function c(v){n=f.extend({delay:0},v)}function u(v){o||(o=!0,setTimeout(function(){o&&(h(),n.static?m():O(v),r.show())},n.delay))}function _(){o=!1,p()}function h(){r?r.remove():n.static||f(window).on("mousemove",O),r=f('<div class="vf-tooltip">').css("position","absolute").css("z-index","1000000").addClass(n.class).appendTo(document.body),n.title&&f('<div class="title">').text(n.title).appendTo(r);var v=f('<div class="content">').appendTo(r);n.callback?n.callback(v[0]):n.text?v.text(n.text).html(v.html().replace(/\n/g,"<br>")):n.html&&v.html(n.html),n.static?r.mouseover(function(){o=!0}).mouseout(function(){o=!1,p()}):a=setInterval(T,250)}function p(){n.static?setTimeout(g,50):g()}function g(){o||r&&(r.remove(),r=null,clearInterval(a),n.static||f(window).off("mousemove",O))}function m(){var v=l.position(),k=r.height(),E=l.outerWidth(!0),S=v.left,$=v.top-k-1;$-2<0&&($=v.top+l.outerHeight(!0)+1),r.css("min-width",E+"px").css("left",S+"px").css("top",$+"px")}function O(v){var k=r.outerWidth(),E=r.outerHeight(),S=window.innerWidth,$=window.innerHeight,A=v.pageX+10,j=v.pageY+20;A+k>S&&(A=v.pageX-5-k),j+E>$&&(j=v.pageY-5-E),r.css("left",A+"px").css("top",j+"px"),i=v}function T(){i&&e!=i.target&&!f.contains(e,i.target)&&_()}function w(){o=!1,g(),l.off("mouseenter",u),l.off("mouseleave",_),l.removeData("vf-tooltip")}}d.directive("user-text",{beforeMount:tr,updated:tr});function tr(e,t){t.value!=t.oldValue&&(e.innerHTML=t.value.escapeHtml().nl2br())}Object.defineProperty(Array.prototype,"diff",{enumerable:!1,value:function(...e){return this.filter(t=>{for(let r=0;r<e.length;r++)if(e[r].includes(t))return!1;return!0})}}),Object.defineProperty(Array.prototype,"first",{enumerable:!1,value:function(){return this[0]||void 0}}),Object.defineProperty(Array.prototype,"intersect",{enumerable:!1,value:function(...e){return this.filter(t=>{for(let r=0;r<e.length;r++)if(e[r].includes(t))return!0;return!1})}}),Object.defineProperty(Array.prototype,"keyBy",{enumerable:!1,value:function(e){let t={};return this.forEach(r=>{t[r[e]]=r}),t}}),Object.defineProperty(Array.prototype,"last",{enumerable:!1,value:function(){return this.length?this[this.length-1]:void 0}}),Object.defineProperty(Array.prototype,"pluck",{enumerable:!1,value:function(e,t){if(typeof t>"u")return this.map(n=>n[e]);let r={};return this.forEach(n=>{r[n[t]]=n[e]}),r}}),Object.defineProperty(Array.prototype,"remove",{enumerable:!1,value:function(e){const t=this.indexOf(e);t>-1&&this.splice(t,1)}}),Object.defineProperty(Array.prototype,"replace",{enumerable:!1,value:function(e,t){const r=this.indexOf(e);r>-1&&this.splice(r,1,t)}}),Object.defineProperty(Array.prototype,"sortBy",{enumerable:!1,value:function(e){this.sort((t,r)=>String(t[e]).toLowerCase().localeCompare(String(r[e]).toLowerCase()))}}),Object.defineProperty(Array.prototype,"unique",{enumerable:!1,value:function(){return[...new Set(this)]}}),d.config.globalProperties.$contextMenu=function(e,t){var r=f('<div class="vf-overlay">').click(h).appendTo(document.body),n=f('<div class="vf-context-menu">').css("position","absolute").appendTo(r),i=f(e.currentTarget);i.css("user-select","none"),i.addClass("context-menu-active"),t.targetClass&&i.addClass(t.targetClass),t.class&&n.addClass(t.class),t.items&&t.items.forEach(g=>{if(g=="-")return f('<div class="separator">').appendTo(n);var m=f('<div class="item">').css("user-select","none").text(g.title).appendTo(n);g.class&&m.addClass(g.class),g.shouldConfirm?m.data("handler",g.handler).click(p):g.handler&&m.click(g.handler)});const a=window.innerWidth-e.clientX,o=window.innerHeight-e.clientY,l=n.outerHeight(),c=n.outerWidth(),u=a<c?e.clientX-c-1:e.clientX+1,_=o<l?e.clientY-l-1:e.clientY+1;n.css("left",u+"px"),n.css("top",_+"px"),t.onCreate&&t.onCreate(n[0]),setTimeout(()=>{n.css("width",n.outerWidth()+"px")},50);function h(){t.targetClass&&i.removeClass(t.targetClass),i.removeClass("context-menu-active"),i.css("user-select",""),r.remove()}function p(g){var m=f(g.currentTarget);if(m.hasClass("pending-confirm")){var O=m.data("handler");O&&O()}else{var T=m.html();m.addClass("pending-confirm").text("Confirm"),m.one("mouseleave",function(){m.removeClass("pending-confirm").html(T)}),g.stopPropagation()}}},d.config.globalProperties.$delay=e=>new Promise(t=>setTimeout(t,e));let I={unhandledErrorSupportText:"please contact support"};function eh(e){Object.assign(I,e)}Object.defineProperty(I,"set",{value:eh,enumerable:!1}),d.config.globalProperties.$reportError=e=>{e instanceof Error||(e=new Error(e)),I.reportErrorHandler?I.reportErrorHandler(e):console.error(e)},d.config.globalProperties.$throwUserError=e=>{let t=new Error(e);throw t.code="USERERR",t},Object.defineProperty(Error.prototype,"userMessage",{get(){return this.code=="USERERR"?this.message:`An application error has occurred:
3
+
4
+ ${this.message}
5
+
6
+ Please refresh the page and try again. If this error persists, ${I.unhandledErrorSupportText}.`}}),Error.prototype.handle=function(){return this.code!="USERERR"&&d.config.globalProperties.$reportError(this),this},d.config.globalProperties.$http=W,W.postOrPut=(e,t,...r)=>{const n=t?"put":"post",i=t?`${e}/${t}`:e;return W[n](i,...r)},W.interceptors.response.use(e=>{if(e.data&&typeof e.data!="object")throw new Error("response was not JSON");return e},e=>{if(e.response&&e.response.status==401&&I.unauthorizedHttpResponseHandler&&I.unauthorizedHttpResponseHandler(e.response))return new Promise(()=>{});throw e.response&&e.response.data&&e.response.data.error&&(e.code=e.response.status==422?"USERERR":"APIERR",e.message=e.response.data.error,e.field=e.response.data.errorField),e}),d.config.globalProperties.$mask=function(e){let t=f(this.$el);this.$maskEl(t.hasClass("vf-overlay")?t.find(".vf-modal")[0]:this.$el,e)},d.config.globalProperties.$maskEl=function(e,t){this._currentMask||(this._currentMask=f('<div class="mask">').text(t||"Please wait...").appendTo(e))},d.config.globalProperties.$unmask=function(){this._currentMask&&(f(this._currentMask).remove(),delete this._currentMask)},d.config.globalProperties.$maskForm=function(e,t){let r=this.$el;e!==void 0&&e.tagName=="FORM"&&(r=e,e=void 0);let n=r.tagName=="FORM"?f(r):f(r).find("form"),i=n.find("input, select, textarea, button").not("[disabled]");if(n.addClass("masked"),n.data("vf-masked-inputs",i),i.attr("disabled","disabled"),e===void 0&&(e=n.find("button:first")),e){let a=n.find(e);a.disable(t||"Please wait..."),n.data("vf-masked-wait-btn",a)}},d.config.globalProperties.$unmaskForm=function(){let e=this.$el.tagName=="FORM"?f(this.$el):f(this.$el).find("form.masked");if(!e.length)return;e.data("vf-masked-inputs").removeAttr("disabled"),e.removeData("vf-masked-inputs");let r=e.data("vf-masked-wait-btn");r&&(e.removeData("vf-masked-wait-btn"),r.enable()),e.removeClass("masked")},f.fn.disable=function(e){return this.each(function(t,r){var n=f(r),i=r.tagName=="INPUT";e&&n.data("originalValue",i?n.val():n.html())&&n[i?"val":"text"](e),n.attr("disabled","disabled")}),this},f.fn.enable=function(){return this.each(function(e,t){var r=f(t);r.removeAttr("disabled");var n=r.data("originalValue");n!=null&&r[t.tagName=="INPUT"?"val":"html"](n)&&r.removeData("originalValue")}),this},Number.prototype.format=function(){return this.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},String.prototype.escapeHtml=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},String.prototype.nl2br=function(){return this.replace(/\n/g,"<br>")},String.prototype.kebab=function(){return this.replace(/ /g,"-")},String.prototype.lcfirst=function(){return this.substr(0,1).toLowerCase()+this.substr(1)},String.prototype.snake=function(){return this.replace(/ /g,"_")},String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},String.prototype.ucwords=function(){return this.replace(/^[a-z]| [a-z]/gi,function(e){return e.toUpperCase()})},String.prototype.unsnake=function(){return this.replace(/_/g," ")},d.config.globalProperties.$isPropTruthy=function(e){return e!==void 0&&(e===""||e)};class th{static install(t){const r=["auto","scroll"],n=function(l){if(l=l.parentElement,!l)return null;const c=window.getComputedStyle(l);return r.includes(c.overflow)||r.includes(c.overflowX)||r.includes(c.overflowY)?l:n(l)},i=function(){if(this.$options.windowScrolledToBottom&&(this._windowScrollHook=new ue(window,this.$options.windowScrolledToBottom.bind(this)),this._windowScrollHook.install()),this.$options.elScrolledToBottom&&(this._elScrollHook=new ue(this.$el,this.$options.elScrolledToBottom.bind(this)),this._elScrollHook.install()),this.$options.ancestorScrolledToBottom){const l=n(this.$el);l?(this._ancestorScrollHook=new ue(l,this.$options.ancestorScrolledToBottom.bind(this)),this._ancestorScrollHook.install()):console.warn("no scollable ancestor found for component:",this)}},a=function(){this._windowScrollHandler&&this._windowScrollHandler.install(),this._elScrollHandler&&this._elScrollHandler.install(),this._ancestorScrollHook&&this._ancestorScrollHook.install()},o=function(){this._windowScrollHandler&&this._windowScrollHandler.uninstall(),this._elScrollHandler&&this._elScrollHandler.uninstall(),this._ancestorScrollHook&&this._ancestorScrollHook.uninstall()};t.mixin({mounted(){i.call(this)},activated(){a.call(this)},deactivated(){o.call(this)},beforeUnmount(){o.call(this)}})}}class rh{static install(t){t.mixin({mounted(){this.$options.windowResized&&(this._resizeWatcherHandler=this.$options.windowResized.bind(this),window.addEventListener("resize",this._resizeWatcherHandler))},activated(){this._resizeWatcherHandler&&window.addEventListener("resize",this._resizeWatcherHandler)},deactivated(){this._resizeWatcherHandler&&window.removeEventListener("resize",this._resizeWatcherHandler)},beforeUnmount(){this._resizeWatcherHandler&&window.removeEventListener("resize",this._resizeWatcherHandler)}})}}d.use(ar),d.use(th),d.use(rh);const rr={bytes(e){var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]},dash(e){return e!=null&&String(e).length?e:"-"},dashZeros(e){return e||"-"},grammarcase(e){return e?e.grammarcase():null},lowercase(e){return e?e.toLowerCase():null},number(e){return e===null||!/^[0-9]+$/.test(e)?e:e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},phone(e){if(!e)return e;let t=e.replace(/[^0-9]/g,"").replace(/^1/,"");return t.length!=10?e:"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6)},ucfirst(e){return e?e.ucfirst():null},ucwords(e){return e?e.ucwords():null},uppercase(e){return e?e.toUpperCase():null},unsnake(e){return e?e.unsnake():null},usCurrency(e){return"$"+Number(e).toFixed(3).replace(/0$/,"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}};function nh(e){for(let t of Object.keys(e))nr(t,e[t])}function nr(e,t){rr[e]=t}d.config.globalProperties.$filter=(e,...t)=>{for(let r of t)e=rr[r](e);return e};const ih={getApp:oh,configure:ah,mount:sh,registerFilter:nr,registerFilters:nh};function ah(e){I.set(e)}function sh(e,t){sr(e),d.vm=d.mount(t)}function oh(){return d}x.default=ih,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,28 +1,39 @@
1
1
  {
2
2
  "name": "@signal24/vue-foundation",
3
- "version": "3.7.4",
3
+ "type": "module",
4
+ "version": "3.8.1",
4
5
  "description": "Common components, directives, and helpers for Vue 3 apps",
5
- "main": "src/index.js",
6
+ "main": "dist/vue-foundation.umd.js",
7
+ "module": "./dist/vue-foundation.es.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/vue-foundation.es.js",
11
+ "require": "./dist/vue-foundation.umd.js"
12
+ },
13
+ "./dist/vue-foundation.css": {
14
+ "import": "./dist/vue-foundation.css",
15
+ "require": "./dist/vue-foundation.css"
16
+ }
17
+ },
6
18
  "scripts": {
7
- "format": "prettier --write . && eslint src --fix"
19
+ "dev": "vite",
20
+ "build": "vite build",
21
+ "preview": "vite preview"
8
22
  },
9
23
  "license": "MIT",
10
24
  "dependencies": {
11
- "axios": "^0.26.0",
12
- "jquery": "^3.6.0",
25
+ "axios": "^0.27.2",
26
+ "jquery": "^3.6.4",
13
27
  "lodash": "^4.17.21",
14
- "moment": "^2.29.1",
15
- "vue-stash-nested": "fergusean/vue-stash-nested#vue-foundation-3"
28
+ "moment": "^2.29.4",
29
+ "vue-stash-nested": "fergusean/vue-stash-nested#vue-foundation-3",
30
+ "vue": "^3.2.47"
16
31
  },
17
32
  "devDependencies": {
18
- "@vue/eslint-config-prettier": "^7.0.0",
19
- "eslint": "^8.10.0",
20
- "eslint-plugin-prettier": "^4.0.0",
21
- "eslint-plugin-simple-import-sort": "^7.0.0",
22
- "eslint-plugin-vue": "^8.5.0",
23
- "prettier": "^2.5.1",
24
- "sass": "^1.49.9",
25
- "sass-loader": "^12",
26
- "vue": "^3.2.31"
33
+ "@vitejs/plugin-vue": "^4.1.0",
34
+ "autoprefixer": "^10.4.14",
35
+ "sass": "^1.59.3",
36
+ "vite": "^4.2.0",
37
+ "vue": "^3.2.47"
27
38
  }
28
39
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  <script>
21
21
  import app from '../app';
22
- import Modal from './modal';
22
+ import Modal from './modal.vue';
23
23
 
24
24
  const classDef = {
25
25
  components: {
@@ -1,12 +1,12 @@
1
1
  import app from '../app';
2
- import AjaxSelect from './ajax-select';
2
+ import AjaxSelect from './ajax-select.vue';
3
3
  app.component('AjaxSelect', AjaxSelect);
4
4
 
5
- import Alert from './alert';
5
+ import Alert from './alert.vue';
6
6
  app.component('Alert', Alert);
7
7
 
8
- import Modal from './modal';
8
+ import Modal from './modal.vue';
9
9
  app.component('Modal', Modal);
10
10
 
11
- import SmartSelect from './smart-select';
11
+ import SmartSelect from './smart-select.vue';
12
12
  app.component('SmartSelect', SmartSelect);
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <Teleport to="#vf-modal-target">
3
- <div class="vf-overlay vf-modal-wrap" :class="class">
3
+ <div :id="id" class="vf-overlay vf-modal-wrap" :class="class">
4
4
  <form
5
5
  action="."
6
6
  class="vf-modal"
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script>
26
26
  export default {
27
- props: ['closeOnMaskClick', 'scrolls', 'closeX', 'class'],
27
+ props: ['id', 'closeOnMaskClick', 'scrolls', 'closeX', 'class'],
28
28
  emits: ['formSubmit'],
29
29
 
30
30
  beforeCreate() {
package/vite.config.js ADDED
@@ -0,0 +1,42 @@
1
+ import { fileURLToPath, URL } from 'node:url'
2
+ import { defineConfig } from 'vite'
3
+ import vue from '@vitejs/plugin-vue'
4
+ import path from 'path';
5
+
6
+ // https://vitejs.dev/config/
7
+ export default defineConfig({
8
+ plugins: [vue()],
9
+ build: {
10
+ cssCodeSplit: true,
11
+ lib: {
12
+ // Could also be a dictionary or array of multiple entry points
13
+ entry: "src/index.js",
14
+ name: 'vueFoundatation',
15
+ formats: ["es", "cjs", "umd"],
16
+ fileName: format => `vue-foundation.${format}.js`
17
+ },
18
+ rollupOptions: {
19
+ // make sure to externalize deps that should not be bundled
20
+ // into your library
21
+ input: {
22
+ main: path.resolve(__dirname, "src/index.js")
23
+ },
24
+ external: ['axios', 'jquery', 'lodash', 'moment', 'vue-stash-nested', 'vue'],
25
+ output: {
26
+ assetFileNames: (assetInfo) => {
27
+ if (assetInfo.name === 'index.css') return 'vue-foundation.css';
28
+ return assetInfo.name;
29
+ },
30
+ exports: "named",
31
+ globals: {
32
+ vue: 'Vue',
33
+ },
34
+ },
35
+ },
36
+ },
37
+ resolve: {
38
+ alias: {
39
+ '@': fileURLToPath(new URL('./src', import.meta.url))
40
+ }
41
+ }
42
+ })
File without changes