directix 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * directix v1.4.0
2
+ * directix v1.4.1
3
3
  * A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3
4
4
  * (c) 2021-present saqqdy <https://github.com/saqqdy>
5
5
  * Released under the MIT License.
6
6
  */
7
- var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);s((n=n.apply(e,t)).next())});!function(e,t){"use strict";function n(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,n,r){e.mounted&&e.mounted(t,o(n),r)},update(t,n,r,l){const i=t.__directix_state__;e.updated&&e.updated(t,o(n),r,o(__spreadProps(__spreadValues({},n),{value:n.oldValue})),l),i&&(i.value=n.value,i.vnode=r)},componentUpdated(e,t,n,o){},unbind(t,n,r){e.unmounted&&e.unmounted(t,o(n),r);const l=t.__directix_state__;(null==l?void 0:l.cleanup)&&l.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function o(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function r(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,l(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,r){const i=t.__directix_state__;e.updated&&e.updated(t,l(n),o,l(__spreadProps(__spreadValues({},n),{value:n.oldValue})),r),i&&(i.value=n.value,i.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,l(n),o);const r=t.__directix_state__;(null==r?void 0:r.cleanup)&&r.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function l(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}let i=null,s=null,a=null,u=null;function c(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function d(){var e,t;if(null!==i)return i;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return i=2.7,i;if("2"===e)return i=2,i;if("3"===e)return i=3,i}try{const e=require("vue"),t=c(null==e?void 0:e.version);if(null!==t)return i=t,i}catch(e){}if("undefined"!=typeof window){const n=window,o=n.Vue;if(null==o?void 0:o.version){const e=c(o.version);if(null!==e)return i=e,i}if("function"==typeof(null==o?void 0:o.observable))return i=2,i;if("function"==typeof(null==o?void 0:o.createApp)&&"function"!=typeof(null==o?void 0:o.observable))return i=3,i;const r=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==r?void 0:r.Vue)?void 0:e.version){const e=c(r.Vue.version);if(null!==e)return i=e,i}if(null==(t=null==r?void 0:r.apps)?void 0:t.length)return i=3,i}return null===i&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),i=3),i}function p(e){i=e,s=2===e||2.7===e,a=2.7===e,u=3===e}const v=()=>"undefined"!=typeof window&&"undefined"!=typeof document,f=()=>!v(),m=()=>{if(!v())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},h=()=>v()&&"IntersectionObserver"in window,g=()=>v()&&"ResizeObserver"in window,b=()=>v()&&"clipboard"in navigator,y=()=>v()&&"MutationObserver"in window;function w(e){var t;const o=e,{name:l,version:i,ssr:s,defaults:a}=o,u=__objRest(o,["name","version","ssr","defaults"]);if(f()&&!s)return"undefined"!=typeof process&&"test"!==(null==(t=process.env)?void 0:t.NODE_ENV)&&console.warn(`[Directix] Directive "${l}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let t=null;function o(){return t||(t=2===d()?n(e):r(e)),t}function l(e){return function(t,n,r,l){var i,s;null==(s=(i=o())[e])||s.call(i,t,n,r,l)}}return{bind:l("bind"),inserted:l("inserted"),update:l("update"),componentUpdated:l("componentUpdated"),unbind:l("unbind"),created:l("created"),beforeMount:l("beforeMount"),mounted:l("mounted"),beforeUpdate:l("beforeUpdate"),updated:l("updated"),beforeUnmount:l("beforeUnmount"),unmounted:l("unmounted")}}({mounted:u.mounted?(e,t,n)=>{u.mounted(e,_(t,a),n)}:void 0,updated:u.updated?(e,t,n,o,r)=>{u.updated(e,_(t,a),n,o,r)}:void 0,unmounted:u.unmounted})}function _(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function x(e,t,n){if(!t.onInput)return()=>{};const o=()=>{const t=e.selectionStart,o=e.selectionEnd,r=e.value,l=n(r);r!==l&&(e.value=l,null!==t&&null!==o&&e.setSelectionRange(t,o),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",o),e.value=n(e.value),()=>{e.removeEventListener("input",o)}}function E(e,t){const n=e.textContent||"";e.textContent=t(n)}function T(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}const L=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function k(e,t){if(!e)return e;const{every:n=!0,keepLower:o=L}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?C(e):o.includes(e.toLowerCase())?e.toLowerCase():C(e)).join(" ")}return C(e)}function C(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function S(e){var t,n,o;return void 0===e||!0===e?{every:!0,onInput:!0}:!1===e?{every:!1,onInput:!1}:{every:null==(t=e.every)||t,keepLower:null!=(n=e.keepLower)?n:L,onInput:null==(o=e.onInput)||o}}const D=w({name:"capitalcase",ssr:!0,mounted(e,t){const n=S(t.value);if(T(e)){const t=x(e,n,e=>k(e,n));e.__capitalcaseCleanup=t}else E(e,e=>k(e,n))},updated(e,t){const n=S(t.value);T(e)?n.onInput&&(e.value=k(e.value,n)):E(e,e=>k(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),I="__directix_";function M(e,t,n){e[I+t]=n}function P(e,t){return e[I+t]}function O(e,t){delete e[I+t]}function z(e){return e?"string"==typeof e?v()?document.querySelector(e):null:e instanceof Element?e:null:null}function H(e){if(!v())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function Y(e,t,n,o=!1){if(!v())return;const r=A(o);e.addEventListener(t,n,r)}function $(e,t,n,o=!1){if(!v())return;const r=A(o);e.removeEventListener(t,n,r)}function A(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}function X(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function R(e){const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}const N=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function V(e){for(const t of N)if(e[t])return t;return null}function U(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function B(e){return"string"==typeof e}function F(e){return"function"==typeof e}function j(e){return"object"==typeof e&&null!==e}function W(e){return Array.isArray(e)}function q(e,t=300,n={}){let o=null,r=null,l=null;const{leading:i=!1,trailing:s=!0}=n,a=()=>{r&&(e.apply(l,r),r=null,l=null)},u=function(...e){r=e,l=this,o&&clearTimeout(o),i&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return u.cancel=()=>{o&&(clearTimeout(o),o=null),r=null,l=null},u.flush=()=>{o&&(clearTimeout(o),a(),o=null)},u}function Z(e,t=300,n={}){let o=null,r=null,l=null,i=0;const{leading:s=!0,trailing:a=!0}=n,u=()=>{r&&(e.apply(l,r),r=null,l=null)},c=function(...e){const n=Date.now();i||s||(i=n);const c=t-(n-i);r=e,l=this,c<=0||c>t?(o&&(clearTimeout(o),o=null),i=n,u()):!o&&a&&(o=setTimeout(()=>{i=s?Date.now():0,o=null,u()},c))};return c.cancel=()=>{o&&(clearTimeout(o),o=null),i=0,r=null,l=null},c}function K(e){if(!e)return null;if(e.endsWith("ms"))return parseInt(e,10);if(e.endsWith("s"))return 1e3*parseFloat(e);const t=parseInt(e,10);return isNaN(t)?null:t}const G="clickDelay";function J(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function Q(e,t){return n=>{const o=P(e,G);if(!o||o.isPending)return n.preventDefault(),void n.stopPropagation();o.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),o.timeoutId=setTimeout(()=>{o.isPending=!1,o.timeoutId=null,J(e,t)},t.delay)}}function ee(e,t){var n,o,r,l;const i=K(t.arg)||300;if("function"==typeof e)return{handler:e,delay:i,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0};if(!e)throw new Error("[Directix] v-click-delay: handler is required");return{handler:e.handler,delay:null!=(n=e.delay)?n:i,disabled:null!=(o=e.disabled)&&o,pendingClass:null!=(r=e.pendingClass)?r:"v-click-delay--pending",feedback:null==(l=e.feedback)||l}}const te=w({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=ee(t.value,t);if(n.disabled)return;const o={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,o),e.addEventListener("click",o.handler),e.addEventListener("touchend",o.handler)},updated(e,t){const n=P(e,G);if(!n){const n=ee(t.value,t);if(!n.disabled){const t={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const o=ee(t.value,t);o.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),J(e,n.options),O(e,G)):!o.disabled&&n.options.disabled&&(n.handler=Q(e,o),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=o},unmounted(e){const t=P(e,G);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),J(e,t.options),O(e,G))}}),ne=w({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=oe(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const r=t=>{re(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,r);const l={capture:n.capture,passive:!n.prevent};Y(document,t,r,l)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,r=oe(t.value);if(o.disabled!==r.disabled)if(r.disabled)n.handlers.forEach((e,t)=>{$(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{re(e,t,r)&&(r.stop&&t.stopPropagation(),r.prevent&&t.preventDefault(),r.handler(t))};r.events.forEach(e=>{const o=t();n.handlers.set(e,o),Y(document,e,o,{capture:r.capture,passive:!r.prevent})})}n.options=r},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{$(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function oe(e){var t,n,o,r,l;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(r=e.stop)&&r,prevent:null!=(l=e.prevent)&&l},e)}function re(e,t,n){var o;const r=t.target;if(e.contains(r))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():z(e);if(t&&(t===r||t.contains(r)))return!1}return!0}function le(e){return __async(this,null,function*(){if(b())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const ie=w({name:"copy",ssr:!1,mounted(e,t){const n=se(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,r,l;const i=o.options.value;if(i)try{if(!(yield le(i)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,i),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:i}}))}catch(t){const n=t;null==(l=(r=o.options).onError)||l.call(r,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=se(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function se(e){return"string"==typeof e?{value:e}:e}function ae(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function ue(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function ce(e){var t,n,o,r;return"object"==typeof e&&null!==e&&"target"in e?{target:e.target,format:null!=(t=e.format)?t:"hh:mm:ss",onComplete:e.onComplete,onTick:e.onTick,interval:null!=(n=e.interval)?n:1e3,showMilliseconds:null!=(o=e.showMilliseconds)&&o,autoStart:null==(r=e.autoStart)||r,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const de=w({name:"countdown",ssr:!0,mounted(e,t){const n=ce(t.value),o={options:n,targetTime:ae(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=o,!1!==n.autoStart?pe(e,o):ve(e,o)},updated(e,t){const n=e.__countdown,o=ce(t.value),r=ae(o.target);r!==n.targetTime?(n.targetTime=r,n.options=o,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||pe(e,n)):n.options=o},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function pe(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,ve(e,t),function(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(ve(e,t),t.options.onTick){const e=ue(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function ve(e,t){const n=function(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}(ue(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function fe(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const me=w({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=fe(t.value,t),o=V(t.modifiers)||U(e),r=q(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__debounce={debouncedFn:r,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=fe(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=q(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function he(e){if(e.type.startsWith("touch")){const t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function ge(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}function be(e){var t,n,o;return void 0===e||!0===e?{axis:"both",constrain:!1,disabled:!1}:!1===e?{axis:"both",constrain:!1,disabled:!0}:{axis:null!=(t=e.axis)?t:"both",constrain:null!=(n=e.constrain)&&n,boundary:e.boundary,handle:e.handle,disabled:null!=(o=e.disabled)&&o,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const ye=w({name:"draggable",ssr:!1,mounted(e,t){const n=be(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const o={options:n,isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,initialLeft:0,initialTop:0,boundaryWidth:0,boundaryHeight:0,elWidth:0,elHeight:0,handleEl:n.handle?e.querySelector(n.handle):null,moveHandler:null,endHandler:null};e.__draggable=o;const r=o.handleEl||e;function l(t){var n,r,l;if(o.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:i,clientY:s}=he(t);o.isDragging=!0,o.startX=i,o.startY=s;const{x:a,y:u}=ge(e.style.transform);if(o.offsetX=a,o.offsetY=u,o.options.constrain||o.options.boundary){const t=o.options.boundary?function(e,t){var n,o;if(!t)return null;if("function"==typeof t){const e=t();return null!=(n=null==e?void 0:e.getBoundingClientRect())?n:null}if("string"==typeof t){const e=document.querySelector(t);return null!=(o=null==e?void 0:e.getBoundingClientRect())?o:null}return t.getBoundingClientRect()}(0,o.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();o.initialLeft=n.left-t.left,o.initialTop=n.top-t.top,o.boundaryWidth=t.width,o.boundaryHeight=t.height,o.elWidth=n.width,o.elHeight=n.height}}e.classList.add("v-draggable--dragging"),o.moveHandler=t=>{var n,r;if(!o.isDragging)return;const{clientX:l,clientY:i}=he(t);let s=l-o.startX,a=i-o.startY;"x"===o.options.axis?a=0:"y"===o.options.axis&&(s=0),o.options.grid&&(s=Math.round(s/o.options.grid[0])*o.options.grid[0],a=Math.round(a/o.options.grid[1])*o.options.grid[1]);let u=o.offsetX+s,c=o.offsetY+a;if(o.options.constrain||o.options.boundary){const e=o.initialLeft+s,t=o.initialTop+a,n=o.boundaryWidth-o.elWidth,r=o.boundaryHeight-o.elHeight,l=Math.max(0,Math.min(e,n)),i=Math.max(0,Math.min(t,r));u=o.offsetX+(l-o.initialLeft),c=o.offsetY+(i-o.initialTop)}e.style.transform=`translate(${u}px, ${c}px)`,null==(r=(n=o.options).onDrag)||r.call(n,{x:u,y:c},t)},o.endHandler=()=>{var t,n;if(!o.isDragging)return;o.isDragging=!1,e.classList.remove("v-draggable--dragging"),o.moveHandler&&(document.removeEventListener("mousemove",o.moveHandler),document.removeEventListener("touchmove",o.moveHandler)),o.endHandler&&(document.removeEventListener("mouseup",o.endHandler),document.removeEventListener("touchend",o.endHandler));const{x:r,y:l}=ge(e.style.transform);null==(n=(t=o.options).onEnd)||n.call(t,{x:r,y:l},new MouseEvent("mouseup"))},document.addEventListener("mousemove",o.moveHandler),document.addEventListener("touchmove",o.moveHandler,{passive:!1}),document.addEventListener("mouseup",o.endHandler),document.addEventListener("touchend",o.endHandler),null==(l=(r=o.options).onStart)||l.call(r,{x:o.offsetX,y:o.offsetY},t)}r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=be(t.value),n.options.handle&&(n.handleEl=e.querySelector(n.options.handle)))},unmounted(e){const t=e.__draggable;t&&(t.moveHandler&&(document.removeEventListener("mousemove",t.moveHandler),document.removeEventListener("touchmove",t.moveHandler)),t.endHandler&&(document.removeEventListener("mouseup",t.endHandler),document.removeEventListener("touchend",t.endHandler)),delete e.__draggable)}}),we=w({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=Ee(t.value);_e(e,n);const o={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{o.expanded?(_e(e,n),o.expanded=!1):(e.textContent=o.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",o.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",o.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&xe(e))&&(e.title=o.originalText),e.__ellipsis=o},updated(e,t){const n=e.__ellipsis;if(!n){const n=Ee(t.value);return void _e(e,n)}const o=Ee(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==o.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),o.expandable){const t=()=>{n.expanded?(_e(e,o),n.expanded=!1):(e.textContent=n.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",n.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",n.clickHandler=t}else e.style.cursor="";n.options=o,n.expanded||_e(e,o),"always"===o.titleBehavior?e.title=n.originalText:"auto"===o.titleBehavior?e.title=xe(e)?n.originalText:"":e.removeAttribute("title")},unmounted(e){const t=e.__ellipsis;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.removeProperty("-webkit-line-clamp"),e.style.removeProperty("-webkit-box-orient"),e.style.removeProperty("display"),e.style.removeProperty("overflow"),e.style.removeProperty("text-overflow"),e.style.removeProperty("white-space"),e.style.removeProperty("cursor"),delete e.__ellipsis)}});function _e(e,t){const n=t.lines||1;1===n?(e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap"):(e.style.display="-webkit-box",e.style.overflow="hidden",e.style.webkitBoxOrient="vertical",e.style.webkitLineClamp=String(n))}function xe(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function Ee(e){var t,n,o,r;return"number"==typeof e?{lines:e,ellipsis:"...",expandable:!1,titleBehavior:"auto"}:{lines:null!=(t=null==e?void 0:e.lines)?t:1,ellipsis:null!=(n=null==e?void 0:e.ellipsis)?n:"...",expandable:null!=(o=null==e?void 0:e.expandable)&&o,titleBehavior:null!=(r=null==e?void 0:e.titleBehavior)?r:"auto"}}const Te=new Set(["input","textarea","select","button"]);const Le=w({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!v())return;const n=ke(t.value);if(!n.focus||!function(e){if(!v())return!1;const t=e.tagName.toLowerCase();if(Te.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},r=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",r),e.__focus={options:n,handleFocus:o,handleBlur:r,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=ke(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const r=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,r=Object.keys(n),l=Object.keys(o);return r.length===l.length&&r.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&r&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function ke(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}const Ce={esc:"escape",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",enter:"enter",tab:"tab",delete:"delete",backspace:"backspace",insert:"insert",home:"home",end:"end",pagedown:"pagedown",pageup:"pageup",f1:"f1",f2:"f2",f3:"f3",f4:"f4",f5:"f5",f6:"f6",f7:"f7",f8:"f8",f9:"f9",f10:"f10",f11:"f11",f12:"f12"},Se=new Set(["ctrl","alt","shift","meta"]);function De(e){const t=e.toLowerCase();return Ce[t]||t}function Ie(e){const t=e.toLowerCase().split(/[+.]/),n=[];let o="";for(const e of t)Se.has(e)?n.push(e):o=De(e);return{key:o,modifiers:n}}function Me(e,t){if(De(e.key)!==t.key)return!1;const n=new Set;if(e.ctrlKey&&n.add("ctrl"),e.altKey&&n.add("alt"),e.shiftKey&&n.add("shift"),e.metaKey&&n.add("meta"),n.size!==t.modifiers.size)return!1;for(const e of t.modifiers)if(!n.has(e))return!1;return!0}function Pe(e,t,n,o={}){var r,l,i;return{key:De(e),modifiers:new Set(t),handler:n,prevent:null==(r=o.prevent)||r,stop:null==(l=o.stop)||l,disabled:null!=(i=o.disabled)&&i}}function Oe(e,t,n){if(t){const o=t.toLowerCase();let r;const l=[];if(Se.has(o)){l.push(o);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)?l.push(t):r=De(e)}}else{const e=Ie(t);r=e.key,l.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)&&l.push(t)}}return[Pe(r,l,"function"==typeof e?e:e.handler)]}if("function"==typeof e)return console.warn('[Directix] v-hotkey: hotkey definition required (use v-hotkey:ctrl.s="handler")'),[];if(Array.isArray(e))return e.map(e=>Pe(e.key,e.modifiers||[],e.handler,{prevent:e.prevent,stop:e.stop,disabled:e.disabled}));if("object"==typeof e&&null!==e){if("handler"in e&&"function"==typeof e.handler){const t=e;return[Pe(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,o]of Object.entries(e)){const{key:e,modifiers:r}=Ie(n),l="function"==typeof o?o:o.handler,i="object"==typeof o?o:{};t.push(Pe(e,r,l,i))}return t}return[]}function ze(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=function(e){return t=>{for(const n of e.entries)if(!n.disabled&&Me(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const He=w({name:"hotkey",ssr:!0,mounted(e,t){ze(e,Oe(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,o=Oe(t.value,t.arg,t.modifiers);n?n.entries=o:ze(e,o)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});const Ye="hover";function $e(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function Ae(e,t,n){var o,r;const{options:l}=t;l.class&&e.classList.add(l.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=l.onEnter)||o.call(l,n),null==(r=l.handler)||r.call(l,!0,n)}function Xe(e,t,n){var o,r;const{options:l}=t;l.class&&e.classList.remove(l.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=l.onLeave)||o.call(l,n),null==(r=l.handler)||r.call(l,!1,n)}const Re=w({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=$e(t.value);if(n.disabled||!v())return;const o=function(){const e=new Set,t=new Set;return{setTimeout(t,n){const o=setTimeout(()=>{e.delete(o),t()},n);return e.add(o),o},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const o=setInterval(e,n);return t.add(o),o},clearInterval(e){clearInterval(e),t.delete(e)},clearAll(){e.forEach(e=>clearTimeout(e)),t.forEach(e=>clearInterval(e)),e.clear(),t.clear()},hasActive:()=>e.size>0||t.size>0}}();let r=!1;const l={options:n,isHovering:!1,timer:o,cleanup:null};l.cleanup=function(e,t,n=!1){return Object.entries(t).forEach(([t,o])=>{e.addEventListener(t,o,"boolean"==typeof n?n:R(n))}),()=>{Object.entries(t).forEach(([t,o])=>{e.removeEventListener(t,o,"boolean"==typeof n?n:R(n))})}}(e,{mouseenter:t=>{const i=t;o.clearAll(),r||(n.enterDelay&&n.enterDelay>0?o.setTimeout(()=>{r=!0,l.isHovering=!0,Ae(e,l,i)},n.enterDelay):(r=!0,l.isHovering=!0,Ae(e,l,i)))},mouseleave:t=>{const i=t;o.clearAll(),r&&(n.leaveDelay&&n.leaveDelay>0?o.setTimeout(()=>{r=!1,l.isHovering=!1,Xe(e,l,i)},n.leaveDelay):(r=!1,l.isHovering=!1,Xe(e,l,i)))}}),M(e,Ye,l)},updated(e,t){const n=P(e,Ye);if(!n)return;const o=$e(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){var t;const n=P(e,Ye);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),O(e,Ye))}}),Ne={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let Ve=9999;function Ue(e,t,n,o){return Math.sqrt(__pow(n-e,2)+__pow(o-t,2))}function Be(e,t,n){return Math.max(t,Math.min(n,e))}function Fe(e,t){var n,o,r,l,i,s,a,u,c,d;const p="IMG"===t.tagName?t.src:void 0,v=t.getAttribute("data-preview")||void 0,f="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:v,alt:f,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:Ne.minScale,maxScale:Ne.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||v,alt:(null==e?void 0:e.alt)||f,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(o=null==e?void 0:e.closeOnClickOutside)||o,closeOnEsc:null==(r=null==e?void 0:e.closeOnEsc)||r,showCloseButton:null==(l=null==e?void 0:e.showCloseButton)||l,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(i=null==e?void 0:e.enablePinchZoom)||i,enableDoubleTap:null==(s=null==e?void 0:e.enableDoubleTap)||s,enableSwipeClose:null==(a=null==e?void 0:e.enableSwipeClose)||a,showZoomIndicator:null==(u=null==e?void 0:e.showZoomIndicator)||u,minScale:null!=(c=null==e?void 0:e.minScale)?c:Ne.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:Ne.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const je=w({name:"image-preview",ssr:!1,mounted(e,t){const n=Fe(t.value,e),o={options:n,overlay:null,imageContainer:null,image:null,isOpen:!1,transform:{scale:1,translateX:0,translateY:0},gesture:{isDragging:!1,startX:0,startY:0,startDistance:0,startScale:1,lastTapTime:0,swipeStartY:0},handlers:{click:()=>{},esc:null,touchStart:null,touchMove:null,touchEnd:null,mouseDown:null,mouseMove:null,mouseUp:null,wheel:null}};if(e.__imagePreview=o,n.disabled)return;e.style.cursor="zoom-in";const r=function(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:o,translateX:r,translateY:l}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${r}px, ${l}px) scale(${o})`;const i=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");i&&(i.textContent=`${Math.round(100*o)}%`,i.style.opacity="1",clearTimeout(i._hideTimer),i._hideTimer=setTimeout(()=>{i.style.opacity="0"},Ne.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=Ne.minScale,maxScale:o=Ne.maxScale}=e.options;return Be(t,n,o)},constrainTranslate:(t,n)=>{const{scale:o}=e.transform;if(!e.image||o<=1)return{x:0,y:0};const r=e.image.getBoundingClientRect(),l=r.width*(o-1)/2,i=r.height*(o-1)/2;return{x:Be(t,-l,l),y:Be(n,-i,i)}}}}(o),l=()=>{o.isOpen&&o.overlay&&(o.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!o.overlay)return;o.overlay.remove(),o.overlay=null,o.imageContainer=null,o.image=null,o.isOpen=!1,o.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=o;n.esc&&document.removeEventListener("keydown",n.esc),n.touchStart&&document.removeEventListener("touchstart",n.touchStart),n.touchMove&&document.removeEventListener("touchmove",n.touchMove),n.touchEnd&&document.removeEventListener("touchend",n.touchEnd),n.mouseDown&&document.removeEventListener("mousedown",n.mouseDown),n.mouseMove&&document.removeEventListener("mousemove",n.mouseMove),n.mouseUp&&document.removeEventListener("mouseup",n.mouseUp),n.wheel&&document.removeEventListener("wheel",n.wheel),null==(t=(e=o.options).onClose)||t.call(e)},Ne.animationDuration))},i=function(e,t,n){const{updateTransform:o,resetTransform:r,constrainScale:l,constrainTranslate:i}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:r,transform:i,options:s}=e;if(1===t.touches.length){if(!1!==s.enableDoubleTap&&n-r.lastTapTime<Ne.tapTimeout)return t.preventDefault(),i.scale=i.scale>1?1:l(Ne.doubleTapZoom),r.lastTapTime=0,void o(!0);r.lastTapTime=n,r.isDragging=!0,r.startX=t.touches[0].clientX-i.translateX,r.startY=t.touches[0].clientY-i.translateY,r.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==s.enablePinchZoom&&(r.isDragging=!1,r.startDistance=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),r.startScale=i.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:r,options:s}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,l=t.touches[0].clientY-n.startY,s=i(e,l);r.translateX=s.x,r.translateY=s.y,o(!1)}else if(2===t.touches.length&&!1!==s.enablePinchZoom){const e=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);r.scale=l(n.startScale*(e/n.startDistance)),o(!1)}},handleTouchEnd:t=>{const{gesture:o,transform:l,options:i}=e;o.isDragging=!1,!1!==i.enableSwipeClose&&1===t.changedTouches.length&&l.scale<=1&&t.changedTouches[0].clientY-o.swipeStartY<-100?n():l.scale<1&&r()},handleMouseDown:t=>{e.imageContainer&&(e.gesture.isDragging=!0,e.gesture.startX=t.clientX-e.transform.translateX,e.gesture.startY=t.clientY-e.transform.translateY,e.imageContainer.style.cursor="grabbing")},handleMouseMove:t=>{if(!e.gesture.isDragging||!e.imageContainer)return;const n=t.clientX-e.gesture.startX,r=t.clientY-e.gesture.startY,l=i(n,r);e.transform.translateX=l.x,e.transform.translateY=l.y,o(!1)},handleMouseUp:()=>{e.gesture.isDragging=!1,e.imageContainer&&(e.imageContainer.style.cursor="grab")},handleWheel:t=>{if(!e.imageContainer||!1===e.options.enablePinchZoom)return;t.preventDefault();const n=t.deltaY>0?.9:1.1;e.transform.scale=l(e.transform.scale*n),o(!1),e.transform.scale<.8&&setTimeout(r,100)}}}(o,r,l),s=()=>{var e,t,n;if(o.isOpen||o.options.disabled)return;const{overlay:s,imageContainer:a,image:u}=function(e){var t;const n=null!=(t=e.zIndex)?t:++Ve,o=document.createElement("div");o.className="v-image-preview-overlay",e.class&&o.classList.add(e.class),Object.assign(o.style,{position:"fixed",inset:"0",background:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:String(n),cursor:"zoom-out",opacity:"0",transition:"opacity 0.3s",touchAction:"none",overflow:"hidden"});const r=document.createElement("div");Object.assign(r.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const l=document.createElement("img");if(l.src=e.previewSrc||e.src||"",l.alt=e.alt||"",Object.assign(l.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),l.addEventListener("dragstart",e=>e.preventDefault()),r.appendChild(l),!1!==e.showCloseButton){const e=document.createElement("button");e.className="v-image-preview-close",e.innerHTML="×",e.setAttribute("aria-label","Close preview"),Object.assign(e.style,{position:"fixed",top:"16px",right:"16px",width:"44px",height:"44px",border:"none",background:"rgba(255, 255, 255, 0.15)",color:"white",fontSize:"28px",cursor:"pointer",borderRadius:"50%",transition:"background 0.2s, transform 0.2s",zIndex:String(n+1),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"});const t=(t,n)=>{e.style.background=t,e.style.transform=n};e.addEventListener("mouseenter",()=>t("rgba(255, 255, 255, 0.25)","scale(1.1)")),e.addEventListener("mouseleave",()=>t("rgba(255, 255, 255, 0.15)","scale(1)")),e.addEventListener("touchstart",()=>t("rgba(255, 255, 255, 0.35)","scale(1.15)"),{passive:!0}),e.addEventListener("touchend",()=>t("rgba(255, 255, 255, 0.15)","scale(1)"),{passive:!0}),o.appendChild(e)}if(!1!==e.showZoomIndicator){const e=document.createElement("div");e.className="v-image-preview-zoom",e.textContent="100%",Object.assign(e.style,{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.6)",color:"white",padding:"8px 16px",borderRadius:"20px",fontSize:"14px",fontWeight:"500",opacity:"0",transition:"opacity 0.3s",zIndex:String(n+1),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"}),o.appendChild(e)}const i=document.createElement("div");return i.className="v-image-preview-hint",i.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(i.style,{position:"fixed",bottom:"60px",left:"50%",transform:"translateX(-50%)",color:"rgba(255, 255, 255, 0.6)",fontSize:"12px",opacity:"1",transition:"opacity 0.5s",zIndex:String(n+1),pointerEvents:"none"}),o.appendChild(i),setTimeout(()=>i.style.opacity="0",Ne.hintDuration),o.appendChild(r),{overlay:o,imageContainer:r,image:l}}(o.options);o.overlay=s,o.imageContainer=a,o.image=u,o.isOpen=!0,document.body.appendChild(s),document.body.style.overflow="hidden",requestAnimationFrame(()=>s.style.opacity="1"),o.handlers.touchStart=i.handleTouchStart,o.handlers.touchMove=i.handleTouchMove,o.handlers.touchEnd=i.handleTouchEnd,o.handlers.mouseDown=i.handleMouseDown,o.handlers.mouseMove=i.handleMouseMove,o.handlers.mouseUp=i.handleMouseUp,o.handlers.wheel=i.handleWheel,s.addEventListener("touchstart",i.handleTouchStart,{passive:!1}),s.addEventListener("touchmove",i.handleTouchMove,{passive:!1}),s.addEventListener("touchend",i.handleTouchEnd,{passive:!0}),u.addEventListener("mousedown",i.handleMouseDown),document.addEventListener("mousemove",i.handleMouseMove),document.addEventListener("mouseup",i.handleMouseUp),s.addEventListener("wheel",i.handleWheel,{passive:!1}),null==(e=s.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),l()}),!1!==o.options.closeOnClickOutside&&s.addEventListener("click",()=>{o.transform.scale<=1?l():r.resetTransform()}),!1!==o.options.closeOnEsc&&(o.handlers.esc=e=>{"Escape"===e.key&&(o.transform.scale>1?r.resetTransform():l())},document.addEventListener("keydown",o.handlers.esc)),null==(n=(t=o.options).onOpen)||n.call(t)};o.handlers.click=s,e.addEventListener("click",s)},updated(e,t){const n=e.__imagePreview;n&&(n.options=Fe(t.value,e),e.style.cursor=n.options.disabled?"":"zoom-in")},unmounted(e){const t=e.__imagePreview;t&&(e.removeEventListener("click",t.handlers.click),t.isOpen&&t.overlay&&(t.overlay.remove(),document.body.style.overflow=""),t.handlers.esc&&document.removeEventListener("keydown",t.handlers.esc),t.handlers.touchStart&&document.removeEventListener("touchstart",t.handlers.touchStart),t.handlers.touchMove&&document.removeEventListener("touchmove",t.handlers.touchMove),t.handlers.touchEnd&&document.removeEventListener("touchend",t.handlers.touchEnd),t.handlers.mouseDown&&document.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp),t.handlers.wheel&&document.removeEventListener("wheel",t.handlers.wheel),delete e.__imagePreview)}});function We(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const qe=w({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=We(t.value);if(n.disabled||!v())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else o=H(e);const r={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(r.isLoading||r.options.disabled||r.options.loading)return;if(r.throttleTimer)return;r.throttleTimer=setTimeout(()=>{r.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,r=o.scrollTop,l=o.scrollHeight,i=o.clientHeight;return r+i>=l-n}(o,0,n.distance||0);t&&(yield Ze(r,e))})};e.__infiniteScroll=r,n.useIntersection&&h()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield Ze(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,r):Y(o,"scroll",r.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=We(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),$(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function Ze(e,t){return __async(this,null,function*(){var n,o,r,l,i,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(l=(r=e.options).onError)||l.call(r,t)}finally{e.isLoading=!1,null==(s=(i=e.options).onLoadEnd)||s.call(i),t.classList.remove("v-infinite-scroll--loading")}})}const Ke="__intersect";function Ge(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function Je(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var r,l,i,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(r=n.handler)||r.call(n,a,t.observer),null==(l=n.onChange)||l.call(n,o,a),o?(null==(i=n.onEnter)||i.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const Qe=w({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=Ge(t.value);if(n.disabled||!v()||!h())return void(h()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=Je(e,o,n),e[Ke]=o,o.observer.observe(e)},updated(e,t){var n,o,r;const l=e[Ke];if(!l)return;const i=Ge(t.value),s=i.root!==l.options.root||i.rootMargin!==l.options.rootMargin||i.threshold!==l.options.threshold;i.disabled!==l.options.disabled&&(i.disabled?null==(n=l.observer)||n.disconnect():null==(o=l.observer)||o.observe(e)),s&&(null==(r=l.observer)||r.disconnect(),l.observer=Je(e,l,i),l.observer.observe(e)),l.options=i},unmounted(e){var t;const n=e[Ke];n&&(null==(t=n.observer)||t.disconnect(),delete e[Ke])}});let et=null;function tt(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function nt(e,t){e.dataset.lazyState=t}function ot(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;nt(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;tt(e,t.options.src),nt(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>ot(e),1e3*t.attempt):(t.options.error&&tt(e,t.options.error),nt(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function rt(e){const t=e.__lazy;var n;if(t)if(h())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,et||(et=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(ot(e.target),null==et||et.unobserve(e.target))})},{rootMargin:`${n}px`}),et));t.observer=o,o.observe(e)}else ot(e)}function lt(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):et&&et.unobserve(e))}function it(e){return"string"==typeof e?{src:e}:e||{}}const st=w({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=it(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");nt(e,"pending"),n.placeholder&&tt(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,rt(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=it(t.value);o.disabled?lt(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(nt(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&tt(e,o.placeholder),rt(e)))},unmounted(e){lt(e),delete e.__lazy}});function at(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const ut=w({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!v())return;const n=at(t.value);if(n.disabled)return;const o=getComputedStyle(e),r={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=r,"static"===o.position&&(e.style.position="relative"),n.value&&ct(e,r)},updated(e,t){const n=e.__loading;if(!n)return;const o=at(t.value);if(o.disabled)dt(e,n);else{if(o.value&&!n.options.value?ct(e,n):!o.value&&n.options.value&&dt(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(dt(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function ct(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function dt(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function pt(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const vt=w({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=pt(t.value);if(n.disabled||!v())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const r=e;n.prevent&&r.preventDefault(),n.stop&&r.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const l=X(r);if(o.startPos={x:l.x,y:l.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,r),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(r)},n.duration)},o.endHandler=e=>{var t;const r=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,r)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const r=e,l=X(r);var i,s;(i=o.startPos,s={x:l.x,y:l.y},Math.sqrt(__pow(s.x-i.x,2)+__pow(s.y-i.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,r),o.startTime=0)},e.__longPress=o,Y(e,"mousedown",o.startHandler),Y(e,"mouseup",o.endHandler),Y(e,"mouseleave",o.endHandler),Y(e,"mousemove",o.moveHandler),Y(e,"touchstart",o.startHandler,{passive:!n.prevent}),Y(e,"touchend",o.endHandler),Y(e,"touchcancel",o.endHandler),Y(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(pt(t.value).disabled||(e.__longPress=null))}n.options=pt(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),$(e,"mousedown",t.startHandler),$(e,"mouseup",t.endHandler),$(e,"mouseleave",t.endHandler),$(e,"mousemove",t.moveHandler),$(e,"touchstart",t.startHandler),$(e,"touchend",t.endHandler),$(e,"touchcancel",t.endHandler),$(e,"touchmove",t.moveHandler),delete e.__longPress)}});function ft(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function mt(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const ht=w({name:"lowercase",ssr:!0,mounted(e,t){const n=mt(t.value);if(T(e)){const t=x(e,n,e=>ft(e,n));e.__lowercaseCleanup=t}else E(e,e=>ft(e,n))},updated(e,t){const n=mt(t.value);T(e)?n.onInput&&(e.value=ft(e.value,n)):E(e,e=>ft(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),gt="__mask",bt={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function yt(e,t){return[...e].map(e=>{const n=bt[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function wt(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function _t(e,t,n,o){let r="",l=0;for(const i of t){if(l>=e.length){r+=i.isLiteral?i.placeholder:o?n:"";continue}const t=e[l];i.isLiteral?(t===i.placeholder&&l++,r+=i.placeholder):i.pattern.test(t)?(r+=t,l++):t===n?(r+=o?n:"",l++):l++}return r}function xt(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function Et(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const Tt=w({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=wt(t.value);if(o.disabled||!v())return;const r=o.placeholder||"_",l=yt(o.mask,r),i=e=>{var t,n,i;const s=e.target,a=s.value,u=s.selectionStart||0,c=_t(a,l,r,null==(t=o.showPlaceholder)||t);if(c!==a)return s.value=c,s.setSelectionRange(Et(l,u),Et(l,u)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,c,function(e,t,n){let o="";for(let r=0;r<e.length&&r<t.length;r++)t[r].isLiteral||e[r]===n||(o+=e[r]);return o}(c,l,r)),xt(c,l,r)&&(null==(i=o.onComplete)||i.call(o,c))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=_t("",l,r,!0))},a=()=>{o.showMaskOnBlur||xt(e.value,l,r)||!o.clearIncomplete||(e.value="")};Y(e,"input",i),Y(e,"focus",s),Y(e,"blur",a),e[gt]={options:o,tokens:l,placeholder:r,inputHandler:i,focusHandler:s,blurHandler:a},e.value&&(e.value=_t(e.value,l,r,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[gt];n&&(n.options=wt(t.value),n.tokens=yt(n.options.mask,n.placeholder))},unmounted(e){const t=e[gt];t&&($(e,"input",t.inputHandler),$(e,"focus",t.focusHandler),$(e,"blur",t.blurHandler),delete e[gt])}});function Lt(e,t){const{precision:n=0,separator:o=",",decimal:r=".",prefix:l="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),l+c+i}function kt(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),o=Number.parseFloat(n);return isNaN(o)?null:o}function Ct(e,t){var n;let o=e;return!(null==(n=t.allowNegative)||n)&&o<0&&(o=Math.abs(o)),void 0!==t.min&&(o=Math.max(t.min,o)),void 0!==t.max&&(o=Math.min(t.max,o)),o}function St(e,t,n){const{decimal:o=".",prefix:r=""}=t;let l=!1;const i=()=>{if(l)return;const i=e.value,s=e.selectionStart||0;if(!i||"-"===i)return;const a=kt(i,o);if(null===a)return l=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(l=!1);const u=Ct(a,t),c=n(u,t);if(c!==i){l=!0;const t=function(e,t,n,o=0){let r=0,l=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&r++;for(let e=o;e<t.length;e++)if(/\d/.test(t[e])&&l++,l>=r)return e+1;return t.length}(i,c,s,r.length);e.value=c,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}},s=()=>{if(!e.value||"-"===e.value)return;const r=kt(e.value,o);if(null!==r){const o=Ct(r,t),i=n(o,t);l=!0,e.value=i,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}};if(e.addEventListener("input",i),e.addEventListener("blur",s),e.value){const r=kt(e.value,o);if(null!==r){const o=n(Ct(r,t),t);l=!0,e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})),l=!1}}return()=>{e.removeEventListener("input",i),e.removeEventListener("blur",s)}}function Dt(e,t){const{precision:n=2,separator:o=",",decimal:r=".",symbol:l="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),"before"===i?l+c:c+l}const It=w({name:"money",ssr:!0,mounted(e,t){var n,o,r;const l="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(l.precision=null!=(o=l.precision)?o:2,"INPUT"===e.tagName||"TEXTAREA"===e.tagName){const{symbol:t="$",symbolPosition:n="before"}=l,o="before"===n?t:"",r=St(e,__spreadProps(__spreadValues({},l),{prefix:o}),Dt);e.__money={options:l,cleanup:r},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,l.decimal||".");if(null!==e){const n=Dt(Ct(e,l),l);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(r=e.textContent)?void 0:r.trim();t&&(n=kt(t,l.decimal||"."))}null!==n&&(e.textContent=Dt(Ct(n,l),l))}},updated(e,t){var n,o;const r="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};r.precision=null!=(o=r.precision)?o:2;const l=e.__money;if(l)l.options=r;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Dt(Ct(n,r),r))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function Mt(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const Pt=w({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=Mt(t.value);if(n.disabled||!v())return;if(!y())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=Mt(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),Ot=w({name:"number",ssr:!0,mounted(e,t){var n,o;const r="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if("INPUT"===e.tagName||"TEXTAREA"===e.tagName){const t=St(e,r,Lt);e.__number={options:r,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,r.decimal||".");if(null!==e){const n=Lt(Ct(e,r),r);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if("number"==typeof t.value)n=t.value;else if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(o=e.textContent)?void 0:o.trim();t&&(n=kt(t,r.decimal||"."))}null!==n&&(e.textContent=Lt(Ct(n,r),r))}},updated(e,t){var n;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},r=e.__number;if(r)r.options=o;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;"number"==typeof t.value?n=t.value:t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Lt(Ct(n,o),o))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}}),zt="__permission";function Ht(e,t){var n,o;const r=function(e){return e[zt]||(e[zt]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[zt]}(e);r.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const l=(i=r.options).check?i.check(i.value,i.mode||"some"):(console.warn("[Directix] v-permission: No permission config provided"),!0);var i;null==(o=(n=r.options).onChange)||o.call(n,l);const s=r.options.action||"remove";l?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,s,r):function(e,t,n){var o,r;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(r=e.parentNode)||r.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,s,r)}const Yt=w({name:"permission",ssr:!0,mounted(e,t){Ht(e,t)},updated(e,t){Ht(e,t)},unmounted(e){!function(e){const t=e[zt];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[zt]}(e)}}),$t=w({name:"print",ssr:!0,mounted(e,t){const n=At(t.value),o={options:n,clickHandler:null};if(e.__print=o,n.immediate)return void setTimeout(()=>Xt(e,n),100);const r=()=>{Xt(e,o.options)};e.addEventListener("click",r),o.clickHandler=r,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const o=At(t.value);n.options=o},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function At(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function Xt(e,t){return __async(this,null,function*(){if(t.onBeforePrint){if(!1===t.onBeforePrint())return}const n=t.target?document.querySelector(t.target):e;n?(t.newWindow?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] v-print: Could not open print window");const o=Rt(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Nt(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(n,t):yield function(e,t){return __async(this,null,function*(){var n,o,r;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const i=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(l);const s=Rt(e,t);i.open(),i.write(s),i.close(),yield Nt(i);try{null==(o=l.contentWindow)||o.focus(),null==(r=l.contentWindow)||r.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function Rt(e,t){let n="";if(document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls&&t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles){const e=Array.isArray(t.styles)?t.styles.join("\n"):t.styles;n+=`<style>${e}</style>`}n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||document.title||"Print",r=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${r}\n</body>\n</html>`}function Nt(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}const Vt={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function Ut(e){var t,n,o,r,l;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:60,maxDistance:null!=(n=e.maxDistance)?n:100,disabled:null!=(o=e.disabled)&&o,indicator:e.indicator,successDuration:null!=(r=e.successDuration)?r:500,errorDuration:null!=(l=e.errorDuration)?l:1e3,onStateChange:e.onStateChange}}function Bt(e,t,n){var o;const r=null==(o=n.indicator)?void 0:o[t];e.textContent=r||Vt[t]}function Ft(e,t){var n,o;e.state!==t&&(e.state=t,Bt(e.indicatorEl,t,e.options),null==(o=(n=e.options).onStateChange)||o.call(n,t))}function jt(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function Wt(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",Ft(e,"idle")}function qt(e){return new Promise(t=>setTimeout(t,e))}function Zt(e){const{contentEl:t,options:n}=e;return{touchStart:o=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=o.touches[0].clientY,e.currentY=e.startY,Ft(e,"idle"))},touchMove:o=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=o.touches[0].clientY;const r=e.currentY-e.startY;if(r<=0)return void(t.style.transform&&(t.style.transition="",Wt(e)));o.preventDefault();const l=Math.min(.5*r,n.maxDistance),i=l/n.distance;t.style.transition="none",jt(e,l),Ft(e,i>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const o=e.currentY-e.startY,r=Math.min(.5*o,n.maxDistance);t.style.transition="","ready"===e.state&&r>=n.distance?function(e){__async(this,null,function*(){Ft(e,"loading");const t=e.options.distance;jt(e,t);try{yield e.options.handler(),Ft(e,"success"),yield qt(e.options.successDuration)}catch(t){Ft(e,"error"),yield qt(e.options.errorDuration)}finally{Wt(e)}})}(e):Wt(e)}}}function Kt(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function Gt(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const Jt=w({name:"pull-refresh",ssr:!1,mounted(e,t){const n=Ut(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const o=document.createElement("div");for(o.className="v-pull-refresh__content",o.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o);const r=function(){const e=document.createElement("div");return e.className="v-pull-refresh__indicator",e.style.cssText="\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\theight: 60px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tbackground: #f5f5f5;\n\t\tfont-size: 14px;\n\t\tcolor: #666;\n\t\tz-index: 10;\n\t\tpointer-events: none;\n\t\topacity: 0;\n\t\ttransition: opacity 0.2s ease;\n\t",e}();e.insertBefore(r,o);const l={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:r,contentEl:o,handlers:null};l.handlers=Zt(l),e.__pullRefresh=l,n.disabled||Kt(e,l.handlers),Bt(r,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const o=n.options.disabled;n.options=Ut(t.value),Bt(n.indicatorEl,n.state,n.options),n.options.disabled&&!o?Gt(e,n.handlers):!n.options.disabled&&o&&Kt(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(Gt(e,t.handlers),delete e.__pullRefresh)}});function Qt(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const en=w({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=Qt(t.value);if(n.disabled||!v())return;"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,g())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:r}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),r={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(r),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(r))});o.fallbackIframe=t,e.__resizeCleanup=r}},updated(e,t){const n=e.__resize;n&&(n.options=Qt(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function tn(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const nn=w({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=tn(t.value);if(n.disabled||!v())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple");const r={options:n,clickHandler:t=>{if(r.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),r=e.clientX-o.left,l=e.clientY-o.top,i=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${i}px;\n height: ${i}px;\n left: ${r-i/2}px;\n top: ${l-i/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,r.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,r=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${r})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${r})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,r.options))}};e.__ripple=r,Y(e,"click",r.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=tn(t.value))},unmounted(e){const t=e.__ripple;t&&($(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}}),on=["b","i","u","strong","em","br","p","span","div"],rn=["title","alt","href","src"],ln=["script","iframe","object","embed","form","input","style","link","meta","base"],sn=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function an(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:on,allowedAttributes:rn}:__spreadValues({allowedTags:on,allowedAttributes:rn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function un(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of ln){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const r=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of sn)e.removeAttribute(t);const l=e.getAttribute("href");if(l&&l.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),r="class"===o.name&&t.allowClass,l="id"===o.name&&t.allowId,i="style"===o.name&&t.allowStyles;n||r||l||i||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))r(t)};for(const e of Array.from(o.children))r(e);return o.innerHTML}const cn=w({name:"sanitize",ssr:!0,defaults:{allowedTags:on,allowedAttributes:rn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!v())return;const n=an(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=un(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=an(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=un(o,n.options))},unmounted(e){delete e.__sanitize}});function dn(e,t,n){let o=0,r=0,l=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,r=t.scrollTop,l=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:r,scrollLeftMax:l,scrollTopMax:i,progressX:l>0?o/l:0,progressY:i>0?r/i:0,directionX:o!==t?o>t?1:-1:0,directionY:r!==n?r>n?1:-1:0,container:e}}function pn(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const vn=w({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=pn(t.value);if(n.disabled||!v())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e),l=/(auto|scroll)/.test(t+n+r);o=l?e:H(e)}const r={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)r.pendingEvent=e,r.throttleTimer||(r.throttleTimer=setTimeout(()=>{if(r.pendingEvent){const e=dn(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=e.scrollLeft,r.lastScrollTop=e.scrollTop,n.handler(r.pendingEvent,e)}r.throttleTimer=null,r.pendingEvent=null},n.throttle));else{const t=dn(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=t.scrollLeft,r.lastScrollTop=t.scrollTop,n.handler(e,t)}}},l=dn(o,0,0);r.lastScrollLeft=l.scrollLeft,r.lastScrollTop=l.scrollTop,e.__scroll=r,Y(o,"scroll",r.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=pn(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),$(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),fn="__sticky";function mn(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function hn(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function gn(e,t){if(t.options.disabled)return void bn(e,t);const n=parseFloat(hn(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),r=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;r&&!t.isSticky?function(e,t,n,o){var r,l,i;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(r=e.parentNode)||r.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=hn(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(i=(l=t.options).onChange)||i.call(l,!0)}(e,t,n,o.top):!r&&t.isSticky&&bn(e,t)}function bn(e,t){var n,o,r,l;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(l=(r=t.options).onChange)||l.call(r,!1))}const yn=w({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=mn(t.value);if(n.disabled||!v())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||H(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return H(e)}(e,n.container),r={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>gn(e,r),resizeHandler:()=>gn(e,r)};e.classList.add("v-sticky"),e[fn]=r,Y(o,"scroll",r.scrollHandler,{passive:!0}),Y(window,"resize",r.resizeHandler,{passive:!0}),gn(e,r)},updated(e,t){const n=e[fn];n&&(n.options=mn(t.value),gn(e,n))},unmounted(e){var t,n;const o=e[fn];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),$(o.container,"scroll",o.scrollHandler),$(window,"resize",o.resizeHandler),delete e[fn])}}),wn=["left","right","up","down"];function _n(e){var t,n,o,r,l,i;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:30,maxTime:null!=(n=e.maxTime)?n:500,directions:null!=(o=e.directions)?o:[...wn],preventScrollOnSwipe:null==(r=e.preventScrollOnSwipe)||r,disabled:null!=(l=e.disabled)&&l,mouse:null==(i=e.mouse)||i,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function xn(e,t,n,o,r,l){var i,s,a,u,c;const{options:d}=e;if(o>(null!=(i=d.maxTime)?i:500))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(s=d.threshold)?s:30))return;const p=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(t,n,null!=(a=d.directions)?a:wn);if(!p)return;d.preventScrollOnSwipe&&r.cancelable&&r.preventDefault(),null==(u=d.handler)||u.call(d,p,r);const v={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(c=v[p])||c.call(v),l.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:o}}))}function En(e,t){if(t.disabled)return null;e.style.touchAction="none",e.style.userSelect="none";const n={options:t,startX:0,startY:0,startTime:0,isActive:!1,handlers:null},o=function(e,t){return(n,o,r)=>{const l=n-t.startX,i=o-t.startY,s=Date.now()-t.startTime;xn(t,l,i,s,r,e)}}(e,n);return n.handlers={touchStart:e=>{n.options.disabled||(n.startX=e.touches[0].clientX,n.startY=e.touches[0].clientY,n.startTime=Date.now(),n.isActive=!0)},touchMove:e=>{n.isActive&&!n.options.disabled&&n.options.preventScrollOnSwipe&&e.preventDefault()},touchEnd:e=>{if(!n.isActive||n.options.disabled)return;n.isActive=!1;const t=e.changedTouches[0];o(t.clientX,t.clientY,e)},mouseDown:e=>{n.options.disabled||(n.startX=e.clientX,n.startY=e.clientY,n.startTime=Date.now(),n.isActive=!0)},mouseUp:e=>{n.isActive&&!n.options.disabled&&(n.isActive=!1,o(e.clientX,e.clientY,e))}},n}function Tn(e,t){var n;const{handlers:o}=t,r=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",o.touchStart,{passive:!0}),e.addEventListener("touchmove",o.touchMove,{passive:!1}),e.addEventListener("touchend",o.touchEnd),e.addEventListener("touchcancel",o.touchEnd),r&&(e.addEventListener("mousedown",o.mouseDown),e.addEventListener("mouseup",o.mouseUp),e.addEventListener("mouseleave",o.mouseUp))}function Ln(e,t){var n;const{handlers:o}=t,r=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",o.touchStart),e.removeEventListener("touchmove",o.touchMove),e.removeEventListener("touchend",o.touchEnd),e.removeEventListener("touchcancel",o.touchEnd),r&&(e.removeEventListener("mousedown",o.mouseDown),e.removeEventListener("mouseup",o.mouseUp),e.removeEventListener("mouseleave",o.mouseUp))}const kn=w({name:"swipe",ssr:!1,mounted(e,t){const n=En(e,_n(t.value));n&&(e.__swipe=n,Tn(e,n))},updated(e,t){var n,o;const r=e.__swipe,l=_n(t.value);if(!r){const t=En(e,l);return void(t&&(e.__swipe=t,Tn(e,t)))}const i=r.options.disabled,s=null==(n=r.options.mouse)||n,a=null==(o=l.mouse)||o;r.options=l,l.disabled&&!i?Ln(e,r):!l.disabled&&i?Tn(e,r):s!==a&&(s&&(e.removeEventListener("mousedown",r.handlers.mouseDown),e.removeEventListener("mouseup",r.handlers.mouseUp),e.removeEventListener("mouseleave",r.handlers.mouseUp)),a&&(e.addEventListener("mousedown",r.handlers.mouseDown),e.addEventListener("mouseup",r.handlers.mouseUp),e.addEventListener("mouseleave",r.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(Ln(e,t),delete e.__swipe)}});function Cn(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const Sn=w({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=Cn(t.value,t),o=V(t.modifiers)||U(e),r=Z(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__throttle={throttledFn:r,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=Cn(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=Z(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),Dn="8px 12px",In="#333",Mn="#fff",Pn="6px",On="14px",zn="1.5",Hn="96px",Yn="320px",$n="0 4px 12px rgba(0, 0, 0, 0.15)";let An=null;function Xn(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,o;const r=function(e){const t=document.createElement("div");t.className=`v-tooltip v-tooltip--${e.placement||"top"}`,e.class&&t.classList.add(e.class);const n=e.maxWidth?"number"==typeof e.maxWidth?`${e.maxWidth}px`:e.maxWidth:Yn;if(t.style.cssText=["position: absolute",`padding: ${Dn}`,`background: ${In}`,`color: ${Mn}`,`border-radius: ${Pn}`,`font-size: ${On}`,`line-height: ${zn}`,`min-width: ${Hn}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${$n}`,"pointer-events: none","opacity: 0","transition: opacity 0.2s ease",`z-index: ${e.zIndex||9999}`].join(";"),!1!==e.arrow){const e=document.createElement("div");e.className="v-tooltip__arrow",e.style.cssText="position: absolute; width: 8px; height: 8px; background: #333; transform: rotate(45deg);",t.appendChild(e)}const o=document.createElement("div");return o.className="v-tooltip__content",o.textContent=e.content,t.appendChild(o),t}(t.options);t.tooltip=r,(An||"undefined"==typeof document||(An=document.createElement("div"),An.id="directix-tooltip-container",An.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(An)),An).appendChild(r),requestAnimationFrame(()=>{!function(e,t,n,o){const r=t.getBoundingClientRect(),l=e.getBoundingClientRect();let i=0,s=0;switch(n){case"top":i=r.top-l.height-o,s=r.left+(r.width-l.width)/2;break;case"bottom":i=r.bottom+o,s=r.left+(r.width-l.width)/2;break;case"left":i=r.top+(r.height-l.height)/2,s=r.left-l.width-o;break;case"right":i=r.top+(r.height-l.height)/2,s=r.right+o}const a=window.innerWidth,u=window.innerHeight;s<0&&(s=8),s+l.width>a&&(s=a-l.width-8),i<0&&(i=8),i+l.height>u&&(i=u-l.height-8),e.style.top=`${i}px`,e.style.left=`${s}px`;const c=e.querySelector(".v-tooltip__arrow");if(c){const e=4;switch(n){case"top":Object.assign(c.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(c.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(c.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(c.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}(r,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{r.style.opacity="1"})}),t.isVisible=!0,null==(o=(n=t.options).onShow)||o.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function Rn(e){if(!e.isVisible)return;e.showTimeout&&(clearTimeout(e.showTimeout),e.showTimeout=null);const t=()=>{var t,n;e.tooltip&&(e.tooltip.style.opacity="0",setTimeout(()=>{var t;null==(t=e.tooltip)||t.remove(),e.tooltip=null},200)),e.isVisible=!1,null==(n=(t=e.options).onHide)||n.call(t)};e.options.hideDelay&&e.options.hideDelay>0?e.hideTimeout=setTimeout(t,e.options.hideDelay):t()}function Nn(e,t){const{trigger:n="hover"}=t.options,o=()=>Xn(e,t),r=()=>Rn(t),l=()=>t.isVisible?r():o();switch(t.handlers={show:o,hide:r,toggle:l},n){case"hover":e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",r);break;case"click":e.addEventListener("click",l),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&r()});break;case"focus":e.addEventListener("focus",o),e.addEventListener("blur",r)}}function Vn(e){var t,n,o,r,l,i,s,a;return"string"==typeof e?{content:e,placement:"top",trigger:"hover"}:e?{content:e.content,placement:null!=(t=e.placement)?t:"top",trigger:null!=(n=e.trigger)?n:"hover",delay:null!=(o=e.delay)?o:0,hideDelay:null!=(r=e.hideDelay)?r:0,offset:null!=(l=e.offset)?l:8,class:e.class,arrow:null==(i=e.arrow)||i,disabled:null!=(s=e.disabled)&&s,maxWidth:e.maxWidth,zIndex:null!=(a=e.zIndex)?a:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function Un(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const Bn=w({name:"tooltip",ssr:!1,mounted(e,t){const n=Vn(t.value);if(n.disabled||!n.content)return;const o=Un(n);e.__tooltip=o,Nn(e,o),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,o=Vn(t.value);if(n){if("manual"===o.trigger){const t=n.options.disabled;return n.options=o,void(o.disabled&&!t?Rn(n):!o.disabled&&t&&Xn(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=o.content)}n.options=o}else if(!o.disabled&&o.content){const t=Un(o);e.__tooltip=t,Nn(e,t),"manual"===o.trigger&&Xn(e,t)}},unmounted(e){var t;const n=e.__tooltip;n&&(n.showTimeout&&clearTimeout(n.showTimeout),n.hideTimeout&&clearTimeout(n.hideTimeout),null==(t=n.tooltip)||t.remove(),function(e,t){const{show:n,hide:o,toggle:r,docHide:l}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),o&&(e.removeEventListener("mouseleave",o),e.removeEventListener("blur",o)),r&&e.removeEventListener("click",r),l&&document.removeEventListener("click",l)}(e,n),delete e.__tooltip)}}),Fn=(e,t,n,o)=>Math.sqrt(__pow(n-e,2)+__pow(o-t,2)),jn=(e,t,n,o)=>180*Math.atan2(o-t,n-e)/Math.PI,Wn=w({name:"touch",ssr:!1,mounted(e,t){const n=qn(t.value),o={options:n,startX:0,startY:0,startTime:0,startDistance:0,startAngle:0,lastScale:1,lastAngle:0,longPressTimer:null,isLongPress:!1,isMouseDown:!1,lastTouchEndTime:0,handlers:{touchStart:()=>{},touchMove:()=>{},touchEnd:()=>{}}};e.__touch=o;const r=()=>{o.longPressTimer&&(clearTimeout(o.longPressTimer),o.longPressTimer=null)},l=e=>{r(),o.options.enableLongPress&&o.options.onLongPress&&(o.longPressTimer=setTimeout(()=>{o.isLongPress=!0,o.options.onLongPress(e)},o.options.longPressTimeout||500))},i=(e,t)=>{const n=o.options.tapThreshold||10;return Math.abs(e-o.startX)>n||Math.abs(t-o.startY)>n},s=(e,t,n)=>{var r,l,i,s,a,u,c,d,p,v,f,m;if(o.isLongPress)return;const h=Date.now()-o.startTime,g=e-o.startX,b=t-o.startY,y=Math.sqrt(__pow(g,2)+__pow(b,2));if(o.options.enableSwipe&&y>=(o.options.swipeThreshold||30)&&h<=(o.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(b)?g>0?"right":"left":b>0?"down":"up";null==(l=(r=o.options).onSwipe)||l.call(r,e,n),"left"===e?null==(s=(i=o.options).onSwipeLeft)||s.call(i,n):"right"===e?null==(u=(a=o.options).onSwipeRight)||u.call(a,n):"up"===e?null==(d=(c=o.options).onSwipeUp)||d.call(c,n):null==(v=(p=o.options).onSwipeDown)||v.call(p,n)}else o.options.enableTap&&y<(o.options.tapThreshold||10)&&h<(o.options.tapTimeout||250)&&(null==(m=(f=o.options).onTap)||m.call(f,n))},a=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),o.startTime=Date.now(),o.isLongPress=!1,1===e.touches.length)o.startX=e.touches[0].clientX,o.startY=e.touches[0].clientY,l(e);else if(2===e.touches.length){r();const[t,n]=e.touches;o.startDistance=Fn(t.clientX,t.clientY,n.clientX,n.clientY),o.startAngle=jn(t.clientX,t.clientY,n.clientX,n.clientY),o.lastScale=1,o.lastAngle=0}null==(n=(t=o.options).onTouchStart)||n.call(t,e)},u=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),o.longPressTimer&&1===e.touches.length&&i(e.touches[0].clientX,e.touches[0].clientY)&&r(),2===e.touches.length){const[t,n]=e.touches,r=Fn(t.clientX,t.clientY,n.clientX,n.clientY),l=jn(t.clientX,t.clientY,n.clientX,n.clientY);if(o.options.enablePinch&&o.options.onPinch){const t=r/o.startDistance;Math.abs(t-o.lastScale)>=(o.options.pinchThreshold||.1)&&(o.options.onPinch(t,e),o.lastScale=t)}if(o.options.enableRotate&&o.options.onRotate){const t=l-o.startAngle;Math.abs(t-o.lastAngle)>5&&(o.options.onRotate(t,e),o.lastAngle=t)}}null==(n=(t=o.options).onTouchMove)||n.call(t,e)},c=e=>{var t,n;if(r(),0===e.touches.length){o.lastTouchEndTime=Date.now();const t=e.changedTouches[0];s(t.clientX,t.clientY,e)}null==(n=(t=o.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;o.options.enableMouse&&(Date.now()-o.lastTouchEndTime<400||(e.preventDefault(),o.isMouseDown=!0,o.startTime=Date.now(),o.startX=e.clientX,o.startY=e.clientY,o.isLongPress=!1,l(e),null==(n=(t=o.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.longPressTimer&&i(e.clientX,e.clientY)&&r(),null==(n=(t=o.options).onTouchMove)||n.call(t,e))},v=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.isMouseDown=!1,r(),o.isLongPress||s(e.clientX,e.clientY,e),null==(n=(t=o.options).onTouchEnd)||n.call(t,e))};o.handlers={touchStart:a,touchMove:u,touchEnd:c,mouseDown:d,mouseMove:p,mouseUp:v},e.addEventListener("touchstart",a,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",c),e.addEventListener("touchcancel",c),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",v))},updated(e,t){const n=e.__touch;n&&(n.options=qn(t.value))},unmounted(e){const t=e.__touch;(null==t?void 0:t.longPressTimer)&&clearTimeout(t.longPressTimer),(null==t?void 0:t.handlers)&&(e.removeEventListener("touchstart",t.handlers.touchStart),e.removeEventListener("touchmove",t.handlers.touchMove),e.removeEventListener("touchend",t.handlers.touchEnd),e.removeEventListener("touchcancel",t.handlers.touchEnd),t.handlers.mouseDown&&e.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp)),delete e.__touch}});function qn(e){var t,n,o,r,l,i,s,a,u,c,d,p;return{swipeThreshold:null!=(t=null==e?void 0:e.swipeThreshold)?t:30,swipeTimeout:null!=(n=null==e?void 0:e.swipeTimeout)?n:500,pinchThreshold:null!=(o=null==e?void 0:e.pinchThreshold)?o:.1,enableSwipe:null==(r=null==e?void 0:e.enableSwipe)||r,enablePinch:null==(l=null==e?void 0:e.enablePinch)||l,enableRotate:null==(i=null==e?void 0:e.enableRotate)||i,enableTap:null==(s=null==e?void 0:e.enableTap)||s,tapTimeout:null!=(a=null==e?void 0:e.tapTimeout)?a:250,tapThreshold:null!=(u=null==e?void 0:e.tapThreshold)?u:10,enableLongPress:null==(c=null==e?void 0:e.enableLongPress)||c,longPressTimeout:null!=(d=null==e?void 0:e.longPressTimeout)?d:500,enableMouse:null==(p=null==e?void 0:e.enableMouse)||p,onSwipe:null==e?void 0:e.onSwipe,onSwipeLeft:null==e?void 0:e.onSwipeLeft,onSwipeRight:null==e?void 0:e.onSwipeRight,onSwipeUp:null==e?void 0:e.onSwipeUp,onSwipeDown:null==e?void 0:e.onSwipeDown,onPinch:null==e?void 0:e.onPinch,onRotate:null==e?void 0:e.onRotate,onTap:null==e?void 0:e.onTap,onLongPress:null==e?void 0:e.onLongPress,onTouchStart:null==e?void 0:e.onTouchStart,onTouchMove:null==e?void 0:e.onTouchMove,onTouchEnd:null==e?void 0:e.onTouchEnd}}function Zn(e,t){const{position:n="both",chars:o}=t,r=o?`[\\s${l=o,l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var l;switch(n){case"start":return e.replace(new RegExp(`^${r}+`,"g"),"");case"end":return e.replace(new RegExp(`${r}+$`,"g"),"");default:return e.replace(new RegExp(`^${r}+|${r}+$`,"g"),"")}}const Kn=w({name:"trim",ssr:!0,mounted(e,t){const n=Gn(t.value);if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)!function(e,t){const n={options:t};e.__trim=n;const o=()=>{const n=e.value,o=Zn(n,t);n!==o&&(e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,o=t.replace(/\s+$/g,"");if(t!==o&&(e.value=o,null!==n)){const t=Math.min(n,o.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>o();e.addEventListener("blur",t),n.blurHandler=t}e.value&&o()}(e,n);else{const t=e.textContent||"";e.textContent=Zn(t,n)}},updated(e,t){const n=Gn(t.value),o=e.__trim;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)o&&(o.options=n);else{const t=e.textContent||"";e.textContent=Zn(t,n)}},unmounted(e){const t=e.__trim;(null==t?void 0:t.inputHandler)&&e.removeEventListener("input",t.inputHandler),(null==t?void 0:t.blurHandler)&&e.removeEventListener("blur",t.blurHandler),delete e.__trim}});function Gn(e){var t,n,o;return void 0===e||!0===e?{position:"both",onInput:!0,onBlur:!0}:!1===e?{position:"both",onInput:!1,onBlur:!1}:"string"==typeof e?{position:e,onInput:!0,onBlur:!0}:{position:null!=(t=e.position)?t:"both",onInput:null==(n=e.onInput)||n,onBlur:null==(o=e.onBlur)||o,chars:e.chars}}const Jn=w({name:"truncate",ssr:!0,mounted(e,t){const n=eo(t.value),o=e.textContent||"",r={originalText:o,options:n};e.__truncate=r,Qn(e,o,n)},updated(e,t){const n=e.__truncate,o=eo(t.value);if(n){const t=n.originalText;JSON.stringify(o)!==JSON.stringify(n.options)&&(n.options=o,Qn(e,t,o))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:o},Qn(e,t,o)}},unmounted(e){delete e.__truncate}});function Qn(e,t,n){const{useCss:o,showTitle:r=!0}=n;if(o)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",r&&t&&e.setAttribute("title",t);else{const o=function(e,t){const{length:n=100,position:o="end",ellipsis:r="..."}=t;if(e.length<=n)return e;switch(o){case"start":return r+e.slice(-(n-r.length));case"middle":{const t=Math.ceil((n-r.length)/2),o=Math.floor((n-r.length)/2);return e.slice(0,t)+r+e.slice(-o)}default:return e.slice(0,n-r.length)+r}}(t,n);e.textContent=o,r&&t&&t!==o&&e.setAttribute("title",t)}}function eo(e){var t,n,o,r,l;return"number"==typeof e?{length:e,position:"end",ellipsis:"...",useCss:!1,showTitle:!0}:{length:null!=(t=null==e?void 0:e.length)?t:100,position:null!=(n=null==e?void 0:e.position)?n:"end",ellipsis:null!=(o=null==e?void 0:e.ellipsis)?o:"...",useCss:null!=(r=null==e?void 0:e.useCss)&&r,showTitle:null==(l=null==e?void 0:e.showTitle)||l}}function to(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function no(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const oo=w({name:"uppercase",ssr:!0,mounted(e,t){const n=no(t.value);if(T(e)){const t=x(e,n,e=>to(e,n));e.__uppercaseCleanup=t}else E(e,e=>to(e,n))},updated(e,t){const n=no(t.value);T(e)?n.onInput&&(e.value=to(e.value,n)):E(e,e=>to(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function ro(e){if("function"==typeof e.itemSize){let t=0;for(let n=0;n<e.items.length;n++)t+=e.itemSize(n);return t}return(e.itemSize||50)*e.items.length}function lo(e,t,n){const o=n.items,r=n.itemSize||50,l=n.overscan||3;let i=0,s=0,a=0;if("function"==typeof r){let n=0;for(let t=0;t<o.length;t++){const o=r(t);if(n+o>e){i=t,a=n;break}n+=o}for(s=i,n=a;s<o.length&&n<e+t;)n+=r(s),s++;i=Math.max(0,i-l),s=Math.min(o.length,s+l),n=0;for(let e=0;e<i;e++)n+=r(e);return a=n,{startIndex:i,endIndex:s,offsetY:a}}return i=Math.max(0,Math.floor(e/r)-l),s=Math.min(o.length,Math.ceil((e+t)/r)+l),a=i*r,{startIndex:i,endIndex:s,offsetY:a}}function io(e){var t,n,o,r;return Array.isArray(e)?{items:e,itemSize:50,height:400,overscan:3,keyField:"id"}:{items:e.items,itemSize:null!=(t=e.itemSize)?t:50,height:null!=(n=e.height)?n:400,overscan:null!=(o=e.overscan)?o:3,render:e.render,keyField:null!=(r=e.keyField)?r:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function so(e,t,n){const o=document.createElement("div");o.className="v-virtual-list__item",o.dataset.index=String(t);const r=n.keyField||"id";"object"==typeof e&&null!==e&&r in e&&(o.dataset.key=String(e[r]));const l=function(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}(n,t);return o.style.height=`${l}px`,o.style.boxSizing="border-box",n.render?o.innerHTML=n.render(e,t):o.textContent="object"==typeof e?JSON.stringify(e):String(e),o}const ao=w({name:"virtual-list",ssr:!1,mounted(e,t){const n=io(t.value);e.classList.add("v-virtual-list"),e.style.height="number"==typeof n.height?`${n.height}px`:n.height,e.style.overflow="auto",e.style.position="relative";const o=document.createElement("div");o.className="v-virtual-list__content",o.style.position="relative",o.style.height=`${ro(n)}px`,e.appendChild(o);const r=document.createElement("div");r.className="v-virtual-list__visible",r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.right="0",o.appendChild(r);const l={options:n,containerEl:e,contentEl:o,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=l;const i=t=>{const n=e.scrollTop,o=e.clientHeight,{startIndex:i,endIndex:s,offsetY:a}=lo(n,o,l.options);i===l.startIndex&&s===l.endIndex||(l.startIndex=i,l.endIndex=s,uo(r,l,a),l.options.onVisibleChange&&l.options.onVisibleChange(i,s)),l.options.onScroll&&l.options.onScroll(n)};l.scrollHandler=i,e.addEventListener("scroll",i,{passive:!0});const{startIndex:s,endIndex:a,offsetY:u}=lo(0,e.clientHeight,n);if(l.startIndex=s,l.endIndex=a,uo(r,l,u),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{i(new Event("scroll"))});t.observe(e),l.resizeObserver=t}},updated(e,t){var n;const o=e.__virtualList;if(!o)return;const r=io(t.value);o.options=r,o.contentEl&&(o.contentEl.style.height=`${ro(r)}px`);const l=e.scrollTop,i=e.clientHeight,{startIndex:s,endIndex:a,offsetY:u}=lo(l,i,r);o.startIndex=s,o.endIndex=a;const c=null==(n=o.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");c&&uo(c,o,u)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function uo(e,t,n){const{options:o,startIndex:r,endIndex:l}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=r;t<l;t++){const n=o.items[t];if(void 0!==n){const r=so(n,t,o);e.appendChild(r)}}}function co(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const po=w({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!v())return;const r=co(t.value),l=e.style.display,i=e.style.visibility,s={options:r,isVisible:null==(n=r.initial)||n,originalDisplay:l,originalVisibility:i,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,Y(e,"transitionend",s.transitionEndHandler),vo(e,s,null==(o=r.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const r=co(t.value);let l;l="boolean"==typeof t.value?t.value:null==(n=r.initial)||n,o.isVisible!==l&&vo(e,o,l),o.options=r},unmounted(e){const t=e.__visible;t&&($(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function vo(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}function fo(e){var t;const n=document.createElement("canvas"),o=n.getContext("2d");if(!o)throw new Error("[Directix] v-watermark: Could not get canvas context");const r=e.width||300,l=e.height||200,i=e.fontSize||16,s=e.fontFamily||"sans-serif",a=e.fontWeight||"normal",u=e.color||"rgba(128, 128, 128, 0.15)",c=null!=(t=e.rotate)?t:-22;n.width=r,n.height=l,o.font=`${a} ${i}px ${s}`,o.fillStyle=u,o.textAlign="center",o.textBaseline="middle",o.translate(r/2,l/2),o.rotate(c*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*i,v=-(d.length-1)*p/2;return d.forEach((e,t)=>{o.fillText(e,0,v+t*p)}),n}function mo(e,t){var n;const o=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],r=null!=(n=t.zIndex)?n:9999,l=document.createElement("div");return l.className="v-watermark",l.style.cssText=`\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tpointer-events: none;\n\t\tz-index: ${r};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${o[0]/2}px ${o[1]/2}px;\n\t\tbackground-size: ${e.width+o[0]}px ${e.height+o[1]}px;\n\t`,l}function ho(e){var t,n,o,r,l,i,s,a,u,c,d;return"string"==typeof e?{content:e}:{content:e.content,width:null!=(t=e.width)?t:300,height:null!=(n=e.height)?n:200,rotate:null!=(o=e.rotate)?o:-22,fontSize:null!=(r=e.fontSize)?r:16,fontFamily:null!=(l=e.fontFamily)?l:"sans-serif",fontWeight:null!=(i=e.fontWeight)?i:"normal",color:null!=(s=e.color)?s:"rgba(128, 128, 128, 0.15)",gap:null!=(a=e.gap)?a:[100,100],zIndex:null!=(u=e.zIndex)?u:9999,disabled:null!=(c=e.disabled)&&c,protect:null==(d=e.protect)||d}}const go=w({name:"watermark",ssr:!0,mounted(e,t){const n=ho(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=o,n.disabled||bo(e,o)},updated(e,t){const n=e.__watermark;if(!n)return;const o=ho(t.value);o.disabled&&!n.options.disabled?yo(n):!o.disabled&&n.options.disabled?(n.options=o,bo(e,n)):o.disabled||(n.options=o,yo(n),bo(e,n)),n.options=o},unmounted(e){const t=e.__watermark;t&&(yo(t),delete e.__watermark)}});function bo(e,t){const n=t.options;t.canvas=fo(n),t.watermarkEl=mo(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&function(e,t){if("undefined"==typeof MutationObserver)return;t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=fo(t.options),t.watermarkEl=mo(t.canvas,t.options),e.appendChild(t.watermarkEl));for(const e of n)if("attributes"===e.type&&e.target===t.watermarkEl){const e=Array.isArray(t.options.gap)?t.options.gap:[t.options.gap||100,t.options.gap||100];t.watermarkEl.style.display="block",t.watermarkEl.style.visibility="visible",t.watermarkEl.style.opacity="1",t.canvas&&(t.watermarkEl.style.backgroundImage=`url("${t.canvas.toDataURL()}")`),t.watermarkEl.style.backgroundSize=`${t.canvas.width+e[0]}px ${t.canvas.height+e[1]}px`}}),t.observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}(e,t)}function yo(e){e.observer&&(e.observer.disconnect(),e.observer=null),e.watermarkEl&&e.watermarkEl.parentNode&&e.watermarkEl.parentNode.removeChild(e.watermarkEl),e.watermarkEl=null,e.canvas=null}const wo=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function _o(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function xo(e,t={}){if(!e)return e;const{every:n=!0,keepLower:o=wo}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?_o(e):o.includes(e.toLowerCase())?e.toLowerCase():_o(e)).join(" ")}return _o(e)}function Eo(e){return __async(this,null,function*(){if(b())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){if(!v())return!1;const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}function To(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function Lo(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function ko(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}function Co(e){if(e.type.startsWith("touch")){const t=e.touches[0]||e.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function So(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const o=document.createElement("canvas").getContext("2d");return o?(o.font=`${t}px ${n}`,o.measureText(e).width):8*e.length}function Do(e,t,n="...",o=14,r="sans-serif"){if(t<=0)return e;if(So(e,o,r)<=t)return e;const l=t-So(n,o,r);if(l<=0)return n;let i=0,s=e.length;for(;i<s;){const t=Math.floor((i+s+1)/2);So(e.slice(0,t),o,r)<=l?i=t:s=t-1}return e.slice(0,i)+n}const Io=new Set(["input","textarea","select","button"]);const Mo={esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",plus:"+",minus:"-"},Po=new Set(["ctrl","alt","shift","meta"]);function Oo(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let o="";for(const e of t)Po.has(e)?n.add(e):o=Mo[e]||e;return{key:o,modifiers:n}}function zo(e,t){if(t.modifiers.has("ctrl")!==(e.ctrlKey||e.metaKey))return!1;if(t.modifiers.has("alt")!==e.altKey)return!1;if(t.modifiers.has("shift")!==e.shiftKey)return!1;if(t.modifiers.has("meta")!==e.metaKey)return!1;const n=e.key,o=t.key;return n.toLowerCase()===o.toLowerCase()}function Ho(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:"clientX"in e?{x:e.clientX,y:e.clientY}:{x:0,y:0}}function Yo(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function $o(e,t={}){const{precision:n=2,separator:o=",",decimal:r=".",symbol:l="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),"before"===i?l+c:c+l}function Ao(e,t={}){const{decimal:n=".",symbol:o="$"}=t;let r=e.replace(new RegExp(`[${o}\\s]`,"g"),"");return"."!==n?(r=r.replace(/,/g,""),r=r.replace(new RegExp(`\\${n}`,"g"),".")):r=r.replace(/,/g,""),parseFloat(r)||0}function Xo(e,t={}){const{precision:n=0,separator:o=",",decimal:r=".",prefix:l="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=r+u),l+c+i}function Ro(e,t={}){const{decimal:n=".",prefix:o="",suffix:r=""}=t;let l=e.replace(new RegExp(`^${No(o)}`),"").replace(new RegExp(`${No(r)}$`),"").replace(/\s/g,"");return"."!==n?(l=l.replace(/,/g,""),l=l.replace(new RegExp(`\\${n}`,"g"),".")):l=l.replace(/,/g,""),parseFloat(l)||0}function No(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vo(e,t){return t.includes("*")||t.includes(e)}function Uo(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}function Bo(e,t){let n="";"undefined"!=typeof document&&document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles&&(n+=`<style>${t.styles}</style>`),n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||("undefined"!=typeof document?document.title:"Print"),r=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${r}\n</body>\n</html>`}function Fo(e={}){const{title:n,styles:o,cssUrls:r=[],onBeforePrint:l,onAfterPrint:i,newWindow:s=!1,printClass:a}=e,u=t.ref(!1);function c(e){return __async(this,null,function*(){if(l){if(!1===l())return}u.value=!0;try{let l=null;if(l="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!l)return void console.warn("[Directix] usePrint: Target element not found");const u={title:t.unref(n)||"",styles:Array.isArray(t.unref(o))?t.unref(o).join("\n"):t.unref(o)||"",cssUrls:t.unref(r)||[],printClass:t.unref(a)};t.unref(s)?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] usePrint: Could not open print window");const o=Bo(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Uo(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(l,u):yield function(e,t){return __async(this,null,function*(){var n,o,r;const l=document.createElement("iframe");l.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(l);const i=l.contentDocument||(null==(n=l.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(l);const s=Bo(e,t);i.open(),i.write(s),i.close(),yield Uo(i);try{null==(o=l.contentWindow)||o.focus(),null==(r=l.contentWindow)||r.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(l)},1e3)})}(l,u),i&&i()}finally{u.value=!1}})}return t.onUnmounted(()=>{}),{isPrinting:u,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function jo(e){return new Promise(t=>setTimeout(t,e))}function Wo(e,t,n){let o=0,r=0,l=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,r=t.scrollTop,l=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:r,scrollLeftMax:l,scrollTopMax:i,progressX:l>0?o/l:0,progressY:i>0?r/i:0,directionX:o!==t?o>t?1:-1:0,directionY:r!==n?r>n?1:-1:0}}const qo=["left","right","up","down"];function Zo(e,t="both",n){const o=n?`[\\s${r=n,r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var r;switch(t){case"start":return e.replace(new RegExp(`^${o}+`,"g"),"");case"end":return e.replace(new RegExp(`${o}+$`,"g"),"");default:return e.replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}}function Ko(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function Go(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:o,width:r,height:l,fontSize:i,fontFamily:s,fontWeight:a,color:u,rotate:c}=e;t.width=r,t.height=l,n.font=`${a} ${i}px ${s}`,n.fillStyle=u,n.textAlign="center",n.textBaseline="middle",n.translate(r/2,l/2),n.rotate(c*Math.PI/180);const d=Array.isArray(o)?o:[o],p=1.5*i,v=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,v+t*p)}),t}const Jo={"click-outside":ne,"click-delay":te,copy:ie,debounce:me,throttle:Sn,focus:Le,hotkey:He,lazy:st,intersect:Qe,visible:po,loading:ut,scroll:vn,"infinite-scroll":qe,sticky:yn,"long-press":vt,hover:Re,ripple:nn,mask:Tt,permission:Yt,sanitize:cn,resize:en,mutation:Pt,truncate:Jn,ellipsis:we,uppercase:oo,lowercase:ht,capitalcase:D,number:Ot,money:It,trim:Kn,tooltip:Bn,draggable:ye,touch:Wn,swipe:kn,"image-preview":je,countdown:de,watermark:go,print:$t,"virtual-list":ao,"pull-refresh":Jt},Qo={install:(e,t={})=>{var n,o,r,l,i,s,a;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(r=e.version)?void 0:r.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(i=null==(l=e.Vue)?void 0:l.version)?void 0:i.startsWith("2"))?u=2:(null==(a=null==(s=e.Vue)?void 0:s.version)?void 0:a.startsWith("3"))&&(u=3)}u&&p(u);const{directives:c,all:d=!1}=t;d||!c?Object.entries(Jo).forEach(([t,n])=>{e.directive(t,n)}):c.forEach(t=>{const n=Jo[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=Qo,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.calculateTime=Lo,e.capitalizeText=xo,e.capitalizeWord=_o,e.createCapitalizer=function(e={}){return t=>xo(t,e)},e.createDelayedClick=function(e,t=300){let n=!1;return o=>{if(n)return o.preventDefault(),void o.stopPropagation();n=!0,e(o),setTimeout(()=>{n=!1},t)}},e.createLowercaser=function(e=!1){return t=>Yo(t,e)},e.createMoneyFormatter=function(e={}){return t=>$o(t,e)},e.createNumberFormatter=function(e={}){return t=>Xo(t,e)},e.createPermissionChecker=function(e){const{getPermissions:t,getRoles:n,roleMap:o={}}=e;return(e,r="some")=>{const l=t(),i=(null==n?void 0:n())||[],s=Array.isArray(e)?e:[e];function a(e){if(e in o)return i.includes(e);if(Vo(e,l))return!0;for(const t of i){if(Vo(e,o[t]||[]))return!0}return!1}return"every"===r?s.every(a):s.some(a)}},e.createTrimmer=function(e="both",t){return n=>Zo(n,e,t)},e.createUppercaser=function(e=!1){return t=>Ko(t,e)},e.createVue2Directive=n,e.createVue3Directive=r,e.createWatermarkUrl=function(e,t={}){var n,o,r,l,i;return Go({content:e,width:null!=(n=t.width)?n:300,height:null!=(o=t.height)?o:200,fontSize:null!=(r=t.fontSize)?r:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(l=t.color)?l:"rgba(128, 128, 128, 0.15)",rotate:null!=(i=t.rotate)?i:-22}).toDataURL()},e.debounceFn=function(e,t=300,n){return q(e,t,n)},e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(j(t)&&j(o))for(const n in o)j(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=w,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const r=`${e}-${t}`;n.directive(r,o)})}}},e.formatMoney=$o,e.formatNumber=Xo,e.formatTime=ko,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let r=e;for(const e of o){if(null==r)return n;r=r[e]}return void 0===r?n:r},e.getVueVersion=d,e.isArray=W,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=v,e.isEmpty=function(e){return null==e||(B(e)||W(e)?0===e.length:!!j(e)&&0===Object.keys(e).length)},e.isFunction=F,e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.isObject=j,e.isPromise=function(e){return j(e)&&F(e.then)},e.isSSR=f,e.isString=B,e.isVue2=function(){if(null===s){const e=d();s=2===e||2.7===e}return s},e.isVue27=function(){return null===a&&(a=2.7===d()),a},e.isVue3=function(){return null===u&&(u=3===d()),u},e.lowercaseText=Yo,e.parseMoney=Ao,e.parseNumber=Ro,e.parseTargetTime=To,e.parseTime=K,e.quickPrint=function(e){return __async(this,arguments,function*(e,t={}){const{print:n}=Fo(t);yield n(e)})},e.resetVueVersion=function(){i=null,s=null,a=null,u=null},e.set=function(e,t,n){const o=t.split("."),r=o.pop();let l=e;for(const e of o)void 0===l[e]&&(l[e]={}),l=l[e];l[r]=n},e.setVueVersion=p,e.supportsClipboard=b,e.supportsIntersectionObserver=h,e.supportsMutationObserver=y,e.supportsPassive=m,e.supportsResizeObserver=g,e.throttleFn=function(e,t=300,n){return Z(e,t,n)},e.trimText=Zo,e.truncateText=function(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n},e.uppercaseText=Ko,e.useCapitalcase=function(e){const{text:n,every:o=!0,keepLower:r=wo}=e,l=t.ref(t.unref(n)),i=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r)],()=>function(){const e=t.unref(n),s=t.unref(o),a=t.unref(r);l.value=e,i.value=xo(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:i,original:l}},e.useClickDelay=function(e){const{handler:n,delay:o=300,disabled:r=!1}=e,l=t.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}return t.onUnmounted(()=>{s()}),{isPending:l,click:function(e){if(t.unref(r)||l.value)return e.preventDefault(),void e.stopPropagation();l.value=!0,n(e),i=setTimeout(()=>{l.value=!1,i=null},t.unref(o))},reset:function(){i&&(clearTimeout(i),i=null),l.value=!1},cancel:s}},e.useClickOutside=function(e){const{handler:n,exclude:o=[],capture:r=!0,events:l=["click"],stop:i=!1,prevent:s=!1}=e;let a=null;const u=new Map;function c(e){return e=>{a&&function(e,n,o){const r=n.target;if(e.contains(r))return!1;if(null==o?void 0:o.length)for(const e of o){const n="function"==typeof e?e():t.unref(e),o="string"==typeof n?z(n):n;if(o&&(o===r||o.contains(r)))return!1}return!0}(a,e,o)&&(i&&e.stopPropagation(),s&&e.preventDefault(),n(e))}}function d(){u.forEach((e,t)=>{document.removeEventListener(t,e,{capture:r})}),u.clear(),a=null}return t.onUnmounted(()=>{d()}),{bind:function(e){return v()?(d(),a=e,l.forEach(e=>{const t=c();u.set(e,t),document.addEventListener(e,t,{capture:r,passive:!s})}),d):()=>{}}}},e.useCopy=function(e={}){const{source:n,onSuccess:o,onError:r,copiedTimeout:l=1500}=e,i=t.ref(!1),s=t.ref(null),a=b()||v();let u=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:t.unref(n);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;u&&(clearTimeout(u),u=null),s.value=null;try{if(yield Eo(a))return i.value=!0,null==o||o(a),u=setTimeout(()=>{i.value=!1,u=null},l),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,i.value=!1,null==r||r(t),!1}})},copied:t.readonly(i),error:t.readonly(s),isSupported:a}},e.useCountdown=function(e){const{target:n,format:o="hh:mm:ss",onComplete:r,onTick:l,interval:i=1e3,autoStart:s=!0}=e,a=t.ref(Lo(0)),u=t.ref(""),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let v=null,f=0,m=0;const h=()=>t.unref(i),g=()=>t.unref(o);function b(){const e=Date.now(),t=f-e;if(t<=0)return a.value=Lo(0),u.value=ko(a.value,g()),p.value=!0,c.value=!1,w(),void(r&&r());a.value=Lo(t),u.value=ko(a.value,g()),l&&l(a.value)}function y(){c.value||(f=To(t.unref(n)),c.value=!0,d.value=!1,p.value=!1,b(),v=setInterval(b,h()))}function w(){v&&(clearInterval(v),v=null),c.value=!1}return t.watch(()=>t.unref(n),e=>{c.value&&(f=To(e))}),t.unref(s)&&y(),t.onUnmounted(()=>{w()}),{time:a,formatted:u,running:c,paused:d,completed:p,start:y,pause:function(){c.value&&(m=f-Date.now(),w(),d.value=!0)},resume:function(){!c.value&&d.value&&(f=Date.now()+m,c.value=!0,d.value=!1,b(),v=setInterval(b,h()))},reset:function(){w(),d.value=!1,p.value=!1,m=0,a.value=Lo(0),u.value=ko(a.value,g())}}},e.useDebounce=function(e){const{handler:n,wait:o=300,leading:r=!1,trailing:l=!0}=e;let i=null,s=null,a=null;const u=()=>{s&&(n.apply(a,s),s=null,a=null)};function c(){i&&(clearTimeout(i),i=null),s=null,a=null}return t.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,i&&clearTimeout(i),t.unref(r)&&!i&&u(),i=setTimeout(()=>{t.unref(l)&&u(),i=null},t.unref(o))},cancel:c,flush:function(){i&&(clearTimeout(i),u(),i=null)},pending:function(){return null!==i}}},e.useDraggable=function(e={}){const{axis:n="both",constrain:o=!1,boundary:r,handle:l,grid:i,disabled:s=!1,onStart:a,onDrag:u,onEnd:c}=e,d=t.ref({x:0,y:0}),p=t.ref(!1);let f=null,m=null,h=0,g=0,b=0,y=0,w=0,_=0,x=0,E=0,T=0,L=0;function k(e){var n;if(t.unref(s))return;e.preventDefault();const{clientX:l,clientY:i}=Co(e);p.value=!0,h=l,g=i;const{x:u,y:c}=function(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}(f.style.transform);if(b=u,y=c,t.unref(o)||r){const e=r?function(e){var t,n;if(!e)return null;if("function"==typeof e){const n=e();return null!=(t=null==n?void 0:n.getBoundingClientRect())?t:null}if("string"==typeof e){const t=document.querySelector(e);return null!=(n=null==t?void 0:t.getBoundingClientRect())?n:null}return e.getBoundingClientRect()}(r):null==(n=f.parentElement)?void 0:n.getBoundingClientRect();if(e){const t=f.getBoundingClientRect();w=t.left-e.left,_=t.top-e.top,x=e.width,E=e.height,T=t.width,L=t.height}}f.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",S),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",S),null==a||a({x:b,y:y},e)}function C(e){if(!p.value||t.unref(s))return;e.preventDefault();const{clientX:l,clientY:a}=Co(e);let c=l-h,v=a-g,m=b+c,k=y+v;const C=t.unref(n);"x"===C?v=0:"y"===C&&(c=0);const S=t.unref(i);if(S&&(c=Math.round(c/S[0])*S[0],v=Math.round(v/S[1])*S[1]),t.unref(o)||r){const e=w+c,t=_+v,n=x-T,o=E-L,r=Math.max(0,Math.min(e,n)),l=Math.max(0,Math.min(t,o));m=b+(r-w),k=y+(l-_)}f.style.transform=`translate(${m}px, ${k}px)`,d.value={x:m,y:k},null==u||u({x:m,y:k},e)}function S(e){p.value&&(p.value=!1,null==f||f.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",S),null==c||c(__spreadValues({},d.value),e))}function D(){if(f){const e=m||f;e.removeEventListener("mousedown",k),e.removeEventListener("touchstart",k)}f=null,m=null}return t.onUnmounted(()=>{D()}),{position:t.readonly(d),isDragging:t.readonly(p),reset:function(){f&&(f.style.transform="translate(0px, 0px)",d.value={x:0,y:0})},bind:function(e){if(!v())return()=>{};D(),f=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=l?e.querySelector(l):null;const t=m||e;return t.addEventListener("mousedown",k),t.addEventListener("touchstart",k,{passive:!1}),D}}},e.useEllipsis=function(e){const{text:n,lines:o=1,ellipsis:r="...",maxWidth:l=0}=e,i=t.ref(t.unref(n)),s=t.ref(""),a=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r),t.unref(l)],()=>function(){const e=t.unref(n),u=t.unref(o),c=t.unref(r),d=t.unref(l);if(i.value=e,!e)return s.value="",void(a.value=!1);if(d>0){const t=Do(e,d,c);s.value=t,a.value=t!==e}else if(u>1){const t=function(e,t,n="..."){if(t<=0)return"";const o=80*t;return e.length<=o?e:e.slice(0,o-n.length)+n}(e,u,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),t.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:i,calculateForWidth:function(e){const o=t.unref(n),l=t.unref(r);return!o||e<=0?o||"":Do(o,e,l)},wouldTruncate:function(e){const o=t.unref(n);return!(!o||e<=0)&&So(o)>e}}},e.useFocus=function(e={}){const{onFocus:n,onBlur:o}=e,r=t.ref(!1);let l=null,i=null,s=null;function a(){l&&(i&&l.removeEventListener("focus",i),s&&l.removeEventListener("blur",s)),l=null,i=null,s=null,r.value=!1}return t.onUnmounted(()=>{a()}),{isFocused:t.readonly(r),focus:function(){l&&function(e){if(!v())return!1;const t=e.tagName.toLowerCase();if(Io.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");return null!=n?"-1"!==n:("a"===t||"area"===t)&&e.hasAttribute("href")}(l)&&l.focus()},blur:function(){l&&l.blur()},bind:function(e){return v()?(a(),l=e,i=e=>{r.value=!0,null==n||n(e)},s=e=>{r.value=!1,null==o||o(e)},e.addEventListener("focus",i),e.addEventListener("blur",s),r.value=document.activeElement===e,a):()=>{}}}},e.useHotkey=function(e={}){const{hotkey:n,hotkeys:o=[],target:r,enabled:l=!0}=e,i=t.ref(t.unref(l)),s=new Map;let a=null,u=null,c=null;function d(e){const t=Oo(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function p(e,n){if(!i.value)return;const o=e.key.toLowerCase(),r=s.get(o);if(r)for(const o of r){if(t.unref(o.disabled))continue;if(!!o.keyup!==n)continue;if(zo(e,Oo(o.key))){!1!==o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),o.handler(e);break}}}function f(){v()&&(m(),a=r?t.unref(r):document,u=e=>p(e,!1),c=e=>p(e,!0),null==a||a.addEventListener("keydown",u),null==a||a.addEventListener("keyup",c))}function m(){a&&(u&&a.removeEventListener("keydown",u),c&&a.removeEventListener("keyup",c)),a=null,u=null,c=null}return n&&d(n),o.forEach(d),t.watch(i,e=>{e?f():m()}),r&&"object"==typeof r&&"value"in r&&t.watch(r,()=>{i.value&&f()}),i.value&&f(),t.onUnmounted(()=>{m()}),{enabled:i,enable:function(){i.value=!0},disable:function(){i.value=!1},toggle:function(){i.value=!i.value},add:d,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}},e.useHover=function(e={}){const{onEnter:n,onLeave:o,class:r,enterDelay:l=0,leaveDelay:i=0}=e,s=t.ref(!1);let a=null,u=null,c=null;function d(){a&&(clearTimeout(a),a=null),u&&(clearTimeout(u),u=null)}function p(e){if(u&&(clearTimeout(u),u=null),s.value)return;const o=t.unref(l);o&&o>0?a=setTimeout(()=>{s.value=!0,m(),null==n||n(e),a=null},o):(s.value=!0,m(),null==n||n(e))}function f(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const n=t.unref(i);n&&n>0?u=setTimeout(()=>{s.value=!1,h(),null==o||o(e),u=null},n):(s.value=!1,h(),null==o||o(e))}function m(){c&&r&&c.classList.add(r)}function h(){c&&r&&c.classList.remove(r)}return t.onUnmounted(()=>{d(),h()}),{isHovering:s,bind:function(e){return v()?(c=e,e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",f),()=>{e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",f),d(),h(),c=null}):()=>{}}}},e.useImagePreview=function(e={}){const{src:n,closeOnClickOutside:o=!0,closeOnEsc:r=!0,showCloseButton:l=!0,onOpen:i,onClose:s}=e,a=t.ref(!1),u=t.ref("");let c=null,d=null,p=null,f=null;function m(e){if(!v())return;const t=e||(n&&"object"==typeof n?n.value:n);if(!t&&!c)return;const s=t||c.src;u.value=s,d=function(){const e=document.createElement("div");return e.className="v-image-preview",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: zoom-out;\n ",e}();const m=document.createElement("img");if(m.src=s,m.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",l){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="&times;",e.style.cssText="\n position: absolute;\n top: 20px;\n right: 20px;\n width: 40px;\n height: 40px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: white;\n font-size: 24px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n ",e.addEventListener("click",e=>{e.stopPropagation(),h()}),d.appendChild(e)}d.appendChild(m),document.body.appendChild(d),o&&(p=h,d.addEventListener("click",p)),r&&(f=e=>{"Escape"===e.key&&h()},document.addEventListener("keydown",f)),a.value=!0,null==i||i()}function h(){d&&(d.remove(),d=null),p&&(document.removeEventListener("click",p),p=null),f&&(document.removeEventListener("keydown",f),f=null),a.value=!1,u.value="",null==s||s()}function g(){c&&m(c.src)}function b(){c&&(c.style.cursor="",c.removeEventListener("click",g)),c=null}return t.onUnmounted(()=>{b(),h()}),{isOpen:t.readonly(a),currentSrc:t.readonly(u),open:m,close:h,bind:function(e){return v()?(b(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",g),b):()=>{}}}},e.useIntersect=function(e={}){const{handler:n,onEnter:o,onLeave:r,onChange:l,root:i=null,rootMargin:s="0px",threshold:a=0,once:u=!1}=e,c=t.ref(!1),d=t.ref(0);let p=null,f=!1;function m(){p&&(p.disconnect(),p=null),c.value=!1,d.value=0}return t.onUnmounted(()=>{m()}),{isIntersecting:t.readonly(c),ratio:t.readonly(d),bind:function(e){return v()?(m(),p=v()&&h()?new IntersectionObserver(e=>{for(const t of e){if(u&&f)continue;const e=t.isIntersecting;c.value=e,d.value=t.intersectionRatio,null==n||n(t,p),null==l||l(e,t),e?(null==o||o(t,p),u&&(f=!0)):null==r||r(t,p)}},{root:t.unref(i),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),p&&p.observe(e),m):()=>{}},stop:m}},e.useLongPress=function(e={}){const{duration:n=500,distance:o=10,onStart:r,onTrigger:l,onCancel:i,onTick:s,tickInterval:a=100,prevent:u=!0}=e,c=t.ref(!1);let d=null,p=null,f={x:0,y:0},m=!1;function h(e){if(v()){if(u&&e.preventDefault(),y(),f=Ho(e),m=!0,c.value=!0,null==r||r(e),s){let e=t.unref(n);p=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}d=setTimeout(()=>{y(),c.value=!1,null==l||l(e)},t.unref(n))}}function g(e){c.value&&(y(),m=!1,c.value=!1,null==i||i(e))}function b(e){if(!c.value||!m)return;const n=Ho(e);var r,l;(r=f,l=n,Math.sqrt(__pow(l.x-r.x,2)+__pow(l.y-r.y,2)))>t.unref(o)&&g(e)}function y(){d&&(clearTimeout(d),d=null),p&&(clearInterval(p),p=null)}return t.onUnmounted(()=>{y()}),{isPressing:c,start:h,stop:g,bind:function(e){return e.addEventListener("mousedown",h),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",g),e.addEventListener("mousemove",b),e.addEventListener("touchstart",h,{passive:!u}),e.addEventListener("touchend",g),e.addEventListener("touchcancel",g),e.addEventListener("touchmove",b,{passive:!0}),()=>{e.removeEventListener("mousedown",h),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",g),e.removeEventListener("mousemove",b),e.removeEventListener("touchstart",h),e.removeEventListener("touchend",g),e.removeEventListener("touchcancel",g),e.removeEventListener("touchmove",b),y()}}}},e.useLowercase=function(e){const{text:n,first:o=!1}=e,r=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);r.value=e,l.value=Yo(e,i)}(),{immediate:!0}),{transformed:l,original:r}},e.useMoney=function(e){const{value:n,symbol:o="$",symbolPosition:r="before",precision:l=2,separator:i=",",decimal:s="."}=e,a=t.ref(t.unref(n)),u=t.computed(()=>$o(a.value,{precision:t.unref(l),separator:t.unref(i),decimal:t.unref(s),symbol:t.unref(o),symbolPosition:t.unref(r)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Ao(e,{decimal:t.unref(s),symbol:t.unref(o)})}}},e.useNumber=function(e){const{value:n,precision:o=0,separator:r=",",decimal:l=".",prefix:i="",suffix:s=""}=e,a=t.ref(t.unref(n)),u=t.computed(()=>Xo(a.value,{precision:t.unref(o),separator:t.unref(r),decimal:t.unref(l),prefix:t.unref(i),suffix:t.unref(s)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Ro(e,{decimal:t.unref(l),prefix:t.unref(i),suffix:t.unref(s)})}}},e.usePermission=function(e){const{value:n,mode:o="some",check:r,getPermissions:l,getRoles:i,roleMap:s={}}=e,a=t.ref(!1);function u(){a.value=function(){if(r)return r(t.unref(n),t.unref(o));if(!l)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=l(),a=(null==i?void 0:i())||[],u=Array.isArray(t.unref(n))?t.unref(n):[t.unref(n)];function c(t){if(t in s)return a.includes(t);if(Vo(t,e))return!0;for(const e of a)if(Vo(t,s[e]||[]))return!0;return!1}return"every"===t.unref(o)?u.every(c):u.some(c)}()}return t.watch(()=>t.unref(n),()=>u(),{immediate:!0}),"object"==typeof o&&"value"in o&&t.watch(o,()=>u()),{granted:t.readonly(a),recheck:u}},e.usePrint=Fo,e.usePullRefresh=function(e){const{handler:n,distance:o=60,maxDistance:r=100,disabled:l=!1,successDuration:i=500,errorDuration:s=1e3}=e,a=t.ref("idle"),u=t.ref(0),c=t.ref(!1),d=t.ref(null);let p=0,v=0;const f=()=>t.unref(o),m=()=>t.unref(l);function h(){a.value="idle",u.value=0,c.value=!1}function g(){return __async(this,null,function*(){a.value="loading";try{yield n(),a.value="success",yield jo(t.unref(i))}catch(e){a.value="error",yield jo(t.unref(s))}finally{h()}})}return t.onUnmounted(()=>{h()}),{state:a,distance:u,isPulling:c,events:{touchstart:function(e){if(m()||"loading"===a.value)return;const t=d.value;t&&t.scrollTop>0||(c.value=!0,p=e.touches[0].clientY,v=p,a.value="idle")},touchmove:function(e){if(!c.value||m()||"loading"===a.value)return;v=e.touches[0].clientY;const n=v-p;if(n<=0)return u.value=0,void(a.value="idle");e.preventDefault();const o=Math.min(.5*n,t.unref(r));u.value=o;const l=o/f();a.value=l>=1?"ready":"pulling"},touchend:function(){c.value&&!m()&&(c.value=!1,"ready"===a.value&&u.value>=f()?g():(u.value=0,h()))}},containerRef:d,refresh:g}},e.useResize=function(e={}){const{debounce:n=0,box:o="content-box",onResize:r}=e,l=t.ref(0),i=t.ref(0);let s=null,a=null,u=null;function c(e){const o=t.unref(n);function s(){l.value=e.contentRect.width,i.value=e.contentRect.height,null==r||r({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}o&&o>0?(a&&clearTimeout(a),a=setTimeout(s,o)):s()}function d(){s&&(s.disconnect(),s=null),u&&(u.remove(),u=null),a&&(clearTimeout(a),a=null)}return t.onUnmounted(()=>{d()}),{width:t.readonly(l),height:t.readonly(i),bind:function(e){if(!v())return()=>{};d();const t=e.getBoundingClientRect();if(l.value=t.width,i.value=t.height,g())v()&&g()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:o});else{u=document.createElement("iframe"),u.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ";"static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(u);const t=u.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return d},stop:d}},e.useScroll=function(e={}){const{throttle:n=0,passive:o=!0}=e,r=t.ref(0),l=t.ref(0),i=t.ref(0),s=t.ref(0),a=t.ref(0),u=t.ref(0),c=t.ref(!1);let d=null,p=0,f=0,m=null,h=null,g=null;const b=t.computed(()=>({scrollLeft:r.value,scrollTop:l.value,scrollLeftMax:0,scrollTopMax:0,progressX:i.value,progressY:s.value,directionX:a.value,directionY:u.value}));function y(e){if(!d)return;const o=t.unref(n);function v(){const e=Wo(d,p,f);r.value=e.scrollLeft,l.value=e.scrollTop,i.value=e.progressX,s.value=e.progressY,a.value=e.directionX,u.value=e.directionY,p=e.scrollLeft,f=e.scrollTop,c.value=!0,g&&clearTimeout(g),g=setTimeout(()=>{c.value=!1},150)}o&&o>0?h||(h=setTimeout(()=>{v(),h=null},o)):v()}function w(){d&&m&&d.removeEventListener("scroll",m),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),d=null,m=null}return t.onUnmounted(()=>{w()}),{scrollLeft:t.readonly(r),scrollTop:t.readonly(l),progressX:t.readonly(i),progressY:t.readonly(s),directionX:t.readonly(a),directionY:t.readonly(u),isScrolling:t.readonly(c),info:t.readonly(b),bind:function(e){if(!v())return()=>{};w(),d=e||window;const t=Wo(d,0,0);return r.value=t.scrollLeft,l.value=t.scrollTop,i.value=t.progressX,s.value=t.progressY,p=t.scrollLeft,f=t.scrollTop,m=y,d.addEventListener("scroll",m,{passive:o}),w},stop:w,scrollTo:function(e){if(!d)return;const{top:t,left:n,behavior:o="smooth"}=e;if(d===window)window.scrollTo({top:t,left:n,behavior:o});else{const e=d;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}},e.useSwipe=function(e={}){const{handler:n,threshold:o=30,maxTime:r=500,directions:l=qo,preventScrollOnSwipe:i=!0,mouse:s=!0,onLeft:a,onRight:u,onUp:c,onDown:d}=e,p=t.ref(null),f=t.ref(0),m=t.ref(0),h=t.ref(!1);let g=null,b=0,y=0,w=0;function _(e,s,v,h){var b;const y=t.unref(o);if(v>t.unref(r))return;if(Math.max(Math.abs(e),Math.abs(s))<y)return;const w=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(e,s,l);if(!w)return;p.value=w,f.value=e,m.value=s,i&&h.cancelable&&h.preventDefault(),null==n||n(w,h);const _={left:a,right:u,up:c,down:d};null==(b=_[w])||b.call(_),null==g||g.dispatchEvent(new CustomEvent("swipe",{detail:{direction:w,deltaX:e,deltaY:s,deltaTime:v}}))}function x(e,t){b=e,y=t,w=Date.now(),h.value=!0,p.value=null,f.value=0,m.value=0}function E(e,t,n){if(!h.value)return;h.value=!1;_(e-b,t-y,Date.now()-w,n)}function T(e){x(e.touches[0].clientX,e.touches[0].clientY)}function L(e){h.value&&i&&e.preventDefault()}function k(e){const t=e.changedTouches[0];E(t.clientX,t.clientY,e)}function C(e){x(e.clientX,e.clientY)}function S(e){E(e.clientX,e.clientY,e)}function D(e){h.value&&E(e.clientX,e.clientY,e)}function I(){g&&(g.removeEventListener("touchstart",T),g.removeEventListener("touchmove",L),g.removeEventListener("touchend",k),g.removeEventListener("touchcancel",k),t.unref(s)&&(g.removeEventListener("mousedown",C),g.removeEventListener("mouseup",S),g.removeEventListener("mouseleave",D)),g=null)}return t.onUnmounted(()=>{I()}),{direction:t.readonly(p),lengthX:t.readonly(f),lengthY:t.readonly(m),isSwiping:t.readonly(h),bind:function(e){return v()?(I(),g=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",T,{passive:!0}),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchend",k),e.addEventListener("touchcancel",k),t.unref(s)&&(e.addEventListener("mousedown",C),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",D)),I):()=>{}}}},e.useThrottle=function(e){const{handler:n,wait:o=300,leading:r=!0,trailing:l=!0}=e;let i=null,s=null,a=null,u=0;const c=()=>t.unref(r),d=()=>{s&&(n.apply(a,s),s=null,a=null)};function p(){i&&(clearTimeout(i),i=null),u=0,s=null,a=null}return t.onUnmounted(()=>{p()}),{run:function(...e){const n=Date.now(),r=t.unref(o);u||c()||(u=n);const p=r-(n-u);s=e,a=this,p<=0||p>r?(i&&(clearTimeout(i),i=null),u=n,d()):!i&&t.unref(l)&&(i=setTimeout(()=>{u=c()?Date.now():0,i=null,d()},p))},cancel:p}},e.useTouch=function(e={}){const{onSwipe:n,onSwipeLeft:o,onSwipeRight:r,onSwipeUp:l,onSwipeDown:i,onPinch:s,onRotate:a,onTap:u,onLongPress:c,swipeThreshold:d=30,longPressDuration:p=500,tapDuration:f=250,disabled:m=!1}=e,h=t.ref(null);let g=null,b=0,y=0,w=0,_=null,x=0,E=0;function T(e){let t=0,n=0;for(let o=0;o<e.length;o++)t+=e[o].clientX,n+=e[o].clientY;return{x:t/e.length,y:n/e.length}}function L(e,t){const n=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(n*n+o*o)}function k(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){t.unref(m)||(w=Date.now(),h.value=null,1===e.touches.length?(b=e.touches[0].clientX,y=e.touches[0].clientY,c&&(_=setTimeout(()=>{h.value="longPress",c({type:"longPress",center:{x:b,y:y},event:e})},p))):2===e.touches.length&&(x=L(e.touches[0],e.touches[1]),E=k(e.touches[0],e.touches[1])))}function S(e){if(!t.unref(m)&&(_&&(clearTimeout(_),_=null),2===e.touches.length&&(s||a))){const t=L(e.touches[0],e.touches[1]),n=k(e.touches[0],e.touches[1]);if(s&&x>0){const n=t/x;h.value="pinch",s({type:"pinch",scale:n,center:T(e.touches),event:e})}if(a){const t=n-E;h.value="rotate",a({type:"rotate",rotation:t,center:T(e.touches),event:e})}}}function D(e){if(t.unref(m))return;_&&(clearTimeout(_),_=null);const s=Date.now()-w;if(1===e.changedTouches.length){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY,c=t-b,p=a-y,v=Math.sqrt(c*c+p*p);if(v>=d){let s;h.value="swipe",s=Math.abs(c)>Math.abs(p)?c>0?"right":"left":p>0?"down":"up";const u={type:"swipe",direction:s,distance:v,angle:Math.atan2(p,c)*(180/Math.PI),center:{x:t,y:a},event:e};switch(null==n||n(u),s){case"left":null==o||o(u);break;case"right":null==r||r(u);break;case"up":null==l||l(u);break;case"down":null==i||i(u)}}else v<10&&s<f&&u&&(h.value="tap",u({type:"tap",center:{x:t,y:a},event:e}))}h.value=null}function I(){g&&(g.removeEventListener("touchstart",C),g.removeEventListener("touchmove",S),g.removeEventListener("touchend",D),g.removeEventListener("touchcancel",D)),_&&(clearTimeout(_),_=null),g=null,h.value=null}return t.onUnmounted(()=>{I()}),{gesture:t.readonly(h),bind:function(e){return v()?(I(),g=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",D),e.addEventListener("touchcancel",D),I):()=>{}}}},e.useTrim=function(e){const{text:n,position:o="both",chars:r}=e,l=t.ref(t.unref(n)),i=t.ref(""),s=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r)],()=>function(){const e=t.unref(n),a=t.unref(o),u=t.unref(r);l.value=e,i.value=Zo(e,a,u),s.value=i.value!==e}(),{immediate:!0}),{trimmed:i,original:l,wasTrimmed:s}},e.useUppercase=function(e){const{text:n,first:o=!1}=e,r=t.ref(t.unref(n)),l=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);r.value=e,l.value=Ko(e,i)}(),{immediate:!0}),{transformed:l,original:r}},e.useVirtualList=function(e){const{items:n,itemSize:o=50,height:r=400,overscan:l=3,keyField:i="id"}=e,s=t.ref(null),a=t.ref(0),u=t.ref(0),c=t.ref(0),d=()=>t.unref(n),p=()=>t.unref(o),v=()=>t.unref(r),f=t.computed(()=>{const e=d(),t=p();if("function"==typeof t){let n=0;for(let o=0;o<e.length;o++)n+=t(o);return n}return t*e.length});function m(){const e=d(),n=p(),o=v(),r=t.unref(l),i=a.value;let s=0,u=0,c=0;if("function"==typeof n){let t=0;for(let o=0;o<e.length;o++){const e=n(o);if(t+e>i){s=o,c=t;break}t+=e}for(u=s,t=c;u<e.length&&t<i+o;)t+=n(u),u++;s=Math.max(0,s-r),u=Math.min(e.length,u+r),t=0;for(let e=0;e<s;e++)t+=n(e);c=t}else s=Math.max(0,Math.floor(i/n)-r),u=Math.min(e.length,Math.ceil((i+o)/n)+r),c=s*n;return{start:s,end:u,offsetY:c}}const h=t.computed(()=>{const e=d(),t=p(),{start:n,end:o,offsetY:r}=m();u.value=n,c.value=o;const l=[];let i=r;for(let r=n;r<o;r++){const n=e[r];if(void 0!==n){const e="function"==typeof t?t(r):t;l.push({item:n,index:r,style:{position:"absolute",top:`${i}px`,height:`${e}px`,width:"100%"}}),i+=e}}return l}),g=t.computed(()=>({height:`${v()}px`,overflow:"auto",position:"relative"}));function b(e){const t=e.target;a.value=t.scrollTop}return t.onMounted(()=>{s.value&&s.value.addEventListener("scroll",b,{passive:!0})}),t.onUnmounted(()=>{s.value&&s.value.removeEventListener("scroll",b)}),{visibleItems:h,totalHeight:f,scrollTop:a,startIndex:u,endIndex:c,scrollToIndex:function(e){if(!s.value)return;const t=p(),n=d();if("function"==typeof t){let o=0;for(let r=0;r<Math.min(e,n.length);r++)o+=t(r);s.value.scrollTop=o}else s.value.scrollTop=e*t},scrollTo:function(e){s.value&&(s.value.scrollTop=e)},containerRef:s,listStyle:g}},e.useVisible=function(e={}){const{initial:n=!0,useHidden:o=!1,onChange:r}=e,l=t.ref(t.unref(n));let i=null,s="",a="";function u(e){i&&(e?(i.classList.remove("v-hidden"),i.classList.add("v-visible"),o?i.style.visibility=a||"visible":i.style.display=s):(i.classList.remove("v-visible"),i.classList.add("v-hidden"),o?i.style.visibility="hidden":i.style.display="none"))}function c(){i&&(i.style.display=s,i.style.visibility=a,i.classList.remove("v-hidden","v-visible")),i=null}return t.watch(l,(e,t)=>{e!==t&&(u(e),null==r||r(e))}),"object"==typeof n&&"value"in n&&t.watch(n,e=>{l.value=e}),t.onUnmounted(()=>{c()}),{visible:l,show:function(){l.value=!0},hide:function(){l.value=!1},toggle:function(){l.value=!l.value},bind:function(e){return v()?(c(),i=e,s=e.style.display,a=e.style.visibility,u(l.value),c):()=>{}}}},e.useWatermark=function(e){const{content:n,width:o=300,height:r=200,rotate:l=-22,fontSize:i=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:u="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:d=9999,disabled:p=!1,protect:v=!0}=e,f=t.ref(null),m=t.ref(""),h=t.ref(t.unref(p));function g(){const e=t.unref(n),c=t.unref(o),d=t.unref(r),p=t.unref(l),v=t.unref(i),h=t.unref(s),g=t.unref(a),b=t.unref(u);f.value=Go({content:e,width:c,height:d,fontSize:v,fontFamily:h,fontWeight:g,color:b,rotate:p}),m.value=f.value.toDataURL()}const b=t.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:t.unref(d),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function y(){const e=t.unref(c),n=t.unref(d),l=Array.isArray(e)?e:[e,e],i=t.unref(o),s=t.unref(r);b.value=__spreadProps(__spreadValues({},b.value),{zIndex:n,backgroundImage:`url("${m.value}")`,backgroundPosition:`${l[0]/2}px ${l[1]/2}px`,backgroundSize:`${i+l[0]}px ${s+l[1]}px`})}return t.watch(()=>[t.unref(n),t.unref(o),t.unref(r),t.unref(l),t.unref(i),t.unref(s),t.unref(a),t.unref(u),t.unref(c),t.unref(d)],()=>{g(),y()},{immediate:!0}),t.watch(h,e=>{b.value.display=e?"none":"block"}),t.unref(p)&&(b.value.display="none"),t.onUnmounted(()=>{}),{canvas:f,dataUrl:m,style:b,disabled:h,update:function(t){Object.assign(e,t),g(),y()},enable:function(){h.value=!1},disable:function(){h.value=!0}}},e.vCapitalcase=D,e.vClickDelay=te,e.vClickOutside=ne,e.vCopy=ie,e.vCountdown=de,e.vDebounce=me,e.vDraggable=ye,e.vEllipsis=we,e.vFocus=Le,e.vHotkey=He,e.vHover=Re,e.vImagePreview=je,e.vInfiniteScroll=qe,e.vIntersect=Qe,e.vLazy=st,e.vLoading=ut,e.vLongPress=vt,e.vLowercase=ht,e.vMask=Tt,e.vMoney=It,e.vMutation=Pt,e.vNumber=Ot,e.vPermission=Yt,e.vPrint=$t,e.vPullRefresh=Jt,e.vResize=en,e.vRipple=nn,e.vSanitize=cn,e.vScroll=vn,e.vSticky=yn,e.vSwipe=kn,e.vThrottle=Sn,e.vTooltip=Bn,e.vTouch=Wn,e.vTrim=Kn,e.vTruncate=Jn,e.vUppercase=oo,e.vVirtualList=ao,e.vVisible=po,e.vWatermark=go,e.wouldTextTruncate=function(e,t,n=14){return So(e,n)>t},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{},Vue);
7
+ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,l)=>{var r=e=>{try{s(n.next(e))}catch(e){l(e)}},i=e=>{try{s(n.throw(e))}catch(e){l(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(r,i);s((n=n.apply(e,t)).next())});!function(e,t){"use strict";function n(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,n,l){e.mounted&&e.mounted(t,o(n),l)},update(t,n,l,r){const i=t.__directix_state__;e.updated&&e.updated(t,o(n),l,o(__spreadProps(__spreadValues({},n),{value:n.oldValue})),r),i&&(i.value=n.value,i.vnode=l)},componentUpdated(e,t,n,o){},unbind(t,n,l){e.unmounted&&e.unmounted(t,o(n),l);const r=t.__directix_state__;(null==r?void 0:r.cleanup)&&r.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function o(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function l(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,r(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,l){const i=t.__directix_state__;e.updated&&e.updated(t,r(n),o,r(__spreadProps(__spreadValues({},n),{value:n.oldValue})),l),i&&(i.value=n.value,i.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,r(n),o);const l=t.__directix_state__;(null==l?void 0:l.cleanup)&&l.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function r(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}let i=null,s=null,a=null,u=null;function c(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function d(){var e,t;if(null!==i)return i;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return i=2.7,i;if("2"===e)return i=2,i;if("3"===e)return i=3,i}try{const e=require("vue"),t=c(null==e?void 0:e.version);if(null!==t)return i=t,i}catch(e){}if("undefined"!=typeof window){const n=window,o=n.Vue;if(null==o?void 0:o.version){const e=c(o.version);if(null!==e)return i=e,i}if("function"==typeof(null==o?void 0:o.observable))return i=2,i;if("function"==typeof(null==o?void 0:o.createApp)&&"function"!=typeof(null==o?void 0:o.observable))return i=3,i;const l=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==l?void 0:l.Vue)?void 0:e.version){const e=c(l.Vue.version);if(null!==e)return i=e,i}if(null==(t=null==l?void 0:l.apps)?void 0:t.length)return i=3,i}return null===i&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),i=3),i}function p(e){i=e,s=2===e||2.7===e,a=2.7===e,u=3===e}const f=()=>"undefined"!=typeof window&&"undefined"!=typeof document,v=()=>!f(),m=()=>{if(!f())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},h=()=>f()&&"IntersectionObserver"in window,g=()=>f()&&"ResizeObserver"in window,y=()=>f()&&"clipboard"in navigator,b=()=>f()&&"MutationObserver"in window;function w(e){var t;const o=e,{name:r,version:i,ssr:s,defaults:a}=o,u=__objRest(o,["name","version","ssr","defaults"]);if(v()&&!s)return"undefined"!=typeof process&&"test"!==(null==(t=process.env)?void 0:t.NODE_ENV)&&console.warn(`[Directix] Directive "${r}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let t=null;function o(){return t||(t=2===d()?n(e):l(e)),t}function r(e){return function(t,n,l,r){var i,s;null==(s=(i=o())[e])||s.call(i,t,n,l,r)}}return{bind:r("bind"),inserted:r("inserted"),update:r("update"),componentUpdated:r("componentUpdated"),unbind:r("unbind"),created:r("created"),beforeMount:r("beforeMount"),mounted:r("mounted"),beforeUpdate:r("beforeUpdate"),updated:r("updated"),beforeUnmount:r("beforeUnmount"),unmounted:r("unmounted")}}({mounted:u.mounted?(e,t,n)=>{u.mounted(e,_(t,a),n)}:void 0,updated:u.updated?(e,t,n,o,l)=>{u.updated(e,_(t,a),n,o,l)}:void 0,unmounted:u.unmounted})}function _(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function x(e,t,n){if(!t.onInput)return()=>{};const o=()=>{const t=e.selectionStart,o=e.selectionEnd,l=e.value,r=n(l);l!==r&&(e.value=r,null!==t&&null!==o&&e.setSelectionRange(t,o),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",o),e.value=n(e.value),()=>{e.removeEventListener("input",o)}}function E(e,t){const n=e.textContent||"";e.textContent=t(n)}function L(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}const T=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function k(e,t){if(!e)return e;const{every:n=!0,keepLower:o=T}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?C(e):o.includes(e.toLowerCase())?e.toLowerCase():C(e)).join(" ")}return C(e)}function C(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function S(e){var t,n,o;return void 0===e||!0===e?{every:!0,onInput:!0}:!1===e?{every:!1,onInput:!1}:{every:null==(t=e.every)||t,keepLower:null!=(n=e.keepLower)?n:T,onInput:null==(o=e.onInput)||o}}const D=w({name:"capitalcase",ssr:!0,mounted(e,t){const n=S(t.value);if(L(e)){const t=x(e,n,e=>k(e,n));e.__capitalcaseCleanup=t}else E(e,e=>k(e,n))},updated(e,t){const n=S(t.value);L(e)?n.onInput&&(e.value=k(e.value,n)):E(e,e=>k(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),I="__directix_";function M(e,t,n){e[I+t]=n}function P(e,t){return e[I+t]}function O(e,t){delete e[I+t]}function z(e){return e?"string"==typeof e?f()?document.querySelector(e):null:e instanceof Element?e:null:null}function H(e){if(!f())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function $(e,t,n,o=!1){if(!f())return;const l=Y(o);e.addEventListener(t,n,l)}function A(e,t,n,o=!1){if(!f())return;const l=Y(o);e.removeEventListener(t,n,l)}function Y(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}function R(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function X(e){const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}const N=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function V(e){for(const t of N)if(e[t])return t;return null}function U(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function B(e){return"string"==typeof e}function F(e){return"function"==typeof e}function j(e){return"object"==typeof e&&null!==e}function W(e){return Array.isArray(e)}function q(e,t=300,n={}){let o=null,l=null,r=null;const{leading:i=!1,trailing:s=!0}=n,a=()=>{l&&(e.apply(r,l),l=null,r=null)},u=function(...e){l=e,r=this,o&&clearTimeout(o),i&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return u.cancel=()=>{o&&(clearTimeout(o),o=null),l=null,r=null},u.flush=()=>{o&&(clearTimeout(o),a(),o=null)},u}function Z(e,t=300,n={}){let o=null,l=null,r=null,i=0;const{leading:s=!0,trailing:a=!0}=n,u=()=>{l&&(e.apply(r,l),l=null,r=null)},c=function(...e){const n=Date.now();i||s||(i=n);const c=t-(n-i);l=e,r=this,c<=0||c>t?(o&&(clearTimeout(o),o=null),i=n,u()):!o&&a&&(o=setTimeout(()=>{i=s?Date.now():0,o=null,u()},c))};return c.cancel=()=>{o&&(clearTimeout(o),o=null),i=0,l=null,r=null},c}function K(e){if(!e)return null;if(e.endsWith("ms"))return parseInt(e,10);if(e.endsWith("s"))return 1e3*parseFloat(e);const t=parseInt(e,10);return isNaN(t)?null:t}const G="clickDelay";function J(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function Q(e,t){return n=>{const o=P(e,G);if(!o||o.isPending)return n.preventDefault(),void n.stopPropagation();o.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),o.timeoutId=setTimeout(()=>{o.isPending=!1,o.timeoutId=null,J(e,t)},t.delay)}}function ee(e,t){var n,o,l,r;const i=K(t.arg)||300;if("function"==typeof e)return{handler:e,delay:i,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0};if(!e)throw new Error("[Directix] v-click-delay: handler is required");return{handler:e.handler,delay:null!=(n=e.delay)?n:i,disabled:null!=(o=e.disabled)&&o,pendingClass:null!=(l=e.pendingClass)?l:"v-click-delay--pending",feedback:null==(r=e.feedback)||r}}const te=w({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=ee(t.value,t);if(n.disabled)return;const o={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,o),e.addEventListener("click",o.handler),e.addEventListener("touchend",o.handler)},updated(e,t){const n=P(e,G);if(!n){const n=ee(t.value,t);if(!n.disabled){const t={options:n,handler:Q(e,n),isPending:!1,timeoutId:null};M(e,G,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const o=ee(t.value,t);o.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),J(e,n.options),O(e,G)):!o.disabled&&n.options.disabled&&(n.handler=Q(e,o),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=o},unmounted(e){const t=P(e,G);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),J(e,t.options),O(e,G))}}),ne=w({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=oe(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const l=t=>{le(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,l);const r={capture:n.capture,passive:!n.prevent};$(document,t,l,r)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,l=oe(t.value);if(o.disabled!==l.disabled)if(l.disabled)n.handlers.forEach((e,t)=>{A(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{le(e,t,l)&&(l.stop&&t.stopPropagation(),l.prevent&&t.preventDefault(),l.handler(t))};l.events.forEach(e=>{const o=t();n.handlers.set(e,o),$(document,e,o,{capture:l.capture,passive:!l.prevent})})}n.options=l},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{A(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function oe(e){var t,n,o,l,r;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(l=e.stop)&&l,prevent:null!=(r=e.prevent)&&r},e)}function le(e,t,n){var o;const l=t.target;if(e.contains(l))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():z(e);if(t&&(t===l||t.contains(l)))return!1}return!0}function re(e){return __async(this,null,function*(){if(y())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const ie=w({name:"copy",ssr:!1,mounted(e,t){const n=se(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,l,r;const i=o.options.value;if(i)try{if(!(yield re(i)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,i),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:i}}))}catch(t){const n=t;null==(r=(l=o.options).onError)||r.call(l,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=se(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function se(e){return"string"==typeof e?{value:e}:e}function ae(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function ue(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function ce(e){var t,n,o,l;return"object"==typeof e&&null!==e&&"target"in e?{target:e.target,format:null!=(t=e.format)?t:"hh:mm:ss",onComplete:e.onComplete,onTick:e.onTick,interval:null!=(n=e.interval)?n:1e3,showMilliseconds:null!=(o=e.showMilliseconds)&&o,autoStart:null==(l=e.autoStart)||l,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const de=w({name:"countdown",ssr:!0,mounted(e,t){const n=ce(t.value),o={options:n,targetTime:ae(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=o,!1!==n.autoStart?pe(e,o):fe(e,o)},updated(e,t){const n=e.__countdown,o=ce(t.value),l=ae(o.target);l!==n.targetTime?(n.targetTime=l,n.options=o,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||pe(e,n)):n.options=o},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function pe(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,fe(e,t),function(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(fe(e,t),t.options.onTick){const e=ue(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function fe(e,t){const n=function(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}(ue(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function ve(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const me=w({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=ve(t.value,t),o=V(t.modifiers)||U(e),l=q(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,l),e.__debounce={debouncedFn:l,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=ve(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=q(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function he(e){if(e.type.startsWith("touch")){const t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function ge(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}function ye(e){var t,n,o;return void 0===e||!0===e?{axis:"both",constrain:!1,disabled:!1}:!1===e?{axis:"both",constrain:!1,disabled:!0}:{axis:null!=(t=e.axis)?t:"both",constrain:null!=(n=e.constrain)&&n,boundary:e.boundary,handle:e.handle,disabled:null!=(o=e.disabled)&&o,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const be=w({name:"draggable",ssr:!1,mounted(e,t){const n=ye(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const o={options:n,isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,initialLeft:0,initialTop:0,boundaryWidth:0,boundaryHeight:0,elWidth:0,elHeight:0,handleEl:n.handle?e.querySelector(n.handle):null,moveHandler:null,endHandler:null};e.__draggable=o;const l=o.handleEl||e;function r(t){var n,l,r;if(o.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:i,clientY:s}=he(t);o.isDragging=!0,o.startX=i,o.startY=s;const{x:a,y:u}=ge(e.style.transform);if(o.offsetX=a,o.offsetY=u,o.options.constrain||o.options.boundary){const t=o.options.boundary?function(e,t){var n,o;if(!t)return null;if("function"==typeof t){const e=t();return null!=(n=null==e?void 0:e.getBoundingClientRect())?n:null}if("string"==typeof t){const e=document.querySelector(t);return null!=(o=null==e?void 0:e.getBoundingClientRect())?o:null}return t.getBoundingClientRect()}(0,o.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();o.initialLeft=n.left-t.left,o.initialTop=n.top-t.top,o.boundaryWidth=t.width,o.boundaryHeight=t.height,o.elWidth=n.width,o.elHeight=n.height}}e.classList.add("v-draggable--dragging"),o.moveHandler=t=>{var n,l;if(!o.isDragging)return;const{clientX:r,clientY:i}=he(t);let s=r-o.startX,a=i-o.startY;"x"===o.options.axis?a=0:"y"===o.options.axis&&(s=0),o.options.grid&&(s=Math.round(s/o.options.grid[0])*o.options.grid[0],a=Math.round(a/o.options.grid[1])*o.options.grid[1]);let u=o.offsetX+s,c=o.offsetY+a;if(o.options.constrain||o.options.boundary){const e=o.initialLeft+s,t=o.initialTop+a,n=o.boundaryWidth-o.elWidth,l=o.boundaryHeight-o.elHeight,r=Math.max(0,Math.min(e,n)),i=Math.max(0,Math.min(t,l));u=o.offsetX+(r-o.initialLeft),c=o.offsetY+(i-o.initialTop)}e.style.transform=`translate(${u}px, ${c}px)`,null==(l=(n=o.options).onDrag)||l.call(n,{x:u,y:c},t)},o.endHandler=()=>{var t,n;if(!o.isDragging)return;o.isDragging=!1,e.classList.remove("v-draggable--dragging"),o.moveHandler&&(document.removeEventListener("mousemove",o.moveHandler),document.removeEventListener("touchmove",o.moveHandler)),o.endHandler&&(document.removeEventListener("mouseup",o.endHandler),document.removeEventListener("touchend",o.endHandler));const{x:l,y:r}=ge(e.style.transform);null==(n=(t=o.options).onEnd)||n.call(t,{x:l,y:r},new MouseEvent("mouseup"))},document.addEventListener("mousemove",o.moveHandler),document.addEventListener("touchmove",o.moveHandler,{passive:!1}),document.addEventListener("mouseup",o.endHandler),document.addEventListener("touchend",o.endHandler),null==(r=(l=o.options).onStart)||r.call(l,{x:o.offsetX,y:o.offsetY},t)}l.addEventListener("mousedown",r),l.addEventListener("touchstart",r,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=ye(t.value),n.options.handle&&(n.handleEl=e.querySelector(n.options.handle)))},unmounted(e){const t=e.__draggable;t&&(t.moveHandler&&(document.removeEventListener("mousemove",t.moveHandler),document.removeEventListener("touchmove",t.moveHandler)),t.endHandler&&(document.removeEventListener("mouseup",t.endHandler),document.removeEventListener("touchend",t.endHandler)),delete e.__draggable)}}),we=w({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=Ee(t.value);_e(e,n);const o={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{o.expanded?(_e(e,n),o.expanded=!1):(e.textContent=o.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",o.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",o.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&xe(e))&&(e.title=o.originalText),e.__ellipsis=o},updated(e,t){const n=e.__ellipsis;if(!n){const n=Ee(t.value);return void _e(e,n)}const o=Ee(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==o.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),o.expandable){const t=()=>{n.expanded?(_e(e,o),n.expanded=!1):(e.textContent=n.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",n.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",n.clickHandler=t}else e.style.cursor="";n.options=o,n.expanded||_e(e,o),"always"===o.titleBehavior?e.title=n.originalText:"auto"===o.titleBehavior?e.title=xe(e)?n.originalText:"":e.removeAttribute("title")},unmounted(e){const t=e.__ellipsis;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.removeProperty("-webkit-line-clamp"),e.style.removeProperty("-webkit-box-orient"),e.style.removeProperty("display"),e.style.removeProperty("overflow"),e.style.removeProperty("text-overflow"),e.style.removeProperty("white-space"),e.style.removeProperty("cursor"),delete e.__ellipsis)}});function _e(e,t){const n=t.lines||1;1===n?(e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap"):(e.style.display="-webkit-box",e.style.overflow="hidden",e.style.webkitBoxOrient="vertical",e.style.webkitLineClamp=String(n))}function xe(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function Ee(e){var t,n,o,l;return"number"==typeof e?{lines:e,ellipsis:"...",expandable:!1,titleBehavior:"auto"}:{lines:null!=(t=null==e?void 0:e.lines)?t:1,ellipsis:null!=(n=null==e?void 0:e.ellipsis)?n:"...",expandable:null!=(o=null==e?void 0:e.expandable)&&o,titleBehavior:null!=(l=null==e?void 0:e.titleBehavior)?l:"auto"}}const Le=new Set(["input","textarea","select","button"]);const Te=w({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!f())return;const n=ke(t.value);if(!n.focus||!function(e){if(!f())return!1;const t=e.tagName.toLowerCase();if(Le.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},l=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",l),e.__focus={options:n,handleFocus:o,handleBlur:l,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=ke(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const l=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,l=Object.keys(n),r=Object.keys(o);return l.length===r.length&&l.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&l&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function ke(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}const Ce={esc:"escape",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",enter:"enter",tab:"tab",delete:"delete",backspace:"backspace",insert:"insert",home:"home",end:"end",pagedown:"pagedown",pageup:"pageup",f1:"f1",f2:"f2",f3:"f3",f4:"f4",f5:"f5",f6:"f6",f7:"f7",f8:"f8",f9:"f9",f10:"f10",f11:"f11",f12:"f12"},Se=new Set(["ctrl","alt","shift","meta"]);function De(e){const t=e.toLowerCase();return Ce[t]||t}function Ie(e){const t=e.toLowerCase().split(/[+.]/),n=[];let o="";for(const e of t)Se.has(e)?n.push(e):o=De(e);return{key:o,modifiers:n}}function Me(e,t){if(De(e.key)!==t.key)return!1;const n=new Set;if(e.ctrlKey&&n.add("ctrl"),e.altKey&&n.add("alt"),e.shiftKey&&n.add("shift"),e.metaKey&&n.add("meta"),n.size!==t.modifiers.size)return!1;for(const e of t.modifiers)if(!n.has(e))return!1;return!0}function Pe(e,t,n,o={}){var l,r,i;return{key:De(e),modifiers:new Set(t),handler:n,prevent:null==(l=o.prevent)||l,stop:null==(r=o.stop)||r,disabled:null!=(i=o.disabled)&&i}}function Oe(e,t,n){if(t){const o=t.toLowerCase();let l;const r=[];if(Se.has(o)){r.push(o);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)?r.push(t):l=De(e)}}else{const e=Ie(t);l=e.key,r.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();Se.has(t)&&r.push(t)}}return[Pe(l,r,"function"==typeof e?e:e.handler)]}if("function"==typeof e)return console.warn('[Directix] v-hotkey: hotkey definition required (use v-hotkey:ctrl.s="handler")'),[];if(Array.isArray(e))return e.map(e=>Pe(e.key,e.modifiers||[],e.handler,{prevent:e.prevent,stop:e.stop,disabled:e.disabled}));if("object"==typeof e&&null!==e){if("handler"in e&&"function"==typeof e.handler){const t=e;return[Pe(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,o]of Object.entries(e)){const{key:e,modifiers:l}=Ie(n),r="function"==typeof o?o:o.handler,i="object"==typeof o?o:{};t.push(Pe(e,l,r,i))}return t}return[]}function ze(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=function(e){return t=>{for(const n of e.entries)if(!n.disabled&&Me(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const He=w({name:"hotkey",ssr:!0,mounted(e,t){ze(e,Oe(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,o=Oe(t.value,t.arg,t.modifiers);n?n.entries=o:ze(e,o)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});const $e="hover";function Ae(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function Ye(e,t,n){var o,l;const{options:r}=t;r.class&&e.classList.add(r.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=r.onEnter)||o.call(r,n),null==(l=r.handler)||l.call(r,!0,n)}function Re(e,t,n){var o,l;const{options:r}=t;r.class&&e.classList.remove(r.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=r.onLeave)||o.call(r,n),null==(l=r.handler)||l.call(r,!1,n)}const Xe=w({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=Ae(t.value);if(n.disabled||!f())return;const o=function(){const e=new Set,t=new Set;return{setTimeout(t,n){const o=setTimeout(()=>{e.delete(o),t()},n);return e.add(o),o},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const o=setInterval(e,n);return t.add(o),o},clearInterval(e){clearInterval(e),t.delete(e)},clearAll(){e.forEach(e=>clearTimeout(e)),t.forEach(e=>clearInterval(e)),e.clear(),t.clear()},hasActive:()=>e.size>0||t.size>0}}();let l=!1;const r={options:n,isHovering:!1,timer:o,cleanup:null};r.cleanup=function(e,t,n=!1){return Object.entries(t).forEach(([t,o])=>{e.addEventListener(t,o,"boolean"==typeof n?n:X(n))}),()=>{Object.entries(t).forEach(([t,o])=>{e.removeEventListener(t,o,"boolean"==typeof n?n:X(n))})}}(e,{mouseenter:t=>{const i=t;o.clearAll(),l||(n.enterDelay&&n.enterDelay>0?o.setTimeout(()=>{l=!0,r.isHovering=!0,Ye(e,r,i)},n.enterDelay):(l=!0,r.isHovering=!0,Ye(e,r,i)))},mouseleave:t=>{const i=t;o.clearAll(),l&&(n.leaveDelay&&n.leaveDelay>0?o.setTimeout(()=>{l=!1,r.isHovering=!1,Re(e,r,i)},n.leaveDelay):(l=!1,r.isHovering=!1,Re(e,r,i)))}}),M(e,$e,r)},updated(e,t){const n=P(e,$e);if(!n)return;const o=Ae(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){var t;const n=P(e,$e);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),O(e,$e))}}),Ne={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let Ve=9999;function Ue(e,t,n,o){return Math.sqrt(__pow(n-e,2)+__pow(o-t,2))}function Be(e,t,n){return Math.max(t,Math.min(n,e))}function Fe(e,t){var n,o,l,r,i,s,a,u,c,d;const p="IMG"===t.tagName?t.src:void 0,f=t.getAttribute("data-preview")||void 0,v="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:f,alt:v,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:Ne.minScale,maxScale:Ne.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||f,alt:(null==e?void 0:e.alt)||v,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(o=null==e?void 0:e.closeOnClickOutside)||o,closeOnEsc:null==(l=null==e?void 0:e.closeOnEsc)||l,showCloseButton:null==(r=null==e?void 0:e.showCloseButton)||r,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(i=null==e?void 0:e.enablePinchZoom)||i,enableDoubleTap:null==(s=null==e?void 0:e.enableDoubleTap)||s,enableSwipeClose:null==(a=null==e?void 0:e.enableSwipeClose)||a,showZoomIndicator:null==(u=null==e?void 0:e.showZoomIndicator)||u,minScale:null!=(c=null==e?void 0:e.minScale)?c:Ne.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:Ne.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const je=w({name:"image-preview",ssr:!1,mounted(e,t){const n=Fe(t.value,e),o={options:n,overlay:null,imageContainer:null,image:null,isOpen:!1,transform:{scale:1,translateX:0,translateY:0},gesture:{isDragging:!1,startX:0,startY:0,startDistance:0,startScale:1,lastTapTime:0,swipeStartY:0},handlers:{click:()=>{},esc:null,touchStart:null,touchMove:null,touchEnd:null,mouseDown:null,mouseMove:null,mouseUp:null,wheel:null}};if(e.__imagePreview=o,n.disabled)return;e.style.cursor="zoom-in";const l=function(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:o,translateX:l,translateY:r}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${l}px, ${r}px) scale(${o})`;const i=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");i&&(i.textContent=`${Math.round(100*o)}%`,i.style.opacity="1",clearTimeout(i._hideTimer),i._hideTimer=setTimeout(()=>{i.style.opacity="0"},Ne.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=Ne.minScale,maxScale:o=Ne.maxScale}=e.options;return Be(t,n,o)},constrainTranslate:(t,n)=>{const{scale:o}=e.transform;if(!e.image||o<=1)return{x:0,y:0};const l=e.image.getBoundingClientRect(),r=l.width*(o-1)/2,i=l.height*(o-1)/2;return{x:Be(t,-r,r),y:Be(n,-i,i)}}}}(o),r=()=>{o.isOpen&&o.overlay&&(o.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!o.overlay)return;o.overlay.remove(),o.overlay=null,o.imageContainer=null,o.image=null,o.isOpen=!1,o.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=o;n.esc&&document.removeEventListener("keydown",n.esc),n.touchStart&&document.removeEventListener("touchstart",n.touchStart),n.touchMove&&document.removeEventListener("touchmove",n.touchMove),n.touchEnd&&document.removeEventListener("touchend",n.touchEnd),n.mouseDown&&document.removeEventListener("mousedown",n.mouseDown),n.mouseMove&&document.removeEventListener("mousemove",n.mouseMove),n.mouseUp&&document.removeEventListener("mouseup",n.mouseUp),n.wheel&&document.removeEventListener("wheel",n.wheel),null==(t=(e=o.options).onClose)||t.call(e)},Ne.animationDuration))},i=function(e,t,n){const{updateTransform:o,resetTransform:l,constrainScale:r,constrainTranslate:i}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:l,transform:i,options:s}=e;if(1===t.touches.length){if(!1!==s.enableDoubleTap&&n-l.lastTapTime<Ne.tapTimeout)return t.preventDefault(),i.scale=i.scale>1?1:r(Ne.doubleTapZoom),l.lastTapTime=0,void o(!0);l.lastTapTime=n,l.isDragging=!0,l.startX=t.touches[0].clientX-i.translateX,l.startY=t.touches[0].clientY-i.translateY,l.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==s.enablePinchZoom&&(l.isDragging=!1,l.startDistance=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),l.startScale=i.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:l,options:s}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,r=t.touches[0].clientY-n.startY,s=i(e,r);l.translateX=s.x,l.translateY=s.y,o(!1)}else if(2===t.touches.length&&!1!==s.enablePinchZoom){const e=Ue(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);l.scale=r(n.startScale*(e/n.startDistance)),o(!1)}},handleTouchEnd:t=>{const{gesture:o,transform:r,options:i}=e;o.isDragging=!1,!1!==i.enableSwipeClose&&1===t.changedTouches.length&&r.scale<=1&&t.changedTouches[0].clientY-o.swipeStartY<-100?n():r.scale<1&&l()},handleMouseDown:t=>{e.imageContainer&&(e.gesture.isDragging=!0,e.gesture.startX=t.clientX-e.transform.translateX,e.gesture.startY=t.clientY-e.transform.translateY,e.imageContainer.style.cursor="grabbing")},handleMouseMove:t=>{if(!e.gesture.isDragging||!e.imageContainer)return;const n=t.clientX-e.gesture.startX,l=t.clientY-e.gesture.startY,r=i(n,l);e.transform.translateX=r.x,e.transform.translateY=r.y,o(!1)},handleMouseUp:()=>{e.gesture.isDragging=!1,e.imageContainer&&(e.imageContainer.style.cursor="grab")},handleWheel:t=>{if(!e.imageContainer||!1===e.options.enablePinchZoom)return;t.preventDefault();const n=t.deltaY>0?.9:1.1;e.transform.scale=r(e.transform.scale*n),o(!1),e.transform.scale<.8&&setTimeout(l,100)}}}(o,l,r),s=()=>{var e,t,n;if(o.isOpen||o.options.disabled)return;const{overlay:s,imageContainer:a,image:u}=function(e){var t;const n=null!=(t=e.zIndex)?t:++Ve,o=document.createElement("div");o.className="v-image-preview-overlay",e.class&&o.classList.add(e.class),Object.assign(o.style,{position:"fixed",inset:"0",background:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:String(n),cursor:"zoom-out",opacity:"0",transition:"opacity 0.3s",touchAction:"none",overflow:"hidden"});const l=document.createElement("div");Object.assign(l.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const r=document.createElement("img");if(r.src=e.previewSrc||e.src||"",r.alt=e.alt||"",Object.assign(r.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),r.addEventListener("dragstart",e=>e.preventDefault()),l.appendChild(r),!1!==e.showCloseButton){const e=document.createElement("button");e.className="v-image-preview-close",e.innerHTML="×",e.setAttribute("aria-label","Close preview"),Object.assign(e.style,{position:"fixed",top:"16px",right:"16px",width:"44px",height:"44px",border:"none",background:"rgba(255, 255, 255, 0.15)",color:"white",fontSize:"28px",cursor:"pointer",borderRadius:"50%",transition:"background 0.2s, transform 0.2s",zIndex:String(n+1),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"});const t=(t,n)=>{e.style.background=t,e.style.transform=n};e.addEventListener("mouseenter",()=>t("rgba(255, 255, 255, 0.25)","scale(1.1)")),e.addEventListener("mouseleave",()=>t("rgba(255, 255, 255, 0.15)","scale(1)")),e.addEventListener("touchstart",()=>t("rgba(255, 255, 255, 0.35)","scale(1.15)"),{passive:!0}),e.addEventListener("touchend",()=>t("rgba(255, 255, 255, 0.15)","scale(1)"),{passive:!0}),o.appendChild(e)}if(!1!==e.showZoomIndicator){const e=document.createElement("div");e.className="v-image-preview-zoom",e.textContent="100%",Object.assign(e.style,{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.6)",color:"white",padding:"8px 16px",borderRadius:"20px",fontSize:"14px",fontWeight:"500",opacity:"0",transition:"opacity 0.3s",zIndex:String(n+1),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"}),o.appendChild(e)}const i=document.createElement("div");return i.className="v-image-preview-hint",i.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(i.style,{position:"fixed",bottom:"60px",left:"50%",transform:"translateX(-50%)",color:"rgba(255, 255, 255, 0.6)",fontSize:"12px",opacity:"1",transition:"opacity 0.5s",zIndex:String(n+1),pointerEvents:"none"}),o.appendChild(i),setTimeout(()=>i.style.opacity="0",Ne.hintDuration),o.appendChild(l),{overlay:o,imageContainer:l,image:r}}(o.options);o.overlay=s,o.imageContainer=a,o.image=u,o.isOpen=!0,document.body.appendChild(s),document.body.style.overflow="hidden",requestAnimationFrame(()=>s.style.opacity="1"),o.handlers.touchStart=i.handleTouchStart,o.handlers.touchMove=i.handleTouchMove,o.handlers.touchEnd=i.handleTouchEnd,o.handlers.mouseDown=i.handleMouseDown,o.handlers.mouseMove=i.handleMouseMove,o.handlers.mouseUp=i.handleMouseUp,o.handlers.wheel=i.handleWheel,s.addEventListener("touchstart",i.handleTouchStart,{passive:!1}),s.addEventListener("touchmove",i.handleTouchMove,{passive:!1}),s.addEventListener("touchend",i.handleTouchEnd,{passive:!0}),u.addEventListener("mousedown",i.handleMouseDown),document.addEventListener("mousemove",i.handleMouseMove),document.addEventListener("mouseup",i.handleMouseUp),s.addEventListener("wheel",i.handleWheel,{passive:!1}),null==(e=s.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),r()}),!1!==o.options.closeOnClickOutside&&s.addEventListener("click",()=>{o.transform.scale<=1?r():l.resetTransform()}),!1!==o.options.closeOnEsc&&(o.handlers.esc=e=>{"Escape"===e.key&&(o.transform.scale>1?l.resetTransform():r())},document.addEventListener("keydown",o.handlers.esc)),null==(n=(t=o.options).onOpen)||n.call(t)};o.handlers.click=s,e.addEventListener("click",s)},updated(e,t){const n=e.__imagePreview;n&&(n.options=Fe(t.value,e),e.style.cursor=n.options.disabled?"":"zoom-in")},unmounted(e){const t=e.__imagePreview;t&&(e.removeEventListener("click",t.handlers.click),t.isOpen&&t.overlay&&(t.overlay.remove(),document.body.style.overflow=""),t.handlers.esc&&document.removeEventListener("keydown",t.handlers.esc),t.handlers.touchStart&&document.removeEventListener("touchstart",t.handlers.touchStart),t.handlers.touchMove&&document.removeEventListener("touchmove",t.handlers.touchMove),t.handlers.touchEnd&&document.removeEventListener("touchend",t.handlers.touchEnd),t.handlers.mouseDown&&document.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp),t.handlers.wheel&&document.removeEventListener("wheel",t.handlers.wheel),delete e.__imagePreview)}});function We(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const qe=w({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=We(t.value);if(n.disabled||!f())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else o=H(e);const l={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(l.isLoading||l.options.disabled||l.options.loading)return;if(l.throttleTimer)return;l.throttleTimer=setTimeout(()=>{l.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,l=o.scrollTop,r=o.scrollHeight,i=o.clientHeight;return l+i>=r-n}(o,0,n.distance||0);t&&(yield Ze(l,e))})};e.__infiniteScroll=l,n.useIntersection&&h()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield Ze(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,l):$(o,"scroll",l.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=We(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),A(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function Ze(e,t){return __async(this,null,function*(){var n,o,l,r,i,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(r=(l=e.options).onError)||r.call(l,t)}finally{e.isLoading=!1,null==(s=(i=e.options).onLoadEnd)||s.call(i),t.classList.remove("v-infinite-scroll--loading")}})}const Ke="__intersect";function Ge(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function Je(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var l,r,i,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(l=n.handler)||l.call(n,a,t.observer),null==(r=n.onChange)||r.call(n,o,a),o?(null==(i=n.onEnter)||i.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const Qe=w({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=Ge(t.value);if(n.disabled||!f()||!h())return void(h()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=Je(e,o,n),e[Ke]=o,o.observer.observe(e)},updated(e,t){var n,o,l;const r=e[Ke];if(!r)return;const i=Ge(t.value),s=i.root!==r.options.root||i.rootMargin!==r.options.rootMargin||i.threshold!==r.options.threshold;i.disabled!==r.options.disabled&&(i.disabled?null==(n=r.observer)||n.disconnect():null==(o=r.observer)||o.observe(e)),s&&(null==(l=r.observer)||l.disconnect(),r.observer=Je(e,r,i),r.observer.observe(e)),r.options=i},unmounted(e){var t;const n=e[Ke];n&&(null==(t=n.observer)||t.disconnect(),delete e[Ke])}});let et=null;function tt(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function nt(e,t){e.dataset.lazyState=t}function ot(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;nt(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;tt(e,t.options.src),nt(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>ot(e),1e3*t.attempt):(t.options.error&&tt(e,t.options.error),nt(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function lt(e){const t=e.__lazy;var n;if(t)if(h())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,et||(et=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(ot(e.target),null==et||et.unobserve(e.target))})},{rootMargin:`${n}px`}),et));t.observer=o,o.observe(e)}else ot(e)}function rt(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):et&&et.unobserve(e))}function it(e){return"string"==typeof e?{src:e}:e||{}}const st=w({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=it(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");nt(e,"pending"),n.placeholder&&tt(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,lt(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=it(t.value);o.disabled?rt(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(nt(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&tt(e,o.placeholder),lt(e)))},unmounted(e){rt(e),delete e.__lazy}});function at(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const ut=w({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!f())return;const n=at(t.value);if(n.disabled)return;const o=getComputedStyle(e),l={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=l,"static"===o.position&&(e.style.position="relative"),n.value&&ct(e,l)},updated(e,t){const n=e.__loading;if(!n)return;const o=at(t.value);if(o.disabled)dt(e,n);else{if(o.value&&!n.options.value?ct(e,n):!o.value&&n.options.value&&dt(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(dt(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function ct(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function dt(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function pt(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const ft=w({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=pt(t.value);if(n.disabled||!f())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const l=e;n.prevent&&l.preventDefault(),n.stop&&l.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const r=R(l);if(o.startPos={x:r.x,y:r.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,l),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(l)},n.duration)},o.endHandler=e=>{var t;const l=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,l)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const l=e,r=R(l);var i,s;(i=o.startPos,s={x:r.x,y:r.y},Math.sqrt(__pow(s.x-i.x,2)+__pow(s.y-i.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,l),o.startTime=0)},e.__longPress=o,$(e,"mousedown",o.startHandler),$(e,"mouseup",o.endHandler),$(e,"mouseleave",o.endHandler),$(e,"mousemove",o.moveHandler),$(e,"touchstart",o.startHandler,{passive:!n.prevent}),$(e,"touchend",o.endHandler),$(e,"touchcancel",o.endHandler),$(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(pt(t.value).disabled||(e.__longPress=null))}n.options=pt(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),A(e,"mousedown",t.startHandler),A(e,"mouseup",t.endHandler),A(e,"mouseleave",t.endHandler),A(e,"mousemove",t.moveHandler),A(e,"touchstart",t.startHandler),A(e,"touchend",t.endHandler),A(e,"touchcancel",t.endHandler),A(e,"touchmove",t.moveHandler),delete e.__longPress)}});function vt(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function mt(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const ht=w({name:"lowercase",ssr:!0,mounted(e,t){const n=mt(t.value);if(L(e)){const t=x(e,n,e=>vt(e,n));e.__lowercaseCleanup=t}else E(e,e=>vt(e,n))},updated(e,t){const n=mt(t.value);L(e)?n.onInput&&(e.value=vt(e.value,n)):E(e,e=>vt(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),gt="__mask",yt={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function bt(e,t){return[...e].map(e=>{const n=yt[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function wt(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function _t(e,t,n,o){let l="",r=0;for(const i of t){if(r>=e.length){l+=i.isLiteral?i.placeholder:o?n:"";continue}const t=e[r];i.isLiteral?(t===i.placeholder&&r++,l+=i.placeholder):i.pattern.test(t)?(l+=t,r++):t===n?(l+=o?n:"",r++):r++}return l}function xt(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function Et(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const Lt=w({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=wt(t.value);if(o.disabled||!f())return;const l=o.placeholder||"_",r=bt(o.mask,l),i=e=>{var t,n,i;const s=e.target,a=s.value,u=s.selectionStart||0,c=_t(a,r,l,null==(t=o.showPlaceholder)||t);if(c!==a)return s.value=c,s.setSelectionRange(Et(r,u),Et(r,u)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,c,function(e,t,n){let o="";for(let l=0;l<e.length&&l<t.length;l++)t[l].isLiteral||e[l]===n||(o+=e[l]);return o}(c,r,l)),xt(c,r,l)&&(null==(i=o.onComplete)||i.call(o,c))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=_t("",r,l,!0))},a=()=>{o.showMaskOnBlur||xt(e.value,r,l)||!o.clearIncomplete||(e.value="")};$(e,"input",i),$(e,"focus",s),$(e,"blur",a),e[gt]={options:o,tokens:r,placeholder:l,inputHandler:i,focusHandler:s,blurHandler:a},e.value&&(e.value=_t(e.value,r,l,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[gt];n&&(n.options=wt(t.value),n.tokens=bt(n.options.mask,n.placeholder))},unmounted(e){const t=e[gt];t&&(A(e,"input",t.inputHandler),A(e,"focus",t.focusHandler),A(e,"blur",t.blurHandler),delete e[gt])}});function Tt(e,t){const{precision:n=0,separator:o=",",decimal:l=".",prefix:r="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),r+c+i}function kt(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),o=Number.parseFloat(n);return isNaN(o)?null:o}function Ct(e,t){var n;let o=e;return!(null==(n=t.allowNegative)||n)&&o<0&&(o=Math.abs(o)),void 0!==t.min&&(o=Math.max(t.min,o)),void 0!==t.max&&(o=Math.min(t.max,o)),o}function St(e,t,n){const{decimal:o=".",prefix:l=""}=t;let r=!1;const i=()=>{if(r)return;const i=e.value,s=e.selectionStart||0;if(!i||"-"===i)return;const a=kt(i,o);if(null===a)return r=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(r=!1);const u=Ct(a,t),c=n(u,t);if(c!==i){r=!0;const t=function(e,t,n,o=0){let l=0,r=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&l++;for(let e=o;e<t.length;e++)if(/\d/.test(t[e])&&r++,r>=l)return e+1;return t.length}(i,c,s,l.length);e.value=c,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),r=!1}},s=()=>{if(!e.value||"-"===e.value)return;const l=kt(e.value,o);if(null!==l){const o=Ct(l,t),i=n(o,t);r=!0,e.value=i,e.dispatchEvent(new Event("input",{bubbles:!0})),r=!1}};if(e.addEventListener("input",i),e.addEventListener("blur",s),e.value){const l=kt(e.value,o);if(null!==l){const o=n(Ct(l,t),t);r=!0,e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})),r=!1}}return()=>{e.removeEventListener("input",i),e.removeEventListener("blur",s)}}function Dt(e,t){const{precision:n=2,separator:o=",",decimal:l=".",symbol:r="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),"before"===i?r+c:c+r}const It=w({name:"money",ssr:!0,mounted(e,t){var n,o,l;const r="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(r.precision=null!=(o=r.precision)?o:2,"INPUT"===e.tagName||"TEXTAREA"===e.tagName){const{symbol:t="$",symbolPosition:n="before"}=r,o="before"===n?t:"",l=St(e,__spreadProps(__spreadValues({},r),{prefix:o}),Dt);e.__money={options:r,cleanup:l},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,r.decimal||".");if(null!==e){const n=Dt(Ct(e,r),r);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(l=e.textContent)?void 0:l.trim();t&&(n=kt(t,r.decimal||"."))}null!==n&&(e.textContent=Dt(Ct(n,r),r))}},updated(e,t){var n,o;const l="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};l.precision=null!=(o=l.precision)?o:2;const r=e.__money;if(r)r.options=l;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Dt(Ct(n,l),l))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function Mt(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const Pt=w({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=Mt(t.value);if(n.disabled||!f())return;if(!b())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=Mt(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),Ot=w({name:"number",ssr:!0,mounted(e,t){var n,o;const l="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if("INPUT"===e.tagName||"TEXTAREA"===e.tagName){const t=St(e,l,Tt);e.__number={options:l,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=kt(t.value,l.decimal||".");if(null!==e){const n=Tt(Ct(e,l),l);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if("number"==typeof t.value)n=t.value;else if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(o=e.textContent)?void 0:o.trim();t&&(n=kt(t,l.decimal||"."))}null!==n&&(e.textContent=Tt(Ct(n,l),l))}},updated(e,t){var n;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},l=e.__number;if(l)l.options=o;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;"number"==typeof t.value?n=t.value:t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Tt(Ct(n,o),o))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}}),zt="__permission";let Ht=null;function $t(e,t){return t.includes("*")||t.includes(e)}function At(e,t){var n,o;const l=function(e){return e[zt]||(e[zt]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[zt]}(e);l.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const r=function(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!Ht)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=Ht.getPermissions(),o=(null==(t=Ht.getRoles)?void 0:t.call(Ht))||[],l=Ht.roleMap||{},r=Array.isArray(e.value)?e.value:[e.value];function i(e){if(e in l)return o.includes(e);if($t(e,n))return!0;for(const t of o)if($t(e,l[t]||[]))return!0;return!1}return"every"===(e.mode||"some")?r.every(i):r.some(i)}(l.options);null==(o=(n=l.options).onChange)||o.call(n,r);const i=l.options.action||"remove";r?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,i,l):function(e,t,n){var o,l;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(l=e.parentNode)||l.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,i,l)}const Yt=w({name:"permission",ssr:!0,mounted(e,t){At(e,t)},updated(e,t){At(e,t)},unmounted(e){!function(e){const t=e[zt];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[zt]}(e)}}),Rt=w({name:"print",ssr:!0,mounted(e,t){const n=Xt(t.value),o={options:n,clickHandler:null};if(e.__print=o,n.immediate)return void setTimeout(()=>Nt(e,n),100);const l=()=>{Nt(e,o.options)};e.addEventListener("click",l),o.clickHandler=l,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const o=Xt(t.value);n.options=o},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function Xt(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function Nt(e,t){return __async(this,null,function*(){if(t.onBeforePrint){if(!1===t.onBeforePrint())return}const n=t.target?document.querySelector(t.target):e;n?(t.newWindow?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] v-print: Could not open print window");const o=Vt(e,t);n.document.open(),n.document.write(o),n.document.close(),yield Ut(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(n,t):yield function(e,t){return __async(this,null,function*(){var n,o,l;const r=document.createElement("iframe");r.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(r);const i=r.contentDocument||(null==(n=r.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(r);const s=Vt(e,t);i.open(),i.write(s),i.close(),yield Ut(i);try{null==(o=r.contentWindow)||o.focus(),null==(l=r.contentWindow)||l.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(r)},1e3)})}(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function Vt(e,t){let n="";if(document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls&&t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles){const e=Array.isArray(t.styles)?t.styles.join("\n"):t.styles;n+=`<style>${e}</style>`}n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||document.title||"Print",l=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${l}\n</body>\n</html>`}function Ut(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}const Bt={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function Ft(e){var t,n,o,l,r;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:60,maxDistance:null!=(n=e.maxDistance)?n:100,disabled:null!=(o=e.disabled)&&o,indicator:e.indicator,successDuration:null!=(l=e.successDuration)?l:500,errorDuration:null!=(r=e.errorDuration)?r:1e3,onStateChange:e.onStateChange}}function jt(e,t,n){var o;const l=null==(o=n.indicator)?void 0:o[t];e.textContent=l||Bt[t]}function Wt(e,t){var n,o;e.state!==t&&(e.state=t,jt(e.indicatorEl,t,e.options),null==(o=(n=e.options).onStateChange)||o.call(n,t))}function qt(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function Zt(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",Wt(e,"idle")}function Kt(e){return new Promise(t=>setTimeout(t,e))}function Gt(e){const{contentEl:t,options:n}=e;return{touchStart:o=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=o.touches[0].clientY,e.currentY=e.startY,Wt(e,"idle"))},touchMove:o=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=o.touches[0].clientY;const l=e.currentY-e.startY;if(l<=0)return void(t.style.transform&&(t.style.transition="",Zt(e)));o.preventDefault();const r=Math.min(.5*l,n.maxDistance),i=r/n.distance;t.style.transition="none",qt(e,r),Wt(e,i>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const o=e.currentY-e.startY,l=Math.min(.5*o,n.maxDistance);t.style.transition="","ready"===e.state&&l>=n.distance?function(e){__async(this,null,function*(){Wt(e,"loading");const t=e.options.distance;qt(e,t);try{yield e.options.handler(),Wt(e,"success"),yield Kt(e.options.successDuration)}catch(t){Wt(e,"error"),yield Kt(e.options.errorDuration)}finally{Zt(e)}})}(e):Zt(e)}}}function Jt(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function Qt(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const en=w({name:"pull-refresh",ssr:!1,mounted(e,t){const n=Ft(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const o=document.createElement("div");for(o.className="v-pull-refresh__content",o.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o);const l=function(){const e=document.createElement("div");return e.className="v-pull-refresh__indicator",e.style.cssText="\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\theight: 60px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tbackground: #f5f5f5;\n\t\tfont-size: 14px;\n\t\tcolor: #666;\n\t\tz-index: 10;\n\t\tpointer-events: none;\n\t\topacity: 0;\n\t\ttransition: opacity 0.2s ease;\n\t",e}();e.insertBefore(l,o);const r={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:l,contentEl:o,handlers:null};r.handlers=Gt(r),e.__pullRefresh=r,n.disabled||Jt(e,r.handlers),jt(l,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const o=n.options.disabled;n.options=Ft(t.value),jt(n.indicatorEl,n.state,n.options),n.options.disabled&&!o?Qt(e,n.handlers):!n.options.disabled&&o&&Jt(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(Qt(e,t.handlers),delete e.__pullRefresh)}});function tn(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const nn=w({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=tn(t.value);if(n.disabled||!f())return;"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,g())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:l}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),l={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(l),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(l))});o.fallbackIframe=t,e.__resizeCleanup=l}},updated(e,t){const n=e.__resize;n&&(n.options=tn(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function on(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const ln=w({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=on(t.value);if(n.disabled||!f())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple");const l={options:n,clickHandler:t=>{if(l.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),l=e.clientX-o.left,r=e.clientY-o.top,i=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${i}px;\n height: ${i}px;\n left: ${l-i/2}px;\n top: ${r-i/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,l.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,l=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${l})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${l})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,l.options))}};e.__ripple=l,$(e,"click",l.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=on(t.value))},unmounted(e){const t=e.__ripple;t&&(A(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}}),rn=["b","i","u","strong","em","br","p","span","div"],sn=["title","alt","href","src"],an=["script","iframe","object","embed","form","input","style","link","meta","base"],un=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function cn(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:rn,allowedAttributes:sn}:__spreadValues({allowedTags:rn,allowedAttributes:sn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function dn(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of an){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const l=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of un)e.removeAttribute(t);const r=e.getAttribute("href");if(r&&r.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),l="class"===o.name&&t.allowClass,r="id"===o.name&&t.allowId,i="style"===o.name&&t.allowStyles;n||l||r||i||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))l(t)};for(const e of Array.from(o.children))l(e);return o.innerHTML}const pn=w({name:"sanitize",ssr:!0,defaults:{allowedTags:rn,allowedAttributes:sn,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!f())return;const n=cn(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=dn(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=cn(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=dn(o,n.options))},unmounted(e){delete e.__sanitize}});function fn(e,t,n){let o=0,l=0,r=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,l=window.scrollY||document.documentElement.scrollTop,r=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,l=t.scrollTop,r=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:l,scrollLeftMax:r,scrollTopMax:i,progressX:r>0?o/r:0,progressY:i>0?l/i:0,directionX:o!==t?o>t?1:-1:0,directionY:l!==n?l>n?1:-1:0,container:e}}function vn(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const mn=w({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=vn(t.value);if(n.disabled||!f())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||H(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:l}=getComputedStyle(e),r=/(auto|scroll)/.test(t+n+l);o=r?e:H(e)}const l={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)l.pendingEvent=e,l.throttleTimer||(l.throttleTimer=setTimeout(()=>{if(l.pendingEvent){const e=fn(o,l.lastScrollLeft,l.lastScrollTop);l.lastScrollLeft=e.scrollLeft,l.lastScrollTop=e.scrollTop,n.handler(l.pendingEvent,e)}l.throttleTimer=null,l.pendingEvent=null},n.throttle));else{const t=fn(o,l.lastScrollLeft,l.lastScrollTop);l.lastScrollLeft=t.scrollLeft,l.lastScrollTop=t.scrollTop,n.handler(e,t)}}},r=fn(o,0,0);l.lastScrollLeft=r.scrollLeft,l.lastScrollTop=r.scrollTop,e.__scroll=l,$(o,"scroll",l.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=vn(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),A(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),hn="__sticky";function gn(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function yn(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function bn(e,t){if(t.options.disabled)return void wn(e,t);const n=parseFloat(yn(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),l=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;l&&!t.isSticky?function(e,t,n,o){var l,r,i;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(l=e.parentNode)||l.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=yn(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(i=(r=t.options).onChange)||i.call(r,!0)}(e,t,n,o.top):!l&&t.isSticky&&wn(e,t)}function wn(e,t){var n,o,l,r;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(r=(l=t.options).onChange)||r.call(l,!1))}const _n=w({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=gn(t.value);if(n.disabled||!f())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||H(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return H(e)}(e,n.container),l={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>bn(e,l),resizeHandler:()=>bn(e,l)};e.classList.add("v-sticky"),e[hn]=l,$(o,"scroll",l.scrollHandler,{passive:!0}),$(window,"resize",l.resizeHandler,{passive:!0}),bn(e,l)},updated(e,t){const n=e[hn];n&&(n.options=gn(t.value),bn(e,n))},unmounted(e){var t,n;const o=e[hn];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),A(o.container,"scroll",o.scrollHandler),A(window,"resize",o.resizeHandler),delete e[hn])}}),xn=["left","right","up","down"];function En(e){var t,n,o,l,r,i;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:30,maxTime:null!=(n=e.maxTime)?n:500,directions:null!=(o=e.directions)?o:[...xn],preventScrollOnSwipe:null==(l=e.preventScrollOnSwipe)||l,disabled:null!=(r=e.disabled)&&r,mouse:null==(i=e.mouse)||i,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function Ln(e,t,n,o,l,r){var i,s,a,u,c;const{options:d}=e;if(o>(null!=(i=d.maxTime)?i:500))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(s=d.threshold)?s:30))return;const p=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(t,n,null!=(a=d.directions)?a:xn);if(!p)return;d.preventScrollOnSwipe&&l.cancelable&&l.preventDefault(),null==(u=d.handler)||u.call(d,p,l);const f={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(c=f[p])||c.call(f),r.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:o}}))}function Tn(e,t){if(t.disabled)return null;e.style.touchAction="none",e.style.userSelect="none";const n={options:t,startX:0,startY:0,startTime:0,isActive:!1,handlers:null},o=function(e,t){return(n,o,l)=>{const r=n-t.startX,i=o-t.startY,s=Date.now()-t.startTime;Ln(t,r,i,s,l,e)}}(e,n);return n.handlers={touchStart:e=>{n.options.disabled||(n.startX=e.touches[0].clientX,n.startY=e.touches[0].clientY,n.startTime=Date.now(),n.isActive=!0)},touchMove:e=>{n.isActive&&!n.options.disabled&&n.options.preventScrollOnSwipe&&e.preventDefault()},touchEnd:e=>{if(!n.isActive||n.options.disabled)return;n.isActive=!1;const t=e.changedTouches[0];o(t.clientX,t.clientY,e)},mouseDown:e=>{n.options.disabled||(n.startX=e.clientX,n.startY=e.clientY,n.startTime=Date.now(),n.isActive=!0)},mouseUp:e=>{n.isActive&&!n.options.disabled&&(n.isActive=!1,o(e.clientX,e.clientY,e))}},n}function kn(e,t){var n;const{handlers:o}=t,l=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",o.touchStart,{passive:!0}),e.addEventListener("touchmove",o.touchMove,{passive:!1}),e.addEventListener("touchend",o.touchEnd),e.addEventListener("touchcancel",o.touchEnd),l&&(e.addEventListener("mousedown",o.mouseDown),e.addEventListener("mouseup",o.mouseUp),e.addEventListener("mouseleave",o.mouseUp))}function Cn(e,t){var n;const{handlers:o}=t,l=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",o.touchStart),e.removeEventListener("touchmove",o.touchMove),e.removeEventListener("touchend",o.touchEnd),e.removeEventListener("touchcancel",o.touchEnd),l&&(e.removeEventListener("mousedown",o.mouseDown),e.removeEventListener("mouseup",o.mouseUp),e.removeEventListener("mouseleave",o.mouseUp))}const Sn=w({name:"swipe",ssr:!1,mounted(e,t){const n=Tn(e,En(t.value));n&&(e.__swipe=n,kn(e,n))},updated(e,t){var n,o;const l=e.__swipe,r=En(t.value);if(!l){const t=Tn(e,r);return void(t&&(e.__swipe=t,kn(e,t)))}const i=l.options.disabled,s=null==(n=l.options.mouse)||n,a=null==(o=r.mouse)||o;l.options=r,r.disabled&&!i?Cn(e,l):!r.disabled&&i?kn(e,l):s!==a&&(s&&(e.removeEventListener("mousedown",l.handlers.mouseDown),e.removeEventListener("mouseup",l.handlers.mouseUp),e.removeEventListener("mouseleave",l.handlers.mouseUp)),a&&(e.addEventListener("mousedown",l.handlers.mouseDown),e.addEventListener("mouseup",l.handlers.mouseUp),e.addEventListener("mouseleave",l.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(Cn(e,t),delete e.__swipe)}});function Dn(e,t){const n=K(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const In=w({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=Dn(t.value,t),o=V(t.modifiers)||U(e),l=Z(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,l),e.__throttle={throttledFn:l,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=Dn(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=Z(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),Mn="8px 12px",Pn="#333",On="#fff",zn="6px",Hn="14px",$n="1.5",An="96px",Yn="320px",Rn="0 4px 12px rgba(0, 0, 0, 0.15)";let Xn=null;function Nn(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,o;const l=function(e){const t=document.createElement("div");t.className=`v-tooltip v-tooltip--${e.placement||"top"}`,e.class&&t.classList.add(e.class);const n=e.maxWidth?"number"==typeof e.maxWidth?`${e.maxWidth}px`:e.maxWidth:Yn;if(t.style.cssText=["position: absolute",`padding: ${Mn}`,`background: ${Pn}`,`color: ${On}`,`border-radius: ${zn}`,`font-size: ${Hn}`,`line-height: ${$n}`,`min-width: ${An}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${Rn}`,"pointer-events: none","opacity: 0","transition: opacity 0.2s ease",`z-index: ${e.zIndex||9999}`].join(";"),!1!==e.arrow){const e=document.createElement("div");e.className="v-tooltip__arrow",e.style.cssText="position: absolute; width: 8px; height: 8px; background: #333; transform: rotate(45deg);",t.appendChild(e)}const o=document.createElement("div");return o.className="v-tooltip__content",o.textContent=e.content,t.appendChild(o),t}(t.options);t.tooltip=l,(Xn||"undefined"==typeof document||(Xn=document.createElement("div"),Xn.id="directix-tooltip-container",Xn.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(Xn)),Xn).appendChild(l),requestAnimationFrame(()=>{!function(e,t,n,o){const l=t.getBoundingClientRect(),r=e.getBoundingClientRect();let i=0,s=0;switch(n){case"top":i=l.top-r.height-o,s=l.left+(l.width-r.width)/2;break;case"bottom":i=l.bottom+o,s=l.left+(l.width-r.width)/2;break;case"left":i=l.top+(l.height-r.height)/2,s=l.left-r.width-o;break;case"right":i=l.top+(l.height-r.height)/2,s=l.right+o}const a=window.innerWidth,u=window.innerHeight;s<0&&(s=8),s+r.width>a&&(s=a-r.width-8),i<0&&(i=8),i+r.height>u&&(i=u-r.height-8),e.style.top=`${i}px`,e.style.left=`${s}px`;const c=e.querySelector(".v-tooltip__arrow");if(c){const e=4;switch(n){case"top":Object.assign(c.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(c.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(c.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(c.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}(l,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{l.style.opacity="1"})}),t.isVisible=!0,null==(o=(n=t.options).onShow)||o.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function Vn(e){if(!e.isVisible)return;e.showTimeout&&(clearTimeout(e.showTimeout),e.showTimeout=null);const t=()=>{var t,n;e.tooltip&&(e.tooltip.style.opacity="0",setTimeout(()=>{var t;null==(t=e.tooltip)||t.remove(),e.tooltip=null},200)),e.isVisible=!1,null==(n=(t=e.options).onHide)||n.call(t)};e.options.hideDelay&&e.options.hideDelay>0?e.hideTimeout=setTimeout(t,e.options.hideDelay):t()}function Un(e,t){const{trigger:n="hover"}=t.options,o=()=>Nn(e,t),l=()=>Vn(t),r=()=>t.isVisible?l():o();switch(t.handlers={show:o,hide:l,toggle:r},n){case"hover":e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",l);break;case"click":e.addEventListener("click",r),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&l()});break;case"focus":e.addEventListener("focus",o),e.addEventListener("blur",l)}}function Bn(e){var t,n,o,l,r,i,s,a;return"string"==typeof e?{content:e,placement:"top",trigger:"hover"}:e?{content:e.content,placement:null!=(t=e.placement)?t:"top",trigger:null!=(n=e.trigger)?n:"hover",delay:null!=(o=e.delay)?o:0,hideDelay:null!=(l=e.hideDelay)?l:0,offset:null!=(r=e.offset)?r:8,class:e.class,arrow:null==(i=e.arrow)||i,disabled:null!=(s=e.disabled)&&s,maxWidth:e.maxWidth,zIndex:null!=(a=e.zIndex)?a:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function Fn(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const jn=w({name:"tooltip",ssr:!1,mounted(e,t){const n=Bn(t.value);if(n.disabled||!n.content)return;const o=Fn(n);e.__tooltip=o,Un(e,o),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,o=Bn(t.value);if(n){if("manual"===o.trigger){const t=n.options.disabled;return n.options=o,void(o.disabled&&!t?Vn(n):!o.disabled&&t&&Nn(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=o.content)}n.options=o}else if(!o.disabled&&o.content){const t=Fn(o);e.__tooltip=t,Un(e,t),"manual"===o.trigger&&Nn(e,t)}},unmounted(e){var t;const n=e.__tooltip;n&&(n.showTimeout&&clearTimeout(n.showTimeout),n.hideTimeout&&clearTimeout(n.hideTimeout),null==(t=n.tooltip)||t.remove(),function(e,t){const{show:n,hide:o,toggle:l,docHide:r}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),o&&(e.removeEventListener("mouseleave",o),e.removeEventListener("blur",o)),l&&e.removeEventListener("click",l),r&&document.removeEventListener("click",r)}(e,n),delete e.__tooltip)}}),Wn=(e,t,n,o)=>Math.sqrt(__pow(n-e,2)+__pow(o-t,2)),qn=(e,t,n,o)=>180*Math.atan2(o-t,n-e)/Math.PI,Zn=w({name:"touch",ssr:!1,mounted(e,t){const n=Kn(t.value),o={options:n,startX:0,startY:0,startTime:0,startDistance:0,startAngle:0,lastScale:1,lastAngle:0,longPressTimer:null,isLongPress:!1,isMouseDown:!1,lastTouchEndTime:0,handlers:{touchStart:()=>{},touchMove:()=>{},touchEnd:()=>{}}};e.__touch=o;const l=()=>{o.longPressTimer&&(clearTimeout(o.longPressTimer),o.longPressTimer=null)},r=e=>{l(),o.options.enableLongPress&&o.options.onLongPress&&(o.longPressTimer=setTimeout(()=>{o.isLongPress=!0,o.options.onLongPress(e)},o.options.longPressTimeout||500))},i=(e,t)=>{const n=o.options.tapThreshold||10;return Math.abs(e-o.startX)>n||Math.abs(t-o.startY)>n},s=(e,t,n)=>{var l,r,i,s,a,u,c,d,p,f,v,m;if(o.isLongPress)return;const h=Date.now()-o.startTime,g=e-o.startX,y=t-o.startY,b=Math.sqrt(__pow(g,2)+__pow(y,2));if(o.options.enableSwipe&&b>=(o.options.swipeThreshold||30)&&h<=(o.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(y)?g>0?"right":"left":y>0?"down":"up";null==(r=(l=o.options).onSwipe)||r.call(l,e,n),"left"===e?null==(s=(i=o.options).onSwipeLeft)||s.call(i,n):"right"===e?null==(u=(a=o.options).onSwipeRight)||u.call(a,n):"up"===e?null==(d=(c=o.options).onSwipeUp)||d.call(c,n):null==(f=(p=o.options).onSwipeDown)||f.call(p,n)}else o.options.enableTap&&b<(o.options.tapThreshold||10)&&h<(o.options.tapTimeout||250)&&(null==(m=(v=o.options).onTap)||m.call(v,n))},a=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),o.startTime=Date.now(),o.isLongPress=!1,1===e.touches.length)o.startX=e.touches[0].clientX,o.startY=e.touches[0].clientY,r(e);else if(2===e.touches.length){l();const[t,n]=e.touches;o.startDistance=Wn(t.clientX,t.clientY,n.clientX,n.clientY),o.startAngle=qn(t.clientX,t.clientY,n.clientX,n.clientY),o.lastScale=1,o.lastAngle=0}null==(n=(t=o.options).onTouchStart)||n.call(t,e)},u=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),o.longPressTimer&&1===e.touches.length&&i(e.touches[0].clientX,e.touches[0].clientY)&&l(),2===e.touches.length){const[t,n]=e.touches,l=Wn(t.clientX,t.clientY,n.clientX,n.clientY),r=qn(t.clientX,t.clientY,n.clientX,n.clientY);if(o.options.enablePinch&&o.options.onPinch){const t=l/o.startDistance;Math.abs(t-o.lastScale)>=(o.options.pinchThreshold||.1)&&(o.options.onPinch(t,e),o.lastScale=t)}if(o.options.enableRotate&&o.options.onRotate){const t=r-o.startAngle;Math.abs(t-o.lastAngle)>5&&(o.options.onRotate(t,e),o.lastAngle=t)}}null==(n=(t=o.options).onTouchMove)||n.call(t,e)},c=e=>{var t,n;if(l(),0===e.touches.length){o.lastTouchEndTime=Date.now();const t=e.changedTouches[0];s(t.clientX,t.clientY,e)}null==(n=(t=o.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;o.options.enableMouse&&(Date.now()-o.lastTouchEndTime<400||(e.preventDefault(),o.isMouseDown=!0,o.startTime=Date.now(),o.startX=e.clientX,o.startY=e.clientY,o.isLongPress=!1,r(e),null==(n=(t=o.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.longPressTimer&&i(e.clientX,e.clientY)&&l(),null==(n=(t=o.options).onTouchMove)||n.call(t,e))},f=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.isMouseDown=!1,l(),o.isLongPress||s(e.clientX,e.clientY,e),null==(n=(t=o.options).onTouchEnd)||n.call(t,e))};o.handlers={touchStart:a,touchMove:u,touchEnd:c,mouseDown:d,mouseMove:p,mouseUp:f},e.addEventListener("touchstart",a,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",c),e.addEventListener("touchcancel",c),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",f))},updated(e,t){const n=e.__touch;n&&(n.options=Kn(t.value))},unmounted(e){const t=e.__touch;(null==t?void 0:t.longPressTimer)&&clearTimeout(t.longPressTimer),(null==t?void 0:t.handlers)&&(e.removeEventListener("touchstart",t.handlers.touchStart),e.removeEventListener("touchmove",t.handlers.touchMove),e.removeEventListener("touchend",t.handlers.touchEnd),e.removeEventListener("touchcancel",t.handlers.touchEnd),t.handlers.mouseDown&&e.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp)),delete e.__touch}});function Kn(e){var t,n,o,l,r,i,s,a,u,c,d,p;return{swipeThreshold:null!=(t=null==e?void 0:e.swipeThreshold)?t:30,swipeTimeout:null!=(n=null==e?void 0:e.swipeTimeout)?n:500,pinchThreshold:null!=(o=null==e?void 0:e.pinchThreshold)?o:.1,enableSwipe:null==(l=null==e?void 0:e.enableSwipe)||l,enablePinch:null==(r=null==e?void 0:e.enablePinch)||r,enableRotate:null==(i=null==e?void 0:e.enableRotate)||i,enableTap:null==(s=null==e?void 0:e.enableTap)||s,tapTimeout:null!=(a=null==e?void 0:e.tapTimeout)?a:250,tapThreshold:null!=(u=null==e?void 0:e.tapThreshold)?u:10,enableLongPress:null==(c=null==e?void 0:e.enableLongPress)||c,longPressTimeout:null!=(d=null==e?void 0:e.longPressTimeout)?d:500,enableMouse:null==(p=null==e?void 0:e.enableMouse)||p,onSwipe:null==e?void 0:e.onSwipe,onSwipeLeft:null==e?void 0:e.onSwipeLeft,onSwipeRight:null==e?void 0:e.onSwipeRight,onSwipeUp:null==e?void 0:e.onSwipeUp,onSwipeDown:null==e?void 0:e.onSwipeDown,onPinch:null==e?void 0:e.onPinch,onRotate:null==e?void 0:e.onRotate,onTap:null==e?void 0:e.onTap,onLongPress:null==e?void 0:e.onLongPress,onTouchStart:null==e?void 0:e.onTouchStart,onTouchMove:null==e?void 0:e.onTouchMove,onTouchEnd:null==e?void 0:e.onTouchEnd}}function Gn(e,t){const{position:n="both",chars:o}=t,l=o?`[\\s${r=o,r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var r;switch(n){case"start":return e.replace(new RegExp(`^${l}+`,"g"),"");case"end":return e.replace(new RegExp(`${l}+$`,"g"),"");default:return e.replace(new RegExp(`^${l}+|${l}+$`,"g"),"")}}const Jn=w({name:"trim",ssr:!0,mounted(e,t){const n=Qn(t.value);if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)!function(e,t){const n={options:t};e.__trim=n;const o=()=>{const n=e.value,o=Gn(n,t);n!==o&&(e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,o=t.replace(/\s+$/g,"");if(t!==o&&(e.value=o,null!==n)){const t=Math.min(n,o.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>o();e.addEventListener("blur",t),n.blurHandler=t}e.value&&o()}(e,n);else{const t=e.textContent||"";e.textContent=Gn(t,n)}},updated(e,t){const n=Qn(t.value),o=e.__trim;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)o&&(o.options=n);else{const t=e.textContent||"";e.textContent=Gn(t,n)}},unmounted(e){const t=e.__trim;(null==t?void 0:t.inputHandler)&&e.removeEventListener("input",t.inputHandler),(null==t?void 0:t.blurHandler)&&e.removeEventListener("blur",t.blurHandler),delete e.__trim}});function Qn(e){var t,n,o;return void 0===e||!0===e?{position:"both",onInput:!0,onBlur:!0}:!1===e?{position:"both",onInput:!1,onBlur:!1}:"string"==typeof e?{position:e,onInput:!0,onBlur:!0}:{position:null!=(t=e.position)?t:"both",onInput:null==(n=e.onInput)||n,onBlur:null==(o=e.onBlur)||o,chars:e.chars}}const eo=w({name:"truncate",ssr:!0,mounted(e,t){const n=no(t.value),o=e.textContent||"",l={originalText:o,options:n};e.__truncate=l,to(e,o,n)},updated(e,t){const n=e.__truncate,o=no(t.value);if(n){const t=n.originalText;JSON.stringify(o)!==JSON.stringify(n.options)&&(n.options=o,to(e,t,o))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:o},to(e,t,o)}},unmounted(e){delete e.__truncate}});function to(e,t,n){const{useCss:o,showTitle:l=!0}=n;if(o)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",l&&t&&e.setAttribute("title",t);else{const o=function(e,t){const{length:n=100,position:o="end",ellipsis:l="..."}=t;if(e.length<=n)return e;switch(o){case"start":return l+e.slice(-(n-l.length));case"middle":{const t=Math.ceil((n-l.length)/2),o=Math.floor((n-l.length)/2);return e.slice(0,t)+l+e.slice(-o)}default:return e.slice(0,n-l.length)+l}}(t,n);e.textContent=o,l&&t&&t!==o&&e.setAttribute("title",t)}}function no(e){var t,n,o,l,r;return"number"==typeof e?{length:e,position:"end",ellipsis:"...",useCss:!1,showTitle:!0}:{length:null!=(t=null==e?void 0:e.length)?t:100,position:null!=(n=null==e?void 0:e.position)?n:"end",ellipsis:null!=(o=null==e?void 0:e.ellipsis)?o:"...",useCss:null!=(l=null==e?void 0:e.useCss)&&l,showTitle:null==(r=null==e?void 0:e.showTitle)||r}}function oo(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function lo(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const ro=w({name:"uppercase",ssr:!0,mounted(e,t){const n=lo(t.value);if(L(e)){const t=x(e,n,e=>oo(e,n));e.__uppercaseCleanup=t}else E(e,e=>oo(e,n))},updated(e,t){const n=lo(t.value);L(e)?n.onInput&&(e.value=oo(e.value,n)):E(e,e=>oo(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function io(e){if("function"==typeof e.itemSize){let t=0;for(let n=0;n<e.items.length;n++)t+=e.itemSize(n);return t}return(e.itemSize||50)*e.items.length}function so(e,t,n){const o=n.items,l=n.itemSize||50,r=n.overscan||3;let i=0,s=0,a=0;if("function"==typeof l){let n=0;for(let t=0;t<o.length;t++){const o=l(t);if(n+o>e){i=t,a=n;break}n+=o}for(s=i,n=a;s<o.length&&n<e+t;)n+=l(s),s++;i=Math.max(0,i-r),s=Math.min(o.length,s+r),n=0;for(let e=0;e<i;e++)n+=l(e);return a=n,{startIndex:i,endIndex:s,offsetY:a}}return i=Math.max(0,Math.floor(e/l)-r),s=Math.min(o.length,Math.ceil((e+t)/l)+r),a=i*l,{startIndex:i,endIndex:s,offsetY:a}}function ao(e){var t,n,o,l;return Array.isArray(e)?{items:e,itemSize:50,height:400,overscan:3,keyField:"id"}:{items:e.items,itemSize:null!=(t=e.itemSize)?t:50,height:null!=(n=e.height)?n:400,overscan:null!=(o=e.overscan)?o:3,render:e.render,keyField:null!=(l=e.keyField)?l:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function uo(e,t,n){const o=document.createElement("div");o.className="v-virtual-list__item",o.dataset.index=String(t);const l=n.keyField||"id";"object"==typeof e&&null!==e&&l in e&&(o.dataset.key=String(e[l]));const r=function(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}(n,t);return o.style.height=`${r}px`,o.style.boxSizing="border-box",n.render?o.innerHTML=n.render(e,t):o.textContent="object"==typeof e?JSON.stringify(e):String(e),o}const co=w({name:"virtual-list",ssr:!1,mounted(e,t){const n=ao(t.value);e.classList.add("v-virtual-list"),e.style.height="number"==typeof n.height?`${n.height}px`:n.height,e.style.overflow="auto",e.style.position="relative";const o=document.createElement("div");o.className="v-virtual-list__content",o.style.position="relative",o.style.height=`${io(n)}px`,e.appendChild(o);const l=document.createElement("div");l.className="v-virtual-list__visible",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.right="0",o.appendChild(l);const r={options:n,containerEl:e,contentEl:o,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=r;const i=t=>{const n=e.scrollTop,o=e.clientHeight,{startIndex:i,endIndex:s,offsetY:a}=so(n,o,r.options);i===r.startIndex&&s===r.endIndex||(r.startIndex=i,r.endIndex=s,po(l,r,a),r.options.onVisibleChange&&r.options.onVisibleChange(i,s)),r.options.onScroll&&r.options.onScroll(n)};r.scrollHandler=i,e.addEventListener("scroll",i,{passive:!0});const{startIndex:s,endIndex:a,offsetY:u}=so(0,e.clientHeight,n);if(r.startIndex=s,r.endIndex=a,po(l,r,u),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{i(new Event("scroll"))});t.observe(e),r.resizeObserver=t}},updated(e,t){var n;const o=e.__virtualList;if(!o)return;const l=ao(t.value);o.options=l,o.contentEl&&(o.contentEl.style.height=`${io(l)}px`);const r=e.scrollTop,i=e.clientHeight,{startIndex:s,endIndex:a,offsetY:u}=so(r,i,l);o.startIndex=s,o.endIndex=a;const c=null==(n=o.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");c&&po(c,o,u)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function po(e,t,n){const{options:o,startIndex:l,endIndex:r}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=l;t<r;t++){const n=o.items[t];if(void 0!==n){const l=uo(n,t,o);e.appendChild(l)}}}function fo(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const vo=w({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!f())return;const l=fo(t.value),r=e.style.display,i=e.style.visibility,s={options:l,isVisible:null==(n=l.initial)||n,originalDisplay:r,originalVisibility:i,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,$(e,"transitionend",s.transitionEndHandler),mo(e,s,null==(o=l.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const l=fo(t.value);let r;r="boolean"==typeof t.value?t.value:null==(n=l.initial)||n,o.isVisible!==r&&mo(e,o,r),o.options=l},unmounted(e){const t=e.__visible;t&&(A(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function mo(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}function ho(e){var t;const n=document.createElement("canvas"),o=n.getContext("2d");if(!o)throw new Error("[Directix] v-watermark: Could not get canvas context");const l=e.width||300,r=e.height||200,i=e.fontSize||16,s=e.fontFamily||"sans-serif",a=e.fontWeight||"normal",u=e.color||"rgba(128, 128, 128, 0.15)",c=null!=(t=e.rotate)?t:-22;n.width=l,n.height=r,o.font=`${a} ${i}px ${s}`,o.fillStyle=u,o.textAlign="center",o.textBaseline="middle",o.translate(l/2,r/2),o.rotate(c*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*i,f=-(d.length-1)*p/2;return d.forEach((e,t)=>{o.fillText(e,0,f+t*p)}),n}function go(e,t){var n;const o=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],l=null!=(n=t.zIndex)?n:9999,r=document.createElement("div");return r.className="v-watermark",r.style.cssText=`\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tpointer-events: none;\n\t\tz-index: ${l};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${o[0]/2}px ${o[1]/2}px;\n\t\tbackground-size: ${e.width+o[0]}px ${e.height+o[1]}px;\n\t`,r}function yo(e){var t,n,o,l,r,i,s,a,u,c,d;return"string"==typeof e?{content:e}:{content:e.content,width:null!=(t=e.width)?t:300,height:null!=(n=e.height)?n:200,rotate:null!=(o=e.rotate)?o:-22,fontSize:null!=(l=e.fontSize)?l:16,fontFamily:null!=(r=e.fontFamily)?r:"sans-serif",fontWeight:null!=(i=e.fontWeight)?i:"normal",color:null!=(s=e.color)?s:"rgba(128, 128, 128, 0.15)",gap:null!=(a=e.gap)?a:[100,100],zIndex:null!=(u=e.zIndex)?u:9999,disabled:null!=(c=e.disabled)&&c,protect:null==(d=e.protect)||d}}const bo=w({name:"watermark",ssr:!0,mounted(e,t){const n=yo(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=o,n.disabled||wo(e,o)},updated(e,t){const n=e.__watermark;if(!n)return;const o=yo(t.value);o.disabled&&!n.options.disabled?_o(n):!o.disabled&&n.options.disabled?(n.options=o,wo(e,n)):o.disabled||(n.options=o,_o(n),wo(e,n)),n.options=o},unmounted(e){const t=e.__watermark;t&&(_o(t),delete e.__watermark)}});function wo(e,t){const n=t.options;t.canvas=ho(n),t.watermarkEl=go(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&function(e,t){if("undefined"==typeof MutationObserver)return;t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=ho(t.options),t.watermarkEl=go(t.canvas,t.options),e.appendChild(t.watermarkEl));for(const e of n)if("attributes"===e.type&&e.target===t.watermarkEl){const e=Array.isArray(t.options.gap)?t.options.gap:[t.options.gap||100,t.options.gap||100];t.watermarkEl.style.display="block",t.watermarkEl.style.visibility="visible",t.watermarkEl.style.opacity="1",t.canvas&&(t.watermarkEl.style.backgroundImage=`url("${t.canvas.toDataURL()}")`),t.watermarkEl.style.backgroundSize=`${t.canvas.width+e[0]}px ${t.canvas.height+e[1]}px`}}),t.observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}(e,t)}function _o(e){e.observer&&(e.observer.disconnect(),e.observer=null),e.watermarkEl&&e.watermarkEl.parentNode&&e.watermarkEl.parentNode.removeChild(e.watermarkEl),e.watermarkEl=null,e.canvas=null}const xo=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function Eo(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function Lo(e,t={}){if(!e)return e;const{every:n=!0,keepLower:o=xo}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?Eo(e):o.includes(e.toLowerCase())?e.toLowerCase():Eo(e)).join(" ")}return Eo(e)}function To(e){return __async(this,null,function*(){if(y())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){if(!f())return!1;const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}function ko(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function Co(e){const t=Math.max(0,e);return{days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3),milliseconds:t%1e3,total:t}}function So(e,t){if("function"==typeof t)return t(e);const n=(e,t=2)=>String(e).padStart(t,"0");return t.replace(/dd/gi,n(e.days)).replace(/hh/gi,n(e.hours)).replace(/mm/gi,n(e.minutes)).replace(/ss/gi,n(e.seconds)).replace(/S{3}/gi,n(e.milliseconds,3)).replace(/SS/gi,n(Math.floor(e.milliseconds/10))).replace(/S/gi,String(Math.floor(e.milliseconds/100)))}function Do(e){if(e.type.startsWith("touch")){const t=e.touches[0]||e.changedTouches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function Io(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const o=document.createElement("canvas").getContext("2d");return o?(o.font=`${t}px ${n}`,o.measureText(e).width):8*e.length}function Mo(e,t,n="...",o=14,l="sans-serif"){if(t<=0)return e;if(Io(e,o,l)<=t)return e;const r=t-Io(n,o,l);if(r<=0)return n;let i=0,s=e.length;for(;i<s;){const t=Math.floor((i+s+1)/2);Io(e.slice(0,t),o,l)<=r?i=t:s=t-1}return e.slice(0,i)+n}const Po=new Set(["input","textarea","select","button"]);const Oo={esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",plus:"+",minus:"-"},zo=new Set(["ctrl","alt","shift","meta"]);function Ho(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let o="";for(const e of t)zo.has(e)?n.add(e):o=Oo[e]||e;return{key:o,modifiers:n}}function $o(e,t){if(t.modifiers.has("ctrl")!==(e.ctrlKey||e.metaKey))return!1;if(t.modifiers.has("alt")!==e.altKey)return!1;if(t.modifiers.has("shift")!==e.shiftKey)return!1;if(t.modifiers.has("meta")!==e.metaKey)return!1;const n=e.key,o=t.key;return n.toLowerCase()===o.toLowerCase()}let Ao=null;function Yo(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function Ro(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:"clientX"in e?{x:e.clientX,y:e.clientY}:{x:0,y:0}}function Xo(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}const No={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function Vo(e,t={}){const{precision:n=2,separator:o=",",decimal:l=".",symbol:r="$",symbolPosition:i="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),"before"===i?r+c:c+r}function Uo(e,t={}){const{decimal:n=".",symbol:o="$"}=t;let l=e.replace(new RegExp(`[${o}\\s]`,"g"),"");return"."!==n?(l=l.replace(/,/g,""),l=l.replace(new RegExp(`\\${n}`,"g"),".")):l=l.replace(/,/g,""),parseFloat(l)||0}function Bo(e,t={}){const{precision:n=0,separator:o=",",decimal:l=".",prefix:r="",suffix:i=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),r+c+i}function Fo(e,t={}){const{decimal:n=".",prefix:o="",suffix:l=""}=t;let r=e.replace(new RegExp(`^${jo(o)}`),"").replace(new RegExp(`${jo(l)}$`),"").replace(/\s/g,"");return"."!==n?(r=r.replace(/,/g,""),r=r.replace(new RegExp(`\\${n}`,"g"),".")):r=r.replace(/,/g,""),parseFloat(r)||0}function jo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wo(e,t){return t.includes("*")||t.includes(e)}function qo(e){const t=e.querySelectorAll("img"),n=[];return t.forEach(e=>{e.complete||n.push(new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}))}),Promise.all(n)}function Zo(e,t){let n="";"undefined"!=typeof document&&document.querySelectorAll('style, link[rel="stylesheet"]').forEach(e=>{if("STYLE"===e.tagName)n+=`<style>${e.textContent}</style>`;else if("LINK"===e.tagName){const t=e.href;n+=`<link rel="stylesheet" href="${t}">`}}),t.cssUrls.forEach(e=>{n+=`<link rel="stylesheet" href="${e}">`}),t.styles&&(n+=`<style>${t.styles}</style>`),n+=`\n\t\t<style>\n\t\t\t@media print {\n\t\t\t\tbody { margin: 0; padding: 20px; }\n\t\t\t\t${t.printClass?`.${t.printClass} { page-break-inside: avoid; }`:""}\n\t\t\t}\n\t\t</style>\n\t`;const o=t.title||("undefined"!=typeof document?document.title:"Print"),l=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${o}</title>\n\t${n}\n</head>\n<body>\n\t${l}\n</body>\n</html>`}function Ko(e={}){const{title:n,styles:o,cssUrls:l=[],onBeforePrint:r,onAfterPrint:i,newWindow:s=!1,printClass:a}=e,u=t.ref(!1);function c(e){return __async(this,null,function*(){if(r){if(!1===r())return}u.value=!0;try{let r=null;if(r="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!r)return void console.warn("[Directix] usePrint: Target element not found");const u={title:t.unref(n)||"",styles:Array.isArray(t.unref(o))?t.unref(o).join("\n"):t.unref(o)||"",cssUrls:t.unref(l)||[],printClass:t.unref(a)};t.unref(s)?yield function(e,t){return __async(this,null,function*(){const n=window.open("","_blank");if(!n)return void console.warn("[Directix] usePrint: Could not open print window");const o=Zo(e,t);n.document.open(),n.document.write(o),n.document.close(),yield qo(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}(r,u):yield function(e,t){return __async(this,null,function*(){var n,o,l;const r=document.createElement("iframe");r.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(r);const i=r.contentDocument||(null==(n=r.contentWindow)?void 0:n.document);if(!i)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(r);const s=Zo(e,t);i.open(),i.write(s),i.close(),yield qo(i);try{null==(o=r.contentWindow)||o.focus(),null==(l=r.contentWindow)||l.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(r)},1e3)})}(r,u),i&&i()}finally{u.value=!1}})}return t.onUnmounted(()=>{}),{isPrinting:u,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function Go(e){return new Promise(t=>setTimeout(t,e))}function Jo(e,t,n,o,l,r,i){const s=n.getBoundingClientRect(),a=2*Math.max(s.width,s.height),u=document.createElement("span");return u.className="v-ripple__wave",u.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${o};\n width: ${a}px;\n height: ${a}px;\n left: ${e-a/2}px;\n top: ${t-a/2}px;\n transform: scale(${r});\n opacity: 0.3;\n z-index: 0;\n `,"function"==typeof u.animate?u.animate([{transform:`scale(${r})`,opacity:.3},{transform:`scale(${i})`,opacity:0}],{duration:l,easing:"ease-out",fill:"forwards"}).onfinish=()=>{u.remove()}:(u.style.transition=`transform ${l}ms ease-out, opacity ${l}ms ease-out`,String(u.offsetHeight),u.style.transform=`scale(${i})`,u.style.opacity="0",setTimeout(()=>u.remove(),l)),u}const Qo=["b","i","u","strong","em","br","p","span","div"],el=["title","alt","href","src"],tl=["script","iframe","object","embed","form","input","style","link","meta","base"],nl=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function ol(e,t,n){let o=0,l=0,r=0,i=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,l=window.scrollY||document.documentElement.scrollTop,r=document.documentElement.scrollWidth-window.innerWidth,i=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,l=t.scrollTop,r=t.scrollWidth-t.clientWidth,i=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:l,scrollLeftMax:r,scrollTopMax:i,progressX:r>0?o/r:0,progressY:i>0?l/i:0,directionX:o!==t?o>t?1:-1:0,directionY:l!==n?l>n?1:-1:0}}const ll=["left","right","up","down"];function rl(e,t="both",n){if(!e)return"";const o=n?`[\\s${l=n,l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var l;switch(t){case"start":return e.replace(new RegExp(`^${o}+`,"g"),"");case"end":return e.replace(new RegExp(`${o}+$`,"g"),"");default:return e.replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}}function il(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function sl(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:o,width:l,height:r,fontSize:i,fontFamily:s,fontWeight:a,color:u,rotate:c}=e;t.width=l,t.height=r,n.font=`${a} ${i}px ${s}`,n.fillStyle=u,n.textAlign="center",n.textBaseline="middle",n.translate(l/2,r/2),n.rotate(c*Math.PI/180);const d=Array.isArray(o)?o:[o],p=1.5*i,f=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,f+t*p)}),t}const al={"click-outside":ne,"click-delay":te,copy:ie,debounce:me,throttle:In,focus:Te,hotkey:He,lazy:st,intersect:Qe,visible:vo,loading:ut,scroll:mn,"infinite-scroll":qe,sticky:_n,"long-press":ft,hover:Xe,ripple:ln,mask:Lt,permission:Yt,sanitize:pn,resize:nn,mutation:Pt,truncate:eo,ellipsis:we,uppercase:ro,lowercase:ht,capitalcase:D,number:Ot,money:It,trim:Jn,tooltip:jn,draggable:be,touch:Zn,swipe:Sn,"image-preview":je,countdown:de,watermark:bo,print:Rt,"virtual-list":co,"pull-refresh":en},ul={install:(e,t={})=>{var n,o,l,r,i,s,a;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(l=e.version)?void 0:l.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(i=null==(r=e.Vue)?void 0:r.version)?void 0:i.startsWith("2"))?u=2:(null==(a=null==(s=e.Vue)?void 0:s.version)?void 0:a.startsWith("3"))&&(u=3)}u&&p(u);const{directives:c,all:d=!1}=t;d||!c?Object.entries(al).forEach(([t,n])=>{e.directive(t,n)}):c.forEach(t=>{const n=al[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=ul,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.calculateTime=Co,e.capitalizeText=Lo,e.capitalizeWord=Eo,e.configurePermission=function(e){Ht=e},e.createCapitalizer=function(e={}){return t=>Lo(t,e)},e.createDelayedClick=function(e,t=300){let n=!1;return o=>{if(n)return o.preventDefault(),void o.stopPropagation();n=!0,e(o),setTimeout(()=>{n=!1},t)}},e.createLowercaser=function(e=!1){return t=>Xo(t,e)},e.createMoneyFormatter=function(e={}){return t=>Vo(t,e)},e.createNumberFormatter=function(e={}){return t=>Bo(t,e)},e.createPermissionChecker=function(e){const{getPermissions:t,getRoles:n,roleMap:o={}}=e;return(e,l="some")=>{const r=t(),i=(null==n?void 0:n())||[],s=Array.isArray(e)?e:[e];function a(e){if(e in o)return i.includes(e);if(Wo(e,r))return!0;for(const t of i){if(Wo(e,o[t]||[]))return!0}return!1}return"every"===l?s.every(a):s.some(a)}},e.createTrimmer=function(e="both",t){return n=>rl(n,e,t)},e.createUppercaser=function(e=!1){return t=>il(t,e)},e.createVue2Directive=n,e.createVue3Directive=l,e.createWatermarkUrl=function(e,t={}){var n,o,l,r,i;return sl({content:e,width:null!=(n=t.width)?n:300,height:null!=(o=t.height)?o:200,fontSize:null!=(l=t.fontSize)?l:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(r=t.color)?r:"rgba(128, 128, 128, 0.15)",rotate:null!=(i=t.rotate)?i:-22}).toDataURL()},e.debounceFn=function(e,t=300,n){return q(e,t,n)},e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(j(t)&&j(o))for(const n in o)j(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=w,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const l=`${e}-${t}`;n.directive(l,o)})}}},e.formatMoney=Vo,e.formatNumber=Bo,e.formatTime=So,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let l=e;for(const e of o){if(null==l)return n;l=l[e]}return void 0===l?n:l},e.getPermissionConfig=function(){return Ht},e.getVueVersion=d,e.isArray=W,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=f,e.isEmpty=function(e){return null==e||(B(e)||W(e)?0===e.length:!!j(e)&&0===Object.keys(e).length)},e.isFunction=F,e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.isObject=j,e.isPromise=function(e){return j(e)&&F(e.then)},e.isSSR=v,e.isString=B,e.isVue2=function(){if(null===s){const e=d();s=2===e||2.7===e}return s},e.isVue27=function(){return null===a&&(a=2.7===d()),a},e.isVue3=function(){return null===u&&(u=3===d()),u},e.lowercaseText=Xo,e.parseMoney=Uo,e.parseNumber=Fo,e.parseTargetTime=ko,e.parseTime=K,e.quickPrint=function(e){return __async(this,arguments,function*(e,t={}){const{print:n}=Ko(t);yield n(e)})},e.resetVueVersion=function(){i=null,s=null,a=null,u=null},e.set=function(e,t,n){const o=t.split("."),l=o.pop();let r=e;for(const e of o)void 0===r[e]&&(r[e]={}),r=r[e];r[l]=n},e.setVueVersion=p,e.supportsClipboard=y,e.supportsIntersectionObserver=h,e.supportsMutationObserver=b,e.supportsPassive=m,e.supportsResizeObserver=g,e.throttleFn=function(e,t=300,n){return Z(e,t,n)},e.trimText=rl,e.truncateText=function(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n},e.uppercaseText=il,e.useCapitalcase=function(e){const{text:n,every:o=!0,keepLower:l=xo}=e,r=t.ref(t.unref(n)),i=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o),t.unref(l)],()=>function(){const e=t.unref(n),s=t.unref(o),a=t.unref(l);r.value=e,i.value=Lo(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:i,original:r}},e.useClickDelay=function(e){const{handler:n,delay:o=300,disabled:l=!1}=e,r=t.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}return t.onUnmounted(()=>{s()}),{isPending:r,click:function(e){if(t.unref(l)||r.value)return e.preventDefault(),void e.stopPropagation();r.value=!0,n(e),i=setTimeout(()=>{r.value=!1,i=null},t.unref(o))},reset:function(){i&&(clearTimeout(i),i=null),r.value=!1},cancel:s}},e.useClickOutside=function(e){const{handler:n,exclude:o=[],capture:l=!0,events:r=["click"],stop:i=!1,prevent:s=!1}=e;let a=null;const u=new Map;function c(e){return e=>{a&&function(e,n,o){const l=n.target;if(e.contains(l))return!1;if(null==o?void 0:o.length)for(const e of o){const n="function"==typeof e?e():t.unref(e),o="string"==typeof n?z(n):n;if(o&&(o===l||o.contains(l)))return!1}return!0}(a,e,o)&&(i&&e.stopPropagation(),s&&e.preventDefault(),n(e))}}function d(){u.forEach((e,t)=>{document.removeEventListener(t,e,{capture:l})}),u.clear(),a=null}return t.onUnmounted(()=>{d()}),{bind:function(e){return f()?(d(),a=e,r.forEach(e=>{const t=c();u.set(e,t),document.addEventListener(e,t,{capture:l,passive:!s})}),d):()=>{}}}},e.useCopy=function(e={}){const{source:n,onSuccess:o,onError:l,copiedTimeout:r=1500}=e,i=t.ref(!1),s=t.ref(null),a=y()||f();let u=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:t.unref(n);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;u&&(clearTimeout(u),u=null),s.value=null;try{if(yield To(a))return i.value=!0,null==o||o(a),u=setTimeout(()=>{i.value=!1,u=null},r),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,i.value=!1,null==l||l(t),!1}})},copied:t.readonly(i),error:t.readonly(s),isSupported:a}},e.useCountdown=function(e){const{target:n,format:o="hh:mm:ss",onComplete:l,onTick:r,interval:i=1e3,autoStart:s=!0}=e,a=t.ref(Co(0)),u=t.ref(""),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let f=null,v=0,m=0;const h=()=>t.unref(i),g=()=>t.unref(o);function y(){const e=Date.now(),t=v-e;if(t<=0)return a.value=Co(0),u.value=So(a.value,g()),p.value=!0,c.value=!1,w(),void(l&&l());a.value=Co(t),u.value=So(a.value,g()),r&&r(a.value)}function b(){c.value||(v=ko(t.unref(n)),c.value=!0,d.value=!1,p.value=!1,y(),f=setInterval(y,h()))}function w(){f&&(clearInterval(f),f=null),c.value=!1}return t.watch(()=>t.unref(n),e=>{c.value&&(v=ko(e))}),t.unref(s)&&b(),t.onUnmounted(()=>{w()}),{time:a,formatted:u,running:c,paused:d,completed:p,start:b,pause:function(){c.value&&(m=v-Date.now(),w(),d.value=!0)},resume:function(){!c.value&&d.value&&(v=Date.now()+m,c.value=!0,d.value=!1,y(),f=setInterval(y,h()))},reset:function(){w(),d.value=!1,p.value=!1,m=0,a.value=Co(0),u.value=So(a.value,g())}}},e.useDebounce=function(e){const{handler:n,wait:o=300,leading:l=!1,trailing:r=!0}=e;let i=null,s=null,a=null;const u=()=>{s&&(n.apply(a,s),s=null,a=null)};function c(){i&&(clearTimeout(i),i=null),s=null,a=null}return t.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,i&&clearTimeout(i),t.unref(l)&&!i&&u(),i=setTimeout(()=>{t.unref(r)&&u(),i=null},t.unref(o))},cancel:c,flush:function(){i&&(clearTimeout(i),u(),i=null)},pending:function(){return null!==i}}},e.useDraggable=function(e={}){const{axis:n="both",constrain:o=!1,boundary:l,handle:r,grid:i,disabled:s=!1,onStart:a,onDrag:u,onEnd:c}=e,d=t.ref({x:0,y:0}),p=t.ref(!1);let v=null,m=null,h=0,g=0,y=0,b=0,w=0,_=0,x=0,E=0,L=0,T=0;function k(e){var n;if(t.unref(s))return;e.preventDefault();const{clientX:r,clientY:i}=Do(e);p.value=!0,h=r,g=i;const{x:u,y:c}=function(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}(v.style.transform);if(y=u,b=c,t.unref(o)||l){const e=l?function(e){var t,n;if(!e)return null;if("function"==typeof e){const n=e();return null!=(t=null==n?void 0:n.getBoundingClientRect())?t:null}if("string"==typeof e){const t=document.querySelector(e);return null!=(n=null==t?void 0:t.getBoundingClientRect())?n:null}return e.getBoundingClientRect()}(l):null==(n=v.parentElement)?void 0:n.getBoundingClientRect();if(e){const t=v.getBoundingClientRect();w=t.left-e.left,_=t.top-e.top,x=e.width,E=e.height,L=t.width,T=t.height}}v.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",S),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",S),null==a||a({x:y,y:b},e)}function C(e){if(!p.value||t.unref(s))return;e.preventDefault();const{clientX:r,clientY:a}=Do(e);let c=r-h,f=a-g,m=y+c,k=b+f;const C=t.unref(n);"x"===C?f=0:"y"===C&&(c=0);const S=t.unref(i);if(S&&(c=Math.round(c/S[0])*S[0],f=Math.round(f/S[1])*S[1]),t.unref(o)||l){const e=w+c,t=_+f,n=x-L,o=E-T,l=Math.max(0,Math.min(e,n)),r=Math.max(0,Math.min(t,o));m=y+(l-w),k=b+(r-_)}v.style.transform=`translate(${m}px, ${k}px)`,d.value={x:m,y:k},null==u||u({x:m,y:k},e)}function S(e){p.value&&(p.value=!1,null==v||v.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",S),null==c||c(__spreadValues({},d.value),e))}function D(){if(v){const e=m||v;e.removeEventListener("mousedown",k),e.removeEventListener("touchstart",k)}v=null,m=null}return t.onUnmounted(()=>{D()}),{position:t.readonly(d),isDragging:t.readonly(p),reset:function(){v&&(v.style.transform="translate(0px, 0px)",d.value={x:0,y:0})},bind:function(e){if(!f())return()=>{};D(),v=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=r?e.querySelector(r):null;const t=m||e;return t.addEventListener("mousedown",k),t.addEventListener("touchstart",k,{passive:!1}),D}}},e.useEllipsis=function(e){const{text:n,lines:o=1,ellipsis:l="...",maxWidth:r=0}=e,i=t.ref(t.unref(n)),s=t.ref(""),a=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(l),t.unref(r)],()=>function(){const e=t.unref(n),u=t.unref(o),c=t.unref(l),d=t.unref(r);if(i.value=e,!e)return s.value="",void(a.value=!1);if(d>0){const t=Mo(e,d,c);s.value=t,a.value=t!==e}else if(u>1){const t=function(e,t,n="..."){if(t<=0)return"";const o=80*t;return e.length<=o?e:e.slice(0,o-n.length)+n}(e,u,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),t.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:i,calculateForWidth:function(e){const o=t.unref(n),r=t.unref(l);return!o||e<=0?o||"":Mo(o,e,r)},wouldTruncate:function(e){const o=t.unref(n);return!(!o||e<=0)&&Io(o)>e}}},e.useFocus=function(e={}){const{onFocus:n,onBlur:o}=e,l=t.ref(!1);let r=null,i=null,s=null;function a(){r&&(i&&r.removeEventListener("focus",i),s&&r.removeEventListener("blur",s)),r=null,i=null,s=null,l.value=!1}return t.onUnmounted(()=>{a()}),{isFocused:t.readonly(l),focus:function(){r&&function(e){if(!f())return!1;const t=e.tagName.toLowerCase();if(Po.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");return null!=n?"-1"!==n:("a"===t||"area"===t)&&e.hasAttribute("href")}(r)&&r.focus()},blur:function(){r&&r.blur()},bind:function(e){return f()?(a(),r=e,i=e=>{l.value=!0,null==n||n(e)},s=e=>{l.value=!1,null==o||o(e)},e.addEventListener("focus",i),e.addEventListener("blur",s),l.value=document.activeElement===e,a):()=>{}}}},e.useHotkey=function(e={}){const{hotkey:n,hotkeys:o=[],target:l,enabled:r=!0}=e,i=t.ref(t.unref(r)),s=new Map;let a=null,u=null,c=null;function d(e){const t=Ho(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function p(e,n){if(!i.value)return;const o=e.key.toLowerCase(),l=s.get(o);if(l)for(const o of l){if(t.unref(o.disabled))continue;if(!!o.keyup!==n)continue;if($o(e,Ho(o.key))){!1!==o.prevent&&e.preventDefault(),o.stop&&e.stopPropagation(),o.handler(e);break}}}function v(){f()&&(m(),a=l?t.unref(l):document,u=e=>p(e,!1),c=e=>p(e,!0),null==a||a.addEventListener("keydown",u),null==a||a.addEventListener("keyup",c))}function m(){a&&(u&&a.removeEventListener("keydown",u),c&&a.removeEventListener("keyup",c)),a=null,u=null,c=null}return n&&d(n),o.forEach(d),t.watch(i,e=>{e?v():m()}),l&&"object"==typeof l&&"value"in l&&t.watch(l,()=>{i.value&&v()}),i.value&&v(),t.onUnmounted(()=>{m()}),{enabled:i,enable:function(){i.value=!0},disable:function(){i.value=!1},toggle:function(){i.value=!i.value},add:d,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}},e.useHover=function(e={}){const{onEnter:n,onLeave:o,class:l,enterDelay:r=0,leaveDelay:i=0}=e,s=t.ref(!1);let a=null,u=null,c=null;function d(){a&&(clearTimeout(a),a=null),u&&(clearTimeout(u),u=null)}function p(e){if(u&&(clearTimeout(u),u=null),s.value)return;const o=t.unref(r);o&&o>0?a=setTimeout(()=>{s.value=!0,m(),null==n||n(e),a=null},o):(s.value=!0,m(),null==n||n(e))}function v(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const n=t.unref(i);n&&n>0?u=setTimeout(()=>{s.value=!1,h(),null==o||o(e),u=null},n):(s.value=!1,h(),null==o||o(e))}function m(){c&&l&&c.classList.add(l)}function h(){c&&l&&c.classList.remove(l)}return t.onUnmounted(()=>{d(),h()}),{isHovering:s,bind:function(e){return f()?(c=e,e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",v),()=>{e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",v),d(),h(),c=null}):()=>{}}}},e.useImagePreview=function(e={}){const{src:n,closeOnClickOutside:o=!0,closeOnEsc:l=!0,showCloseButton:r=!0,onOpen:i,onClose:s}=e,a=t.ref(!1),u=t.ref("");let c=null,d=null,p=null,v=null;function m(e){if(!f())return;const t=e||(n&&"object"==typeof n?n.value:n);if(!t&&!c)return;const s=t||c.src;u.value=s,d=function(){const e=document.createElement("div");return e.className="v-image-preview",e.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n background: rgba(0, 0, 0, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: zoom-out;\n ",e}();const m=document.createElement("img");if(m.src=s,m.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",r){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="&times;",e.style.cssText="\n position: absolute;\n top: 20px;\n right: 20px;\n width: 40px;\n height: 40px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: white;\n font-size: 24px;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n ",e.addEventListener("click",e=>{e.stopPropagation(),h()}),d.appendChild(e)}d.appendChild(m),document.body.appendChild(d),o&&(p=h,d.addEventListener("click",p)),l&&(v=e=>{"Escape"===e.key&&h()},document.addEventListener("keydown",v)),a.value=!0,null==i||i()}function h(){d&&(d.remove(),d=null),p&&(document.removeEventListener("click",p),p=null),v&&(document.removeEventListener("keydown",v),v=null),a.value=!1,u.value="",null==s||s()}function g(){c&&m(c.src)}function y(){c&&(c.style.cursor="",c.removeEventListener("click",g)),c=null}return t.onUnmounted(()=>{y(),h()}),{isOpen:t.readonly(a),currentSrc:t.readonly(u),open:m,close:h,bind:function(e){return f()?(y(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",g),y):()=>{}}}},e.useInfiniteScroll=function(e){const{onLoad:n,loading:o,finished:l,distance:r=0,immediate:i=!0,disabled:s=!1}=e,a=t.ref(!1),u=t.ref(!1),c=o||a,d=l||u;let p=null,v=null,m=null,g=null;function y(){return __async(this,null,function*(){if(!(t.unref(c)||t.unref(d)||t.unref(s))){a.value=!0;try{yield n()}finally{a.value=!1}}})}function b(){if(!p||t.unref(c)||t.unref(d)||t.unref(s))return;const e=t.unref(r);let n,o;if(p===window)n=document.documentElement.scrollHeight-window.scrollY,o=window.innerHeight;else{const e=p;n=e.scrollHeight-e.scrollTop,o=e.clientHeight}n<=o+e&&y()}function w(){m&&(m.disconnect(),m=null),g&&(g.remove(),g=null),p&&v&&p.removeEventListener("scroll",v),p=null,v=null}return t.onUnmounted(()=>{w()}),{loading:t.readonly(c),finished:t.readonly(d),load:y,bind:function(e){if(!f())return()=>{};if(w(),h()){g=document.createElement("div"),g.style.cssText="height: 1px; width: 100%; visibility: hidden;",e.appendChild(g);const n=H(e),o=n instanceof Window?null:n;m=new IntersectionObserver(e=>{e[0].isIntersecting&&y()},{root:o,rootMargin:`${t.unref(r)}px`}),m.observe(g)}else p=H(e),v=b,p.addEventListener("scroll",v);return i&&y(),w},stop:w}},e.useIntersect=function(e={}){const{handler:n,onEnter:o,onLeave:l,onChange:r,root:i=null,rootMargin:s="0px",threshold:a=0,once:u=!1}=e,c=t.ref(!1),d=t.ref(0);let p=null,v=!1;function m(){p&&(p.disconnect(),p=null),c.value=!1,d.value=0}return t.onUnmounted(()=>{m()}),{isIntersecting:t.readonly(c),ratio:t.readonly(d),bind:function(e){return f()?(m(),p=f()&&h()?new IntersectionObserver(e=>{for(const t of e){if(u&&v)continue;const e=t.isIntersecting;c.value=e,d.value=t.intersectionRatio,null==n||n(t,p),null==r||r(e,t),e?(null==o||o(t,p),u&&(v=!0)):null==l||l(t,p)}},{root:t.unref(i),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),p&&p.observe(e),m):()=>{}},stop:m}},e.useLazy=function(e={}){const{src:n,placeholder:o,error:l,preload:r=0,onLoad:i,onError:s,attempt:a=1}=e,u=t.ref("pending"),c=t.ref(!1),d=t.ref(!1),p=t.ref(!1);let v=null,m=0,g=null;function y(){const e=t.unref(n);if(!e||!v)return;if("loading"===u.value)return;u.value="loading",c.value=!0;const o=new Image;o.onload=()=>{Yo(v,e),u.value="loaded",c.value=!1,d.value=!0,p.value=!1,null==v||v.classList.remove("v-lazy--loading"),null==v||v.classList.add("v-lazy--loaded"),null==i||i(v)},o.onerror=()=>{null==v||v.classList.remove("v-lazy--loading"),m++,m<a?setTimeout(()=>y(),1e3*m):(l&&v&&Yo(v,l),u.value="error",c.value=!1,p.value=!0,null==v||v.classList.add("v-lazy--error"),null==s||s(v,new Error("Failed to load image")))},v.classList.add("v-lazy--loading"),o.src=e}function b(){v&&(g&&g.unobserve(v),delete v.__lazyLoad,v.classList.remove("v-lazy","v-lazy--loading","v-lazy--loaded","v-lazy--error")),v=null}return t.onUnmounted(()=>{b()}),{state:t.readonly(u),isLoading:t.readonly(c),isLoaded:t.readonly(d),hasError:t.readonly(p),bind:function(e){return f()?(b(),v=e,m=0,u.value="pending",e.classList.add("v-lazy"),o&&Yo(e,o),e.__lazyLoad=y,h()?(g=function(e){return Ao||(Ao=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=e.target,n=t.__lazyLoad;n&&(n(),null==Ao||Ao.unobserve(t))}})},{rootMargin:`${e}px`}),Ao)}(r),g.observe(e),b):(y(),b)):()=>{}},load:y,reset:function(){u.value="pending",c.value=!1,d.value=!1,p.value=!1,m=0}}},e.useLoading=function(e={}){const{initial:n=!1,text:o,loadingClass:l="v-loading",spinnerClass:r="v-loading__spinner",textClass:i="v-loading__text",spinner:s,background:a="rgba(255, 255, 255, 0.9)",lock:u=!1}=e,c=t.ref(t.unref(n));let d=null,p=null,v="",m="";function h(){d&&!p&&(p=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}({text:t.unref(o),loadingClass:l,spinnerClass:r,textClass:i,spinner:s,background:a}),d.appendChild(p),u&&(d.style.overflow="hidden"),d.classList.add("v-loading--active"))}function g(){d&&p&&(p.remove(),p=null,u&&(d.style.overflow=m),d.classList.remove("v-loading--active"))}function y(){g(),d&&(d.style.position=v,d.style.overflow=m),d=null}return t.watch(c,e=>{e?h():g()}),"object"==typeof o&&"value"in o&&t.watch(o,e=>{if(p){const t=p.querySelector(`.${i}`);t&&(t.textContent=e||"")}}),t.onUnmounted(()=>{y()}),{loading:c,start:function(){c.value=!0},stop:function(){c.value=!1},toggle:function(){c.value=!c.value},bind:function(e){return f()?(y(),d=e,v=e.style.position,m=e.style.overflow,"static"===getComputedStyle(e).position&&(e.style.position="relative"),c.value&&h(),y):()=>{}}}},e.useLongPress=function(e={}){const{duration:n=500,distance:o=10,onStart:l,onTrigger:r,onCancel:i,onTick:s,tickInterval:a=100,prevent:u=!0}=e,c=t.ref(!1);let d=null,p=null,v={x:0,y:0},m=!1;function h(e){if(f()){if(u&&e.preventDefault(),b(),v=Ro(e),m=!0,c.value=!0,null==l||l(e),s){let e=t.unref(n);p=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}d=setTimeout(()=>{b(),c.value=!1,null==r||r(e)},t.unref(n))}}function g(e){c.value&&(b(),m=!1,c.value=!1,null==i||i(e))}function y(e){if(!c.value||!m)return;const n=Ro(e);var l,r;(l=v,r=n,Math.sqrt(__pow(r.x-l.x,2)+__pow(r.y-l.y,2)))>t.unref(o)&&g(e)}function b(){d&&(clearTimeout(d),d=null),p&&(clearInterval(p),p=null)}return t.onUnmounted(()=>{b()}),{isPressing:c,start:h,stop:g,bind:function(e){return e.addEventListener("mousedown",h),e.addEventListener("mouseup",g),e.addEventListener("mouseleave",g),e.addEventListener("mousemove",y),e.addEventListener("touchstart",h,{passive:!u}),e.addEventListener("touchend",g),e.addEventListener("touchcancel",g),e.addEventListener("touchmove",y,{passive:!0}),()=>{e.removeEventListener("mousedown",h),e.removeEventListener("mouseup",g),e.removeEventListener("mouseleave",g),e.removeEventListener("mousemove",y),e.removeEventListener("touchstart",h),e.removeEventListener("touchend",g),e.removeEventListener("touchcancel",g),e.removeEventListener("touchmove",y),b()}}}},e.useLowercase=function(e){const{text:n,first:o=!1}=e,l=t.ref(t.unref(n)),r=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);l.value=e,r.value=Xo(e,i)}(),{immediate:!0}),{transformed:r,original:l}},e.useMask=function(e){const{mask:n,placeholder:o="_",showPlaceholder:l=!0,showMaskOnBlur:r=!1,clearIncomplete:i=!1,disabled:s=!1,onChange:a,onComplete:u}=e;let c=null,d=null,p=null,v=null;function m(){return function(e,t){return[...e].map(e=>{const n=No[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}(t.unref(n),o)}function h(e,t,n){let l="",r=0;for(const i of t){if(r>=e.length){l+=i.isLiteral?i.placeholder:n?o:"";continue}const t=e[r];i.isLiteral?(t===i.placeholder&&r++,l+=i.placeholder):i.pattern.test(t)?(l+=t,r++):t===o?(l+=n?o:"",r++):r++}return l}function g(e,t){let n="";for(let l=0;l<e.length&&l<t.length;l++)t[l].isLiteral||e[l]===o||(n+=e[l]);return n}function y(e,t){for(let n=0;n<t.length;n++)if(!t[n].isLiteral&&(n>=e.length||e[n]===o))return!1;return!0}function b(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}function w(e){const t=e.target,n=m(),o=t.value,r=t.selectionStart||0,i=h(o,n,l);if(i!==o)return t.value=i,t.setSelectionRange(b(n,r),b(n,r)),void t.dispatchEvent(new Event("input",{bubbles:!0}));null==a||a(i,g(i,n)),y(i,n)&&(null==u||u(i))}function _(){if(!c)return;const e=m();!c.value&&l&&(c.value=h("",e,!0))}function x(){if(!c)return;const e=m();r||y(c.value,e)||!i||(c.value="")}function E(){c&&(d&&c.removeEventListener("input",d),p&&c.removeEventListener("focus",p),v&&c.removeEventListener("blur",v)),c=null,d=null,p=null,v=null}return t.onUnmounted(()=>{E()}),{getFormattedValue:e=>h(e,m(),l),getRawValue:e=>g(e,m()),isComplete:e=>y(e,m()),bind:function(e){if(!f())return()=>{};if(E(),c=e,d=w,p=_,v=x,e.addEventListener("input",d),e.addEventListener("focus",p),e.addEventListener("blur",v),e.value){const t=m();e.value=h(e.value,t,l)}return E}}},e.useMoney=function(e){const{value:n,symbol:o="$",symbolPosition:l="before",precision:r=2,separator:i=",",decimal:s="."}=e,a=t.ref(t.unref(n)),u=t.computed(()=>Vo(a.value,{precision:t.unref(r),separator:t.unref(i),decimal:t.unref(s),symbol:t.unref(o),symbolPosition:t.unref(l)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Uo(e,{decimal:t.unref(s),symbol:t.unref(o)})}}},e.useMutation=function(e){const{handler:n,attributes:o=!1,attributeFilter:l,childList:r=!0,subtree:i=!1,characterData:s=!1,attributeOldValue:a=!1,characterDataOldValue:u=!1,disabled:c=!1}=e;let d=null,p=null;function v(){d&&p&&!t.unref(c)&&p.observe(d,{attributes:o,attributeFilter:l,childList:r,subtree:i,characterData:s,attributeOldValue:a,characterDataOldValue:u})}function m(){p&&p.disconnect()}return t.onUnmounted(()=>{m(),p=null,d=null}),{bind:function(e){return f()?(m(),d=e,p=f()&&b()?new MutationObserver((e,o)=>{t.unref(c)||n(e,o)}):(console.warn("[Directix] useMutation: MutationObserver not supported"),null),p&&!t.unref(c)&&v(),m):()=>{}},stop:m,start:v}},e.useNumber=function(e){const{value:n,precision:o=0,separator:l=",",decimal:r=".",prefix:i="",suffix:s=""}=e,a=t.ref(t.unref(n)),u=t.computed(()=>Bo(a.value,{precision:t.unref(o),separator:t.unref(l),decimal:t.unref(r),prefix:t.unref(i),suffix:t.unref(s)}));return t.watch(()=>t.unref(n),e=>{a.value=e}),{value:a,formatted:u,parse:function(e){return Fo(e,{decimal:t.unref(r),prefix:t.unref(i),suffix:t.unref(s)})}}},e.usePermission=function(e){const{value:n,mode:o="some",check:l,getPermissions:r,getRoles:i,roleMap:s={}}=e,a=t.ref(!1);function u(){a.value=function(){if(l)return l(t.unref(n),t.unref(o));if(!r)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=r(),a=(null==i?void 0:i())||[],u=Array.isArray(t.unref(n))?t.unref(n):[t.unref(n)];function c(t){if(t in s)return a.includes(t);if(Wo(t,e))return!0;for(const e of a)if(Wo(t,s[e]||[]))return!0;return!1}return"every"===t.unref(o)?u.every(c):u.some(c)}()}return t.watch(()=>t.unref(n),()=>u(),{immediate:!0}),"object"==typeof o&&"value"in o&&t.watch(o,()=>u()),{granted:t.readonly(a),recheck:u}},e.usePrint=Ko,e.usePullRefresh=function(e){const{handler:n,distance:o=60,maxDistance:l=100,disabled:r=!1,successDuration:i=500,errorDuration:s=1e3}=e,a=t.ref("idle"),u=t.ref(0),c=t.ref(!1),d=t.ref(null);let p=0,f=0;const v=()=>t.unref(o),m=()=>t.unref(r);function h(){a.value="idle",u.value=0,c.value=!1}function g(){return __async(this,null,function*(){a.value="loading";try{yield n(),a.value="success",yield Go(t.unref(i))}catch(e){a.value="error",yield Go(t.unref(s))}finally{h()}})}return t.onUnmounted(()=>{h()}),{state:a,distance:u,isPulling:c,events:{touchstart:function(e){if(m()||"loading"===a.value)return;const t=d.value;t&&t.scrollTop>0||(c.value=!0,p=e.touches[0].clientY,f=p,a.value="idle")},touchmove:function(e){if(!c.value||m()||"loading"===a.value)return;f=e.touches[0].clientY;const n=f-p;if(n<=0)return u.value=0,void(a.value="idle");e.preventDefault();const o=Math.min(.5*n,t.unref(l));u.value=o;const r=o/v();a.value=r>=1?"ready":"pulling"},touchend:function(){c.value&&!m()&&(c.value=!1,"ready"===a.value&&u.value>=v()?g():(u.value=0,h()))}},containerRef:d,refresh:g}},e.useResize=function(e={}){const{debounce:n=0,box:o="content-box",onResize:l}=e,r=t.ref(0),i=t.ref(0);let s=null,a=null,u=null;function c(e){const o=t.unref(n);function s(){r.value=e.contentRect.width,i.value=e.contentRect.height,null==l||l({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}o&&o>0?(a&&clearTimeout(a),a=setTimeout(s,o)):s()}function d(){s&&(s.disconnect(),s=null),u&&(u.remove(),u=null),a&&(clearTimeout(a),a=null)}return t.onUnmounted(()=>{d()}),{width:t.readonly(r),height:t.readonly(i),bind:function(e){if(!f())return()=>{};d();const t=e.getBoundingClientRect();if(r.value=t.width,i.value=t.height,g())f()&&g()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:o});else{u=document.createElement("iframe"),u.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ";"static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(u);const t=u.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return d},stop:d}},e.useRipple=function(e={}){const{color:n="currentColor",duration:o=600,disabled:l=!1,initialScale:r=0,finalScale:i=2}=e;let s=null,a=null;function u(e){if(t.unref(l))return;const a=t.unref(n),u=t.unref(o),c=Jo(e.clientX-s.getBoundingClientRect().left,e.clientY-s.getBoundingClientRect().top,s,a,u,r,i);s.appendChild(c)}function c(){s&&a&&(s.removeEventListener("click",a),s.classList.remove("v-ripple")),s=null,a=null}return t.onUnmounted(()=>{c()}),{bind:function(e){if(!f())return()=>{};c(),s=e;const t=getComputedStyle(e);return"static"===t.position&&(e.style.position="relative"),"visible"===t.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple"),a=u,e.addEventListener("click",a),c},trigger:function(e){var a,u;if(!s||t.unref(l))return;const c=s.getBoundingClientRect(),d=Jo(null!=(a=null==e?void 0:e.x)?a:c.width/2,null!=(u=null==e?void 0:e.y)?u:c.height/2,s,t.unref(n),t.unref(o),r,i);s.appendChild(d)}}},e.useSanitize=function(e={}){const{allowedTags:n=Qo,allowedAttributes:o=el,allowDataUrls:l=!1,allowStyles:r=!1,allowClass:i=!1,allowId:s=!1,handler:a}=e;function u(e){var t;if(a)return a(e);if(!f())return e;const u=document.createElement("div");u.innerHTML=e;for(const e of tl){const n=u.getElementsByTagName(e);for(;n.length>0;)null==(t=n[0].parentNode)||t.removeChild(n[0])}const c=e=>{var t;const a=e.tagName.toLowerCase();if(!n.includes(a)){const n=document.createTextNode(e.textContent||"");return void(null==(t=e.parentNode)||t.replaceChild(n,e))}for(const t of nl)e.removeAttribute(t);const u=e.getAttribute("href");if(u&&u.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!l){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}const d=Array.from(e.attributes);for(const t of d){const n=o.includes(t.name.toLowerCase()),l="class"===t.name&&i,a="id"===t.name&&s,u="style"===t.name&&r;n||l||a||u||e.removeAttribute(t.name)}for(const t of Array.from(e.children))c(t)};for(const e of Array.from(u.children))c(e);return u.innerHTML}return t.onUnmounted(()=>{}),{sanitize:u,bind:function(e){if(!f())return()=>{};const t=e.innerHTML;return t&&(e.innerHTML=u(t)),()=>{}}}},e.useScroll=function(e={}){const{throttle:n=0,passive:o=!0}=e,l=t.ref(0),r=t.ref(0),i=t.ref(0),s=t.ref(0),a=t.ref(0),u=t.ref(0),c=t.ref(!1);let d=null,p=0,v=0,m=null,h=null,g=null;const y=t.computed(()=>({scrollLeft:l.value,scrollTop:r.value,scrollLeftMax:0,scrollTopMax:0,progressX:i.value,progressY:s.value,directionX:a.value,directionY:u.value}));function b(e){if(!d)return;const o=t.unref(n);function f(){const e=ol(d,p,v);l.value=e.scrollLeft,r.value=e.scrollTop,i.value=e.progressX,s.value=e.progressY,a.value=e.directionX,u.value=e.directionY,p=e.scrollLeft,v=e.scrollTop,c.value=!0,g&&clearTimeout(g),g=setTimeout(()=>{c.value=!1},150)}o&&o>0?h||(h=setTimeout(()=>{f(),h=null},o)):f()}function w(){d&&m&&d.removeEventListener("scroll",m),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),d=null,m=null}return t.onUnmounted(()=>{w()}),{scrollLeft:t.readonly(l),scrollTop:t.readonly(r),progressX:t.readonly(i),progressY:t.readonly(s),directionX:t.readonly(a),directionY:t.readonly(u),isScrolling:t.readonly(c),info:t.readonly(y),bind:function(e){if(!f())return()=>{};w(),d=e||window;const t=ol(d,0,0);return l.value=t.scrollLeft,r.value=t.scrollTop,i.value=t.progressX,s.value=t.progressY,p=t.scrollLeft,v=t.scrollTop,m=b,d.addEventListener("scroll",m,{passive:o}),w},stop:w,scrollTo:function(e){if(!d)return;const{top:t,left:n,behavior:o="smooth"}=e;if(d===window)window.scrollTo({top:t,left:n,behavior:o});else{const e=d;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}},e.useSticky=function(e={}){const{offsetTop:n=0,onStick:o,disabled:l=!1}=e,r=t.ref(!1);let i=null,s=null,a=null,u=null,c=null;function d(){var e;if(!i||t.unref(l))return;const a=(s===window?document.documentElement:s).getBoundingClientRect(),d=i.getBoundingClientRect(),p=t.unref(n),f=d.top<=p&&a.top<=p;f!==r.value&&(r.value=f,f?(u||(u=document.createElement("div"),u.style.width=`${d.width}px`,u.style.height=`${d.height}px`,null==(e=i.parentNode)||e.insertBefore(u,i)),i.style.position="fixed",i.style.top=`${p}px`,i.style.width=`${d.width}px`,i.classList.add("v-sticky--active")):(u&&(u.remove(),u=null),c&&(i.style.position=c.position,i.style.top=c.top,i.style.width=c.width),i.classList.remove("v-sticky--active")),null==o||o(f))}function p(){s&&a&&s.removeEventListener("scroll",a),i&&(c&&(i.style.position=c.position,i.style.top=c.top,i.style.width=c.width),i.classList.remove("v-sticky","v-sticky--active")),u&&(u.remove(),u=null),s=null,a=null,i=null,r.value=!1}return t.onUnmounted(()=>{p()}),{isSticky:t.readonly(r),bind:function(e){return f()?(p(),i=e,c={position:e.style.position,top:e.style.top,width:e.style.width},e.classList.add("v-sticky"),s=H(e),a=d,s.addEventListener("scroll",a,{passive:!0}),d(),p):()=>{}},stop:p}},e.useSwipe=function(e={}){const{handler:n,threshold:o=30,maxTime:l=500,directions:r=ll,preventScrollOnSwipe:i=!0,mouse:s=!0,onLeft:a,onRight:u,onUp:c,onDown:d}=e,p=t.ref(null),v=t.ref(0),m=t.ref(0),h=t.ref(!1);let g=null,y=0,b=0,w=0;function _(e,s,f,h){var y;const b=t.unref(o);if(f>t.unref(l))return;if(Math.max(Math.abs(e),Math.abs(s))<b)return;const w=function(e,t,n){if(Math.abs(e)>Math.abs(t)){const t=e>0?"right":"left";return n.includes(t)?t:null}{const e=t>0?"down":"up";return n.includes(e)?e:null}}(e,s,r);if(!w)return;p.value=w,v.value=e,m.value=s,i&&h.cancelable&&h.preventDefault(),null==n||n(w,h);const _={left:a,right:u,up:c,down:d};null==(y=_[w])||y.call(_),null==g||g.dispatchEvent(new CustomEvent("swipe",{detail:{direction:w,deltaX:e,deltaY:s,deltaTime:f}}))}function x(e,t){y=e,b=t,w=Date.now(),h.value=!0,p.value=null,v.value=0,m.value=0}function E(e,t,n){if(!h.value)return;h.value=!1;_(e-y,t-b,Date.now()-w,n)}function L(e){x(e.touches[0].clientX,e.touches[0].clientY)}function T(e){h.value&&i&&e.preventDefault()}function k(e){const t=e.changedTouches[0];E(t.clientX,t.clientY,e)}function C(e){x(e.clientX,e.clientY)}function S(e){E(e.clientX,e.clientY,e)}function D(e){h.value&&E(e.clientX,e.clientY,e)}function I(){g&&(g.removeEventListener("touchstart",L),g.removeEventListener("touchmove",T),g.removeEventListener("touchend",k),g.removeEventListener("touchcancel",k),t.unref(s)&&(g.removeEventListener("mousedown",C),g.removeEventListener("mouseup",S),g.removeEventListener("mouseleave",D)),g=null)}return t.onUnmounted(()=>{I()}),{direction:t.readonly(p),lengthX:t.readonly(v),lengthY:t.readonly(m),isSwiping:t.readonly(h),bind:function(e){return f()?(I(),g=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",L,{passive:!0}),e.addEventListener("touchmove",T,{passive:!1}),e.addEventListener("touchend",k),e.addEventListener("touchcancel",k),t.unref(s)&&(e.addEventListener("mousedown",C),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",D)),I):()=>{}}}},e.useThrottle=function(e){const{handler:n,wait:o=300,leading:l=!0,trailing:r=!0}=e;let i=null,s=null,a=null,u=0;const c=()=>t.unref(l),d=()=>{s&&(n.apply(a,s),s=null,a=null)};function p(){i&&(clearTimeout(i),i=null),u=0,s=null,a=null}return t.onUnmounted(()=>{p()}),{run:function(...e){const n=Date.now(),l=t.unref(o);u||c()||(u=n);const p=l-(n-u);s=e,a=this,p<=0||p>l?(i&&(clearTimeout(i),i=null),u=n,d()):!i&&t.unref(r)&&(i=setTimeout(()=>{u=c()?Date.now():0,i=null,d()},p))},cancel:p}},e.useTooltip=function(e={}){const{content:n,placement:o="top",trigger:l="hover",delay:r=0,hideDelay:i=0,arrow:s=!0,class:a,onShow:u,onHide:c,disabled:d=!1}=e,p=t.ref(!1);let v=null,m=null,h=null,g=null;const y={};function b(){!t.unref(d)&&n&&(g&&(clearTimeout(g),g=null),r>0?h=setTimeout(w,r):w())}function w(){var e;v&&(m||(m=function(){const e=document.createElement("div");return e.className=`v-tooltip v-tooltip--${o}${a?` ${a}`:""}${s?" v-tooltip--arrow":""}`,e.style.cssText="\n position: absolute;\n z-index: 9999;\n opacity: 0;\n transition: opacity 0.2s;\n pointer-events: none;\n ",e}(),document.body.appendChild(m)),m.textContent=null!=(e=t.unref(n))?e:null,function(){if(!m||!v)return;const e=v.getBoundingClientRect(),t=m.getBoundingClientRect();let n=0,l=0;switch(o){case"top":n=e.top-t.height-8,l=e.left+(e.width-t.width)/2;break;case"bottom":n=e.bottom+8,l=e.left+(e.width-t.width)/2;break;case"left":n=e.top+(e.height-t.height)/2,l=e.left-t.width-8;break;case"right":n=e.top+(e.height-t.height)/2,l=e.right+8}l<0&&(l=8),l+t.width>window.innerWidth&&(l=window.innerWidth-t.width-8),n<0&&(n=8),n+t.height>window.innerHeight&&(n=window.innerHeight-t.height-8),m.style.top=`${n+window.scrollY}px`,m.style.left=`${l+window.scrollX}px`}(),m.style.opacity="1",p.value=!0,null==u||u())}function _(){h&&(clearTimeout(h),h=null),i>0?g=setTimeout(x,i):x()}function x(){m&&(m.style.opacity="0"),p.value=!1,null==c||c()}function E(){p.value?_():b()}function L(){v&&Object.entries(y).forEach(([e,t])=>{v.removeEventListener(e,t)}),m&&(m.remove(),m=null),h&&(clearTimeout(h),h=null),g&&(clearTimeout(g),g=null),v=null,p.value=!1}return t.onUnmounted(()=>{L()}),{isVisible:t.readonly(p),show:b,hide:_,toggle:E,bind:function(e){return f()?(L(),v=e,"hover"===l?(y.mouseenter=b,y.mouseleave=_,e.addEventListener("mouseenter",y.mouseenter),e.addEventListener("mouseleave",y.mouseleave)):"click"===l?(y.click=E,e.addEventListener("click",y.click)):"focus"===l&&(y.focus=b,y.blur=_,e.addEventListener("focus",y.focus),e.addEventListener("blur",y.blur)),L):()=>{}}}},e.useTouch=function(e={}){const{onSwipe:n,onSwipeLeft:o,onSwipeRight:l,onSwipeUp:r,onSwipeDown:i,onPinch:s,onRotate:a,onTap:u,onLongPress:c,swipeThreshold:d=30,longPressDuration:p=500,tapDuration:v=250,disabled:m=!1}=e,h=t.ref(null);let g=null,y=0,b=0,w=0,_=null,x=0,E=0;function L(e){let t=0,n=0;for(let o=0;o<e.length;o++)t+=e[o].clientX,n+=e[o].clientY;return{x:t/e.length,y:n/e.length}}function T(e,t){const n=e.clientX-t.clientX,o=e.clientY-t.clientY;return Math.sqrt(n*n+o*o)}function k(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){t.unref(m)||(w=Date.now(),h.value=null,1===e.touches.length?(y=e.touches[0].clientX,b=e.touches[0].clientY,c&&(_=setTimeout(()=>{h.value="longPress",c({type:"longPress",center:{x:y,y:b},event:e})},p))):2===e.touches.length&&(x=T(e.touches[0],e.touches[1]),E=k(e.touches[0],e.touches[1])))}function S(e){if(!t.unref(m)&&(_&&(clearTimeout(_),_=null),2===e.touches.length&&(s||a))){const t=T(e.touches[0],e.touches[1]),n=k(e.touches[0],e.touches[1]);if(s&&x>0){const n=t/x;h.value="pinch",s({type:"pinch",scale:n,center:L(e.touches),event:e})}if(a){const t=n-E;h.value="rotate",a({type:"rotate",rotation:t,center:L(e.touches),event:e})}}}function D(e){if(t.unref(m))return;_&&(clearTimeout(_),_=null);const s=Date.now()-w;if(1===e.changedTouches.length){const t=e.changedTouches[0].clientX,a=e.changedTouches[0].clientY,c=t-y,p=a-b,f=Math.sqrt(c*c+p*p);if(f>=d){let s;h.value="swipe",s=Math.abs(c)>Math.abs(p)?c>0?"right":"left":p>0?"down":"up";const u={type:"swipe",direction:s,distance:f,angle:Math.atan2(p,c)*(180/Math.PI),center:{x:t,y:a},event:e};switch(null==n||n(u),s){case"left":null==o||o(u);break;case"right":null==l||l(u);break;case"up":null==r||r(u);break;case"down":null==i||i(u)}}else f<10&&s<v&&u&&(h.value="tap",u({type:"tap",center:{x:t,y:a},event:e}))}h.value=null}function I(){g&&(g.removeEventListener("touchstart",C),g.removeEventListener("touchmove",S),g.removeEventListener("touchend",D),g.removeEventListener("touchcancel",D)),_&&(clearTimeout(_),_=null),g=null,h.value=null}return t.onUnmounted(()=>{I()}),{gesture:t.readonly(h),bind:function(e){return f()?(I(),g=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchend",D),e.addEventListener("touchcancel",D),I):()=>{}}}},e.useTrim=function(e){const{text:n,position:o="both",chars:l}=e,r=t.ref(t.unref(n)),i=t.ref(""),s=t.ref(!1);return t.watch(()=>[t.unref(n),t.unref(o),t.unref(l)],()=>function(){const e=t.unref(n),a=t.unref(o),u=t.unref(l);r.value=e,i.value=rl(e,a,u),s.value=i.value!==e}(),{immediate:!0}),{trimmed:i,original:r,wasTrimmed:s}},e.useTruncate=function(e){const{text:n,length:o=100,position:l="end",omission:r="..."}=e,i=t.ref(""),s=t.ref(!1),a=t.ref(0);function u(e,n,i){const s=null!=n?n:t.unref(o),a=null!=i?i:t.unref(l);if(e.length<=s)return e;switch(a){case"start":return function(e,t,n){return e.length<=t?e:n+e.slice(-(t-n.length))}(e,s,r);case"middle":return function(e,t,n){if(e.length<=t)return e;const o=t-n.length,l=Math.ceil(o/2),r=Math.floor(o/2);return e.slice(0,l)+n+e.slice(-r)}(e,s,r);default:return function(e,t,n){return e.length<=t?e:e.slice(0,t-n.length)+n}(e,s,r)}}function c(){const e=t.unref(n),l=t.unref(o);a.value=e.length,s.value=e.length>l,i.value=u(e)}return t.watch(()=>t.unref(n),c,{immediate:!0}),t.watch(()=>t.unref(o),c),t.watch(()=>t.unref(l),c),{truncated:t.readonly(i),isTruncated:t.readonly(s),originalLength:t.readonly(a),truncate:u}},e.useUppercase=function(e){const{text:n,first:o=!1}=e,l=t.ref(t.unref(n)),r=t.ref("");return t.watch(()=>[t.unref(n),t.unref(o)],()=>function(){const e=t.unref(n),i=t.unref(o);l.value=e,r.value=il(e,i)}(),{immediate:!0}),{transformed:r,original:l}},e.useVirtualList=function(e){const{items:n,itemSize:o=50,height:l=400,overscan:r=3,keyField:i="id"}=e,s=t.ref(null),a=t.ref(0),u=t.ref(0),c=t.ref(0),d=()=>t.unref(n),p=()=>t.unref(o),f=()=>t.unref(l),v=t.computed(()=>{const e=d(),t=p();if("function"==typeof t){let n=0;for(let o=0;o<e.length;o++)n+=t(o);return n}return t*e.length});function m(){const e=d(),n=p(),o=f(),l=t.unref(r),i=a.value;let s=0,u=0,c=0;if("function"==typeof n){let t=0;for(let o=0;o<e.length;o++){const e=n(o);if(t+e>i){s=o,c=t;break}t+=e}for(u=s,t=c;u<e.length&&t<i+o;)t+=n(u),u++;s=Math.max(0,s-l),u=Math.min(e.length,u+l),t=0;for(let e=0;e<s;e++)t+=n(e);c=t}else s=Math.max(0,Math.floor(i/n)-l),u=Math.min(e.length,Math.ceil((i+o)/n)+l),c=s*n;return{start:s,end:u,offsetY:c}}const h=t.computed(()=>{const e=d(),t=p(),{start:n,end:o,offsetY:l}=m();u.value=n,c.value=o;const r=[];let i=l;for(let l=n;l<o;l++){const n=e[l];if(void 0!==n){const e="function"==typeof t?t(l):t;r.push({item:n,index:l,style:{position:"absolute",top:`${i}px`,height:`${e}px`,width:"100%"}}),i+=e}}return r}),g=t.computed(()=>({height:`${f()}px`,overflow:"auto",position:"relative"}));function y(e){const t=e.target;a.value=t.scrollTop}return t.onMounted(()=>{s.value&&s.value.addEventListener("scroll",y,{passive:!0})}),t.onUnmounted(()=>{s.value&&s.value.removeEventListener("scroll",y)}),{visibleItems:h,totalHeight:v,scrollTop:a,startIndex:u,endIndex:c,scrollToIndex:function(e){if(!s.value)return;const t=p(),n=d();if("function"==typeof t){let o=0;for(let l=0;l<Math.min(e,n.length);l++)o+=t(l);s.value.scrollTop=o}else s.value.scrollTop=e*t},scrollTo:function(e){s.value&&(s.value.scrollTop=e)},containerRef:s,listStyle:g}},e.useVisible=function(e={}){const{initial:n=!0,useHidden:o=!1,onChange:l}=e,r=t.ref(t.unref(n));let i=null,s="",a="";function u(e){i&&(e?(i.classList.remove("v-hidden"),i.classList.add("v-visible"),o?i.style.visibility=a||"visible":i.style.display=s):(i.classList.remove("v-visible"),i.classList.add("v-hidden"),o?i.style.visibility="hidden":i.style.display="none"))}function c(){i&&(i.style.display=s,i.style.visibility=a,i.classList.remove("v-hidden","v-visible")),i=null}return t.watch(r,(e,t)=>{e!==t&&(u(e),null==l||l(e))}),"object"==typeof n&&"value"in n&&t.watch(n,e=>{r.value=e}),t.onUnmounted(()=>{c()}),{visible:r,show:function(){r.value=!0},hide:function(){r.value=!1},toggle:function(){r.value=!r.value},bind:function(e){return f()?(c(),i=e,s=e.style.display,a=e.style.visibility,u(r.value),c):()=>{}}}},e.useWatermark=function(e){const{content:n,width:o=300,height:l=200,rotate:r=-22,fontSize:i=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:u="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:d=9999,disabled:p=!1,protect:f=!0}=e,v=t.ref(null),m=t.ref(""),h=t.ref(t.unref(p));function g(){const e=t.unref(n),c=t.unref(o),d=t.unref(l),p=t.unref(r),f=t.unref(i),h=t.unref(s),g=t.unref(a),y=t.unref(u);v.value=sl({content:e,width:c,height:d,fontSize:f,fontFamily:h,fontWeight:g,color:y,rotate:p}),m.value=v.value.toDataURL()}const y=t.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:t.unref(d),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function b(){const e=t.unref(c),n=t.unref(d),r=Array.isArray(e)?e:[e,e],i=t.unref(o),s=t.unref(l);y.value=__spreadProps(__spreadValues({},y.value),{zIndex:n,backgroundImage:`url("${m.value}")`,backgroundPosition:`${r[0]/2}px ${r[1]/2}px`,backgroundSize:`${i+r[0]}px ${s+r[1]}px`})}return t.watch(()=>[t.unref(n),t.unref(o),t.unref(l),t.unref(r),t.unref(i),t.unref(s),t.unref(a),t.unref(u),t.unref(c),t.unref(d)],()=>{g(),b()},{immediate:!0}),t.watch(h,e=>{y.value.display=e?"none":"block"}),t.unref(p)&&(y.value.display="none"),t.onUnmounted(()=>{}),{canvas:v,dataUrl:m,style:y,disabled:h,update:function(t){Object.assign(e,t),g(),b()},enable:function(){h.value=!1},disable:function(){h.value=!0}}},e.vCapitalcase=D,e.vClickDelay=te,e.vClickOutside=ne,e.vCopy=ie,e.vCountdown=de,e.vDebounce=me,e.vDraggable=be,e.vEllipsis=we,e.vFocus=Te,e.vHotkey=He,e.vHover=Xe,e.vImagePreview=je,e.vInfiniteScroll=qe,e.vIntersect=Qe,e.vLazy=st,e.vLoading=ut,e.vLongPress=ft,e.vLowercase=ht,e.vMask=Lt,e.vMoney=It,e.vMutation=Pt,e.vNumber=Ot,e.vPermission=Yt,e.vPrint=Rt,e.vPullRefresh=en,e.vResize=nn,e.vRipple=ln,e.vSanitize=pn,e.vScroll=mn,e.vSticky=_n,e.vSwipe=Sn,e.vThrottle=In,e.vTooltip=jn,e.vTouch=Zn,e.vTrim=Jn,e.vTruncate=eo,e.vUppercase=ro,e.vVirtualList=co,e.vVisible=vo,e.vWatermark=bo,e.wouldTextTruncate=function(e,t,n=14){return Io(e,n)>t},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{},Vue);