@opengis/filter 0.0.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(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.FilterLib={},M.Vue))})(this,function(M,e){"use strict";const Ct={class:"flex items-center w-full rounded-lg group hover:bg-gray-100"},Vt={class:"flex items-center justify-between w-full text-sm"},Bt={class:"flex items-center cursor-pointer w-full"},Nt={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},_t=["value"],St={class:"w-[calc(100%-18px)] flex flex-row items-center justify-between pl-[10px] truncate"},Rt={class:"flex flex-row items-center font-normal text-gray-800 gap-x-1"},At={key:0,class:"text-xs text-gray-500 dark:text-neutral-500"},_e=e.defineComponent({__name:"list-item",props:{layout:{},count:{},type:{},label:{},value:{},isSelected:{type:Boolean},color:{}},emits:["itemClick"],setup(t,{emit:n}){const o=t,r=n;function l(){r("itemClick",o.value)}return(s,a)=>(e.openBlock(),e.createElementBlock("div",Ct,[e.createElementVNode("div",Vt,[e.createElementVNode("div",Bt,[e.createElementVNode("label",{for:"radio-9740",class:e.normalizeClass(["inline","popover"].includes(s.layout)?"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center":"flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer"),onClick:e.withModifiers(l,["stop","prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",[s.type==="checkbox"?"rounded-[4px]":"rounded-full",s.color?`bg-[${s.color}] border-[#ffffff]`:s.isSelected?"bg-[#2563eb] border-[#ffffff]":"bg-[#ffffff] border-[#d9d9d9]"]])},[s.isSelected?(e.openBlock(),e.createElementBlock("img",Nt)):e.createCommentVNode("",!0)],2),e.createElementVNode("input",{type:"checkbox",class:"hidden",id:"radio-9740",value:s.value},null,8,_t),e.createElementVNode("div",St,[e.createElementVNode("span",Rt,e.toDisplayString(s.label),1),s.count?(e.openBlock(),e.createElementBlock("div",At," ("+e.toDisplayString(s.count)+") ",1)):e.createCommentVNode("",!0)])],2)])])]))}});function Se(t,n){return function(){return t.apply(n,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:de}=Object,{iterator:v,toStringTag:Re}=Symbol,ee=(t=>n=>{const o=Tt.call(n);return t[o]||(t[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),O=t=>(t=t.toLowerCase(),n=>ee(n)===t),te=t=>n=>typeof n===t,{isArray:q}=Array,W=te("undefined");function Y(t){return t!==null&&!W(t)&&t.constructor!==null&&!W(t.constructor)&&R(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ae=O("ArrayBuffer");function Ot(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Ae(t.buffer),n}const Ft=te("string"),R=te("function"),Te=te("number"),Q=t=>t!==null&&typeof t=="object",$t=t=>t===!0||t===!1,ne=t=>{if(ee(t)!=="object")return!1;const n=de(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Re in t)&&!(v in t)},Dt=t=>{if(!Q(t)||Y(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Mt=O("Date"),Lt=O("File"),Pt=O("Blob"),jt=O("FileList"),Ut=t=>Q(t)&&R(t.pipe),It=t=>{let n;return t&&(typeof FormData=="function"&&t instanceof FormData||R(t.append)&&((n=ee(t))==="formdata"||n==="object"&&R(t.toString)&&t.toString()==="[object FormData]"))},zt=O("URLSearchParams"),[Ht,qt,Kt,Jt]=["ReadableStream","Request","Response","Headers"].map(O),Wt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(t,n,{allOwnKeys:o=!1}={}){if(t===null||typeof t>"u")return;let r,l;if(typeof t!="object"&&(t=[t]),q(t))for(r=0,l=t.length;r<l;r++)n.call(null,t[r],r,t);else{if(Y(t))return;const s=o?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let i;for(r=0;r<a;r++)i=s[r],n.call(null,t[i],i,t)}}function Oe(t,n){if(Y(t))return null;n=n.toLowerCase();const o=Object.keys(t);let r=o.length,l;for(;r-- >0;)if(l=o[r],n===l.toLowerCase())return l;return null}const U=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fe=t=>!W(t)&&t!==U;function ue(){const{caseless:t}=Fe(this)&&this||{},n={},o=(r,l)=>{const s=t&&Oe(n,l)||l;ne(n[s])&&ne(r)?n[s]=ue(n[s],r):ne(r)?n[s]=ue({},r):q(r)?n[s]=r.slice():n[s]=r};for(let r=0,l=arguments.length;r<l;r++)arguments[r]&&G(arguments[r],o);return n}const Yt=(t,n,o,{allOwnKeys:r}={})=>(G(n,(l,s)=>{o&&R(l)?t[s]=Se(l,o):t[s]=l},{allOwnKeys:r}),t),Qt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Gt=(t,n,o,r)=>{t.prototype=Object.create(n.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:n.prototype}),o&&Object.assign(t.prototype,o)},Xt=(t,n,o,r)=>{let l,s,a;const i={};if(n=n||{},t==null)return n;do{for(l=Object.getOwnPropertyNames(t),s=l.length;s-- >0;)a=l[s],(!r||r(a,t,n))&&!i[a]&&(n[a]=t[a],i[a]=!0);t=o!==!1&&de(t)}while(t&&(!o||o(t,n))&&t!==Object.prototype);return n},Zt=(t,n,o)=>{t=String(t),(o===void 0||o>t.length)&&(o=t.length),o-=n.length;const r=t.indexOf(n,o);return r!==-1&&r===o},vt=t=>{if(!t)return null;if(q(t))return t;let n=t.length;if(!Te(n))return null;const o=new Array(n);for(;n-- >0;)o[n]=t[n];return o},en=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&de(Uint8Array)),tn=(t,n)=>{const r=(t&&t[v]).call(t);let l;for(;(l=r.next())&&!l.done;){const s=l.value;n.call(t,s[0],s[1])}},nn=(t,n)=>{let o;const r=[];for(;(o=t.exec(n))!==null;)r.push(o);return r},rn=O("HTMLFormElement"),on=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,r,l){return r.toUpperCase()+l}),$e=(({hasOwnProperty:t})=>(n,o)=>t.call(n,o))(Object.prototype),ln=O("RegExp"),De=(t,n)=>{const o=Object.getOwnPropertyDescriptors(t),r={};G(o,(l,s)=>{let a;(a=n(l,s,t))!==!1&&(r[s]=a||l)}),Object.defineProperties(t,r)},sn=t=>{De(t,(n,o)=>{if(R(t)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const r=t[o];if(R(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},an=(t,n)=>{const o={},r=l=>{l.forEach(s=>{o[s]=!0})};return q(t)?r(t):r(String(t).split(n)),o},cn=()=>{},dn=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function un(t){return!!(t&&R(t.append)&&t[Re]==="FormData"&&t[v])}const fn=t=>{const n=new Array(10),o=(r,l)=>{if(Q(r)){if(n.indexOf(r)>=0)return;if(Y(r))return r;if(!("toJSON"in r)){n[l]=r;const s=q(r)?[]:{};return G(r,(a,i)=>{const m=o(a,l+1);!W(m)&&(s[i]=m)}),n[l]=void 0,s}}return r};return o(t,0)},pn=O("AsyncFunction"),mn=t=>t&&(Q(t)||R(t))&&R(t.then)&&R(t.catch),Me=((t,n)=>t?setImmediate:n?((o,r)=>(U.addEventListener("message",({source:l,data:s})=>{l===U&&s===o&&r.length&&r.shift()()},!1),l=>{r.push(l),U.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",R(U.postMessage)),hn=typeof queueMicrotask<"u"?queueMicrotask.bind(U):typeof process<"u"&&process.nextTick||Me,p={isArray:q,isArrayBuffer:Ae,isBuffer:Y,isFormData:It,isArrayBufferView:Ot,isString:Ft,isNumber:Te,isBoolean:$t,isObject:Q,isPlainObject:ne,isEmptyObject:Dt,isReadableStream:Ht,isRequest:qt,isResponse:Kt,isHeaders:Jt,isUndefined:W,isDate:Mt,isFile:Lt,isBlob:Pt,isRegExp:ln,isFunction:R,isStream:Ut,isURLSearchParams:zt,isTypedArray:en,isFileList:jt,forEach:G,merge:ue,extend:Yt,trim:Wt,stripBOM:Qt,inherits:Gt,toFlatObject:Xt,kindOf:ee,kindOfTest:O,endsWith:Zt,toArray:vt,forEachEntry:tn,matchAll:nn,isHTMLForm:rn,hasOwnProperty:$e,hasOwnProp:$e,reduceDescriptors:De,freezeMethods:sn,toObjectSet:an,toCamelCase:on,noop:cn,toFiniteNumber:dn,findKey:Oe,global:U,isContextDefined:Fe,isSpecCompliantForm:un,toJSONObject:fn,isAsyncFn:pn,isThenable:mn,setImmediate:Me,asap:hn,isIterable:t=>t!=null&&R(t[v])};function V(t,n,o,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",n&&(this.code=n),o&&(this.config=o),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}p.inherits(V,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.status}}});const Le=V.prototype,Pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Pe[t]={value:t}}),Object.defineProperties(V,Pe),Object.defineProperty(Le,"isAxiosError",{value:!0}),V.from=(t,n,o,r,l,s)=>{const a=Object.create(Le);return p.toFlatObject(t,a,function(m){return m!==Error.prototype},i=>i!=="isAxiosError"),V.call(a,t.message,n,o,r,l),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const yn=null;function fe(t){return p.isPlainObject(t)||p.isArray(t)}function je(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function Ue(t,n,o){return t?t.concat(n).map(function(l,s){return l=je(l),!o&&s?"["+l+"]":l}).join(o?".":""):n}function gn(t){return p.isArray(t)&&!t.some(fe)}const bn=p.toFlatObject(p,{},null,function(n){return/^is[A-Z]/.test(n)});function re(t,n,o){if(!p.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,o=p.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,E){return!p.isUndefined(E[g])});const r=o.metaTokens,l=o.visitor||d,s=o.dots,a=o.indexes,m=(o.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(n);if(!p.isFunction(l))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(p.isDate(w))return w.toISOString();if(p.isBoolean(w))return w.toString();if(!m&&p.isBlob(w))throw new V("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(w)||p.isTypedArray(w)?m&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function d(w,g,E){let b=w;if(w&&!E&&typeof w=="object"){if(p.endsWith(g,"{}"))g=r?g:g.slice(0,-2),w=JSON.stringify(w);else if(p.isArray(w)&&gn(w)||(p.isFileList(w)||p.endsWith(g,"[]"))&&(b=p.toArray(w)))return g=je(g),b.forEach(function(h,x){!(p.isUndefined(h)||h===null)&&n.append(a===!0?Ue([g],x,s):a===null?g:g+"[]",f(h))}),!1}return fe(w)?!0:(n.append(Ue(E,g,s),f(w)),!1)}const u=[],y=Object.assign(bn,{defaultVisitor:d,convertValue:f,isVisitable:fe});function k(w,g){if(!p.isUndefined(w)){if(u.indexOf(w)!==-1)throw Error("Circular reference detected in "+g.join("."));u.push(w),p.forEach(w,function(b,c){(!(p.isUndefined(b)||b===null)&&l.call(n,b,p.isString(c)?c.trim():c,g,y))===!0&&k(b,g?g.concat(c):[c])}),u.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return k(t),n}function Ie(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return n[r]})}function pe(t,n){this._pairs=[],t&&re(t,this,n)}const ze=pe.prototype;ze.append=function(n,o){this._pairs.push([n,o])},ze.toString=function(n){const o=n?function(r){return n.call(this,r,Ie)}:Ie;return this._pairs.map(function(l){return o(l[0])+"="+o(l[1])},"").join("&")};function wn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function He(t,n,o){if(!n)return t;const r=o&&o.encode||wn;p.isFunction(o)&&(o={serialize:o});const l=o&&o.serialize;let s;if(l?s=l(n,o):s=p.isURLSearchParams(n)?n.toString():new pe(n,o).toString(r),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class qe{constructor(){this.handlers=[]}use(n,o,r){return this.handlers.push({fulfilled:n,rejected:o,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){p.forEach(this.handlers,function(r){r!==null&&n(r)})}}const Ke={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},me=typeof window<"u"&&typeof document<"u",he=typeof navigator=="object"&&navigator||void 0,kn=me&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),En=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Cn=me&&window.location.href||"http://localhost",S={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:me,hasStandardBrowserEnv:kn,hasStandardBrowserWebWorkerEnv:En,navigator:he,origin:Cn},Symbol.toStringTag,{value:"Module"})),...xn};function Vn(t,n){return re(t,new S.classes.URLSearchParams,{visitor:function(o,r,l,s){return S.isNode&&p.isBuffer(o)?(this.append(r,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...n})}function Bn(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Nn(t){const n={},o=Object.keys(t);let r;const l=o.length;let s;for(r=0;r<l;r++)s=o[r],n[s]=t[s];return n}function Je(t){function n(o,r,l,s){let a=o[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),m=s>=o.length;return a=!a&&p.isArray(l)?l.length:a,m?(p.hasOwnProp(l,a)?l[a]=[l[a],r]:l[a]=r,!i):((!l[a]||!p.isObject(l[a]))&&(l[a]=[]),n(o,r,l[a],s)&&p.isArray(l[a])&&(l[a]=Nn(l[a])),!i)}if(p.isFormData(t)&&p.isFunction(t.entries)){const o={};return p.forEachEntry(t,(r,l)=>{n(Bn(r),l,o,0)}),o}return null}function _n(t,n,o){if(p.isString(t))try{return(n||JSON.parse)(t),p.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(o||JSON.stringify)(t)}const X={transitional:Ke,adapter:["xhr","http","fetch"],transformRequest:[function(n,o){const r=o.getContentType()||"",l=r.indexOf("application/json")>-1,s=p.isObject(n);if(s&&p.isHTMLForm(n)&&(n=new FormData(n)),p.isFormData(n))return l?JSON.stringify(Je(n)):n;if(p.isArrayBuffer(n)||p.isBuffer(n)||p.isStream(n)||p.isFile(n)||p.isBlob(n)||p.isReadableStream(n))return n;if(p.isArrayBufferView(n))return n.buffer;if(p.isURLSearchParams(n))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vn(n,this.formSerializer).toString();if((i=p.isFileList(n))||r.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return re(i?{"files[]":n}:n,m&&new m,this.formSerializer)}}return s||l?(o.setContentType("application/json",!1),_n(n)):n}],transformResponse:[function(n){const o=this.transitional||X.transitional,r=o&&o.forcedJSONParsing,l=this.responseType==="json";if(p.isResponse(n)||p.isReadableStream(n))return n;if(n&&p.isString(n)&&(r&&!this.responseType||l)){const a=!(o&&o.silentJSONParsing)&&l;try{return JSON.parse(n)}catch(i){if(a)throw i.name==="SyntaxError"?V.from(i,V.ERR_BAD_RESPONSE,this,null,this.response):i}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{X.headers[t]={}});const Sn=p.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rn=t=>{const n={};let o,r,l;return t&&t.split(`
2
+ `).forEach(function(a){l=a.indexOf(":"),o=a.substring(0,l).trim().toLowerCase(),r=a.substring(l+1).trim(),!(!o||n[o]&&Sn[o])&&(o==="set-cookie"?n[o]?n[o].push(r):n[o]=[r]:n[o]=n[o]?n[o]+", "+r:r)}),n},We=Symbol("internals");function Z(t){return t&&String(t).trim().toLowerCase()}function oe(t){return t===!1||t==null?t:p.isArray(t)?t.map(oe):String(t)}function An(t){const n=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=o.exec(t);)n[r[1]]=r[2];return n}const Tn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ye(t,n,o,r,l){if(p.isFunction(r))return r.call(this,n,o);if(l&&(n=o),!!p.isString(n)){if(p.isString(r))return n.indexOf(r)!==-1;if(p.isRegExp(r))return r.test(n)}}function On(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,o,r)=>o.toUpperCase()+r)}function Fn(t,n){const o=p.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+o,{value:function(l,s,a){return this[r].call(this,n,l,s,a)},configurable:!0})})}let A=class{constructor(n){n&&this.set(n)}set(n,o,r){const l=this;function s(i,m,f){const d=Z(m);if(!d)throw new Error("header name must be a non-empty string");const u=p.findKey(l,d);(!u||l[u]===void 0||f===!0||f===void 0&&l[u]!==!1)&&(l[u||m]=oe(i))}const a=(i,m)=>p.forEach(i,(f,d)=>s(f,d,m));if(p.isPlainObject(n)||n instanceof this.constructor)a(n,o);else if(p.isString(n)&&(n=n.trim())&&!Tn(n))a(Rn(n),o);else if(p.isObject(n)&&p.isIterable(n)){let i={},m,f;for(const d of n){if(!p.isArray(d))throw TypeError("Object iterator must return a key-value pair");i[f=d[0]]=(m=i[f])?p.isArray(m)?[...m,d[1]]:[m,d[1]]:d[1]}a(i,o)}else n!=null&&s(o,n,r);return this}get(n,o){if(n=Z(n),n){const r=p.findKey(this,n);if(r){const l=this[r];if(!o)return l;if(o===!0)return An(l);if(p.isFunction(o))return o.call(this,l,r);if(p.isRegExp(o))return o.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,o){if(n=Z(n),n){const r=p.findKey(this,n);return!!(r&&this[r]!==void 0&&(!o||ye(this,this[r],r,o)))}return!1}delete(n,o){const r=this;let l=!1;function s(a){if(a=Z(a),a){const i=p.findKey(r,a);i&&(!o||ye(r,r[i],i,o))&&(delete r[i],l=!0)}}return p.isArray(n)?n.forEach(s):s(n),l}clear(n){const o=Object.keys(this);let r=o.length,l=!1;for(;r--;){const s=o[r];(!n||ye(this,this[s],s,n,!0))&&(delete this[s],l=!0)}return l}normalize(n){const o=this,r={};return p.forEach(this,(l,s)=>{const a=p.findKey(r,s);if(a){o[a]=oe(l),delete o[s];return}const i=n?On(s):String(s).trim();i!==s&&delete o[s],o[i]=oe(l),r[i]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const o=Object.create(null);return p.forEach(this,(r,l)=>{r!=null&&r!==!1&&(o[l]=n&&p.isArray(r)?r.join(", "):r)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,o])=>n+": "+o).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...o){const r=new this(n);return o.forEach(l=>r.set(l)),r}static accessor(n){const r=(this[We]=this[We]={accessors:{}}).accessors,l=this.prototype;function s(a){const i=Z(a);r[i]||(Fn(l,a),r[i]=!0)}return p.isArray(n)?n.forEach(s):s(n),this}};A.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(A.prototype,({value:t},n)=>{let o=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[o]=r}}}),p.freezeMethods(A);function ge(t,n){const o=this||X,r=n||o,l=A.from(r.headers);let s=r.data;return p.forEach(t,function(i){s=i.call(o,s,l.normalize(),n?n.status:void 0)}),l.normalize(),s}function Ye(t){return!!(t&&t.__CANCEL__)}function K(t,n,o){V.call(this,t??"canceled",V.ERR_CANCELED,n,o),this.name="CanceledError"}p.inherits(K,V,{__CANCEL__:!0});function Qe(t,n,o){const r=o.config.validateStatus;!o.status||!r||r(o.status)?t(o):n(new V("Request failed with status code "+o.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function $n(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function Dn(t,n){t=t||10;const o=new Array(t),r=new Array(t);let l=0,s=0,a;return n=n!==void 0?n:1e3,function(m){const f=Date.now(),d=r[s];a||(a=f),o[l]=m,r[l]=f;let u=s,y=0;for(;u!==l;)y+=o[u++],u=u%t;if(l=(l+1)%t,l===s&&(s=(s+1)%t),f-a<n)return;const k=d&&f-d;return k?Math.round(y*1e3/k):void 0}}function Mn(t,n){let o=0,r=1e3/n,l,s;const a=(f,d=Date.now())=>{o=d,l=null,s&&(clearTimeout(s),s=null),t(...f)};return[(...f)=>{const d=Date.now(),u=d-o;u>=r?a(f,d):(l=f,s||(s=setTimeout(()=>{s=null,a(l)},r-u)))},()=>l&&a(l)]}const le=(t,n,o=3)=>{let r=0;const l=Dn(50,250);return Mn(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,m=a-r,f=l(m),d=a<=i;r=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:m,rate:f||void 0,estimated:f&&i&&d?(i-a)/f:void 0,event:s,lengthComputable:i!=null,[n?"download":"upload"]:!0};t(u)},o)},Ge=(t,n)=>{const o=t!=null;return[r=>n[0]({lengthComputable:o,total:t,loaded:r}),n[1]]},Xe=t=>(...n)=>p.asap(()=>t(...n)),Ln=S.hasStandardBrowserEnv?((t,n)=>o=>(o=new URL(o,S.origin),t.protocol===o.protocol&&t.host===o.host&&(n||t.port===o.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,Pn=S.hasStandardBrowserEnv?{write(t,n,o,r,l,s){const a=[t+"="+encodeURIComponent(n)];p.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),p.isString(r)&&a.push("path="+r),p.isString(l)&&a.push("domain="+l),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Un(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function Ze(t,n,o){let r=!jn(n);return t&&(r||o==!1)?Un(t,n):n}const ve=t=>t instanceof A?{...t}:t;function I(t,n){n=n||{};const o={};function r(f,d,u,y){return p.isPlainObject(f)&&p.isPlainObject(d)?p.merge.call({caseless:y},f,d):p.isPlainObject(d)?p.merge({},d):p.isArray(d)?d.slice():d}function l(f,d,u,y){if(p.isUndefined(d)){if(!p.isUndefined(f))return r(void 0,f,u,y)}else return r(f,d,u,y)}function s(f,d){if(!p.isUndefined(d))return r(void 0,d)}function a(f,d){if(p.isUndefined(d)){if(!p.isUndefined(f))return r(void 0,f)}else return r(void 0,d)}function i(f,d,u){if(u in n)return r(f,d);if(u in t)return r(void 0,f)}const m={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(f,d,u)=>l(ve(f),ve(d),u,!0)};return p.forEach(Object.keys({...t,...n}),function(d){const u=m[d]||l,y=u(t[d],n[d],d);p.isUndefined(y)&&u!==i||(o[d]=y)}),o}const et=t=>{const n=I({},t);let{data:o,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:s,headers:a,auth:i}=n;n.headers=a=A.from(a),n.url=He(Ze(n.baseURL,n.url,n.allowAbsoluteUrls),t.params,t.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let m;if(p.isFormData(o)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((m=a.getContentType())!==!1){const[f,...d]=m?m.split(";").map(u=>u.trim()).filter(Boolean):[];a.setContentType([f||"multipart/form-data",...d].join("; "))}}if(S.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(n)),r||r!==!1&&Ln(n.url))){const f=l&&s&&Pn.read(s);f&&a.set(l,f)}return n},In=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(o,r){const l=et(t);let s=l.data;const a=A.from(l.headers).normalize();let{responseType:i,onUploadProgress:m,onDownloadProgress:f}=l,d,u,y,k,w;function g(){k&&k(),w&&w(),l.cancelToken&&l.cancelToken.unsubscribe(d),l.signal&&l.signal.removeEventListener("abort",d)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function b(){if(!E)return;const h=A.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),C={data:!i||i==="text"||i==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:h,config:t,request:E};Qe(function(L){o(L),g()},function(L){r(L),g()},C),E=null}"onloadend"in E?E.onloadend=b:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(b)},E.onabort=function(){E&&(r(new V("Request aborted",V.ECONNABORTED,t,E)),E=null)},E.onerror=function(){r(new V("Network Error",V.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let x=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const C=l.transitional||Ke;l.timeoutErrorMessage&&(x=l.timeoutErrorMessage),r(new V(x,C.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,t,E)),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&p.forEach(a.toJSON(),function(x,C){E.setRequestHeader(C,x)}),p.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),i&&i!=="json"&&(E.responseType=l.responseType),f&&([y,w]=le(f,!0),E.addEventListener("progress",y)),m&&E.upload&&([u,k]=le(m),E.upload.addEventListener("progress",u),E.upload.addEventListener("loadend",k)),(l.cancelToken||l.signal)&&(d=h=>{E&&(r(!h||h.type?new K(null,t,E):h),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe(d),l.signal&&(l.signal.aborted?d():l.signal.addEventListener("abort",d)));const c=$n(l.url);if(c&&S.protocols.indexOf(c)===-1){r(new V("Unsupported protocol "+c+":",V.ERR_BAD_REQUEST,t));return}E.send(s||null)})},zn=(t,n)=>{const{length:o}=t=t?t.filter(Boolean):[];if(n||o){let r=new AbortController,l;const s=function(f){if(!l){l=!0,i();const d=f instanceof Error?f:this.reason;r.abort(d instanceof V?d:new K(d instanceof Error?d.message:d))}};let a=n&&setTimeout(()=>{a=null,s(new V(`timeout ${n} of ms exceeded`,V.ETIMEDOUT))},n);const i=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(s):f.removeEventListener("abort",s)}),t=null)};t.forEach(f=>f.addEventListener("abort",s));const{signal:m}=r;return m.unsubscribe=()=>p.asap(i),m}},Hn=function*(t,n){let o=t.byteLength;if(o<n){yield t;return}let r=0,l;for(;r<o;)l=r+n,yield t.slice(r,l),r=l},qn=async function*(t,n){for await(const o of Kn(t))yield*Hn(o,n)},Kn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:o,value:r}=await n.read();if(o)break;yield r}}finally{await n.cancel()}},tt=(t,n,o,r)=>{const l=qn(t,n);let s=0,a,i=m=>{a||(a=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:f,value:d}=await l.next();if(f){i(),m.close();return}let u=d.byteLength;if(o){let y=s+=u;o(y)}m.enqueue(new Uint8Array(d))}catch(f){throw i(f),f}},cancel(m){return i(m),l.return()}},{highWaterMark:2})},se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nt=se&&typeof ReadableStream=="function",Jn=se&&(typeof TextEncoder=="function"?(t=>n=>t.encode(n))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),rt=(t,...n)=>{try{return!!t(...n)}catch{return!1}},Wn=nt&&rt(()=>{let t=!1;const n=new Request(S.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!n}),ot=64*1024,be=nt&&rt(()=>p.isReadableStream(new Response("").body)),ae={stream:be&&(t=>t.body)};se&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!ae[n]&&(ae[n]=p.isFunction(t[n])?o=>o[n]():(o,r)=>{throw new V(`Response type '${n}' is not supported`,V.ERR_NOT_SUPPORT,r)})})})(new Response);const Yn=async t=>{if(t==null)return 0;if(p.isBlob(t))return t.size;if(p.isSpecCompliantForm(t))return(await new Request(S.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(p.isArrayBufferView(t)||p.isArrayBuffer(t))return t.byteLength;if(p.isURLSearchParams(t)&&(t=t+""),p.isString(t))return(await Jn(t)).byteLength},Qn=async(t,n)=>{const o=p.toFiniteNumber(t.getContentLength());return o??Yn(n)},we={http:yn,xhr:In,fetch:se&&(async t=>{let{url:n,method:o,data:r,signal:l,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:m,responseType:f,headers:d,withCredentials:u="same-origin",fetchOptions:y}=et(t);f=f?(f+"").toLowerCase():"text";let k=zn([l,s&&s.toAbortSignal()],a),w;const g=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let E;try{if(m&&Wn&&o!=="get"&&o!=="head"&&(E=await Qn(d,r))!==0){let C=new Request(n,{method:"POST",body:r,duplex:"half"}),T;if(p.isFormData(r)&&(T=C.headers.get("content-type"))&&d.setContentType(T),C.body){const[L,J]=Ge(E,le(Xe(m)));r=tt(C.body,ot,L,J)}}p.isString(u)||(u=u?"include":"omit");const b="credentials"in Request.prototype;w=new Request(n,{...y,signal:k,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?u:void 0});let c=await fetch(w,y);const h=be&&(f==="stream"||f==="response");if(be&&(i||h&&g)){const C={};["status","statusText","headers"].forEach(B=>{C[B]=c[B]});const T=p.toFiniteNumber(c.headers.get("content-length")),[L,J]=i&&Ge(T,le(Xe(i),!0))||[];c=new Response(tt(c.body,ot,L,()=>{J&&J(),g&&g()}),C)}f=f||"text";let x=await ae[p.findKey(ae,f)||"text"](c,t);return!h&&g&&g(),await new Promise((C,T)=>{Qe(C,T,{data:x,headers:A.from(c.headers),status:c.status,statusText:c.statusText,config:t,request:w})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new V("Network Error",V.ERR_NETWORK,t,w),{cause:b.cause||b}):V.from(b,b&&b.code,t,w)}})};p.forEach(we,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const lt=t=>`- ${t}`,Gn=t=>p.isFunction(t)||t===null||t===!1,st={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:n}=t;let o,r;const l={};for(let s=0;s<n;s++){o=t[s];let a;if(r=o,!Gn(o)&&(r=we[(a=String(o)).toLowerCase()],r===void 0))throw new V(`Unknown adapter '${a}'`);if(r)break;l[a||"#"+s]=r}if(!r){const s=Object.entries(l).map(([i,m])=>`adapter ${i} `+(m===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
4
+ `+s.map(lt).join(`
5
+ `):" "+lt(s[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:we};function xe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new K(null,t)}function at(t){return xe(t),t.headers=A.from(t.headers),t.data=ge.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),st.getAdapter(t.adapter||X.adapter)(t).then(function(r){return xe(t),r.data=ge.call(t,t.transformResponse,r),r.headers=A.from(r.headers),r},function(r){return Ye(r)||(xe(t),r&&r.response&&(r.response.data=ge.call(t,t.transformResponse,r.response),r.response.headers=A.from(r.response.headers))),Promise.reject(r)})}const it="1.11.0",ie={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{ie[t]=function(r){return typeof r===t||"a"+(n<1?"n ":" ")+t}});const ct={};ie.transitional=function(n,o,r){function l(s,a){return"[Axios v"+it+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(n===!1)throw new V(l(a," has been removed"+(o?" in "+o:"")),V.ERR_DEPRECATED);return o&&!ct[a]&&(ct[a]=!0,console.warn(l(a," has been deprecated since v"+o+" and will be removed in the near future"))),n?n(s,a,i):!0}},ie.spelling=function(n){return(o,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function Xn(t,n,o){if(typeof t!="object")throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let l=r.length;for(;l-- >0;){const s=r[l],a=n[s];if(a){const i=t[s],m=i===void 0||a(i,s,t);if(m!==!0)throw new V("option "+s+" must be "+m,V.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new V("Unknown option "+s,V.ERR_BAD_OPTION)}}const ce={assertOptions:Xn,validators:ie},F=ce.validators;let z=class{constructor(n){this.defaults=n||{},this.interceptors={request:new qe,response:new qe}}async request(n,o){try{return await this._request(n,o)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const s=l.stack?l.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+s):r.stack=s}catch{}}throw r}}_request(n,o){typeof n=="string"?(o=o||{},o.url=n):o=n||{},o=I(this.defaults,o);const{transitional:r,paramsSerializer:l,headers:s}=o;r!==void 0&&ce.assertOptions(r,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),l!=null&&(p.isFunction(l)?o.paramsSerializer={serialize:l}:ce.assertOptions(l,{encode:F.function,serialize:F.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),ce.assertOptions(o,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[o.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),o.headers=A.concat(a,s);const i=[];let m=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(o)===!1||(m=m&&g.synchronous,i.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let d,u=0,y;if(!m){const w=[at.bind(this),void 0];for(w.unshift(...i),w.push(...f),y=w.length,d=Promise.resolve(o);u<y;)d=d.then(w[u++],w[u++]);return d}y=i.length;let k=o;for(u=0;u<y;){const w=i[u++],g=i[u++];try{k=w(k)}catch(E){g.call(this,E);break}}try{d=at.call(this,k)}catch(w){return Promise.reject(w)}for(u=0,y=f.length;u<y;)d=d.then(f[u++],f[u++]);return d}getUri(n){n=I(this.defaults,n);const o=Ze(n.baseURL,n.url,n.allowAbsoluteUrls);return He(o,n.params,n.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(n){z.prototype[n]=function(o,r){return this.request(I(r||{},{method:n,url:o,data:(r||{}).data}))}}),p.forEach(["post","put","patch"],function(n){function o(r){return function(s,a,i){return this.request(I(i||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}z.prototype[n]=o(),z.prototype[n+"Form"]=o(!0)});let Zn=class Et{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const r=this;this.promise.then(l=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](l);r._listeners=null}),this.promise.then=l=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(l);return a.cancel=function(){r.unsubscribe(s)},a},n(function(s,a,i){r.reason||(r.reason=new K(s,a,i),o(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const o=this._listeners.indexOf(n);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const n=new AbortController,o=r=>{n.abort(r)};return this.subscribe(o),n.signal.unsubscribe=()=>this.unsubscribe(o),n.signal}static source(){let n;return{token:new Et(function(l){n=l}),cancel:n}}};function vn(t){return function(o){return t.apply(null,o)}}function er(t){return p.isObject(t)&&t.isAxiosError===!0}const ke={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ke).forEach(([t,n])=>{ke[n]=t});function dt(t){const n=new z(t),o=Se(z.prototype.request,n);return p.extend(o,z.prototype,n,{allOwnKeys:!0}),p.extend(o,n,null,{allOwnKeys:!0}),o.create=function(l){return dt(I(t,l))},o}const N=dt(X);N.Axios=z,N.CanceledError=K,N.CancelToken=Zn,N.isCancel=Ye,N.VERSION=it,N.toFormData=re,N.AxiosError=V,N.Cancel=N.CanceledError,N.all=function(n){return Promise.all(n)},N.spread=vn,N.isAxiosError=er,N.mergeConfig=I,N.AxiosHeaders=A,N.formToJSON=t=>Je(p.isHTMLForm(t)?new FormData(t):t),N.getAdapter=st.getAdapter,N.HttpStatusCode=ke,N.default=N;const{Axios:bl,AxiosError:wl,CanceledError:xl,isCancel:kl,CancelToken:El,VERSION:Cl,all:Vl,Cancel:Bl,isAxiosError:Nl,spread:_l,toFormData:Sl,AxiosHeaders:Rl,HttpStatusCode:Al,formToJSON:Tl,getAdapter:Ol,mergeConfig:Fl}=N;function ut(t,n){const{api:o,options:r=[],limit:l=20,dataKey:s="data"}=t,a=t.type==="checkbox";function i(B){return a?Array.isArray(B)?B:B?[B]:[]:B??""}const m=e.ref(i(t.modelValue)),f=e.ref(""),d=e.ref(!1),u=e.ref([]),y=e.ref("id"),k=e.ref("text"),w=e.ref(!1),g=e.ref(t.layout!=="popover"&&r.length>l);function E(B){const D=B.find(Boolean)??{},j=["id","value","code","key"].find(Ne=>Ne in D)??"id",dl=["text","label","name","title"].find(Ne=>Ne in D)??"text";return{autoValueKey:j,autoLabelKey:dl}}if(r.length>0){const B=E(r);y.value=B.autoValueKey,k.value=B.autoLabelKey}const b=e.computed(()=>{if(o)return u.value;const B=u.value;if(t.layout==="popover")return B;if(!f.value)return w.value?B:B.slice(0,l);const D=f.value.toLowerCase();return B.filter(j=>j[k.value].toLowerCase().includes(D))});let c=null;async function h(B){if(o){d.value=!0;try{const D=await N.get(o,{params:{json:1,key:B,limit:l}});if(u.value=D.data[s],u.value.length>0){const j=E(u.value);y.value=j.autoValueKey,k.value=j.autoLabelKey}}catch(D){console.error("Failed to fetch remote options:",D)}finally{d.value=!1}}}e.watch(f,B=>{o&&(c&&clearTimeout(c),c=setTimeout(()=>{h(B)},200))}),e.watch(()=>t.modelValue,B=>{m.value=i(B)},{immediate:!0}),o?h(""):u.value=r;function x(B){return a&&Array.isArray(m.value)?m.value.includes(B[y.value]):m.value===B[y.value]}function C(B){if(a&&!Array.isArray(m.value)&&(m.value=[]),a&&Array.isArray(m.value)){const D=m.value.includes(B[y.value]);m.value=D?m.value.filter(j=>j!==B[y.value]):[...m.value,B[y.value]]}else m.value=B[y.value];n("update:modelValue",m.value),n("change",{name:t.name,value:m.value})}function T(){a?m.value=[]:m.value="",n("update:modelValue",m.value),n("clear",t.name)}function L(){c&&clearTimeout(c),f.value="",w.value=!1}function J(){w.value=!w.value}return e.onBeforeUnmount(()=>{c&&clearTimeout(c)}),{innerValue:m,searchTerm:f,filteredOptions:b,isSelected:x,selectItem:C,clear:T,resetSearch:L,toggleShowAll:J,isReqProc:d,showAll:w,isEnableShowAll:g,labelKey:k,valueKey:y}}const $=(t,n)=>{const o=t.__vccOpts||t;for(const[r,l]of n)o[r]=l;return o},tr={},nr={class:"w-48 mx-auto",viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rr(t,n){return e.openBlock(),e.createElementBlock("svg",nr,n[0]||(n[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)]))}const ft=$(tr,[["render",rr]]),or={},lr={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"};function sr(t,n){return e.openBlock(),e.createElementBlock("svg",lr,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Ee=$(or,[["render",sr]]),ar={},ir={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"};function cr(t,n){return e.openBlock(),e.createElementBlock("svg",ir,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const pt=$(ar,[["render",cr]]),dr={key:0,class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},ur={key:1,class:"w-full"},fr={class:"flex flex-col items-center justify-center p-5 text-center"},pr={key:2,class:"flex justify-between items-center text-xs text-gray-500 pt-2 border-t"},mr=["disabled"],mt=e.defineComponent({__name:"radio",props:{name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=e.ref(null),s=o,{innerValue:a,searchTerm:i,filteredOptions:m,isSelected:f,selectItem:d,clear:u,resetSearch:y,toggleShowAll:k,isReqProc:w,showAll:g,isEnableShowAll:E,labelKey:b,valueKey:c}=ut({...r,modelValue:r.modelValue??r.default??""},s);return e.onMounted(()=>{y()}),n({clear:u,inputTextRef:l}),e.watch(()=>r.modelValue,h=>{h===void 0&&(a.value=void 0)}),(h,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(h.layout==="popover"?"p-4 flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5")},[h.type==="select"?(e.openBlock(),e.createElementBlock("div",dr,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":x[0]||(x[0]=C=>e.isRef(i)?i.value=C:null),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",type:"text",ref_key:"inputTextRef",ref:l},null,512),[[e.vModelText,e.unref(i)]]),x[6]||(x[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-search absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"},[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:x[1]||(x[1]=C=>i.value=""),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2",height:"16",width:"16"},x[5]||(x[5]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(h.layout==="popover"?"flex-1 overflow-y-auto mb-4 max-h-64":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),C=>(e.openBlock(),e.createBlock(_e,{layout:h.layout,key:C.id,count:C.count,label:C[e.unref(b)],color:C.color,type:"radio",value:C[e.unref(c)],"is-selected":e.unref(f)(C),onItemClick:T=>e.unref(d)(C)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),128))],2),h.type==="select"&&e.unref(m).length===0&&!e.unref(w)?(e.openBlock(),e.createElementBlock("div",ur,[e.createElementVNode("div",fr,[e.createVNode(ft),x[7]||(x[7]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),h.layout==="popover"?(e.openBlock(),e.createElementBlock("div",pr,[e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",disabled:e.unref(a).length===0,onClick:x[2]||(x[2]=(...C)=>e.unref(u)&&e.unref(u)(...C))}," Clear ",8,mr)])):e.createCommentVNode("",!0)],2),h.layout!=="popover"&&h.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[!e.unref(g)&&e.unref(E)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x[3]||(x[3]=(...C)=>e.unref(k)&&e.unref(k)(...C)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[x[8]||(x[8]=e.createTextVNode(" Показати більше ")),e.createVNode(Ee)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:x[4]||(x[4]=(...C)=>e.unref(k)&&e.unref(k)(...C)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[x[9]||(x[9]=e.createTextVNode(" Показати менше ")),e.createVNode(pt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))}}),hr={key:0,class:"h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relative justify-center"},yr={key:1,class:"w-full"},gr={class:"flex flex-col items-center justify-center p-5 text-center"},br={key:2,class:"flex justify-between items-center text-xs text-gray-500 pt-2 border-t"},wr=["disabled"],Ce=e.defineComponent({__name:"checkbox",props:{name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,{innerValue:s,filteredOptions:a,isSelected:i,selectItem:m,clear:f,resetSearch:d,toggleShowAll:u,isReqProc:y,showAll:k,isEnableShowAll:w,searchTerm:g,labelKey:E,valueKey:b}=ut({...r,type:"checkbox",modelValue:r.modelValue},l);return e.onMounted(()=>{d()}),e.watch(()=>r.modelValue,c=>{c===void 0&&(s.value=[])}),n({clear:f}),(c,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(c.layout==="popover"?"p-4 flex flex-col h-full":"flex flex-col vs-filter-checkbox space-y-0.5")},[c.type==="select"?(e.openBlock(),e.createElementBlock("div",hr,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[0]||(h[0]=x=>e.isRef(g)?g.value=x:null),class:"w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",type:"text",ref:"inputTextRef"},null,512),[[e.vModelText,e.unref(g)]]),h[6]||(h[6]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-search absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"},[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:h[1]||(h[1]=x=>g.value=""),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2",height:"16",width:"16"},h[5]||(h[5]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(c.layout==="popover"?"flex-1 overflow-y-auto mb-4 max-h-64":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),x=>(e.openBlock(),e.createBlock(_e,{layout:c.layout,count:x.count,label:x[e.unref(E)],color:x.color,type:"checkbox",value:x[e.unref(b)],"is-selected":e.unref(i)(x),onItemClick:C=>e.unref(m)(x)},null,8,["layout","count","label","color","value","is-selected","onItemClick"]))),256))],2),c.type==="select"&&e.unref(a).length===0&&!e.unref(y)?(e.openBlock(),e.createElementBlock("div",yr,[e.createElementVNode("div",gr,[e.createVNode(ft),h[7]||(h[7]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"За вашим запитом нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])):e.createCommentVNode("",!0),c.layout==="popover"?(e.openBlock(),e.createElementBlock("div",br,[e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",disabled:e.unref(s)===0,onClick:h[2]||(h[2]=(...x)=>e.unref(f)&&e.unref(f)(...x))}," Clear ",8,wr)])):e.createCommentVNode("",!0)],2),c.layout!=="popover"&&c.type!=="select"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[!e.unref(k)&&e.unref(w)?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:h[3]||(h[3]=(...x)=>e.unref(u)&&e.unref(u)(...x)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[h[8]||(h[8]=e.createTextVNode(" Показати більше ")),e.createVNode(Ee)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:h[4]||(h[4]=(...x)=>e.unref(u)&&e.unref(u)(...x)),class:"inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"},[h[9]||(h[9]=e.createTextVNode(" Показати менше ")),e.createVNode(pt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))}}),xr={},kr={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"};function Er(t,n){return e.openBlock(),e.createElementBlock("svg",kr,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const Cr=$(xr,[["render",Er]]),Vr={},Br={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x stroke-gray-500 hover:stroke-red-500 transition-all",width:"15px",height:"15px"};function Nr(t,n){return e.openBlock(),e.createElementBlock("svg",Br,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const _r=$(Vr,[["render",Nr]]);class ht{static getWidthClass(n){return typeof n=="number"?`w-[${n}px]`:typeof n=="string"?n.endsWith("%")||n.endsWith("px")?`w-[${n}]`:`w-${n}`:"w-full"}}const Sr={class:"absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"},Rr=["placeholder"],Ar=e.defineComponent({__name:"text-input",props:{name:{},type:{},label:{},width:{default:220},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{emit:n}){const o=t,r=e.ref((o.placeHolder||o.label).toString()),l=n,s=e.ref(o.modelValue??"");e.watch(()=>o.modelValue,m=>{m!==s.value&&(s.value=m??"")});function a(){l("update:modelValue",s.value),l("change",{name:o.name,value:s.value})}function i(){s.value="",l("update:modelValue",""),l("clear",o.name)}return(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-form-text relative bg-white rounded-lg [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",m.layout==="inline"?e.unref(ht).getWidthClass(m.width):"w-full mb-2"])},[e.createElementVNode("div",Sr,[e.createVNode(Cr)]),s.value!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i,class:"absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"},[e.createVNode(_r)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":f[0]||(f[0]=d=>s.value=d),onInput:a,placeholder:r.value,class:"!pr-7 !pl-8 bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,40,Rr),[[e.vModelText,s.value]])],2))}}),Tr={key:0,class:"p-1"},Or={class:"flex justify-between gap-4"},Fr={for:"FilterFrom",class:"flex items-center w-full"},$r=["placeholder","disabled"],Dr={for:"FilterTo",class:"flex items-center w-full"},Mr=["placeholder","disabled"],Lr={key:1,class:"p-1"},Pr={key:2,class:"flex justify-between items-center text-xs text-gray-500 pt-2 border-t"},jr=["disabled"],Ur=e.defineComponent({__name:"range-input",props:{name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=e.ref(r.modelValue??r.default??["",""]),s=o,a=e.computed({get:()=>r.modelValue??l.value,set:f=>{r.modelValue!==void 0?s("update:modelValue",f):l.value=f}});function i(){a.value=l.value,s("change",{name:r.name,value:l.value})}function m(){l.value=["",""],a.value=l.value,s("clear",r.name)}return e.watch(()=>r.modelValue,f=>{f!==void 0?(l.value=f,s("update:modelValue",f)):l.value=[]}),n({clear:m,currentValue:a}),(f,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.layout==="popover"?(e.openBlock(),e.createElementBlock("div",Tr)):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",Or,[e.createElementVNode("label",Fr,[e.withDirectives(e.createElementVNode("input",{id:"FilterFrom",type:"number",class:"vs-filter-range py-2 px-3 block w-full border h-[38px] border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-blue-600 focus:border-2 focus:ring-blue-500",placeholder:f.placeHolder?.[0]??"min",step:"1",style:{outline:"none"},"onUpdate:modelValue":d[0]||(d[0]=u=>l.value[0]=u),onInput:d[1]||(d[1]=u=>i()),disabled:f.disabled},null,40,$r),[[e.vModelText,l.value[0]]])]),e.createElementVNode("label",Dr,[e.withDirectives(e.createElementVNode("input",{id:"FilterTo",type:"number",class:"vs-filter-range py-2 px-3 block w-full border h-[38px] border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-500 focus:z-10 focus:border-blue-600 focus:border-2 focus:ring-blue-500",placeholder:f.placeHolder?.[1]??"max",min:"0",max:"1000000000000000",step:"1",style:{outline:"none"},"onUpdate:modelValue":d[2]||(d[2]=u=>l.value[1]=u),onInput:d[3]||(d[3]=u=>i()),disabled:f.disabled},null,40,Mr),[[e.vModelText,l.value[1]]])])])]),f.layout==="popover"&&f.cleanable?(e.openBlock(),e.createElementBlock("div",Lr)):e.createCommentVNode("",!0),f.layout==="popover"&&f.cleanable?(e.openBlock(),e.createElementBlock("div",Pr,[e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",disabled:a.value.length===0,onClick:m}," Clear ",8,jr)])):e.createCommentVNode("",!0)],64))}}),Ir={class:"text-center"},zr=["disabled"],Hr={class:"pr-4 truncate opacity-50"},qr={key:0,class:"absolute top-0 end-0 inline-flex min-h-[10px] min-w-[10px] z-10 items-center py-0.5 rounded-full text-xs font-medium transform -translate-y-1/2 translate-x-1/2 bg-blue-600 text-white px-1"},Kr={class:"w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full"},Jr={class:"w-[300px] p-[4px] py-[8px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full"},Wr={class:"h-[50px] px-[10px] py-[5px] pb-[10px] flex items-center justify-center"},Yr=["disabled"],yt=e.defineComponent({__name:"popover-field",props:{disabled:{type:Boolean,default:!1},label:{},currentValue:{},fieldRef:{},width:{}},emits:["clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,s=e.ref(!1),a=e.ref({top:0,left:0}),i=e.ref(null),m=e.ref(null),f=e.ref(null);function d(){const g=m.value,E=f.value;if(!g||!E)return;const b=g.getBoundingClientRect();a.value={top:b.bottom+8,left:b.left}}function u(){s.value=!s.value,s.value&&e.nextTick(()=>{d(),r.fieldRef?.inputTextRef&&r.fieldRef?.inputTextRef.focus()})}function y(g){!i.value?.contains(g.target)&&!f.value?.contains(g.target)&&(s.value=!1)}function k(g){g.key==="Escape"&&(s.value=!1)}e.onMounted(()=>{document.addEventListener("click",y,!0),document.addEventListener("keydown",k),window.addEventListener("scroll",d,!0)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",y,!0),document.removeEventListener("keydown",k),window.removeEventListener("scroll",d,!0)});function w(){s.value=!1}return n({close:w}),(g,E)=>(e.openBlock(),e.createElementBlock("div",{class:"shrink-0",ref_key:"wrapperRef",ref:i},[e.createElementVNode("div",Ir,[e.createElementVNode("div",{class:e.normalizeClass(g.width?e.unref(ht).getWidthClass(g.width):"w-full")},[e.createElementVNode("button",{onClick:u,disabled:g.disabled,ref_key:"triggerRef",ref:m,class:"relative flex w-full px-4 py-2 text-sm bg-white border border-solid rounded-lg cursor-pointer hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 pe-9 text-nowrap text-start text-stone-800 border-stone-200 !bg-gray-100 !text-sm !font-[500] border-transparent hover:!bg-gray-200 [&>div]:!text-gray-800 [&>div]:!opacity-100"},[e.createElementVNode("div",Hr,e.toDisplayString(g.label),1),e.createVNode(Ee,{class:"absolute text-gray-500 right-3 translate-y-2/4 bottom-1/2 text-500-gray"}),(Array.isArray(g.currentValue)?g.currentValue.length>0:g.currentValue)?(e.openBlock(),e.createElementBlock("span",qr)):e.createCommentVNode("",!0)],8,zr),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:f,class:"vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",style:e.normalizeStyle({top:`${a.value.top}px`,left:`${a.value.left}px`}),"data-inside-popover":""},[e.createElementVNode("div",Kr,[e.createElementVNode("div",Jr,[e.renderSlot(g.$slots,"default"),e.createElementVNode("div",Wr,[e.createElementVNode("button",{class:"w-full h-full border rounded-lg text-[16px] hover:bg-gray-100 duration-300 disabled:cursor-not-allowed disabled:hover:bg-white disabled:text-gray-200",disabled:g.currentValue!==void 0&&g.currentValue.length===0,onClick:E[0]||(E[0]=b=>l("clear",!0))}," Очистити ",8,Yr)])])])],4),[[e.vShow,s.value]])]))],2)])],512))}});class _{static format(n){const o=n.getFullYear(),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0");return`${o}-${r}-${l}`}static getShiftedDay(n,o=0){const r=n?new Date(n):new Date;return r.setDate(r.getDate()+o),this.format(r)}static getLastWeekRange(n,o,r=0){if(n&&o){const f=new Date(n),d=new Date(o);return f.setDate(f.getDate()+r*7),d.setDate(d.getDate()+r*7),[this.format(f),this.format(d)]}const l=new Date,s=l.getDay(),a=s===0?13:s-1+7,i=new Date(l);i.setDate(l.getDate()-a+r*7);const m=new Date(i);return m.setDate(i.getDate()+6),[this.format(i),this.format(m)]}static getMonthRange(n,o,r=0){let l;n?l=new Date(n):l=new Date,l=new Date(l.getFullYear(),l.getMonth()+r,1);const s=l,a=new Date(l.getFullYear(),l.getMonth()+1,0);return[this.format(s),this.format(a)]}static getQuarterRange(n,o,r=0){const l=n||o,s=l?new Date(l):new Date;let a=Math.floor(s.getMonth()/3);a+=r;const i=(a%4+4)%4*3,m=s.getFullYear()+Math.floor(a/4),f=new Date(m,i,1),d=new Date(m,i+3,0);return[this.format(f),this.format(d)]}static getYear(n,o=0){let r;return n&&/^\d{4}$/.test(n)?r=parseInt(n,10):n?r=new Date(n).getFullYear():r=new Date().getFullYear(),String(r+o)}static getRangeFromDaysBefore(n){const o=new Date,r=new Date(o.getTime());return r.setDate(o.getDate()-n),[this.format(r),this.format(o)]}}const Qr={},Gr={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-blue-600 w-[16px] h-[16px]"};function Xr(t,n){return e.openBlock(),e.createElementBlock("svg",Gr,n[0]||(n[0]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)]))}const H=$(Qr,[["render",Xr]]),Zr={},vr={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"};function eo(t,n){return e.openBlock(),e.createElementBlock("svg",vr,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const to=$(Zr,[["render",eo]]),no={},ro={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"};function oo(t,n){return e.openBlock(),e.createElementBlock("svg",ro,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const lo=$(no,[["render",oo]]),so={class:""},ao={class:""},io={class:""},co={class:""},uo={class:""},fo={class:""},po={class:""},mo={class:"inline-flex rounded-lg shrink-0 pl-1"},ho={class:"inline-flex rounded-lg shrink-0 pl-1"},yo={key:1,class:"flex gap-1 !w-[75%] rounded-lg"},go=["max","disabled"],bo=["min","disabled"],wo={key:2,class:"ml-1"},xo=["disabled"],ko={key:0,class:"flex justify-between items-center text-xs text-gray-500 pt-2 border-t"},Eo=["disabled"],gt={radio:mt,checkbox:Ce,check:Ce,text:Ar,range:Ur,date:e.defineComponent({__name:"date-input",props:{name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{default:"inline"},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{emit:n}){const o=t,r=n,l=e.ref(null),s=e.ref(o.modelValue??o.default??[]),a=e.ref(""),i=e.ref(0);function m(){const b=_.getRangeFromDaysBefore(i.value);return s.value=[a.value,...b],r("change",{name:o.name,value:s}),r("update:modelValue",s.value),b}function f(b){a.value=b,l.value?.close();const c=[];switch(a.value){case"today":c.push(_.getShiftedDay());break;case"week":c.push(..._.getLastWeekRange());break;case"month":c.push(..._.getMonthRange());break;case"quarter":c.push(..._.getQuarterRange());break;case"year":c.push(_.getYear());break;case"last_7_days":i.value=7,m();break;case"range":i.value=7,c.push(...m());break}s.value=[a.value,...c],r("change",{name:o.name,value:s}),r("update:modelValue",s.value)}function d(){const b=[];switch(a.value){case"today":b.push(_.getShiftedDay(s.value[1],1));break;case"week":b.push(..._.getLastWeekRange(s.value[1],s.value[2],1));break;case"month":b.push(..._.getMonthRange(s.value[1],s.value[2],1));break;case"quarter":b.push(..._.getQuarterRange(s.value[1],s.value[2],1));break;case"year":b.push(_.getYear(s.value[1],1));break}s.value=[a.value,...b],r("change",{name:o.name,value:s}),r("update:modelValue",s.value)}function u(){const b=[];switch(a.value){case"today":b.push(_.getShiftedDay(s.value[1],-1));break;case"week":b.push(..._.getLastWeekRange(s.value[1],s.value[2],-1));break;case"month":b.push(..._.getMonthRange(s.value[1],s.value[2],-1));break;case"quarter":b.push(..._.getQuarterRange(s.value[1],s.value[2],-1));break;case"year":b.push(_.getYear(s.value[1],-1));break}s.value=[a.value,...b],r("change",{name:o.name,value:s}),r("update:modelValue",s.value)}e.onMounted(()=>{let b=[];if(Array.isArray(o.modelValue)?b=o.modelValue:Array.isArray(o.default)&&(b=o.default),b.length===0)return;const[c,...h]=b;a.value=c;let x=[];switch(c){case"today":x.push(_.getShiftedDay(h[0]));break;case"week":x=_.getLastWeekRange(h[0],h[1]);break;case"month":x=_.getMonthRange(h[0],h[1]);break;case"quarter":x=_.getQuarterRange(h[0],h[1]);break;case"year":x.push(_.getYear(h[0]));break;case"last_7_days":i.value=Number(h[0]??7);return;case"range":s.value=[c,h[0]??"",h[1]??""];return;default:return}s.value=[c,...x],r("update:modelValue",s.value)});const y=["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"];function k(b){const[c,h,x]=b.split("-");return`${x}.${h}.${c}`}function w(b){const{value:c}=s;switch(b){case"today":return k(c[1]);case"range":return"Період";case"week":return c[1]&&c[2]?`${k(c[1])} – ${k(c[2])}`:"";case"quarter":if(c[1]){const h=new Date(c[1]),x=h.getFullYear(),C=h.getMonth();return`${Math.floor(C/3)+1} квартал ${x}`}return"";case"month":if(c[1]){const[h,x]=c[1].split("-");return`${y[parseInt(x,10)-1]} ${h}`}return"";case"year":return c[1]||"";case"last_7_days":return"За останні дні";default:return o.label??""}}const g=e.computed(()=>a.value?w(a.value):o.label??"");function E(){a.value="",s.value=[],r("update:modelValue",[])}return e.watch(()=>o.modelValue,b=>{b!==void 0?(s.value=b,r("update:modelValue",b)):(a.value="",s.value=[])}),(b,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["",b.layout!="inline"?"relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap":"flex"])},[e.createVNode(yt,{ref_key:"popoverRef",ref:l,label:g.value,"current-value":s.value,onClear:E},{default:e.withCtx(()=>[e.createElementVNode("div",so,[e.createElementVNode("button",{type:"button",onClick:c[0]||(c[0]=h=>f("range")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[10]||(c[10]=e.createTextVNode(" Період ")),a.value==="range"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),c[17]||(c[17]=e.createElementVNode("div",{class:""},[e.createElementVNode("div",{class:"pt-2 mt-2 border-t"})],-1)),e.createElementVNode("div",ao,[e.createElementVNode("button",{type:"button",onClick:c[1]||(c[1]=h=>f("today")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[11]||(c[11]=e.createTextVNode(" Сьогодні ")),a.value==="today"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",io,[e.createElementVNode("button",{type:"button",onClick:c[2]||(c[2]=h=>f("week")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[12]||(c[12]=e.createTextVNode(" Тиждень ")),a.value==="week"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",co,[e.createElementVNode("button",{type:"button",onClick:c[3]||(c[3]=h=>f("month")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[13]||(c[13]=e.createTextVNode(" Місяць ")),a.value==="month"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",uo,[e.createElementVNode("button",{type:"button",onClick:c[4]||(c[4]=h=>f("quarter")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[14]||(c[14]=e.createTextVNode(" Квартал ")),a.value==="quarter"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),e.createElementVNode("div",fo,[e.createElementVNode("button",{type:"button",onClick:c[5]||(c[5]=h=>f("year")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[15]||(c[15]=e.createTextVNode(" Рік ")),a.value==="year"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),c[18]||(c[18]=e.createElementVNode("div",{class:""},[e.createElementVNode("div",{class:"pt-2 mt-2 border-t"})],-1)),e.createElementVNode("div",po,[e.createElementVNode("button",{type:"button",onClick:c[6]||(c[6]=h=>f("last_7_days")),class:"flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-lg cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"},[c[16]||(c[16]=e.createTextVNode(" Останні 7 днів ")),a.value==="last_7_days"?(e.openBlock(),e.createBlock(H,{key:0})):e.createCommentVNode("",!0)])]),c[19]||(c[19]=e.createElementVNode("div",{class:""},[e.createElementVNode("div",{class:"pt-2 mt-2 border-t"})],-1))]),_:1,__:[17,18,19]},8,["label","current-value"]),a.value!==""&&a.value!=="range"&&a.value!=="last_7_days"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",mo,[e.createElementVNode("button",{type:"button",title:"Попередній період",class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:u},[e.createVNode(to)])]),e.createElementVNode("div",ho,[e.createElementVNode("button",{type:"button",title:"Наступний період",class:"inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",onClick:d},[e.createVNode(lo)])])],64)):e.createCommentVNode("",!0),a.value!==""&&a.value==="range"?(e.openBlock(),e.createElementBlock("div",yo,[e.withDirectives(e.createElementVNode("input",{type:"date",max:s.value[2],locale:"uk-UA","onUpdate:modelValue":c[7]||(c[7]=h=>s.value[1]=h),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600",disabled:b.disabled},null,8,go),[[e.vModelText,s.value[1]]]),e.withDirectives(e.createElementVNode("input",{type:"date",min:s.value[1],locale:"uk-UA","onUpdate:modelValue":c[8]||(c[8]=h=>s.value[2]=h),class:"px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-lg focus:outline-blue-600 appearance-auto",disabled:b.disabled},null,8,bo),[[e.vModelText,s.value[2]]])])):e.createCommentVNode("",!0),a.value!==""&&a.value==="last_7_days"?(e.openBlock(),e.createElementBlock("div",wo,[e.withDirectives(e.createElementVNode("input",{type:"number","onUpdate:modelValue":c[9]||(c[9]=h=>i.value=h),onInput:m,class:"h-[38px] w-[60px] border rounded-lg focus:outline-blue-600 px-[10px]",disabled:b.disabled},null,40,xo),[[e.vModelText,i.value]])])):e.createCommentVNode("",!0)],2),b.layout==="popover"&&b.cleanable?(e.openBlock(),e.createElementBlock("div",ko,[e.createElementVNode("button",{class:"text-gray-600 hover:text-gray-800",disabled:s.value.length===0,onClick:E}," Clear ",8,Eo)])):e.createCommentVNode("",!0)],64))}}),select:mt};function Ve(t,n=!1){let o;switch(t.toLowerCase()){case"autocomplete":o="select";break;case"check":o="checkbox";break;default:o=t.toString().toLowerCase()}return["select"].includes(o)&&n?{component:Ce,type:"select"}:{component:gt[o]||gt.text,type:o}}const Co={},Vo={xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"};function Bo(t,n){return e.openBlock(),e.createElementBlock("svg",Vo,n[0]||(n[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747"},null,-1),e.createElementVNode("path",{d:"M20 4v5h-5"},null,-1)]))}const No=$(Co,[["render",Bo]]),_o={style:{display:"inline-flex",margin:"0px",width:"100%"}},So={class:"relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm"},Ro={class:"block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200"},Ao={class:"flex items-center"},To={class:"text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1"},Oo={class:"filter-layout__body"},Fo=e.defineComponent({__name:"vertical-layout",props:{name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,s=e.ref(),a=Ve(r.type,r.multi),i=e.computed({get:()=>r.modelValue,set:u=>l("update:modelValue",u)});function m(u){l("clear",u)}function f(u,y){l("change",{name:u,value:y}),r.modelValue!==void 0&&l("update:modelValue",y)}function d(){s.value&&s.value.clear(),l("clear",r.name)}return e.watch(()=>r.default,u=>{i.value=u}),e.watch(()=>r.modelValue,u=>{i.value=u}),n({filterRef:s}),(u,y)=>(e.openBlock(),e.createElementBlock("div",_o,[e.createElementVNode("div",So,[e.createElementVNode("div",Ro,[e.createElementVNode("div",Ao,[e.createElementVNode("span",To,e.toDisplayString(u.label),1)]),typeof i.value=="string"&&i.value.trim()!==""||Array.isArray(i.value)&&i.value.length>0&&i.value.some(k=>k!=null&&String(k).trim()!=="")?(e.openBlock(),e.createBlock(No,{key:0,onClick:d})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Oo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)?.component),e.mergeProps(r,{type:e.unref(a)?.type,onChange:y[0]||(y[0]=k=>f(k.name,k.value)),onClear:y[1]||(y[1]=k=>m(k)),ref_key:"filterRef",ref:s}),null,16,["type"]))])])]))}}),bt=e.defineComponent({__name:"inline-layout",props:{name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,s=e.ref(),a=Ve(r.type,r.multi),i=e.computed({get:()=>r.modelValue,set:u=>l("update:modelValue",u)});function m(u){l("clear",u)}function f(u,y){l("change",{name:u,value:y}),r.modelValue!==void 0&&l("update:modelValue",y)}function d(){s.value&&s.value.clear(),l("clear",r.name)}return e.watch(()=>r.default,u=>{i.value=u}),e.watch(()=>r.modelValue,u=>{i.value=u}),n({filterRef:s}),(u,y)=>["text","date"].includes(u.type.toLocaleLowerCase())?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)?.component),e.mergeProps({key:0},r,{type:e.unref(a)?.type,onChange:y[0]||(y[0]=k=>f(k.name,k.value)),onClear:y[1]||(y[1]=k=>m(k)),disabled:u.disabled}),null,16,["type","disabled"])):(e.openBlock(),e.createBlock(yt,{key:1,"current-value":i.value,label:u.label,onClear:d,fieldRef:s.value,width:u.width,disabled:u.disabled},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)?.component),e.mergeProps({ref_key:"filterRef",ref:s},r,{type:e.unref(a)?.type,onChange:y[2]||(y[2]=k=>f(k.name,k.value)),onClear:y[3]||(y[3]=k=>m(k))}),null,16,["type"]))]),_:1},8,["current-value","label","fieldRef","width","disabled"]))}}),$o=e.defineComponent({__name:"popover-layout",props:{name:{},type:{},label:{},width:{},options:{},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean},layout:{},cleanable:{type:Boolean},limit:{},multi:{type:Boolean},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,s=e.ref(),a=e.ref(Ve(r.type,r.multi)),i=e.computed({get:()=>r.modelValue,set:d=>l("update:modelValue",d)});function m(d){l("clear",d)}function f(d,u){l("change",{name:d,value:u}),r.modelValue!==void 0&&l("update:modelValue",u)}return e.watch(()=>r.default,d=>{i.value=d}),e.watch(()=>r.modelValue,d=>{i.value=d}),e.watch(()=>r,d=>{i.value=d}),n({filterRef:s}),(d,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value?.component),e.mergeProps(r,{type:a.value?.type,modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=y=>i.value=y),onChange:u[1]||(u[1]=y=>f(y.name,y.value)),onClear:u[2]||(u[2]=y=>m(y)),ref_key:"filterRef",ref:s}),null,16,["type","modelValue"]))}}),P=e.defineComponent({__name:"filter-field",props:{name:{},type:{},label:{},width:{},options:{default:()=>[]},placeHolder:{},api:{},default:{},modelValue:{},disabled:{type:Boolean,default:!1},layout:{default:"inline"},cleanable:{type:Boolean},limit:{default:10},multi:{type:Boolean,default:!0},dataKey:{},valueKey:{},labelKey:{}},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:o}){const r=t,l=o,s=e.ref(),a=e.computed({get:()=>r.modelValue,set:d=>l("update:modelValue",d)});function i(d){l("clear",d)}function m(d,u){l("change",{name:d,value:u}),r.modelValue!==void 0&&l("update:modelValue",u)}e.watch(()=>r.default,d=>{a.value=d}),e.watch(()=>r.modelValue,d=>{a.value=d}),n({filterRef:s});function f(){switch(r.layout){case"inline":return bt;case"vertical":return Fo;case"popover":return $o;default:return bt}}return(d,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(r,{onChange:u[0]||(u[0]=y=>m(y.name,y.value)),onClear:u[1]||(u[1]=y=>i(y)),modelValue:a.value,"onUpdate:modelValue":u[2]||(u[2]=y=>a.value=y)}),null,16,["modelValue"]))}});function Be(t,n){const{slots:o}=t,r=e.ref(t.value??{}),l=e.computed(()=>(e.toRaw(o?.default?.())??[]).flatMap(h=>Array.isArray(h.children)?h.children:[h]));function s(c){delete r.value[c],n("clear",{data:e.toRaw(r.value),name:c})}function a(c,h){r.value={...r.value,[c]:h},n("change",{data:e.toRaw(r.value),name:c,value:h})}const i=e.computed(()=>l.value.map(c=>{const h=c.props?.name;return e.cloneVNode(c,{...c.props,layout:t.view,showClean:!0,modelValue:r[h],"onUpdate:modelValue":x=>{a(h,x)},onClear:()=>s(h)})})),m=e.computed(()=>new Map(i.value.map(c=>{const h=c.props?.name;return h?[h,c]:null}).filter(c=>c!==null)));function f(){r.value={},n("clearAll",{data:e.toRaw(r.value),name:"ALL"})}const d=e.ref(""),u=e.computed(()=>Object.values(r.value).filter(c=>Array.isArray(c)?c.some(h=>h!==""&&h!==null&&h!==void 0):c!==""&&c!==null&&c!==void 0).length),y=e.ref();e.watch(d,async()=>{await e.nextTick(),y?.value?.filterRef?.inputTextRef&&y.value.filterRef.inputTextRef.focus()});const k=e.computed(()=>t.schema?Object.fromEntries(Object.entries(t.schema).slice(0,t.limit)):{}),w=e.computed(()=>t.schema?t.view!=="inline"?t.schema:Object.fromEntries(Object.entries(t.schema).slice(t.limit)):{}),g=e.computed(()=>{if(i.value.length===0)return[];let c=0;if(t.schema){const h=Object.entries(t.schema).length;h<t.limit?c=t.limit-h:c=0}return i.value.slice(0,c)}),E=e.computed(()=>i.value.length===0?[]:t.view!=="inline"?i.value:i.value.slice(g.value.length));function b(){if(w.value){const[c]=Object.keys(w.value);d.value=c}else E.value.length>0?d.value=E.value[0].props.name:d.value=""}return{activeFilter:r,activeFilterCount:u,onFilterChange:a,clearFilter:s,clearAllFilters:f,limitedSchema:k,popoverSchema:w,filtersSlot:i,limitedFiltersSlot:g,popoverFiltersSlot:E,vnodeMap:m,onPopoverOpen:b,selectedFilter:d,filterRef:y}}const Do=e.defineComponent({__name:"popover",emits:["open","close"],setup(t,{emit:n}){const o=e.ref(!1),r=e.ref(null),l=e.ref(null),s=e.ref(null),a=e.ref({top:"0px",left:"0px",position:"absolute"});function i(){o.value=!o.value}function m(){const u=s.value,y=r.value;if(!u||!y)return;const k=u.getBoundingClientRect();a.value={position:"absolute",top:`${k.bottom+window.scrollY+8}px`,left:`${k.left+window.scrollX}px`}}function f(u){const y=u.target;!s.value?.contains(u.target)&&!r.value?.contains(u.target)&&!y.closest("[data-inside-popover]")&&(o.value=!1)}e.onMounted(()=>{s.value=l.value?.querySelector("[data-popover-trigger]")||null,s.value?.addEventListener("click",i),document.addEventListener("click",f),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0)}),e.onBeforeUnmount(()=>{s.value?.removeEventListener("click",i),document.removeEventListener("click",f),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0)});const d=n;return e.watch(o,async u=>{u?(await e.nextTick(m),d("open")):d("close")}),(u,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:l},[e.renderSlot(u.$slots,"trigger"),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:r,class:"absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",style:e.normalizeStyle(a.value)},[e.renderSlot(u.$slots,"default")],4)):e.createCommentVNode("",!0)]))],512))}}),Mo={},Lo={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-filter h-4 w-4"};function Po(t,n){return e.openBlock(),e.createElementBlock("svg",Lo,n[0]||(n[0]=[e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1)]))}const jo=$(Mo,[["render",Po]]),Uo={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-500 text-white text-xs px-1.5 py-0.5"},Io={class:"flex"},zo={class:"w-64 border-r border-gray-200"},Ho={class:"p-2"},qo=["onClick"],Ko={class:"flex items-center gap-2"},Jo={class:"text-sm font-medium"},Wo={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},Yo=["onClick"],Qo={class:"flex items-center gap-2"},Go={class:"text-sm font-medium"},Xo={key:0,class:"inline-flex items-center rounded-full border font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-secondary/80 bg-blue-100 text-blue-700 text-xs p-2"},Zo={key:0,class:"p-2 border-t"},vo={class:"flex-1 min-h-[300px] overflow-y-auto"},el={key:0,class:"flex items-center justify-center h-full text-gray-500"},wt=e.defineComponent({__name:"popover-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{expose:n,emit:o}){const r=t,l=e.useSlots(),s=o,{activeFilter:a,activeFilterCount:i,onFilterChange:m,clearFilter:f,clearAllFilters:d,popoverSchema:u,popoverFiltersSlot:y,onPopoverOpen:k,selectedFilter:w,filterRef:g}=Be({...r,slots:l},s);return n({clearFilter:f,clearAllFilters:d}),(E,b)=>(e.openBlock(),e.createBlock(Do,{onOpen:e.unref(k),onClose:b[5]||(b[5]=c=>w.value="")},{trigger:e.withCtx(()=>[e.createElementVNode("button",{"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:e.normalizeClass(["ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2",e.unref(i)>0?"bg-blue-50 border-blue-200 text-blue-700 hover:bg-blue-100":"text-gray-800 hover:bg-gray-200 focus:bg-gray-200"]),type:"button"},[e.createVNode(jo),b[6]||(b[6]=e.createTextVNode(" Filter ")),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],2)]),default:e.withCtx(()=>[e.createElementVNode("div",Io,[e.createElementVNode("div",zo,[b[7]||(b[7]=e.createElementVNode("div",{class:"p-4 border-b"},[e.createElementVNode("p",{class:"text-sm text-gray-600"},"Select a field to start creating a filter.")],-1)),e.createElementVNode("div",Ho,[E.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(u)),([c,h])=>(e.openBlock(),e.createElementBlock("button",{key:c,onClick:()=>{w.value=c,console.log(e.unref(w))},class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(w)===c?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":""])},[e.createElementVNode("div",Ko,[e.createElementVNode("span",Jo,e.toDisplayString(h.label),1)]),(Array.isArray(e.unref(a)[c])?e.unref(a)[c].length>0:e.unref(a)[c])?(e.openBlock(),e.createElementBlock("div",Wo)):e.createCommentVNode("",!0)],10,qo))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(c,h)=>(e.openBlock(),e.createElementBlock("button",{key:"slot-"+h,onClick:x=>w.value=c.props.name,class:e.normalizeClass(["w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",e.unref(w)===c.props.name?"bg-blue-50 text-blue-700 border-l-2 border-blue-500":""])},[e.createElementVNode("div",Qo,[e.createElementVNode("span",Go,e.toDisplayString(c.props.label),1)]),e.unref(a)[c.props.name]?.length>0?(e.openBlock(),e.createElementBlock("div",Xo)):e.createCommentVNode("",!0)],10,Yo))),128))]),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("button",{class:"w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors",onClick:b[0]||(b[0]=(...c)=>e.unref(d)&&e.unref(d)(...c)),"data-inside-popover":""}," Clear all ")])):e.createCommentVNode("",!0)]),e.createElementVNode("div",vo,[e.unref(w)===""?(e.openBlock(),e.createElementBlock("div",el,b[8]||(b[8]=[e.createElementVNode("p",{class:"text-sm"},"Select a field to start creating a filter.",-1)]))):e.createCommentVNode("",!0),e.unref(w)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(u)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(u)),([c,h])=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(w)===c?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0,name:c,layout:"popover",ref_for:!0,ref_key:"filterRef",ref:g},{ref_for:!0},h,{onChange:b[1]||(b[1]=x=>e.unref(m)(x.name,x.value)),onClear:b[2]||(b[2]=x=>e.unref(f)(x)),modelValue:e.unref(a)[c],"onUpdate:modelValue":x=>e.unref(a)[c]=x,showClean:!0}),null,16,["name","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(c,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:"slot-"+h},[e.unref(w)===c.props.name?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0,layout:"popover"},{ref_for:!0},c.props,{ref_for:!0,ref_key:"filterRef",ref:g,onChange:b[3]||(b[3]=x=>e.unref(m)(x.name,x.value)),onClear:b[4]||(b[4]=x=>e.unref(f)(x)),modelValue:e.unref(a)[c.props.name],"onUpdate:modelValue":x=>e.unref(a)[c.props.name]=x,showClean:!0}),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],64))),128))],64)):e.createCommentVNode("",!0)])])]),_:1},8,["onOpen"]))}}),tl={class:"w-full gap-5 flex justify-between mb-[6px] pr-3"},nl={class:"table items-center gap-2 max-h-[38px] pt-[4px]"},rl={class:"custom-filter-list"},ol={class:"vs-filter-list"},ll={class:"flex flex-wrap items-center w-full gap-[6px]"},xt=e.defineComponent({__name:"inline-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const o=t,r=n,l=e.useSlots(),{activeFilter:s,activeFilterCount:a,onFilterChange:i,clearFilter:m,clearAllFilters:f,limitedSchema:d,popoverSchema:u,filtersSlot:y,limitedFiltersSlot:k,popoverFiltersSlot:w}=Be({...o,slots:l},r),g=e.ref();function E(){g.value&&(g.value.clearAllFilters(),f())}return(b,c)=>(e.openBlock(),e.createElementBlock("div",tl,[e.createElementVNode("div",nl,[e.createElementVNode("div",rl,[e.createElementVNode("div",ol,[e.createElementVNode("div",ll,[b.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Object.entries(e.unref(d)),([h,x])=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:h,name:h},{ref_for:!0},x,{onChange:c[0]||(c[0]=C=>e.unref(i)(C.name,C.value)),onClear:c[1]||(c[1]=C=>e.unref(m)(C)),layout:"inline",modelValue:e.unref(s)[h],"onUpdate:modelValue":C=>e.unref(s)[h]=C}),null,16,["name","modelValue","onUpdate:modelValue"]))),128)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(h,x)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:"slot-"+x,layout:"vertical"},{ref_for:!0},h.props,{onChange:c[2]||(c[2]=C=>e.unref(i)(C.name,C.value)),onClear:c[3]||(c[3]=C=>e.unref(m)(C)),showClean:!0,modelValue:e.unref(s)[h.props.name],"onUpdate:modelValue":C=>e.unref(s)[h.props.name]=C}),null,16,["modelValue","onUpdate:modelValue"]))),128)),Object.entries(e.unref(u)).length>0||e.unref(w).length>0?(e.openBlock(),e.createBlock(wt,e.mergeProps({key:1},o,{onChange:c[4]||(c[4]=h=>e.unref(i)(h.name,h.value)),onClearAll:e.unref(f),onClear:c[5]||(c[5]=h=>e.unref(m)(h.name)),ref_key:"popoverRef",ref:g}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(h,x)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h),e.mergeProps({key:"slot-"+x,layout:"inline"},{ref_for:!0},h.props),null,16))),128))]),_:1},16,["onClearAll"])):e.createCommentVNode("",!0),e.unref(a)>0?(e.openBlock(),e.createElementBlock("button",{key:2,onClick:E,class:"relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 border border-transparent text-gray-800 hover:bg-gray-200 focus:bg-gray-200"}," Очистити ")):e.createCommentVNode("",!0)])])])])]))}}),sl={key:0,class:"p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"},al={class:"flex items-center vst-filters vsTailwind flex-col w-full"},il=e.defineComponent({__name:"vertical-filter-layout",props:{schema:{},view:{},value:{},history:{type:Boolean},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const o=t,r=n,l=e.useSlots(),{activeFilter:s,activeFilterCount:a,onFilterChange:i,clearFilter:m,clearAllFilters:f,filtersSlot:d}=Be({...o,slots:l},r);return(u,y)=>u.view==="vertical"?(e.openBlock(),e.createElementBlock("div",sl,[e.createElementVNode("div",al,[e.unref(a)>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:y[0]||(y[0]=(...k)=>e.unref(f)&&e.unref(f)(...k)),"data-popover-trigger":"","aria-haspopup":"dialog","aria-expanded":"false",class:"w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",type:"button"}," Очистити ")):e.createCommentVNode("",!0),u.schema?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(Object.entries(u.schema),([k,w])=>(e.openBlock(),e.createBlock(P,e.mergeProps({name:k,layout:"vertical"},{ref_for:!0},w,{onChange:y[1]||(y[1]=g=>e.unref(i)(g.name,g.value)),onClear:y[2]||(y[2]=g=>e.unref(m)(g)),modelValue:e.unref(s)[k],"onUpdate:modelValue":g=>e.unref(s)[k]=g,showClean:!0}),null,16,["name","modelValue","onUpdate:modelValue"]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),(k,w)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:"slot-"+w,layout:"vertical"},{ref_for:!0},k.props,{onChange:y[3]||(y[3]=g=>e.unref(i)(g.name,g.value)),onClear:y[4]||(y[4]=g=>e.unref(m)(g)),modelValue:e.unref(s)[k.props.name],"onUpdate:modelValue":g=>e.unref(s)[k.props.name]=g,showClean:!0}),null,16,["modelValue","onUpdate:modelValue"]))),128))])])):e.createCommentVNode("",!0)}}),kt=e.defineComponent({__name:"filter",props:{schema:{},view:{default:"inline"},value:{},history:{type:Boolean},limit:{default:3}},emits:["change","clear","clearAll"],setup(t,{emit:n}){const o=t,r=e.ref(o.value??{}),l=n;function s(d,u){r.value={...r.value,[d]:u},l("change",{data:e.toRaw(r.value),name:d,value:u})}function a(d){delete r.value[d],l("clear",{data:e.toRaw(r.value),name:d})}function i(){r.value={},l("clear",{data:e.toRaw(r.value),name:"ALL"}),l("change",{data:e.toRaw(r.value),name:"ALL",value:null})}const m=e.computed(()=>Array.isArray(o.schema)?o.schema.reduce((d,u)=>(d[u.name]=u,d),{}):o.schema);function f(){switch(o.view){case"inline":return xt;case"vertical":return il;case"popover":return wt;default:return xt}}return(d,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f()),e.mergeProps(o,{schema:m.value,onChange:u[0]||(u[0]=y=>s(y.name,y.value)),onClear:u[1]||(u[1]=y=>a(y.name)),onClearAll:i}),{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3},16,["schema"]))}}),cl={install(t){t.component("Filter",kt),t.component("FilterField",P)}};M.Filter=kt,M.FilterField=P,M.default=cl,Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@opengis/filter",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "dist/filter.es.js",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "scripts": {
10
+ "lint": "eslint src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
11
+ "dev": "vite",
12
+ "build": "vite build",
13
+ "preview": "vite preview",
14
+ "build-only": "vite build",
15
+ "type-check": "vue-tsc --build",
16
+ "test": "vitest",
17
+ "docs:dev": "npm run --prefix ./docs docs:dev",
18
+ "docs:build": "npm run --prefix ./docs docs:build",
19
+ "docs:preview": "npm run --prefix ./docs docs:preview"
20
+ },
21
+ "dependencies": {
22
+ "axios": "^1.10.0"
23
+ },
24
+ "devDependencies": {
25
+ "@tsconfig/node22": "^22.0.2",
26
+ "@types/node": "^22.15.32",
27
+ "@vitejs/plugin-vue": "^6.0.0",
28
+ "@vue/eslint-config-typescript": "^12.0.0",
29
+ "@vue/test-utils": "^2.4.6",
30
+ "@vue/tsconfig": "^0.7.0",
31
+ "eslint": "8.49.0",
32
+ "eslint-config-airbnb": "19.0.4",
33
+ "eslint-plugin-import": "^2.25.3",
34
+ "eslint-plugin-vue": "^9.17.0",
35
+ "typescript": "~5.8.0",
36
+ "vite": "^7.0.0",
37
+ "vitest": "^3.2.4",
38
+ "vue": "^3.5.18",
39
+ "vue-tsc": "^2.2.10"
40
+ }
41
+ }