vue-composable
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0-beta.5
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=r(n);function a(e){return t.isRef(e)?e.value:e}function u(e){return t.isRef(e)?e:t.ref(e)}const l=Array.isArray,s=e=>"function"==typeof e,i=e=>"string"==typeof e,c=e=>"boolean"==typeof e,v=e=>f(e)&&s(e.getTime),d=e=>"number"==typeof e,f=e=>null!==e&&"object"==typeof e,m=e=>f(e)&&!!e.tagName;function p(e){return f(e)&&s(e.then)&&s(e.catch)}const h=()=>{},g=()=>!1,y={passive:!0};function w(e){return new Promise(t=>{setTimeout(t,e)})}function b(e,t,n){return e<t?t:e>n?n:e}const E="undefined"!=typeof window;function S(e,...t){for(let n=0;n<t.length;n++){const r=t[n];if(void 0===r||!f(r))continue;const o=Object.keys(r);for(let t=0;t<o.length;t++){const n=o[t],u=a(r[n]),l=typeof u,s=typeof e[n];void 0!==e[n]&&l!==s||(e[n]=f(u)?S(e[n]||{},u):r[n])}}return e}const M=t.set;function $(e){return t.computed(()=>a(e))}function k(e,n,r,o){let a=h;if(e){const l=u(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,o),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});a=()=>{s(l.value),c()}}return a}function I(e,t,n){return L(e,t,n)}function L(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const x=["mousedown","touchstart"];function R(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=c(n)?[n,!1]:f(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),l=t.ref(null),s=t.ref(),i=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&c(t[t.length-1])?t[t.length-1]:o,r=s.value=e(...t);try{const e=await r;return s.value===r&&(l.value=e),e}catch(e){return s.value===r&&(u.value=e,l.value=null),n?r:void 0}finally{s.value===r&&(a.value=!1)}};return r||i(),{exec:i,result:l,promise:s,loading:a,error:u}}function C(e,n){const r=t.ref(!1);let o=void 0;const a=R((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||f(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const O=Symbol(""),P=Symbol(""),T=async(e,t,n,r)=>{const o=t[O].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||j;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let s=void 0;do{let e=!1,i=null;try{if(++a,i=r?n(...r):n(),p(i)&&(i=await i),t[P].value)return null;e=!0}catch(e){i=null,t.retryErrors.value.push(e)}if(o!==t[O].value)return i;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,i;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const c=Date.now(),f=l(a),m=p(f)?await f:f;if(!p(f)||m){if(d(m))s=m;else{if(!v(m))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof m}'`);s=m.getTime()}s<c?t.nextRetry.value=c+s:(t.nextRetry.value=s,s-=c),s>0&&await w(s)}if(t[P].value)return null;if(o!==t[O].value)return i}while(a<9e3);return null};const j=()=>0;function A(e){return e&&(c(e.isJson)||c(e.parseImmediate)||c(e.unmountCancel))}let D=void 0;let F=void 0,U=void 0;let V=void 0,W=void 0;function z(e,n){const r=E&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=h,c=h,v=h;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},y),r.addEventListener("message",e=>{a.value=e,o.value=e.data},y),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function B(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function N(e,t,n){e.style.setProperty(t,n)}const _={attributes:!0,childList:!0,subtree:!0},H=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const K=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function q(e){const n=!!E&&"matchMedia"in window;let r=void 0,o=void 0,a=h;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,y);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function J(e,n){const{addListener:r,send:o,close:a,supported:u}=z(e,()=>g()),l=Date.now(),s=t.ref(!1),i=t.ref(0),c=t.computed(()=>1!==i.value||s.value),v=t.ref([]),d=t.ref(n);let m=!1,p=void 0;o({type:0});const h=()=>o({type:5,id:l}),g=()=>{0!==v.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...v.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:d.value,mind:i.value});break;case 4:{const t=v.value.indexOf(e.data.id);t>=0&&v.value.splice(t,1),p===e.data.id&&v.value.length>0&&o({type:3,mind:1,id:Math.min(l,...v.value)});break}case 2:m=!0,d.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,p=1===e.data.mind&&e.data.id||void 0,s.value=p===l,s.value&&(v.value=[],h());break;case 5:v.value=[e.data.id],o({type:6,id:l});break;case 6:v.value.push(e.data.id)}},y),h(),t.watch(d,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(d.value=t);o({type:2,mind:i.value,value:f(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),E&&window.addEventListener("unload",g,y),t.onUnmounted(()=>{g(),a()}),{supported:u,id:l,data:d,master:s,mind:i,editable:c,targets:v,ping:h,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function Q(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function X(e,n){const r=u(n),o=u(e);return f(r.value)||t.isRef(n)?[void 0!==o.value?o:void 0,r]:!f(o.value)||l(o.value)||i(o.value)?[o.value?o:void 0,void 0]:[void 0,o]}function Y(e,n){const[r,o]=X(e,n),u=t.computed(()=>new Intl.NumberFormat(a(r),a(o))),l=(e,t,n)=>(t||n?new Intl.NumberFormat(a(n)||a(r),{...a(o),...a(t)}):u.value).format(a(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function G(e){if(e)return d(e)?e:Z(e)}const Z=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function ee(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=G(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=q(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=E?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:h,s=I(l,10),i=E?()=>window.removeEventListener("resize",s):h;return E&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,y)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const te=Symbol(""),ne={sm:640,md:768,lg:1024,xl:1280};function re(e){return f(e)&&f(e.theme)&&f(e.theme.screens)}function oe(e){return!!f(e)&&(i(e.min)||i(e.max)||d(e.min)||d(e.max))}function ae(e){return d(e)?e+"px":e}function ue(e){const t=[];if(l(e)){const n=e.map(ue);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else f(n=e)&&i(n.raw)?t.push(e.raw):oe(e)?t.push(function(e){return oe(e)?`(${[e.max&&"max-width: "+ae(e.max),e.min&&"min-width: "+ae(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(i(e)||d(e))&&t.push(`(min-width: ${ae(e)})`);var n;return t}function le(e){const n=re(e)?e.theme.screens:e;if(re(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];f(t)?n[e]=ue(n[e]).join(" or "):i(t)&&(t.endsWith("px")||(n[e]=ue(n[e]).join(" or ")))}const r=ee(n);return t.provide(te,r),r}function se(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function ie(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return se(t,e)}}function ce(e,t){try{return e.parse(t)}catch{return t}}let ve=void 0;function de(e,n=JSON,r=10){const o=E?window[e]:void 0,a=ie(o);ve||(ve=new Map,E&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ve.get("localStorage");t=e.storageArea===window.localStorage?ve.get("localStorage"):ve.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let l,s=ve.get(e);return a&&o?s?l=s.$quotaError:(l=t.ref(!1),s={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:l,key:o.key,length:o.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),o.removeItem(e)},getItem(e){const t=o.getItem(e);return t?this.setItem(e,ce(n,t)):null},setItem(e,a){const s=u(a);this.$refMap.set(e,s);const c=(e,t)=>{try{const r=o.getItem(e),a=i(t)?t:n.stringify(t);o.setItem(e,a),r!==a&&E&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:a,oldValue:r,storageArea:o}))}catch(e){l.value=se(e,o)}};c(e,a);const v=t.watch(s,L(t=>{c(e,t)},r),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),s},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ce(n,t))}},ve.set(e,s)):(l=t.ref(!1),s={}),{supported:a,quotaError:l,store:s,remove:()=>ve.delete(e)}}function fe(e,n,r){const{supported:o,store:a}=de("localStorage");let u=h,l=h,s=h,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function me(e,n,r){const{supported:o,store:a}=de("sessionStorage");let u=h,l=h,s=g,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let pe=void 0;function he(e){const n=u(e.currentPage),r=u(e.pageSize),o=t.ref(0),a=u(e.total),l=t.computed({get:()=>o.value,set(e){d(e)&&(o.value=Math.min(e,a.value))}}),s=t.computed({get:()=>n.value,set(e){d(e)&&(n.value=b(e,1,c.value),l.value=(n.value-1)*i.value)}}),i=t.computed({get:()=>r.value,set(e){d(e)&&(r.value=e)}}),c=t.computed(()=>Math.ceil(a.value/i.value));s.value=n.value;return t.watch([a,i],e=>{s.value>c.value&&(s.value=c.value)},{immediate:!1}),{pageSize:i,total:a,currentPage:s,offset:l,lastPage:c,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=c.value}}function ge(e){const n=e&&e.refreshMs||1e3,r=!e||!c(e.sync)||e.sync,o=e&&s(e.timeFn)&&e.timeFn||Date.now;let a=void 0,u=void 0;const l=t.ref(o()),i=()=>{clearInterval(a),clearTimeout(u)},v=E?()=>a=setInterval(()=>l.value=o(),n):h;if(r){const e=1e3-(l.value-1e3*Math.floor(l.value/1e3));u=setTimeout(v,e)}else v();return t.onUnmounted(i),{now:l,remove:i}}function ye(e,n){return t.computed(()=>{const r=a(e);if(!n)return r;const o=t.isRef(n)?t.reactive(n.value):t.reactive(n);return r.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const n=l(o)?o[+t]:o[t];return void 0===n?e:""+a(n)})})}function we(e,n,r=".",o=h){return t.computed(()=>{const t=a(e),u=a(n);if(void 0===t)return o(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!f(s))return o(l.slice(0,e+1).join(r),s,u,t);if(!n)return o(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return o(l.slice(0,e+1).join(r),s,u,t)}return s})}function be(e){return void 0!==e.$value}const Ee=(e,n,r)=>{const{$message:o,$validator:u,...l}=function(e){return f(e)}(n)?n:{$validator:n,$message:void 0},{$pending:s,$promise:i,$invalid:c,$error:v}=((e,n,r,o)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=n(e,c);p(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=a(e),i.value=!0,e))};return o.push(r=>{c=r,t.watch(()=>{try{n(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(o),r);return{$pending:s,$error:v,$promise:i,$invalid:c,$message:o,...l}},Se=(e,n)=>{const r={},o=be(e)?u(e.$value):void 0;for(const u of Object.keys(e))if("$"!==u[0])if(o){const t=Ee(o,e[u],n);r[u]={...t,$value:o}}else{const o=Se(e[u],n);let l,s,i=void 0;if(be(o)){const e=Object.keys(o).filter(e=>"$"!==e[0]).map(e=>o[e]);l=t.computed(()=>e.map(e=>e.$error).map(e=>a(e)).filter(Boolean)),s=t.computed(()=>e.some(e=>!!a(e.$invalid)))}else{const e=Object.keys(o).map(e=>o[e]);l=t.computed(()=>e.map(e=>a(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),i=t.computed(()=>e.some(e=>e.$anyDirty||c(a(e.$dirty))&&a(e.$dirty))),s=t.computed(()=>e.some(e=>!!a(e.$anyInvalid)))}r[u]={...o,$errors:l,$anyInvalid:s},i&&(r[u].$anyDirty=i)}else{if("$value"===u){r[u]=o;const e=t.ref(!1),n=t.watch(o,()=>{e.value=!0,n()},{immediate:!1,deep:!0});r.$dirty=e;continue}r[u]=e[u]}return r};const Me=Symbol("");function $e(e){const n=t.ref(Object.keys(e.messages)),r=t.ref(e.messages),l=t.ref(e.locale),i=t.ref({});let v=t.ref();const d={},f=(e,n)=>{if(d[e])return d[e];const r=n.value[e];if(!r)return t.ref({});let o=s(r)?r():r;return p(o)?o.then(t=>d[e]=u(t)):s(r)?u(o):d[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!c(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(m){const t=f(e.fallback,r);p(t)?(t.then(e=>{v.value=e.value}),h=!0):v.value=t.value}else v.value={};const g=t.ref(0);t.watch(r,()=>g.value++,{deep:!0,immediate:!1}),t.watch([l,v,g],([t,n,o])=>{if(t===e.fallback&&m)i.value=n;else{const e=e=>i.value=S({},n,a(e)),o=f(t,r);p(o)?o.then(e):e(o)}},{immediate:!h});const y=(t,n)=>e.resolve?u(e.resolve(i.value,t,n)):ye(we(i,t,".",(e,t,n,r)=>n),n);return{locale:l,locales:n,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{n.value.indexOf(e)>=0||n.value.push(e),delete d[e],M(r.value,e,t)},removeLocale:t=>{const a=n.value.indexOf(t);if(a>=0){const r=[l.value,v.value&&e.fallback,...n.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(v.value=void 0),t===l.value&&(l.value=r)),n.value.splice(a,1)}var u,s;u=r.value,s=t,o.delete(u,s),delete d[t]}}}function ke(e){const n=$e(e);return t.provide(Me,n),n}const Ie=Symbol("");const Le=Symbol(""),xe={install(e){$(t.ref(!0))}};return e.COMMIT="7e79920",e.FALSE_OP=g,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=h,e.PASSIVE_EV=y,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.4",e.VUE_VERSION="2",e.buildI18n=$e,e.debounce=L,e.deepClone=S,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(l(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=B,e.hydrationPlugin=xe,e.injectFactory=Q,e.isArray=l,e.isBoolean=c,e.isClient=E,e.isDate=v,e.isElement=m,e.isFunction=s,e.isNumber=d,e.isObject=f,e.isPromise=p,e.isString=i,e.isSymbol=e=>"symbol"==typeof e,e.minMax=b,e.noDelay=j,e.promisedTimeout=w,e.provideSSRTitle=function(e,t){const n=u(void 0===t?"":t);return e.provide(Ie,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.$vnode.tag;if(!o)return t.ref(e);const{data:a,supported:u}=J(o,e);return a},e.setBreakpointTailwindCSS=le,e.setCssVariableFor=N,e.setI18n=ke,e.storageAvailable=ie,e.unwrap=a,e.useArrayPagination=function(e,n){const r=u(e),o=he({currentPage:1,pageSize:10,...n,total:t.computed(()=>r.value.length)}),a=t.computed(()=>{const e=r.value;return Array.isArray(e)?e.slice(o.offset.value,o.offset.value+o.pageSize.value):[]});return{...o,result:a}},e.useBreakpoint=ee,e.useBreakpointChrome=function(){return ee({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return Q(te,()=>le(e||ne))},e.useBroadcastChannel=z,e.useCancellablePromise=C,e.useCssVariables=function(e,n,r){const o=E&&"MutationObserver"in self,[l,s]=t.isRef(n)||m(n)?[n,r||_]:[o&&document.documentElement||{},n||_],c=t.ref(!0),v={},d=[],f=Object.entries(e).map(e=>{const[t,n]=i(e[1])?[e[1]]:[e[1].name,e[1].value];return n&&(d.push(()=>N(a(l),t,a(n))),v[e[0]]=u(n)),[e[0],H(t)]});for(let e=0;e<f.length;e++){const[n,r]=f[e];v[n]||(v[n]=t.ref(t.isRef(l)&&!l.value||!o?null:B(a(l),r))),o&&t.watch([v[n],u(l)],e=>{c&&e[1]&&e[0]!==B(e[1],r)&&N(e[1],r,e[0])},{immediate:!t.isRef(l)})}if(!o)return{...v,stop:h,resume:h,supported:o,observing:c};const p=()=>{for(let e=0;e<f.length;e++){const[t,n]=f[e];v[t].value=B(a(l),n)}},g=new MutationObserver(p),y=()=>{g.disconnect(),c.value=!1},w=()=>{c.value||p(),g.observe(a(l),s),c.value=!0};return t.onUnmounted(y),t.isRef(l)?t.onMounted(()=>{d.forEach(e=>e()),t.watch(l,(e,t)=>{t&&y(),e&&w()})}):(E||l)&&(d.forEach(e=>e()),w()),{...v,supported:o,resume:w,stop:y,observing:c}},e.useCurrencyFormat=function(e,n,r){const o=a(e),u=!f(o),l=u?e:t.computed(()=>a(e).currency),[s,i]=X(n,u?r:e),c=t.computed(()=>{const e=a(i)||{},t=a(l)||e.currency;return{style:"currency",...e,currency:t}}),v=Y(s),d=(e,t,n,r,o)=>{const u={...c.value,...a(r)},l=a(t)||u.currency,s=a(n)||u.currencyDisplay;return v.formatString(e,{...u,currency:l,currencyDisplay:s},o)};return{format:(e,n,r,o,a)=>t.computed(()=>d(e,n,r,o,a)),formatString:d}},e.useDateNow=function(e){return ge({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=I,e.useEvent=k,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),u=t.ref(null),[l,s,c]=A(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:A(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?i(e)?n:A(e)?e:i(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=R(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[l?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,u.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];s&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(i(e)||i(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:u,status:g,statusText:y}},e.useFormat=ye,e.useGeolocation=function(e){const n=E&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(e&&e.enableHighAccuracy||null);let s=h;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},i=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,i,e);s=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([l,r],t=>{v();const r=c(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,i,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:s,error:o,timestamp:a,coords:u,highAccuracy:l}},e.useHydration=function(){return t.inject(Le,t.computed(()=>!1))},e.useI18n=function(e){return e?ke(e):t.inject(Me)},e.useIntersectionObserver=function(e,n){const r=E&&"IntersectionObserver"in window,o=e?u(e):void 0,l=!o||!m(o.value)&&o.value?void 0:o,s=t.computed(()=>n?a(n):l?void 0:a(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),v=e=>{i.value=e};let d=t.ref();r&&t.watch(s,e=>{d.value&&d.value.disconnect();const t=e&&e&&{root:a(e.root),rootMargin:a(e.rootMargin),threshold:a(e.threshold)}||void 0;d.value=new IntersectionObserver(v,t);i.value.map(e=>e.target).forEach(d.value.observe)},{deep:!0,immediate:!0});const f=r?e=>{const t=a(e);d.value.observe(t)}:h,p=r?e=>{const t=a(e);d.value.unobserve(t)}:h,g=()=>d.value.disconnect();return l&&(t.onMounted(()=>{l.value&&f(l)}),t.onUnmounted(()=>{g()})),{supported:r,elements:i,observe:f,unobserve:p,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return d(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,n){const[r,o]=X(e,n),u=t.computed(()=>new Intl.DateTimeFormat(a(r),a(o))),l=(e,t,n)=>{const l=t||n?new Intl.DateTimeFormat(a(n)||a(r),{...a(o),...a(t)}):u.value,s=a(e);return l.format(i(s)?new Date(s):s)};return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}},e.useIntlNumberFormat=Y,e.useLanguage=function(){if(V||(V=E?t.ref(navigator.language):t.ref("")),!W)if(E){W=t.ref(navigator.languages);const e=()=>{V.value=navigator.language,W.value=navigator.languages};window.addEventListener("languagechange",e,y)}else W=t.ref([]);return{language:V,languages:W}},e.useLocalStorage=fe,e.useLockScroll=function(e,n){const r=i(e)?t.ref([]):l(t.unref(e))?u(e):u([e]),o=i(n)?{lockedClass:n,auto:!0}:n||{auto:!0};o.lockedClass||(o.lockedClass="no-scroll");const s=t.ref(!1),c=t.computed(()=>r.value.map(e=>t.ref(e))),v=t.watch([s,c],([e,t],[n,r])=>{for(const u of t){const t=a(u);if(o.lockedClass){if(!t)return;t.classList.toggle(o.lockedClass,e)}o.onChange&&(n===e&&r.find(e=>a(e)===t)||o.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>s.value=!0,f=()=>s.value=!1;return i(e)&&t.onMounted(()=>r.value=Array.from(document.querySelectorAll(e))),!1!==o.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:s,lock:d,unlock:f,remove:v}},e.useMatchMedia=q,e.useNetworkInformation=function(){const e=!!E&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=h,c=h;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=k(e,"change",i,y),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=ge,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=d(n)?[void 0,n]:[n,r];s&&(u=I(u,r));const i=k(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:i}},e.useOnOutsidePress=function(e,t){if(!E)return()=>{};const n=u(e),r=x.find(e=>"on"+e in document.documentElement);return k(document,r,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,r){const o=u(e),a=t.ref(o.value&&o.value.clientHeight),l=t.ref(o.value&&o.value.clientWidth);let s=()=>{a.value=o.value.clientHeight,l.value=o.value.clientWidth};const[i,c]=d(n)?[void 0,n]:[n,r];c&&(s=I(s,r));const v=E?k(window,"resize",s,i||y):h;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:a,width:l,remove:v}},e.useOnScroll=function(e,n,r){const o=e=>!(d(e)||c(e)||!m(e)&&!t.isRef(e)||!e),a=o(e)?u(e):t.ref(E&&window||void 0),l=o(e)?a:t.ref(E&&window.document.scrollingElement||void 0),s=t.ref(l.value&&l.value.scrollTop||0),i=t.ref(l.value&&l.value.scrollLeft||0);let v=()=>{s.value=l.value.scrollTop,i.value=l.value.scrollLeft};const f=(...e)=>l.value&&l.value.scrollTo&&l.value.scrollTo.apply(l.value,e),p=e=>f({top:e}),h=e=>f({left:e}),[g,w]=d(e)||!e?[y,e]:d(n)?[y,n]:[n,r];w&&(v=I(v,r));const b=k(a,"scroll",v,g),S=t.watch(s,p,{immediate:!1}),M=t.watch(i,h,{immediate:!1});return{scrollTop:s,scrollLeft:i,scrollTo:f,remove:()=>{b(),M(),S()},scrollTopTo:p,scrollLeftTo:h}},e.useOnline=function(){const e=E&&"onLine"in navigator;return e||(D=t.ref(!1)),D||(D=t.ref(navigator.onLine),window.addEventListener("offline",()=>D.value=!1,y),window.addEventListener("online",()=>D.value=!0,y)),{supported:e,online:D}},e.usePageVisibility=function(){return U||(U=t.ref(E&&document.hidden)),F||(E?(F=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{F.value=document.visibilityState,U.value=document.hidden},y)):F=t.ref("visible")),{visibility:F,hidden:U}},e.usePagination=he,e.usePath=we,e.usePerformanceNow=function(e){return ge({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=R,e.usePromiseLazy=function(e,t=!1){return R(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||s(e)?{}:e,o=s(e)?e:n;if(!s(e)&&!f(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!s(o))throw new Error("[useRetry] factory needs to be 'function'");const a=t.ref(!1),u=t.ref(),l=t.ref([]),i={value:!1},c={isRetrying:a,retryCount:t.computed(()=>l.value.length),nextRetry:u,retryErrors:l,[O]:{value:0},[P]:i},v=o?(...e)=>(++c[O].value,T(r,c,o,e)):e=>(++c[O].value,T(r,c,e,void 0));return{...c,cancel:()=>{c.isRetrying.value=!1,c.retryErrors.value.push(new Error("[useRetry] cancelled")),c.nextRetry.value=void 0,i.value=!0},exec:v}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ie,n);return r===n||void 0===r?t.ref(i(e)?e:""):(i(e)&&(r.value=e),r)},e.useSessionStorage=me,e.useShare=function(e){const n=E&&"share"in navigator;let r=()=>Promise.resolve(!1),o=g,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=J,e.useStorage=function(e,t,n){return void 0===pe&&(pe=de("localStorage").supported),pe?fe(e,t,n):me(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),$(r)},e.useTitle=function(e=null){const n=t.ref(i(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{i(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const r=u(e),o=t.ref([]),a=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(r,e=>{if(o.value[a.value]!==e){if(a.value>0){const e=a.value;o.value.splice(0,e),a.value=0}o.value.length>l&&o.value.pop(),o.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);a.value+=t,r.value=o.value[a.value]},c=t.computed(()=>{const e=0===a.value?1:a.value;return o.value.slice(e)}),v=t.computed(()=>{const e=0===a.value?1:0;return o.value.slice(e,a.value)});return{value:r,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,t){console.warn("[useVModel] is not supported on @vue/composition-api.")},e.useValidation=function(e){const n=[],r=Se({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const r=u(e),o=2===arguments.length?t.isRef(arguments[1])&&l(arguments[1].value)?arguments[1]:t.ref([u(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>u(e)));o.value.forEach(e=>{e.value=r.value});let a=o.value.length;return t.watch([r,o],([e,t])=>{if(a<t.length)t.forEach(t=>t.value=e);else{a=t.length;for(const n of t)if(n.value!==e)return void(r.value=n.value)}},{deep:!0}),t.watch(r,e=>{o.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),o},e.useWebSocket=function(e,n){const r=E&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=h,d=h;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=de,e.useWorker=function(e,n,r){const o=E&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:h,terminate:h,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},y),i.addEventListener("error",e=>{a.value=e,s.value=!0},y),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,n){const r=E&&"Worker"in self,o=t.computed(()=>n&&a(n.dependencies)||[]),u=t.computed(()=>n&&a(n.timeout));if(!r)return C(e,{lazy:!0,throwException:!0});const l=C((...n)=>new Promise((r,a)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${K.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,o.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),m()},f=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,m=f?t.watch(f,()=>{d(),r(void 0)},{immediate:!1}):h;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):a(e.data[1]),d()},y),i.addEventListener("error",e=>{d(),a(e)},y),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=u,e}({},vueCompositionApi,Vue); | ||
var vueComposable=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=r(n);function a(e){return t.isRef(e)?e.value:e}function u(e){return t.isRef(e)?e:t.ref(e)}const l=Array.isArray,s=e=>"function"==typeof e,i=e=>"string"==typeof e,c=e=>"boolean"==typeof e,v=e=>f(e)&&s(e.getTime),d=e=>"number"==typeof e,f=e=>null!==e&&"object"==typeof e,m=e=>f(e)&&!!e.tagName;function p(e){return f(e)&&s(e.then)&&s(e.catch)}const h=()=>{},g=()=>!1,y={passive:!0};function w(e){return new Promise(t=>{setTimeout(t,e)})}function b(e,t,n){return e<t?t:e>n?n:e}const E="undefined"!=typeof window;function S(e,...t){for(let n=0;n<t.length;n++){const r=t[n];if(void 0===r||!f(r))continue;const o=Object.keys(r);for(let t=0;t<o.length;t++){const n=o[t],u=a(r[n]),l=typeof u,s=typeof e[n];void 0!==e[n]&&l!==s||(e[n]=f(u)?S(e[n]||{},u):r[n])}}return e}const M=t.set;function $(e){return t.computed(()=>a(e))}function k(e,n,r,o){let a=h;if(e){const l=u(e),s=e=>e.removeEventListener(n,r),i=e=>e.addEventListener(n,r,o),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});a=()=>{s(l.value),c()}}return a}function I(e,t,n){return L(e,t,n)}function L(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const x=["mousedown","touchstart"];function R(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=c(n)?[n,!1]:f(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),l=t.ref(null),s=t.ref(),i=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&c(t[t.length-1])?t[t.length-1]:o,r=s.value=e(...t);try{const e=await r;return s.value===r&&(l.value=e),e}catch(e){return s.value===r&&(u.value=e,l.value=null),n?r:void 0}finally{s.value===r&&(a.value=!1)}};return r||i(),{exec:i,result:l,promise:s,loading:a,error:u}}function C(e,n){const r=t.ref(!1);let o=void 0;const a=R((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||f(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const O=Symbol(""),P=Symbol(""),T=async(e,t,n,r)=>{const o=t[O].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||j;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let s=void 0;do{let e=!1,i=null;try{if(++a,i=r?n(...r):n(),p(i)&&(i=await i),t[P].value)return null;e=!0}catch(e){i=null,t.retryErrors.value.push(e)}if(o!==t[O].value)return i;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,i;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const c=Date.now(),f=l(a),m=p(f)?await f:f;if(!p(f)||m){if(d(m))s=m;else{if(!v(m))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof m}'`);s=m.getTime()}s<c?t.nextRetry.value=c+s:(t.nextRetry.value=s,s-=c),s>0&&await w(s)}if(t[P].value)return null;if(o!==t[O].value)return i}while(a<9e3);return null};const j=()=>0;function A(e){return e&&(c(e.isJson)||c(e.parseImmediate)||c(e.unmountCancel))}let D=void 0;let F=void 0,U=void 0;let V=void 0,W=void 0;function z(e,n){const r=E&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=h,c=h,v=h;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},y),r.addEventListener("message",e=>{a.value=e,o.value=e.data},y),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function B(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function N(e,t,n){e.style.setProperty(t,n)}const _={attributes:!0,childList:!0,subtree:!0},H=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const K=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function q(e){const n=!!E&&"matchMedia"in window;let r=void 0,o=void 0,a=h;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,y);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function J(e,n){const{addListener:r,send:o,close:a,supported:u}=z(e,()=>g()),l=Date.now(),s=t.ref(!1),i=t.ref(0),c=t.computed(()=>1!==i.value||s.value),v=t.ref([]),d=t.ref(n);let m=!1,p=void 0;o({type:0});const h=()=>o({type:5,id:l}),g=()=>{0!==v.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...v.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:d.value,mind:i.value});break;case 4:{const t=v.value.indexOf(e.data.id);t>=0&&v.value.splice(t,1),p===e.data.id&&v.value.length>0&&o({type:3,mind:1,id:Math.min(l,...v.value)});break}case 2:m=!0,d.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,p=1===e.data.mind&&e.data.id||void 0,s.value=p===l,s.value&&(v.value=[],h());break;case 5:v.value=[e.data.id],o({type:6,id:l});break;case 6:v.value.push(e.data.id)}},y),h(),t.watch(d,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(d.value=t);o({type:2,mind:i.value,value:f(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),E&&window.addEventListener("unload",g,y),t.onUnmounted(()=>{g(),a()}),{supported:u,id:l,data:d,master:s,mind:i,editable:c,targets:v,ping:h,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function Q(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function X(e,n){const r=u(n),o=u(e);return f(r.value)||t.isRef(n)?[void 0!==o.value?o:void 0,r]:!f(o.value)||l(o.value)||i(o.value)?[o.value?o:void 0,void 0]:[void 0,o]}function Y(e,n){const[r,o]=X(e,n),u=t.computed(()=>new Intl.NumberFormat(a(r),a(o))),l=(e,t,n)=>(t||n?new Intl.NumberFormat(a(n)||a(r),{...a(o),...a(t)}):u.value).format(a(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function G(e){if(e)return d(e)?e:Z(e)}const Z=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function ee(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=G(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=q(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=E?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:h,s=I(l,10),i=E?()=>window.removeEventListener("resize",s):h;return E&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,y)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const te=Symbol(""),ne={sm:640,md:768,lg:1024,xl:1280};function re(e){return f(e)&&f(e.theme)&&f(e.theme.screens)}function oe(e){return!!f(e)&&(i(e.min)||i(e.max)||d(e.min)||d(e.max))}function ae(e){return d(e)?e+"px":e}function ue(e){const t=[];if(l(e)){const n=e.map(ue);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else f(n=e)&&i(n.raw)?t.push(e.raw):oe(e)?t.push(function(e){return oe(e)?`(${[e.max&&"max-width: "+ae(e.max),e.min&&"min-width: "+ae(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(i(e)||d(e))&&t.push(`(min-width: ${ae(e)})`);var n;return t}function le(e){const n=re(e)?e.theme.screens:e;if(re(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];f(t)?n[e]=ue(n[e]).join(" or "):i(t)&&(t.endsWith("px")||(n[e]=ue(n[e]).join(" or ")))}const r=ee(n);return t.provide(te,r),r}function se(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function ie(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return se(t,e)}}function ce(e,t){try{return e.parse(t)}catch{return t}}let ve=void 0;function de(e,n=JSON,r=10){const o=E?window[e]:void 0,a=ie(o);ve||(ve=new Map,E&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ve.get("localStorage");t=e.storageArea===window.localStorage?ve.get("localStorage"):ve.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let l,s=ve.get(e);return a&&o?s?l=s.$quotaError:(l=t.ref(!1),s={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:l,key:o.key,length:o.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),o.removeItem(e)},getItem(e){const t=o.getItem(e);return t?this.setItem(e,ce(n,t)):null},setItem(e,a){const s=u(a);this.$refMap.set(e,s);const c=(e,t)=>{try{const r=o.getItem(e),a=i(t)?t:n.stringify(t);o.setItem(e,a),r!==a&&E&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:a,oldValue:r,storageArea:o}))}catch(e){l.value=se(e,o)}};c(e,a);const v=t.watch(s,L(t=>{c(e,t)},r),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),s},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ce(n,t))}},ve.set(e,s)):(l=t.ref(!1),s={}),{supported:a,quotaError:l,store:s,remove:()=>ve.delete(e)}}function fe(e,n,r){const{supported:o,store:a}=de("localStorage");let u=h,l=h,s=h,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function me(e,n,r){const{supported:o,store:a}=de("sessionStorage");let u=h,l=h,s=g,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let pe=void 0;function he(e){const n=u(e.currentPage),r=u(e.pageSize),o=t.ref(0),a=u(e.total),l=t.computed({get:()=>o.value,set(e){d(e)&&(o.value=Math.min(e,a.value))}}),s=t.computed({get:()=>n.value,set(e){d(e)&&(n.value=b(e,1,c.value),l.value=(n.value-1)*i.value)}}),i=t.computed({get:()=>r.value,set(e){d(e)&&(r.value=e)}}),c=t.computed(()=>Math.ceil(a.value/i.value));s.value=n.value;return t.watch([a,i],e=>{s.value>c.value&&(s.value=c.value)},{immediate:!1}),{pageSize:i,total:a,currentPage:s,offset:l,lastPage:c,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=c.value}}function ge(e){const n=e&&e.refreshMs||1e3,r=!e||!c(e.sync)||e.sync,o=e&&s(e.timeFn)&&e.timeFn||Date.now;let a=void 0,u=void 0;const l=t.ref(o()),i=()=>{clearInterval(a),clearTimeout(u)},v=E?()=>a=setInterval(()=>l.value=o(),n):h;if(r){const e=1e3-(l.value-1e3*Math.floor(l.value/1e3));u=setTimeout(v,e)}else v();return t.onUnmounted(i),{now:l,remove:i}}function ye(e,n){return t.computed(()=>{const r=a(e);if(!n)return r;const o=t.isRef(n)?t.reactive(n.value):t.reactive(n);return r.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const n=l(o)?o[+t]:o[t];return void 0===n?e:""+a(n)})})}function we(e,n,r=".",o=h){return t.computed(()=>{const t=a(e),u=a(n);if(void 0===t)return o(u,t,u,t);if(!u)return t;const l=u.split(r);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!f(s))return o(l.slice(0,e+1).join(r),s,u,t);if(!n)return o(l.slice(0,e+1).join(r),s,u,t);if(s=s[n],!s)return o(l.slice(0,e+1).join(r),s,u,t)}return s})}function be(e){return void 0!==e.$value}const Ee=(e,n,r)=>{const{$message:o,$validator:u,...l}=function(e){return f(e)}(n)?n:{$validator:n,$message:void 0},{$pending:s,$promise:i,$invalid:c,$error:v}=((e,n,r,o)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=n(e,c);p(t)?i.value=!await t:i.value=!t,s.value=i.value?r.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=a(e),i.value=!0,e))};return o.push(r=>{c=r,t.watch(()=>{try{n(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(o),r);return{$pending:s,$error:v,$promise:i,$invalid:c,$message:o,...l}},Se=(e,n)=>{const r={},o=be(e)?u(e.$value):void 0;for(const u of Object.keys(e))if("$"!==u[0])if(o){const t=Ee(o,e[u],n);r[u]={...t,$value:o}}else{const o=Se(e[u],n);let l,s,i=void 0;if(be(o)){const e=Object.keys(o).filter(e=>"$"!==e[0]).map(e=>o[e]);l=t.computed(()=>e.map(e=>e.$error).map(e=>a(e)).filter(Boolean)),s=t.computed(()=>e.some(e=>!!a(e.$invalid)))}else{const e=Object.keys(o).map(e=>o[e]);l=t.computed(()=>e.map(e=>a(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),i=t.computed(()=>e.some(e=>e.$anyDirty||c(a(e.$dirty))&&a(e.$dirty))),s=t.computed(()=>e.some(e=>!!a(e.$anyInvalid)))}r[u]={...o,$errors:l,$anyInvalid:s},i&&(r[u].$anyDirty=i)}else{if("$value"===u){r[u]=o;const e=t.ref(!1),n=t.watch(o,()=>{e.value=!0,n()},{immediate:!1,deep:!0});r.$dirty=e;continue}r[u]=e[u]}return r};const Me=Symbol("");function $e(e){const n=t.ref(Object.keys(e.messages)),r=t.ref(e.messages),l=t.ref(e.locale),i=t.ref({});let v=t.ref();const d={},f=(e,n)=>{if(d[e])return d[e];const r=n.value[e];if(!r)return t.ref({});let o=s(r)?r():r;return p(o)?o.then(t=>d[e]=u(t)):s(r)?u(o):d[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!c(e.notFoundFallback)||e.notFoundFallback);let h=!1;if(m){const t=f(e.fallback,r);p(t)?(t.then(e=>{v.value=e.value}),h=!0):v.value=t.value}else v.value={};const g=t.ref(0);t.watch(r,()=>g.value++,{deep:!0,immediate:!1}),t.watch([l,v,g],([t,n,o])=>{if(t===e.fallback&&m)i.value=n;else{const e=e=>i.value=S({},n,a(e)),o=f(t,r);p(o)?o.then(e):e(o)}},{immediate:!h});const y=(t,n)=>e.resolve?u(e.resolve(i.value,t,n)):ye(we(i,t,".",(e,t,n,r)=>n),n);return{locale:l,locales:n,i18n:i,$t:y,$ts:(e,t)=>y(e,t).value,addLocale:(e,t)=>{n.value.indexOf(e)>=0||n.value.push(e),delete d[e],M(r.value,e,t)},removeLocale:t=>{const a=n.value.indexOf(t);if(a>=0){const r=[l.value,v.value&&e.fallback,...n.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(v.value=void 0),t===l.value&&(l.value=r)),n.value.splice(a,1)}var u,s;u=r.value,s=t,o.delete(u,s),delete d[t]}}}function ke(e){const n=$e(e);return t.provide(Me,n),n}const Ie=Symbol("");const Le=Symbol(""),xe={install(e){$(t.ref(!0))}};return e.COMMIT="8f7dab4",e.FALSE_OP=g,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=h,e.PASSIVE_EV=y,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.5",e.VUE_VERSION="2",e.buildI18n=$e,e.debounce=L,e.deepClone=S,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(l(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=B,e.hydrationPlugin=xe,e.injectFactory=Q,e.isArray=l,e.isBoolean=c,e.isClient=E,e.isDate=v,e.isElement=m,e.isFunction=s,e.isNumber=d,e.isObject=f,e.isPromise=p,e.isString=i,e.isSymbol=e=>"symbol"==typeof e,e.minMax=b,e.noDelay=j,e.promisedTimeout=w,e.provideSSRTitle=function(e,t){const n=u(void 0===t?"":t);return e.provide(Ie,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.$vnode.tag;if(!o)return t.ref(e);const{data:a,supported:u}=J(o,e);return a},e.setBreakpointTailwindCSS=le,e.setCssVariableFor=N,e.setI18n=ke,e.storageAvailable=ie,e.unwrap=a,e.useArrayPagination=function(e,n){const r=u(e),o=he({currentPage:1,pageSize:10,...n,total:t.computed(()=>r.value.length)}),a=t.computed(()=>{const e=r.value;return Array.isArray(e)?e.slice(o.offset.value,o.offset.value+o.pageSize.value):[]});return{...o,result:a}},e.useBreakpoint=ee,e.useBreakpointChrome=function(){return ee({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return Q(te,()=>le(e||ne))},e.useBroadcastChannel=z,e.useCancellablePromise=C,e.useCssVariables=function(e,n,r){const o=E&&"MutationObserver"in self,[l,s]=t.isRef(n)||m(n)?[n,r||_]:[o&&document.documentElement||{},n||_],c=t.ref(!0),v={},d=[],f=Object.entries(e).map(e=>{const[t,n]=i(e[1])?[e[1]]:[e[1].name,e[1].value];return n&&(d.push(()=>N(a(l),t,a(n))),v[e[0]]=u(n)),[e[0],H(t)]});for(let e=0;e<f.length;e++){const[n,r]=f[e];v[n]||(v[n]=t.ref(t.isRef(l)&&!l.value||!o?null:B(a(l),r))),o&&t.watch([v[n],u(l)],e=>{c&&e[1]&&e[0]!==B(e[1],r)&&N(e[1],r,e[0])},{immediate:!t.isRef(l)})}if(!o)return{...v,stop:h,resume:h,supported:o,observing:c};const p=()=>{for(let e=0;e<f.length;e++){const[t,n]=f[e];v[t].value=B(a(l),n)}},g=new MutationObserver(p),y=()=>{g.disconnect(),c.value=!1},w=()=>{c.value||p(),g.observe(a(l),s),c.value=!0};return t.onUnmounted(y),t.isRef(l)?t.onMounted(()=>{d.forEach(e=>e()),t.watch(l,(e,t)=>{t&&y(),e&&w()})}):(E||l)&&(d.forEach(e=>e()),w()),{...v,supported:o,resume:w,stop:y,observing:c}},e.useCurrencyFormat=function(e,n,r){const o=a(e),u=!f(o),l=u?e:t.computed(()=>a(e).currency),[s,i]=X(n,u?r:e),c=t.computed(()=>{const e=a(i)||{},t=a(l)||e.currency;return{style:"currency",...e,currency:t}}),v=Y(s),d=(e,t,n,r,o)=>{const u={...c.value,...a(r)},l=a(t)||u.currency,s=a(n)||u.currencyDisplay;return v.formatString(e,{...u,currency:l,currencyDisplay:s},o)};return{format:(e,n,r,o,a)=>t.computed(()=>d(e,n,r,o,a)),formatString:d}},e.useDateNow=function(e){return ge({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=I,e.useEvent=k,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),u=t.ref(null),[l,s,c]=A(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:A(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?i(e)?n:A(e)?e:i(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=R(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[l?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,u.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];s&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(i(e)||i(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:u,status:g,statusText:y}},e.useFormat=ye,e.useGeolocation=function(e){const n=E&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(e&&e.enableHighAccuracy||null);let s=h;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},i=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,i,e);s=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([l,r],t=>{v();const r=c(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,i,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:s,error:o,timestamp:a,coords:u,highAccuracy:l}},e.useHydration=function(){return t.inject(Le,t.computed(()=>!1))},e.useI18n=function(e){return e?ke(e):t.inject(Me)},e.useIntersectionObserver=function(e,n){const r=E&&"IntersectionObserver"in window,o=e?u(e):void 0,l=!o||!m(o.value)&&o.value?void 0:o,s=t.computed(()=>n?a(n):l?void 0:a(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),v=e=>{i.value=e};let d=t.ref();r&&t.watch(s,e=>{d.value&&d.value.disconnect();const t=e&&e&&{root:a(e.root),rootMargin:a(e.rootMargin),threshold:a(e.threshold)}||void 0;d.value=new IntersectionObserver(v,t);i.value.map(e=>e.target).forEach(d.value.observe)},{deep:!0,immediate:!0});const f=r?e=>{const t=a(e);d.value.observe(t)}:h,p=r?e=>{const t=a(e);d.value.unobserve(t)}:h,g=()=>d.value.disconnect();return l&&(t.onMounted(()=>{l.value&&f(l)}),t.onUnmounted(()=>{g()})),{supported:r,elements:i,observe:f,unobserve:p,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return d(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,n){const[r,o]=X(e,n),u=t.computed(()=>new Intl.DateTimeFormat(a(r),a(o))),l=(e,t,n)=>{const l=t||n?new Intl.DateTimeFormat(a(n)||a(r),{...a(o),...a(t)}):u.value,s=a(e);return l.format(i(s)?new Date(s):s)};return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}},e.useIntlNumberFormat=Y,e.useLanguage=function(){if(V||(V=E?t.ref(navigator.language):t.ref("")),!W)if(E){W=t.ref(navigator.languages);const e=()=>{V.value=navigator.language,W.value=navigator.languages};window.addEventListener("languagechange",e,y)}else W=t.ref([]);return{language:V,languages:W}},e.useLocalStorage=fe,e.useLockScroll=function(e,n){const r=i(e)?t.ref([]):l(t.unref(e))?u(e):u([e]),o=i(n)?{lockedClass:n,auto:!0}:n||{auto:!0};o.lockedClass||(o.lockedClass="no-scroll");const s=t.ref(!1),c=t.computed(()=>r.value.map(e=>t.ref(e))),v=t.watch([s,c],([e,t],[n,r])=>{for(const u of t){const t=a(u);if(o.lockedClass){if(!t)return;t.classList.toggle(o.lockedClass,e)}o.onChange&&(n===e&&r.find(e=>a(e)===t)||o.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>s.value=!0,f=()=>s.value=!1;return i(e)&&t.onMounted(()=>r.value=Array.from(document.querySelectorAll(e))),!1!==o.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:s,lock:d,unlock:f,remove:v}},e.useMatchMedia=q,e.useNetworkInformation=function(){const e=!!E&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=h,c=h;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=k(e,"change",i,y),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=ge,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=d(n)?[void 0,n]:[n,r];s&&(u=I(u,r));const i=k(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:i}},e.useOnOutsidePress=function(e,t){if(!E)return()=>{};const n=u(e),r=x.find(e=>"on"+e in document.documentElement);return k(document,r,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,r){const o=u(e),a=t.ref(o.value&&o.value.clientHeight),l=t.ref(o.value&&o.value.clientWidth);let s=()=>{a.value=o.value.clientHeight,l.value=o.value.clientWidth};const[i,c]=d(n)?[void 0,n]:[n,r];c&&(s=I(s,r));const v=E?k(window,"resize",s,i||y):h;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:a,width:l,remove:v}},e.useOnScroll=function(e,n,r){const o=e=>!(d(e)||c(e)||!m(e)&&!t.isRef(e)||!e),a=o(e)?u(e):t.ref(E&&window||void 0),l=o(e)?a:t.ref(E&&window.document.scrollingElement||void 0),s=t.ref(l.value&&l.value.scrollTop||0),i=t.ref(l.value&&l.value.scrollLeft||0);let v=()=>{s.value=l.value.scrollTop,i.value=l.value.scrollLeft};const f=(...e)=>l.value&&l.value.scrollTo&&l.value.scrollTo.apply(l.value,e),p=e=>f({top:e}),h=e=>f({left:e}),[g,w]=d(e)||!e?[y,e]:d(n)?[y,n]:[n,r];w&&(v=I(v,r));const b=k(a,"scroll",v,g),S=t.watch(s,p,{immediate:!1}),M=t.watch(i,h,{immediate:!1});return{scrollTop:s,scrollLeft:i,scrollTo:f,remove:()=>{b(),M(),S()},scrollTopTo:p,scrollLeftTo:h}},e.useOnline=function(){const e=E&&"onLine"in navigator;return e||(D=t.ref(!1)),D||(D=t.ref(navigator.onLine),window.addEventListener("offline",()=>D.value=!1,y),window.addEventListener("online",()=>D.value=!0,y)),{supported:e,online:D}},e.usePageVisibility=function(){return U||(U=t.ref(E&&document.hidden)),F||(E?(F=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{F.value=document.visibilityState,U.value=document.hidden},y)):F=t.ref("visible")),{visibility:F,hidden:U}},e.usePagination=he,e.usePath=we,e.usePerformanceNow=function(e){return ge({refreshMs:e&&e.refreshMs||1e3,sync:!e||!c(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=R,e.usePromiseLazy=function(e,t=!1){return R(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||s(e)?{}:e,o=s(e)?e:n;if(!s(e)&&!f(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!s(o))throw new Error("[useRetry] factory needs to be 'function'");const a=t.ref(!1),u=t.ref(),l=t.ref([]),i={value:!1},c={isRetrying:a,retryCount:t.computed(()=>l.value.length),nextRetry:u,retryErrors:l,[O]:{value:0},[P]:i},v=o?(...e)=>(++c[O].value,T(r,c,o,e)):e=>(++c[O].value,T(r,c,e,void 0));return{...c,cancel:()=>{c.isRetrying.value=!1,c.retryErrors.value.push(new Error("[useRetry] cancelled")),c.nextRetry.value=void 0,i.value=!0},exec:v}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ie,n);return r===n||void 0===r?t.ref(i(e)?e:""):(i(e)&&(r.value=e),r)},e.useSessionStorage=me,e.useShare=function(e){const n=E&&"share"in navigator;let r=()=>Promise.resolve(!1),o=g,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=J,e.useStorage=function(e,t,n){return void 0===pe&&(pe=de("localStorage").supported),pe?fe(e,t,n):me(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),$(r)},e.useTitle=function(e=null){const n=t.ref(i(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{i(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const r=u(e),o=t.ref([]),a=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(r,e=>{if(o.value[a.value]!==e){if(a.value>0){const e=a.value;o.value.splice(0,e),a.value=0}o.value.length>l&&o.value.pop(),o.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);a.value+=t,r.value=o.value[a.value]},c=t.computed(()=>{const e=0===a.value?1:a.value;return o.value.slice(e)}),v=t.computed(()=>{const e=0===a.value?1:0;return o.value.slice(e,a.value)});return{value:r,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,t){console.warn("[useVModel] is not supported on @vue/composition-api.")},e.useValidation=function(e){const n=[],r=Se({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const r=u(e),o=2===arguments.length?t.isRef(arguments[1])&&l(arguments[1].value)?arguments[1]:t.ref([u(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>u(e)));o.value.forEach(e=>{e.value=r.value});let a=o.value.length;return t.watch([r,o],([e,t])=>{if(a<t.length)t.forEach(t=>t.value=e);else{a=t.length;for(const n of t)if(n.value!==e)return void(r.value=n.value)}},{deep:!0}),t.watch(r,e=>{o.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),o},e.useWebSocket=function(e,n){const r=E&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=h,d=h;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=de,e.useWorker=function(e,n,r){const o=E&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:h,terminate:h,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},y),i.addEventListener("error",e=>{a.value=e,s.value=!0},y),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,n){const r=E&&"Worker"in self,o=t.computed(()=>n&&a(n.dependencies)||[]),u=t.computed(()=>n&&a(n.timeout));if(!r)return C(e,{lazy:!0,throwException:!0});const l=C((...n)=>new Promise((r,a)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${K.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,o.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),m()},f=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,m=f?t.watch(f,()=>{d(),r(void 0)},{immediate:!1}):h;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):a(e.data[1]),d()},y),i.addEventListener("error",e=>{d(),a(e)},y),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=u,e}({},vueCompositionApi,Vue); |
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function r(e){return t.isRef(e)?e:t.ref(e)}const o=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise(t=>{setTimeout(t,e)})}function g(e,t,n){return e<t?t:e>n?n:e}const y="undefined"!=typeof window;function w(e,...t){for(let r=0;r<t.length;r++){const o=t[r];if(void 0===o||!c(o))continue;const a=Object.keys(o);for(let t=0;t<a.length;t++){const r=a[t],u=n(o[r]),l=typeof u,s=typeof e[r];void 0!==e[r]&&l!==s||(e[r]=c(u)?w(e[r]||{},u):o[r])}}return e}function b(e,n,o,a){let u=f;if(e){const l=r(e),s=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,a),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});u=()=>{s(l.value),c()}}return u}function E(e,t,n){return S(e,t,n)}function S(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const M=["mousedown","touchstart"];function $(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:o,r=i.value=e(...t);try{const e=await r;return i.value===r&&(s.value=e),e}catch(e){return i.value===r&&(u.value=e,s.value=null),n?r:void 0}finally{i.value===r&&(a.value=!1)}};return r||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function k(e,n){const r=t.ref(!1);let o=void 0;const a=$((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const I=Symbol(""),L=Symbol(""),x=async(e,t,n,r)=>{const o=t[I].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||R;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let c=void 0;do{let e=!1,v=null;try{if(++a,v=r?n(...r):n(),d(v)&&(v=await v),t[L].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(o!==t[I].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[L].value)return null;if(o!==t[I].value)return v}while(a<9e3);return null};const R=()=>0;function C(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let O=void 0;let P=void 0,T=void 0;let j=void 0,A=void 0;function D(e,n){const r=y&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},p),r.addEventListener("message",e=>{a.value=e,o.value=e.data},p),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function F(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function U(e,t,n){e.style.setProperty(t,n)}const V={attributes:!0,childList:!0,subtree:!0},W=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const z=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function B(e){const n=!!y&&"matchMedia"in window;let r=void 0,o=void 0,a=f;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,p);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function N(e,n){const{addListener:r,send:o,close:a,supported:u}=D(e,()=>w()),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed(()=>1!==i.value||s.value),d=t.ref([]),f=t.ref(n);let m=!1,h=void 0;o({type:0});const g=()=>o({type:5,id:l}),w=()=>{0!==d.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...d.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),h===e.data.id&&d.value.length>0&&o({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:m=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,h=1===e.data.mind&&e.data.id||void 0,s.value=h===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],o({type:6,id:l});break;case 6:d.value.push(e.data.id)}},p),g(),t.watch(f,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(f.value=t);o({type:2,mind:i.value,value:c(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),y&&window.addEventListener("unload",w,p),t.onUnmounted(()=>{w(),a()}),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function _(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function H(e,n){const a=r(n),l=r(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||o(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function K(e,r){const[o,a]=H(e,r),u=t.computed(()=>new Intl.NumberFormat(n(o),n(a))),l=(e,t,r)=>(t||r?new Intl.NumberFormat(n(r)||n(o),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function q(e){if(e)return i(e)?e:J(e)}const J=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function Q(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=q(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=B(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=y?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:f,s=E(l,10),i=y?()=>window.removeEventListener("resize",s):f;return y&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,p)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const X=Symbol(""),Y={sm:640,md:768,lg:1024,xl:1280};function G(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function Z(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function ee(e){return i(e)?e+"px":e}function te(e){const t=[];if(o(e)){const n=e.map(te);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else c(n=e)&&u(n.raw)?t.push(e.raw):Z(e)?t.push(function(e){return Z(e)?`(${[e.max&&"max-width: "+ee(e.max),e.min&&"min-width: "+ee(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${ee(e)})`);var n;return t}function ne(e){const n=G(e)?e.theme.screens:e;if(G(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=te(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=te(n[e]).join(" or ")))}const r=Q(n);return t.provide(X,r),r}function re(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function oe(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return re(t,e)}}function ae(e,t){try{return e.parse(t)}catch{return t}}let ue=void 0;function le(e,n=JSON,o=10){const a=y?window[e]:void 0,l=oe(a);ue||(ue=new Map,y&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ue.get("localStorage");t=e.storageArea===window.localStorage?ue.get("localStorage"):ue.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let s,i=ue.get(e);return l&&a?i?s=i.$quotaError:(s=t.ref(!1),i={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:s,key:a.key,length:a.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),a.removeItem(e)},getItem(e){const t=a.getItem(e);return t?this.setItem(e,ae(n,t)):null},setItem(e,l){const i=r(l);this.$refMap.set(e,i);const c=(e,t)=>{try{const r=a.getItem(e),o=u(t)?t:n.stringify(t);a.setItem(e,o),r!==o&&y&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:r,storageArea:a}))}catch(e){s.value=re(e,a)}};c(e,l);const v=t.watch(i,S(t=>{c(e,t)},o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),i},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ae(n,t))}},ue.set(e,i)):(s=t.ref(!1),i={}),{supported:l,quotaError:s,store:i,remove:()=>ue.delete(e)}}function se(e,n,r){const{supported:o,store:a}=le("localStorage");let u=f,l=f,s=f,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function ie(e,n,r){const{supported:o,store:a}=le("sessionStorage");let u=f,l=f,s=m,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let ce=void 0;function ve(e){const n=r(e.currentPage),o=r(e.pageSize),a=t.ref(0),u=r(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=g(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>o.value,set(e){i(e)&&(o.value=e)}}),v=t.computed(()=>Math.ceil(u.value/c.value));s.value=n.value;return t.watch([u,c],e=>{s.value>v.value&&(s.value=v.value)},{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function de(e){const n=e&&e.refreshMs||1e3,r=!e||!l(e.sync)||e.sync,o=e&&a(e.timeFn)&&e.timeFn||Date.now;let u=void 0,s=void 0;const i=t.ref(o()),c=()=>{clearInterval(u),clearTimeout(s)},v=y?()=>u=setInterval(()=>i.value=o(),n):f;if(r){const e=1e3-(i.value-1e3*Math.floor(i.value/1e3));s=setTimeout(v,e)}else v();return t.onUnmounted(c),{now:i,remove:c}}function fe(e,r){return t.computed(()=>{const a=n(e);if(!r)return a;const u=t.isRef(r)?t.reactive(r.value):t.reactive(r);return a.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const r=o(u)?u[+t]:u[t];return void 0===r?e:""+n(r)})})}function me(e,r,o=".",a=f){return t.computed(()=>{const t=n(e),u=n(r);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(o);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!c(s))return a(l.slice(0,e+1).join(o),s,u,t);if(!n)return a(l.slice(0,e+1).join(o),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(o),s,u,t)}return s})}function pe(e){return void 0!==e.$value}const he=(e,r,o)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(r)?r:{$validator:r,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f}=((e,r,o,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=r(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?o.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=n(e),i.value=!0,e))};return a.push(n=>{c=n,t.watch(()=>{try{r(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(a),o);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,...l}},ge=(e,o)=>{const a={},u=pe(e)?r(e.$value):void 0;for(const r of Object.keys(e))if("$"!==r[0])if(u){const t=he(u,e[r],o);a[r]={...t,$value:u}}else{const u=ge(e[r],o);let s,i,c=void 0;if(pe(u)){const e=Object.keys(u).filter(e=>"$"!==e[0]).map(e=>u[e]);s=t.computed(()=>e.map(e=>e.$error).map(e=>n(e)).filter(Boolean)),i=t.computed(()=>e.some(e=>!!n(e.$invalid)))}else{const e=Object.keys(u).map(e=>u[e]);s=t.computed(()=>e.map(e=>n(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),c=t.computed(()=>e.some(e=>e.$anyDirty||l(n(e.$dirty))&&n(e.$dirty))),i=t.computed(()=>e.some(e=>!!n(e.$anyInvalid)))}a[r]={...u,$errors:s,$anyInvalid:i},c&&(a[r].$anyDirty=c)}else{if("$value"===r){a[r]=u;const e=t.ref(!1),n=t.watch(u,()=>{e.value=!0,n()},{immediate:!1,deep:!0});a.$dirty=e;continue}a[r]=e[r]}return a};const ye=Symbol("");function we(e){const o=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=(e,n)=>{if(v[e])return v[e];const o=n.value[e];if(!o)return t.ref({});let u=a(o)?o():o;return d(u)?u.then(t=>v[e]=r(t)):a(o)?r(u):v[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let p=!1;if(m){const t=f(e.fallback,u);d(t)?(t.then(e=>{c.value=e.value}),p=!0):c.value=t.value}else c.value={};const h=t.ref(0);t.watch(u,()=>h.value++,{deep:!0,immediate:!1}),t.watch([s,c,h],([t,r,o])=>{if(t===e.fallback&&m)i.value=r;else{const e=e=>i.value=w({},r,n(e)),o=f(t,u);d(o)?o.then(e):e(o)}},{immediate:!p});const g=(t,n)=>e.resolve?r(e.resolve(i.value,t,n)):fe(me(i,t,".",(e,t,n,r)=>n),n);return{locale:s,locales:o,i18n:i,$t:g,$ts:(e,t)=>g(e,t).value,addLocale:(e,t)=>{o.value.indexOf(e)>=0||o.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=o.value.indexOf(t);if(n>=0){const r=[s.value,c.value&&e.fallback,...o.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=r)),o.value.splice(n,1)}delete u.value[t],delete v[t]}}}function be(e){const n=we(e);return t.provide(ye,n),n}const Ee=Symbol("");const Se=Symbol(""),Me={install(e){const n=t.ref(!0),r=t.readonly(n);{e._context.provides[Se]=r;const t=e.mount;e.mount=(...e)=>{const r=t(...e);return n.value=!1,r}}}};return e.COMMIT="7e79920",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.4",e.VUE_VERSION="3",e.buildI18n=we,e.debounce=S,e.deepClone=w,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(o(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=F,e.hydrationPlugin=Me,e.injectFactory=_,e.isArray=o,e.isBoolean=l,e.isClient=y,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.minMax=g,e.noDelay=R,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=r(void 0===t?"":t);return e.provide(Ee,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.vnode.scopeId;if(!o)return t.ref(e);const{data:a,supported:u}=N(o,e);return a},e.setBreakpointTailwindCSS=ne,e.setCssVariableFor=U,e.setI18n=be,e.storageAvailable=oe,e.unwrap=n,e.useArrayPagination=function(e,n){const o=r(e),a=ve({currentPage:1,pageSize:10,...n,total:t.computed(()=>o.value.length)}),u=t.computed(()=>{const e=o.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]});return{...a,result:u}},e.useBreakpoint=Q,e.useBreakpointChrome=function(){return Q({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return _(X,()=>ne(e||Y))},e.useBroadcastChannel=D,e.useCancellablePromise=k,e.useCssVariables=function(e,o,a){const l=y&&"MutationObserver"in self,[s,i]=t.isRef(o)||v(o)?[o,a||V]:[l&&document.documentElement||{},o||V],c=t.ref(!0),d={},m=[],p=Object.entries(e).map(e=>{const[t,o]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return o&&(m.push(()=>U(n(s),t,n(o))),d[e[0]]=r(o)),[e[0],W(t)]});for(let e=0;e<p.length;e++){const[o,a]=p[e];d[o]||(d[o]=t.ref(t.isRef(s)&&!s.value||!l?null:F(n(s),a))),l&&t.watch([d[o],r(s)],e=>{c&&e[1]&&e[0]!==F(e[1],a)&&U(e[1],a,e[0])},{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,r]=p[e];d[t].value=F(n(s),r)}},g=new MutationObserver(h),w=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(w),t.isRef(s)?t.onMounted(()=>{m.forEach(e=>e()),t.watch(s,(e,t)=>{t&&w(),e&&b()})}):(y||s)&&(m.forEach(e=>e()),b()),{...d,supported:l,resume:b,stop:w,observing:c}},e.useCurrencyFormat=function(e,r,o){const a=n(e),u=!c(a),l=u?e:t.computed(()=>n(e).currency),[s,i]=H(r,u?o:e),v=t.computed(()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}}),d=K(s),f=(e,t,r,o,a)=>{const u={...v.value,...n(o)},l=n(t)||u.currency,s=n(r)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,r,o,a)=>t.computed(()=>f(e,n,r,o,a)),formatString:f}},e.useDateNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=E,e.useEvent=b,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=C(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:C(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:C(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=$(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,l.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];i&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:l,status:g,statusText:y}},e.useFormat=fe,e.useGeolocation=function(e){const n=y&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},c=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([s,r],t=>{v();const r=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:i,error:o,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(Se,t.computed(()=>!1))},e.useI18n=function(e){return e?be(e):t.inject(ye)},e.useIntersectionObserver=function(e,o){const a=y&&"IntersectionObserver"in window,u=e?r(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed(()=>o?n(o):l?void 0:n(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map(e=>e.target).forEach(m.value.observe)},{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted(()=>{l.value&&p(l)}),t.onUnmounted(()=>{g()})),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,r){const[o,a]=H(e,r),l=t.computed(()=>new Intl.DateTimeFormat(n(o),n(a))),s=(e,t,r)=>{const s=t||r?new Intl.DateTimeFormat(n(r)||n(o),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,r)=>t.computed(()=>s(e,n,r)),formatString:s,formatter:l}},e.useIntlNumberFormat=K,e.useLanguage=function(){if(j||(j=y?t.ref(navigator.language):t.ref("")),!A)if(y){A=t.ref(navigator.languages);const e=()=>{j.value=navigator.language,A.value=navigator.languages};window.addEventListener("languagechange",e,p)}else A=t.ref([]);return{language:j,languages:A}},e.useLocalStorage=se,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):o(t.unref(e))?r(e):r([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass="no-scroll");const i=t.ref(!1),c=t.computed(()=>l.value.map(e=>t.ref(e))),v=t.watch([i,c],([e,t],[r,o])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(r===e&&o.find(e=>n(e)===t)||s.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted(()=>l.value=Array.from(document.querySelectorAll(e))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=B,e.useNetworkInformation=function(){const e=!!y&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=b(e,"change",i,p),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=de,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=i(n)?[void 0,n]:[n,r];s&&(u=E(u,r));const c=b(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:c}},e.useOnOutsidePress=function(e,t){if(!y)return()=>{};const n=r(e),o=M.find(e=>"on"+e in document.documentElement);return b(document,o,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,o){const a=r(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=E(s,o));const d=y?b(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,o){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?r(e):t.ref(y&&window||void 0),s=a(e)?u:t.ref(y&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=(...e)=>s.value&&s.value.scrollTo&&s.value.scrollTo.apply(s.value,e),h=e=>m({top:e}),g=e=>m({left:e}),[w,S]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,o];S&&(f=E(f,o));const M=b(u,"scroll",f,w),$=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,scrollTo:m,remove:()=>{M(),k(),$()},scrollTopTo:h,scrollLeftTo:g}},e.useOnline=function(){const e=y&&"onLine"in navigator;return e||(O=t.ref(!1)),O||(O=t.ref(navigator.onLine),window.addEventListener("offline",()=>O.value=!1,p),window.addEventListener("online",()=>O.value=!0,p)),{supported:e,online:O}},e.usePageVisibility=function(){return T||(T=t.ref(y&&document.hidden)),P||(y?(P=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{P.value=document.visibilityState,T.value=document.hidden},p)):P=t.ref("visible")),{visibility:P,hidden:T}},e.usePagination=ve,e.usePath=me,e.usePerformanceNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=$,e.usePromiseLazy=function(e,t=!1){return $(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||a(e)?{}:e,o=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!a(o))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed(()=>s.value.length),nextRetry:l,retryErrors:s,[I]:{value:0},[L]:i},d=o?(...e)=>(++v[I].value,x(r,v,o,e)):e=>(++v[I].value,x(r,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ee,n);return r===n||void 0===r?t.ref(u(e)?e:""):(u(e)&&(r.value=e),r)},e.useSessionStorage=ie,e.useShare=function(e){const n=y&&"share"in navigator;let r=()=>Promise.resolve(!1),o=m,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=N,e.useStorage=function(e,t,n){return void 0===ce&&(ce=le("localStorage").supported),ce?se(e,t,n):ie(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),t.readonly(r)},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{u(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const o=r(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(o,e=>{if(a.value[u.value]!==e){if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop(),a.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);u.value+=t,o.value=a.value[u.value]},c=t.computed(()=>{const e=0===u.value?1:u.value;return a.value.slice(e)}),v=t.computed(()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)});return{value:o,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,n){const r=t.getCurrentInstance();return r?t.computed({get:()=>e[n],set(e){r.emit("update:"+n,e)}}):t.ref()},e.useValidation=function(e){const n=[],r=ge({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const a=r(e),u=2===arguments.length?t.isRef(arguments[1])&&o(arguments[1].value)?arguments[1]:t.ref([r(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>r(e)));u.value.forEach(e=>{e.value=a.value});let l=u.value.length;return t.watch([a,u],([e,t])=>{if(l<t.length)t.forEach(t=>t.value=e);else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}},{deep:!0}),t.watch(a,e=>{u.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const r=y&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=le,e.useWorker=function(e,n,r){const o=y&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},p),i.addEventListener("error",e=>{a.value=e,s.value=!0},p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,r){const o=y&&"Worker"in self,a=t.computed(()=>r&&n(r.dependencies)||[]),u=t.computed(()=>r&&n(r.timeout));if(!o)return k(e,{lazy:!0,throwException:!0});const l=k((...n)=>new Promise((r,o)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${z.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,h=m?t.watch(m,()=>{d(),r(void 0)},{immediate:!1}):f;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):o(e.data[1]),d()},p),i.addEventListener("error",e=>{d(),o(e)},p),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=r,e}({},VueRuntimeCore); | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function r(e){return t.isRef(e)?e:t.ref(e)}const o=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise(t=>{setTimeout(t,e)})}function g(e,t,n){return e<t?t:e>n?n:e}const y="undefined"!=typeof window;function w(e,...t){for(let r=0;r<t.length;r++){const o=t[r];if(void 0===o||!c(o))continue;const a=Object.keys(o);for(let t=0;t<a.length;t++){const r=a[t],u=n(o[r]),l=typeof u,s=typeof e[r];void 0!==e[r]&&l!==s||(e[r]=c(u)?w(e[r]||{},u):o[r])}}return e}function b(e,n,o,a){let u=f;if(e){const l=r(e),s=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,a),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});u=()=>{s(l.value),c()}}return u}function E(e,t,n){return S(e,t,n)}function S(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const M=["mousedown","touchstart"];function $(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:o,r=i.value=e(...t);try{const e=await r;return i.value===r&&(s.value=e),e}catch(e){return i.value===r&&(u.value=e,s.value=null),n?r:void 0}finally{i.value===r&&(a.value=!1)}};return r||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function k(e,n){const r=t.ref(!1);let o=void 0;const a=$((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const I=Symbol(""),L=Symbol(""),x=async(e,t,n,r)=>{const o=t[I].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||R;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let c=void 0;do{let e=!1,v=null;try{if(++a,v=r?n(...r):n(),d(v)&&(v=await v),t[L].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(o!==t[I].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[L].value)return null;if(o!==t[I].value)return v}while(a<9e3);return null};const R=()=>0;function C(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let O=void 0;let P=void 0,T=void 0;let j=void 0,A=void 0;function D(e,n){const r=y&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},p),r.addEventListener("message",e=>{a.value=e,o.value=e.data},p),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function F(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function U(e,t,n){e.style.setProperty(t,n)}const V={attributes:!0,childList:!0,subtree:!0},W=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const z=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function B(e){const n=!!y&&"matchMedia"in window;let r=void 0,o=void 0,a=f;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,p);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function N(e,n){const{addListener:r,send:o,close:a,supported:u}=D(e,()=>w()),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed(()=>1!==i.value||s.value),d=t.ref([]),f=t.ref(n);let m=!1,h=void 0;o({type:0});const g=()=>o({type:5,id:l}),w=()=>{0!==d.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...d.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),h===e.data.id&&d.value.length>0&&o({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:m=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,h=1===e.data.mind&&e.data.id||void 0,s.value=h===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],o({type:6,id:l});break;case 6:d.value.push(e.data.id)}},p),g(),t.watch(f,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(f.value=t);o({type:2,mind:i.value,value:c(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),y&&window.addEventListener("unload",w,p),t.onUnmounted(()=>{w(),a()}),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function _(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function H(e,n){const a=r(n),l=r(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||o(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function K(e,r){const[o,a]=H(e,r),u=t.computed(()=>new Intl.NumberFormat(n(o),n(a))),l=(e,t,r)=>(t||r?new Intl.NumberFormat(n(r)||n(o),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function q(e){if(e)return i(e)?e:J(e)}const J=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function Q(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=q(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=B(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=y?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:f,s=E(l,10),i=y?()=>window.removeEventListener("resize",s):f;return y&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,p)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const X=Symbol(""),Y={sm:640,md:768,lg:1024,xl:1280};function G(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function Z(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function ee(e){return i(e)?e+"px":e}function te(e){const t=[];if(o(e)){const n=e.map(te);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else c(n=e)&&u(n.raw)?t.push(e.raw):Z(e)?t.push(function(e){return Z(e)?`(${[e.max&&"max-width: "+ee(e.max),e.min&&"min-width: "+ee(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${ee(e)})`);var n;return t}function ne(e){const n=G(e)?e.theme.screens:e;if(G(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=te(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=te(n[e]).join(" or ")))}const r=Q(n);return t.provide(X,r),r}function re(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function oe(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return re(t,e)}}function ae(e,t){try{return e.parse(t)}catch{return t}}let ue=void 0;function le(e,n=JSON,o=10){const a=y?window[e]:void 0,l=oe(a);ue||(ue=new Map,y&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ue.get("localStorage");t=e.storageArea===window.localStorage?ue.get("localStorage"):ue.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let s,i=ue.get(e);return l&&a?i?s=i.$quotaError:(s=t.ref(!1),i={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:s,key:a.key,length:a.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),a.removeItem(e)},getItem(e){const t=a.getItem(e);return t?this.setItem(e,ae(n,t)):null},setItem(e,l){const i=r(l);this.$refMap.set(e,i);const c=(e,t)=>{try{const r=a.getItem(e),o=u(t)?t:n.stringify(t);a.setItem(e,o),r!==o&&y&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:r,storageArea:a}))}catch(e){s.value=re(e,a)}};c(e,l);const v=t.watch(i,S(t=>{c(e,t)},o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),i},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ae(n,t))}},ue.set(e,i)):(s=t.ref(!1),i={}),{supported:l,quotaError:s,store:i,remove:()=>ue.delete(e)}}function se(e,n,r){const{supported:o,store:a}=le("localStorage");let u=f,l=f,s=f,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function ie(e,n,r){const{supported:o,store:a}=le("sessionStorage");let u=f,l=f,s=m,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let ce=void 0;function ve(e){const n=r(e.currentPage),o=r(e.pageSize),a=t.ref(0),u=r(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=g(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>o.value,set(e){i(e)&&(o.value=e)}}),v=t.computed(()=>Math.ceil(u.value/c.value));s.value=n.value;return t.watch([u,c],e=>{s.value>v.value&&(s.value=v.value)},{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function de(e){const n=e&&e.refreshMs||1e3,r=!e||!l(e.sync)||e.sync,o=e&&a(e.timeFn)&&e.timeFn||Date.now;let u=void 0,s=void 0;const i=t.ref(o()),c=()=>{clearInterval(u),clearTimeout(s)},v=y?()=>u=setInterval(()=>i.value=o(),n):f;if(r){const e=1e3-(i.value-1e3*Math.floor(i.value/1e3));s=setTimeout(v,e)}else v();return t.onUnmounted(c),{now:i,remove:c}}function fe(e,r){return t.computed(()=>{const a=n(e);if(!r)return a;const u=t.isRef(r)?t.reactive(r.value):t.reactive(r);return a.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const r=o(u)?u[+t]:u[t];return void 0===r?e:""+n(r)})})}function me(e,r,o=".",a=f){return t.computed(()=>{const t=n(e),u=n(r);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(o);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!c(s))return a(l.slice(0,e+1).join(o),s,u,t);if(!n)return a(l.slice(0,e+1).join(o),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(o),s,u,t)}return s})}function pe(e){return void 0!==e.$value}const he=(e,r,o)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(r)?r:{$validator:r,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f}=((e,r,o,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=r(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?o.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=n(e),i.value=!0,e))};return a.push(n=>{c=n,t.watch(()=>{try{r(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(a),o);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,...l}},ge=(e,o)=>{const a={},u=pe(e)?r(e.$value):void 0;for(const r of Object.keys(e))if("$"!==r[0])if(u){const t=he(u,e[r],o);a[r]={...t,$value:u}}else{const u=ge(e[r],o);let s,i,c=void 0;if(pe(u)){const e=Object.keys(u).filter(e=>"$"!==e[0]).map(e=>u[e]);s=t.computed(()=>e.map(e=>e.$error).map(e=>n(e)).filter(Boolean)),i=t.computed(()=>e.some(e=>!!n(e.$invalid)))}else{const e=Object.keys(u).map(e=>u[e]);s=t.computed(()=>e.map(e=>n(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),c=t.computed(()=>e.some(e=>e.$anyDirty||l(n(e.$dirty))&&n(e.$dirty))),i=t.computed(()=>e.some(e=>!!n(e.$anyInvalid)))}a[r]={...u,$errors:s,$anyInvalid:i},c&&(a[r].$anyDirty=c)}else{if("$value"===r){a[r]=u;const e=t.ref(!1),n=t.watch(u,()=>{e.value=!0,n()},{immediate:!1,deep:!0});a.$dirty=e;continue}a[r]=e[r]}return a};const ye=Symbol("");function we(e){const o=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=(e,n)=>{if(v[e])return v[e];const o=n.value[e];if(!o)return t.ref({});let u=a(o)?o():o;return d(u)?u.then(t=>v[e]=r(t)):a(o)?r(u):v[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let p=!1;if(m){const t=f(e.fallback,u);d(t)?(t.then(e=>{c.value=e.value}),p=!0):c.value=t.value}else c.value={};const h=t.ref(0);t.watch(u,()=>h.value++,{deep:!0,immediate:!1}),t.watch([s,c,h],([t,r,o])=>{if(t===e.fallback&&m)i.value=r;else{const e=e=>i.value=w({},r,n(e)),o=f(t,u);d(o)?o.then(e):e(o)}},{immediate:!p});const g=(t,n)=>e.resolve?r(e.resolve(i.value,t,n)):fe(me(i,t,".",(e,t,n,r)=>n),n);return{locale:s,locales:o,i18n:i,$t:g,$ts:(e,t)=>g(e,t).value,addLocale:(e,t)=>{o.value.indexOf(e)>=0||o.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=o.value.indexOf(t);if(n>=0){const r=[s.value,c.value&&e.fallback,...o.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=r)),o.value.splice(n,1)}delete u.value[t],delete v[t]}}}function be(e){const n=we(e);return t.provide(ye,n),n}const Ee=Symbol("");const Se=Symbol(""),Me={install(e){const n=t.ref(!0),r=t.readonly(n);{e._context.provides[Se]=r;const t=e.mount;e.mount=(...e)=>{const r=t(...e);return n.value=!1,r}}}};return e.COMMIT="8f7dab4",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.5",e.VUE_VERSION="3",e.buildI18n=we,e.debounce=S,e.deepClone=w,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(o(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=F,e.hydrationPlugin=Me,e.injectFactory=_,e.isArray=o,e.isBoolean=l,e.isClient=y,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.minMax=g,e.noDelay=R,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=r(void 0===t?"":t);return e.provide(Ee,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.vnode.scopeId;if(!o)return t.ref(e);const{data:a,supported:u}=N(o,e);return a},e.setBreakpointTailwindCSS=ne,e.setCssVariableFor=U,e.setI18n=be,e.storageAvailable=oe,e.unwrap=n,e.useArrayPagination=function(e,n){const o=r(e),a=ve({currentPage:1,pageSize:10,...n,total:t.computed(()=>o.value.length)}),u=t.computed(()=>{const e=o.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]});return{...a,result:u}},e.useBreakpoint=Q,e.useBreakpointChrome=function(){return Q({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return _(X,()=>ne(e||Y))},e.useBroadcastChannel=D,e.useCancellablePromise=k,e.useCssVariables=function(e,o,a){const l=y&&"MutationObserver"in self,[s,i]=t.isRef(o)||v(o)?[o,a||V]:[l&&document.documentElement||{},o||V],c=t.ref(!0),d={},m=[],p=Object.entries(e).map(e=>{const[t,o]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return o&&(m.push(()=>U(n(s),t,n(o))),d[e[0]]=r(o)),[e[0],W(t)]});for(let e=0;e<p.length;e++){const[o,a]=p[e];d[o]||(d[o]=t.ref(t.isRef(s)&&!s.value||!l?null:F(n(s),a))),l&&t.watch([d[o],r(s)],e=>{c&&e[1]&&e[0]!==F(e[1],a)&&U(e[1],a,e[0])},{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,r]=p[e];d[t].value=F(n(s),r)}},g=new MutationObserver(h),w=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(w),t.isRef(s)?t.onMounted(()=>{m.forEach(e=>e()),t.watch(s,(e,t)=>{t&&w(),e&&b()})}):(y||s)&&(m.forEach(e=>e()),b()),{...d,supported:l,resume:b,stop:w,observing:c}},e.useCurrencyFormat=function(e,r,o){const a=n(e),u=!c(a),l=u?e:t.computed(()=>n(e).currency),[s,i]=H(r,u?o:e),v=t.computed(()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}}),d=K(s),f=(e,t,r,o,a)=>{const u={...v.value,...n(o)},l=n(t)||u.currency,s=n(r)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,r,o,a)=>t.computed(()=>f(e,n,r,o,a)),formatString:f}},e.useDateNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=E,e.useEvent=b,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=C(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:C(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:C(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=$(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,l.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];i&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:l,status:g,statusText:y}},e.useFormat=fe,e.useGeolocation=function(e){const n=y&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},c=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([s,r],t=>{v();const r=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:i,error:o,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(Se,t.computed(()=>!1))},e.useI18n=function(e){return e?be(e):t.inject(ye)},e.useIntersectionObserver=function(e,o){const a=y&&"IntersectionObserver"in window,u=e?r(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed(()=>o?n(o):l?void 0:n(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map(e=>e.target).forEach(m.value.observe)},{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted(()=>{l.value&&p(l)}),t.onUnmounted(()=>{g()})),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,r){const[o,a]=H(e,r),l=t.computed(()=>new Intl.DateTimeFormat(n(o),n(a))),s=(e,t,r)=>{const s=t||r?new Intl.DateTimeFormat(n(r)||n(o),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,r)=>t.computed(()=>s(e,n,r)),formatString:s,formatter:l}},e.useIntlNumberFormat=K,e.useLanguage=function(){if(j||(j=y?t.ref(navigator.language):t.ref("")),!A)if(y){A=t.ref(navigator.languages);const e=()=>{j.value=navigator.language,A.value=navigator.languages};window.addEventListener("languagechange",e,p)}else A=t.ref([]);return{language:j,languages:A}},e.useLocalStorage=se,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):o(t.unref(e))?r(e):r([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass="no-scroll");const i=t.ref(!1),c=t.computed(()=>l.value.map(e=>t.ref(e))),v=t.watch([i,c],([e,t],[r,o])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(r===e&&o.find(e=>n(e)===t)||s.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted(()=>l.value=Array.from(document.querySelectorAll(e))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=B,e.useNetworkInformation=function(){const e=!!y&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=b(e,"change",i,p),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=de,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=i(n)?[void 0,n]:[n,r];s&&(u=E(u,r));const c=b(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:c}},e.useOnOutsidePress=function(e,t){if(!y)return()=>{};const n=r(e),o=M.find(e=>"on"+e in document.documentElement);return b(document,o,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,o){const a=r(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=E(s,o));const d=y?b(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,o){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?r(e):t.ref(y&&window||void 0),s=a(e)?u:t.ref(y&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=(...e)=>s.value&&s.value.scrollTo&&s.value.scrollTo.apply(s.value,e),h=e=>m({top:e}),g=e=>m({left:e}),[w,S]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,o];S&&(f=E(f,o));const M=b(u,"scroll",f,w),$=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,scrollTo:m,remove:()=>{M(),k(),$()},scrollTopTo:h,scrollLeftTo:g}},e.useOnline=function(){const e=y&&"onLine"in navigator;return e||(O=t.ref(!1)),O||(O=t.ref(navigator.onLine),window.addEventListener("offline",()=>O.value=!1,p),window.addEventListener("online",()=>O.value=!0,p)),{supported:e,online:O}},e.usePageVisibility=function(){return T||(T=t.ref(y&&document.hidden)),P||(y?(P=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{P.value=document.visibilityState,T.value=document.hidden},p)):P=t.ref("visible")),{visibility:P,hidden:T}},e.usePagination=ve,e.usePath=me,e.usePerformanceNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=$,e.usePromiseLazy=function(e,t=!1){return $(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||a(e)?{}:e,o=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!a(o))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed(()=>s.value.length),nextRetry:l,retryErrors:s,[I]:{value:0},[L]:i},d=o?(...e)=>(++v[I].value,x(r,v,o,e)):e=>(++v[I].value,x(r,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ee,n);return r===n||void 0===r?t.ref(u(e)?e:""):(u(e)&&(r.value=e),r)},e.useSessionStorage=ie,e.useShare=function(e){const n=y&&"share"in navigator;let r=()=>Promise.resolve(!1),o=m,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=N,e.useStorage=function(e,t,n){return void 0===ce&&(ce=le("localStorage").supported),ce?se(e,t,n):ie(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),t.readonly(r)},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{u(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const o=r(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(o,e=>{if(a.value[u.value]!==e){if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop(),a.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);u.value+=t,o.value=a.value[u.value]},c=t.computed(()=>{const e=0===u.value?1:u.value;return a.value.slice(e)}),v=t.computed(()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)});return{value:o,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,n){const r=t.getCurrentInstance();return r?t.computed({get:()=>e[n],set(e){r.emit("update:"+n,e)}}):t.ref()},e.useValidation=function(e){const n=[],r=ge({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const a=r(e),u=2===arguments.length?t.isRef(arguments[1])&&o(arguments[1].value)?arguments[1]:t.ref([r(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>r(e)));u.value.forEach(e=>{e.value=a.value});let l=u.value.length;return t.watch([a,u],([e,t])=>{if(l<t.length)t.forEach(t=>t.value=e);else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}},{deep:!0}),t.watch(a,e=>{u.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const r=y&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=le,e.useWorker=function(e,n,r){const o=y&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},p),i.addEventListener("error",e=>{a.value=e,s.value=!0},p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,r){const o=y&&"Worker"in self,a=t.computed(()=>r&&n(r.dependencies)||[]),u=t.computed(()=>r&&n(r.timeout));if(!o)return k(e,{lazy:!0,throwException:!0});const l=k((...n)=>new Promise((r,o)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${z.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,h=m?t.watch(m,()=>{d(),r(void 0)},{immediate:!1}):f;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):o(e.data[1]),d()},p),i.addEventListener("error",e=>{d(),o(e)},p),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=r,e}({},VueRuntimeCore); |
@@ -1,1 +0,1 @@ | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function r(e){return t.isRef(e)?e:t.ref(e)}const o=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise(t=>{setTimeout(t,e)})}function g(e,t,n){return e<t?t:e>n?n:e}const y="undefined"!=typeof window;function w(e,...t){for(let r=0;r<t.length;r++){const o=t[r];if(void 0===o||!c(o))continue;const a=Object.keys(o);for(let t=0;t<a.length;t++){const r=a[t],u=n(o[r]),l=typeof u,s=typeof e[r];void 0!==e[r]&&l!==s||(e[r]=c(u)?w(e[r]||{},u):o[r])}}return e}function b(e,n,o,a){let u=f;if(e){const l=r(e),s=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,a),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});u=()=>{s(l.value),c()}}return u}function E(e,t,n){return S(e,t,n)}function S(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const M=["mousedown","touchstart"];function $(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:o,r=i.value=e(...t);try{const e=await r;return i.value===r&&(s.value=e),e}catch(e){return i.value===r&&(u.value=e,s.value=null),n?r:void 0}finally{i.value===r&&(a.value=!1)}};return r||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function k(e,n){const r=t.ref(!1);let o=void 0;const a=$((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const I=Symbol(""),L=Symbol(""),x=async(e,t,n,r)=>{const o=t[I].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||R;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let c=void 0;do{let e=!1,v=null;try{if(++a,v=r?n(...r):n(),d(v)&&(v=await v),t[L].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(o!==t[I].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[L].value)return null;if(o!==t[I].value)return v}while(a<9e3);return null};const R=()=>0;function C(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let O=void 0;let P=void 0,T=void 0;let j=void 0,A=void 0;function D(e,n){const r=y&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},p),r.addEventListener("message",e=>{a.value=e,o.value=e.data},p),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function F(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function U(e,t,n){e.style.setProperty(t,n)}const V={attributes:!0,childList:!0,subtree:!0},W=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const z=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function B(e){const n=!!y&&"matchMedia"in window;let r=void 0,o=void 0,a=f;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,p);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function N(e,n){const{addListener:r,send:o,close:a,supported:u}=D(e,()=>w()),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed(()=>1!==i.value||s.value),d=t.ref([]),f=t.ref(n);let m=!1,h=void 0;o({type:0});const g=()=>o({type:5,id:l}),w=()=>{0!==d.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...d.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),h===e.data.id&&d.value.length>0&&o({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:m=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,h=1===e.data.mind&&e.data.id||void 0,s.value=h===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],o({type:6,id:l});break;case 6:d.value.push(e.data.id)}},p),g(),t.watch(f,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(f.value=t);o({type:2,mind:i.value,value:c(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),y&&window.addEventListener("unload",w,p),t.onUnmounted(()=>{w(),a()}),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function _(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function H(e,n){const a=r(n),l=r(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||o(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function K(e,r){const[o,a]=H(e,r),u=t.computed(()=>new Intl.NumberFormat(n(o),n(a))),l=(e,t,r)=>(t||r?new Intl.NumberFormat(n(r)||n(o),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function q(e){if(e)return i(e)?e:J(e)}const J=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function Q(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=q(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=B(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=y?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:f,s=E(l,10),i=y?()=>window.removeEventListener("resize",s):f;return y&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,p)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const X=Symbol(""),Y={sm:640,md:768,lg:1024,xl:1280};function G(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function Z(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function ee(e){return i(e)?e+"px":e}function te(e){const t=[];if(o(e)){const n=e.map(te);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else c(n=e)&&u(n.raw)?t.push(e.raw):Z(e)?t.push(function(e){return Z(e)?`(${[e.max&&"max-width: "+ee(e.max),e.min&&"min-width: "+ee(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${ee(e)})`);var n;return t}function ne(e){const n=G(e)?e.theme.screens:e;if(G(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=te(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=te(n[e]).join(" or ")))}const r=Q(n);return t.provide(X,r),r}function re(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function oe(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return re(t,e)}}function ae(e,t){try{return e.parse(t)}catch{return t}}let ue=void 0;function le(e,n=JSON,o=10){const a=y?window[e]:void 0,l=oe(a);ue||(ue=new Map,y&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ue.get("localStorage");t=e.storageArea===window.localStorage?ue.get("localStorage"):ue.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let s,i=ue.get(e);return l&&a?i?s=i.$quotaError:(s=t.ref(!1),i={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:s,key:a.key,length:a.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),a.removeItem(e)},getItem(e){const t=a.getItem(e);return t?this.setItem(e,ae(n,t)):null},setItem(e,l){const i=r(l);this.$refMap.set(e,i);const c=(e,t)=>{try{const r=a.getItem(e),o=u(t)?t:n.stringify(t);a.setItem(e,o),r!==o&&y&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:r,storageArea:a}))}catch(e){s.value=re(e,a)}};c(e,l);const v=t.watch(i,S(t=>{c(e,t)},o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),i},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ae(n,t))}},ue.set(e,i)):(s=t.ref(!1),i={}),{supported:l,quotaError:s,store:i,remove:()=>ue.delete(e)}}function se(e,n,r){const{supported:o,store:a}=le("localStorage");let u=f,l=f,s=f,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function ie(e,n,r){const{supported:o,store:a}=le("sessionStorage");let u=f,l=f,s=m,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let ce=void 0;function ve(e){const n=r(e.currentPage),o=r(e.pageSize),a=t.ref(0),u=r(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=g(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>o.value,set(e){i(e)&&(o.value=e)}}),v=t.computed(()=>Math.ceil(u.value/c.value));s.value=n.value;return t.watch([u,c],e=>{s.value>v.value&&(s.value=v.value)},{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function de(e){const n=e&&e.refreshMs||1e3,r=!e||!l(e.sync)||e.sync,o=e&&a(e.timeFn)&&e.timeFn||Date.now;let u=void 0,s=void 0;const i=t.ref(o()),c=()=>{clearInterval(u),clearTimeout(s)},v=y?()=>u=setInterval(()=>i.value=o(),n):f;if(r){const e=1e3-(i.value-1e3*Math.floor(i.value/1e3));s=setTimeout(v,e)}else v();return t.onUnmounted(c),{now:i,remove:c}}function fe(e,r){return t.computed(()=>{const a=n(e);if(!r)return a;const u=t.isRef(r)?t.reactive(r.value):t.reactive(r);return a.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const r=o(u)?u[+t]:u[t];return void 0===r?e:""+n(r)})})}function me(e,r,o=".",a=f){return t.computed(()=>{const t=n(e),u=n(r);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(o);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!c(s))return a(l.slice(0,e+1).join(o),s,u,t);if(!n)return a(l.slice(0,e+1).join(o),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(o),s,u,t)}return s})}function pe(e){return void 0!==e.$value}const he=(e,r,o)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(r)?r:{$validator:r,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f}=((e,r,o,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=r(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?o.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=n(e),i.value=!0,e))};return a.push(n=>{c=n,t.watch(()=>{try{r(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(a),o);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,...l}},ge=(e,o)=>{const a={},u=pe(e)?r(e.$value):void 0;for(const r of Object.keys(e))if("$"!==r[0])if(u){const t=he(u,e[r],o);a[r]={...t,$value:u}}else{const u=ge(e[r],o);let s,i,c=void 0;if(pe(u)){const e=Object.keys(u).filter(e=>"$"!==e[0]).map(e=>u[e]);s=t.computed(()=>e.map(e=>e.$error).map(e=>n(e)).filter(Boolean)),i=t.computed(()=>e.some(e=>!!n(e.$invalid)))}else{const e=Object.keys(u).map(e=>u[e]);s=t.computed(()=>e.map(e=>n(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),c=t.computed(()=>e.some(e=>e.$anyDirty||l(n(e.$dirty))&&n(e.$dirty))),i=t.computed(()=>e.some(e=>!!n(e.$anyInvalid)))}a[r]={...u,$errors:s,$anyInvalid:i},c&&(a[r].$anyDirty=c)}else{if("$value"===r){a[r]=u;const e=t.ref(!1),n=t.watch(u,()=>{e.value=!0,n()},{immediate:!1,deep:!0});a.$dirty=e;continue}a[r]=e[r]}return a};const ye=Symbol("");function we(e){const o=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=(e,n)=>{if(v[e])return v[e];const o=n.value[e];if(!o)return t.ref({});let u=a(o)?o():o;return d(u)?u.then(t=>v[e]=r(t)):a(o)?r(u):v[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let p=!1;if(m){const t=f(e.fallback,u);d(t)?(t.then(e=>{c.value=e.value}),p=!0):c.value=t.value}else c.value={};const h=t.ref(0);t.watch(u,()=>h.value++,{deep:!0,immediate:!1}),t.watch([s,c,h],([t,r,o])=>{if(t===e.fallback&&m)i.value=r;else{const e=e=>i.value=w({},r,n(e)),o=f(t,u);d(o)?o.then(e):e(o)}},{immediate:!p});const g=(t,n)=>e.resolve?r(e.resolve(i.value,t,n)):fe(me(i,t,".",(e,t,n,r)=>n),n);return{locale:s,locales:o,i18n:i,$t:g,$ts:(e,t)=>g(e,t).value,addLocale:(e,t)=>{o.value.indexOf(e)>=0||o.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=o.value.indexOf(t);if(n>=0){const r=[s.value,c.value&&e.fallback,...o.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=r)),o.value.splice(n,1)}delete u.value[t],delete v[t]}}}function be(e){const n=we(e);return t.provide(ye,n),n}const Ee=Symbol("");const Se=Symbol(""),Me={install(e){const n=t.ref(!0),r=t.readonly(n);{e._context.provides[Se]=r;const t=e.mount;e.mount=(...e)=>{const r=t(...e);return n.value=!1,r}}}};return e.COMMIT="7e79920",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.4",e.VUE_VERSION="3",e.buildI18n=we,e.debounce=S,e.deepClone=w,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(o(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=F,e.hydrationPlugin=Me,e.injectFactory=_,e.isArray=o,e.isBoolean=l,e.isClient=y,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.minMax=g,e.noDelay=R,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=r(void 0===t?"":t);return e.provide(Ee,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.vnode.scopeId;if(!o)return t.ref(e);const{data:a,supported:u}=N(o,e);return a},e.setBreakpointTailwindCSS=ne,e.setCssVariableFor=U,e.setI18n=be,e.storageAvailable=oe,e.unwrap=n,e.useArrayPagination=function(e,n){const o=r(e),a=ve({currentPage:1,pageSize:10,...n,total:t.computed(()=>o.value.length)}),u=t.computed(()=>{const e=o.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]});return{...a,result:u}},e.useBreakpoint=Q,e.useBreakpointChrome=function(){return Q({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return _(X,()=>ne(e||Y))},e.useBroadcastChannel=D,e.useCancellablePromise=k,e.useCssVariables=function(e,o,a){const l=y&&"MutationObserver"in self,[s,i]=t.isRef(o)||v(o)?[o,a||V]:[l&&document.documentElement||{},o||V],c=t.ref(!0),d={},m=[],p=Object.entries(e).map(e=>{const[t,o]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return o&&(m.push(()=>U(n(s),t,n(o))),d[e[0]]=r(o)),[e[0],W(t)]});for(let e=0;e<p.length;e++){const[o,a]=p[e];d[o]||(d[o]=t.ref(t.isRef(s)&&!s.value||!l?null:F(n(s),a))),l&&t.watch([d[o],r(s)],e=>{c&&e[1]&&e[0]!==F(e[1],a)&&U(e[1],a,e[0])},{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,r]=p[e];d[t].value=F(n(s),r)}},g=new MutationObserver(h),w=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(w),t.isRef(s)?t.onMounted(()=>{m.forEach(e=>e()),t.watch(s,(e,t)=>{t&&w(),e&&b()})}):(y||s)&&(m.forEach(e=>e()),b()),{...d,supported:l,resume:b,stop:w,observing:c}},e.useCurrencyFormat=function(e,r,o){const a=n(e),u=!c(a),l=u?e:t.computed(()=>n(e).currency),[s,i]=H(r,u?o:e),v=t.computed(()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}}),d=K(s),f=(e,t,r,o,a)=>{const u={...v.value,...n(o)},l=n(t)||u.currency,s=n(r)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,r,o,a)=>t.computed(()=>f(e,n,r,o,a)),formatString:f}},e.useDateNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=E,e.useEvent=b,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=C(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:C(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:C(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=$(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,l.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];i&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:l,status:g,statusText:y}},e.useFormat=fe,e.useGeolocation=function(e){const n=y&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},c=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([s,r],t=>{v();const r=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:i,error:o,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(Se,t.computed(()=>!1))},e.useI18n=function(e){return e?be(e):t.inject(ye)},e.useIntersectionObserver=function(e,o){const a=y&&"IntersectionObserver"in window,u=e?r(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed(()=>o?n(o):l?void 0:n(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map(e=>e.target).forEach(m.value.observe)},{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted(()=>{l.value&&p(l)}),t.onUnmounted(()=>{g()})),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,r){const[o,a]=H(e,r),l=t.computed(()=>new Intl.DateTimeFormat(n(o),n(a))),s=(e,t,r)=>{const s=t||r?new Intl.DateTimeFormat(n(r)||n(o),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,r)=>t.computed(()=>s(e,n,r)),formatString:s,formatter:l}},e.useIntlNumberFormat=K,e.useLanguage=function(){if(j||(j=y?t.ref(navigator.language):t.ref("")),!A)if(y){A=t.ref(navigator.languages);const e=()=>{j.value=navigator.language,A.value=navigator.languages};window.addEventListener("languagechange",e,p)}else A=t.ref([]);return{language:j,languages:A}},e.useLocalStorage=se,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):o(t.unref(e))?r(e):r([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass="no-scroll");const i=t.ref(!1),c=t.computed(()=>l.value.map(e=>t.ref(e))),v=t.watch([i,c],([e,t],[r,o])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(r===e&&o.find(e=>n(e)===t)||s.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted(()=>l.value=Array.from(document.querySelectorAll(e))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=B,e.useNetworkInformation=function(){const e=!!y&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=b(e,"change",i,p),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=de,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=i(n)?[void 0,n]:[n,r];s&&(u=E(u,r));const c=b(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:c}},e.useOnOutsidePress=function(e,t){if(!y)return()=>{};const n=r(e),o=M.find(e=>"on"+e in document.documentElement);return b(document,o,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,o){const a=r(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=E(s,o));const d=y?b(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,o){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?r(e):t.ref(y&&window||void 0),s=a(e)?u:t.ref(y&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=(...e)=>s.value&&s.value.scrollTo&&s.value.scrollTo.apply(s.value,e),h=e=>m({top:e}),g=e=>m({left:e}),[w,S]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,o];S&&(f=E(f,o));const M=b(u,"scroll",f,w),$=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,scrollTo:m,remove:()=>{M(),k(),$()},scrollTopTo:h,scrollLeftTo:g}},e.useOnline=function(){const e=y&&"onLine"in navigator;return e||(O=t.ref(!1)),O||(O=t.ref(navigator.onLine),window.addEventListener("offline",()=>O.value=!1,p),window.addEventListener("online",()=>O.value=!0,p)),{supported:e,online:O}},e.usePageVisibility=function(){return T||(T=t.ref(y&&document.hidden)),P||(y?(P=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{P.value=document.visibilityState,T.value=document.hidden},p)):P=t.ref("visible")),{visibility:P,hidden:T}},e.usePagination=ve,e.usePath=me,e.usePerformanceNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=$,e.usePromiseLazy=function(e,t=!1){return $(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||a(e)?{}:e,o=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!a(o))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed(()=>s.value.length),nextRetry:l,retryErrors:s,[I]:{value:0},[L]:i},d=o?(...e)=>(++v[I].value,x(r,v,o,e)):e=>(++v[I].value,x(r,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ee,n);return r===n||void 0===r?t.ref(u(e)?e:""):(u(e)&&(r.value=e),r)},e.useSessionStorage=ie,e.useShare=function(e){const n=y&&"share"in navigator;let r=()=>Promise.resolve(!1),o=m,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=N,e.useStorage=function(e,t,n){return void 0===ce&&(ce=le("localStorage").supported),ce?se(e,t,n):ie(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),t.readonly(r)},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{u(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const o=r(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(o,e=>{if(a.value[u.value]!==e){if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop(),a.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);u.value+=t,o.value=a.value[u.value]},c=t.computed(()=>{const e=0===u.value?1:u.value;return a.value.slice(e)}),v=t.computed(()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)});return{value:o,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,n){const r=t.getCurrentInstance();return r?t.computed({get:()=>e[n],set(e){r.emit("update:"+n,e)}}):t.ref()},e.useValidation=function(e){const n=[],r=ge({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const a=r(e),u=2===arguments.length?t.isRef(arguments[1])&&o(arguments[1].value)?arguments[1]:t.ref([r(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>r(e)));u.value.forEach(e=>{e.value=a.value});let l=u.value.length;return t.watch([a,u],([e,t])=>{if(l<t.length)t.forEach(t=>t.value=e);else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}},{deep:!0}),t.watch(a,e=>{u.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const r=y&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=le,e.useWorker=function(e,n,r){const o=y&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},p),i.addEventListener("error",e=>{a.value=e,s.value=!0},p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,r){const o=y&&"Worker"in self,a=t.computed(()=>r&&n(r.dependencies)||[]),u=t.computed(()=>r&&n(r.timeout));if(!o)return k(e,{lazy:!0,throwException:!0});const l=k((...n)=>new Promise((r,o)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${z.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,h=m?t.watch(m,()=>{d(),r(void 0)},{immediate:!1}):f;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):o(e.data[1]),d()},p),i.addEventListener("error",e=>{d(),o(e)},p),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=r,e}({},VueRuntimeCore); | ||
var vueComposable=function(e,t){"use strict";function n(e){return t.isRef(e)?e.value:e}function r(e){return t.isRef(e)?e:t.ref(e)}const o=Array.isArray,a=e=>"function"==typeof e,u=e=>"string"==typeof e,l=e=>"boolean"==typeof e,s=e=>c(e)&&a(e.getTime),i=e=>"number"==typeof e,c=e=>null!==e&&"object"==typeof e,v=e=>c(e)&&!!e.tagName;function d(e){return c(e)&&a(e.then)&&a(e.catch)}const f=()=>{},m=()=>!1,p={passive:!0};function h(e){return new Promise(t=>{setTimeout(t,e)})}function g(e,t,n){return e<t?t:e>n?n:e}const y="undefined"!=typeof window;function w(e,...t){for(let r=0;r<t.length;r++){const o=t[r];if(void 0===o||!c(o))continue;const a=Object.keys(o);for(let t=0;t<a.length;t++){const r=a[t],u=n(o[r]),l=typeof u,s=typeof e[r];void 0!==e[r]&&l!==s||(e[r]=c(u)?w(e[r]||{},u):o[r])}}return e}function b(e,n,o,a){let u=f;if(e){const l=r(e),s=e=>e.removeEventListener(n,o),i=e=>e.addEventListener(n,o,a),c=t.watch(l,(e,t,n)=>{e&&(i(e),n(()=>s(e)))},{immediate:!0});u=()=>{s(l.value),c()}}return u}function E(e,t,n){return S(e,t,n)}function S(e,t=50,n={isImmediate:!1}){let r;return function(...o){const a=this,u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout((function(){r=void 0,n.isImmediate||e.apply(a,o)}),t),u&&e.apply(a,o)}}const M=["mousedown","touchstart"];function $(e,n){if(!e)throw new Error(`[usePromise] argument can't be '${e}'`);if("function"!=typeof e)throw new Error("[usePromise] expects function, but received "+typeof e);const[r,o]=l(n)?[n,!1]:c(n)?[n.lazy,n.throwException]:[!1,!1],a=t.ref(!1),u=t.ref(null),s=t.ref(null),i=t.ref(),v=async(...t)=>{a.value=!0,u.value=null;const n=t&&e.length!==t.length&&t.length>0&&l(t[t.length-1])?t[t.length-1]:o,r=i.value=e(...t);try{const e=await r;return i.value===r&&(s.value=e),e}catch(e){return i.value===r&&(u.value=e,s.value=null),n?r:void 0}finally{i.value===r&&(a.value=!1)}};return r||v(),{exec:v,result:s,promise:i,loading:a,error:u}}function k(e,n){const r=t.ref(!1);let o=void 0;const a=$((...t)=>{return n=e(...t),new Promise((e,t)=>{o=e=>{r.value=!0,t(e)},n.then(e).catch(t)});var n},n);return!t.getCurrentInstance()||c(n)&&!1===n.unmountCancel||t.onUnmounted(()=>o&&o()),{...a,cancel:e=>{o&&o(e)},cancelled:r}}const I=Symbol(""),L=Symbol(""),x=async(e,t,n,r)=>{const o=t[I].value;let a=-1;const u=e.maxRetries||9001,l=e.retryDelay||R;t.retryErrors.value=[],t.isRetrying.value=!1,t.nextRetry.value=void 0;let c=void 0;do{let e=!1,v=null;try{if(++a,v=r?n(...r):n(),d(v)&&(v=await v),t[L].value)return null;e=!0}catch(e){v=null,t.retryErrors.value.push(e)}if(o!==t[I].value)return v;if(e)return t.isRetrying.value=!1,t.nextRetry.value=void 0,v;if(a>=u)return t.isRetrying.value=!1,t.nextRetry.value=void 0,Promise.reject(new Error("[useRetry] max retries reached "+u));t.isRetrying.value=!0;const f=Date.now(),m=l(a),p=d(m)?await m:m;if(!d(m)||p){if(i(p))c=p;else{if(!s(p))throw new Error(`[useRetry] invalid value received from options.retryDelay '${typeof p}'`);c=p.getTime()}c<f?t.nextRetry.value=f+c:(t.nextRetry.value=c,c-=f),c>0&&await h(c)}if(t[L].value)return null;if(o!==t[I].value)return v}while(a<9e3);return null};const R=()=>0;function C(e){return e&&(l(e.isJson)||l(e.parseImmediate)||l(e.unmountCancel))}let O=void 0;let P=void 0,T=void 0;let j=void 0,A=void 0;function D(e,n){const r=y&&"BroadcastChannel"in self,o=t.ref(null),a=t.ref(null),u=t.ref(null),l=t.ref(!1),s=t.ref(!1);let i=f,c=f,v=f;if(r){const r=new BroadcastChannel(e);r.addEventListener("messageerror",e=>{u.value=e,l.value=!0},p),r.addEventListener("message",e=>{a.value=e,o.value=e.data},p),i=e=>r.postMessage(e),c=()=>{r.close(),s.value=!0},v=(e,n)=>{r.addEventListener("message",e,n),t.onUnmounted(()=>r.removeEventListener("message",e))},t.onUnmounted(()=>{n&&n(),c()})}return{supported:r,data:o,messageEvent:a,errorEvent:u,errored:l,isClosed:s,send:i,close:c,addListener:v}}function F(e,t){const n=getComputedStyle(e).getPropertyValue(t);return n?n.trim():null}function U(e,t,n){e.style.setProperty(t,n)}const V={attributes:!0,childList:!0,subtree:!0},W=e=>e.length<=2||"-"!==e[0]||"-"!==e[1]?"--"+e:e;const z=e=>function(t){const n=t.data||[];return new Promise(t=>{try{Promise.resolve(e.apply(e,n)).then(e=>t(postMessage([!0,e]))).catch(e=>t(postMessage([!1,e])))}catch(e){t(postMessage([!1,e]))}})};function B(e){const n=!!y&&"matchMedia"in window;let r=void 0,o=void 0,a=f;if(n){r=t.ref(matchMedia(e)),o=t.ref(r.value.matches);const n=e=>{o.value=e.matches};r.value.addEventListener("change",n,p);const a=()=>r.value.removeEventListener("change",n);t.onUnmounted(a)}else r=t.ref({}),o=t.ref(!1);return{supported:n,mediaQueryList:r,matches:o,remove:a}}function N(e,n){const{addListener:r,send:o,close:a,supported:u}=D(e,()=>w()),l=Date.now(),s=t.ref(!1),i=t.ref(0),v=t.computed(()=>1!==i.value||s.value),d=t.ref([]),f=t.ref(n);let m=!1,h=void 0;o({type:0});const g=()=>o({type:5,id:l}),w=()=>{0!==d.value.length&&(s.value&&o({type:3,mind:1,id:Math.min(...d.value)}),o({type:4,id:l}))};return r(e=>{switch(e.data.type){case 0:o({type:2,value:f.value,mind:i.value});break;case 4:{const t=d.value.indexOf(e.data.id);t>=0&&d.value.splice(t,1),h===e.data.id&&d.value.length>0&&o({type:3,mind:1,id:Math.min(l,...d.value)});break}case 2:m=!0,f.value=e.data.value,i.value=e.data.mind;break;case 3:i.value=e.data.mind,h=1===e.data.mind&&e.data.id||void 0,s.value=h===l,s.value&&(d.value=[],g());break;case 5:d.value=[e.data.id],o({type:6,id:l});break;case 6:d.value.push(e.data.id)}},p),g(),t.watch(f,(e,t)=>{if(m)m=!1;else{if(1===i.value&&!1===s.value)return m=!0,void(f.value=t);o({type:2,mind:i.value,value:c(e)?{...e}:e}),m=!1}},{deep:!0,immediate:!1}),y&&window.addEventListener("unload",w,p),t.onUnmounted(()=>{w(),a()}),{supported:u,id:l,data:f,master:s,mind:i,editable:v,targets:d,ping:g,setMind:e=>{switch(e){case 1:s.value=!0;break;case 0:s.value=!1}i.value=e,o({type:3,id:l,mind:i.value})},addListener:r}}function _(e,n){const r=Symbol(),o=t.inject(e,r);return o===r?n():o}function H(e,n){const a=r(n),l=r(e);return c(a.value)||t.isRef(n)?[void 0!==l.value?l:void 0,a]:!c(l.value)||o(l.value)||u(l.value)?[l.value?l:void 0,void 0]:[void 0,l]}function K(e,r){const[o,a]=H(e,r),u=t.computed(()=>new Intl.NumberFormat(n(o),n(a))),l=(e,t,r)=>(t||r?new Intl.NumberFormat(n(r)||n(o),{...n(a),...n(t)}):u.value).format(n(e));return{format:(e,n,r)=>t.computed(()=>l(e,n,r)),formatString:l,formatter:u}}function q(e){if(e)return i(e)?e:J(e)}const J=e=>{const t=e.match(/^(\d+)px$/);if(t)return+t[1]};function Q(e){const n={},r=new Map,o=t.ref();let a=[];const u=[];for(const o in e){const l=e[o],s=q(l);if(void 0!==s){const e=t.ref(!1);n[o]=e,r.set(s,{name:o,valid:e}),a.push(s)}else{const{matches:e,remove:t}=B(l);n[o]=e,u.push(t)}}a=a.sort((e,t)=>t-e);const l=y?()=>{const e=window.innerWidth;let t=void 0;for(let n=0;n<a.length;n++){const o=a[n],u=r.get(o);u.valid.value=e>=o,e>=o&&void 0===t&&(t=u.name)}o.value=t}:f,s=E(l,10),i=y?()=>window.removeEventListener("resize",s):f;return y&&(t.onMounted(()=>{l(),window.addEventListener("resize",s,p)}),t.onUnmounted(()=>{i(),u.forEach(e=>e())})),{...n,remove:i,current:o}}const X=Symbol(""),Y={sm:640,md:768,lg:1024,xl:1280};function G(e){return c(e)&&c(e.theme)&&c(e.theme.screens)}function Z(e){return!!c(e)&&(u(e.min)||u(e.max)||i(e.min)||i(e.max))}function ee(e){return i(e)?e+"px":e}function te(e){const t=[];if(o(e)){const n=e.map(te);for(let e=0;e<n.length;e++){const r=n[e];t.push(...r)}}else c(n=e)&&u(n.raw)?t.push(e.raw):Z(e)?t.push(function(e){return Z(e)?`(${[e.max&&"max-width: "+ee(e.max),e.min&&"min-width: "+ee(e.min)].filter(Boolean).join(" and ")})`:""}(e)):(u(e)||i(e))&&t.push(`(min-width: ${ee(e)})`);var n;return t}function ne(e){const n=G(e)?e.theme.screens:e;if(G(e))for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];c(t)?n[e]=te(n[e]).join(" or "):u(t)&&(t.endsWith("px")||(n[e]=te(n[e]).join(" or ")))}const r=Q(n);return t.provide(X,r),r}function re(e,t){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&(t&&0!==t.length||!1)}function oe(e){try{if(!e)return!1;const t=":$";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return re(t,e)}}function ae(e,t){try{return e.parse(t)}catch{return t}}let ue=void 0;function le(e,n=JSON,o=10){const a=y?window[e]:void 0,l=oe(a);ue||(ue=new Map,y&&window.addEventListener("storage",e=>{if(e.newValue===e.oldValue)return;let t=ue.get("localStorage");t=e.storageArea===window.localStorage?ue.get("localStorage"):ue.get("sessionStorage"),t&&Object.keys(t.$syncKeys).length>0&&(null===e.key?t.clear():t.$syncKeys[e.key]&&(null===e.newValue?t.removeItem(e.key):t.updateItem(e.key,e.newValue)))}));let s,i=ue.get(e);return l&&a?i?s=i.$quotaError:(s=t.ref(!1),i={$refMap:new Map,$watchHandlers:new Map,$syncKeys:{},$quotaError:s,key:a.key,length:a.length,setSync(e,t){t?this.$syncKeys[e]=!0:delete this.$syncKeys[e]},clear(){this.$refMap.forEach((e,t)=>this.removeItem(t))},removeItem(e){const t=this.$refMap.get(e);t&&(t.value=void 0);const n=this.$watchHandlers.get(e);n&&n(),delete this.$syncKeys[e],this.$refMap.delete(e),a.removeItem(e)},getItem(e){const t=a.getItem(e);return t?this.setItem(e,ae(n,t)):null},setItem(e,l){const i=r(l);this.$refMap.set(e,i);const c=(e,t)=>{try{const r=a.getItem(e),o=u(t)?t:n.stringify(t);a.setItem(e,o),r!==o&&y&&this.$syncKeys[e]&&window.dispatchEvent(new StorageEvent(e,{newValue:o,oldValue:r,storageArea:a}))}catch(e){s.value=re(e,a)}};c(e,l);const v=t.watch(i,S(t=>{c(e,t)},o),{immediate:!1,deep:!0});return this.$watchHandlers.set(e,v),i},updateItem(e,t){let r=this.$refMap.get(e);r&&(r.value=ae(n,t))}},ue.set(e,i)):(s=t.ref(!1),i={}),{supported:l,quotaError:s,store:i,remove:()=>ue.delete(e)}}function se(e,n,r){const{supported:o,store:a}=le("localStorage");let u=f,l=f,s=f,i=void 0;return o&&a?(s=t=>a.setSync(e,t),u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n)),!1!==r&&s(!0)):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}function ie(e,n,r){const{supported:o,store:a}=le("sessionStorage");let u=f,l=f,s=m,i=void 0;return o&&a?(u=()=>a.removeItem(e),l=()=>a.clear(),i=a.getItem(e),i||(i=a.setItem(e,n))):i=t.ref(n),{supported:o,storage:i,clear:l,remove:u,setSync:s}}let ce=void 0;function ve(e){const n=r(e.currentPage),o=r(e.pageSize),a=t.ref(0),u=r(e.total),l=t.computed({get:()=>a.value,set(e){i(e)&&(a.value=Math.min(e,u.value))}}),s=t.computed({get:()=>n.value,set(e){i(e)&&(n.value=g(e,1,v.value),l.value=(n.value-1)*c.value)}}),c=t.computed({get:()=>o.value,set(e){i(e)&&(o.value=e)}}),v=t.computed(()=>Math.ceil(u.value/c.value));s.value=n.value;return t.watch([u,c],e=>{s.value>v.value&&(s.value=v.value)},{immediate:!1}),{pageSize:c,total:u,currentPage:s,offset:l,lastPage:v,next:()=>++s.value,prev:()=>--s.value,first:()=>s.value=1,last:()=>s.value=v.value}}function de(e){const n=e&&e.refreshMs||1e3,r=!e||!l(e.sync)||e.sync,o=e&&a(e.timeFn)&&e.timeFn||Date.now;let u=void 0,s=void 0;const i=t.ref(o()),c=()=>{clearInterval(u),clearTimeout(s)},v=y?()=>u=setInterval(()=>i.value=o(),n):f;if(r){const e=1e3-(i.value-1e3*Math.floor(i.value/1e3));s=setTimeout(v,e)}else v();return t.onUnmounted(c),{now:i,remove:c}}function fe(e,r){return t.computed(()=>{const a=n(e);if(!r)return a;const u=t.isRef(r)?t.reactive(r.value):t.reactive(r);return a.replace(/({?{[\w\s]*}?})/g,e=>{const t=e.replace("{","").replace("}","").trim();if(e[0]===e[1]&&"{"===e[0])return""+t;const r=o(u)?u[+t]:u[t];return void 0===r?e:""+n(r)})})}function me(e,r,o=".",a=f){return t.computed(()=>{const t=n(e),u=n(r);if(void 0===t)return a(u,t,u,t);if(!u)return t;const l=u.split(o);let s=t;for(let e=0;e<l.length;e++){let n=l[e];if("]"===n[n.length-1]){const t=/\[[`'"]?([^`'"\]]*)[`'"]?\]/g;let r=n,o=t.exec(r);if(o){let a=o[0].length,u=o.index-a,s=1;do{o.index,u=o.index,a=o[0].length,n=n.slice(0,-o[0].length),l.splice(e+s,0,o[1]),++s}while(o=t.exec(r));if(!n&&"["===r[0]&&r.length>2)continue}else n="",console.warn(`[usePath] invalid path provided "${r}"`)}if(!c(s))return a(l.slice(0,e+1).join(o),s,u,t);if(!n)return a(l.slice(0,e+1).join(o),s,u,t);if(s=s[n],!s)return a(l.slice(0,e+1).join(o),s,u,t)}return s})}function pe(e){return void 0!==e.$value}const he=(e,r,o)=>{const{$message:a,$validator:u,...l}=function(e){return c(e)}(r)?r:{$validator:r,$message:void 0},{$pending:s,$promise:i,$invalid:v,$error:f}=((e,r,o,a)=>{const u=t.ref(null),l=t.ref(!1),s=t.ref(),i=t.ref(!1);let c=void 0;const v=e=>{u.value=(async()=>{try{l.value=!0;const t=r(e,c);d(t)?i.value=!await t:i.value=!t,s.value=i.value?o.value:void 0}catch(e){throw i.value=!0,e}finally{l.value=!1}})().catch(e=>(s.value=n(e),i.value=!0,e))};return a.push(n=>{c=n,t.watch(()=>{try{r(e.value,c)}catch(e){}return e.value},v,{deep:!0,immediate:!0})}),{$promise:u,$pending:l,$invalid:i,$error:s}})(e,u,t.ref(a),o);return{$pending:s,$error:f,$promise:i,$invalid:v,$message:a,...l}},ge=(e,o)=>{const a={},u=pe(e)?r(e.$value):void 0;for(const r of Object.keys(e))if("$"!==r[0])if(u){const t=he(u,e[r],o);a[r]={...t,$value:u}}else{const u=ge(e[r],o);let s,i,c=void 0;if(pe(u)){const e=Object.keys(u).filter(e=>"$"!==e[0]).map(e=>u[e]);s=t.computed(()=>e.map(e=>e.$error).map(e=>n(e)).filter(Boolean)),i=t.computed(()=>e.some(e=>!!n(e.$invalid)))}else{const e=Object.keys(u).map(e=>u[e]);s=t.computed(()=>e.map(e=>n(e.$errors)).filter(Boolean).filter(e=>e.some(Boolean))),c=t.computed(()=>e.some(e=>e.$anyDirty||l(n(e.$dirty))&&n(e.$dirty))),i=t.computed(()=>e.some(e=>!!n(e.$anyInvalid)))}a[r]={...u,$errors:s,$anyInvalid:i},c&&(a[r].$anyDirty=c)}else{if("$value"===r){a[r]=u;const e=t.ref(!1),n=t.watch(u,()=>{e.value=!0,n()},{immediate:!1,deep:!0});a.$dirty=e;continue}a[r]=e[r]}return a};const ye=Symbol("");function we(e){const o=t.ref(Object.keys(e.messages)),u=t.ref(e.messages),s=t.ref(e.locale),i=t.ref({});let c=t.ref();const v={},f=(e,n)=>{if(v[e])return v[e];const o=n.value[e];if(!o)return t.ref({});let u=a(o)?o():o;return d(u)?u.then(t=>v[e]=r(t)):a(o)?r(u):v[e]=t.computed(()=>n.value[e])},m=!!e.fallback&&(!l(e.notFoundFallback)||e.notFoundFallback);let p=!1;if(m){const t=f(e.fallback,u);d(t)?(t.then(e=>{c.value=e.value}),p=!0):c.value=t.value}else c.value={};const h=t.ref(0);t.watch(u,()=>h.value++,{deep:!0,immediate:!1}),t.watch([s,c,h],([t,r,o])=>{if(t===e.fallback&&m)i.value=r;else{const e=e=>i.value=w({},r,n(e)),o=f(t,u);d(o)?o.then(e):e(o)}},{immediate:!p});const g=(t,n)=>e.resolve?r(e.resolve(i.value,t,n)):fe(me(i,t,".",(e,t,n,r)=>n),n);return{locale:s,locales:o,i18n:i,$t:g,$ts:(e,t)=>g(e,t).value,addLocale:(e,t)=>{o.value.indexOf(e)>=0||o.value.push(e),delete v[e],u.value[e]=t},removeLocale:t=>{const n=o.value.indexOf(t);if(n>=0){const r=[s.value,c.value&&e.fallback,...o.value].find(e=>e&&e!==t);r&&(t===e.fallback&&(c.value=void 0),t===s.value&&(s.value=r)),o.value.splice(n,1)}delete u.value[t],delete v[t]}}}function be(e){const n=we(e);return t.provide(ye,n),n}const Ee=Symbol("");const Se=Symbol(""),Me={install(e){const n=t.ref(!0),r=t.readonly(n);{e._context.provides[Se]=r;const t=e.mount;e.mount=(...e)=>{const r=t(...e);return n.value=!1,r}}}};return e.COMMIT="8f7dab4",e.FALSE_OP=m,e.MAX_ARRAY_SIZE=4294967294,e.NO_OP=f,e.PASSIVE_EV=p,e.SCROLL_LOCK_CLASS="no-scroll",e.VERSION="1.0.0-beta.5",e.VUE_VERSION="3",e.buildI18n=we,e.debounce=S,e.deepClone=w,e.exponentialDelay=e=>{const t=100*Math.pow(2,e);return t+.2*t*Math.random()},e.exposeWorker=function(e){this.onmessage=async t=>{const n=e(t.data);if(void 0===n)this.postMessage(n);else if(null===n)this.postMessage(n);else if(o(n))this.postMessage(n);else if(n[Symbol.asyncIterator])for await(const e of n)this.postMessage(e);else if(n[Symbol.iterator])for(const e of n)this.postMessage(e);else this.postMessage(await n)}},e.getCssVariableFor=F,e.hydrationPlugin=Me,e.injectFactory=_,e.isArray=o,e.isBoolean=l,e.isClient=y,e.isDate=s,e.isElement=v,e.isFunction=a,e.isNumber=i,e.isObject=c,e.isPromise=d,e.isString=u,e.isSymbol=e=>"symbol"==typeof e,e.minMax=g,e.noDelay=R,e.promisedTimeout=h,e.provideSSRTitle=function(e,t){const n=r(void 0===t?"":t);return e.provide(Ee,n),n},e.refShared=function(e,n){const r=t.getCurrentInstance(),o=n||r.vnode.scopeId;if(!o)return t.ref(e);const{data:a,supported:u}=N(o,e);return a},e.setBreakpointTailwindCSS=ne,e.setCssVariableFor=U,e.setI18n=be,e.storageAvailable=oe,e.unwrap=n,e.useArrayPagination=function(e,n){const o=r(e),a=ve({currentPage:1,pageSize:10,...n,total:t.computed(()=>o.value.length)}),u=t.computed(()=>{const e=o.value;return Array.isArray(e)?e.slice(a.offset.value,a.offset.value+a.pageSize.value):[]});return{...a,result:u}},e.useBreakpoint=Q,e.useBreakpointChrome=function(){return Q({mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560})},e.useBreakpointTailwindCSS=function(e){return _(X,()=>ne(e||Y))},e.useBroadcastChannel=D,e.useCancellablePromise=k,e.useCssVariables=function(e,o,a){const l=y&&"MutationObserver"in self,[s,i]=t.isRef(o)||v(o)?[o,a||V]:[l&&document.documentElement||{},o||V],c=t.ref(!0),d={},m=[],p=Object.entries(e).map(e=>{const[t,o]=u(e[1])?[e[1]]:[e[1].name,e[1].value];return o&&(m.push(()=>U(n(s),t,n(o))),d[e[0]]=r(o)),[e[0],W(t)]});for(let e=0;e<p.length;e++){const[o,a]=p[e];d[o]||(d[o]=t.ref(t.isRef(s)&&!s.value||!l?null:F(n(s),a))),l&&t.watch([d[o],r(s)],e=>{c&&e[1]&&e[0]!==F(e[1],a)&&U(e[1],a,e[0])},{immediate:!t.isRef(s)})}if(!l)return{...d,stop:f,resume:f,supported:l,observing:c};const h=()=>{for(let e=0;e<p.length;e++){const[t,r]=p[e];d[t].value=F(n(s),r)}},g=new MutationObserver(h),w=()=>{g.disconnect(),c.value=!1},b=()=>{c.value||h(),g.observe(n(s),i),c.value=!0};return t.onUnmounted(w),t.isRef(s)?t.onMounted(()=>{m.forEach(e=>e()),t.watch(s,(e,t)=>{t&&w(),e&&b()})}):(y||s)&&(m.forEach(e=>e()),b()),{...d,supported:l,resume:b,stop:w,observing:c}},e.useCurrencyFormat=function(e,r,o){const a=n(e),u=!c(a),l=u?e:t.computed(()=>n(e).currency),[s,i]=H(r,u?o:e),v=t.computed(()=>{const e=n(i)||{},t=n(l)||e.currency;return{style:"currency",...e,currency:t}}),d=K(s),f=(e,t,r,o,a)=>{const u={...v.value,...n(o)},l=n(t)||u.currency,s=n(r)||u.currencyDisplay;return d.formatString(e,{...u,currency:l,currencyDisplay:s},a)};return{format:(e,n,r,o,a)=>t.computed(()=>f(e,n,r,o,a)),formatString:f}},e.useDateNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:Date.now})},e.useDebounce=E,e.useEvent=b,e.useFetch=function(e,n){const r=t.ref(null),o=t.ref(""),a=t.ref(),l=t.ref(null),[s,i,c]=C(e)?[!1!==e.isJson,!1!==e.parseImmediate,!1!==e.unmountCancel]:C(n)?[!1!==n.isJson,!1!==n.parseImmediate,!1!==n.unmountCancel]:[!0,!0,!0],v=e?u(e)?n:C(e)?e:u(e.url)?n:e:void 0,d=t.ref(!1),f=t.ref();let m=void 0;const p=e=>{m&&(m.abort(),d.value=!0,f.value=e)},h=$(async(e,t)=>{m=new AbortController;const n=await fetch(e,{signal:m.signal,...v,...t});if(n){const e=[s?n.clone().json().then(e=>r.value=e).catch(e=>{r.value=null,l.value=e}):Promise.resolve(),n.clone().blob().then(e=>{a.value=e}),n.clone().text().then(e=>{o.value=e})];i&&await Promise.all(e)}return n},!0),g=t.computed(()=>h.result.value&&h.result.value.status||null),y=t.computed(()=>h.result.value&&h.result.value.statusText||null);return e&&(u(e)||u(e.url))&&h.exec(e,void 0,!1),c&&t.getCurrentInstance()&&t.onUnmounted(()=>{m&&p("unmounted")}),{...h,cancel:p,isCancelled:d,cancelledMessage:f,text:o,blob:a,json:r,jsonError:l,status:g,statusText:y}},e.useFormat=fe,e.useGeolocation=function(e){const n=y&&!!navigator.geolocation,r=t.ref(e?!1===e.immediate:void 0),o=t.ref(null),a=t.ref(null),u=t.ref(null),s=t.ref(e&&e.enableHighAccuracy||null);let i=f;if(n){const n=e=>{a.value=e.timestamp,u.value=e.coords,o.value=null},c=e=>{a.value=Date.now(),u.value=null,o.value=e},v=()=>!0!==r.value&&f&&navigator.geolocation.clearWatch(f);let d=()=>navigator.geolocation.getCurrentPosition(n,c,e);i=r.value?()=>{r.value?r.value=!1:d()}:d;let f=0;t.onMounted(()=>t.watch([s,r],t=>{v();const r=l(t[0])?t[0]:e?e.enableHighAccuracy:void 0;f=navigator.geolocation.watchPosition(n,c,e?{...e,enableHighAccuracy:r}:{enableHighAccuracy:r})},{immediate:!r.value})),t.onUnmounted(v)}return{supported:n,refresh:i,error:o,timestamp:a,coords:u,highAccuracy:s}},e.useHydration=function(){return t.inject(Se,t.computed(()=>!1))},e.useI18n=function(e){return e?be(e):t.inject(ye)},e.useIntersectionObserver=function(e,o){const a=y&&"IntersectionObserver"in window,u=e?r(e):void 0,l=!u||!v(u.value)&&u.value?void 0:u,s=t.computed(()=>o?n(o):l?void 0:n(e)),i=t.ref([]),c=t.computed(()=>i.value.length>0&&i.value.every(e=>e.isIntersecting)),d=e=>{i.value=e};let m=t.ref();a&&t.watch(s,e=>{m.value&&m.value.disconnect();const t=e&&e&&{root:n(e.root),rootMargin:n(e.rootMargin),threshold:n(e.threshold)}||void 0;m.value=new IntersectionObserver(d,t);i.value.map(e=>e.target).forEach(m.value.observe)},{deep:!0,immediate:!0});const p=a?e=>{const t=n(e);m.value.observe(t)}:f,h=a?e=>{const t=n(e);m.value.unobserve(t)}:f,g=()=>m.value.disconnect();return l&&(t.onMounted(()=>{l.value&&p(l)}),t.onUnmounted(()=>{g()})),{supported:a,elements:i,observe:p,unobserve:h,disconnect:g,isIntersecting:c}},e.useInterval=function(e,n,...r){let o=void 0;const a=(t,...a)=>{if(u(),!t&&!n)return;return o=setInterval(e,t||n,...a&&a.length?a:r)},u=()=>{o&&(clearInterval(o),o=void 0)};return i(n)&&a(),t.onUnmounted(u),{remove:u,start:a}},e.useIntlDateTimeFormat=function(e,r){const[o,a]=H(e,r),l=t.computed(()=>new Intl.DateTimeFormat(n(o),n(a))),s=(e,t,r)=>{const s=t||r?new Intl.DateTimeFormat(n(r)||n(o),{...n(a),...n(t)}):l.value,i=n(e);return s.format(u(i)?new Date(i):i)};return{format:(e,n,r)=>t.computed(()=>s(e,n,r)),formatString:s,formatter:l}},e.useIntlNumberFormat=K,e.useLanguage=function(){if(j||(j=y?t.ref(navigator.language):t.ref("")),!A)if(y){A=t.ref(navigator.languages);const e=()=>{j.value=navigator.language,A.value=navigator.languages};window.addEventListener("languagechange",e,p)}else A=t.ref([]);return{language:j,languages:A}},e.useLocalStorage=se,e.useLockScroll=function(e,a){const l=u(e)?t.ref([]):o(t.unref(e))?r(e):r([e]),s=u(a)?{lockedClass:a,auto:!0}:a||{auto:!0};s.lockedClass||(s.lockedClass="no-scroll");const i=t.ref(!1),c=t.computed(()=>l.value.map(e=>t.ref(e))),v=t.watch([i,c],([e,t],[r,o])=>{for(const a of t){const t=n(a);if(s.lockedClass){if(!t)return;t.classList.toggle(s.lockedClass,e)}s.onChange&&(r===e&&o.find(e=>n(e)===t)||s.onChange(t,e))}},{flush:"sync",deep:!1}),d=()=>i.value=!0,f=()=>i.value=!1;return u(e)&&t.onMounted(()=>l.value=Array.from(document.querySelectorAll(e))),!1!==s.auto&&(t.onMounted(d),t.onActivated(d),t.onDeactivated(f),t.onBeforeUnmount(f)),{locked:i,lock:d,unlock:f,remove:v}},e.useMatchMedia=B,e.useNetworkInformation=function(){const e=!!y&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection),n=!!e,r=t.ref(0),o=t.ref(0),a=t.ref("none"),u=t.ref(0),l=t.ref(!1),s=t.ref("none");let i=f,c=f;return e&&(i=()=>{r.value=e.downlink,o.value=e.downlinkMax,a.value=e.effectiveType,u.value=e.rtt,l.value=e.saveData,s.value=e.type},c=b(e,"change",i,p),i()),{supported:n,downlink:r,downlinkMax:o,effectiveType:a,rtt:u,saveData:l,type:s,remove:c}},e.useNow=de,e.useOnMouseMove=function(e,n,r){const o=t.ref(0),a=t.ref(0);let u=e=>{o.value=e.x,a.value=e.y};const[l,s]=i(n)?[void 0,n]:[n,r];s&&(u=E(u,r));const c=b(e,"mousemove",u,l);return{mouseX:o,mouseY:a,remove:c}},e.useOnOutsidePress=function(e,t){if(!y)return()=>{};const n=r(e),o=M.find(e=>"on"+e in document.documentElement);return b(document,o,e=>n.value&&!n.value.contains(e.target)&&t(e),{passive:!0})},e.useOnResize=function(e,n,o){const a=r(e),u=t.ref(a.value&&a.value.clientHeight),l=t.ref(a.value&&a.value.clientWidth);let s=()=>{u.value=a.value.clientHeight,l.value=a.value.clientWidth};const[c,v]=i(n)?[void 0,n]:[n,o];v&&(s=E(s,o));const d=y?b(window,"resize",s,c||p):f;return t.isRef(e)&&!e.value&&t.onMounted(s),{height:u,width:l,remove:d}},e.useOnScroll=function(e,n,o){const a=e=>!(i(e)||l(e)||!v(e)&&!t.isRef(e)||!e),u=a(e)?r(e):t.ref(y&&window||void 0),s=a(e)?u:t.ref(y&&window.document.scrollingElement||void 0),c=t.ref(s.value&&s.value.scrollTop||0),d=t.ref(s.value&&s.value.scrollLeft||0);let f=()=>{c.value=s.value.scrollTop,d.value=s.value.scrollLeft};const m=(...e)=>s.value&&s.value.scrollTo&&s.value.scrollTo.apply(s.value,e),h=e=>m({top:e}),g=e=>m({left:e}),[w,S]=i(e)||!e?[p,e]:i(n)?[p,n]:[n,o];S&&(f=E(f,o));const M=b(u,"scroll",f,w),$=t.watch(c,h,{immediate:!1}),k=t.watch(d,g,{immediate:!1});return{scrollTop:c,scrollLeft:d,scrollTo:m,remove:()=>{M(),k(),$()},scrollTopTo:h,scrollLeftTo:g}},e.useOnline=function(){const e=y&&"onLine"in navigator;return e||(O=t.ref(!1)),O||(O=t.ref(navigator.onLine),window.addEventListener("offline",()=>O.value=!1,p),window.addEventListener("online",()=>O.value=!0,p)),{supported:e,online:O}},e.usePageVisibility=function(){return T||(T=t.ref(y&&document.hidden)),P||(y?(P=t.ref(document.visibilityState),document.addEventListener("visibilitychange",()=>{P.value=document.visibilityState,T.value=document.hidden},p)):P=t.ref("visible")),{visibility:P,hidden:T}},e.usePagination=ve,e.usePath=me,e.usePerformanceNow=function(e){return de({refreshMs:e&&e.refreshMs||1e3,sync:!e||!l(e.sync)||e.sync,timeFn:()=>performance.now()})},e.usePromise=$,e.usePromiseLazy=function(e,t=!1){return $(e,{lazy:!0,throwException:t})},e.useRetry=function(e,n){const r=!e||a(e)?{}:e,o=a(e)?e:n;if(!a(e)&&!c(e))throw new Error("[useRetry] options needs to be 'object'");if(o&&!a(o))throw new Error("[useRetry] factory needs to be 'function'");const u=t.ref(!1),l=t.ref(),s=t.ref([]),i={value:!1},v={isRetrying:u,retryCount:t.computed(()=>s.value.length),nextRetry:l,retryErrors:s,[I]:{value:0},[L]:i},d=o?(...e)=>(++v[I].value,x(r,v,o,e)):e=>(++v[I].value,x(r,v,e,void 0));return{...v,cancel:()=>{v.isRetrying.value=!1,v.retryErrors.value.push(new Error("[useRetry] cancelled")),v.nextRetry.value=void 0,i.value=!0},exec:d}},e.useSSRTitle=function(e){const n=Symbol(),r=t.inject(Ee,n);return r===n||void 0===r?t.ref(u(e)?e:""):(u(e)&&(r.value=e),r)},e.useSessionStorage=ie,e.useShare=function(e){const n=y&&"share"in navigator;let r=()=>Promise.resolve(!1),o=m,a=t.ref(!1),u=t.ref(!1);return n&&(r=e=>(a.value=!1,u.value=!1,navigator.share(e).then(e=>(a.value=!0,e)).catch(e=>(a.value=!1,u.value=!0,!1))),o=e=>navigator.canShare(e),e&&o(e)&&r(e)),{supported:n,share:r,canShare:o,shared:a,cancelled:u}},e.useSharedRef=N,e.useStorage=function(e,t,n){return void 0===ce&&(ce=le("localStorage").supported),ce?se(e,t,n):ie(e,t)},e.useTimeline=function(e,n){const r=t.ref([]),o=n&&n.clone?n.clone:e=>e,a=n&&n.maxLength||4294967294;return t.watch(e,(e,t)=>{r.value.unshift({item:o(t),date:new Date}),r.value.length>a&&r.value.pop()},{immediate:!1,flush:"sync",...n}),t.readonly(r)},e.useTitle=function(e=null){const n=t.ref(u(e)?e:document.title),r=new MutationObserver(e=>{n.value=e[0].target.textContent});t.watch(n,(e,t)=>{u(e)&&e!==t&&(document.title=e)},{immediate:!0,flush:"sync"});const o=document.querySelector("title");return r.observe(o,{childList:!0}),t.onUnmounted(()=>r.disconnect()),n},e.useUndo=function(e,n){const o=r(e),a=t.ref([]),u=t.ref(0),l=n&&n.maxLength||4294967294,s=n&&n.clone||(e=>e);t.watch(o,e=>{if(a.value[u.value]!==e){if(u.value>0){const e=u.value;a.value.splice(0,e),u.value=0}a.value.length>l&&a.value.pop(),a.value.unshift(s(e))}},{...n,immediate:!0,flush:"sync"});const i=e=>{const t=Math.sign(e)<=0?Math.max(e,-v.value.length):Math.min(e,c.value.length);u.value+=t,o.value=a.value[u.value]},c=t.computed(()=>{const e=0===u.value?1:u.value;return a.value.slice(e)}),v=t.computed(()=>{const e=0===u.value?1:0;return a.value.slice(e,u.value)});return{value:o,undo:(e=1)=>i(e),redo:(e=1)=>i(-e),jump:i,prev:c,next:v}},e.useVModel=function(e,n){const r=t.getCurrentInstance();return r?t.computed({get:()=>e[n],set(e){r.emit("update:"+n,e)}}):t.ref()},e.useValidation=function(e){const n=[],r=ge({input:e},n),o=t.reactive(r.input);return n.forEach(e=>e(o)),o},e.useValueSync=function(e,n){const a=r(e),u=2===arguments.length?t.isRef(arguments[1])&&o(arguments[1].value)?arguments[1]:t.ref([r(arguments[1])]):t.ref(Array.from(arguments).slice(1).map(e=>r(e)));u.value.forEach(e=>{e.value=a.value});let l=u.value.length;return t.watch([a,u],([e,t])=>{if(l<t.length)t.forEach(t=>t.value=e);else{l=t.length;for(const n of t)if(n.value!==e)return void(a.value=n.value)}},{deep:!0}),t.watch(a,e=>{u.value.forEach(t=>t.value=e)},{deep:!0,flush:"sync"}),u},e.useWebSocket=function(e,n){const r=y&&"WebSocket"in window;let o=null;const a=t.ref(null),u=t.ref(null),l=t.ref(null),s=t.ref(!1),i=t.ref(!1),c=t.ref(!1);let v=f,d=f;return r&&(o=new WebSocket(e,n),o.addEventListener("message",e=>{a.value=e,l.value=e.data}),o.addEventListener("error",e=>{u.value=e,c.value=!0}),o.addEventListener("close",()=>{s.value=!1,i.value=!0}),o.addEventListener("open",()=>{s.value=!0,i.value=!1}),v=e=>o.send(e),d=(e,t)=>{o.close(e,t)}),{supported:r,ws:o,send:v,close:d,messageEvent:a,errorEvent:u,data:l,isOpen:s,isClosed:i,errored:c}},e.useWebStorage=le,e.useWorker=function(e,n,r){const o=y&&"Worker"in self,a=t.ref(),u=t.ref(),l=t.ref(!o),s=t.ref(!o);if(!o)return l.value=!0,{worker:void 0,data:u,postMessage:f,terminate:f,errorEvent:a,errored:s,terminated:l};const i=new Worker(e,r),c=e=>i.postMessage(e);function v(){i.terminate(),l.value=!0}return i.addEventListener("message",e=>{u.value=e.data},p),i.addEventListener("error",e=>{a.value=e,s.value=!0},p),t.onUnmounted(v),n&&c(n),{worker:i,data:u,postMessage:c,terminate:v,errorEvent:a,errored:s,terminated:l}},e.useWorkerFunction=function(e,r){const o=y&&"Worker"in self,a=t.computed(()=>r&&n(r.dependencies)||[]),u=t.computed(()=>r&&n(r.timeout));if(!o)return k(e,{lazy:!0,throwException:!0});const l=k((...n)=>new Promise((r,o)=>{const s=function(e,t){const n=[t.length>0?`importScripts("${t.join('","')}");`:"","onmessage=",`(${z.toString()})(${e.toString()})`],r=new Blob(n,{type:"text/javascript"});return URL.createObjectURL(r)}(e,a.value),i=new Worker(s);let c=-1;const v=u.value,d=()=>{i.terminate(),URL.revokeObjectURL(s),clearTimeout(c),h()},m=n.length===e.length+1&&t.isRef(n[n.length-1])&&!1===n[n.length-1].value?t.computed(()=>l.cancelled.value||n[n.length-1].value):l.cancelled,h=m?t.watch(m,()=>{d(),r(void 0)},{immediate:!1}):f;i.addEventListener("message",e=>{e.data[0]?r(e.data[1]):o(e.data[1]),d()},p),i.addEventListener("error",e=>{d(),o(e)},p),i.postMessage([...n]),v&&(c=setTimeout(()=>{l.cancel(`[WebWorker] timeout after ${v}ms`)},v))}),{lazy:!0,throwException:!0});return l},e.wrap=r,e}({},VueRuntimeCore); |
{ | ||
"name": "vue-composable", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "vue-composable", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package