@opengis/form 0.0.1 → 0.0.3

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.
Files changed (4) hide show
  1. package/index.css +1 -1
  2. package/index.js +1156 -1060
  3. package/index.umd.cjs +5 -5
  4. package/package.json +2 -2
package/index.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FormBuilder={},e.Vue))})(this,function(exports,vue){"use strict";const _hoisted_1$t={class:"w-full relative"},_hoisted_2$a={class:"text-xs text-gray-500 block"},_hoisted_3$4={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$4={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$y=vue.defineComponent({__name:"vs-layout-default",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$t,[vue.createElementVNode("span",_hoisted_2$a,[vue.createElementVNode("span",null,vue.toDisplayString(e.ua||e.label),1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$4,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$4,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$s={class:"w-full relative flex items-center gap-2"},_hoisted_2$9={class:"text-xs text-gray-500 flex shrink-0 w-3/12"},_hoisted_3$3={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$3={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$x=vue.defineComponent({__name:"vs-layout-horizontal",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$s,[vue.createElementVNode("span",_hoisted_2$9,[vue.createTextVNode(vue.toDisplayString(e.ua||e.label)+" ",1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$3,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$3,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$r={class:"w-full relative"},_hoisted_2$8={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$w=vue.defineComponent({__name:"vs-layout-inline",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$r,[vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$8,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),layouts$1={default:_sfc_main$y,horizontal:_sfc_main$x,inline:_sfc_main$w};function useStyle(e){return{inputClass:vue.computed(()=>{const n=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor||"blue"}-500 border border-solid border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 `;return e?.size==="sm"?n+"h-[32px]":n+"h-[40px]"})}}const _hoisted_1$q=["placeholder","disabled"],_sfc_main$v=vue.defineComponent({__name:"vs-input-text",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full",[vue.unref(n)]]),style:{border:"1px solid #e0e0e0"}},null,10,_hoisted_1$q)),[[vue.vModelText,r.value]])}}),_hoisted_1$p=["placeholder"],_sfc_main$u=vue.defineComponent({__name:"vs-input-number",props:vue.mergeModels({style:{type:Object,default:()=>({})},placeholder:{type:String,default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),placeholder:e.placeholder,class:vue.normalizeClass(["py-1.5 px-3 block w-full",[vue.unref(n)]]),style:{border:"1px solid #e0e0e0"}},null,10,_hoisted_1$p)),[[vue.vModelText,r.value]])}}),_hoisted_1$o=["value","disabled"],_hoisted_2$7={class:"text-[13px]"},_sfc_main$t=vue.defineComponent({__name:"vs-input-radio-default",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center gap-0",[e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$o),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",{class:vue.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${e.style?.primaryColor||"blue"}-500`,e.disabled?"opacity-50 cursor-not-allowed":""]])},[t.value==e.value?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${e.style?.primaryColor||"blue"}-500`]])},null,2)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("span",_hoisted_2$7,vue.toDisplayString(e.text),1)],2))}}),_hoisted_1$n=["value","disabled"],_hoisted_2$6={class:"text-[13px]"},_sfc_main$s=vue.defineComponent({__name:"vs-input-radio-buttons",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[t.value==e.value?`ring-2 ring-ring ring-${e.style?.primaryColor||"blue"}-500`:"",e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$n),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",_hoisted_2$6,vue.toDisplayString(e.text),1)],2))}}),layouts={"vs-input-radio-default":_sfc_main$t,"vs-input-radio-buttons":_sfc_main$s},_sfc_main$r=vue.defineComponent({__name:"vs-input-radio",props:vue.mergeModels({options:{type:Array,required:!0},position:{type:String,default:"vertical"},view:{type:String,default:"default"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.computed(()=>layouts[`vs-input-radio-${t.view}`]);return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.options,i=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps({key:i?.id,text:i.text,value:i.id.toString(),checked:n.value===i.id,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let l;for(r=0;r<i;r++)l=s[r],t.call(null,e[l],l,e)}}function findKey(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(r,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(r)?t[s]=merge(t[s],r):isPlainObject(r)?t[s]=merge({},r):isArray(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&forEach(arguments[r],n);return t}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(o,s)=>{n&&isFunction(o)?e[s]=bind(o,n):e[s]=o},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let o,s,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,o)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=isArray(r)?[]:{};return forEach(r,(i,l)=>{const u=n(i,o+1);!isUndefined(u)&&(s[l]=u)}),t[o]=void 0,s}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,r)=>(_global.addEventListener("message",({source:o,data:s})=>{o===_global&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,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:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["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(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,o,s)=>{const i=Object.create(prototype$1);return utils$1.toFlatObject(e,i,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),AxiosError$1.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!utils$1.isUndefined(m[v])});const r=n.metaTokens,o=n.visitor||a,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(utils$1.isDate(p))return p.toISOString();if(utils$1.isBoolean(p))return p.toString();if(!u&&utils$1.isBlob(p))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(p)||utils$1.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function a(p,v,m){let g=p;if(p&&!m&&typeof p=="object"){if(utils$1.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(utils$1.isArray(p)&&isFlatArray(p)||(utils$1.isFileList(p)||utils$1.endsWith(v,"[]"))&&(g=utils$1.toArray(p)))return v=removeBrackets(v),g.forEach(function(x,_){!(utils$1.isUndefined(x)||x===null)&&t.append(i===!0?renderKey([v],_,s):i===null?v:v+"[]",c(x))}),!1}return isVisitable(p)?!0:(t.append(renderKey(m,v,s),c(p)),!1)}const d=[],f=Object.assign(predicates,{defaultVisitor:a,convertValue:c,isVisitable});function h(p,v){if(!utils$1.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),utils$1.forEach(p,function(g,$){(!(utils$1.isUndefined(g)||g===null)&&o.call(t,g,utils$1.isString($)?$.trim():$,v,f))===!0&&h(g,v?v.concat($):[$])}),d.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return h(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])},prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(r){r!==null&&t(r)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return platform.isNode&&utils$1.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function formDataToJSON(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),u=s>=n.length;return i=!i&&utils$1.isArray(o)?o.length:i,u?(utils$1.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!l):((!o[i]||!utils$1.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&utils$1.isArray(o[i])&&(o[i]=arrayToObject(o[i])),!l)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(r,o)=>{t(parsePropPath(r),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=utils$1.isObject(t);if(s&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((l=utils$1.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return toFormData$1(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?AxiosError$1.from(l,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.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"]),parseHeaders=e=>{const t={};let n,r,o;return e&&e.split(`
2
- `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,o){if(utils$1.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!utils$1.isString(t)){if(utils$1.isString(r))return t.indexOf(r)!==-1;if(utils$1.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(l,u,c){const a=normalizeHeader(u);if(!a)throw new Error("header name must be a non-empty string");const d=utils$1.findKey(o,a);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||u]=normalizeValue(l))}const i=(l,u)=>utils$1.forEach(l,(c,a)=>s(c,a,u));if(utils$1.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))i(parseHeaders(t),n);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let l={},u,c;for(const a of t){if(!utils$1.isArray(a))throw TypeError("Object iterator must return a key-value pair");l[c=a[0]]=(u=l[c])?utils$1.isArray(u)?[...u,a[1]]:[u,a[1]]:a[1]}i(l,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return parseTokens(o);if(utils$1.isFunction(n))return n.call(this,o,r);if(utils$1.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||matchHeaderValue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=normalizeHeader(i),i){const l=utils$1.findKey(r,i);l&&(!n||matchHeaderValue(r,r[l],l,n))&&(delete r[l],o=!0)}}return utils$1.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||matchHeaderValue(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return utils$1.forEach(this,(o,s)=>{const i=utils$1.findKey(r,s);if(i){n[i]=normalizeValue(o),delete n[s];return}const l=t?formatHeader(s):String(s).trim();l!==s&&delete n[s],n[l]=normalizeValue(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils$1.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&utils$1.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function s(i){const l=normalizeHeader(i);r[l]||(buildAccessors(o,i),r[l]=!0)}return utils$1.isArray(t)?t.forEach(s):s(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const n=this||defaults,r=t||n,o=AxiosHeaders$1.from(r.headers);let s=r.data;return utils$1.forEach(e,function(l){s=l.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),a=r[s];i||(i=c),n[o]=u,r[o]=c;let d=s,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const h=a&&c-a;return h?Math.round(f*1e3/h):void 0}}function throttle(e,t){let n=0,r=1e3/t,o,s;const i=(c,a=Date.now())=>{n=a,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const a=Date.now(),d=a-n;d>=r?i(c,a):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},r-d)))},()=>o&&i(o)]}const progressEventReducer=(e,t,n=3)=>{let r=0;const o=speedometer(50,250);return throttle(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,u=i-r,c=o(u),a=i<=l;r=i;const d={loaded:i,total:l,progress:l?i/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&a?(l-i)/c:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(d)},n)},progressEventDecorator=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];utils$1.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),utils$1.isString(r)&&i.push("path="+r),utils$1.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||n==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(c,a,d,f){return utils$1.isPlainObject(c)&&utils$1.isPlainObject(a)?utils$1.merge.call({caseless:f},c,a):utils$1.isPlainObject(a)?utils$1.merge({},a):utils$1.isArray(a)?a.slice():a}function o(c,a,d,f){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(c))return r(void 0,c,d,f)}else return r(c,a,d,f)}function s(c,a){if(!utils$1.isUndefined(a))return r(void 0,a)}function i(c,a){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(c))return r(void 0,c)}else return r(void 0,a)}function l(c,a,d){if(d in t)return r(c,a);if(d in e)return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,a,d)=>o(headersToObject(c),headersToObject(a),d,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),function(a){const d=u[a]||o,f=d(e[a],t[a],a);utils$1.isUndefined(f)&&d!==l||(n[a]=f)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:l}=t;t.headers=i=AxiosHeaders$1.from(i),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(utils$1.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[c,...a]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...a].join("; "))}}if(platform.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(t)),r||r!==!1&&isURLSameOrigin(t.url))){const c=o&&s&&cookies.read(s);c&&i.set(o,c)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,r){const o=resolveConfig(e);let s=o.data;const i=AxiosHeaders$1.from(o.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=o,a,d,f,h,p;function v(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(a),o.signal&&o.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function g(){if(!m)return;const x=AxiosHeaders$1.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:x,config:e,request:m};settle(function(b){n(b),v()},function(b){r(b),v()},k),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||transitionalDefaults;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),r(new AxiosError$1(_,k.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,m)),m=null},s===void 0&&i.setContentType(null),"setRequestHeader"in m&&utils$1.forEach(i.toJSON(),function(_,k){m.setRequestHeader(k,_)}),utils$1.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),l&&l!=="json"&&(m.responseType=o.responseType),c&&([f,p]=progressEventReducer(c,!0),m.addEventListener("progress",f)),u&&m.upload&&([d,h]=progressEventReducer(u),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(a=x=>{m&&(r(!x||x.type?new CanceledError$1(null,e,m):x),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(a),o.signal&&(o.signal.aborted?a():o.signal.addEventListener("abort",a)));const $=parseProtocol(o.url);if($&&platform.protocols.indexOf($)===-1){r(new AxiosError$1("Unsupported protocol "+$+":",AxiosError$1.ERR_BAD_REQUEST,e));return}m.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,l();const a=c instanceof Error?c:this.reason;r.abort(a instanceof AxiosError$1?a:new CanceledError$1(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,s(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>utils$1.asap(l),u}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{const o=readBytes(e,t);let s=0,i,l=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:a}=await o.next();if(c){l(),u.close();return}let d=a.byteLength;if(n){let f=s+=d;n(f)}u.enqueue(new Uint8Array(a))}catch(c){throw l(c),c}},cancel(u){return l(u),o.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,r)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,t)=>{const n=utils$1.toFiniteNumber(e.getContentLength());return n??getBodyLength(t)},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:a,withCredentials:d="same-origin",fetchOptions:f}=resolveConfig(e);c=c?(c+"").toLowerCase():"text";let h=composeSignals([o,s&&s.toAbortSignal()],i),p;const v=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(u&&supportsRequestStream&&n!=="get"&&n!=="head"&&(m=await resolveBodyLength(a,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),y;if(utils$1.isFormData(r)&&(y=k.headers.get("content-type"))&&a.setContentType(y),k.body){const[b,w]=progressEventDecorator(m,progressEventReducer(asyncDecorator(u)));r=trackStream(k.body,DEFAULT_CHUNK_SIZE,b,w)}}utils$1.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let $=await fetch(p,f);const x=supportsResponseStream&&(c==="stream"||c==="response");if(supportsResponseStream&&(l||x&&v)){const k={};["status","statusText","headers"].forEach(E=>{k[E]=$[E]});const y=utils$1.toFiniteNumber($.headers.get("content-length")),[b,w]=l&&progressEventDecorator(y,progressEventReducer(asyncDecorator(l),!0))||[];$=new Response(trackStream($.body,DEFAULT_CHUNK_SIZE,b,()=>{w&&w(),v&&v()}),k)}c=c||"text";let _=await resolvers[utils$1.findKey(resolvers,c)||"text"]($,e);return!x&&v&&v(),await new Promise((k,y)=>{settle(k,y,{data:_,headers:AxiosHeaders$1.from($.headers),status:$.status,statusText:$.statusText,config:e,request:p})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,p),{cause:g.cause||g}):AxiosError$1.from(g,g&&g.code,e,p)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!isResolvedHandle(n)&&(r=knownAdapters[(i=String(n)).toLowerCase()],r===void 0))throw new AxiosError$1(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FormBuilder={},e.Vue))})(this,function(exports,vue){"use strict";const _hoisted_1$v={class:"w-full relative"},_hoisted_2$b={class:"text-[14px] font-medium text-gray-900 mb-2"},_hoisted_3$5={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$4={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$A=vue.defineComponent({__name:"vs-layout-default",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$v,[vue.createElementVNode("span",_hoisted_2$b,[vue.createElementVNode("span",null,vue.toDisplayString(e.ua||e.label),1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$5,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$4,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$u={class:"w-full relative flex flex-row items-center gap-2"},_hoisted_2$a={class:"text-sm text-gray-900 font-medium flex shrink-0 w-3/12"},_hoisted_3$4={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$3={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$z=vue.defineComponent({__name:"vs-layout-horizontal",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$u,[vue.createElementVNode("span",_hoisted_2$a,[vue.createTextVNode(vue.toDisplayString(e.ua||e.label)+" ",1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$4,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$3,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$t={class:"w-full relative"},_hoisted_2$9={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$y=vue.defineComponent({__name:"vs-layout-inline",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$t,[vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$9,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),layouts$1={default:_sfc_main$A,horizontal:_sfc_main$z,inline:_sfc_main$y};function useStyle(e){return{inputClass:vue.computed(()=>{const n=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return e?.size==="sm"?n+"h-[32px]":n+"h-[38px]"})}}const _hoisted_1$s=["placeholder","disabled"],_sfc_main$x=vue.defineComponent({__name:"vs-input-text",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$s)),[[vue.vModelText,r.value]])}}),_hoisted_1$r=["placeholder"],_sfc_main$w=vue.defineComponent({__name:"vs-input-number",props:vue.mergeModels({style:{type:Object,default:()=>({})},placeholder:{type:String,default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,class:vue.normalizeClass(["py-1.5 px-3 block w-full",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$r)),[[vue.vModelText,r.value]])}}),_hoisted_1$q=["disabled"],_sfc_main$v=vue.defineComponent({__name:"vs-input-switcher",props:vue.mergeModels({style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("button",{type:"button",class:vue.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[`bg-${e.style?.primaryColor||"blue"}-500`,e.customClass]]),disabled:e.disabled,onClick:r[0]||(r[0]=o=>t.value=!t.value)},[vue.createElementVNode("span",{"data-state":"checked",class:vue.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[t.value?"translate-x-4":"translate-x-0"]])},null,2)],10,_hoisted_1$q))}}),_hoisted_1$p=["innerHTML"],_sfc_main$u=vue.defineComponent({__name:"vs-input-static",props:{html:{type:String,default:""},customClass:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(e.customClass),innerHTML:e.html},null,10,_hoisted_1$p))}}),_hoisted_1$o=["placeholder","disabled"],_sfc_main$t=vue.defineComponent({__name:"vs-input-mask",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$o)),[[vue.vModelText,r.value]])}}),_hoisted_1$n=["value","disabled"],_hoisted_2$8={class:"text-[13px] text-gray-700"},_sfc_main$s=vue.defineComponent({__name:"vs-input-radio-default",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center gap-0",[e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$n),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",{class:vue.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${e.style?.primaryColor||"blue"}-500`,e.disabled?"opacity-50 cursor-not-allowed":""]])},[t.value==e.value?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${e.style?.primaryColor||"blue"}-500`]])},null,2)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("span",_hoisted_2$8,vue.toDisplayString(e.text),1)],2))}}),_hoisted_1$m=["value","disabled"],_hoisted_2$7={class:"text-[13px] text-gray-700"},_sfc_main$r=vue.defineComponent({__name:"vs-input-radio-buttons",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[t.value==e.value?`ring-2 ring-ring ring-${e.style?.primaryColor||"blue"}-500`:"",e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$m),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",_hoisted_2$7,vue.toDisplayString(e.text),1)],2))}}),layouts={"vs-input-radio-default":_sfc_main$s,"vs-input-radio-buttons":_sfc_main$r},_sfc_main$q=vue.defineComponent({__name:"vs-input-radio",props:vue.mergeModels({options:{type:Array,required:!0},position:{type:String,default:"vertical"},view:{type:String,default:"default"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.computed(()=>layouts[`vs-input-radio-${t.view}`]);return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.options,l=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps({key:l?.id,text:l.text,value:l.id.toString(),checked:n.value===l.id,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;let i;for(r=0;r<l;r++)i=s[r],t.call(null,e[i],i,e)}}function findKey(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(r,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(r)?t[s]=merge(t[s],r):isPlainObject(r)?t[s]=merge({},r):isArray(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&forEach(arguments[r],n);return t}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(o,s)=>{n&&isFunction(o)?e[s]=bind(o,n):e[s]=o},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let o,s,l;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)l=o[s],(!r||r(l,e,t))&&!i[l]&&(t[l]=e[l],i[l]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(o,s)=>{let l;(l=t(o,s,e))!==!1&&(r[s]=l||o)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,o)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=isArray(r)?[]:{};return forEach(r,(l,i)=>{const c=n(l,o+1);!isUndefined(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,r)=>(_global.addEventListener("message",({source:o,data:s})=>{o===_global&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,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:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["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(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,o,s)=>{const l=Object.create(prototype$1);return utils$1.toFlatObject(e,l,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),AxiosError$1.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,s&&Object.assign(l,s),l};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!utils$1.isUndefined(m[v])});const r=n.metaTokens,o=n.visitor||a,s=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(utils$1.isDate(p))return p.toISOString();if(utils$1.isBoolean(p))return p.toString();if(!c&&utils$1.isBlob(p))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(p)||utils$1.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function a(p,v,m){let g=p;if(p&&!m&&typeof p=="object"){if(utils$1.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(utils$1.isArray(p)&&isFlatArray(p)||(utils$1.isFileList(p)||utils$1.endsWith(v,"[]"))&&(g=utils$1.toArray(p)))return v=removeBrackets(v),g.forEach(function($,_){!(utils$1.isUndefined($)||$===null)&&t.append(l===!0?renderKey([v],_,s):l===null?v:v+"[]",u($))}),!1}return isVisitable(p)?!0:(t.append(renderKey(m,v,s),u(p)),!1)}const d=[],f=Object.assign(predicates,{defaultVisitor:a,convertValue:u,isVisitable});function h(p,v){if(!utils$1.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),utils$1.forEach(p,function(g,x){(!(utils$1.isUndefined(g)||g===null)&&o.call(t,g,utils$1.isString(x)?x.trim():x,v,f))===!0&&h(g,v?v.concat(x):[x])}),d.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return h(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])},prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(r){r!==null&&t(r)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return platform.isNode&&utils$1.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function formDataToJSON(e){function t(n,r,o,s){let l=n[s++];if(l==="__proto__")return!0;const i=Number.isFinite(+l),c=s>=n.length;return l=!l&&utils$1.isArray(o)?o.length:l,c?(utils$1.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!i):((!o[l]||!utils$1.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],s)&&utils$1.isArray(o[l])&&(o[l]=arrayToObject(o[l])),!i)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(r,o)=>{t(parsePropPath(r),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=utils$1.isObject(t);if(s&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((i=utils$1.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(l)throw i.name==="SyntaxError"?AxiosError$1.from(i,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.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"]),parseHeaders=e=>{const t={};let n,r,o;return e&&e.split(`
2
+ `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,o){if(utils$1.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!utils$1.isString(t)){if(utils$1.isString(r))return t.indexOf(r)!==-1;if(utils$1.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,l){return this[r].call(this,t,o,s,l)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,u){const a=normalizeHeader(c);if(!a)throw new Error("header name must be a non-empty string");const d=utils$1.findKey(o,a);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||c]=normalizeValue(i))}const l=(i,c)=>utils$1.forEach(i,(u,a)=>s(u,a,c));if(utils$1.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))l(parseHeaders(t),n);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let i={},c,u;for(const a of t){if(!utils$1.isArray(a))throw TypeError("Object iterator must return a key-value pair");i[u=a[0]]=(c=i[u])?utils$1.isArray(c)?[...c,a[1]]:[c,a[1]]:a[1]}l(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return parseTokens(o);if(utils$1.isFunction(n))return n.call(this,o,r);if(utils$1.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||matchHeaderValue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(l){if(l=normalizeHeader(l),l){const i=utils$1.findKey(r,l);i&&(!n||matchHeaderValue(r,r[i],i,n))&&(delete r[i],o=!0)}}return utils$1.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||matchHeaderValue(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return utils$1.forEach(this,(o,s)=>{const l=utils$1.findKey(r,s);if(l){n[l]=normalizeValue(o),delete n[s];return}const i=t?formatHeader(s):String(s).trim();i!==s&&delete n[s],n[i]=normalizeValue(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils$1.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&utils$1.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function s(l){const i=normalizeHeader(l);r[i]||(buildAccessors(o,l),r[i]=!0)}return utils$1.isArray(t)?t.forEach(s):s(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const n=this||defaults,r=t||n,o=AxiosHeaders$1.from(r.headers);let s=r.data;return utils$1.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,l;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=r[s];l||(l=u),n[o]=c,r[o]=u;let d=s,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-l<t)return;const h=a&&u-a;return h?Math.round(f*1e3/h):void 0}}function throttle(e,t){let n=0,r=1e3/t,o,s;const l=(u,a=Date.now())=>{n=a,o=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const a=Date.now(),d=a-n;d>=r?l(u,a):(o=u,s||(s=setTimeout(()=>{s=null,l(o)},r-d)))},()=>o&&l(o)]}const progressEventReducer=(e,t,n=3)=>{let r=0;const o=speedometer(50,250);return throttle(s=>{const l=s.loaded,i=s.lengthComputable?s.total:void 0,c=l-r,u=o(c),a=l<=i;r=l;const d={loaded:l,total:i,progress:i?l/i:void 0,bytes:c,rate:u||void 0,estimated:u&&i&&a?(i-l)/u:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},progressEventDecorator=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const l=[e+"="+encodeURIComponent(t)];utils$1.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),utils$1.isString(r)&&l.push("path="+r),utils$1.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||n==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(u,a,d,f){return utils$1.isPlainObject(u)&&utils$1.isPlainObject(a)?utils$1.merge.call({caseless:f},u,a):utils$1.isPlainObject(a)?utils$1.merge({},a):utils$1.isArray(a)?a.slice():a}function o(u,a,d,f){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(u))return r(void 0,u,d,f)}else return r(u,a,d,f)}function s(u,a){if(!utils$1.isUndefined(a))return r(void 0,a)}function l(u,a){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(u))return r(void 0,u)}else return r(void 0,a)}function i(u,a,d){if(d in t)return r(u,a);if(d in e)return r(void 0,u)}const c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:i,headers:(u,a,d)=>o(headersToObject(u),headersToObject(a),d,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),function(a){const d=c[a]||o,f=d(e[a],t[a],a);utils$1.isUndefined(f)&&d!==i||(n[a]=f)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:l,auth:i}=t;t.headers=l=AxiosHeaders$1.from(l),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&l.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(utils$1.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[u,...a]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];l.setContentType([u||"multipart/form-data",...a].join("; "))}}if(platform.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(t)),r||r!==!1&&isURLSameOrigin(t.url))){const u=o&&s&&cookies.read(s);u&&l.set(o,u)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,r){const o=resolveConfig(e);let s=o.data;const l=AxiosHeaders$1.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:u}=o,a,d,f,h,p;function v(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(a),o.signal&&o.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function g(){if(!m)return;const $=AxiosHeaders$1.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:$,config:e,request:m};settle(function(b){n(b),v()},function(b){r(b),v()},k),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||transitionalDefaults;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),r(new AxiosError$1(_,k.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,m)),m=null},s===void 0&&l.setContentType(null),"setRequestHeader"in m&&utils$1.forEach(l.toJSON(),function(_,k){m.setRequestHeader(k,_)}),utils$1.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),i&&i!=="json"&&(m.responseType=o.responseType),u&&([f,p]=progressEventReducer(u,!0),m.addEventListener("progress",f)),c&&m.upload&&([d,h]=progressEventReducer(c),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(a=$=>{m&&(r(!$||$.type?new CanceledError$1(null,e,m):$),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(a),o.signal&&(o.signal.aborted?a():o.signal.addEventListener("abort",a)));const x=parseProtocol(o.url);if(x&&platform.protocols.indexOf(x)===-1){r(new AxiosError$1("Unsupported protocol "+x+":",AxiosError$1.ERR_BAD_REQUEST,e));return}m.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,i();const a=u instanceof Error?u:this.reason;r.abort(a instanceof AxiosError$1?a:new CanceledError$1(a instanceof Error?a.message:a))}};let l=t&&setTimeout(()=>{l=null,s(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const i=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>utils$1.asap(i),c}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{const o=readBytes(e,t);let s=0,l,i=c=>{l||(l=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await o.next();if(u){i(),c.close();return}let d=a.byteLength;if(n){let f=s+=d;n(f)}c.enqueue(new Uint8Array(a))}catch(u){throw i(u),u}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,r)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,t)=>{const n=utils$1.toFiniteNumber(e.getContentLength());return n??getBodyLength(t)},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:l,onDownloadProgress:i,onUploadProgress:c,responseType:u,headers:a,withCredentials:d="same-origin",fetchOptions:f}=resolveConfig(e);u=u?(u+"").toLowerCase():"text";let h=composeSignals([o,s&&s.toAbortSignal()],l),p;const v=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&supportsRequestStream&&n!=="get"&&n!=="head"&&(m=await resolveBodyLength(a,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),y;if(utils$1.isFormData(r)&&(y=k.headers.get("content-type"))&&a.setContentType(y),k.body){const[b,w]=progressEventDecorator(m,progressEventReducer(asyncDecorator(c)));r=trackStream(k.body,DEFAULT_CHUNK_SIZE,b,w)}}utils$1.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let x=await fetch(p,f);const $=supportsResponseStream&&(u==="stream"||u==="response");if(supportsResponseStream&&(i||$&&v)){const k={};["status","statusText","headers"].forEach(E=>{k[E]=x[E]});const y=utils$1.toFiniteNumber(x.headers.get("content-length")),[b,w]=i&&progressEventDecorator(y,progressEventReducer(asyncDecorator(i),!0))||[];x=new Response(trackStream(x.body,DEFAULT_CHUNK_SIZE,b,()=>{w&&w(),v&&v()}),k)}u=u||"text";let _=await resolvers[utils$1.findKey(resolvers,u)||"text"](x,e);return!$&&v&&v(),await new Promise((k,y)=>{settle(k,y,{data:_,headers:AxiosHeaders$1.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:p})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,p),{cause:g.cause||g}):AxiosError$1.from(g,g&&g.code,e,p)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let l;if(r=n,!isResolvedHandle(n)&&(r=knownAdapters[(l=String(n)).toLowerCase()],r===void 0))throw new AxiosError$1(`Unknown adapter '${l}'`);if(r)break;o[l||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=t?s.length>1?`since :
4
4
  `+s.map(renderReason).join(`
5
- `):" "+renderReason(s[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(r){return throwIfCancellationRequested(e),r.data=transformData.call(e,e.transformResponse,r),r.headers=AxiosHeaders$1.from(r.headers),r},function(r){return isCancel$1(r)||(throwIfCancellationRequested(e),r&&r.response&&(r.response.data=transformData.call(e,e.transformResponse,r.response),r.response.headers=AxiosHeaders$1.from(r.response.headers))),Promise.reject(r)})}const VERSION$1="1.10.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,n,r){function o(s,i){return"[Axios v"+VERSION$1+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,l)=>{if(t===!1)throw new AxiosError$1(o(i," has been removed"+(n?" in "+n:"")),AxiosError$1.ERR_DEPRECATED);return n&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,l):!0}},validators$1.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function assertOptions(e,t,n){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const l=e[s],u=l===void 0||i(l,s,e);if(u!==!0)throw new AxiosError$1("option "+s+" must be "+u,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError$1("Unknown option "+s,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.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(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig$1(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!=null&&(utils$1.isFunction(o)?n.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),validator.assertOptions(n,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&utils$1.merge(s.common,s[n.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=AxiosHeaders$1.concat(i,s);const l=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let a,d=0,f;if(!u){const p=[dispatchRequest.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,c),f=p.length,a=Promise.resolve(n);d<f;)a=a.then(p[d++],p[d++]);return a}f=l.length;let h=n;for(d=0;d<f;){const p=l[d++],v=l[d++];try{h=p(h)}catch(m){v.call(this,m);break}}try{a=dispatchRequest.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=c.length;d<f;)a=a.then(c[d++],c[d++]);return a}getUri(t){t=mergeConfig$1(this.defaults,t);const n=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(n,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(t){Axios$1.prototype[t]=function(n,r){return this.request(mergeConfig$1(r||{},{method:t,url:n,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,l){return this.request(mergeConfig$1(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Axios$1.prototype[t]=n(),Axios$1.prototype[t+"Form"]=n(!0)});let CancelToken$1=class C{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(l=>{r.subscribe(l),s=l}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,l){r.reason||(r.reason=new CanceledError$1(s,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new C(function(o){t=o}),cancel:t}}};function spread$1(e){return function(n){return e.apply(null,n)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={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(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return createInstance(mergeConfig$1(e,o))},n}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(t){return Promise.all(t)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_sfc_main$q={},_hoisted_1$m={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function _sfc_render$b(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$m,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const IconCheck=_export_sfc(_sfc_main$q,[["render",_sfc_render$b]]),_sfc_main$p={},_hoisted_1$l={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-chevron-down"};function _sfc_render$a(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$l,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const IconChevronDown=_export_sfc(_sfc_main$p,[["render",_sfc_render$a]]),_sfc_main$o={},_hoisted_1$k={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"};function _sfc_render$9(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$k,t[0]||(t[0]=[vue.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),vue.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const IconChevronTopBottom=_export_sfc(_sfc_main$o,[["render",_sfc_render$9]]),_sfc_main$n={},_hoisted_1$j={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"};function _sfc_render$8(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$j,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),vue.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const IconClose=_export_sfc(_sfc_main$n,[["render",_sfc_render$8]]),dynamicPosition=async(e,t,n,r=10)=>{if(!t||!n)return;await vue.nextTick();const o=await n?.getBoundingClientRect(),s=await t?.getBoundingClientRect();if(!s||!o)return;const i=await parseInt(t?.getBoundingClientRect()?.height.toString()),l=await parseInt(t?.getBoundingClientRect()?.width.toString()),u=await parseInt(n?.getBoundingClientRect()?.height.toString()),c=await parseInt(n?.getBoundingClientRect()?.width.toString()),a=await window.innerHeight,d=await window.innerWidth;let f=0,h=0;const p=s.bottom+r+u;switch(e){case"top":s.top-o.height-r<0?f=s.top-o.height+r+u+i:f=s.top-o.height-r,d>c+s.right+30?h=s.left-o.width/2+s.width/2:h=d-30-c;break;case"bottom":a>p?f=s.bottom+r:f=s.bottom-r-u-i,h=s.left-o.width/2+s.width/2;break;case"left":f=s.top-o.height/2+s.height/2,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"right":f=s.top-o.height/2+s.height/2,d-l>c?h=s.right+r:h=d-30-c;break;case"top-right":s.top-o.height-r<0?f=s.top-o.height+r+u+i:f=s.top-o.height-r,d-l>c?h=s.right+r:h=d-30-c;break;case"top-left":s.top-o.height-r<0?f=s.top-o.height+r+u+i:f=s.top-o.height-r,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"top-start":s.top-o.height-r<0?f=s.top-o.height+r+u+i:f=s.top-o.height-r,s.left>0?h=s.left:h=10;break;case"bottom-right":a>p?f=s.bottom+r:f=s.bottom-r-u-i,d-l>c?h=s.left:h=d-30-c;break;case"bottom-left":a>p?f=s.bottom+r:f=s.bottom-r-u-i,s.left>0?h=s.right-c:h=10;break;case"bottom-start":a>p?f=s.bottom+r:f=s.bottom-r-u-i,s.left>0?h=s.left:h=10;break}f+u>a?f=a-u-r:f<0&&(f=r),h+c>d?h=d-c-r:h<0&&(h=r),n instanceof HTMLElement&&(n.style.top=`${f}px`,n.style.left=`${h}px`,n.style.position="fixed")},_hoisted_1$i=["disabled"],_hoisted_2$5={key:1},_hoisted_3$2={key:2,class:"text-gray-400"},_hoisted_4$2={class:"absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none"},_hoisted_5=["onClick"],_hoisted_6={class:"flex items-center gap-[8px] w-full"},_hoisted_7={key:1},_sfc_main$m=vue.defineComponent({__name:"vs-input-select",props:vue.mergeModels({placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:null},options:{default:()=>[]},maxHeight:{default:400},slots:{default:null},customClass:{default:""},style:{default:()=>({})},disabled:{type:Boolean}},{modelValue:{type:[Number,String],default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue"),o=vue.ref({}),s=vue.ref(null),i=vue.ref(null),l=vue.ref(!1),u=vue.ref(null),c=vue.ref([]),a=vue.ref(-1),d=vue.ref([]),f=vue.computed(()=>c.value?.length?[u.value,...c.value?.filter(y=>y?.id!==u.value?.id)].filter(y=>y!==null):[]),h=async()=>{try{const{data:y}=await axios.get(`${t.host}/${t.prefix}/suggest/${t.data}?json=1`);return y.data}catch{return[]}},p=async y=>{document.body.click(),l.value=y!==void 0?y:!l.value,l.value&&!c.value?.length&&(!t.options?.length&&t.data?c.value=await h():t.options?.length&&(c.value=[...t.options])),l.value&&s.value?(o.value.width=`${s.value.getBoundingClientRect()?.width}px`,i.value&&dynamicPosition("bottom-start",s.value,i.value)):a.value=-1},v=()=>l.value?p(!1):null,m=y=>{u.value=y,r.value=y.id,p(!1)},g=(y,b)=>{if(!y||!b)return;const w=y.offsetTop,E=w+y.offsetHeight,S=b.scrollTop,B=S+b.clientHeight;w<S?b.scrollTop=w-80:E>B&&(b.scrollTop=E-b.clientHeight+4)},$=y=>{if(!l.value)return;const{keyCode:b}=y;if([38,40,13].includes(b)&&y.preventDefault(),b==38){if(a.value==0)return;a.value-=1,g(d.value[a.value],i.value)}else if(b==40){if(a.value+1>=f.value?.length)return;a.value+=1,g(d.value[a.value],i.value)}else if(b==13){const w=f.value[a.value];w&&m(w)}},x=async y=>{if(l.value)return;const{keyCode:b}=y;[38,40].includes(b)&&(await y.preventDefault(),a.value=0,setTimeout(()=>p()))},_=y=>{l.value&&s.value&&i.value&&!i.value.contains(y.target)&&(l.value=!1)},k=y=>{y?.key==="Escape"&&l.value&&p(!1)};return vue.onMounted(async()=>{addEventListener("click",v),addEventListener("keydown",$),addEventListener("scroll",_,!0),addEventListener("keydown",k),r.value&&!t.options?.length&&t.data&&(c.value=await h(),u.value=c.value?.find(y=>y?.id===r.value)||null)}),vue.onUnmounted(()=>{removeEventListener("click",v),removeEventListener("keydown",$),removeEventListener("scroll",_,!0),removeEventListener("keydown",k)}),(y,b)=>(vue.openBlock(),vue.createElementBlock("div",{class:"relative w-full",ref_key:"select",ref:s,onClick:b[3]||(b[3]=vue.withModifiers(()=>{},["stop"]))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] pr-[60px] bg-white w-[calc(100%)] overflow-ellipsis",[l.value?`ring-rind ring-2 ring-${y.style?.primaryColor||"blue"}-500`:"",vue.unref(n),y.customClass]]),onKeydown:x,onClick:b[0]||(b[0]=w=>p(!l.value)),disabled:y.disabled,style:{border:"1px solid #e0e0e0"}},[u.value?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:u.value?.color})},null,4)):vue.createCommentVNode("",!0),u.value?.text?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$5,vue.toDisplayString(u.value?.text),1)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$2,vue.toDisplayString(y.placeholder),1))],42,_hoisted_1$i),vue.createElementVNode("span",_hoisted_4$2,[vue.createVNode(vue.unref(IconChevronTopBottom),{height:"14",width:"14"})]),u.value?.text?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=w=>{r.value=null,u.value=null}),class:"absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"},[vue.createVNode(vue.unref(IconClose),{height:"14",width:"14"})])):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.Teleport,{to:"body"},[vue.withDirectives(vue.createElementVNode("ul",{class:"z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-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",ref_key:"list",ref:i,style:vue.normalizeStyle({width:o.value.width,maxHeight:y.maxHeight+"px",backgroundColor:"white"}),onClick:b[2]||(b[2]=vue.withModifiers(()=>{},["stop"]))},[f.value?.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b[4]||(b[4]=vue.createElementVNode("li",{class:"sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"}," Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ",-1)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,(w,E)=>(vue.openBlock(),vue.createElementBlock("li",{onClick:S=>m(w),key:w?.id,ref_for:!0,ref:S=>d.value[E]=S,class:vue.normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-800 hover:bg-gray-100 rounded-lg",[a.value==E?"bg-gray-100":""]])},[vue.createElementVNode("span",_hoisted_6,[w?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:w?.color})},null,4)):vue.createCommentVNode("",!0),vue.createTextVNode(" "+vue.toDisplayString(w?.text),1)]),r.value==w?.id?(vue.openBlock(),vue.createBlock(vue.unref(IconCheck),{key:0,height:"14",width:"14","stroke-width":"2",class:"absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"})):vue.createCommentVNode("",!0)],10,_hoisted_5))),128))],64)):(vue.openBlock(),vue.createElementBlock("li",_hoisted_7,"Дані відсутні"))],4),[[vue.vShow,l.value]])]))],512))}}),_hoisted_1$h=["disabled"],_sfc_main$l=vue.defineComponent({__name:"vs-input-switcher",props:vue.mergeModels({style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("button",{type:"button",class:vue.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[`bg-${e.style?.primaryColor||"blue"}-500`,e.customClass]]),disabled:e.disabled,onClick:r[0]||(r[0]=o=>t.value=!t.value)},[vue.createElementVNode("span",{"data-state":"checked",class:vue.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[t.value?"translate-x-4":"translate-x-0"]])},null,2)],10,_hoisted_1$h))}}),_hoisted_1$g=["innerHTML"],_sfc_main$k=vue.defineComponent({__name:"vs-input-static",props:{html:{type:String,default:""},customClass:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(e.customClass),innerHTML:e.html},null,10,_hoisted_1$g))}}),_hoisted_1$f={class:"flex items-center justify-between"},_hoisted_2$4={class:"grid gap-3"},_sfc_main$j=vue.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$f,[vue.createElementVNode("p",null,vue.toDisplayString(e.title),1),vue.createVNode(_sfc_main$l,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),style:vue.normalizeStyle(e.style)},null,8,["modelValue","style"])]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_2$4,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerSwitcher=_export_sfc(_sfc_main$j,[["__scopeId","data-v-34f848b8"]]),_hoisted_1$e={class:"grid gap-3"},_sfc_main$i=vue.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>n.value=!n.value),class:"flex items-center gap-2"},[vue.createVNode(vue.unref(IconChevronDown),{class:vue.normalizeClass(["h-4 w-4 duration-300",[n.value?"-rotate-180":""]])},null,8,["class"]),vue.createElementVNode("span",null,vue.toDisplayString(e.title),1)]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_1$e,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerAccordion=_export_sfc(_sfc_main$i,[["__scopeId","data-v-896e4c89"]]),_hoisted_1$d={class:"flex items-center justify-between"},_sfc_main$h=vue.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$d,[vue.createElementVNode("p",null,vue.toDisplayString(e.title),1)]),vue.renderSlot(t.$slots,"default")]))}}),views={switcher:VsContainerSwitcher,accordion:VsContainerAccordion,default:_sfc_main$h},FormConditionsTypes={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},checkEqual=(e,t)=>e===t,checkInequal=(e,t)=>e!==t,checkHigher=(e,t)=>e>t,checkHigherOrEqual=(e,t)=>e>=t,checkLower=(e,t)=>e<t,checkLowerOrEqual=(e,t)=>e<=t,checkBetween=(e,t)=>Array.isArray(t)&&t.length===2?e>=t[0]&&e<=t[1]:!1,checkStartWith=(e,t)=>String(e).startsWith(String(t)),checkEndWith=(e,t)=>String(e).endsWith(String(t)),checkContain=(e,t)=>String(e).includes(String(t)),checkIn=(e,t)=>Array.isArray(t)?t.includes(e):!1,checkNotIn=(e,t)=>Array.isArray(t)?!t.includes(e):!0,isVisible=(e,t)=>{if(!t)return!0;switch(t?.[1]){case FormConditionsTypes.Equal:return checkEqual(e,t?.[2]);case FormConditionsTypes.Inequal:return checkInequal(e,t?.[2]);case FormConditionsTypes.Higer:return checkHigher(e,t?.[2]);case FormConditionsTypes.HigerOrEqual:return checkHigherOrEqual(e,t?.[2]);case FormConditionsTypes.Lower:return checkLower(e,t?.[2]);case FormConditionsTypes.LowerOrEqual:return checkLowerOrEqual(e,t?.[2]);case FormConditionsTypes.Between:return checkBetween(e,t?.[2]);case FormConditionsTypes.StartWith:return checkStartWith(e,t?.[2]);case FormConditionsTypes.EndWith:return checkEndWith(e,t?.[2]);case FormConditionsTypes.Contain:return checkContain(e,t?.[2]);case FormConditionsTypes.In:return checkIn(e,t?.[2]);case FormConditionsTypes.NotIn:return checkNotIn(e,t?.[2]);default:return!0}},_sfc_main$g=vue.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},schema:{type:Array,default:()=>[]}},setup(e){const t=e,n=vue.inject("formValues",{default:{}}),r=vue.inject("form"),o=vue.computed(()=>t.schema?.filter(i=>{const l=i?.conditions;if(!l)return!0;const u=Array.isArray(l)?l[0]:l,c=n?.value?.[u];return isVisible(c,l)})),s=vue.computed(()=>views[t.view]);return(i,l)=>e.schema?.length?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(s.value),{key:0,title:e.title,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,u=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:u.name},{ref_for:!0},u,{item:u,modelValue:vue.unref(n)[u.name],"onUpdate:modelValue":c=>vue.unref(n)[u.name]=c,style:e.style,error:vue.unref(r)?.errors?.[u.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"]))),128))]),_:1},8,["title","style"])):vue.createCommentVNode("",!0)}}),_hoisted_1$c={class:"flex items-center gap-[4px]"},_hoisted_2$3=["value","id","disabled"],_hoisted_3$1=["for"],_hoisted_4$1={class:"text-[13px] text-gray-500 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},_sfc_main$f=vue.defineComponent({__name:"vs-checkbox-default",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},modelValue:Boolean,info:{type:String,default:()=>""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,o=vue.computed({get:()=>r.modelValue,set:s=>n("update:modelValue",s)});return(s,i)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",value:e.value,"onUpdate:modelValue":i[0]||(i[0]=l=>o.value=l),class:vue.normalizeClass(["shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":e.disabled}]),id:e.id,disabled:e.disabled},null,10,_hoisted_2$3),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("label",{for:e.id,class:vue.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":e.disabled}])},[vue.createElementVNode("div",{class:vue.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600":"bg-white"]])},[vue.createVNode(IconCheck,{height:"12",width:"12"})],2),vue.createElementVNode("span",_hoisted_4$1,[vue.renderSlot(s.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],10,_hoisted_3$1)]))}}),_hoisted_1$b=["name","value","disabled"],_hoisted_2$2={class:"flex items-center gap-[6px] text-[14px]"},_hoisted_3={key:0,class:"text-[16px]"},_hoisted_4=["src"],_sfc_main$e=vue.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{type:[String,Number],default:""},modelValue:{type:[Array,String,Boolean],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},icon:{type:String},imgUrl:{type:String},style:{type:Object,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.computed({get:()=>n.modelValue,set:l=>{r("update:modelValue",l)}}),s=vue.computed(()=>Array.isArray(o.value)?o.value.includes(n.value):o.value===!0||o.value===n.value),i=vue.computed(()=>n.style?.size==="xs"?"p-1.5 text-xs":n.style?.size==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs");return(l,u)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[i.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",class:"hidden",name:e.id,value:e.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,_hoisted_1$b),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("span",_hoisted_2$2,[e.icon||e.imgUrl?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,[e.icon?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(e.icon)},null,2)):vue.createCommentVNode("",!0),e.imgUrl?(vue.openBlock(),vue.createElementBlock("img",{key:1,src:e.imgUrl,width:"16",height:"16",alt:"icon"},null,8,_hoisted_4)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.renderSlot(l.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],2))}}),VsCheckboxViews={"vs-checkbox-default":_sfc_main$f,"vs-checkbox-buttons":_sfc_main$e},_hoisted_1$a={class:"flex items-center"},_sfc_main$d=vue.defineComponent({__name:"vs-input-checkbox-item",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},view:{type:String,default:()=>"default"},modelValue:{type:[Array,Boolean],default:!1},icon:{type:String},imgUrl:{type:String},slots:{type:Object,default:()=>null},option:{type:[Object,String]},style:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=vue.computed({get:()=>Array.isArray(n.modelValue)?Array.isArray(n.modelValue)&&n.modelValue.includes(n.value):n.modelValue,set:l=>{if(Array.isArray(n.modelValue)){let u=[...n.modelValue];l?u.includes(n.value)||u.push(n.value):u=u.filter(c=>c!==n.value),r("update:modelValue",u)}else r("update:modelValue",l)}}),i=vue.ref("vs-checkbox-"+(n.view||"default"));return(l,u)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$a,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(VsCheckboxViews)?.[i.value]),{value:e.value,label:e.label,info:e.option?.info,disabled:e.disabled,modelValue:s.value,"onUpdate:modelValue":u[0]||(u[0]=c=>s.value=c),id:o,icon:e.icon,imgUrl:e.imgUrl,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style"]))]))}}),_sfc_main$c=vue.defineComponent({__name:"vs-input-checkbox",props:{options:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:!1},position:{default:()=>"vertical"},slots:{type:Object,default:()=>null},view:{type:String,default:()=>null},colSpan:{type:Number,default:()=>0},data:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.ref([]),s=vue.reactive({}),i=a=>a?.value||a?.id||a?.text||a,l=a=>a.text||String(a),u=a=>`lg:col-span-${a||12}`,c=async()=>{try{const{data:a}=await axios.get(`/api/suggest/${n.data}`);o.value=a?.data||a}catch(a){console.error(a)}};return vue.watch(()=>n.modelValue,a=>{if(typeof a=="boolean"&&o.value.length===1){const d=i(o.value[0]);s[d]=a}else if(Array.isArray(a)){const d=new Set(a);o.value.forEach(f=>{if(!f.disabled){const h=i(f);s[h]=d.has(h)}})}},{immediate:!0}),vue.watch(s,()=>{if(!o.value.length){r("update:modelValue",null);return}const a=Object.entries(s).filter(([,d])=>d).map(([d])=>d);r("update:modelValue",a.length===0?null:a)},{deep:!0}),vue.onMounted(()=>{if(n.data)c().then(()=>{if(typeof n.modelValue=="boolean"&&o.value.length===1){const a=i(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=i(d);s[f]=a.has(f)}})}});else if(o.value=n.options,typeof n.modelValue=="boolean"&&o.value.length===1){const a=i(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=i(d);s[f]=a.has(f)}})}}),(a,d)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["p-0 w-full gap-[6px]",[e.position==="vertical"?"flex-col":"",e.colSpan?"grid":"flex justify-start"]])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,f=>(vue.openBlock(),vue.createBlock(_sfc_main$d,{modelValue:s[i(f)],"onUpdate:modelValue":h=>s[i(f)]=h,value:i(f),class:vue.normalizeClass(u(e.colSpan)),disabled:f.disabled,label:l(f),key:i(f),icon:f?.icon,imgUrl:f?.imgUrl,option:f,slots:e.slots,view:e.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","slots","view"]))),128))],2))}}),VsInputCheckbox=_export_sfc(_sfc_main$c,[["__scopeId","data-v-06e7be2f"]]),fileUpload=async(e,t,n,r)=>{try{const o=new FormData;o.append("unique","true"),o.append("file",e);const{data:s}=await axios.post(`/file/upload/uploads?id=${t||""}&form=${n||""}&table=${r||""}`,o);return s}catch(o){console.error(o)}},fileDelete=async e=>{try{return await axios.get(`file/delete${e}`),!0}catch(t){return console.error(t),!1}},fileDownload=async e=>{try{const t=await axios.get(`file/download/files/uploads${e}`,{responseType:"arraybuffer",headers:{"Content-Type":"application/json"}}),n=t.headers["content-type"],r=new TextDecoder("utf-8").decode(t.data),o=new Blob([r],{type:n}),s=document.createElement("a");s.setAttribute("download",e),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},_sfc_main$b={},_hoisted_1$9={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"};function _sfc_render$7(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$9,t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5 12h14"},null,-1),vue.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const IconPlus=_export_sfc(_sfc_main$b,[["render",_sfc_render$7]]),_sfc_main$a={},_hoisted_1$8={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$6(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$8,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const iconPdf=_export_sfc(_sfc_main$a,[["render",_sfc_render$6]]),_sfc_main$9={},_hoisted_1$7={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$5(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$7,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),vue.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),vue.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const IconCsv=_export_sfc(_sfc_main$9,[["render",_sfc_render$5]]),_sfc_main$8={},_hoisted_1$6={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-file-unknown"};function _sfc_render$4(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$6,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>',5)]))}const IconFile=_export_sfc(_sfc_main$8,[["render",_sfc_render$4]]),_sfc_main$7={},_hoisted_1$5={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$3(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$5,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const IconZip=_export_sfc(_sfc_main$7,[["render",_sfc_render$3]]),_sfc_main$6={},_hoisted_1$4={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$2(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$4,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const IconGeojson=_export_sfc(_sfc_main$6,[["render",_sfc_render$2]]),getFileType=e=>{if(!e)return"";const t=e?.split(".");return t[t.length-1]},fileFormatPreview=e=>{const t=getFileType(e),n={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return n.imageFormat.includes(t)?"img":n.sheetsFormat.includes(t)?IconCsv:n.textsFormat.includes(t)?IconGeojson:n.documentsFormat.includes(t)?iconPdf:n.archivesFormat.includes(t)?IconZip:IconFile},_sfc_main$5={},_hoisted_1$3={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-trash"};function _sfc_render$1(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$3,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const IconDelete=_export_sfc(_sfc_main$5,[["render",_sfc_render$1]]),_sfc_main$4={},_hoisted_1$2={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-download"};function _sfc_render(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$2,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),vue.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),vue.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const IconDownload=_export_sfc(_sfc_main$4,[["render",_sfc_render]]),_hoisted_1$1={class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-gray-300 rounded-lg overflow-hidden relative item-file"},_hoisted_2$1={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},_sfc_main$3=vue.defineComponent({__name:"vs-input-file-list-item",props:vue.mergeModels({multiple:{type:Boolean}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(e){const t=vue.useModel(e,"value"),n=vue.useModel(e,"item"),r=e;return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(fileFormatPreview)(n.value)),{src:n.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=i=>vue.unref(fileDownload)(n.value))},null,8,["src"])),vue.createElementVNode("div",_hoisted_2$1,[vue.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=i=>{vue.unref(fileDelete)(n.value),t.value=r.multiple?t.value?.filter(l=>l!==n.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[vue.createVNode(IconDelete,{class:"w-4 h-4"})]),vue.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=i=>vue.unref(fileDownload)(n.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[vue.createVNode(IconDownload,{class:"w-4 h-4"})])])]))}}),VsInputFileListItem=_export_sfc(_sfc_main$3,[["__scopeId","data-v-147e810a"]]),_hoisted_1={class:"flex items-center gap-x-2"},_hoisted_2={key:1,class:"flex items-center flex-wrap gap-2"},_sfc_main$2=vue.defineComponent({__name:"vs-input-file",props:vue.mergeModels({multiple:{type:Boolean},format:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.ref(null),o=i=>Array.isArray(n.value)&&n.value[i]||"",s=async i=>{if(t.format){const c=i.target.files?.[0];if(!c||!c.name.endsWith(t.format))return}const l=i.target.files?.[0];if(!l)return;const u=await fileUpload(l,"1","form","table");n.value=t.multiple?[...n.value||[],u.result?.file_path]:u.result?.file_path};return(i,l)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:r,type:"file",onChange:s},null,544),!i.multiple&&n.value?(vue.openBlock(),vue.createBlock(VsInputFileListItem,{key:0,item:n.value,"onUpdate:item":l[0]||(l[0]=u=>n.value=u),value:n.value,"onUpdate:value":l[1]||(l[1]=u=>n.value=u)},null,8,["item","value"])):i.multiple?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.value,(u,c)=>(vue.openBlock(),vue.createBlock(VsInputFileListItem,{multiple:i.multiple,key:c,value:n.value,"onUpdate:value":l[2]||(l[2]=a=>n.value=a),item:o(c)},null,8,["multiple","value","item"]))),128)),vue.createElementVNode("div",{onClick:l[3]||(l[3]=u=>!i.disabled&&r.value?.click()),class:vue.normalizeClass(["h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center transition-all duration-300",i.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2)])):vue.createCommentVNode("",!0),i.multiple?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:l[4]||(l[4]=u=>r.value?.click()),class:vue.normalizeClass([i.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2))]))}}),inputs={VsInputText:_sfc_main$v,VsInputRadio:_sfc_main$r,"vs-input-text":_sfc_main$v,"vs-input-number":_sfc_main$u,"vs-input-radio":_sfc_main$r,"vs-input-select":_sfc_main$m,"vs-input-switcher":_sfc_main$l,"vs-input-static":_sfc_main$k,"vs-input-container":_sfc_main$g,"vs-input-checkbox":VsInputCheckbox,"vs-input-file":_sfc_main$2},_sfc_main$1=vue.defineComponent({__name:"vs-compact-form-layout",props:{type:{type:String,default:""},style:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},layout:{type:String,default:"default"}},setup(e){const t=e,n=vue.computed(()=>layouts$1[`${t.layout}`]),r=vue.computed(()=>inputs?.[`vs-input-${t.type}`]);return(o,s)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(n.value),vue.mergeProps(o.$attrs,{style:e.style,item:e.item}),{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps(o.$attrs,{style:e.style}),null,16,["style"]))]),_:1},16,["style","item"]))}}),formErrorsUa={required:"Це поле є обов’язковим",email:"Неправильний email"},required=e=>e?!1:formErrorsUa.required,email=e=>!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e?formErrorsUa.email:!1,regexp=(e,t)=>!t.pattern.test(e)&&e?t.message:!1,custom=(value,custom)=>{const func=eval(custom.function);return func(value)?!1:custom.message},checkFormRules=(e,t)=>{switch(typeof t=="string"?t:t.type){case"required":return required(e);case"email":return email(e);case"regexp":return regexp(e,t);case"custom":return custom(e,t);default:return!1}};function useForm(e,t){const n=vue.ref({}),r=(i=t,l=!0)=>{if(i.forEach(u=>{u.rules&&u.rules.forEach(c=>{n.value[u.name]=checkFormRules(e.value[u.name],c)}),u.schema&&r(u.schema,!1)}),l&&Object.values(n.value).some(Boolean))throw new Error("Помилка валідації")},o=vue.computed(()=>t?.filter(i=>{const l=i?.conditions;if(!l)return!0;const u=Array.isArray(l)?l[0]:l,c=e?.value?.[u];return isVisible(c,l)}));return{errors:n,validate:r,reset:()=>{e.value={},n.value={}},visibleSchema:o}}const _sfc_main=vue.defineComponent({__name:"vs-compact-form",props:vue.mergeModels({schema:{type:Array,default:()=>[]},style:{type:Object,default:()=>({})}},{form:{default:()=>({})},formModifiers:{},formValues:{default:()=>({})},formValuesModifiers:{}}),emits:vue.mergeModels(["handle-submit"],["update:form","update:formValues"]),setup(e,{emit:t}){const n=t,r=e,o=vue.useAttrs(),s=vue.useModel(e,"form"),i=vue.useModel(e,"formValues"),{errors:l,validate:u,reset:c,visibleSchema:a}=useForm(i,r.schema),d=()=>{u(),n("handle-submit",i.value)};return vue.onMounted(()=>{s.value.value=i.value,s.value.errors=l.value,s.value.reset=c,s.value.validate=u}),vue.provide("form",s),vue.provide("formValues",i),(f,h)=>(vue.openBlock(),vue.createElementBlock("form",{onSubmit:vue.withModifiers(d,["prevent"]),class:"grid grid-cols-12 gap-3"},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),p=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:p.name,class:`col-span-${p.col||12} `},{ref_for:!0},{...vue.unref(o),...e.style,...p},{item:p,modelValue:i.value[p.name],"onUpdate:modelValue":v=>i.value[p.name]=v,style:e.style,error:vue.unref(l)[p.name]}),null,16,["class","item","modelValue","onUpdate:modelValue","style","error"]))),128))],32))}});_sfc_main.install=function e(t){t.component("VForm",_sfc_main)},exports.VForm=_sfc_main,exports.VsInputText=_sfc_main$v,exports.default=_sfc_main,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
5
+ `):" "+renderReason(s[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(r){return throwIfCancellationRequested(e),r.data=transformData.call(e,e.transformResponse,r),r.headers=AxiosHeaders$1.from(r.headers),r},function(r){return isCancel$1(r)||(throwIfCancellationRequested(e),r&&r.response&&(r.response.data=transformData.call(e,e.transformResponse,r.response),r.response.headers=AxiosHeaders$1.from(r.response.headers))),Promise.reject(r)})}const VERSION$1="1.10.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,n,r){function o(s,l){return"[Axios v"+VERSION$1+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,i)=>{if(t===!1)throw new AxiosError$1(o(l," has been removed"+(n?" in "+n:"")),AxiosError$1.ERR_DEPRECATED);return n&&!deprecatedWarnings[l]&&(deprecatedWarnings[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,l,i):!0}},validators$1.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function assertOptions(e,t,n){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],l=t[s];if(l){const i=e[s],c=i===void 0||l(i,s,e);if(c!==!0)throw new AxiosError$1("option "+s+" must be "+c,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError$1("Unknown option "+s,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.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(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig$1(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!=null&&(utils$1.isFunction(o)?n.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),validator.assertOptions(n,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&utils$1.merge(s.common,s[n.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=AxiosHeaders$1.concat(l,s);const i=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,i.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,d=0,f;if(!c){const p=[dispatchRequest.bind(this),void 0];for(p.unshift.apply(p,i),p.push.apply(p,u),f=p.length,a=Promise.resolve(n);d<f;)a=a.then(p[d++],p[d++]);return a}f=i.length;let h=n;for(d=0;d<f;){const p=i[d++],v=i[d++];try{h=p(h)}catch(m){v.call(this,m);break}}try{a=dispatchRequest.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)a=a.then(u[d++],u[d++]);return a}getUri(t){t=mergeConfig$1(this.defaults,t);const n=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(n,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(t){Axios$1.prototype[t]=function(n,r){return this.request(mergeConfig$1(r||{},{method:t,url:n,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(t){function n(r){return function(s,l,i){return this.request(mergeConfig$1(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}Axios$1.prototype[t]=n(),Axios$1.prototype[t+"Form"]=n(!0)});let CancelToken$1=class C{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const l=new Promise(i=>{r.subscribe(i),s=i}).then(o);return l.cancel=function(){r.unsubscribe(s)},l},t(function(s,l,i){r.reason||(r.reason=new CanceledError$1(s,l,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new C(function(o){t=o}),cancel:t}}};function spread$1(e){return function(n){return e.apply(null,n)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={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(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return createInstance(mergeConfig$1(e,o))},n}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(t){return Promise.all(t)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_sfc_main$p={},_hoisted_1$l={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function _sfc_render$b(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$l,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const IconCheck=_export_sfc(_sfc_main$p,[["render",_sfc_render$b]]),_hoisted_1$k={class:"flex items-center gap-[4px]"},_hoisted_2$6=["value","id","disabled"],_hoisted_3$3=["for"],_hoisted_4$2={class:"text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},_sfc_main$o=vue.defineComponent({__name:"vs-checkbox-default",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},modelValue:Boolean,info:{type:String,default:()=>""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,o=vue.computed({get:()=>r.modelValue,set:s=>n("update:modelValue",s)});return(s,l)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",value:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>o.value=i),class:vue.normalizeClass(["shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":e.disabled}]),id:e.id,disabled:e.disabled},null,10,_hoisted_2$6),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("label",{for:e.id,class:vue.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":e.disabled}])},[vue.createElementVNode("div",{class:vue.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600":"bg-white"]])},[vue.createVNode(IconCheck,{height:"12",width:"12"})],2),vue.createElementVNode("span",_hoisted_4$2,[vue.renderSlot(s.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],10,_hoisted_3$3)]))}}),_hoisted_1$j=["name","value","disabled"],_hoisted_2$5={class:"flex items-center gap-[6px] text-[14px]"},_hoisted_3$2={key:0,class:"text-[16px]"},_hoisted_4$1=["src"],_sfc_main$n=vue.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{type:[String,Number],default:""},modelValue:{type:[Array,String,Boolean],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},icon:{type:String},imgUrl:{type:String},style:{type:Object,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.computed({get:()=>n.modelValue,set:i=>{r("update:modelValue",i)}}),s=vue.computed(()=>Array.isArray(o.value)?o.value.includes(n.value):o.value===!0||o.value===n.value),l=vue.computed(()=>n.style?.size==="xs"?"p-1.5 text-xs":n.style?.size==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs");return(i,c)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[l.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",class:"hidden",name:e.id,value:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),disabled:e.disabled},null,8,_hoisted_1$j),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("span",_hoisted_2$5,[e.icon||e.imgUrl?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$2,[e.icon?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(e.icon)},null,2)):vue.createCommentVNode("",!0),e.imgUrl?(vue.openBlock(),vue.createElementBlock("img",{key:1,src:e.imgUrl,width:"16",height:"16",alt:"icon"},null,8,_hoisted_4$1)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.renderSlot(i.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],2))}}),VsCheckboxViews={"vs-checkbox-default":_sfc_main$o,"vs-checkbox-buttons":_sfc_main$n},_hoisted_1$i={class:"flex items-center"},_sfc_main$m=vue.defineComponent({__name:"vs-input-checkbox-item",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},view:{type:String,default:()=>"default"},modelValue:{type:[Array,Boolean],default:!1},icon:{type:String},imgUrl:{type:String},slots:{type:Object,default:()=>null},option:{type:[Object,String]},style:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=vue.computed({get:()=>Array.isArray(n.modelValue)?Array.isArray(n.modelValue)&&n.modelValue.includes(n.value):n.modelValue,set:i=>{if(Array.isArray(n.modelValue)){let c=[...n.modelValue];i?c.includes(n.value)||c.push(n.value):c=c.filter(u=>u!==n.value),r("update:modelValue",c)}else r("update:modelValue",i)}}),l=vue.ref(`vs-checkbox-${n.view||"default"}`);return(i,c)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(VsCheckboxViews)?.[l.value]),{value:e.value,label:e.label,info:e.option?.info,disabled:e.disabled,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),id:o,icon:e.icon,imgUrl:e.imgUrl,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style"]))]))}}),_sfc_main$l=vue.defineComponent({__name:"vs-input-checkbox",props:{options:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:!1},position:{default:()=>"vertical"},slots:{type:Object,default:()=>null},view:{type:String,default:()=>null},colSpan:{type:Number,default:()=>0},data:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.ref([]),s=vue.reactive({}),l=a=>a?.value||a?.id||a?.text||a,i=a=>a.text||String(a),c=a=>`lg:col-span-${a||12}`,u=async()=>{try{const{data:a}=await axios.get(`/api/suggest/${n.data}`);o.value=a?.data||a}catch(a){console.error(a)}};return vue.watch(()=>n.modelValue,a=>{if(typeof a=="boolean"&&o.value.length===1){const d=l(o.value[0]);s[d]=a}else if(Array.isArray(a)){const d=new Set(a);o.value.forEach(f=>{if(!f.disabled){const h=l(f);s[h]=d.has(h)}})}},{immediate:!0}),vue.watch(s,()=>{if(!o.value.length){r("update:modelValue",null);return}const a=Object.entries(s).filter(([,d])=>d).map(([d])=>d);r("update:modelValue",a.length===0?null:a)},{deep:!0}),vue.onMounted(()=>{if(n.data)u().then(()=>{if(typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}});else if(o.value=n.options,typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}}),(a,d)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["p-0 w-full gap-[6px]",[e.position==="vertical"?"flex-col":"",e.colSpan?"grid":"flex justify-start"]])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,f=>(vue.openBlock(),vue.createBlock(_sfc_main$m,{modelValue:s[l(f)],"onUpdate:modelValue":h=>s[l(f)]=h,value:l(f),class:vue.normalizeClass(c(e.colSpan)),disabled:f.disabled,label:i(f),key:l(f),icon:f?.icon,imgUrl:f?.imgUrl,option:f,slots:e.slots,view:e.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","slots","view"]))),128))],2))}}),VsInputCheckbox=_export_sfc(_sfc_main$l,[["__scopeId","data-v-9685f778"]]),_hoisted_1$h=["placeholder","disabled"],_sfc_main$k=vue.defineComponent({__name:"vs-input-date1",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"date","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$h)),[[vue.vModelText,r.value]])}}),fileUpload=async(e,t,n,r)=>{try{const o=new FormData;o.append("unique","true"),o.append("file",e);const{data:s}=await axios.post(`/file/upload/uploads?id=${t||""}&form=${n||""}&table=${r||""}`,o);return s}catch(o){console.error(o)}},fileDelete=async e=>{try{return await axios.get(`file/delete${e}`),!0}catch(t){return console.error(t),!1}},fileDownload=async e=>{try{const t=await axios.get(`file/download/files/uploads${e}`,{responseType:"arraybuffer",headers:{"Content-Type":"application/json"}}),n=t.headers["content-type"],r=new TextDecoder("utf-8").decode(t.data),o=new Blob([r],{type:n}),s=document.createElement("a");s.setAttribute("download",e),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},_sfc_main$j={},_hoisted_1$g={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"};function _sfc_render$a(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$g,t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5 12h14"},null,-1),vue.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const IconPlus=_export_sfc(_sfc_main$j,[["render",_sfc_render$a]]),_sfc_main$i={},_hoisted_1$f={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$9(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$f,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const iconPdf=_export_sfc(_sfc_main$i,[["render",_sfc_render$9]]),_sfc_main$h={},_hoisted_1$e={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$8(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$e,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),vue.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),vue.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const IconCsv=_export_sfc(_sfc_main$h,[["render",_sfc_render$8]]),_sfc_main$g={},_hoisted_1$d={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-file-unknown"};function _sfc_render$7(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$d,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>',5)]))}const IconFile=_export_sfc(_sfc_main$g,[["render",_sfc_render$7]]),_sfc_main$f={},_hoisted_1$c={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$6(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$c,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const IconZip=_export_sfc(_sfc_main$f,[["render",_sfc_render$6]]),_sfc_main$e={},_hoisted_1$b={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$5(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$b,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const IconGeojson=_export_sfc(_sfc_main$e,[["render",_sfc_render$5]]),getFileType=e=>{if(!e)return"";const t=e?.split(".");return t[t.length-1]},fileFormatPreview=e=>{const t=getFileType(e),n={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return n.imageFormat.includes(t)?"img":n.sheetsFormat.includes(t)?IconCsv:n.textsFormat.includes(t)?IconGeojson:n.documentsFormat.includes(t)?iconPdf:n.archivesFormat.includes(t)?IconZip:IconFile},_sfc_main$d={},_hoisted_1$a={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-trash"};function _sfc_render$4(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$a,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const IconDelete=_export_sfc(_sfc_main$d,[["render",_sfc_render$4]]),_sfc_main$c={},_hoisted_1$9={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-download"};function _sfc_render$3(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$9,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),vue.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),vue.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const IconDownload=_export_sfc(_sfc_main$c,[["render",_sfc_render$3]]),_hoisted_1$8={class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},_hoisted_2$4={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},_sfc_main$b=vue.defineComponent({__name:"vs-input-file-list-item",props:vue.mergeModels({multiple:{type:Boolean}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(e){const t=vue.useModel(e,"value"),n=vue.useModel(e,"item"),r=e;return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(fileFormatPreview)(n.value)),{src:n.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=l=>vue.unref(fileDownload)(n.value))},null,8,["src"])),vue.createElementVNode("div",_hoisted_2$4,[vue.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=l=>{vue.unref(fileDelete)(n.value),t.value=r.multiple?t.value?.filter(i=>i!==n.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[vue.createVNode(IconDelete,{class:"w-4 h-4"})]),vue.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=l=>vue.unref(fileDownload)(n.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[vue.createVNode(IconDownload,{class:"w-4 h-4"})])])]))}}),VsInputFileListItem=_export_sfc(_sfc_main$b,[["__scopeId","data-v-bc0f6d32"]]),_hoisted_1$7={class:"flex items-center gap-x-2"},_hoisted_2$3={key:1,class:"flex items-center flex-wrap gap-2"},_sfc_main$a=vue.defineComponent({__name:"vs-input-file",props:vue.mergeModels({multiple:{type:Boolean},format:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.ref(null),o=l=>Array.isArray(n.value)&&n.value[l]||"",s=async l=>{if(t.format){const u=l.target.files?.[0];if(!u||!u.name.endsWith(t.format))return}const i=l.target.files?.[0];if(!i)return;const c=await fileUpload(i,"1","form","table");n.value=t.multiple?[...n.value||[],c.result?.file_path]:c.result?.file_path};return(l,i)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$7,[vue.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:r,type:"file",onChange:s},null,544),!l.multiple&&n.value?(vue.openBlock(),vue.createBlock(VsInputFileListItem,{key:0,item:n.value,"onUpdate:item":i[0]||(i[0]=c=>n.value=c),value:n.value,"onUpdate:value":i[1]||(i[1]=c=>n.value=c)},null,8,["item","value"])):l.multiple?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.value,(c,u)=>(vue.openBlock(),vue.createBlock(VsInputFileListItem,{multiple:l.multiple,key:u,value:n.value,"onUpdate:value":i[2]||(i[2]=a=>n.value=a),item:o(u)},null,8,["multiple","value","item"]))),128)),vue.createElementVNode("div",{onClick:i[3]||(i[3]=c=>!l.disabled&&r.value?.click()),class:vue.normalizeClass(["h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2)])):vue.createCommentVNode("",!0),l.multiple?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:i[4]||(i[4]=c=>r.value?.click()),class:vue.normalizeClass([l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2))]))}}),_hoisted_1$6={class:"flex items-center justify-between"},_hoisted_2$2={class:"text-[16px] text-gray-900 font-medium"},_hoisted_3$1={class:"grid gap-3"},_sfc_main$9=vue.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$6,[vue.createElementVNode("p",_hoisted_2$2,vue.toDisplayString(e.title),1),vue.createVNode(_sfc_main$v,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),style:vue.normalizeStyle(e.style)},null,8,["modelValue","style"])]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_3$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerSwitcher=_export_sfc(_sfc_main$9,[["__scopeId","data-v-479564a3"]]),_sfc_main$8={},_hoisted_1$5={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-chevron-down"};function _sfc_render$2(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$5,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const IconChevronDown=_export_sfc(_sfc_main$8,[["render",_sfc_render$2]]),_sfc_main$7={},_hoisted_1$4={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"};function _sfc_render$1(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$4,t[0]||(t[0]=[vue.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),vue.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const IconChevronTopBottom=_export_sfc(_sfc_main$7,[["render",_sfc_render$1]]),_sfc_main$6={},_hoisted_1$3={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"};function _sfc_render(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$3,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),vue.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const IconClose=_export_sfc(_sfc_main$6,[["render",_sfc_render]]),_hoisted_1$2={class:"text-[16px] text-gray-900 font-medium"},_hoisted_2$1={class:"grid gap-3"},_sfc_main$5=vue.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>n.value=!n.value),class:"flex items-center gap-2"},[vue.createVNode(vue.unref(IconChevronDown),{class:vue.normalizeClass(["h-4 w-4 duration-300",[n.value?"-rotate-180":""]])},null,8,["class"]),vue.createElementVNode("span",_hoisted_1$2,vue.toDisplayString(e.title),1)]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_2$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerAccordion=_export_sfc(_sfc_main$5,[["__scopeId","data-v-a37284e6"]]),_hoisted_1$1={class:"flex items-center justify-between"},_sfc_main$4=vue.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$1,[vue.createElementVNode("p",null,vue.toDisplayString(e.title),1)]),vue.renderSlot(t.$slots,"default")]))}}),views={switcher:VsContainerSwitcher,accordion:VsContainerAccordion,default:_sfc_main$4},FormConditionsTypes={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},checkEqual=(e,t)=>e===t,checkInequal=(e,t)=>e!==t,checkHigher=(e,t)=>e>t,checkHigherOrEqual=(e,t)=>e>=t,checkLower=(e,t)=>e<t,checkLowerOrEqual=(e,t)=>e<=t,checkBetween=(e,t)=>Array.isArray(t)&&t.length===2?e>=t[0]&&e<=t[1]:!1,checkStartWith=(e,t)=>String(e).startsWith(String(t)),checkEndWith=(e,t)=>String(e).endsWith(String(t)),checkContain=(e,t)=>String(e).includes(String(t)),checkIn=(e,t)=>Array.isArray(t)?t.includes(e):!1,checkNotIn=(e,t)=>Array.isArray(t)?!t.includes(e):!0,isVisible=(e,t)=>{if(!t)return!0;switch(t?.[1]){case FormConditionsTypes.Equal:return checkEqual(e,t?.[2]);case FormConditionsTypes.Inequal:return checkInequal(e,t?.[2]);case FormConditionsTypes.Higer:return checkHigher(e,t?.[2]);case FormConditionsTypes.HigerOrEqual:return checkHigherOrEqual(e,t?.[2]);case FormConditionsTypes.Lower:return checkLower(e,t?.[2]);case FormConditionsTypes.LowerOrEqual:return checkLowerOrEqual(e,t?.[2]);case FormConditionsTypes.Between:return checkBetween(e,t?.[2]);case FormConditionsTypes.StartWith:return checkStartWith(e,t?.[2]);case FormConditionsTypes.EndWith:return checkEndWith(e,t?.[2]);case FormConditionsTypes.Contain:return checkContain(e,t?.[2]);case FormConditionsTypes.In:return checkIn(e,t?.[2]);case FormConditionsTypes.NotIn:return checkNotIn(e,t?.[2]);default:return!0}},_sfc_main$3=vue.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},schema:{type:Array,default:()=>[]}},setup(e){const t=e,n=vue.inject("formValues",{default:{}}),r=vue.inject("form"),o=vue.computed(()=>t.schema?.filter(l=>{const i=l?.conditions;if(!i)return!0;const c=Array.isArray(i)?i[0]:i,u=n?.value?.[c];return isVisible(u,i)})),s=vue.computed(()=>views[t.view]);return(l,i)=>e.schema?.length?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(s.value),{key:0,title:e.title,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,c=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:c.name},{ref_for:!0},c,{item:c,modelValue:vue.unref(n)[c.name],"onUpdate:modelValue":u=>vue.unref(n)[c.name]=u,style:e.style,error:vue.unref(r)?.errors?.[c.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"]))),128))]),_:1},8,["title","style"])):vue.createCommentVNode("",!0)}}),dynamicPosition=async(e,t,n,r=10)=>{if(!t||!n)return;await vue.nextTick();const o=await n?.getBoundingClientRect(),s=await t?.getBoundingClientRect();if(!s||!o)return;const l=await parseInt(t?.getBoundingClientRect()?.height.toString()),i=await parseInt(t?.getBoundingClientRect()?.width.toString()),c=await parseInt(n?.getBoundingClientRect()?.height.toString()),u=await parseInt(n?.getBoundingClientRect()?.width.toString()),a=await window.innerHeight,d=await window.innerWidth;let f=0,h=0;const p=s.bottom+r+c;switch(e){case"top":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d>u+s.right+30?h=s.left-o.width/2+s.width/2:h=d-30-u;break;case"bottom":a>p?f=s.bottom+r:f=s.bottom-r-c-l,h=s.left-o.width/2+s.width/2;break;case"left":f=s.top-o.height/2+s.height/2,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"right":f=s.top-o.height/2+s.height/2,d-i>u?h=s.right+r:h=d-30-u;break;case"top-right":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d-i>u?h=s.right+r:h=d-30-u;break;case"top-left":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"top-start":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left>0?h=s.left:h=10;break;case"bottom-right":a>p?f=s.bottom+r:f=s.bottom-r-c-l,d-i>u?h=s.left:h=d-30-u;break;case"bottom-left":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.right-u:h=10;break;case"bottom-start":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.left:h=10;break}f+c>a?f=a-c-r:f<0&&(f=r),h+u>d?h=d-u-r:h<0&&(h=r),n instanceof HTMLElement&&(n.style.top=`${f}px`,n.style.left=`${h}px`,n.style.position="fixed")},_hoisted_1=["disabled"],_hoisted_2={key:1},_hoisted_3={key:2,class:"text-gray-400"},_hoisted_4={class:"absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none"},_hoisted_5=["onClick"],_hoisted_6={class:"flex items-center gap-[8px] w-full"},_hoisted_7={key:1},_sfc_main$2=vue.defineComponent({__name:"vs-input-select",props:vue.mergeModels({placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:null},options:{default:()=>[]},maxHeight:{default:400},slots:{default:null},customClass:{default:""},style:{default:()=>({})},disabled:{type:Boolean}},{modelValue:{type:[Number,String],default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue"),o=vue.ref({}),s=vue.ref(null),l=vue.ref(null),i=vue.ref(!1),c=vue.ref(null),u=vue.ref([]),a=vue.ref(-1),d=vue.ref([]),f=vue.computed(()=>u.value?.length?[c.value,...u.value?.filter(y=>y?.id!==c.value?.id)].filter(y=>y!==null):[]),h=async()=>{try{const{data:y}=await axios.get(`${t.host}/${t.prefix}/suggest/${t.data}?json=1`);return y.data}catch{return[]}},p=async y=>{document.body.click(),i.value=y!==void 0?y:!i.value,i.value&&!u.value?.length&&(!t.options?.length&&t.data?u.value=await h():t.options?.length&&(u.value=[...t.options])),i.value&&s.value?(o.value.width=`${s.value.getBoundingClientRect()?.width}px`,l.value&&dynamicPosition("bottom-start",s.value,l.value)):a.value=-1},v=()=>i.value?p(!1):null,m=y=>{c.value=y,r.value=y.id,p(!1)},g=(y,b)=>{if(!y||!b)return;const w=y.offsetTop,E=w+y.offsetHeight,S=b.scrollTop,B=S+b.clientHeight;w<S?b.scrollTop=w-80:E>B&&(b.scrollTop=E-b.clientHeight+4)},x=y=>{if(!i.value)return;const{keyCode:b}=y;if([38,40,13].includes(b)&&y.preventDefault(),b==38){if(a.value==0)return;a.value-=1,g(d.value[a.value],l.value)}else if(b==40){if(a.value+1>=f.value?.length)return;a.value+=1,g(d.value[a.value],l.value)}else if(b==13){const w=f.value[a.value];w&&m(w)}},$=async y=>{if(i.value)return;const{keyCode:b}=y;[38,40].includes(b)&&(await y.preventDefault(),a.value=0,setTimeout(()=>p()))},_=y=>{i.value&&s.value&&l.value&&!l.value.contains(y.target)&&(i.value=!1)},k=y=>{y?.key==="Escape"&&i.value&&p(!1)};return vue.onMounted(async()=>{addEventListener("click",v),addEventListener("keydown",x),addEventListener("scroll",_,!0),addEventListener("keydown",k),r.value&&!t.options?.length&&t.data&&(u.value=await h(),c.value=u.value?.find(y=>y?.id===r.value)||null)}),vue.onUnmounted(()=>{removeEventListener("click",v),removeEventListener("keydown",x),removeEventListener("scroll",_,!0),removeEventListener("keydown",k)}),(y,b)=>(vue.openBlock(),vue.createElementBlock("div",{class:"relative w-full",ref_key:"select",ref:s,onClick:b[3]||(b[3]=vue.withModifiers(()=>{},["stop"]))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis",[i.value?`ring-rind ring-2 ring-${y.style?.primaryColor||"blue"}-500`:"",c.value?.text?"pr-[50px]":"pr-[25px]",vue.unref(n),y.customClass]]),onKeydown:$,onClick:b[0]||(b[0]=w=>p(!i.value)),disabled:y.disabled,style:{border:"1px solid #CFD9E0"}},[c.value?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:c.value?.color})},null,4)):vue.createCommentVNode("",!0),c.value?.text?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2,vue.toDisplayString(c.value?.text),1)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,vue.toDisplayString(y.placeholder),1))],42,_hoisted_1),vue.createElementVNode("span",_hoisted_4,[vue.createVNode(vue.unref(IconChevronTopBottom),{height:"14",width:"14"})]),c.value?.text?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=w=>{r.value=null,c.value=null}),class:"absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"},[vue.createVNode(vue.unref(IconClose),{height:"14",width:"14"})])):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.Teleport,{to:"body"},[vue.withDirectives(vue.createElementVNode("ul",{class:"z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-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",ref_key:"list",ref:l,style:vue.normalizeStyle({width:o.value.width,maxHeight:y.maxHeight+"px",backgroundColor:"white"}),onClick:b[2]||(b[2]=vue.withModifiers(()=>{},["stop"]))},[f.value?.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b[4]||(b[4]=vue.createElementVNode("li",{class:"sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"}," Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ",-1)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,(w,E)=>(vue.openBlock(),vue.createElementBlock("li",{onClick:S=>m(w),key:w?.id,ref_for:!0,ref:S=>d.value[E]=S,class:vue.normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg",[a.value==E?"bg-gray-100":""]])},[vue.createElementVNode("span",_hoisted_6,[w?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:w?.color})},null,4)):vue.createCommentVNode("",!0),vue.createTextVNode(" "+vue.toDisplayString(w?.text),1)]),r.value==w?.id?(vue.openBlock(),vue.createBlock(vue.unref(IconCheck),{key:0,height:"14",width:"14","stroke-width":"2",class:"absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"})):vue.createCommentVNode("",!0)],10,_hoisted_5))),128))],64)):(vue.openBlock(),vue.createElementBlock("li",_hoisted_7,"Дані відсутні"))],4),[[vue.vShow,i.value]])]))],512))}}),inputs={VsInputText:_sfc_main$x,VsInputRadio:_sfc_main$q,"vs-input-text":_sfc_main$x,"vs-input-mask":_sfc_main$t,"vs-input-number":_sfc_main$w,"vs-input-radio":_sfc_main$q,"vs-input-select":_sfc_main$2,"vs-input-switcher":_sfc_main$v,"vs-input-static":_sfc_main$u,"vs-input-container":_sfc_main$3,"vs-input-date":_sfc_main$k,"vs-input-checkbox":VsInputCheckbox,"vs-input-file":_sfc_main$a},_sfc_main$1=vue.defineComponent({__name:"vs-compact-form-layout",props:{type:{type:String,default:""},style:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},layout:{type:String,default:"default"}},setup(e){const t=e,n=vue.computed(()=>layouts$1[`${t.layout}`]),r=vue.computed(()=>inputs?.[`vs-input-${t.type}`]);return(o,s)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(n.value),vue.mergeProps(o.$attrs,{style:e.style,item:e.item}),{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps(o.$attrs,{style:e.style}),null,16,["style"]))]),_:1},16,["style","item"]))}}),formErrorsUa={required:"Це поле є обов’язковим",email:"Неправильний email"},required=e=>e?!1:formErrorsUa.required,email=e=>!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e?formErrorsUa.email:!1,regexp=(e,t)=>!t.pattern.test(e)&&e?t.message:!1,custom=(value,custom)=>{const func=eval(custom.function);return func(value)?!1:custom.message},checkFormRules=(e,t)=>{switch(typeof t=="string"?t:t.type){case"required":return required(e);case"email":return email(e);case"regexp":return regexp(e,t);case"custom":return custom(e,t);default:return!1}},mathTable={autocomplete:"select",combobox:"select",email:"text",textarea:"text",datepicker:"date",markedtext:"text"};function convertType(e){const t=e.toLowerCase();return mathTable[t]||t}function convertSchema(e){if(Array.isArray(e))return e;const t=[];return Object.entries(e).forEach(n=>{const r={name:n[0],...n[1],type:convertType(n[1].type),label:n[1].label||n[1].ua};n[1].data&&(r.api=`/api/suggest/${n[1].data}`),t.push(r)}),t}function useForm(e,t){const n=convertSchema(t),r=vue.ref({}),o=(i=n,c=!0)=>{if(i.forEach(u=>{u.rules&&u.rules.forEach(a=>{r.value[u.name]=checkFormRules(e.value[u.name],a)}),u.schema&&o(u.schema,!1)}),c&&Object.values(r.value).some(Boolean))throw new Error("Помилка валідації")},s=vue.computed(()=>n?.filter(i=>{const c=i?.conditions;if(!c)return!0;const u=Array.isArray(c)?c[0]:c,a=e?.value?.[u];return isVisible(a,c)}));return{errors:r,validate:o,reset:()=>{e.value={},r.value={}},visibleSchema:s}}const _sfc_main=vue.defineComponent({__name:"vs-compact-form",props:vue.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},layout:{default:()=>"default"}},{form:{default:()=>({})},formModifiers:{},values:{default:()=>({})},valuesModifiers:{}}),emits:vue.mergeModels(["handle-submit"],["update:form","update:values"]),setup(e,{emit:t}){const n=t,r=e,o=vue.useAttrs(),s=vue.useModel(e,"form"),l=vue.useModel(e,"values"),{errors:i,validate:c,reset:u,visibleSchema:a}=useForm(l,r.schema),d=()=>{c(),n("handle-submit",l.value)};return vue.onMounted(()=>{s.value.value=l.value,s.value.errors=i.value,s.value.reset=u,s.value.validate=c}),vue.provide("form",s),vue.provide("values",l),(f,h)=>(vue.openBlock(),vue.createElementBlock("form",{onSubmit:vue.withModifiers(d,["prevent"]),class:vue.normalizeClass(["grid grid-cols-12",f.layout==="default"?"gap-6":"gap-4"])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),p=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:p.name,class:`col-span-${p.col||12} `},{ref_for:!0},{...vue.unref(o),...f.style,...p},{item:p,layout:f.layout,modelValue:l.value[p.name],"onUpdate:modelValue":v=>l.value[p.name]=v,style:f.style,error:vue.unref(i)[p.name]}),null,16,["class","item","layout","modelValue","onUpdate:modelValue","style","error"]))),128))],34))}});_sfc_main.install=function e(t){t.component("VForm",_sfc_main)},exports.VForm=_sfc_main,exports.VsInputText=_sfc_main$x,exports.default=_sfc_main,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@opengis/form",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "A flexible and extensible Vue form library",
5
5
  "private": false,
6
6
  "type": "module",
7
- "main": "index.js",
7
+ "main": "dist/index.js",
8
8
  "homepage": "https://form.opengis.info/",
9
9
  "keywords": [
10
10
  "vuejs",