directix 1.11.0 → 2.1.0
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.
- package/README.md +60 -6
- package/dist/index.cjs +186 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +210 -2
- package/dist/index.iife.js +186 -20
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +3 -3
- package/dist/index.mjs +187 -21
- package/dist/index.mjs.map +1 -1
- package/dist/nuxt/index.cjs +16 -16
- package/dist/nuxt/index.cjs.map +3 -3
- package/dist/nuxt/index.d.ts +2 -2
- package/dist/nuxt/index.mjs +16 -16
- package/dist/nuxt/index.mjs.map +3 -3
- package/dist/nuxt/runtime/plugin.mjs +16 -16
- package/dist/nuxt/runtime/plugin.mjs.map +3 -3
- package/package.json +15 -15
package/dist/index.iife.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* directix
|
|
3
|
-
* A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3
|
|
2
|
+
* directix v2.1.0
|
|
3
|
+
* A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3, with Web Components support
|
|
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 r in e)__hasOwnProp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))t.indexOf(r)<0&&__propIsEnum.call(e,r)&&(n[r]=e[r]);return n},__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),__async=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{a(n.next(e))}catch(e){o(e)}},s=e=>{try{a(n.throw(e))}catch(e){o(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())});(function(exports,vue){"use strict";var _a;function createVue2Directive(e){return{bind(e,t,n){const r={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=r},inserted(t,n,r){e.mounted&&e.mounted(t,normalizeBinding$1(n),r)},update(t,n,r,o){const i=t.__directix_state__;e.updated&&e.updated(t,normalizeBinding$1(n),r,normalizeBinding$1(__spreadProps(__spreadValues({},n),{value:n.oldValue})),o),i&&(i.value=n.value,i.vnode=r)},componentUpdated(e,t,n,r){},unbind(t,n,r){e.unmounted&&e.unmounted(t,normalizeBinding$1(n),r);const o=t.__directix_state__;(null==o?void 0:o.cleanup)&&o.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function normalizeBinding$1(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 addCleanup$1(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)}function createVue3Directive(e){return{created(e,t,n){const r={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=r},beforeMount(e,t,n){},mounted(t,n,r){e.mounted&&e.mounted(t,normalizeBindingVue3(n),r)},beforeUpdate(e,t,n,r){},updated(t,n,r,o){const i=t.__directix_state__;e.updated&&e.updated(t,normalizeBindingVue3(n),r,normalizeBindingVue3(__spreadProps(__spreadValues({},n),{value:n.oldValue})),o),i&&(i.value=n.value,i.vnode=r)},beforeUnmount(e,t,n){},unmounted(t,n,r){e.unmounted&&e.unmounted(t,normalizeBindingVue3(n),r);const o=t.__directix_state__;(null==o?void 0:o.cleanup)&&o.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function normalizeBindingVue3(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}function addCleanup(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)}const DEFAULT_AUDIT_LOG_CONFIG={enabled:!0,level:"info",maxEntries:1e4,persistToStorage:!1,storageKey:"__directix_audit_logs",consoleOutput:!1,consoleLevel:"warn",includeStackTrace:!0,sampleRate:1,filters:{excludeTypes:[],excludeLevels:[],minDuration:0},handlers:{},sensitiveFields:["password","token","secret","apiKey","authorization","credential"],maskSensitive:!0},LEVELS=["debug","info","warn","error","critical"];let _config$7=DEFAULT_AUDIT_LOG_CONFIG,_logs=[],_sessionId=null;function configureAuditLog(e){if(_config$7=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG),e),{filters:__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG.filters),e.filters),handlers:__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG.handlers),e.handlers)}),_config$7.persistToStorage&&"undefined"!=typeof localStorage)try{const e=localStorage.getItem(_config$7.storageKey);e&&(_logs=JSON.parse(e))}catch(e){}}function getAuditLogConfig(){return __spreadValues({},_config$7)}function generateId$1(){return`${Date.now()}-${Math.random().toString(36).slice(2,11)}`}function maskSensitiveData(e,t){const n={};for(const[r,o]of Object.entries(e)){const e=r.toLowerCase(),i=t.some(t=>e.includes(t.toLowerCase()));n[r]=i?"***MASKED***":"object"==typeof o&&null!==o?maskSensitiveData(o,t):o}return n}function shouldLog(e,t){var n,r;if(!_config$7.enabled)return!1;if(_config$7.sampleRate<1&&Math.random()>_config$7.sampleRate)return!1;const o=["debug","info","warn","error","critical"];return!(o.indexOf(e)<o.indexOf(_config$7.level))&&(!(null==(n=_config$7.filters.excludeTypes)?void 0:n.includes(t))&&!(null==(r=_config$7.filters.excludeLevels)?void 0:r.includes(e)))}function getSessionId(){return _sessionId||(_sessionId=`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`),_sessionId}function buildContext(e){var t;return __spreadValues({sessionId:getSessionId(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:void 0,url:"undefined"!=typeof window?window.location.href:void 0,version:"undefined"!=typeof __DIRECTIX_VERSION__?__DIRECTIX_VERSION__:void 0,environment:"undefined"!=typeof process?null==(t=process.env)?void 0:t.NODE_ENV:void 0},e)}function getStackTrace(){if(!_config$7.includeStackTrace)return;const e=new Error("getStackTrace").stack;if(!e)return;return e.split("\n").filter(e=>!e.includes("audit-log")).join("\n")}function persistLogs(){if(_config$7.persistToStorage&&"undefined"!=typeof localStorage)try{localStorage.setItem(_config$7.storageKey,JSON.stringify(_logs))}catch(e){}}function logAudit(e,t,n,r={},o,i){var s,a,l,c,u,d;if(!shouldLog(e,t))return null;const p=_config$7.maskSensitive?maskSensitiveData(r,_config$7.sensitiveFields):r,m={id:generateId$1(),type:t,timestamp:Date.now(),level:e,message:n,details:p,context:buildContext(o),duration:i,stackTrace:"error"===e||"critical"===e?getStackTrace():void 0};if(_logs.push(m),_logs.length>_config$7.maxEntries&&(_logs=_logs.slice(-_config$7.maxEntries)),persistLogs(),_config$7.consoleOutput&&LEVELS.indexOf(e)>=LEVELS.indexOf(_config$7.consoleLevel)){console["critical"===e||"error"===e?"error":"warn"===e?"warn":"info"](`[Directix Audit] [${e.toUpperCase()}] [${t}] ${n}`,p)}return null==(a=(s=_config$7.handlers).onLog)||a.call(s,m),"error"===e&&(null==(c=(l=_config$7.handlers).onError)||c.call(l,m)),"critical"===e&&(null==(d=(u=_config$7.handlers).onCritical)||d.call(u,m)),m}const audit={debug:(e,t,n,r)=>logAudit("debug",e,t,n,r),info:(e,t,n,r)=>logAudit("info",e,t,n,r),warn:(e,t,n,r)=>logAudit("warn",e,t,n,r),error:(e,t,n,r)=>logAudit("error",e,t,n,r),critical:(e,t,n,r)=>logAudit("critical",e,t,n,r)};function logDirectiveOperation(e,t,n,r,o){logAudit(o&&o>100?"warn":"info",`directive.${e}`,`Directive ${t} ${e}`,__spreadValues({directive:t},n),__spreadValues({directive:t},r),o)}function logPermissionCheck(e,t,n,r){logAudit(t?"debug":"warn",t?"permission.grant":"permission.deny",`Permission ${e}: ${t?"granted":"denied"}`,{permission:e,granted:t,source:n},r)}function logSecurityViolation(e,t,n){logAudit("critical","security.violation",`Security violation: ${e}`,t,n)}function logPerformanceIssue(e,t,n,r){logAudit("warn","performance.slow",`Slow operation: ${e} took ${t}ms (threshold: ${n}ms)`,{operation:e,duration:t,threshold:n},r,t)}function getAuditLogs(e){let t=[..._logs];if(!e)return t;if(e.level){const n=Array.isArray(e.level)?e.level:[e.level];t=t.filter(e=>n.includes(e.level))}if(e.type){const n=Array.isArray(e.type)?e.type:[e.type];t=t.filter(e=>n.includes(e.type))}if(e.since&&(t=t.filter(t=>t.timestamp>=e.since)),e.until&&(t=t.filter(t=>t.timestamp<=e.until)),e.directive){const n=Array.isArray(e.directive)?e.directive:[e.directive];t=t.filter(e=>e.context.directive&&n.includes(e.context.directive))}if(e.component){const n=Array.isArray(e.component)?e.component:[e.component];t=t.filter(e=>e.context.component&&n.includes(e.context.component))}return e.offset&&(t=t.slice(e.offset)),e.limit&&(t=t.slice(0,e.limit)),t}function getAuditLogById(e){return _logs.find(t=>t.id===e)}function getAuditLogStats(){const e=Date.now(),t=e-36e5,n=e-864e5,r={debug:0,info:0,warn:0,error:0,critical:0},o={},i={};let s=0,a=0,l=0,c=0;for(const e of _logs){if(r[e.level]++,o[e.type]=(o[e.type]||0)+1,e.context.directive){const t=e.context.directive;i[t]=(i[t]||0)+1}e.duration&&(s+=e.duration,a++),"error"===e.level&&l++,"critical"===e.level&&c++}return{totalEntries:_logs.length,byLevel:r,byType:o,byDirective:i,avgDuration:a>0?s/a:0,errorRate:_logs.length>0?l/_logs.length:0,criticalCount:c,last24Hours:_logs.filter(e=>e.timestamp>=n).length,lastHour:_logs.filter(e=>e.timestamp>=t).length}}function clearAuditLogs(){_logs=[],_config$7.persistToStorage&&"undefined"!=typeof localStorage&&localStorage.removeItem(_config$7.storageKey)}function exportAuditLogs(e={format:"json",includeDetails:!0,includeContext:!0,dateFormat:"iso"}){const{format:t,includeDetails:n,includeContext:r,dateFormat:o}=e,i=e=>{switch(o){case"unix":return String(e);case"locale":return new Date(e).toLocaleString();default:return new Date(e).toISOString()}};switch(t){case"csv":{const e=["id","timestamp","level","type","message"];n&&e.push("details"),r&&e.push("context");const t=_logs.map(e=>{const t=[e.id,i(e.timestamp),e.level,e.type,e.message];return n&&t.push(JSON.stringify(e.details)),r&&t.push(JSON.stringify(e.context)),t.join(",")});return[e.join(","),...t].join("\n")}case"markdown":{let e=`# Directix Audit Logs\n\nGenerated: ${(new Date).toISOString()}\n\n`;e+=`## Summary\n\n- Total entries: ${_logs.length}\n\n`,e+="## Logs\n\n";for(const t of _logs)e+=`### ${t.level.toUpperCase()}: ${t.message}\n\n`,e+=`- **Type**: ${t.type}\n`,e+=`- **Time**: ${i(t.timestamp)}\n`,n&&Object.keys(t.details).length>0&&(e+=`- **Details**: \`\`\`json\n${JSON.stringify(t.details,null,2)}\n\`\`\`\n`),e+="\n";return e}case"html":{let e=`<!DOCTYPE html>\n<html>\n<head>\n\t<title>Directix Audit Logs</title>\n\t<style>\n\t\tbody { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 20px; }\n\t\t.log { border: 1px solid #ddd; margin: 10px 0; padding: 10px; border-radius: 4px; }\n\t\t.log.debug { background: #f5f5f5; }\n\t\t.log.info { background: #e3f2fd; }\n\t\t.log.warn { background: #fff3e0; }\n\t\t.log.error { background: #ffebee; }\n\t\t.log.critical { background: #ffcdd2; border: 2px solid #f44336; }\n\t\t.header { display: flex; justify-content: space-between; margin-bottom: 5px; }\n\t\t.level { font-weight: bold; text-transform: uppercase; }\n\t\t.timestamp { color: #666; }\n\t\t.type { color: #888; font-size: 0.9em; }\n\t\tpre { margin: 5px 0; font-size: 0.85em; background: #f8f8f8; padding: 5px; border-radius: 3px; }\n\t</style>\n</head>\n<body>\n\t<h1>Directix Audit Logs</h1>\n\t<p>Generated: ${(new Date).toISOString()}</p>\n\t<p>Total entries: ${_logs.length}</p>\n`;for(const t of _logs)e+=`\n\t<div class="log ${t.level}">\n\t\t<div class="header">\n\t\t\t<span class="level">${t.level}</span>\n\t\t\t<span class="timestamp">${i(t.timestamp)}</span>\n\t\t</div>\n\t\t<p><strong>${t.message}</strong> <span class="type">[${t.type}]</span></p>\n`,n&&Object.keys(t.details).length>0&&(e+=`\t\t<pre>${JSON.stringify(t.details,null,2)}</pre>\n`),e+="\t</div>\n";return e+="</body></html>",e}default:{const e=_logs.map(e=>__spreadValues(__spreadValues(__spreadValues({id:e.id,type:e.type,timestamp:i(e.timestamp),level:e.level,message:e.message},n&&{details:e.details}),r&&{context:e.context}),e.duration&&{duration:e.duration}));return JSON.stringify({generatedAt:(new Date).toISOString(),total:e.length,entries:e},null,2)}}}function createAuditLogMiddleware(e){return{onMount:(t,n,r)=>{var o;logDirectiveOperation("mount",e,{value:n.value,arg:n.arg,modifiers:n.modifiers},{component:null==(o=null==r?void 0:r.type)?void 0:o.name})},onUpdate:(t,n,r,o)=>{var i;logDirectiveOperation("update",e,{newValue:n.value,oldValue:null==o?void 0:o.value},{component:null==(i=null==r?void 0:r.type)?void 0:i.name})},onUnmount:(t,n,r)=>{var o;logDirectiveOperation("unmount",e,{},{component:null==(o=null==r?void 0:r.type)?void 0:o.name})}}}function withAuditLog(e,t,n,r,o){return __async(this,null,function*(){const i=Date.now();let s=null;try{const s=yield n(),a=Date.now()-i;return a>(_config$7.filters.minDuration||0)&&logAudit("info",e,t,__spreadProps(__spreadValues({},r),{duration:a}),o,a),s}catch(n){s=n;const a=Date.now()-i;throw logAudit("error",e,`${t} (failed: ${s.message})`,__spreadProps(__spreadValues({},r),{error:s.message,stack:s.stack}),o,a),s}})}const DEFAULT_BENCHMARK_CONFIG={iterations:1e3,warmupIterations:100,samples:10,timeout:3e4,gc:!1,verbose:!1};let _config$6=DEFAULT_BENCHMARK_CONFIG;const _results=new Map;function configureBenchmark(e){_config$6=__spreadValues(__spreadValues({},DEFAULT_BENCHMARK_CONFIG),e)}function getBenchmarkConfig(){return __spreadValues({},_config$6)}function runBenchmark(e,t,n){return __async(this,null,function*(){const r=__spreadValues(__spreadValues({},_config$6),n),o=[];for(let e=0;e<r.warmupIterations;e++)yield t();for(let n=0;n<r.samples;n++){const n=[];r.gc&&"function"==typeof globalThis.gc&&globalThis.gc();const i=performance.now();for(let o=0;o<r.iterations;o++){const o=performance.now();if(yield t(),n.push(performance.now()-o),performance.now()-i>r.timeout){r.verbose&&console.warn(`[Benchmark] Timeout exceeded for ${e}`);break}}const s=n.reduce((e,t)=>e+t,0)/n.length;o.push(s)}const i=calculateStatistics(e,o,r.iterations,r.samples);return _results.set(e,i),r.verbose&&console.info(`[Benchmark] ${e}: ${i.mean.toFixed(4)}ms ± ${i.marginOfError.toFixed(4)}ms`),i})}function calculateStatistics(e,t,n,r){const o=[...t].sort((e,t)=>e-t),i=t.reduce((e,t)=>e+t,0)/t.length,s=o[Math.floor(o.length/2)],a=o[0],l=o[o.length-1],c=t.reduce((e,t)=>e+__pow(t-i,2),0)/t.length,u=Math.sqrt(c),d=e=>{const t=Math.ceil(e/100*o.length)-1;return o[Math.max(0,t)]},p=1e3/i,m=1.96*(u/Math.sqrt(t.length));return{name:e,iterations:n,samples:r,mean:i,median:s,min:a,max:l,stdDev:u,percentiles:{p50:d(50),p75:d(75),p90:d(90),p95:d(95),p99:d(99)},opsPerSecond:p,marginOfError:m,timestamp:Date.now()}}function runBenchmarkSuite(e,t,n){return __async(this,null,function*(){const r=[];for(const{name:o,fn:i}of t){const t=yield runBenchmark(`${e}/${o}`,i,n);r.push(t)}const o=r.reduce((e,t)=>e+t.mean,0),i=o/r.length,s=r.reduce((e,t)=>e.mean<t.mean?e:t).name,a=r.reduce((e,t)=>e.mean>t.mean?e:t).name;return{name:e,benchmarks:r,summary:{totalTime:o,averageTime:i,fastest:s,slowest:a},timestamp:Date.now()}})}function compareBenchmarks(e,t,n=.05){const r=(e.mean-t.mean)/e.mean*100,o=Math.sqrt((__pow(e.stdDev,2)+__pow(t.stdDev,2))/2)*Math.sqrt(2/e.samples),i=Math.abs(t.mean-e.mean)/o>2;return{baseline:e,current:t,improvement:r,significant:i,regression:r<100*-n&&i}}function getBenchmarkResult(e){return _results.get(e)}function getAllBenchmarkResults(){return new Map(_results)}function clearBenchmarkResults(){_results.clear()}function createDirectiveBenchmark(e,t,n){let r;return{measureMount:()=>__async(null,null,function*(){return runBenchmark(`${e}/mount`,()=>{r=t()})}),measureUpdate:t=>__async(null,null,function*(){return runBenchmark(`${e}/update`,()=>{r&&r.setAttribute("data-value",JSON.stringify(t))})}),measureUnmount:()=>__async(null,null,function*(){return runBenchmark(`${e}/unmount`,()=>{r&&n&&n(r)})}),measureFullCycle:()=>__async(null,null,function*(){return runBenchmark(`${e}/full-cycle`,()=>{const e=t();n&&n(e)})})}}function takePerformanceSnapshot(){const e={timing:{domContentLoaded:0,loadComplete:0,domInteractive:0},entries:[],timestamp:Date.now()};if("undefined"==typeof performance)return e;if(performance.memory){const t=performance.memory;e.memory={usedJSHeapSize:t.usedJSHeapSize,totalJSHeapSize:t.totalJSHeapSize,jsHeapSizeLimit:t.jsHeapSizeLimit}}const t=performance.timing;t&&(e.timing={domContentLoaded:t.domContentLoadedEventEnd-t.navigationStart,loadComplete:t.loadEventEnd-t.navigationStart,domInteractive:t.domInteractive-t.navigationStart});try{e.entries=performance.getEntries()}catch(e){}return e}function compareSnapshots(e,t){const n={timeDiff:t.timestamp-e.timestamp};return e.memory&&t.memory&&(n.memoryDiff={usedJSHeapSize:t.memory.usedJSHeapSize-e.memory.usedJSHeapSize,totalJSHeapSize:t.memory.totalJSHeapSize-e.memory.totalJSHeapSize}),n}function exportBenchmarkResults(e="json"){const t=Array.from(_results.values());if("csv"===e){const e=["name","iterations","samples","mean","median","min","max","stdDev","opsPerSecond"],n=t.map(e=>[e.name,e.iterations,e.samples,e.mean.toFixed(6),e.median.toFixed(6),e.min.toFixed(6),e.max.toFixed(6),e.stdDev.toFixed(6),e.opsPerSecond.toFixed(2)]);return[e.join(","),...n.map(e=>e.join(","))].join("\n")}return JSON.stringify(t,null,2)}function generateBenchmarkReport(){const e=Array.from(_results.values());if(0===e.length)return"No benchmark results available.";const t=["# Benchmark Report",`Generated: ${(new Date).toISOString()}`,"","## Summary",`Total benchmarks: ${e.length}`,`Total time: ${e.reduce((e,t)=>e+t.mean,0).toFixed(4)}ms`,"","## Results",""],n=[...e].sort((e,t)=>e.mean-t.mean);for(const e of n)t.push(`### ${e.name}`),t.push(`- **Mean**: ${e.mean.toFixed(4)}ms`),t.push(`- **Median**: ${e.median.toFixed(4)}ms`),t.push(`- **Std Dev**: ${e.stdDev.toFixed(4)}ms`),t.push(`- **Min/Max**: ${e.min.toFixed(4)}ms / ${e.max.toFixed(4)}ms`),t.push(`- **Ops/sec**: ${e.opsPerSecond.toFixed(2)}`),t.push(`- **P95**: ${e.percentiles.p95.toFixed(4)}ms`),t.push(`- **P99**: ${e.percentiles.p99.toFixed(4)}ms`),t.push("");return t.join("\n")}function benchmark(e){return function(t,n,r){const o=r.value,i=e||`${t.constructor.name}.${n}`;return r.value=function(...e){return __async(this,null,function*(){return yield runBenchmark(i,()=>o.apply(this,e))})},r}}const BREAKING_CHANGES_REGISTRY=[{id:"v2-drop-vue2-support",version:"2.0.0",description:"Vue 2 support will be removed. Vue 3.x will be the minimum required version.",severity:"critical",status:"planned",category:"api",affectedAPIs:["Vue 2 directives","@vue/composition-api"],migrationGuide:"Upgrade to Vue 3.x. Use the migration build of Vue 3 for gradual migration.",autoFixable:!1,deprecatedIn:"1.10.0",removedIn:"2.0.0",alternatives:["Vue 3.x"]},{id:"v2-rename-directives",version:"2.0.0",description:"Directive naming will be standardized to kebab-case. CamelCase directive names will be removed.",severity:"medium",status:"planned",category:"directive",affectedAPIs:["vClickOutside","vLazyLoad","vInfiniteScroll"],migrationGuide:"Use kebab-case directive names: v-click-outside, v-lazy-load, v-infinite-scroll",detectionPattern:/v[A-Z][a-zA-Z]+/g,autoFixable:!0,deprecatedIn:"1.10.0",removedIn:"2.0.0",examples:{before:'<div v-click-outside="handler"></div>',after:'<div v-click-outside="handler"></div>'}},{id:"v2-option-structure",version:"2.0.0",description:"Directive option structure will be simplified. Legacy option formats will be removed.",severity:"high",status:"planned",category:"config",affectedAPIs:["directive options","binding.value"],migrationGuide:"Update directive options to use the new flat structure.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-handler-signature",version:"2.0.0",description:"Handler function signatures will be standardized. Old handler patterns will be removed.",severity:"medium",status:"planned",category:"api",affectedAPIs:["handlers","callbacks"],migrationGuide:"Update handlers to use (value, oldValue, binding) signature.",autoFixable:!0,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-remove-deprecated-utils",version:"2.0.0",description:"Deprecated utility functions will be removed.",severity:"low",status:"deprecated",category:"api",affectedAPIs:["deepMerge","shallowMerge","isObjectLike"],migrationGuide:"Use native alternatives or lodash equivalents.",detectionPattern:/\b(deepMerge|shallowMerge|isObjectLike)\b/g,autoFixable:!1,deprecatedIn:"1.9.0",removedIn:"2.0.0",alternatives:["Object.assign","structuredClone","typeof check"]},{id:"v2-type-exports",version:"2.0.0",description:"Type exports will be reorganized. Some types will be renamed or removed.",severity:"medium",status:"planned",category:"type",affectedAPIs:["DirectiveBinding","DirectiveConfig"],migrationGuide:"Update type imports. Use renamed types from the new locations.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-default-behavior",version:"2.0.0",description:"Default behavior for some directives will change. Review and update directive usage.",severity:"medium",status:"planned",category:"behavior",affectedAPIs:["v-debounce","v-throttle"],migrationGuide:"Explicitly specify options instead of relying on defaults.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-event-names",version:"2.0.0",description:"Custom event names will be standardized. Old event names will be removed.",severity:"low",status:"planned",category:"api",affectedAPIs:["on:click","on:change"],migrationGuide:"Use the new event naming convention.",autoFixable:!0,deprecatedIn:"1.11.0",removedIn:"2.0.0"}],DEFAULT_BREAKING_CHANGES_CONFIG={enabled:!0,targetVersion:"2.0.0",warnLevel:"medium",consoleOutput:!0,throwOnCritical:!1,customHandlers:{}};let _config$5=DEFAULT_BREAKING_CHANGES_CONFIG;const _warnedChanges=new Set;function configureBreakingChanges(e){_config$5=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_BREAKING_CHANGES_CONFIG),e),{customHandlers:__spreadValues(__spreadValues({},DEFAULT_BREAKING_CHANGES_CONFIG.customHandlers),e.customHandlers)})}function getBreakingChangesConfig(){return __spreadValues({},_config$5)}function getBreakingChangesForVersion(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.version===e)}function getAllBreakingChanges(){return[...BREAKING_CHANGES_REGISTRY]}function getBreakingChangesBySeverity(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.severity===e)}function getBreakingChangesByCategory(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.category===e)}function isAPIAffected(e,t){return BREAKING_CHANGES_REGISTRY.some(n=>(!t||n.version===t)&&n.affectedAPIs.some(t=>t.includes(e)))}function getBreakingChangesForAPI(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.affectedAPIs.some(t=>t.includes(e)))}function detectBreakingChangesInCode(e,t){const n=[];for(const r of BREAKING_CHANGES_REGISTRY){if(!r.detectionPattern)continue;const o=e.matchAll(r.detectionPattern);for(const i of o){if(void 0===i.index)continue;const o=e.substring(0,i.index).split("\n"),s=o.length,a=o[o.length-1].length+1;n.push({changeId:r.id,location:{file:null==t?void 0:t.file,line:s,column:a,snippet:i[0]},matchedPattern:i[0],severity:r.severity,suggestion:r.migrationGuide})}}return n}function warnBreakingChange(e){var t,n,r,o;if(!_config$5.enabled)return;if(_warnedChanges.has(e))return;const i=BREAKING_CHANGES_REGISTRY.find(t=>t.id===e);if(!i)return;if(!("all"===_config$5.warnLevel||"low"===_config$5.warnLevel&&["low","medium","high","critical"].includes(i.severity)||"medium"===_config$5.warnLevel&&["medium","high","critical"].includes(i.severity)||"high"===_config$5.warnLevel&&["high","critical"].includes(i.severity)))return;_warnedChanges.add(e);const s=`[Directix Breaking Change] ${"removed"===i.status?"🚨":"deprecated"===i.status?"⚠️":"📢"} [${i.severity.toUpperCase()}] ${i.description}\n Version: ${i.version}\n Status: ${i.status}\n Affected APIs: ${i.affectedAPIs.join(", ")}\n Migration: ${i.migrationGuide}`;if(_config$5.consoleOutput&&("critical"===i.severity?console.error(s):"high"===i.severity?console.warn(s):console.info(s)),null==(n=(t=_config$5.customHandlers).onWarning)||n.call(t,i),"critical"===i.severity&&(null==(o=(r=_config$5.customHandlers).onCritical)||o.call(r,i),_config$5.throwOnCritical))throw new Error(`Critical breaking change detected: ${i.description}`)}function checkAPIUsage(e){const t=getBreakingChangesForAPI(e);for(const e of t)warnBreakingChange(e.id)}function generateBreakingChangesReport(e=_config$5.targetVersion){const t=BREAKING_CHANGES_REGISTRY.filter(t=>t.version===e||t.removedIn===e),n={low:0,medium:0,high:0,critical:0},r={type:0,api:0,behavior:0,config:0,directive:0},o={planned:0,deprecated:0,removed:0};for(const e of t)n[e.severity]++,r[e.category]++,o[e.status]++;let i;i=n.critical>0?"critical":n.high>2||n.medium>5?"high":n.medium>2||n.low>5?"medium":"low";const s=[];n.critical>0&&s.push("Critical changes detected. Plan migration carefully before upgrading."),r.api>0&&s.push("API changes detected. Review and update API usage before migration."),r.directive>0&&s.push("Directive changes detected. Update directive usage and names."),r.type>0&&s.push("Type changes detected. Update TypeScript definitions.");const a=t.filter(e=>e.autoFixable);return a.length>0&&s.push(`${a.length} changes can be auto-fixed using the migration tool.`),{targetVersion:e,generatedAt:Date.now(),totalChanges:t.length,bySeverity:n,byCategory:r,byStatus:o,changes:t,detections:[],readyForMigration:"low"===i,migrationEffort:i,recommendations:s}}function clearWarnedChanges(){_warnedChanges.clear()}function getWarnedChanges(){return Array.from(_warnedChanges)}function createDeprecationWarning(e,t,n){let r=!1;return()=>{if(r)return;r=!0;const o=BREAKING_CHANGES_REGISTRY.find(t=>t.id===e),i=`[Directix] "${t}" is deprecated${o?` and will be removed in v${o.removedIn}`:""}. Use "${n}" instead.`;_config$5.consoleOutput&&console.warn(i)}}function compareVersions(e,t){const n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){const t=n[e]||0,o=r[e]||0;if(t<o)return-1;if(t>o)return 1}return 0}function isVersionAffected(e){return BREAKING_CHANGES_REGISTRY.some(t=>t.version===e||t.deprecatedIn===e||t.removedIn===e)}function getMigrationTimeline(){const e=new Map;for(const t of BREAKING_CHANGES_REGISTRY)t.deprecatedIn&&(e.has(t.deprecatedIn)||e.set(t.deprecatedIn,{deprecated:[],removed:[]}),e.get(t.deprecatedIn).deprecated.push(t)),t.removedIn&&(e.has(t.removedIn)||e.set(t.removedIn,{deprecated:[],removed:[]}),e.get(t.removedIn).removed.push(t));const t=[];for(const[n,r]of e)r.deprecated.length>0&&t.push({version:n,changes:r.deprecated,milestone:"deprecated"}),r.removed.length>0&&t.push({version:n,changes:r.removed,milestone:"removed"});return t.sort((e,t)=>compareVersions(e.version,t.version))}let _vueVersion=null,_isVue2=null,_isVue27=null,_isVue3=null;function parseVersion$1(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function getVueVersion(){var e,t;if(null!==_vueVersion)return _vueVersion;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return _vueVersion=2.7,_vueVersion;if("2"===e)return _vueVersion=2,_vueVersion;if("3"===e)return _vueVersion=3,_vueVersion}try{const e=require("vue"),t=parseVersion$1(null==e?void 0:e.version);if(null!==t)return _vueVersion=t,_vueVersion}catch(e){}if("undefined"!=typeof window){const n=window,r=n.Vue;if(null==r?void 0:r.version){const e=parseVersion$1(r.version);if(null!==e)return _vueVersion=e,_vueVersion}if("function"==typeof(null==r?void 0:r.observable))return _vueVersion=2,_vueVersion;if("function"==typeof(null==r?void 0:r.createApp)&&"function"!=typeof(null==r?void 0:r.observable))return _vueVersion=3,_vueVersion;const o=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==o?void 0:o.Vue)?void 0:e.version){const e=parseVersion$1(o.Vue.version);if(null!==e)return _vueVersion=e,_vueVersion}if(null==(t=null==o?void 0:o.apps)?void 0:t.length)return _vueVersion=3,_vueVersion}return null===_vueVersion&&("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."),_vueVersion=3),_vueVersion}function setVueVersion(e){_vueVersion=e,_isVue2=2===e||2.7===e,_isVue27=2.7===e,_isVue3=3===e}function resetVueVersion(){_vueVersion=null,_isVue2=null,_isVue27=null,_isVue3=null}function isVue2(){if(null===_isVue2){const e=getVueVersion();_isVue2=2===e||2.7===e}return _isVue2}function isVue27(){return null===_isVue27&&(_isVue27=2.7===getVueVersion()),_isVue27}function isVue3(){return null===_isVue3&&(_isVue3=3===getVueVersion()),_isVue3}const isBrowser=()=>"undefined"!=typeof window&&"undefined"!=typeof document,isSSR$2=()=>!isBrowser(),supportsPassive=()=>{if(!isBrowser())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},supportsIntersectionObserver=()=>isBrowser()&&"IntersectionObserver"in window,supportsResizeObserver=()=>isBrowser()&&"ResizeObserver"in window,supportsClipboard=()=>isBrowser()&&"clipboard"in navigator,supportsMutationObserver=()=>isBrowser()&&"MutationObserver"in window,DEFAULT_BROWSER_TARGETS={chrome:">= 80",firefox:">= 78",safari:">= 14",edge:">= 88",samsung:">= 12"},DEFAULT_FALLBACK_CONFIG={intersectionObserver:!0,resizeObserver:!0,clipboard:!0,mutationObserver:!0,pointerEvents:!0,touchEvents:!0};let _browserInfo=null,_compatibilityConfig={targets:DEFAULT_BROWSER_TARGETS,fallback:DEFAULT_FALLBACK_CONFIG,polyfill:"auto",warnOnUnsupported:!0,strictMode:!1};function parseVersion(e){const t=e.match(/(\d+)/);return t?parseInt(t[1],10):0}function detectBrowser(){if(!isBrowser())return{type:"unknown",version:"0"};const e=navigator.userAgent;if(/MicroMessenger/i.test(e)){const t=e.match(/MicroMessenger\/(\d+\.?\d*)/);return{type:"wechat",version:(null==t?void 0:t[1])||"0"}}if(/UCBrowser|UBrowser/i.test(e)){const t=e.match(/UCBrowser\/(\d+\.?\d*)/);return{type:"uc",version:(null==t?void 0:t[1])||"0"}}if(/SamsungBrowser/i.test(e)){const t=e.match(/SamsungBrowser\/(\d+\.?\d*)/);return{type:"samsung",version:(null==t?void 0:t[1])||"0"}}if(/OPR|Opera/i.test(e)){const t=e.match(/(?:OPR|Opera)\/(\d+\.?\d*)/);return{type:"opera",version:(null==t?void 0:t[1])||"0"}}if(/Edg/i.test(e)){const t=e.match(/Edg\/(\d+\.?\d*)/);return{type:"edge",version:(null==t?void 0:t[1])||"0"}}if(/Firefox/i.test(e)){const t=e.match(/Firefox\/(\d+\.?\d*)/);return{type:"firefox",version:(null==t?void 0:t[1])||"0"}}if(/Safari/i.test(e)&&!/Chrome/i.test(e)){const t=e.match(/Version\/(\d+\.?\d*)/);return{type:"safari",version:(null==t?void 0:t[1])||"0"}}if(/Chrome/i.test(e)){const t=e.match(/Chrome\/(\d+\.?\d*)/);return{type:"chrome",version:(null==t?void 0:t[1])||"0"}}return{type:"unknown",version:"0"}}function detectPlatform(){if(!isBrowser())return"desktop";const e=navigator.userAgent;return/tablet|ipad/i.test(e)||/android/i.test(e)&&!/mobile/i.test(e)?"tablet":/mobile|iphone|ipod|android.*mobile/i.test(e)?"mobile":"desktop"}function detectOS(){if(!isBrowser())return"unknown";const e=navigator.userAgent;return/Windows/i.test(e)?"Windows":/Mac/i.test(e)?"macOS":/Linux/i.test(e)?"Linux":/Android/i.test(e)?"Android":/iOS|iPhone|iPad|iPod/i.test(e)?"iOS":"unknown"}function detectFeatures(){if(!isBrowser())return createEmptyFeatures();const e=window,t=navigator;return{passive:checkPassiveSupport(),intersectionObserver:"IntersectionObserver"in e,resizeObserver:"ResizeObserver"in e,mutationObserver:"MutationObserver"in e,clipboard:"clipboard"in t,clipboardItem:"ClipboardItem"in e,clipboardWrite:checkClipboardWrite(),clipboardRead:checkClipboardRead(),pointerEvents:"PointerEvent"in e,touchEvents:"ontouchstart"in e||t.maxTouchPoints>0,webAnimations:"animate"in Element.prototype,customElements:"customElements"in e,shadowDom:"attachShadow"in Element.prototype,cssVariables:checkCSSSupport("--test","test"),cssGrid:checkCSSSupport("grid-template-columns","1fr"),cssFlexbox:checkCSSSupport("display","flex"),es2020:checkES2020Support(),es2021:checkES2021Support(),es2022:checkES2022Support()}}function createEmptyFeatures(){return{passive:!1,intersectionObserver:!1,resizeObserver:!1,mutationObserver:!1,clipboard:!1,clipboardItem:!1,clipboardWrite:!1,clipboardRead:!1,pointerEvents:!1,touchEvents:!1,webAnimations:!1,customElements:!1,shadowDom:!1,cssVariables:!1,cssGrid:!1,cssFlexbox:!1,es2020:!1,es2021:!1,es2022:!1}}function checkPassiveSupport(){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}function checkClipboardWrite(){if(!isBrowser())return!1;const e=navigator;return!!e.clipboard&&("function"==typeof e.clipboard.writeText||"function"==typeof e.clipboard.write)}function checkClipboardRead(){if(!isBrowser())return!1;const e=navigator;return!!e.clipboard&&("function"==typeof e.clipboard.readText||"function"==typeof e.clipboard.read)}function checkCSSSupport(e,t){if(!isBrowser())return!1;const n=document.createElement("div");return n.style[e]=t,n.style[e]===t}function checkES2020Support(){try{return eval("const a = {}; a?.b?.c ?? null"),!0}catch(e){return!1}}function checkES2021Support(){try{return eval("let a = false; a ||= true"),!0}catch(e){return!1}}function checkES2022Support(){try{return eval("class A { static x = 1 }"),!0}catch(e){return!1}}function determineSupportLevel(e,t){switch(e){case"chrome":return t>=80?"full":t>=60?"partial":"none";case"firefox":return t>=78?"full":t>=60?"partial":"none";case"safari":return t>=14?"full":t>=12?"partial":"none";case"edge":return t>=88?"full":t>=79?"partial":"none";case"samsung":return t>=12?"full":t>=10?"partial":"none";case"opera":return t>=67?"full":t>=50?"partial":"none";default:return"partial"}}function getBrowserInfo(){if(_browserInfo)return _browserInfo;const{type:e,version:t}=detectBrowser(),n=parseVersion(t),r=detectPlatform(),o=detectOS(),i=determineSupportLevel(e,n),s=detectFeatures();return _browserInfo={type:e,version:t,major:n,platform:r,os:o,supportLevel:i,features:s},_browserInfo}function configureCompatibility(e){_compatibilityConfig=__spreadProps(__spreadValues(__spreadValues({},_compatibilityConfig),e),{targets:__spreadValues(__spreadValues({},_compatibilityConfig.targets),e.targets),fallback:__spreadValues(__spreadValues({},_compatibilityConfig.fallback),e.fallback)})}function getCompatibilityConfig(){return __spreadValues({},_compatibilityConfig)}function resetBrowserInfo(){_browserInfo=null}function isFeatureSupported(e){return getBrowserInfo().features[e]}function meetsMinimumRequirements(){return"none"!==getBrowserInfo().supportLevel}function isFullySupported(){return"full"===getBrowserInfo().supportLevel}function isUnsupportedBrowser(){return"none"===getBrowserInfo().supportLevel}function getUnsupportedFeatures(){const e=getBrowserInfo();return Object.entries(e.features).filter(([,e])=>!e).map(([e])=>e)}let _warnedFeatures=new Set;function warnUnsupportedFeatures(){if(!_compatibilityConfig.warnOnUnsupported)return;const e=getBrowserInfo();if("none"===e.supportLevel)return void console.warn(`[Directix] Your browser (${e.type} ${e.version}) is not officially supported. Some features may not work correctly.`);"partial"===e.supportLevel&&console.warn(`[Directix] Your browser (${e.type} ${e.version}) has partial support. Some features may be degraded.`);const t=getUnsupportedFeatures();t.length>0&&console.warn(`[Directix] Some features are not supported in your browser: ${t.join(", ")}`)}function warnUnsupportedFeatureOnce(e,t){if(_warnedFeatures.has(e))return;_warnedFeatures.add(e);const n=t?`[Directix] "${e}" is not supported, using fallback: ${t}`:`[Directix] "${e}" is not supported in this browser`;console.warn(n)}function clearWarnedFeatures(){_warnedFeatures=new Set}function generateCompatibilityReport(){const e=getBrowserInfo(),t=getCompatibilityConfig(),n=getUnsupportedFeatures(),r=[],o=[];return!e.features.intersectionObserver&&t.fallback.intersectionObserver&&(r.push("IntersectionObserver is not supported - lazy loading will use fallback"),o.push("Consider adding intersection-observer polyfill for better performance")),!e.features.resizeObserver&&t.fallback.resizeObserver&&(r.push("ResizeObserver is not supported - resize detection will use fallback"),o.push("Consider adding resize-observer-polyfill")),!e.features.clipboard&&t.fallback.clipboard&&(r.push("Clipboard API is not supported - copy/paste will use fallback"),o.push("Copy functionality will use execCommand fallback")),e.features.passive||r.push("Passive event listeners are not supported - scroll performance may be affected"),"partial"===e.supportLevel&&o.push("Consider upgrading your browser for the best experience"),{browser:e,config:t,unsupportedFeatures:n,warnings:r,recommendations:o}}const _polyfills=new Map;function registerPolyfill(e,t=!1){_polyfills.set(e,{name:e,loaded:!1,required:t})}function markPolyfillLoaded(e){const t=_polyfills.get(e);t&&(t.loaded=!0)}function isPolyfillLoaded(e){var t,n;return null!=(n=null==(t=_polyfills.get(e))?void 0:t.loaded)&&n}function getMissingPolyfills(){return Array.from(_polyfills.values()).filter(e=>e.required&&!e.loaded).map(e=>e.name)}function getPolyfillStatus(){const e={};return _polyfills.forEach((t,n)=>{e[n]={loaded:t.loaded,required:t.required}}),e}const BROWSER_TARGETS=[{name:"Chrome",minVersion:80,currentVersion:120,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Firefox",minVersion:78,currentVersion:120,engine:"gecko",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Safari",minVersion:14,currentVersion:17,engine:"webkit",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0,notes:"Partial support"},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Edge",minVersion:88,currentVersion:120,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Samsung Internet",minVersion:12,currentVersion:23,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]}],MOBILE_DEVICES=[{name:"iPhone",os:"iOS",osMinVersion:"14.0",browser:"Safari",browserMinVersion:"14"},{name:"iPad",os:"iPadOS",osMinVersion:"14.0",browser:"Safari",browserMinVersion:"14"},{name:"Android Phone",os:"Android",osMinVersion:"8.0",browser:"Chrome",browserMinVersion:"80"},{name:"Android Tablet",os:"Android",osMinVersion:"8.0",browser:"Chrome",browserMinVersion:"80"},{name:"Samsung Galaxy",os:"Android",osMinVersion:"10",browser:"Samsung Internet",browserMinVersion:"12"}],FEATURE_MATRIX={intersectionObserver:{name:"IntersectionObserver",description:"API for detecting element visibility",browserSupport:{Chrome:{minVersion:51},Firefox:{minVersion:55},Safari:{minVersion:12.1},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!0},resizeObserver:{name:"ResizeObserver",description:"API for detecting element size changes",browserSupport:{Chrome:{minVersion:64},Firefox:{minVersion:69},Safari:{minVersion:13.1},Edge:{minVersion:79},Samsung:{minVersion:8}},fallbackAvailable:!0},mutationObserver:{name:"MutationObserver",description:"API for observing DOM changes",browserSupport:{Chrome:{minVersion:18},Firefox:{minVersion:14},Safari:{minVersion:6},Edge:{minVersion:12},Samsung:{minVersion:1.5}},fallbackAvailable:!1},clipboardApi:{name:"Clipboard API",description:"Modern async clipboard API",browserSupport:{Chrome:{minVersion:66},Firefox:{minVersion:63},Safari:{minVersion:13.1,notes:"Partial support"},Edge:{minVersion:79},Samsung:{minVersion:9}},fallbackAvailable:!0},pointerEvents:{name:"Pointer Events",description:"Unified pointer input API",browserSupport:{Chrome:{minVersion:55},Firefox:{minVersion:59},Safari:{minVersion:13},Edge:{minVersion:12},Samsung:{minVersion:6}},fallbackAvailable:!0},cssGrid:{name:"CSS Grid",description:"CSS Grid Layout",browserSupport:{Chrome:{minVersion:57},Firefox:{minVersion:52},Safari:{minVersion:10.1},Edge:{minVersion:16},Samsung:{minVersion:6}},fallbackAvailable:!1},cssVariables:{name:"CSS Variables",description:"CSS Custom Properties",browserSupport:{Chrome:{minVersion:49},Firefox:{minVersion:31},Safari:{minVersion:9.1},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!1},passiveEvents:{name:"Passive Event Listeners",description:"Passive event listener option",browserSupport:{Chrome:{minVersion:51},Firefox:{minVersion:49},Safari:{minVersion:10},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!1}};function isBrowserSupported(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase());return!!n&&t>=n.minVersion}function getFeatureSupport(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase());return null==n?void 0:n.features.find(e=>e.name.toLowerCase()===t.toLowerCase())}function getBrowsersSupportingFeature(e){return BROWSER_TARGETS.filter(t=>t.features.some(t=>t.name.toLowerCase()===e.toLowerCase()&&t.supported))}function getBrowserCompatibilityReport(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase()),r=!!n&&t>=n.minVersion,o=(null==n?void 0:n.features)||[],i=[];return!r&&n&&i.push(`Upgrade ${e} to version ${n.minVersion}+`),o.forEach(e=>{!e.supported&&e.polyfillAvailable&&i.push(`Enable polyfill for ${e.name}`)}),{supported:r,features:o,recommendations:i}}function generateBrowserslistConfig(){const e=[];return BROWSER_TARGETS.forEach(t=>{const n=t.name.toLowerCase().replace(" ","");"samsung internet"===n?e.push(`Samsung >= ${t.minVersion}`):"chrome"===n?e.push(`Chrome >= ${t.minVersion}`):"firefox"===n?e.push(`Firefox >= ${t.minVersion}`):"safari"===n?e.push(`Safari >= ${t.minVersion}`):"edge"===n&&e.push(`Edge >= ${t.minVersion}`)}),e.push("iOS >= 14"),e.push("Android >= 80"),e}function getCompatibilityMatrix(){return{browsers:BROWSER_TARGETS,features:FEATURE_MATRIX,mobileDevices:MOBILE_DEVICES}}const DEFAULT_CONFIG_CENTER_CONFIG={sources:[],mergeStrategy:"deepMerge",cache:{key:"__directix_config",enabled:!0,ttl:3e5},sync:{enabled:!1},validation:{enabled:!1},encryption:{enabled:!1,algorithm:"none"}};let _config$4=DEFAULT_CONFIG_CENTER_CONFIG,_values=new Map,_broadcastChannel=null,_refreshTimer=null,_initialized=!1,_snapshots=[];const _listeners=new Map,_globalListeners=new Set;function configureConfigCenter(e){_config$4=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG),e),{cache:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.cache),e.cache),sync:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.sync),e.sync),validation:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.validation),e.validation),encryption:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.encryption),e.encryption)}),_config$4.sync.enabled&&"undefined"!=typeof BroadcastChannel&&(_broadcastChannel=new BroadcastChannel(_config$4.sync.broadcastChannel||"directix-config"),_broadcastChannel.onmessage=e=>{var t,n;"config-update"===e.data.type&&(_values.set(e.data.key,e.data.value),null==(n=(t=_config$4.sync).onUpdate)||n.call(t,e.data.key,e.data.value))})}function getConfigCenterConfig(){return __spreadValues({},_config$4)}function initConfigCenter(){return __async(this,null,function*(){if(_initialized)return;const e=[..._config$4.sources].sort((e,t)=>t.priority-e.priority);for(const t of e)try{mergeValues(yield loadFromSource(t))}catch(e){console.warn(`[Directix Config] Failed to load from ${t.type}:`,e)}setupRefreshTimer(),loadCachedConfig(),_initialized=!0})}function loadFromSource(e){return __async(this,null,function*(){switch(e.type){case"static":return e.static||{};case"api":return loadFromAPI(e);case"localStorage":case"sessionStorage":return loadFromStorage(e);default:return{}}})}function loadFromAPI(e){return __async(this,null,function*(){if(!e.api)return{};try{const t=yield fetch(e.api.url,{method:e.api.method,headers:e.api.headers});if(!t.ok)throw new Error(`API returned ${t.status}`);return yield t.json()}catch(e){throw new Error(`API config load failed: ${e}`)}})}function loadFromStorage(e){var t;if("undefined"==typeof window)return{};const n="localStorage"===e.type?localStorage:sessionStorage,r=(null==(t=e.storage)?void 0:t.key)||"directix-config",o=n.getItem(r);if(!o)return{};try{return JSON.parse(o)}catch(e){return{}}}function mergeValues(e){for(const[t,n]of Object.entries(e)){const e=_values.get(t);"override"===_config$4.mergeStrategy?_values.set(t,n):"merge"===_config$4.mergeStrategy?_values.set(t,__spreadValues(__spreadValues({},e),n)):_values.set(t,deepMerge$1(e,n)),e!==n&&emitChange(t,e,n)}}function deepMerge$1(e,t){if("object"!=typeof e||"object"!=typeof t)return t;const n=__spreadValues({},e);for(const r of Object.keys(t))"object"==typeof t[r]&&"object"==typeof e[r]?n[r]=deepMerge$1(e[r],t[r]):n[r]=t[r];return n}function setupRefreshTimer(){const e=_config$4.sources.filter(e=>{var t;return"api"===e.type&&(null==(t=e.api)?void 0:t.refreshInterval)});if(e.length>0&&"undefined"!=typeof window){const t=Math.min(...e.map(e=>e.api.refreshInterval));_refreshTimer=window.setInterval(()=>__async(null,null,function*(){for(const t of e)try{mergeValues(yield loadFromAPI(t))}catch(e){}}),t)}}function loadCachedConfig(){if(_config$4.cache.enabled&&"undefined"!=typeof localStorage)try{const e=localStorage.getItem(_config$4.cache.key);if(e){const{config:t,timestamp:n}=JSON.parse(e);Date.now()-n<_config$4.cache.ttl&&mergeValues(t)}}catch(e){}}function saveToCache(){if(_config$4.cache.enabled&&"undefined"!=typeof localStorage)try{const e={config:Object.fromEntries(_values),timestamp:Date.now()};localStorage.setItem(_config$4.cache.key,JSON.stringify(e))}catch(e){}}function getConfig(e,t){var n;if(!_values.has(e))return t;const r=_values.get(e);if(_config$4.validation.enabled&&(null==(n=_config$4.validation.schema)?void 0:n[e])){if(!validateValue(e,r))return null!=t?t:_config$4.validation.schema[e].default}return r}function setConfig(e,t,n="manual"){var r;const o=_values.get(e);if(_config$4.validation.enabled&&(null==(r=_config$4.validation.schema)?void 0:r[e])&&!validateValue(e,t))throw new Error(`Invalid config value for key: ${e}`);_values.set(e,t),saveToCache(),emitChange(e,o,t,n),_broadcastChannel&&_broadcastChannel.postMessage({key:e,type:"config-update",value:t}),createSnapshot(n)}function validateValue(e,t){var n;const r=null==(n=_config$4.validation.schema)?void 0:n[e];if(!r)return!0;if(r.required&&void 0===t)return!1;if(r.type){if((Array.isArray(t)?"array":typeof t)!==r.type)return!1}if(r.enum&&!r.enum.includes(t))return!1;if("number"===r.type){if(void 0!==r.min&&t<r.min)return!1;if(void 0!==r.max&&t>r.max)return!1}return!(r.pattern&&"string"===r.type&&!new RegExp(r.pattern).test(t))&&!(r.validator&&!r.validator(t))}function deleteConfig(e){const t=_values.get(e);_values.delete(e),saveToCache(),emitChange(e,t,void 0,"manual")}function getAllConfig(){return Object.fromEntries(_values)}function watchConfig(e,t){return"*"===e?(_globalListeners.add(t),()=>_globalListeners.delete(t)):(_listeners.has(e)||_listeners.set(e,new Set),_listeners.get(e).add(t),()=>{var n;return null==(n=_listeners.get(e))?void 0:n.delete(t)})}function emitChange(e,t,n,r="unknown"){var o;const i={key:e,oldValue:t,newValue:n,source:r,timestamp:Date.now()};null==(o=_listeners.get(e))||o.forEach(e=>e(i)),_globalListeners.forEach(e=>e(i))}function createSnapshot(e){const t=Object.fromEntries(_values),n=generateHash(t);_snapshots.push({version:`v${_snapshots.length+1}`,config:t,timestamp:Date.now(),source:e,hash:n}),_snapshots.length>20&&(_snapshots=_snapshots.slice(-20))}function generateHash(e){const t=JSON.stringify(e);let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n.toString(16)}function getConfigSnapshots(){return[..._snapshots]}function rollbackConfig(e){const t=_snapshots.find(t=>t.version===e);if(!t)return!1;_values=new Map(Object.entries(t.config)),saveToCache();for(const[e,t]of _values)emitChange(e,void 0,t,"rollback");return!0}function exportConfig(e="json"){const t=Object.fromEntries(_values);switch(e){case"yaml":return toYAML(t);case"env":return toEnv(t);default:return JSON.stringify(t,null,2)}}function toYAML(e,t=0){const n=[],r=" ".repeat(t);for(const[o,i]of Object.entries(e))if("object"!=typeof i||Array.isArray(i)){const e="string"==typeof i?`"${i}"`:String(i);n.push(`${r}${o}: ${e}`)}else n.push(`${r}${o}:`),n.push(toYAML(i,t+1));return n.join("\n")}function toEnv(e,t=""){const n=[];for(const[r,o]of Object.entries(e)){const e=t?`${t}_${r.toUpperCase()}`:r.toUpperCase();"object"!=typeof o||Array.isArray(o)?n.push(`${e}=${o}`):n.push(toEnv(o,e))}return n.join("\n")}function importConfig(e,t="json",n=!0){return __async(this,null,function*(){let r;switch(t){case"yaml":r=parseYAML(e);break;case"env":r=parseEnv(e);break;default:r=JSON.parse(e)}n?mergeValues(r):_values=new Map(Object.entries(r)),saveToCache(),createSnapshot("import")})}function parseYAML(e){var t;const n={},r=e.split("\n");for(const e of r){if(!e.trim()||e.trim().startsWith("#"))continue;const r=e.match(/^(\s*)([^:]+):\s*(.+)?$/);if(r){const e=r[2].trim(),o=null==(t=r[3])?void 0:t.trim();o&&(o.startsWith('"')&&o.endsWith('"')?n[e]=o.slice(1,-1):"true"===o?n[e]=!0:"false"===o?n[e]=!1:isNaN(Number(o))?n[e]=o:n[e]=Number(o))}}return n}function parseEnv(e){const t={};for(const n of e.split("\n")){if(!n.trim()||n.startsWith("#"))continue;const[e,r]=n.split("=");e&&r&&(t[e]=r)}return t}function resetConfigCenter(){if(_refreshTimer&&(clearInterval(_refreshTimer),_refreshTimer=null),_values.clear(),_listeners.clear(),_globalListeners.clear(),_snapshots=[],_initialized=!1,_broadcastChannel&&(_broadcastChannel.close(),_broadcastChannel=null),"undefined"!=typeof localStorage)try{localStorage.removeItem(_config$4.cache.key)}catch(e){}_config$4=DEFAULT_CONFIG_CENTER_CONFIG}function syncConfigToRemote(e,t){return __async(this,null,function*(){var n;try{return(yield fetch(e,{method:null!=(n=null==t?void 0:t.method)?n:"POST",headers:__spreadValues({"Content-Type":"application/json"},null==t?void 0:t.headers),body:JSON.stringify(Object.fromEntries(_values))})).ok}catch(e){return!1}})}function getConfigStats(){return{totalKeys:_values.size,snapshotCount:_snapshots.length,listenerCount:_listeners.size+_globalListeners.size,cacheEnabled:_config$4.cache.enabled,syncEnabled:_config$4.sync.enabled}}function defineDirective(e){var t;const n=e,{name:r,version:o,ssr:i,defaults:s}=n,a=__objRest(n,["name","version","ssr","defaults"]);if(isSSR$2()&&!i)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.`),createNoOpDirective();return createLazyDirective({mounted:a.mounted?(e,t,n)=>{a.mounted(e,applyDefaults(t,s),n)}:void 0,updated:a.updated?(e,t,n,r,o)=>{a.updated(e,applyDefaults(t,s),n,r,o)}:void 0,unmounted:a.unmounted})}function createLazyDirective(e){let t=null;function n(n){return function(r,o,i,s){var a,l;null==(l=(t||(t=2===getVueVersion()?createVue2Directive(e):createVue3Directive(e)),a=t)[n])||l.call(a,r,o,i,s)}}return{bind:n("bind"),inserted:n("inserted"),update:n("update"),componentUpdated:n("componentUpdated"),unbind:n("unbind"),created:n("created"),beforeMount:n("beforeMount"),mounted:n("mounted"),beforeUpdate:n("beforeUpdate"),updated:n("updated"),beforeUnmount:n("beforeUnmount"),unmounted:n("unmounted")}}function applyDefaults(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 createNoOpDirective(){return{mounted:()=>{},updated:()=>{},unmounted:()=>{}}}function defineDirectiveGroup(e,t){return{name:e,directives:t,install(n,r){Object.entries(t).forEach(([t,r])=>{const o=`${e}-${t}`;n.directive(o,r)})}}}const state$1={enabled:!1,directives:new Map,plugins:new Map,events:[],maxEvents:100};function getDevtoolsHook(){if(!isBrowser())return null;return window.__VUE_DEVTOOLS_GLOBAL_HOOK__||null}function isDevtoolsAvailable(){return null!==getDevtoolsHook()}function enableDevtools(){if(!isBrowser())return;const e=getDevtoolsHook();e?(state$1.enabled=!0,isVue3()?setupVue3Devtools(e):setupVue2Devtools(e),console.info("[Directix] DevTools integration enabled")):console.warn("[Directix] Vue DevTools not detected. Install Vue DevTools extension to enable debugging.")}function setupVue3Devtools(e){e.on("app:init",e=>{registerInspector(e)}),e.on("component:updated",e=>{})}function setupVue2Devtools(e){e.Vue&&(e.emit("inspector:add",{id:"directix",app:e.Vue,label:"Directix",icon:"view_grid",treeFilterPlaceholder:"Search directives"}),e.on("inspector:tree",t=>{t.app===e.Vue&&"directix"===t.inspectorId&&(t.rootNodes=getDirectiveTree())}),e.on("inspector:state",t=>{t.app===e.Vue&&"directix"===t.inspectorId&&(t.state=getDirectiveState(t.nodeId))}))}function registerInspector(e){const t=getDevtoolsHook();if(!t)return;const n={id:"directix",app:e,label:"Directix",icon:"view_grid",treeFilterPlaceholder:"Search directives..."};t.emit("custom-inspector:add",n),t.on("custom-inspector:tree",e=>{"directix"===e.inspectorId&&(e.rootNodes=getDirectiveTree())}),t.on("custom-inspector:state",e=>{"directix"===e.inspectorId&&(e.state=getDirectiveState(e.nodeId))})}function getDirectiveTree(){const e=[],t=Array.from(state$1.directives.entries()).map(([e,t])=>({id:`directive:${e}`,label:`v-${e}`,children:[],tags:[{label:`${t.bindings} bindings`,textColor:6710886,backgroundColor:15658734}]}));e.push({id:"directives",label:"Directives",children:t,tags:[{label:`${state$1.directives.size}`,textColor:16777215,backgroundColor:4372611}]});const n=Array.from(state$1.plugins.entries()).map(([e,t])=>({id:`plugin:${e}`,label:e,children:[],tags:[{label:t.version,textColor:6710886,backgroundColor:15658734}]}));e.push({id:"plugins",label:"Plugins",children:n,tags:[{label:`${state$1.plugins.size}`,textColor:16777215,backgroundColor:4372611}]});const r=state$1.events.slice(-20).map((e,t)=>({id:`event:${t}`,label:`${e.type}:${e.name}`,children:[],tags:[{label:new Date(e.timestamp).toLocaleTimeString(),textColor:6710886,backgroundColor:15658734}]}));return e.push({id:"events",label:"Events",children:r,tags:[{label:`${state$1.events.length}`,textColor:16777215,backgroundColor:4372611}]}),e}function getDirectiveState(e){if(e.startsWith("directive:")){const t=e.replace("directive:",""),n=state$1.directives.get(t);if(n)return[{key:"info",value:{name:n.name,bindings:n.bindings,lastUpdated:new Date(n.lastUpdated).toLocaleString(),element:n.element||"unknown",options:n.options},editable:!1}]}if(e.startsWith("plugin:")){const t=e.replace("plugin:",""),n=state$1.plugins.get(t);if(n)return[{key:"info",value:{name:n.name,version:n.version,description:n.description,enabled:n.enabled,registeredAt:new Date(n.registeredAt).toLocaleString()},editable:!1}]}if(e.startsWith("event:")){const t=Number.parseInt(e.replace("event:","")),n=state$1.events[state$1.events.length-20+t];if(n)return[{key:"event",value:{name:n.name,type:n.type,timestamp:new Date(n.timestamp).toLocaleString(),data:n.data},editable:!1}]}return[]}function trackDirective(e,t){if(!state$1.enabled)return;const n=state$1.directives.get(e);n?state$1.directives.set(e,__spreadValues(__spreadProps(__spreadValues({},n),{bindings:n.bindings+1,lastUpdated:Date.now()}),t)):state$1.directives.set(e,__spreadValues({name:e,bindings:1,lastUpdated:Date.now()},t)),addEvent("directive:mounted",e)}function untrackDirective(e){if(!state$1.enabled)return;const t=state$1.directives.get(e);t&&state$1.directives.set(e,__spreadProps(__spreadValues({},t),{bindings:Math.max(0,t.bindings-1),lastUpdated:Date.now()})),addEvent("directive:unmounted",e)}function trackPlugin(e){state$1.enabled&&(state$1.plugins.set(e.name,__spreadProps(__spreadValues({},e),{registeredAt:Date.now()})),addEvent("plugin:install",e.name,{version:e.version}))}function untrackPlugin(e){if(!state$1.enabled)return;const t=state$1.plugins.get(e);t&&state$1.plugins.set(e,__spreadProps(__spreadValues({},t),{enabled:!1})),addEvent("plugin:uninstall",e)}function addEvent(e,t,n){state$1.events.push({name:t,type:e,timestamp:Date.now(),data:n}),state$1.events.length>state$1.maxEvents&&(state$1.events=state$1.events.slice(-100))}function disableDevtools(){state$1.enabled=!1}function getDevtoolsState(){return{enabled:state$1.enabled,directiveCount:state$1.directives.size,pluginCount:state$1.plugins.size,eventCount:state$1.events.length}}function clearDevtoolsState(){state$1.directives.clear(),state$1.plugins.clear(),state$1.events=[]}const DEFAULT_EDGE_CASE_CONFIG={ssr:{enabled:!0,warnOnUnsupported:!0,fallbackBehavior:"skip"},domReady:{waitForReady:!0,timeout:5e3,retryCount:3},memory:{maxObservers:100,cleanupInterval:6e4,warnThreshold:80},errorRecovery:{enabled:!0,maxRetries:3,retryDelay:100},mobile:{touchDelay:300,debounceResize:150,preventDefaultOnTouch:!1}};let _config$3=DEFAULT_EDGE_CASE_CONFIG,_warnings=[],_observerCount=0,_cleanupTimer=null;function configureEdgeCase(e){_config$3=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG),e),{ssr:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.ssr),e.ssr),domReady:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.domReady),e.domReady),memory:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.memory),e.memory),errorRecovery:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.errorRecovery),e.errorRecovery),mobile:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.mobile),e.mobile)}),_config$3.memory.cleanupInterval>0&&"undefined"!=typeof window&&startCleanupTimer()}function getEdgeCaseConfig(){return __spreadValues({},_config$3)}function isSSR$1(){return"undefined"==typeof window||"undefined"==typeof document}function handleSSRUnsupported(e,t){if(!_config$3.ssr.enabled)return{success:!0,recovered:!1,retryCount:0};switch(_config$3.ssr.warnOnUnsupported&&logWarning("ssr-unsupported",`Operation "${e}" is not supported in SSR environment`,t),_config$3.ssr.fallbackBehavior){case"skip":case"mock":return{success:!0,recovered:!0,retryCount:0};case"throw":return{success:!1,error:new Error(`SSR unsupported: ${e}`),recovered:!1,retryCount:0};default:return{success:!0,recovered:!1,retryCount:0}}}function waitForDOMReady(){return new Promise((e,t)=>{if(!isSSR$1()&&"loading"!==document.readyState)return void e();if(!_config$3.domReady.waitForReady)return void e();const n=setTimeout(()=>{logWarning("dom-not-ready","DOM ready timeout exceeded"),t(new Error("DOM ready timeout"))},_config$3.domReady.timeout),r=()=>{clearTimeout(n),document.removeEventListener("DOMContentLoaded",r),e()};isSSR$1()?(clearTimeout(n),e()):document.addEventListener("DOMContentLoaded",r)})}function safeQueryElement(e,t){return __async(this,null,function*(){var n,r,o;const i=null!=(n=null==t?void 0:t.retryCount)?n:_config$3.domReady.retryCount,s=null!=(r=null==t?void 0:t.retryDelay)?r:_config$3.errorRecovery.retryDelay,a=null!=(o=null==t?void 0:t.parent)?o:document;for(let t=0;t<=i;t++){const n=a.querySelector(e);if(n)return n;t<i&&(yield new Promise(e=>setTimeout(e,s)))}return logWarning("element-not-found",`Element not found: ${e}`),null})}function trackObserver(){return _observerCount++,_observerCount>_config$3.memory.maxObservers?(logWarning("observer-limit",`Observer limit exceeded: ${_observerCount}/${_config$3.memory.maxObservers}`),!1):(_observerCount>_config$3.memory.warnThreshold&&logWarning("observer-limit",`Observer count approaching limit: ${_observerCount}/${_config$3.memory.maxObservers}`),!0)}function untrackObserver(){_observerCount>0&&_observerCount--}function getObserverCount(){return _observerCount}function withErrorRecovery(e,t){return __async(this,null,function*(){var n,r,o,i;if(!_config$3.errorRecovery.enabled)try{return{value:yield e(),success:!0,recovered:!1,retryCount:0}}catch(e){return{success:!1,error:e,recovered:!1,retryCount:0}}const s=null!=(n=null==t?void 0:t.maxRetries)?n:_config$3.errorRecovery.maxRetries,a=null!=(r=null==t?void 0:t.retryDelay)?r:_config$3.errorRecovery.retryDelay,l=null!=(o=null==t?void 0:t.fallbackValue)?o:_config$3.errorRecovery.fallbackValue;let c;for(let n=0;n<=s;n++)try{return{value:yield e(),success:!0,recovered:n>0,retryCount:n}}catch(e){c=e,null==(i=null==t?void 0:t.onError)||i.call(t,c,n),n<s&&(yield new Promise(e=>setTimeout(e,a*(n+1))))}return void 0!==l?{value:l,success:!0,recovered:!0,retryCount:s}:{success:!1,error:c,recovered:!1,retryCount:s}})}function handleTouchConflict(e,t,n){if(!_config$3.mobile.preventDefaultOnTouch)return!1;return!(!e.hasAttribute("data-prevent-touch")&&!e.closest("[data-prevent-touch]"))&&(t.preventDefault(),logWarning("touch-conflict","Touch event prevented due to conflict",n),!0)}function createDebouncedResizeHandler(e,t){let n=null;const r=null!=t?t:_config$3.mobile.debounceResize;return()=>{null!==n&&clearTimeout(n),n=window.setTimeout(()=>{e(),n=null},r)}}function detectResizeLoop(e,t=3){const n=Date.now(),r=detectResizeLoop._timestamps||[];return detectResizeLoop._timestamps=r.filter(e=>n-e<1e3),detectResizeLoop._timestamps.push(n),detectResizeLoop._timestamps.length>t&&(logWarning("resize-loop","Potential resize loop detected"),!0)}function detectScrollJank(e,t=50){return e>t&&(logWarning("scroll-jank",`Scroll jank detected: ${e}ms frame time`),!0)}function validateBinding(e,t,n){const{type:r,required:o,validator:i}=t;if(o&&null==e){const e=new Error("Binding value is required");return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}if(r&&null!=e){const t=Array.isArray(r)?r:[r],o=Array.isArray(e)?"array":typeof e;if(!t.includes(o)){const e=new Error(`Expected type ${t.join(" | ")}, got ${o}`);return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}}if(i&&!i(e)){const e=new Error("Binding validation failed");return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}return{value:e,success:!0,recovered:!1,retryCount:0}}function checkDependency(e,t){if(isSSR$1())return!1;if(t){const n=t.split(".");let r=window;for(const t of n)if(r=null==r?void 0:r[t],!r)return logWarning("missing-dependency",`Missing dependency: ${e}`),!1;return!0}return!!window[e]||(logWarning("missing-dependency",`Missing dependency: ${e}`),!1)}function logWarning(e,t,n,r){const o={type:e,message:t,element:r,directive:n,timestamp:Date.now(),handled:!0};_warnings.push(o),_warnings.length>100&&(_warnings=_warnings.slice(-100)),console.warn(`[Directix Edge Case] [${e}] ${t}${n?` (directive: ${n})`:""}`)}function getEdgeCaseWarnings(e){let t=[..._warnings];return(null==e?void 0:e.type)&&(t=t.filter(t=>t.type===e.type)),(null==e?void 0:e.directive)&&(t=t.filter(t=>t.directive===e.directive)),void 0!==(null==e?void 0:e.since)&&(t=t.filter(t=>t.timestamp>=e.since)),t}function clearEdgeCaseWarnings(){_warnings=[]}function startCleanupTimer(){null!==_cleanupTimer&&clearInterval(_cleanupTimer),_cleanupTimer=window.setInterval(()=>{_observerCount>_config$3.memory.warnThreshold&&logWarning("memory-leak",`High observer count during cleanup: ${_observerCount}`)},_config$3.memory.cleanupInterval)}function stopCleanupTimer(){null!==_cleanupTimer&&(clearInterval(_cleanupTimer),_cleanupTimer=null)}function createSafeDirectiveWrapper(e,t,n){return(r,o,i)=>__async(null,null,function*(){if(!1!==(null==n?void 0:n.requireDOM)&&isSSR$1())return void handleSSRUnsupported(e,e);if(null==n?void 0:n.validateBinding){if(!validateBinding(o.value,{validator:n.validateBinding},e).success)return}const s=yield withErrorRecovery(()=>t(r,o,i),{onError:(t,n)=>{logWarning("invalid-binding",`${e} error (attempt ${n+1}): ${t.message}`,e)}});return s.success?s.value:void 0})}function getElementWithFallback(e,t){let n=document.querySelector(e);if(!n&&t)for(const e of t)if(n=document.querySelector(e),n)break;return n||logWarning("element-not-found",`Element not found: ${e}`),n}function isInViewport(e){if(isSSR$1())return!1;try{const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}catch(e){return logWarning("element-not-found","Failed to get element bounds"),!1}}function setupCleanupOnUnload(e){isSSR$1()||(window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e))}function getMemoryStats(){return{observerCount:_observerCount,maxObservers:_config$3.memory.maxObservers,warningCount:_warnings.length,usedPercentage:_observerCount/_config$3.memory.maxObservers*100}}const DEFAULT_ENTERPRISE_PERMISSION_CONFIG={sources:[],roles:{},cache:{key:"__directix_permissions",enabled:!0,ttl:3e5},audit:{enabled:!0,logToConsole:!1},defaultBehavior:"deny"};class EnterprisePermissionManager{constructor(e={}){__publicField(this,"config"),__publicField(this,"permissions",new Set),__publicField(this,"resolvedRoles",new Map),__publicField(this,"auditLogs",[]),__publicField(this,"cacheTimestamp",0),__publicField(this,"refreshTimer",null),__publicField(this,"initialized",!1),this.config=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG),e),{cache:__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG.cache),e.cache),audit:__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG.audit),e.audit)})}initialize(){return __async(this,null,function*(){this.initialized||(yield this.loadPermissions(),this.resolveAllRoles(),this.setupRefreshTimer(),this.initialized=!0)})}loadPermissions(){return __async(this,null,function*(){const e=[];for(const t of this.config.sources)try{const n=yield this.loadFromSource(t);e.push(...n)}catch(e){console.warn(`[Directix] Failed to load permissions from ${t.type}:`,e)}this.permissions=new Set(e),this.cacheTimestamp=Date.now()})}loadFromSource(e){return __async(this,null,function*(){switch(e.type){case"static":return e.permissions||[];case"api":return this.loadFromApi(e);case"localStorage":case"sessionStorage":return this.loadFromStorage(e);case"custom":return e.custom?yield e.custom():[];default:return[]}})}loadFromApi(e){return __async(this,null,function*(){if(!e.api)return[];try{const t=yield fetch(e.api.url,{method:e.api.method,headers:e.api.headers});if(!t.ok)throw new Error(`API returned ${t.status}`);const n=yield t.json();return e.api.transform?e.api.transform(n):n.permissions||[]}catch(e){throw new Error(`API permission load failed: ${e}`)}})}loadFromStorage(e){var t,n;if("undefined"==typeof window)return[];const r=("localStorage"===e.type?localStorage:sessionStorage).getItem((null==(t=e.storage)?void 0:t.key)||"permissions");return r?(null==(n=e.storage)?void 0:n.parse)?e.storage.parse(r):JSON.parse(r):[]}resolveAllRoles(){for(const e of Object.keys(this.config.roles))this.resolveRole(e,new Set)}resolveRole(e,t){if(this.resolvedRoles.has(e))return this.resolvedRoles.get(e);if(t.has(e))return console.warn(`[Directix] Circular role inheritance detected: ${e}`),new Set;t.add(e);const n=this.config.roles[e];if(!n)return new Set;const r=new Set(n.permissions);if(n.inherits)for(const e of n.inherits){this.resolveRole(e,new Set(t)).forEach(e=>r.add(e))}return this.resolvedRoles.set(e,r),r}setupRefreshTimer(){var e;const t=this.config.sources.find(e=>{var t;return"api"===e.type&&(null==(t=e.api)?void 0:t.refreshInterval)});(null==(e=null==t?void 0:t.api)?void 0:e.refreshInterval)&&"undefined"!=typeof window&&(this.refreshTimer=window.setInterval(()=>this.loadPermissions(),t.api.refreshInterval))}check(e,t){return __async(this,null,function*(){this.config.cache.enabled&&Date.now()-this.cacheTimestamp>this.config.cache.ttl&&(yield this.loadPermissions());let n,r=!1,o="direct";if(this.config.customCheck){(yield this.config.customCheck(e,t))&&(r=!0,o="custom")}if(!r&&this.permissions.has(e)&&(r=!0,o="permission"),!r&&this.permissions.has("*")&&(r=!0,o="wildcard",n="User has wildcard permission"),!r)for(const[t,n]of this.resolvedRoles)if(n.has(e)){r=!0,o=`role:${t}`;break}if(!r)for(const[e,t]of this.resolvedRoles)if(t.has("*")){r=!0,o=`role:${e}:wildcard`,n=`Role ${e} has wildcard permission`;break}r||"allow"!==this.config.defaultBehavior||(r=!0,o="default",n="Default behavior is allow");const i={granted:r,permission:e,source:o,timestamp:Date.now(),context:t,reason:n};return this.config.audit.enabled&&this.logAudit(i),i})}checkSync(e,t){let n=!1,r="direct";if(this.permissions.has(e)&&(n=!0,r="permission"),!n&&this.permissions.has("*")&&(n=!0,r="wildcard"),!n)for(const[t,o]of this.resolvedRoles)if(o.has(e)||o.has("*")){n=!0,r=`role:${t}`;break}const o={granted:n,permission:e,source:r,timestamp:Date.now(),context:t};return this.config.audit.enabled&&this.logAudit(o),o}checkAll(e,t){return __async(this,null,function*(){const n={};for(const r of e){const e=yield this.check(r,t);n[r]=e.granted}return n})}checkAny(e,t){return __async(this,null,function*(){for(const n of e){if((yield this.check(n,t)).granted)return!0}return!1})}logAudit(e){const t={id:`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,timestamp:e.timestamp,permission:e.permission,result:e.granted?"granted":"denied",source:e.source,context:e.context,reason:e.reason,userAgent:"undefined"!=typeof navigator?navigator.userAgent:void 0,url:"undefined"!=typeof window?window.location.href:void 0};this.auditLogs.push(t),this.config.audit.onCheck&&this.config.audit.onCheck(e),e.granted&&this.config.audit.onGrant&&this.config.audit.onGrant(e),!e.granted&&this.config.audit.onDeny&&this.config.audit.onDeny(e),this.config.audit.logToConsole&&console.info(`[Directix Permission] ${e.permission}: ${e.granted?"GRANTED":"DENIED"} (${e.source})`)}getAuditLogs(e){let t=[...this.auditLogs];return e&&(e.permission&&(t=t.filter(t=>t.permission===e.permission)),e.result&&(t=t.filter(t=>t.result===e.result)),void 0!==e.since&&(t=t.filter(t=>t.timestamp>=e.since))),(null==e?void 0:e.limit)&&(t=t.slice(-e.limit)),t}clearAuditLogs(){this.auditLogs=[]}addPermission(e){this.permissions.add(e)}removePermission(e){this.permissions.delete(e)}getPermissions(){return Array.from(this.permissions)}addRole(e){this.config.roles[e.name]=e,this.resolvedRoles.clear(),this.resolveRole(e.name,new Set)}removeRole(e){delete this.config.roles[e],this.resolvedRoles.delete(e)}getRolePermissions(e){const t=this.resolvedRoles.get(e);return t?Array.from(t):[]}exportAuditLogs(e="json"){if("csv"===e){const e=["id","timestamp","permission","result","source","reason","url"],t=this.auditLogs.map(e=>[e.id,e.timestamp,e.permission,e.result,e.source,e.reason||"",e.url||""]);return[e.join(","),...t.map(e=>e.join(","))].join("\n")}return JSON.stringify(this.auditLogs,null,2)}destroy(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.permissions.clear(),this.resolvedRoles.clear(),this.auditLogs=[],this.initialized=!1}}let _globalManager=null;function configureEnterprisePermission(e){return _globalManager=new EnterprisePermissionManager(e),_globalManager}function getPermissionManager(){return _globalManager}function hasPermission$2(e,t){return __async(this,null,function*(){if(!_globalManager)return console.warn("[Directix] Permission manager not initialized"),!1;return(yield _globalManager.check(e,t)).granted})}function hasPermissionSync(e,t){return!!_globalManager&&_globalManager.checkSync(e,t).granted}function createPermissionCheck(e,t="any"){return n=>__async(null,null,function*(){if(!_globalManager)return!1;const r=Array.isArray(e)?e:[e];if("all"===t){const e=yield _globalManager.checkAll(r,n);return Object.values(e).every(Boolean)}return _globalManager.checkAny(r,n)})}const DEFAULT_FIRST_SCREEN_CONFIG={lazyLoading:{enabled:!0,rootMargin:"50px",threshold:.1,deferNonCritical:!0},codeSplitting:{enabled:!0,preloadAfter:1e3,prefetchVisible:!0},resourceHints:{preconnect:[],preload:[],prefetch:[],dnsPrefetch:[]},deferredExecution:{enabled:!0,deferDelay:100,priorityQueue:!0},criticalCSS:{extract:!1,inline:!0,inlineThreshold:14e3}};let _config$2=DEFAULT_FIRST_SCREEN_CONFIG,_deferredTasks=[],_metrics$1={},_isDOMReady=!1,_isPageLoaded=!1;function configureFirstScreen(e){_config$2=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG),e),{lazyLoading:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.lazyLoading),e.lazyLoading),codeSplitting:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.codeSplitting),e.codeSplitting),resourceHints:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.resourceHints),e.resourceHints),deferredExecution:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.deferredExecution),e.deferredExecution),criticalCSS:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.criticalCSS),e.criticalCSS)})}function getFirstScreenConfig(){return __spreadValues({},_config$2)}function isSSR(){return"undefined"==typeof window}function initFirstScreenOptimizer(){isSSR()||(injectResourceHints(),setupPerformanceObserver(),"loading"!==document.readyState?_isDOMReady=!0:document.addEventListener("DOMContentLoaded",()=>{_isDOMReady=!0,_metrics$1.domContentLoaded=performance.now()}),"complete"===document.readyState?_isPageLoaded=!0:window.addEventListener("load",()=>{_isPageLoaded=!0,_metrics$1.load=performance.now(),_config$2.deferredExecution.enabled&&executeDeferredTasks()}))}function injectResourceHints(){if(!_config$2.resourceHints)return;const e=document.head;for(const t of _config$2.resourceHints.preconnect){const n=document.createElement("link");n.rel="preconnect",n.href=t,e.appendChild(n)}for(const t of _config$2.resourceHints.dnsPrefetch){const n=document.createElement("link");n.rel="dns-prefetch",n.href=t,e.appendChild(n)}for(const t of _config$2.resourceHints.preload){const n=document.createElement("link");n.rel="preload",n.href=t,n.as=getResourceType(t),e.appendChild(n)}for(const t of _config$2.resourceHints.prefetch){const n=document.createElement("link");n.rel="prefetch",n.href=t,e.appendChild(n)}}function getResourceType(e){return e.endsWith(".js")?"script":e.endsWith(".css")?"style":/\.(woff2?|ttf|otf|eot)$/.test(e)?"font":/\.(png|jpg|jpeg|gif|webp|svg|ico)$/.test(e)?"image":"fetch"}function setupPerformanceObserver(){if("PerformanceObserver"in window)try{new PerformanceObserver(e=>{for(const t of e.getEntries())"first-paint"===t.name?_metrics$1.firstPaint=t.startTime:"first-contentful-paint"===t.name&&(_metrics$1.firstContentfulPaint=t.startTime)}).observe({type:"paint",buffered:!0});new PerformanceObserver(e=>{const t=e.getEntries();t.length>0&&(_metrics$1.largestContentfulPaint=t[t.length-1].startTime)}).observe({type:"largest-contentful-paint",buffered:!0});let e=0;new PerformanceObserver(t=>{for(const n of t.getEntries())n.hadRecentInput||(e+=n.value);_metrics$1.cumulativeLayoutShift=e}).observe({type:"layout-shift",buffered:!0});new PerformanceObserver(e=>{var t;let n=null!=(t=_metrics$1.totalBlockingTime)?t:0;for(const t of e.getEntries())n+=t.duration-50;_metrics$1.totalBlockingTime=n}).observe({type:"longtask",buffered:!0})}catch(e){}}function createLazyLoader(e){var t,n;if(isSSR()||!("IntersectionObserver"in window))return{observe:()=>{},unobserve:()=>{},disconnect:()=>{}};const r=new IntersectionObserver(t=>{var n;for(const o of t)o.isIntersecting&&(null==(n=null==e?void 0:e.onVisible)||n.call(e,o.target),r.unobserve(o.target))},{rootMargin:null!=(t=null==e?void 0:e.rootMargin)?t:_config$2.lazyLoading.rootMargin,threshold:null!=(n=null==e?void 0:e.threshold)?n:_config$2.lazyLoading.threshold});return{observe:e=>r.observe(e),unobserve:e=>r.unobserve(e),disconnect:()=>r.disconnect()}}function deferTask(e,t,n="medium"){_config$2.deferredExecution.enabled?_deferredTasks.some(t=>t.id===e)||_deferredTasks.push({id:e,priority:n,execute:t,executed:!1}):t()}function executeDeferredTasks(){return __async(this,null,function*(){if(!_config$2.deferredExecution.priorityQueue){for(const e of _deferredTasks)e.executed||(yield e.execute(),e.executed=!0);return}const e=["critical","high","medium","low"];for(const t of e){const e=_deferredTasks.filter(e=>e.priority===t&&!e.executed);if("low"===t&&"requestIdleCallback"in window)for(const t of e)window.requestIdleCallback(()=>__async(null,null,function*(){yield t.execute(),t.executed=!0}));else for(const t of e)yield t.execute(),t.executed=!0}})}function preloadModule(e){if(isSSR())return;const t=document.createElement("link");t.rel="modulepreload",t.href=e,document.head.appendChild(t)}function prefetchModule(e){if(isSSR())return;const t=document.createElement("link");t.rel="prefetch",t.href=e,t.as="script",document.head.appendChild(t)}function deferNonCriticalDirective(e,t,n=!1){!n&&_config$2.lazyLoading.deferNonCritical?"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:_config$2.codeSplitting.preloadAfter}):setTimeout(t,_config$2.codeSplitting.preloadAfter):t()}function prefetchVisibleElements(e,t,n){var r;if(!_config$2.codeSplitting.prefetchVisible||isSSR())return;const o=createLazyLoader({rootMargin:null!=(r=null==n?void 0:n.rootMargin)?r:"200px",onVisible:e=>{const n=t(e);n&&prefetchModule(n)}});document.querySelectorAll(e).forEach(e=>o.observe(e))}function getFirstScreenMetrics(){return __spreadValues({},_metrics$1)}function calculateTTI(){if(_metrics$1.load&&_metrics$1.domContentLoaded)return Math.max(_metrics$1.load,_metrics$1.domContentLoaded)}function extractCriticalCSS(){if(isSSR())return"";const e=[],t=Array.from(document.styleSheets);for(const n of t)try{const t=Array.from(n.cssRules||[]);for(const n of t)isCriticalRule(n)&&e.push(n.cssText)}catch(e){}return e.join("\n")}function isCriticalRule(e){if(e instanceof CSSStyleRule)try{const t=document.querySelectorAll(e.selectorText);for(const e of t)if(isElementAboveFold(e))return!0}catch(e){}return!1}function isElementAboveFold(e){const t=e.getBoundingClientRect(),n=window.innerHeight;return t.top<n&&t.bottom>0}function inlineCriticalCSS(e){if(isSSR()||!e)return;const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}function isDOMReady(){return _isDOMReady}function isPageLoaded(){return _isPageLoaded}function onDOMReady(e){_isDOMReady?e():document.addEventListener("DOMContentLoaded",e)}function onPageLoad(e){_isPageLoaded?e():window.addEventListener("load",e)}function requestIdleCallback(e,t){if("undefined"!=typeof window&&"requestIdleCallback"in window)return window.requestIdleCallback(e,t);const n=setTimeout(()=>{const t=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1);return"number"==typeof n?n:Number(n)}function cancelIdleCallback(e){"undefined"!=typeof window&&"cancelIdleCallback"in window?window.cancelIdleCallback(e):clearTimeout(e)}function createPerformanceBudget(e){return{check:()=>{const t=[],n=getFirstScreenMetrics();return e.fcp&&n.firstContentfulPaint&&n.firstContentfulPaint>e.fcp&&t.push(`FCP exceeded: ${n.firstContentfulPaint}ms > ${e.fcp}ms`),e.lcp&&n.largestContentfulPaint&&n.largestContentfulPaint>e.lcp&&t.push(`LCP exceeded: ${n.largestContentfulPaint}ms > ${e.lcp}ms`),e.tti&&n.timeToInteractive&&n.timeToInteractive>e.tti&&t.push(`TTI exceeded: ${n.timeToInteractive}ms > ${e.tti}ms`),e.cls&&n.cumulativeLayoutShift&&n.cumulativeLayoutShift>e.cls&&t.push(`CLS exceeded: ${n.cumulativeLayoutShift} > ${e.cls}`),e.tbt&&n.totalBlockingTime&&n.totalBlockingTime>e.tbt&&t.push(`TBT exceeded: ${n.totalBlockingTime}ms > ${e.tbt}ms`),{passed:0===t.length,violations:t}},report:()=>{const e=getFirstScreenMetrics(),t=["First Screen Performance Report","=".repeat(40)];return e.firstPaint&&t.push(`First Paint: ${e.firstPaint.toFixed(2)}ms`),e.firstContentfulPaint&&t.push(`FCP: ${e.firstContentfulPaint.toFixed(2)}ms`),e.largestContentfulPaint&&t.push(`LCP: ${e.largestContentfulPaint.toFixed(2)}ms`),e.domContentLoaded&&t.push(`DCL: ${e.domContentLoaded.toFixed(2)}ms`),e.load&&t.push(`Load: ${e.load.toFixed(2)}ms`),e.cumulativeLayoutShift&&t.push(`CLS: ${e.cumulativeLayoutShift.toFixed(4)}`),e.totalBlockingTime&&t.push(`TBT: ${e.totalBlockingTime.toFixed(2)}ms`),t.join("\n")}}}function cleanupFirstScreenOptimizer(){_deferredTasks=[],_metrics$1={}}const DEPRECATED_APIS_REGISTRY={"directix-v1":[{name:"v-debounce.immediate modifier",pattern:/v-debounce\.immediate/g,deprecatedIn:"1.5.0",removedIn:"2.0.0",replacement:"v-debounce with { immediate: true } option",migrationCode:'v-debounce="{ handler, wait, immediate: true }"'},{name:"v-throttle.leading modifier",pattern:/v-throttle\.leading/g,deprecatedIn:"1.5.0",removedIn:"2.0.0",replacement:"v-throttle with { leading: true } option",migrationCode:'v-throttle="{ handler, wait, leading: true }"'},{name:"v-copy.static modifier",pattern:/v-copy\.static/g,deprecatedIn:"1.8.0",removedIn:"2.0.0",replacement:"v-copy with value directly",migrationCode:'v-copy="text"'}],vueuse:[{name:"useDebounceFn",pattern:/useDebounceFn/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useDebounce from @directix/core",migrationCode:'import { useDebounce } from "@directix/core"'},{name:"useThrottleFn",pattern:/useThrottleFn/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useThrottle from @directix/core",migrationCode:'import { useThrottle } from "@directix/core"'},{name:"useIntersectionObserver",pattern:/useIntersectionObserver/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useIntersection from @directix/core",migrationCode:'import { useIntersection } from "@directix/core"'}],"v-directives":[{name:"v-clickaway",pattern:/v-clickaway/g,deprecatedIn:"v-directives",removedIn:"n/a",replacement:"v-click-outside from directix",migrationCode:'v-click-outside="handler"'},{name:"v-lazy-img",pattern:/v-lazy-img/g,deprecatedIn:"v-directives",removedIn:"n/a",replacement:"v-lazy from directix",migrationCode:'v-lazy="imageUrl"'}],custom:[]};function detectLegacyUsage(e,t="directix-v1"){const n=[],r=[],o=[],i=[],s=DEPRECATED_APIS_REGISTRY[t]||[];for(const t of s){const r=findMatches(e,t.pattern);for(const e of r)n.push({name:t.name,location:e.location,line:e.line,deprecatedIn:t.deprecatedIn,removedIn:t.removedIn,replacement:t.replacement,migrationCode:t.migrationCode}),t.migrationCode&&i.push({original:e.text,suggested:t.migrationCode,location:e.location,line:e.line,autoFixable:void 0!==t.migrationCode})}checkBreakingChanges(e,r,o);const a=n.length+r.length+o.length;let l="low";return a>10||r.some(e=>"api"===e.type)?l="high":(a>5||r.length>0)&&(l="medium"),{deprecatedAPIs:n,breakingChanges:r,warnings:o,suggestions:i,totalIssues:a,severity:l}}function findMatches(e,t){const n=[],r=e.split("\n");for(let e=0;e<r.length;e++){const o=r[e].match(t);o&&n.push({text:o[0],location:`line ${e+1}`,line:e+1})}return n}function checkBreakingChanges(e,t,n){/Vue\.component\(|new Vue\(/.test(e)&&n.push({message:"Vue 2 syntax detected - will need changes for Vue 3",location:"codebase",line:0,severity:"warning"}),/export default\s*\{[\s\S]*methods:/.test(e)&&n.push({message:"Options API detected - consider using Composition API",location:"codebase",line:0,severity:"info"}),/this\.\$directix/.test(e)&&t.push({name:"this.$directix",type:"api",location:"codebase",line:0,description:"Global injection pattern changed",migration:"Use useDirectix() composable instead"})}function migrate(e,t){const n=[],r=[];let o=e;for(const e of t.rules){const t="string"==typeof e.pattern?new RegExp(e.pattern,"g"):e.pattern,i=findMatches(o,t);if(e.autoFixable&&i.length>0){o=o.replace(t,e.replacement);for(const t of i)n.push({type:"replace",location:t.location,line:t.line,original:t.text,new:e.replacement,description:e.description})}else if(!e.autoFixable&&i.length>0)for(const t of i)r.push(`Manual fix needed at ${t.location}: ${e.description}`)}const i={filesProcessed:1,filesChanged:n.length>0?1:0,totalChanges:n.length,autoFixes:n.filter(e=>"replace"===e.type).length,manualFixes:r.length,warnings:r.length,errors:0};return{code:o,changes:n,warnings:r,stats:i}}function generateMigrationReport(e,t){return"json"===t?JSON.stringify(e,null,2):"markdown"===t?generateMarkdownReport(e):generateTextReport(e)}function generateTextReport(e){const t=[];if(t.push("=".repeat(60)),t.push("Directix Migration Report"),t.push("=".repeat(60)),t.push(""),t.push(`Total Issues: ${e.totalIssues}`),t.push(`Severity: ${e.severity.toUpperCase()}`),t.push(""),e.deprecatedAPIs.length>0){t.push("Deprecated APIs:"),t.push("-".repeat(40));for(const n of e.deprecatedAPIs)t.push(` ${n.name}`),t.push(` Location: ${n.location}`),t.push(` Deprecated: ${n.deprecatedIn}, Removed: ${n.removedIn}`),t.push(` Replacement: ${n.replacement}`),n.migrationCode&&t.push(` Migration: ${n.migrationCode}`),t.push("")}if(e.breakingChanges.length>0){t.push("Breaking Changes:"),t.push("-".repeat(40));for(const n of e.breakingChanges)t.push(` ${n.name} (${n.type})`),t.push(` Description: ${n.description}`),t.push(` Migration: ${n.migration}`),t.push("")}if(e.suggestions.length>0){t.push("Suggestions:"),t.push("-".repeat(40));for(const n of e.suggestions)t.push(` ${n.location}`),t.push(` Original: ${n.original}`),t.push(` Suggested: ${n.suggested}`),t.push(" Auto-fixable: "+(n.autoFixable?"Yes":"No")),t.push("")}return t.join("\n")}function generateMarkdownReport(e){const t=[];if(t.push("# Directix Migration Report"),t.push(""),t.push(`**Total Issues:** ${e.totalIssues}`),t.push(`**Severity:** ${e.severity}`),t.push(""),e.deprecatedAPIs.length>0){t.push("## Deprecated APIs"),t.push(""),t.push("| API | Location | Deprecated | Removed | Replacement |"),t.push("|-----|----------|------------|---------|-------------|");for(const n of e.deprecatedAPIs)t.push(`| ${n.name} | ${n.location} | ${n.deprecatedIn} | ${n.removedIn} | ${n.replacement} |`);t.push("")}if(e.breakingChanges.length>0){t.push("## Breaking Changes"),t.push("");for(const n of e.breakingChanges)t.push(`### ${n.name}`),t.push(""),t.push(`- **Type:** ${n.type}`),t.push(`- **Description:** ${n.description}`),t.push(`- **Migration:** ${n.migration}`),t.push("")}if(e.suggestions.length>0){t.push("## Suggestions"),t.push(""),t.push("| Location | Original | Suggested | Auto-fixable |"),t.push("|----------|----------|-----------|--------------|");for(const n of e.suggestions)t.push(`| ${n.location} | ${n.original} | ${n.suggested} | ${n.autoFixable?"✓":"✗"} |`);t.push("")}return t.join("\n")}function getMigrationRules(e){const t=[],n=DEPRECATED_APIS_REGISTRY[e]||[];for(const e of n)e.migrationCode&&t.push({pattern:e.pattern,replacement:e.migrationCode,description:`Migrate ${e.name} to ${e.replacement}`,autoFixable:!0});return t}function needsMigration(e,t="directix-v1"){return detectLegacyUsage(e,t).totalIssues>0}function estimateMigrationEffort(e){const t=e.suggestions.filter(e=>e.autoFixable).length,n=e.suggestions.length||1,r=Math.round(t/n*100);let o="easy",i="5 minutes";return"high"===e.severity?(o="hard",i="1-2 hours"):"medium"===e.severity?(o="medium",i="15-30 minutes"):r<50&&(o="medium",i="30 minutes"),{estimatedTime:i,difficulty:o,autoFixablePercentage:r}}const DEFAULT_MONITORING_CONFIG={enabled:!0,metrics:{enabled:!0,prefix:"directix_",labels:{},flushInterval:6e4,maxBatchSize:100},alerts:{enabled:!0,channels:[],rules:[],cooldown:3e5,aggregation:!0,aggregationWindow:6e4},health:{enabled:!0,endpoint:"/health",checks:[],interval:3e4},integrations:{}};let _config$1=DEFAULT_MONITORING_CONFIG,_metrics=[],_alerts=[],_flushTimer=null,_healthTimer=null;const _counters=new Map,_gauges=new Map,_histograms=new Map,_alertCooldowns=new Map,_healthStatus=new Map;function configureMonitoring(e){_config$1=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG),e),{metrics:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.metrics),e.metrics),alerts:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.alerts),e.alerts),health:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.health),e.health),integrations:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.integrations),e.integrations)}),_config$1.enabled&&(startFlushTimer(),startHealthChecks())}function getMonitoringConfig(){return __spreadValues({},_config$1)}function incrementCounter(e,t,n=1){var r;if(!_config$1.enabled||!_config$1.metrics.enabled)return;const o=getMetricKey(e,t),i=null!=(r=_counters.get(o))?r:0;_counters.set(o,i+n),addMetric(e,"counter",i+n,t)}function setGauge(e,t,n){if(!_config$1.enabled||!_config$1.metrics.enabled)return;const r=getMetricKey(e,n);_gauges.set(r,t),addMetric(e,"gauge",t,n)}function recordHistogram(e,t,n){var r;if(!_config$1.enabled||!_config$1.metrics.enabled)return;const o=getMetricKey(e,n),i=null!=(r=_histograms.get(o))?r:[];i.push(t),_histograms.set(o,i),addMetric(e,"histogram",t,n)}function timeOperation(e,t,n){return __async(this,null,function*(){const r=performance.now();try{const o=yield t(),i=performance.now()-r;return recordHistogram(`${e}_duration`,i,n),incrementCounter(`${e}_total`,n),incrementCounter(`${e}_success`,n),o}catch(t){throw incrementCounter(`${e}_total`,n),incrementCounter(`${e}_error`,n),t}})}function getMetricKey(e,t){return`${e}{${t?Object.entries(t).map(([e,t])=>`${e}="${t}"`).join(","):""}}`}function addMetric(e,t,n,r){_metrics.push({name:`${_config$1.metrics.prefix}${e}`,type:t,value:n,labels:__spreadValues(__spreadValues({},_config$1.metrics.labels),r),timestamp:Date.now()}),_metrics.length>=_config$1.metrics.maxBatchSize&&flushMetrics()}function getMetrics(e){let t=[..._metrics];return(null==e?void 0:e.name)&&(t=t.filter(t=>t.name.includes(e.name))),(null==e?void 0:e.type)&&(t=t.filter(t=>t.type===e.type)),(null==e?void 0:e.since)&&(t=t.filter(t=>t.timestamp>=e.since)),t}function getCounterValue(e,t){var n;const r=getMetricKey(e,t);return null!=(n=_counters.get(r))?n:0}function getGaugeValue(e,t){const n=getMetricKey(e,t);return _gauges.get(n)}function getHistogramStats(e,t){const n=getMetricKey(e,t),r=_histograms.get(n);if(!r||0===r.length)return;const o=[...r].sort((e,t)=>e-t),i=o.reduce((e,t)=>e+t,0);return{count:o.length,min:o[0],max:o[o.length-1],mean:i/o.length,p50:o[Math.floor(.5*o.length)],p95:o[Math.floor(.95*o.length)],p99:o[Math.floor(.99*o.length)]}}function flushMetrics(){if(0===_metrics.length)return;const e=[..._metrics];_metrics=[],pushToIntegrations(e)}function pushToIntegrations(e){return __async(this,null,function*(){const{datadog:t,custom:n}=_config$1.integrations;(null==n?void 0:n.enabled)&&n.pushMetrics&&(yield n.pushMetrics(e)),(null==t?void 0:t.enabled)&&(yield pushToDatadog(e,t))})}function pushToDatadog(e,t){return __async(this,null,function*(){var n;try{yield fetch("https://api.datadoghq.com/api/v1/series",{method:"POST",headers:{"Content-Type":"application/json","DD-API-KEY":t.apiKey,"DD-APPLICATION-KEY":null!=(n=t.appKey)?n:""},body:JSON.stringify({series:e.map(e=>({metric:e.name,points:[[e.timestamp/1e3,e.value]],tags:Object.entries(e.labels).map(([e,t])=>`${e}:${t}`),host:t.host}))})})}catch(e){}})}function startFlushTimer(){_flushTimer&&clearInterval(_flushTimer),_flushTimer=window.setInterval(()=>{flushMetrics()},_config$1.metrics.flushInterval)}function triggerAlert(e,t,n,r,o){var i;if(!_config$1.enabled||!_config$1.alerts.enabled)return null;if(_alertCooldowns.has(e)){const t=_alertCooldowns.get(e);if(Date.now()-t<_config$1.alerts.cooldown)return null}const s=_config$1.alerts.rules.find(t=>t.id===e);if(!s||!s.enabled)return null;const a={id:`alert-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,name:s.name,value:n,ruleId:e,severity:s.severity,status:"active",message:t,labels:__spreadValues(__spreadValues({},s.labels),o),threshold:r,startedAt:Date.now()};return _alerts.push(a),_alertCooldowns.set(e,Date.now()),sendAlertToChannels(a),(null==(i=_config$1.integrations.custom)?void 0:i.enabled)&&_config$1.integrations.custom.pushAlert&&_config$1.integrations.custom.pushAlert(a),a}function resolveAlert(e){const t=_alerts.find(t=>t.id===e);return!(!t||"resolved"===t.status)&&(t.status="resolved",t.resolvedAt=Date.now(),!0)}function acknowledgeAlert(e,t){const n=_alerts.find(t=>t.id===e);return!(!n||"active"!==n.status)&&(n.status="acknowledged",n.acknowledgedAt=Date.now(),n.acknowledgedBy=t,!0)}function sendAlertToChannels(e){return __async(this,null,function*(){for(const t of _config$1.alerts.channels)if(t.severity.includes(e.severity))try{switch(t.type){case"webhook":yield sendWebhookAlert(e,t.config);break;case"slack":yield sendSlackAlert(e,t.config);break;case"custom":t.config.handler&&(yield t.config.handler(e))}}catch(e){}})}function sendWebhookAlert(e,t){return __async(this,null,function*(){yield fetch(t.url,{method:"POST",headers:t.headers||{"Content-Type":"application/json"},body:JSON.stringify(e)})})}function sendSlackAlert(e,t){return __async(this,null,function*(){const n={info:"#36a64f",warning:"#ff9900",error:"#ff0000",critical:"#990000"}[e.severity];yield fetch(t.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attachments:[{color:n,title:e.name,text:e.message,fields:[{value:e.severity,title:"Severity",short:!0},{value:e.status,title:"Status",short:!0},{value:String(e.value),title:"Value",short:!0},{value:String(e.threshold),title:"Threshold",short:!0}],ts:Math.floor(e.startedAt/1e3)}]})})})}function getAlerts(e){let t=[..._alerts];return(null==e?void 0:e.status)&&(t=t.filter(t=>t.status===e.status)),(null==e?void 0:e.severity)&&(t=t.filter(t=>t.severity===e.severity)),(null==e?void 0:e.ruleId)&&(t=t.filter(t=>t.ruleId===e.ruleId)),(null==e?void 0:e.since)&&(t=t.filter(t=>t.startedAt>=e.since)),t}function clearAlerts(){_alerts=[],_alertCooldowns.clear()}function startHealthChecks(){_config$1.health.enabled&&0!==_config$1.health.checks.length&&(runHealthChecks(),_healthTimer&&clearInterval(_healthTimer),_healthTimer=window.setInterval(runHealthChecks,_config$1.health.interval))}function runHealthChecks(){return __async(this,null,function*(){for(const e of _config$1.health.checks){if(!e.enabled)continue;const t=performance.now();try{const n=new Promise((t,n)=>setTimeout(()=>n(new Error("Timeout")),e.timeout)),r=yield Promise.race([Promise.resolve(e.check()),n]);_healthStatus.set(e.name,{name:e.name,healthy:r,lastCheck:Date.now(),latency:performance.now()-t})}catch(n){_healthStatus.set(e.name,{name:e.name,healthy:!1,lastCheck:Date.now(),error:String(n),latency:performance.now()-t})}}})}function getHealthStatus(){const e=Array.from(_healthStatus.values());return{healthy:e.every(e=>e.healthy),checks:e,timestamp:Date.now()}}function addHealthCheck(e){_config$1.health.checks.push(e),_healthStatus.set(e.name,{name:e.name,healthy:!0,lastCheck:0,latency:0})}function removeHealthCheck(e){_config$1.health.checks=_config$1.health.checks.filter(t=>t.name!==e),_healthStatus.delete(e)}function exportPrometheusMetrics(){const e=[];for(const[t,n]of _counters)e.push(`# TYPE ${t.split("{")[0]} counter`),e.push(`${t} ${n}`);for(const[t,n]of _gauges)e.push(`# TYPE ${t.split("{")[0]} gauge`),e.push(`${t} ${n}`);for(const[t,n]of _histograms){const r=t.split("{")[0];e.push(`# TYPE ${r} histogram`);const o=[...n].sort((e,t)=>e-t);for(const n of o)e.push(`${t} ${n}`)}return e.join("\n")}function resetMonitoring(){_flushTimer&&(clearInterval(_flushTimer),_flushTimer=null),_healthTimer&&(clearInterval(_healthTimer),_healthTimer=null),_metrics=[],_counters.clear(),_gauges.clear(),_histograms.clear(),_alerts=[],_alertCooldowns.clear(),_healthStatus.clear()}function getMonitoringStats(){return{metricsCount:_metrics.length,alertsCount:_alerts.length,activeAlerts:_alerts.filter(e=>"active"===e.status).length,healthChecksCount:_config$1.health.checks.length,healthyChecks:Array.from(_healthStatus.values()).filter(e=>e.healthy).length}}const state={config:{enabled:!1,maxMetrics:1e3,sampleRate:1,warnThreshold:16},metrics:[],directiveMetrics:new Map,startMarks:new Map};function configurePerformance(e){state.config=__spreadValues(__spreadValues({},state.config),e)}function enablePerformance(){state.config.enabled=!0}function disablePerformance(){state.config.enabled=!1}function isPerformanceEnabled(){return state.config.enabled}function startMeasure(e,t){if(!state.config.enabled||isSSR$2())return"";if(state.config.sampleRate<1&&Math.random()>state.config.sampleRate)return"";const n=`${e}:${t}:${Date.now()}:${Math.random().toString(36).slice(2,7)}`;if(state.startMarks.set(n,performance.now()),"undefined"!=typeof performance&&performance.mark)try{performance.mark(`${n}-start`)}catch(e){}return n}function endMeasure(e,t,n,r){if(!e||!state.config.enabled||isSSR$2())return;const o=state.startMarks.get(e);if(void 0===o)return;const i=performance.now()-o;if(state.startMarks.delete(e),"undefined"!=typeof performance&&performance.mark&&performance.measure)try{performance.mark(`${e}-end`),performance.measure(`directix:${t}:${n}`,`${e}-start`,`${e}-end`)}catch(e){}const s={name:n,directive:t,duration:i,timestamp:Date.now(),metadata:r};state.metrics.push(s),state.metrics.length>state.config.maxMetrics&&state.metrics.shift(),state.directiveMetrics.has(t)||state.directiveMetrics.set(t,[]);const a=state.directiveMetrics.get(t);a.push(s),a.length>state.config.maxMetrics&&a.shift(),i>state.config.warnThreshold&&console.warn(`[Directix Performance] v-${t} ${n} took ${i.toFixed(2)}ms (threshold: ${state.config.warnThreshold}ms)`)}function getPerformanceMetrics(){return[...state.metrics]}function getDirectiveMetrics(e){return[...state.directiveMetrics.get(e)||[]]}function calculateStats(e){if(0===e.length)return{totalCalls:0,averageDuration:0,minDuration:0,maxDuration:0,p50:0,p95:0,p99:0};const t=e.map(e=>e.duration).sort((e,t)=>e-t),n=t.reduce((e,t)=>e+t,0);return{totalCalls:e.length,averageDuration:n/e.length,minDuration:t[0],maxDuration:t[t.length-1],p50:t[Math.floor(.5*t.length)],p95:t[Math.floor(.95*t.length)],p99:t[Math.floor(.99*t.length)]}}function getPerformanceReport(){const e=[];for(const[t,n]of state.directiveMetrics){const r=n.filter(e=>"mount"===e.name),o=n.filter(e=>"update"===e.name),i=n.filter(e=>"unmount"===e.name),s=n.reduce((e,t)=>e+t.duration,0);e.push({name:t,mount:calculateStats(r),update:calculateStats(o),unmount:calculateStats(i),totalTime:s,callCount:n.length})}return e.sort((e,t)=>t.totalTime-e.totalTime)}function getSlowestDirectives(e=10){return getPerformanceReport().slice(0,e)}function getMostFrequentDirectives(e=10){return getPerformanceReport().sort((e,t)=>t.callCount-e.callCount).slice(0,e)}function clearPerformanceMetrics(){state.metrics=[],state.directiveMetrics.clear(),state.startMarks.clear()}function exportPerformanceData(){return{config:state.config,metrics:getPerformanceMetrics(),report:getPerformanceReport()}}function measurePerformance(e,t,n,r){if(!state.config.enabled||isSSR$2())return n();const o=startMeasure(e,t);try{const i=n();return endMeasure(o,e,t,r),i}catch(n){throw endMeasure(o,e,t,__spreadProps(__spreadValues({},r),{error:!0})),n}}function measurePerformanceAsync(e,t,n,r){return __async(this,null,function*(){if(!state.config.enabled||isSSR$2())return n();const o=startMeasure(e,t);try{const i=yield n();return endMeasure(o,e,t,r),i}catch(n){throw endMeasure(o,e,t,__spreadProps(__spreadValues({},r),{error:!0})),n}})}function withPerformanceMonitoring(e,t){if(!state.config.enabled)return t;const n={};for(const[r,o]of Object.entries(t))if("function"==typeof o&&["mounted","updated","unmounted"].includes(r)){const t="mounted"===r?"mount":"updated"===r?"update":"unmount";n[r]=function(...n){return measurePerformance(e,t,()=>o.apply(this,n))}}else n[r]=o;return n}const DEFAULT_PERFORMANCE_CONFIG={eventDelegation:{enabled:!0,globalListeners:!0,batchProcessing:!0,batchSize:10},virtualization:{enabled:!0,scrollThreshold:100,listItemHeight:"auto",bufferSize:5},caching:{computedResults:!0,domQueries:!0,styleCalculations:!0,maxCacheSize:100},lazyInit:{directives:!0,events:!0,observers:!0,debounceMs:100},memory:{objectPool:!0,weakReferences:!0,cleanupOnUnmount:!0,periodicCleanup:6e4}};class EventBatchProcessor{constructor(e=10){__publicField(this,"queue",[]),__publicField(this,"processing",!1),__publicField(this,"batchSize"),__publicField(this,"scheduled",!1),this.batchSize=e}add(e,t,n){this.queue.push({target:e,event:t,handler:n}),this.scheduled||(this.scheduled=!0,requestAnimationFrame(()=>this.processBatch()))}processBatch(){if(this.scheduled=!1,this.processing||0===this.queue.length)return;this.processing=!0;const e=this.queue.splice(0,this.batchSize);for(const t of e)t.target.addEventListener(t.event,t.handler,{passive:!0});this.processing=!1,this.queue.length>0&&(this.scheduled=!0,requestAnimationFrame(()=>this.processBatch()))}clear(){this.queue.length=0,this.scheduled=!1}}class WeakCache{constructor(e=50){__publicField(this,"cache",new WeakMap),__publicField(this,"strongCache",new Map),__publicField(this,"maxStrongSize"),this.maxStrongSize=e}get(e){var t;return null!=(t=this.cache.get(e))?t:this.strongCache.get(e)}set(e,t){this.cache.set(e,t),this.strongCache.size<this.maxStrongSize&&this.strongCache.set(e,t)}has(e){return this.cache.has(e)||this.strongCache.has(e)}delete(e){const t=this.cache.delete(e),n=this.strongCache.delete(e);return t||n}clearStrong(){this.strongCache.clear()}size(){return this.strongCache.size}}class LazyInitializer{constructor(e){__publicField(this,"value",null),__publicField(this,"initFunction"),__publicField(this,"initialized",!1),__publicField(this,"pendingPromise",null),this.initFunction=e}get(){return this.initialized||(this.value=this.initFunction(),this.initialized=!0),this.value}getAsync(){return __async(this,null,function*(){return this.initialized?this.value:this.pendingPromise?this.pendingPromise:(this.pendingPromise=Promise.resolve(this.initFunction()),this.value=yield this.pendingPromise,this.initialized=!0,this.pendingPromise=null,this.value)})}isInitialized(){return this.initialized}reset(){this.value=null,this.initialized=!1,this.pendingPromise=null}}class ComputedCache{constructor(e,t=100,n=6e4){__publicField(this,"cache",new Map),__publicField(this,"maxSize"),__publicField(this,"computeFunction"),__publicField(this,"ttl"),this.computeFunction=e,this.maxSize=t,this.ttl=n}get(e,t){const n=this.cache.get(e);if(n){const e=this.compareDependencies(n.dependencies,t),r=Date.now()-n.timestamp<this.ttl;if(e&&r)return n.value}const r=this.computeFunction(e,...t);if(this.cache.size>=this.maxSize){const e=this.cache.keys().next().value;void 0!==e&&this.cache.delete(e)}return this.cache.set(e,{value:r,dependencies:t,timestamp:Date.now()}),r}compareDependencies(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}invalidate(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}}class DOMQueryCache{constructor(){__publicField(this,"queryCache",new WeakCache),__publicField(this,"styleCache",new WeakCache)}querySelector(e,t){var n;const r=null!=(n=this.queryCache.get(e))?n:new Map;if(this.queryCache.set(e,r),r.has(t))return r.get(t);const o=e.querySelector(t);return r.set(t,o),o}querySelectorAll(e,t){var n;const r=`all:${t}`,o=null!=(n=this.queryCache.get(e))?n:new Map;if(this.queryCache.set(e,o),o.has(r))return o.get(r);const i=Array.from(e.querySelectorAll(t));return o.set(r,i),i}getComputedStyle(e){const t=this.styleCache.get(e);if(t)return t;const n=window.getComputedStyle(e);return this.styleCache.set(e,n),n}invalidate(e){this.queryCache.delete(e),this.styleCache.delete(e)}}class MemoryCleanupManager{constructor(e=6e4){__publicField(this,"cleanupCallbacks",new Set),__publicField(this,"intervalId",null),__publicField(this,"cleanupInterval"),this.cleanupInterval=e}register(e){this.cleanupCallbacks.add(e)}unregister(e){this.cleanupCallbacks.delete(e)}start(){null===this.intervalId&&(this.intervalId=window.setInterval(()=>{this.runCleanup()},this.cleanupInterval))}stop(){null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null)}runCleanup(){for(const e of this.cleanupCallbacks)try{e()}catch(e){console.warn("[Directix] Cleanup callback failed:",e)}}size(){return this.cleanupCallbacks.size}}let _config=DEFAULT_PERFORMANCE_CONFIG,_eventBatchProcessor=null,_domQueryCache=null,_memoryCleanupManager=null;function configurePerformanceOptimization(e){_config=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG),e),{eventDelegation:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.eventDelegation),e.eventDelegation),virtualization:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.virtualization),e.virtualization),caching:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.caching),e.caching),lazyInit:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.lazyInit),e.lazyInit),memory:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.memory),e.memory)}),_config.eventDelegation.enabled&&_config.eventDelegation.batchProcessing&&(_eventBatchProcessor=new EventBatchProcessor(_config.eventDelegation.batchSize)),(_config.caching.domQueries||_config.caching.styleCalculations)&&(_domQueryCache=new DOMQueryCache),_config.memory.periodicCleanup&&(_memoryCleanupManager=new MemoryCleanupManager(_config.memory.periodicCleanup),_memoryCleanupManager.start())}function getPerformanceOptimizationConfig(){return __spreadValues({},_config)}function getEventBatchProcessor(){return _eventBatchProcessor}function getDOMQueryCache(){return _domQueryCache}function getMemoryCleanupManager(){return _memoryCleanupManager}function runMemoryCleanup(){_memoryCleanupManager&&_memoryCleanupManager.runCleanup()}function resetPerformanceOptimizer(){_eventBatchProcessor&&_eventBatchProcessor.clear(),_memoryCleanupManager&&_memoryCleanupManager.stop(),_config=DEFAULT_PERFORMANCE_CONFIG}let globalI18n=null,isDev="undefined"!=typeof process&&"production"!==(null==(_a=process.env)?void 0:_a.NODE_ENV),globalLevel="warn";function setWarningI18n(e){globalI18n=e}function setWarningDevMode(e){isDev=e}function setWarningLevel(e){globalLevel=e}function formatMessage(e){const{directive:t,message:n,params:r={}}=e;let o=n;if(globalI18n&&!n.includes(" ")){const e=t?`directives.${t}.${n}`:n,i=globalI18n(e,r);i!==e&&(o=i)}return r&&Object.keys(r).length>0&&(o=o.replace(/\{(\w+)\}/g,(e,t)=>void 0!==r[t]?String(r[t]):`{${t}}`)),t?`[Directix] v-${t}: ${o}`:`[Directix] ${o}`}function log(e,t,n=!1){var r;const o=["debug","info","warn","error"],i=o.indexOf(globalLevel);if(o.indexOf(e)<i)return;const s="debug"===e?"info":e,a=n&&isDev?`\n${null==(r=new Error("Stack trace").stack)?void 0:r.split("\n").slice(2).join("\n")}`:"";"info"===s?console.info(t,a):"warn"===s?console.warn(t,a):"error"===s&&console.error(t,a)}function debug(e,t){log("debug",formatMessage({message:e,params:t}),!1)}function info(e,t){log("info",formatMessage({message:e,params:t}),!1)}function warn(e,t){const n="string"==typeof e?{message:e,params:t}:e;log(n.level||"warn",formatMessage(n),n.stack&&isDev)}function error(e,t){const n="string"==typeof e?{message:e,params:t}:__spreadValues({},e);log("error",formatMessage(n),n.stack&&isDev)}function directiveWarn(e,t,n){warn({directive:e,message:t,params:n})}function directiveError(e,t,n){error({directive:e,message:t,params:n})}function warnInvalidParam(e,t,n,r){warn({directive:e,message:"errors.type_error",params:{param:t,expected:r,actual:typeof n}})}function warnMissingParam(e,t){warn({directive:e,message:"errors.missing_required",params:{param:t}})}function warnSSRNotSupported(e){warn({directive:e,message:"errors.ssr_not_supported",params:{directive:e}})}function warnDeprecated(e,t){warn({message:"warnings.deprecated",params:{feature:e,alternative:t}})}function warnNotSupported(e){warn({message:"errors.not_supported",params:{feature:e}})}function assert(e,t,n){if(!e)throw new Error(formatMessage({directive:n,message:t}))}function assertType(e,t,n,r){if(typeof e!==t)throw new TypeError(formatMessage({directive:n,message:"errors.type_error",params:{param:r,expected:t,actual:typeof e}}))}function assertPositive(e,t,n){if(assertType(e,"number",t,n),e<=0)throw new Error(formatMessage({directive:t,message:"errors.value_out_of_range",params:{param:n,min:"0",max:"Infinity"}}))}function assertRange(e,t,n,r,o){if(assertType(e,"number",r,o),e<t||e>n)throw new Error(formatMessage({directive:r,message:"errors.value_out_of_range",params:{param:o,min:String(t),max:String(n)}}))}function normalizeOptions$S(e){return"boolean"==typeof e?{visible:e,radius:5,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:"number"==typeof e?{visible:!0,radius:e,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:__spreadValues({radius:5,visible:!0,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1},e)}function createBlurOverlay$1(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius}px);\n -webkit-backdrop-filter: blur(${e.radius}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex};\n opacity: 0;\n transition: opacity ${e.duration}ms ease;\n pointer-events: auto;\n border-radius: inherit;\n `,t}const vBlur=defineDirective({name:"blur",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$S(t.value),r={options:n,blurContainer:null,originalOverflow:""};e.__blur=r,n.visible&&showBlur(e,r),e.classList.add("v-blur")},updated(e,t){const n=e.__blur;if(!n)return;const r=normalizeOptions$S(t.value),o=n.options.visible;n.options=r,r.visible&&!o?showBlur(e,n):!r.visible&&o?hideBlur(e,n):r.visible&&o&&n.blurContainer&&(n.blurContainer.style.backdropFilter=`blur(${r.radius}px)`,n.blurContainer.style.webkitBackdropFilter=`blur(${r.radius}px)`,n.blurContainer.style.background=r.overlayColor||"rgba(0, 0, 0, 0.5)")},unmounted(e){const t=e.__blur;t&&(hideBlur(e,t),e.classList.remove("v-blur"),delete e.__blur)}});function showBlur(e,t){var n;const r=t.options;"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),t.blurContainer=createBlurOverlay$1(r),e.appendChild(t.blurContainer),t.blurContainer.style.opacity="1",r.lockScroll&&(t.originalOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),null==(n=r.onShow)||n.call(r)}function hideBlur(e,t){var n;if(!t.blurContainer)return;const r=t.options;t.blurContainer.style.opacity="0",r.lockScroll&&(document.body.style.overflow=t.originalOverflow),setTimeout(()=>{t.blurContainer&&t.blurContainer.parentNode&&t.blurContainer.parentNode.removeChild(t.blurContainer),t.blurContainer=null},r.duration),null==(n=r.onHide)||n.call(r)}const STATE_PREFIX="__directix_";function setState$1(e,t,n){e[STATE_PREFIX+t]=n}function getState$1(e,t){return e[STATE_PREFIX+t]}function deleteState(e,t){delete e[STATE_PREFIX+t]}function isElement(e){return e instanceof Element}function getElement(e){return e?"string"==typeof e?isBrowser()?document.querySelector(e):null:isElement(e)?e:null:null}function getScrollParent$2(e){if(!isBrowser())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}function isInputElement(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function ensurePosition(e,t="relative"){isBrowser()&&"static"===getComputedStyle(e).position&&(e.style.position=t)}function ensureOverflowHidden(e){isBrowser()&&"visible"===getComputedStyle(e).overflow&&(e.style.overflow="hidden")}function on(e,t,n,r=!1){if(!isBrowser())return;const o=normalizeOptions$R(r);e.addEventListener(t,n,o)}function off(e,t,n,r=!1){if(!isBrowser())return;const o=normalizeOptions$R(r);e.removeEventListener(t,n,o)}function normalizeOptions$R(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:r=!1}=e;return supportsPassive()?{capture:t,passive:n,once:r}:t}function getEventPosition(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 bindEvents$2(e,t,n=!1){return Object.entries(t).forEach(([t,r])=>{e.addEventListener(t,r,"boolean"==typeof n?n:normalizeOptionsObject(n))}),()=>{Object.entries(t).forEach(([t,r])=>{e.removeEventListener(t,r,"boolean"==typeof n?n:normalizeOptionsObject(n))})}}function normalizeOptionsObject(e){const{capture:t=!1,passive:n=!1,once:r=!1}=e;return supportsPassive()?{capture:t,passive:n,once:r}:t}const EVENT_MODIFIERS=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function getEventTypeFromModifiers(e){for(const t of EVENT_MODIFIERS)if(e[t])return t;return null}function getDefaultEventType(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e&&!isNaN(e)}function isBoolean(e){return"boolean"==typeof e}function isFunction(e){return"function"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}function isEmpty(e){return null==e||(isString(e)||isArray(e)?0===e.length:!!isObject(e)&&0===Object.keys(e).length)}function isPromise(e){return isObject(e)&&isFunction(e.then)}function deepClone(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e=>deepClone(e));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=deepClone(e[n]));return t}function deepMerge(e,...t){if(!t.length)return e;const n=t.shift();if(isObject(e)&&isObject(n))for(const t in n)isObject(n[t])?(e[t]||Object.assign(e,{[t]:{}}),deepMerge(e[t],n[t])):Object.assign(e,{[t]:n[t]});return deepMerge(e,...t)}function get(e,t,n){const r=t.split(".");let o=e;for(const e of r){if(null==o)return n;o=o[e]}return void 0===o?n:o}function set(e,t,n){const r=t.split("."),o=r.pop();let i=e;for(const e of r)void 0===i[e]&&(i[e]={}),i=i[e];i[o]=n}function debounce(e,t=300,n={}){let r=null,o=null,i=null;const{leading:s=!1,trailing:a=!0}=n,l=()=>{o&&(e.apply(i,o),o=null,i=null)},c=function(...e){o=e,i=this,r&&clearTimeout(r),s&&!r&&l(),r=setTimeout(()=>{a&&l(),r=null},t)};return c.cancel=()=>{r&&(clearTimeout(r),r=null),o=null,i=null},c.flush=()=>{r&&(clearTimeout(r),l(),r=null)},c}function throttle(e,t=300,n={}){let r=null,o=null,i=null,s=0;const{leading:a=!0,trailing:l=!0}=n,c=()=>{o&&(e.apply(i,o),o=null,i=null)},u=function(...e){const n=Date.now();s||a||(s=n);const u=t-(n-s);o=e,i=this,u<=0||u>t?(r&&(clearTimeout(r),r=null),s=n,c()):!r&&l&&(r=setTimeout(()=>{s=a?Date.now():0,r=null,c()},u))};return u.cancel=()=>{r&&(clearTimeout(r),r=null),s=0,o=null,i=null},u}function parseTime(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}function generateId(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`}function getDistance$5(e,t){return Math.sqrt(__pow(t.x-e.x,2)+__pow(t.y-e.y,2))}function clamp$1(e,t,n){let r=e;return void 0!==t&&(r=Math.max(t,r)),void 0!==n&&(r=Math.min(n,r)),r}function escapeRegex$4(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function setupTextTransformInput(e,t,n){if(!t.onInput)return()=>{};const r=()=>{const t=e.selectionStart,r=e.selectionEnd,o=e.value,i=n(o);o!==i&&(e.value=i,null!==t&&null!==r&&e.setSelectionRange(t,r),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",r),e.value=n(e.value),()=>{e.removeEventListener("input",r)}}function transformTextContent(e,t){const n=e.textContent||"";e.textContent=t(n)}const DEFAULT_KEEP_LOWER$1=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function capitalizeText$1(e,t){if(!e)return e;const{every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER$1}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?capitalizeWord$1(e):r.includes(e.toLowerCase())?e.toLowerCase():capitalizeWord$1(e)).join(" ")}return capitalizeWord$1(e)}function capitalizeWord$1(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function normalizeOptions$Q(e){var t,n,r;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:DEFAULT_KEEP_LOWER$1,onInput:null==(r=e.onInput)||r}}const vCapitalcase=defineDirective({name:"capitalcase",ssr:!0,mounted(e,t){const n=normalizeOptions$Q(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>capitalizeText$1(e,n));e.__capitalcaseCleanup=t}else transformTextContent(e,e=>capitalizeText$1(e,n))},updated(e,t){const n=normalizeOptions$Q(t.value);isInputElement(e)?n.onInput&&(e.value=capitalizeText$1(e.value,n)):transformTextContent(e,e=>capitalizeText$1(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),STATE_KEY$5="clickDelay";function removePendingClass(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function createClickHandler(e,t){return n=>{const r=getState$1(e,STATE_KEY$5);if(!r||r.isPending)return n.preventDefault(),void n.stopPropagation();r.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),r.timeoutId=setTimeout(()=>{r.isPending=!1,r.timeoutId=null,removePendingClass(e,t)},t.delay)}}function normalizeOptions$P(e,t){var n,r,o,i;const s=parseTime(t.arg)||300;if("function"==typeof e)return{handler:e,delay:s,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:s,disabled:null!=(r=e.disabled)&&r,pendingClass:null!=(o=e.pendingClass)?o:"v-click-delay--pending",feedback:null==(i=e.feedback)||i}}const vClickDelay=defineDirective({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=normalizeOptions$P(t.value,t);if(n.disabled)return;const r={options:n,handler:createClickHandler(e,n),isPending:!1,timeoutId:null};setState$1(e,STATE_KEY$5,r),e.addEventListener("click",r.handler),e.addEventListener("touchend",r.handler)},updated(e,t){const n=getState$1(e,STATE_KEY$5);if(!n){const n=normalizeOptions$P(t.value,t);if(!n.disabled){const t={options:n,handler:createClickHandler(e,n),isPending:!1,timeoutId:null};setState$1(e,STATE_KEY$5,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const r=normalizeOptions$P(t.value,t);r.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),removePendingClass(e,n.options),deleteState(e,STATE_KEY$5)):!r.disabled&&n.options.disabled&&(n.handler=createClickHandler(e,r),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=r},unmounted(e){const t=getState$1(e,STATE_KEY$5);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),removePendingClass(e,t.options),deleteState(e,STATE_KEY$5))}}),vClickOutside=defineDirective({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=normalizeOptions$O(t.value);if(n.disabled)return;const r={options:n,handlers:new Map};e.__clickOutside=r;n.events.forEach(t=>{const o=t=>{isValidClick$1(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};r.handlers.set(t,o);const i={capture:n.capture,passive:!n.prevent};on(document,t,o,i)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const r=n.options,o=normalizeOptions$O(t.value);if(r.disabled!==o.disabled)if(o.disabled)n.handlers.forEach((e,t)=>{off(document,t,e,{capture:r.capture})}),n.handlers.clear();else{const t=t=>t=>{isValidClick$1(e,t,o)&&(o.stop&&t.stopPropagation(),o.prevent&&t.preventDefault(),o.handler(t))};o.events.forEach(e=>{const r=t();n.handlers.set(e,r),on(document,e,r,{capture:o.capture,passive:!o.prevent})})}n.options=o},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{off(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function normalizeOptions$O(e){var t,n,r,o,i;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!=(r=e.disabled)&&r,stop:null!=(o=e.stop)&&o,prevent:null!=(i=e.prevent)&&i},e)}function isValidClick$1(e,t,n){var r;const o=t.target;if(e.contains(o))return!1;if(null==(r=n.exclude)?void 0:r.length)for(const e of n.exclude){const t="function"==typeof e?e():getElement(e);if(t&&(t===o||t.contains(o)))return!1}return!0}function normalizeOptions$N(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:500,sizeRatio:1.5};if("string"==typeof e)return{color:e,duration:500,sizeRatio:1.5};const t={color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}function createWave(e,t,n){const r=t.getBoundingClientRect(),o=e.clientX-r.left,i=e.clientY-r.top,s=Math.min(r.width,r.height)*(n.sizeRatio||1.5),a=document.createElement("span");return a.className="v-click-wave__effect",a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${s}px;\n height: ${s}px;\n left: ${o-s/2}px;\n top: ${i-s/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,a}function animateWave(e,t){const n=t.duration||500;"function"==typeof e.animate?e.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",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`,e.style.transform="scale(1)",e.style.opacity="0",setTimeout(()=>{e.remove()},n))}const vClickWave=defineDirective({name:"click-wave",ssr:!1,defaults:{color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5},mounted(e,t){const n=normalizeOptions$N(t.value);if(n.disabled||!isBrowser())return;const r=getComputedStyle(e);"static"===r.position&&(e.style.position="relative"),"visible"===r.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave");const o={options:n,clickHandler:t=>{if(o.options.disabled)return;const n=createWave(t,e,o.options);n&&(e.appendChild(n),animateWave(n,o.options))}};e.__clickWave=o,e.addEventListener("click",o.clickHandler)},updated(e,t){const n=e.__clickWave;n&&(n.options=normalizeOptions$N(t.value))},unmounted(e){const t=e.__clickWave;t&&(e.removeEventListener("click",t.clickHandler),e.classList.remove("v-click-wave"),delete e.__clickWave)}});function normalizeOptions$M(e){return Array.isArray(e)?{items:e}:e}function createMenu(e,t,n){const r=document.createElement("div");r.className=`v-context-menu ${e.class||""}`;const o=e.width?"number"==typeof e.width?`${e.width}px`:e.width:"150px";return r.style.cssText=`\n position: fixed;\n left: ${t}px;\n top: ${n}px;\n min-width: ${o};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,e.items.forEach((t,n)=>{if(t.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",r.appendChild(e)}if(e.renderItem){const o=e.renderItem(t,n);r.appendChild(o)}else{const e=document.createElement("div");if(e.className=`v-context-menu__item ${t.class||""}`,t.disabled&&e.classList.add("v-context-menu__item--disabled"),e.style.cssText=`\n padding: 8px 16px;\n cursor: ${t.disabled?"not-allowed":"pointer"};\n color: ${t.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,t.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=t.icon,e.appendChild(n)}const n=document.createElement("span");n.textContent=t.label,e.appendChild(n),!t.disabled&&t.handler&&(e.addEventListener("click",()=>{t.handler(),removeMenu(r)}),e.addEventListener("mouseenter",()=>{e.style.background="#f5f5f5"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"})),r.appendChild(e)}}),r}function removeMenu(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function adjustMenuPosition(e,t,n){const r=e.getBoundingClientRect(),o=window.innerWidth,i=window.innerHeight;t+r.width>o&&(e.style.left=o-r.width-8+"px"),n+r.height>i&&(e.style.top=i-r.height-8+"px")}const vContextMenu=defineDirective({name:"context-menu",ssr:!1,mounted(e,t){const n=normalizeOptions$M(t.value);if(n.disabled||!isBrowser())return;const r={options:n,contextMenuHandler:e=>{var t,o;e.preventDefault(),r.menuElement&&removeMenu(r.menuElement),!1!==(null==(t=n.onBeforeShow)?void 0:t.call(n,e))&&(r.menuElement=createMenu(r.options,e.clientX,e.clientY),document.body.appendChild(r.menuElement),adjustMenuPosition(r.menuElement,e.clientX,e.clientY),setTimeout(()=>{document.addEventListener("click",r.clickOutsideHandler)},0),null==(o=n.onAfterShow)||o.call(n))},menuElement:null,clickOutsideHandler:e=>{var t;const o=e.target;r.menuElement&&r.menuElement.contains(o)||(removeMenu(r.menuElement),r.menuElement=null,document.removeEventListener("click",r.clickOutsideHandler),null==(t=n.onHide)||t.call(n))}};e.__contextMenu=r,on(e,"contextmenu",r.contextMenuHandler)},updated(e,t){const n=e.__contextMenu;n&&(n.options=normalizeOptions$M(t.value))},unmounted(e){const t=e.__contextMenu;t&&(off(e,"contextmenu",t.contextMenuHandler),t.menuElement&&(removeMenu(t.menuElement),document.removeEventListener("click",t.clickOutsideHandler)),delete e.__contextMenu)}});function copyToClipboard$1(e){return __async(this,null,function*(){if(supportsClipboard())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return copyWithExecCommand$1(e)})}function copyWithExecCommand$1(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)}}const vCopy=defineDirective({name:"copy",ssr:!1,mounted(e,t){const n=normalizeOptions$L(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const r={handler:null,options:n};r.handler=()=>__async(null,null,function*(){var t,n,o,i;const s=r.options.value;if(s)try{if(!(yield copyToClipboard$1(s)))throw new Error("Copy failed");null==(n=(t=r.options).onSuccess)||n.call(t,s),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:s}}))}catch(t){const n=t;null==(i=(o=r.options).onError)||i.call(o,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",r.handler),e.__copy=r},updated(e,t){const n=e.__copy;n&&(n.options=normalizeOptions$L(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 normalizeOptions$L(e){return"string"==typeof e?{value:e}:e}function parseTargetTime$1(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function calculateTime$1(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 formatTime$1(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 normalizeOptions$K(e){var t,n,r,o;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!=(r=e.showMilliseconds)&&r,autoStart:null==(o=e.autoStart)||o,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const vCountdown=defineDirective({name:"countdown",ssr:!0,mounted(e,t){const n=normalizeOptions$K(t.value),r={options:n,targetTime:parseTargetTime$1(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=r,!1!==n.autoStart?startCountdown(e,r):updateDisplay(e,r)},updated(e,t){const n=e.__countdown,r=normalizeOptions$K(t.value),o=parseTargetTime$1(r.target);o!==n.targetTime?(n.targetTime=o,n.options=r,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||startCountdown(e,n)):n.options=r},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function startCountdown(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,updateDisplay(e,t),stopCountdown(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(updateDisplay(e,t),t.options.onTick){const e=calculateTime$1(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function stopCountdown(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}function updateDisplay(e,t){const n=formatTime$1(calculateTime$1(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function normalizeOptions$J(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,startValue:0,duration:2e3,decimals:0,useGrouping:!1,locale:"en-US",easing:"easeOutQuart",delay:0},e||{})}const easingFunctions$1={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function formatNumber$3(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale,{minimumFractionDigits:t.decimals,maximumFractionDigits:t.decimals,useGrouping:t.useGrouping}).format(e)}const vCounter=defineDirective({name:"counter",ssr:!0,mounted(e,t){const n=normalizeOptions$J(t.value),r={options:n,animationFrame:null,startTime:null,startValue:n.startValue||0,currentValue:n.startValue||0};e.__counter=r,e.textContent=formatNumber$3(r.startValue,n),e.classList.add("v-counter"),isBrowser()&&n.value!==r.startValue&&setTimeout(()=>{animateCounter(e,r)},n.delay||0)},updated(e,t){const n=e.__counter;if(!n)return;const r=normalizeOptions$J(t.value),o=n.options.value,i=r.value;n.animationFrame&&(cancelAnimationFrame(n.animationFrame),n.animationFrame=null),n.startValue=n.currentValue,n.startTime=null,n.options=r,i!==o&&animateCounter(e,n)},unmounted(e){const t=e.__counter;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-counter"),delete e.__counter)}});function animateCounter(e,t){var n;const{options:r,startValue:o}=t,i=r.value,s=r.duration||2e3;t.startTime=null,null==(n=r.onStart)||n.call(r),t.animationFrame=requestAnimationFrame(function n(a){var l,c;t.startTime||(t.startTime=a);const u=a-t.startTime,d=Math.min(u/s,1),p=(r.customEasing||easingFunctions$1[r.easing||"easeOutQuart"])(d);t.currentValue=o+(i-o)*p;const m=formatNumber$3(t.currentValue,r);e.textContent=m,null==(l=r.onUpdate)||l.call(r,t.currentValue,m),d<1?t.animationFrame=requestAnimationFrame(n):(t.currentValue=i,e.textContent=formatNumber$3(i,r),t.animationFrame=null,null==(c=r.onComplete)||c.call(r,i))})}function normalizeOptions$I(e,t){const n=parseTime(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const vDebounce=defineDirective({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=normalizeOptions$I(t.value,t),r=getEventTypeFromModifiers(t.modifiers)||getDefaultEventType(e),o=debounce(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(r,o),e.__debounce={debouncedFn:o,eventType:r,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const r=normalizeOptions$I(t.value,t);if(r.wait!==n.options.wait||r.leading!==n.options.leading||r.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=debounce(r.handler,r.wait,{leading:r.leading,trailing:r.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:r}}else r.handler!==n.options.handler&&(n.options.handler=r.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function getBoundary$1(e,t){var n,r;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!=(r=null==e?void 0:e.getBoundingClientRect())?r:null}return t.getBoundingClientRect()}function getClientCoords$1(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 parseTranslate$1(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 normalizeOptions$H(e){var t,n,r;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!=(r=e.disabled)&&r,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const vDraggable=defineDirective({name:"draggable",ssr:!1,mounted(e,t){const n=normalizeOptions$H(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const r={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=r;const o=r.handleEl||e;function i(t){var n,o,i;if(r.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:s,clientY:a}=getClientCoords$1(t);r.isDragging=!0,r.startX=s,r.startY=a;const{x:l,y:c}=parseTranslate$1(e.style.transform);if(r.offsetX=l,r.offsetY=c,r.options.constrain||r.options.boundary){const t=r.options.boundary?getBoundary$1(e,r.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();r.initialLeft=n.left-t.left,r.initialTop=n.top-t.top,r.boundaryWidth=t.width,r.boundaryHeight=t.height,r.elWidth=n.width,r.elHeight=n.height}}e.classList.add("v-draggable--dragging"),r.moveHandler=t=>{var n,o;if(!r.isDragging)return;const{clientX:i,clientY:s}=getClientCoords$1(t);let a=i-r.startX,l=s-r.startY;"x"===r.options.axis?l=0:"y"===r.options.axis&&(a=0),r.options.grid&&(a=Math.round(a/r.options.grid[0])*r.options.grid[0],l=Math.round(l/r.options.grid[1])*r.options.grid[1]);let c=r.offsetX+a,u=r.offsetY+l;if(r.options.constrain||r.options.boundary){const e=r.initialLeft+a,t=r.initialTop+l,n=r.boundaryWidth-r.elWidth,o=r.boundaryHeight-r.elHeight,i=Math.max(0,Math.min(e,n)),s=Math.max(0,Math.min(t,o));c=r.offsetX+(i-r.initialLeft),u=r.offsetY+(s-r.initialTop)}e.style.transform=`translate(${c}px, ${u}px)`,null==(o=(n=r.options).onDrag)||o.call(n,{x:c,y:u},t)},r.endHandler=()=>{var t,n;if(!r.isDragging)return;r.isDragging=!1,e.classList.remove("v-draggable--dragging"),r.moveHandler&&(document.removeEventListener("mousemove",r.moveHandler),document.removeEventListener("touchmove",r.moveHandler)),r.endHandler&&(document.removeEventListener("mouseup",r.endHandler),document.removeEventListener("touchend",r.endHandler));const{x:o,y:i}=parseTranslate$1(e.style.transform);null==(n=(t=r.options).onEnd)||n.call(t,{x:o,y:i},new MouseEvent("mouseup"))},document.addEventListener("mousemove",r.moveHandler),document.addEventListener("touchmove",r.moveHandler,{passive:!1}),document.addEventListener("mouseup",r.endHandler),document.addEventListener("touchend",r.endHandler),null==(i=(o=r.options).onStart)||i.call(o,{x:r.offsetX,y:r.offsetY},t)}o.addEventListener("mousedown",i),o.addEventListener("touchstart",i,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=normalizeOptions$H(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)}}),vEllipsis=defineDirective({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=normalizeOptions$G(t.value);applyEllipsis(e,n);const r={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{r.expanded?(applyEllipsis(e,n),r.expanded=!1):(e.textContent=r.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",r.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",r.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&isTextTruncated(e))&&(e.title=r.originalText),e.__ellipsis=r},updated(e,t){const n=e.__ellipsis;if(!n){const n=normalizeOptions$G(t.value);return void applyEllipsis(e,n)}const r=normalizeOptions$G(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==r.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),r.expandable){const t=()=>{n.expanded?(applyEllipsis(e,r),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=r,n.expanded||applyEllipsis(e,r),"always"===r.titleBehavior?e.title=n.originalText:"auto"===r.titleBehavior?e.title=isTextTruncated(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 applyEllipsis(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 isTextTruncated(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function normalizeOptions$G(e){var t,n,r,o;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!=(r=null==e?void 0:e.expandable)&&r,titleBehavior:null!=(o=null==e?void 0:e.titleBehavior)?o:"auto"}}const EMOJI_PATTERN$1=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;function normalizeOptions$F(e){return!1===e?{strip:!1}:!0===e||void 0===e?{strip:!0}:__spreadValues({strip:!0,replacement:""},e)}function getEmojiPattern(e){if(e.pattern)return new RegExp(e.pattern,"gu");if(e.blockList&&e.blockList.length>0){const t=e.blockList.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(t,"gu")}return e.allowList&&e.allowList.length,EMOJI_PATTERN$1}function isAllowed(e,t){return!(!t||0===t.length)&&t.includes(e)}function stripEmojis(e,t){var n;const r=getEmojiPattern(t),o=t.replacement||"";let i=e;if(t.allowList&&t.allowList.length>0)i=e.replace(r,n=>{var r;return isAllowed(n,t.allowList)?n:(null==(r=t.onEmoji)||r.call(t,n,e.indexOf(n)),o)});else{const n=e.match(r);n&&n.forEach(n=>{var r;null==(r=t.onEmoji)||r.call(t,n,e.indexOf(n))}),i=e.replace(r,o)}return i!==e&&(null==(n=t.onStrip)||n.call(t,e,i)),i}const vEmoji=defineDirective({name:"emoji",ssr:!1,mounted(e,t){var n;if(!isBrowser())return;const r=normalizeOptions$F(t.value);if(!r.strip&&!(null==(n=r.blockList)?void 0:n.length))return;const o={options:r,inputHandler:e=>{const t=e.target,n=t.value,r=stripEmojis(n,o.options);if(r!==n){const e=t.selectionStart||0,o=t.selectionEnd||0;t.value=r;const i=n.length-r.length;t.setSelectionRange(Math.max(0,e-i),Math.max(0,o-i)),t.dispatchEvent(new Event("input",{bubbles:!0}))}},pasteHandler:e=>{var t;if(!o.options.strip)return;const n=null==(t=e.clipboardData)?void 0:t.getData("text");if(n&&EMOJI_PATTERN$1.test(n)){e.preventDefault();const t=stripEmojis(n,o.options),r=e.target,i=r.selectionStart||0,s=r.selectionEnd||0,a=r.value;r.value=a.substring(0,i)+t+a.substring(s),r.setSelectionRange(i+t.length,i+t.length),r.dispatchEvent(new Event("input",{bubbles:!0}))}}};if(e.__emoji=o,on(e,"input",o.inputHandler),on(e,"paste",o.pasteHandler),e.value){const t=stripEmojis(e.value,o.options);t!==e.value&&(e.value=t)}e.classList.add("v-emoji")},updated(e,t){const n=e.__emoji;n&&(n.options=normalizeOptions$F(t.value))},unmounted(e){const t=e.__emoji;t&&(off(e,"input",t.inputHandler),off(e,"paste",t.pasteHandler),e.classList.remove("v-emoji"),delete e.__emoji)}});function normalizeOptions$E(e){var t;if(!e||"string"==typeof e||Array.isArray(e))return{data:e,format:"csv",filename:"export"};const n=e;return __spreadProps(__spreadValues({format:"csv",filename:"export",includeHeaders:!0,delimiter:","},n),{data:null!=(t=n.data)?t:[]})}function toCSV$1(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",r=t.columns||Object.keys(e[0]),o=t.headers||{};return(t.includeHeaders?`${r.map(e=>o[e]||e).join(n)}\n`:"")+e.map(e=>r.map(t=>{const r=e[t];return"string"==typeof r&&(r.includes(n)||r.includes("\n")||r.includes('"'))?`"${r.replace(/"/g,'""')}"`:null!=r?r:""}).join(n)).join("\n")}function toJSON(e){return JSON.stringify(e,null,2)}function toHTML$1(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const r=t.columns||Object.keys(e[0]),o=t.headers||{};let i='<table border="1">\n';if(t.includeHeaders){i+=" <thead>\n <tr>\n";for(const e of r)i+=` <th>${o[e]||e}</th>\n`;i+=" </tr>\n </thead>\n"}i+=" <tbody>\n";for(const t of e){i+=" <tr>\n";for(const e of r)i+=` <td>${null!=(n=t[e])?n:""}</td>\n`;i+=" </tr>\n"}return i+=" </tbody>\n</table>",i}function downloadFile$1(e,t,n){const r=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`${t}.${n}`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function exportData(e){const{data:t,format:n="csv",filename:r="export"}=e;let o;switch(n){case"json":o=toJSON(t);break;case"html":o=toHTML$1(Array.isArray(t)?t:[t],e);break;case"txt":o="string"==typeof t?t:JSON.stringify(t,null,2);break;default:o=toCSV$1(Array.isArray(t)?t:[t],e)}downloadFile$1(o,r,n)}const vExport=defineDirective({name:"export",ssr:!1,mounted(e,t){const n=normalizeOptions$E(t.value);if(!isBrowser())return;const r={options:n,clickHandler:()=>{var e,t,n,o,i,s;if(!1!==(null==(t=(e=r.options).onBeforeExport)?void 0:t.call(e)))try{exportData(r.options),null==(o=(n=r.options).onAfterExport)||o.call(n)}catch(e){null==(s=(i=r.options).onError)||s.call(i,e)}}};e.__export=r,on(e,"click",r.clickHandler),e.classList.add("v-export")},updated(e,t){const n=e.__export;n&&(n.options=normalizeOptions$E(t.value))},unmounted(e){const t=e.__export;t&&(off(e,"click",t.clickHandler),e.classList.remove("v-export"),delete e.__export)}}),defaultOptions$1={direction:"toggle",visible:!0,duration:300,delay:0,easing:"ease",minOpacity:0,maxOpacity:1};function normalizeOptions$D(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},defaultOptions$1),{visible:e}):"string"==typeof e?__spreadProps(__spreadValues({},defaultOptions$1),{direction:e}):__spreadValues(__spreadValues({},defaultOptions$1),e)}function getTimingFunction(e){return{ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",linear:"linear"}[e]||e}const vFade=defineDirective({name:"fade",ssr:!0,mounted(e,t){const n=normalizeOptions$D(t.value),r={options:n,currentOpacity:n.visible?n.maxOpacity||1:n.minOpacity||0,animationFrame:null,isAnimating:!1};e.__fade=r,e.style.transition=`opacity ${n.duration}ms ${getTimingFunction(n.easing||"ease")} ${n.delay}ms`,"in"===n.direction?(e.style.opacity=String(n.minOpacity||0),e.style.display="",r.animationFrame=requestAnimationFrame(()=>{r.animationFrame=null,e.style.opacity=String(n.maxOpacity||1),r.currentOpacity=n.maxOpacity||1})):"out"===n.direction?(e.style.opacity=String(n.maxOpacity||1),e.style.display="",r.animationFrame=requestAnimationFrame(()=>{r.animationFrame=null,e.style.opacity=String(n.minOpacity||0),setTimeout(()=>{e.style.display="none"},(n.duration||300)+(n.delay||0))})):(e.style.opacity=String(r.currentOpacity),n.visible||(e.style.display="none")),e.classList.add("v-fade")},updated(e,t){const n=e.__fade;if(!n)return;const r=normalizeOptions$D(t.value),o=!1!==r.visible,i=n.options.visible;n.options=r,e.style.transition=`opacity ${r.duration}ms ${getTimingFunction(r.easing||"ease")} ${r.delay}ms`,i!==r.visible&&animate(e,n,o?"in":"out")},unmounted(e){const t=e.__fade;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-fade"),delete e.__fade)}});function animate(e,t,n){var r;if(t.isAnimating)return;const o=t.options;t.isAnimating=!0,null==(r=o.onStart)||r.call(o,n),"in"===n?(e.style.display="",e.style.opacity=String(o.minOpacity||0),requestAnimationFrame(()=>{e.style.opacity=String(o.maxOpacity||1),setTimeout(()=>{var e;t.isAnimating=!1,t.currentOpacity=o.maxOpacity||1,null==(e=o.onComplete)||e.call(o,n)},(o.duration||300)+(o.delay||0))})):(e.style.opacity=String(o.minOpacity||0),setTimeout(()=>{var r;t.isAnimating=!1,t.currentOpacity=o.minOpacity||0,e.style.display="none",null==(r=o.onComplete)||r.call(o,n)},(o.duration||300)+(o.delay||0)))}const FOCUSABLE_TAGS$1=new Set(["input","textarea","select","button"]);function isEqual(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,r=t,o=Object.keys(n),i=Object.keys(r);return o.length===i.length&&o.every(e=>n[e]===r[e])}const vFocus=defineDirective({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$C(t.value);if(!n.focus||!isFocusable$1(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const r=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},o=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",r),e.addEventListener("blur",o),e.__focus={options:n,handleFocus:r,handleBlur:o,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const r=normalizeOptions$C(t.value);r.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=r.onFocus)?void 0:t.call(r,e)},e.addEventListener("focus",n.handleFocus)),r.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=r.onBlur)?void 0:t.call(r,e)},e.addEventListener("blur",n.handleBlur));const o=!isEqual(t.value,n.lastValue);r.refocus&&r.focus&&o&&e.focus(),n.options=r,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 normalizeOptions$C(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}function isFocusable$1(e){if(!isBrowser())return!1;const t=e.tagName.toLowerCase();if(FOCUSABLE_TAGS$1.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")}function isFullscreenSupported$1(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}function getFullscreenElement$1(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function requestFullscreen$1(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}function exitFullscreen$1(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}function toggleFullscreen(e,t){return __async(this,null,function*(){t.isFullscreen?yield exitFullscreen$1():yield requestFullscreen$1(e)})}function normalizeOptions$B(e){return"boolean"==typeof e?{initialState:e}:__spreadValues({initialState:!1,toggleKey:"Escape"},e)}const vFullscreen=defineDirective({name:"fullscreen",ssr:!1,mounted(e,t){const n=normalizeOptions$B(t.value);if(!isBrowser()||!isFullscreenSupported$1())return;const r={options:n,clickHandler:()=>toggleFullscreen(e,r),keydownHandler:e=>{!1!==r.options.toggleKey&&e.key===r.options.toggleKey&&r.isFullscreen&&exitFullscreen$1()},changeHandler:()=>{var t,n,o,i,s,a;const l=r.isFullscreen;r.isFullscreen=getFullscreenElement$1()===e,l!==r.isFullscreen&&(r.isFullscreen?(e.classList.add(r.options.fullscreenClass||"v-fullscreen--active"),null==(n=(t=r.options).onEnter)||n.call(t)):(e.classList.remove(r.options.fullscreenClass||"v-fullscreen--active"),null==(i=(o=r.options).onExit)||i.call(o)),null==(a=(s=r.options).onChange)||a.call(s,r.isFullscreen))},isFullscreen:!1};e.__fullscreen=r,document.addEventListener("fullscreenchange",r.changeHandler),document.addEventListener("webkitfullscreenchange",r.changeHandler),document.addEventListener("mozfullscreenchange",r.changeHandler),document.addEventListener("MSFullscreenChange",r.changeHandler),!1!==n.toggleKey&&document.addEventListener("keydown",r.keydownHandler),e.toggleFullscreen=r.clickHandler,n.initialState&&requestFullscreen$1(e),e.classList.add("v-fullscreen")},updated(e,t){const n=e.__fullscreen;n&&(n.options=normalizeOptions$B(t.value))},unmounted(e){const t=e.__fullscreen;t&&(t.isFullscreen&&exitFullscreen$1(),document.removeEventListener("fullscreenchange",t.changeHandler),document.removeEventListener("webkitfullscreenchange",t.changeHandler),document.removeEventListener("mozfullscreenchange",t.changeHandler),document.removeEventListener("MSFullscreenChange",t.changeHandler),!1!==t.options.toggleKey&&document.removeEventListener("keydown",t.keydownHandler),e.classList.remove("v-fullscreen"),e.classList.remove(t.options.fullscreenClass||"v-fullscreen--active"),delete e.__fullscreen,delete e.toggleFullscreen)}});function normalizeOptions$A(e){return"string"==typeof e||Array.isArray(e)?{keywords:e}:__spreadValues({className:"v-highlight",caseSensitive:!1,wholeWord:!1,tag:"mark"},e)}function escapeRegex$3(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function highlightKeywords(e,t){const n=Array.isArray(t.keywords)?t.keywords:[t.keywords];if(0===n.length||!e)return e;const r=t.caseSensitive||!1,o=t.wholeWord||!1,i=t.tag||"mark",s=t.className||"v-highlight",a=t.style?` style="${t.style}"`:"";n.sort((e,t)=>t.length-e.length);let l=e;for(const e of n){if(!e)continue;const t=escapeRegex$3(e),n=o?"\\b":"",c=new RegExp(`${n}${t}${n}`,r?"g":"gi");l=l.replace(c,`<${i} class="${s}"${a}>$&</${i}>`)}return l}function isTextNodeOnly(e){for(const t of e.childNodes)if(t.nodeType===Node.ELEMENT_NODE)return!1;return!0}const vHighlight=defineDirective({name:"highlight",ssr:!0,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$A(t.value);if(!n.keywords||Array.isArray(n.keywords)&&0===n.keywords.length)return;const r={options:n,originalContent:e.innerHTML};e.__highlight=r,applyHighlight(e,r)},updated(e,t){const n=e.__highlight;if(!n){const n=normalizeOptions$A(t.value);if(n.keywords){const t={options:n,originalContent:e.innerHTML};e.__highlight=t,applyHighlight(e,t)}return}const r=normalizeOptions$A(t.value);(Array.isArray(n.options.keywords)?n.options.keywords.join(","):n.options.keywords)===(Array.isArray(r.keywords)?r.keywords.join(","):r.keywords)&&JSON.stringify(n.options)===JSON.stringify(r)||(e.innerHTML=n.originalContent,n.options=r,n.originalContent=e.innerHTML,applyHighlight(e,n))},unmounted(e){const t=e.__highlight;t&&(e.innerHTML=t.originalContent,delete e.__highlight)}});function applyHighlight(e,t){var n,r;if(isTextNodeOnly(e)){const o=highlightKeywords(t.originalContent,t.options);e.innerHTML=o;const i=e.querySelectorAll(t.options.tag||"mark").length;null==(r=(n=t.options).onHighlight)||r.call(n,i)}else processTextNodes(e,t)}function processTextNodes(e,t){var n,r,o,i;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),a=[];let l=s.nextNode(),c=0;for(;l;)(null==(r=null==(n=l.parentNode)?void 0:n.tagName)?void 0:r.toLowerCase())!==(t.options.tag||"mark").toLowerCase()?(a.push(l),l=s.nextNode()):l=s.nextNode();for(const n of a){const r=n.textContent||"",o=highlightKeywords(r,t.options);if(o!==r){const r=document.createElement("span");r.innerHTML=o;const i=n.parentNode;if(i){for(i.insertBefore(r,n),i.removeChild(n);r.firstChild;)i.insertBefore(r.firstChild,r);i.removeChild(r)}c+=e.querySelectorAll(t.options.tag||"mark").length}}null==(i=(o=t.options).onHighlight)||i.call(o,c)}const KEY_ALIASES$1={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"},MODIFIER_KEYS=new Set(["ctrl","alt","shift","meta"]);function normalizeKey(e){const t=e.toLowerCase();return KEY_ALIASES$1[t]||t}function parseHotkeyString(e){const t=e.toLowerCase().split(/[+.]/),n=[];let r="";for(const e of t)MODIFIER_KEYS.has(e)?n.push(e):r=normalizeKey(e);return{key:r,modifiers:n}}function matchesHotkey$1(e,t){if(normalizeKey(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 createEntry(e,t,n,r={}){var o,i,s;return{key:normalizeKey(e),modifiers:new Set(t),handler:n,prevent:null==(o=r.prevent)||o,stop:null==(i=r.stop)||i,disabled:null!=(s=r.disabled)&&s}}function normalizeBinding(e,t,n){if(t){const r=t.toLowerCase();let o;const i=[];if(MODIFIER_KEYS.has(r)){i.push(r);for(const e of Object.keys(n)){const t=e.toLowerCase();MODIFIER_KEYS.has(t)?i.push(t):o=normalizeKey(e)}}else{const e=parseHotkeyString(t);o=e.key,i.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();MODIFIER_KEYS.has(t)&&i.push(t)}}return[createEntry(o,i,"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=>createEntry(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[createEntry(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,r]of Object.entries(e)){const{key:e,modifiers:o}=parseHotkeyString(n),i="function"==typeof r?r:r.handler,s="object"==typeof r?r:{};t.push(createEntry(e,o,i,s))}return t}return[]}function createKeydownHandler(e){return t=>{for(const n of e.entries)if(!n.disabled&&matchesHotkey$1(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}function setupState$1(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=createKeydownHandler(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const vHotkey=defineDirective({name:"hotkey",ssr:!0,mounted(e,t){setupState$1(e,normalizeBinding(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,r=normalizeBinding(t.value,t.arg,t.modifiers);n?n.entries=r:setupState$1(e,r)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});function useTimer(){const e=new Set,t=new Set;return{setTimeout(t,n){const r=setTimeout(()=>{e.delete(r),t()},n);return e.add(r),r},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const r=setInterval(e,n);return t.add(r),r},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}}const STATE_KEY$4="hover";function normalizeOptions$z(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function applyHoverState(e,t,n){var r,o;const{options:i}=t;i.class&&e.classList.add(i.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(r=i.onEnter)||r.call(i,n),null==(o=i.handler)||o.call(i,!0,n)}function applyLeaveState(e,t,n){var r,o;const{options:i}=t;i.class&&e.classList.remove(i.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(r=i.onLeave)||r.call(i,n),null==(o=i.handler)||o.call(i,!1,n)}const vHover=defineDirective({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=normalizeOptions$z(t.value);if(n.disabled||!isBrowser())return;const r=useTimer();let o=!1;const i={options:n,isHovering:!1,timer:r,cleanup:null};i.cleanup=bindEvents$2(e,{mouseenter:t=>{const s=t;r.clearAll(),o||(n.enterDelay&&n.enterDelay>0?r.setTimeout(()=>{o=!0,i.isHovering=!0,applyHoverState(e,i,s)},n.enterDelay):(o=!0,i.isHovering=!0,applyHoverState(e,i,s)))},mouseleave:t=>{const s=t;r.clearAll(),o&&(n.leaveDelay&&n.leaveDelay>0?r.setTimeout(()=>{o=!1,i.isHovering=!1,applyLeaveState(e,i,s)},n.leaveDelay):(o=!1,i.isHovering=!1,applyLeaveState(e,i,s)))}}),setState$1(e,STATE_KEY$4,i)},updated(e,t){const n=getState$1(e,STATE_KEY$4);if(!n)return;const r=normalizeOptions$z(t.value);r.disabled&&!n.options.disabled&&e.classList.remove(n.options.class||"v-hover"),n.options=r},unmounted(e){var t;const n=getState$1(e,STATE_KEY$4);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),deleteState(e,STATE_KEY$4))}}),DEFAULTS={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let globalZIndex=9999;function getDistance$4(e,t,n,r){return Math.sqrt(__pow(n-e,2)+__pow(r-t,2))}function clamp(e,t,n){return Math.max(t,Math.min(n,e))}function createOverlay(e){var t;const n=null!=(t=e.zIndex)?t:++globalZIndex,r=document.createElement("div");r.className="v-image-preview-overlay",e.class&&r.classList.add(e.class),Object.assign(r.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 o=document.createElement("div");Object.assign(o.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const i=document.createElement("img");if(i.src=e.previewSrc||e.src||"",i.alt=e.alt||"",Object.assign(i.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),i.addEventListener("dragstart",e=>e.preventDefault()),o.appendChild(i),!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}),r.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)"}),r.appendChild(e)}const s=document.createElement("div");return s.className="v-image-preview-hint",s.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(s.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"}),r.appendChild(s),setTimeout(()=>s.style.opacity="0",DEFAULTS.hintDuration),r.appendChild(o),{overlay:r,imageContainer:o,image:i}}function createTransformManager(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:r,translateX:o,translateY:i}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${o}px, ${i}px) scale(${r})`;const s=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");s&&(s.textContent=`${Math.round(100*r)}%`,s.style.opacity="1",clearTimeout(s._hideTimer),s._hideTimer=setTimeout(()=>{s.style.opacity="0"},DEFAULTS.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=DEFAULTS.minScale,maxScale:r=DEFAULTS.maxScale}=e.options;return clamp(t,n,r)},constrainTranslate:(t,n)=>{const{scale:r}=e.transform;if(!e.image||r<=1)return{x:0,y:0};const o=e.image.getBoundingClientRect(),i=o.width*(r-1)/2,s=o.height*(r-1)/2;return{x:clamp(t,-i,i),y:clamp(n,-s,s)}}}}function createGestureHandlers(e,t,n){const{updateTransform:r,resetTransform:o,constrainScale:i,constrainTranslate:s}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:o,transform:s,options:a}=e;if(1===t.touches.length){if(!1!==a.enableDoubleTap&&n-o.lastTapTime<DEFAULTS.tapTimeout)return t.preventDefault(),s.scale=s.scale>1?1:i(DEFAULTS.doubleTapZoom),o.lastTapTime=0,void r(!0);o.lastTapTime=n,o.isDragging=!0,o.startX=t.touches[0].clientX-s.translateX,o.startY=t.touches[0].clientY-s.translateY,o.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==a.enablePinchZoom&&(o.isDragging=!1,o.startDistance=getDistance$4(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),o.startScale=s.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:o,options:a}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,i=t.touches[0].clientY-n.startY,a=s(e,i);o.translateX=a.x,o.translateY=a.y,r(!1)}else if(2===t.touches.length&&!1!==a.enablePinchZoom){const e=getDistance$4(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);o.scale=i(n.startScale*(e/n.startDistance)),r(!1)}},handleTouchEnd:t=>{const{gesture:r,transform:i,options:s}=e;if(r.isDragging=!1,!1!==s.enableSwipeClose&&1===t.changedTouches.length&&i.scale<=1){if(t.changedTouches[0].clientY-r.swipeStartY<-100)return void n()}i.scale<1&&o()},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,o=t.clientY-e.gesture.startY,i=s(n,o);e.transform.translateX=i.x,e.transform.translateY=i.y,r(!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=i(e.transform.scale*n),r(!1),e.transform.scale<.8&&setTimeout(o,100)}}}function normalizeOptions$y(e,t){var n,r,o,i,s,a,l,c,u,d;const p="IMG"===t.tagName?t.src:void 0,m=t.getAttribute("data-preview")||void 0,f="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:m,alt:f,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:DEFAULTS.minScale,maxScale:DEFAULTS.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||m,alt:(null==e?void 0:e.alt)||f,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(r=null==e?void 0:e.closeOnClickOutside)||r,closeOnEsc:null==(o=null==e?void 0:e.closeOnEsc)||o,showCloseButton:null==(i=null==e?void 0:e.showCloseButton)||i,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(s=null==e?void 0:e.enablePinchZoom)||s,enableDoubleTap:null==(a=null==e?void 0:e.enableDoubleTap)||a,enableSwipeClose:null==(l=null==e?void 0:e.enableSwipeClose)||l,showZoomIndicator:null==(c=null==e?void 0:e.showZoomIndicator)||c,minScale:null!=(u=null==e?void 0:e.minScale)?u:DEFAULTS.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:DEFAULTS.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const vImagePreview=defineDirective({name:"image-preview",ssr:!1,mounted(e,t){const n=normalizeOptions$y(t.value,e),r={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=r,n.disabled)return;e.style.cursor="zoom-in";const o=createTransformManager(r),i=()=>{r.isOpen&&r.overlay&&(r.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!r.overlay)return;r.overlay.remove(),r.overlay=null,r.imageContainer=null,r.image=null,r.isOpen=!1,r.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=r;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=r.options).onClose)||t.call(e)},DEFAULTS.animationDuration))},s=createGestureHandlers(r,o,i),a=()=>{var e,t,n;if(r.isOpen||r.options.disabled)return;const{overlay:a,imageContainer:l,image:c}=createOverlay(r.options);r.overlay=a,r.imageContainer=l,r.image=c,r.isOpen=!0,document.body.appendChild(a),document.body.style.overflow="hidden",requestAnimationFrame(()=>a.style.opacity="1"),r.handlers.touchStart=s.handleTouchStart,r.handlers.touchMove=s.handleTouchMove,r.handlers.touchEnd=s.handleTouchEnd,r.handlers.mouseDown=s.handleMouseDown,r.handlers.mouseMove=s.handleMouseMove,r.handlers.mouseUp=s.handleMouseUp,r.handlers.wheel=s.handleWheel,a.addEventListener("touchstart",s.handleTouchStart,{passive:!1}),a.addEventListener("touchmove",s.handleTouchMove,{passive:!1}),a.addEventListener("touchend",s.handleTouchEnd,{passive:!0}),c.addEventListener("mousedown",s.handleMouseDown),document.addEventListener("mousemove",s.handleMouseMove),document.addEventListener("mouseup",s.handleMouseUp),a.addEventListener("wheel",s.handleWheel,{passive:!1}),null==(e=a.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),i()}),!1!==r.options.closeOnClickOutside&&a.addEventListener("click",()=>{r.transform.scale<=1?i():o.resetTransform()}),!1!==r.options.closeOnEsc&&(r.handlers.esc=e=>{"Escape"===e.key&&(r.transform.scale>1?o.resetTransform():i())},document.addEventListener("keydown",r.handlers.esc)),null==(n=(t=r.options).onOpen)||n.call(t)};r.handlers.click=a,e.addEventListener("click",a)},updated(e,t){const n=e.__imagePreview;n&&(n.options=normalizeOptions$y(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 normalizeOptions$x(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 vInfiniteScroll=defineDirective({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=normalizeOptions$x(t.value);if(n.disabled||!isBrowser())return;let r;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);r=t||getScrollParent$2(e)}else r=n.container;else r=getScrollParent$2(e);const o={options:n,container:r,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(o.isLoading||o.options.disabled||o.options.loading)return;if(o.throttleTimer)return;o.throttleTimer=setTimeout(()=>{o.throttleTimer=null},n.throttle);checkShouldLoad(r,e,n.distance||0)&&(yield triggerLoad(o,e))})};e.__infiniteScroll=o,n.useIntersection&&supportsIntersectionObserver()?setupIntersectionObserver(e,o):on(r,"scroll",o.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=normalizeOptions$x(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),off(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function checkShouldLoad(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const r=e,o=r.scrollTop,i=r.scrollHeight;return o+r.clientHeight>=i-n}function triggerLoad(e,t){return __async(this,null,function*(){var n,r,o,i,s,a;e.isLoading=!0,null==(r=(n=e.options).onLoadStart)||r.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(i=(o=e.options).onError)||i.call(o,t)}finally{e.isLoading=!1,null==(a=(s=e.options).onLoadEnd)||a.call(s),t.classList.remove("v-infinite-scroll--loading")}})}function setupIntersectionObserver(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 r of n)r.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield triggerLoad(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}const STATE_KEY$3="__intersect";function normalizeOptions$w(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 createObserverCallback(e,t,n){return r=>{var o,i,s,a;for(const l of r){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:r}=l;null==(o=n.handler)||o.call(n,l,t.observer),null==(i=n.onChange)||i.call(n,r,l),r?(null==(s=n.onEnter)||s.call(n,l,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(a=n.onLeave)||a.call(n,l,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:r,entry:l}}))}}}function createObserver(e,t,n){return new IntersectionObserver(createObserverCallback(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const vIntersect=defineDirective({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=normalizeOptions$w(t.value);if(n.disabled||!isBrowser()||!supportsIntersectionObserver())return void(supportsIntersectionObserver()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const r={options:n,observer:null,hasTriggeredOnce:!1};r.observer=createObserver(e,r,n),e[STATE_KEY$3]=r,r.observer.observe(e)},updated(e,t){var n,r,o;const i=e[STATE_KEY$3];if(!i)return;const s=normalizeOptions$w(t.value),a=s.root!==i.options.root||s.rootMargin!==i.options.rootMargin||s.threshold!==i.options.threshold;s.disabled!==i.options.disabled&&(s.disabled?null==(n=i.observer)||n.disconnect():null==(r=i.observer)||r.observe(e)),a&&(null==(o=i.observer)||o.disconnect(),i.observer=createObserver(e,i,s),i.observer.observe(e)),i.options=s},unmounted(e){var t;const n=e[STATE_KEY$3];n&&(null==(t=n.observer)||t.disconnect(),delete e[STATE_KEY$3])}});let globalObserver$1=null;function getGlobalObserver$1(e){return globalObserver$1||(globalObserver$1=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(load(e.target),null==globalObserver$1||globalObserver$1.unobserve(e.target))})},{rootMargin:`${e}px`}),globalObserver$1)}function setSrc$1(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function setLazyState(e,t){e.dataset.lazyState=t}function getLazyState(e){return e.dataset.lazyState||"pending"}function load(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;setLazyState(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,r;setSrc$1(e,t.options.src),setLazyState(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(r=(n=t.options).onLoad)||r.call(n,e)},n.onerror=()=>{var n,r;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>load(e),1e3*t.attempt):(t.options.error&&setSrc$1(e,t.options.error),setLazyState(e,"error"),e.classList.add("v-lazy--error"),null==(r=(n=t.options).onError)||r.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function observe(e){const t=e.__lazy;if(t)if(supportsIntersectionObserver())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const n=getGlobalObserver$1(t.options.preload||0);t.observer=n,n.observe(e)}else load(e)}function unobserve(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):globalObserver$1&&globalObserver$1.unobserve(e))}function normalizeOptions$v(e){return"string"==typeof e?{src:e}:e||{}}const vLazy=defineDirective({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=normalizeOptions$v(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");setLazyState(e,"pending"),n.placeholder&&setSrc$1(e,n.placeholder),e.classList.add("v-lazy");const r={options:n,attempt:0};e.__lazy=r,observe(e)},updated(e,t){const n=e.__lazy;if(!n)return;const r=normalizeOptions$v(t.value);r.disabled?unobserve(e):r.src!==n.options.src&&(n.options=r,n.attempt=0,"pending"!==getLazyState(e)&&(setLazyState(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),r.placeholder&&setSrc$1(e,r.placeholder),observe(e)))},unmounted(e){unobserve(e),delete e.__lazy}});function normalizeOptions$u(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 DEFAULT_SPINNER$1='\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';function createLoadingOverlay$1(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||DEFAULT_SPINNER$1,r=document.createElement("div");if(r.className=e.spinnerClass||"v-loading__spinner",r.innerHTML=n,t.appendChild(r),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}const vLoading=defineDirective({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(!isBrowser())return;const n=normalizeOptions$u(t.value);if(n.disabled)return;const r={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=r,ensurePosition(e),n.value&&showLoading(e,r)},updated(e,t){const n=e.__loading;if(!n)return;const r=normalizeOptions$u(t.value);if(r.disabled)hideLoading(e,n);else{if(r.value&&!n.options.value?showLoading(e,n):!r.value&&n.options.value&&hideLoading(e,n),n.loadingOverlay&&r.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=r.text||"")}n.options=r}},unmounted(e){const t=e.__loading;t&&(hideLoading(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function showLoading(e,t){t.loadingOverlay||(t.loadingOverlay=createLoadingOverlay$1(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function hideLoading(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 normalizeOptions$t(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)}function getDistance$3(e,t){return Math.sqrt(__pow(t.x-e.x,2)+__pow(t.y-e.y,2))}const vLongPress=defineDirective({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=normalizeOptions$t(t.value);if(n.disabled||!isBrowser())return;const r={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};r.startHandler=e=>{var t;const o=e;n.prevent&&o.preventDefault(),n.stop&&o.stopPropagation(),r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null);const i=getEventPosition(o);if(r.startPos={x:i.x,y:i.y},r.startTime=Date.now(),null==(t=n.onStart)||t.call(n,o),n.onTick){let e=n.duration;r.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}r.timerId=setTimeout(()=>{r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),n.handler(o)},n.duration)},r.endHandler=e=>{var t;const o=e;r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),r.startTime>0&&(null==(t=n.onCancel)||t.call(n,o)),r.startTime=0},r.moveHandler=e=>{var t;if(!r.timerId)return;const o=e,i=getEventPosition(o);getDistance$3(r.startPos,{x:i.x,y:i.y})>(n.distance||10)&&(r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),null==(t=n.onCancel)||t.call(n,o),r.startTime=0)},e.__longPress=r,on(e,"mousedown",r.startHandler),on(e,"mouseup",r.endHandler),on(e,"mouseleave",r.endHandler),on(e,"mousemove",r.moveHandler),on(e,"touchstart",r.startHandler,{passive:!n.prevent}),on(e,"touchend",r.endHandler),on(e,"touchcancel",r.endHandler),on(e,"touchmove",r.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(normalizeOptions$t(t.value).disabled||(e.__longPress=null))}n.options=normalizeOptions$t(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),off(e,"mousedown",t.startHandler),off(e,"mouseup",t.endHandler),off(e,"mouseleave",t.endHandler),off(e,"mousemove",t.moveHandler),off(e,"touchstart",t.startHandler),off(e,"touchend",t.endHandler),off(e,"touchcancel",t.endHandler),off(e,"touchmove",t.moveHandler),delete e.__longPress)}});function normalizeOptions$s(e){return"string"==typeof e||e&&"object"==typeof e&&!("animationData"in e)?{animationData:e}:__spreadValues({autoplay:!0,loop:!0,speed:1,direction:1,renderer:"svg",preserveAspectRatio:!0},e)}function loadLottie$1(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] v-lottie: lottie-web not found. Please install it: npm install lottie-web"),null}})}const vLottie=defineDirective({name:"lottie",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$s(t.value),r=document.createElement("div");r.className=`v-lottie ${n.class||""}`,r.style.cssText=`\n width: 100%;\n height: 100%;\n ${!1!==n.preserveAspectRatio?"display: flex; align-items: center; justify-content: center;":""}\n `,e.appendChild(r);const o={options:n,animation:null,container:r};e.__lottie=o,initAnimation(o),e.classList.add("v-lottie-container")},updated(e,t){const n=e.__lottie;if(!n)return;const r=normalizeOptions$s(t.value),o=n.options.animationData,i=r.animationData;JSON.stringify(o)!==JSON.stringify(i)?(n.animation&&n.animation.destroy(),n.options=r,initAnimation(n)):(n.options=r,n.animation&&(void 0!==r.speed&&n.animation.setSpeed(r.speed),void 0!==r.direction&&n.animation.setDirection(r.direction),void 0!==r.loop&&(n.animation.loop=r.loop)))},unmounted(e){const t=e.__lottie;t&&(t.animation&&t.animation.destroy(),e.removeChild(t.container),e.classList.remove("v-lottie-container"),delete e.__lottie)}});function initAnimation(e){return __async(this,null,function*(){const t=yield loadLottie$1();if(!t)return;const n=e.options,r={container:e.container,renderer:n.renderer||"svg",loop:!1!==n.loop,autoplay:!1!==n.autoplay};"string"==typeof n.animationData&&n.animationData.startsWith("http")?r.path=n.animationData:r.animationData=n.animationData,e.animation=t.loadAnimation(r),void 0!==n.speed&&e.animation.setSpeed(n.speed),void 0!==n.direction&&e.animation.setDirection(n.direction),n.segments&&e.animation.playSegments(n.segments,!0),n.onReady&&e.animation.addEventListener("DOMLoaded",()=>{n.onReady(e.animation)}),n.onComplete&&e.animation.addEventListener("complete",n.onComplete),n.onLoopComplete&&e.animation.addEventListener("loopComplete",n.onLoopComplete),n.onEnterFrame&&e.animation.addEventListener("enterFrame",e=>{n.onEnterFrame(e.currentTime)});const o=e.container.parentElement;o&&(o.lottiePlay=()=>{var t;return null==(t=e.animation)?void 0:t.play()},o.lottiePause=()=>{var t;return null==(t=e.animation)?void 0:t.pause()},o.lottieStop=()=>{var t;return null==(t=e.animation)?void 0:t.stop()},o.lottieSetSpeed=t=>{var n;return null==(n=e.animation)?void 0:n.setSpeed(t)},o.lottieSetDirection=t=>{var n;return null==(n=e.animation)?void 0:n.setDirection(t)},o.lottieGoToAndPlay=(t,n=!0)=>{var r;return null==(r=e.animation)?void 0:r.goToAndPlay(t,n)},o.lottieGoToAndStop=(t,n=!0)=>{var r;return null==(r=e.animation)?void 0:r.goToAndStop(t,n)})})}function transformText$1(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function normalizeOptions$r(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 vLowercase=defineDirective({name:"lowercase",ssr:!0,mounted(e,t){const n=normalizeOptions$r(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>transformText$1(e,n));e.__lowercaseCleanup=t}else transformTextContent(e,e=>transformText$1(e,n))},updated(e,t){const n=normalizeOptions$r(t.value);isInputElement(e)?n.onInput&&(e.value=transformText$1(e.value,n)):transformTextContent(e,e=>transformText$1(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),STATE_KEY$2="__mask",TOKEN_PATTERNS$1={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function parseMask$1(e,t){return[...e].map(e=>{const n=TOKEN_PATTERNS$1[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function normalizeOptions$q(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 formatValue(e,t,n,r){let o="",i=0;for(const s of t){if(i>=e.length){o+=s.isLiteral?s.placeholder:r?n:"";continue}const t=e[i];s.isLiteral?(t===s.placeholder&&i++,o+=s.placeholder):s.pattern.test(t)?(o+=t,i++):t===n?(o+=r?n:"",i++):i++}return o}function getRawValue(e,t,n){let r="";for(let o=0;o<e.length&&o<t.length;o++)t[o].isLiteral||e[o]===n||(r+=e[o]);return r}function isComplete(e,t,n){for(let r=0;r<t.length;r++)if(!t[r].isLiteral&&(r>=e.length||e[r]===n))return!1;return!0}function getCursorPos(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const vMask=defineDirective({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!isInputElement(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const r=normalizeOptions$q(t.value);if(r.disabled||!isBrowser())return;const o=r.placeholder||"_",i=parseMask$1(r.mask,o),s=e=>{var t,n,s;const a=e.target,l=a.value,c=a.selectionStart||0,u=formatValue(l,i,o,null==(t=r.showPlaceholder)||t);if(u!==l)return a.value=u,a.setSelectionRange(getCursorPos(i,c),getCursorPos(i,c)),void a.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=r.onChange)||n.call(r,u,getRawValue(u,i,o)),isComplete(u,i,o)&&(null==(s=r.onComplete)||s.call(r,u))},a=()=>{!e.value&&r.showPlaceholder&&(e.value=formatValue("",i,o,!0))},l=()=>{r.showMaskOnBlur||isComplete(e.value,i,o)||!r.clearIncomplete||(e.value="")};on(e,"input",s),on(e,"focus",a),on(e,"blur",l),e[STATE_KEY$2]={options:r,tokens:i,placeholder:o,inputHandler:s,focusHandler:a,blurHandler:l},e.value&&(e.value=formatValue(e.value,i,o,null==(n=r.showPlaceholder)||n))},updated(e,t){const n=e[STATE_KEY$2];n&&(n.options=normalizeOptions$q(t.value),n.tokens=parseMask$1(n.options.mask,n.placeholder))},unmounted(e){const t=e[STATE_KEY$2];t&&(off(e,"input",t.inputHandler),off(e,"focus",t.focusHandler),off(e,"blur",t.blurHandler),delete e[STATE_KEY$2])}});function formatNumber$2(e,t){const{precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),i+u+s}function parseToNumber(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),r=Number.parseFloat(n);return isNaN(r)?null:r}function clampValue(e,t){var n;let r=e;return!(null==(n=t.allowNegative)||n)&&r<0&&(r=Math.abs(r)),clamp$1(r,t.min,t.max)}function calculateCursorPosition(e,t,n,r=0){let o=0,i=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&o++;for(let e=r;e<t.length;e++)if(/\d/.test(t[e])&&i++,i>=o)return e+1;return t.length}function setupNumberInput(e,t,n){const{decimal:r=".",prefix:o=""}=t;let i=!1;const s=()=>{if(i)return;const s=e.value,a=e.selectionStart||0;if(!s||"-"===s)return;const l=parseToNumber(s,r);if(null===l)return i=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(i=!1);const c=clampValue(l,t),u=n(c,t);if(u!==s){i=!0;const t=calculateCursorPosition(s,u,a,o.length);e.value=u,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}},a=()=>{if(!e.value||"-"===e.value)return;const o=parseToNumber(e.value,r);if(null!==o){const r=clampValue(o,t),s=n(r,t);i=!0,e.value=s,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}};if(e.addEventListener("input",s),e.addEventListener("blur",a),e.value){const o=parseToNumber(e.value,r);if(null!==o){const r=n(clampValue(o,t),t);i=!0,e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}}return()=>{e.removeEventListener("input",s),e.removeEventListener("blur",a)}}function formatMoney$1(e,t){const{precision:n=2,separator:r=",",decimal:o=".",symbol:i="$",symbolPosition:s="before"}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),"before"===s?i+u:u+i}const vMoney=defineDirective({name:"money",ssr:!0,mounted(e,t){var n,r,o;const i="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(i.precision=null!=(r=i.precision)?r:2,isInputElement(e)){const{symbol:t="$",symbolPosition:n="before"}=i,r="before"===n?t:"",o=setupNumberInput(e,__spreadProps(__spreadValues({},i),{prefix:r}),formatMoney$1);e.__money={options:i,cleanup:o},requestAnimationFrame(()=>{const t=e;if(t.value){const e=parseToNumber(t.value,i.decimal||".");if(null!==e){const n=formatMoney$1(clampValue(e,i),i);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==(o=e.textContent)?void 0:o.trim();t&&(n=parseToNumber(t,i.decimal||"."))}null!==n&&(e.textContent=formatMoney$1(clampValue(n,i),i))}},updated(e,t){var n,r;const o="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};o.precision=null!=(r=o.precision)?r:2;const i=e.__money;if(i)i.options=o;else if(!isInputElement(e)){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=formatMoney$1(clampValue(n,o),o))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function normalizeOptions$p(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 vMutation=defineDirective({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=normalizeOptions$p(t.value);if(n.disabled||!isBrowser())return;if(!supportsMutationObserver())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const r={options:n,observer:null};r.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),r.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=r},updated(e,t){const n=e.__mutation;if(!n)return;const r=normalizeOptions$p(t.value);r.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!r.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:r.attributes,attributeFilter:r.attributeFilter,childList:r.childList,subtree:r.subtree,characterData:r.characterData,attributeOldValue:r.attributeOldValue,characterDataOldValue:r.characterDataOldValue}):r.disabled||r.attributes===n.options.attributes&&r.childList===n.options.childList&&r.subtree===n.options.subtree&&r.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:r.attributes,attributeFilter:r.attributeFilter,childList:r.childList,subtree:r.subtree,characterData:r.characterData,attributeOldValue:r.attributeOldValue,characterDataOldValue:r.characterDataOldValue})),n.options=r},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),vNumber=defineDirective({name:"number",ssr:!0,mounted(e,t){var n,r;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if(isInputElement(e)){const t=setupNumberInput(e,o,formatNumber$2);e.__number={options:o,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=parseToNumber(t.value,o.decimal||".");if(null!==e){const n=formatNumber$2(clampValue(e,o),o);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==(r=e.textContent)?void 0:r.trim();t&&(n=parseToNumber(t,o.decimal||"."))}null!==n&&(e.textContent=formatNumber$2(clampValue(n,o),o))}},updated(e,t){var n;const r="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},o=e.__number;if(o)o.options=r;else if(!isInputElement(e)){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=formatNumber$2(clampValue(n,r),r))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}});function normalizeOptions$o(e){return"function"==typeof e?{onPan:e}:__spreadValues({threshold:10,direction:"all",preventDefault:!0,stopPropagation:!1,pointers:["touch","mouse"]},e)}function getDirection$1(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function createPanEvent(e,t,n=!1,r=!1){const o=t.currentX-t.startX,i=t.currentY-t.startY,s=Math.sqrt(o*o+i*i),a=Date.now()-t.startTime;return{originalEvent:e,direction:getDirection$1(o,i),deltaX:o,deltaY:i,distance:s,x:t.currentX,y:t.currentY,startX:t.startX,startY:t.startY,isPanning:t.isPanning,isFirst:n,isFinal:r,velocity:s/(a||1)}}function getPosition$1(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}function isDirectionAllowed$1(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}const vPan=defineDirective({name:"pan",ssr:!1,mounted(e,t){var n,r;if(!isBrowser())return;const o=normalizeOptions$o(t.value),i={options:o,startX:0,startY:0,currentX:0,currentY:0,isPanning:!1,startTime:0,touchstartHandler:e=>handleStart$2(e,i),touchmoveHandler:e=>handleMove$2(e,i),touchendHandler:e=>handleEnd$2(e,i),mousedownHandler:e=>handleStart$2(e,i),mousemoveHandler:e=>handleMove$2(e,i),mouseupHandler:e=>handleEnd$2(e,i)};e.__pan=i,(null==(n=o.pointers)?void 0:n.includes("touch"))&&(on(e,"touchstart",i.touchstartHandler,{passive:!1}),on(e,"touchmove",i.touchmoveHandler,{passive:!1}),on(e,"touchend",i.touchendHandler),on(e,"touchcancel",i.touchendHandler)),(null==(r=o.pointers)?void 0:r.includes("mouse"))&&on(e,"mousedown",i.mousedownHandler),e.classList.add("v-pan")},updated(e,t){const n=e.__pan;n&&(n.options=normalizeOptions$o(t.value))},unmounted(e){const t=e.__pan;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),off(e,"mousedown",t.mousedownHandler),e.classList.remove("v-pan"),delete e.__pan)}});function handleStart$2(e,t,n){const r=getPosition$1(e);t.startX=r.x,t.startY=r.y,t.currentX=r.x,t.currentY=r.y,t.isPanning=!1,t.startTime=Date.now(),t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation(),"mousedown"===e.type&&(document.addEventListener("mousemove",t.mousemoveHandler),document.addEventListener("mouseup",t.mouseupHandler))}function handleMove$2(e,t,n){var r,o,i,s;const a=getPosition$1(e);t.currentX=a.x,t.currentY=a.y;const l=t.currentX-t.startX,c=t.currentY-t.startY,u=Math.sqrt(l*l+c*c),d=t.options.threshold||10;if(!t.isPanning&&u<d)return;if(!isDirectionAllowed$1(getDirection$1(l,c),t.options.direction))return;t.options.preventDefault&&e.preventDefault();const p=t.isPanning;t.isPanning=!0;const m=createPanEvent(e,t,!p);p||null==(o=(r=t.options).onStart)||o.call(r,m),null==(s=(i=t.options).onPan)||s.call(i,m)}function handleEnd$2(e,t){var n,r;if(document.removeEventListener("mousemove",t.mousemoveHandler),document.removeEventListener("mouseup",t.mouseupHandler),!t.isPanning)return;const o=createPanEvent(e,t,!1,!0);null==(r=(n=t.options).onEnd)||r.call(n,o),t.isPanning=!1}function normalizeOptions$n(e){return"boolean"==typeof e?{enabled:e,speed:.5}:"number"==typeof e?{speed:e,enabled:!0}:__spreadValues({speed:.5,enabled:!0,reverse:!1,horizontal:!1,useTransform:!0},e)}function isMobile$1(e){return!!e&&window.innerWidth<e}const vParallax=defineDirective({name:"parallax",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$n(t.value),scrollHandler:()=>handleScroll(e,n),resizeHandler:()=>handleResize(e,n),isVisible:!0,lastOffset:0,ticking:!1};e.__parallax=n,e.style.willChange="transform";on(getScrollParent$1(e),"scroll",n.scrollHandler,{passive:!0}),on(window,"resize",n.resizeHandler,{passive:!0}),handleScroll(e,n),e.classList.add("v-parallax")},updated(e,t){const n=e.__parallax;n&&(n.options=normalizeOptions$n(t.value))},unmounted(e){const t=e.__parallax;if(!t)return;off(getScrollParent$1(e),"scroll",t.scrollHandler),off(window,"resize",t.resizeHandler),e.style.willChange="",e.style.transform="",e.classList.remove("v-parallax"),delete e.__parallax}});function handleScroll(e,t){t.options.enabled&&!isMobile$1(t.options.mobileBreakpoint)&&(t.ticking||(t.ticking=!0,requestAnimationFrame(()=>{const n=e.getBoundingClientRect(),r=window.innerHeight;if(t.isVisible=n.top<r&&n.bottom>0,t.isVisible){const r=window.scrollY;let o=(r-(n.top+r))*(t.options.speed||.5);void 0!==t.options.minScroll&&(o=Math.max(o,t.options.minScroll)),void 0!==t.options.maxScroll&&(o=Math.min(o,t.options.maxScroll)),t.options.reverse&&(o=-o),t.options.transform?e.style.transform=t.options.transform(o,e):!1!==t.options.useTransform&&(t.options.horizontal?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`),t.lastOffset=o}t.ticking=!1})))}function handleResize(e,t){handleScroll(e,t)}function getScrollParent$1(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}const STATE_KEY$1="__permission",WILDCARD$1="*";let globalConfig=null;function configurePermission(e){globalConfig=e}function getPermissionConfig(){return globalConfig}function normalizeOptions$m(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}function hasPermission$1(e,t){return t.includes(WILDCARD$1)||t.includes(e)}function verifyPermission(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!globalConfig)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=globalConfig.getPermissions(),r=(null==(t=globalConfig.getRoles)?void 0:t.call(globalConfig))||[],o=globalConfig.roleMap||{},i=Array.isArray(e.value)?e.value:[e.value];function s(e){if(e in o)return r.includes(e);if(hasPermission$1(e,n))return!0;for(const t of r){if(hasPermission$1(e,o[t]||[]))return!0}return!1}return"every"===(e.mode||"some")?i.every(s):i.some(s)}function handleDenied(e,t,n){var r,o;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(r=e.parentNode)||r.insertBefore(n.placeholder,e),null==(o=e.parentNode)||o.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")}}function handleGranted(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")}}function getState(e){return e[STATE_KEY$1]||(e[STATE_KEY$1]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[STATE_KEY$1]}function checkPermission(e,t){var n,r;const o=getState(e);o.options=normalizeOptions$m(t.value);const i=verifyPermission(o.options);null==(r=(n=o.options).onChange)||r.call(n,i);const s=o.options.action||"remove";i?handleGranted(e,s,o):handleDenied(e,s,o)}function cleanup(e){const t=e[STATE_KEY$1];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[STATE_KEY$1]}const vPermission=defineDirective({name:"permission",ssr:!0,mounted(e,t){checkPermission(e,t)},updated(e,t){checkPermission(e,t)},unmounted(e){cleanup(e)}});function normalizeOptions$l(e){return"function"==typeof e?{onPinch:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function getDistance$2(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function getCenter$3(e){return e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function createPinchEvent(e,t,n=!1,r=!1){const o=getCenter$3(e.touches);return{originalEvent:e,scale:t.initialDistance>0?t.currentDistance/t.initialDistance:1,distance:t.currentDistance,initialDistance:t.initialDistance,centerX:o.x,centerY:o.y,isPinching:t.isPinching,isFirst:n,isFinal:r}}const vPinch=defineDirective({name:"pinch",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$l(t.value),initialDistance:0,currentDistance:0,isPinching:!1,initialScale:1,savedTransition:"",touchstartHandler:t=>handleStart$1(t,n,e),touchmoveHandler:t=>handleMove$1(t,n,e),touchendHandler:t=>handleEnd$1(t,n,e)};e.__pinch=n,on(e,"touchstart",n.touchstartHandler,{passive:!1}),on(e,"touchmove",n.touchmoveHandler,{passive:!1}),on(e,"touchend",n.touchendHandler),on(e,"touchcancel",n.touchendHandler),e.classList.add("v-pinch")},updated(e,t){const n=e.__pinch;n&&(n.options=normalizeOptions$l(t.value))},unmounted(e){const t=e.__pinch;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),e.classList.remove("v-pinch"),delete e.__pinch)}});function handleStart$1(e,t,n){if(2===e.touches.length){if(t.initialDistance=getDistance$2(e.touches),t.currentDistance=t.initialDistance,t.isPinching=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,r=new DOMMatrix(e);t.initialScale=r.a,t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation()}}function handleMove$1(e,t,n){var r,o,i,s;if(2!==e.touches.length)return;if(t.currentDistance=getDistance$2(e.touches),t.initialDistance<=0)return;const a=t.currentDistance/t.initialDistance;if(void 0!==t.options.minScale&&a<t.options.minScale)return;if(void 0!==t.options.maxScale&&a>t.options.maxScale)return;t.options.preventDefault&&e.preventDefault();const l=t.isPinching;t.isPinching=!0;const c=createPinchEvent(e,t,!l);if(l||null==(o=(r=t.options).onStart)||o.call(r,c),t.options.enableTransform){const e=t.options.transformOrigin||"center center";n.style.transformOrigin=e,n.style.transform=`scale(${t.initialScale*a})`}null==(s=(i=t.options).onPinch)||s.call(i,c)}function handleEnd$1(e,t,n){var r,o;if(!t.isPinching)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const i=createPinchEvent(__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),t,!1,!0);null==(o=(r=t.options).onEnd)||o.call(r,i),t.isPinching=!1,t.initialDistance=0,t.currentDistance=0}const vPrint=defineDirective({name:"print",ssr:!0,mounted(e,t){const n=normalizeOptions$k(t.value),r={options:n,clickHandler:null};if(e.__print=r,n.immediate)return void setTimeout(()=>printElement(e,n),100);const o=()=>{printElement(e,r.options)};e.addEventListener("click",o),r.clickHandler=o,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const r=normalizeOptions$k(t.value);n.options=r},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function normalizeOptions$k(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function printElement(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 printInNewWindow$1(n,t):yield printInIframe$1(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function printInIframe$1(e,t){return __async(this,null,function*(){var n,r,o;const i=document.createElement("iframe");i.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(i);const s=i.contentDocument||(null==(n=i.contentWindow)?void 0:n.document);if(!s)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(i);const a=buildPrintContent$1(e,t);s.open(),s.write(a),s.close(),yield waitForImages$1(s);try{null==(r=i.contentWindow)||r.focus(),null==(o=i.contentWindow)||o.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(i)},1e3)})}function printInNewWindow$1(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 r=buildPrintContent$1(e,t);n.document.open(),n.document.write(r),n.document.close(),yield waitForImages$1(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}function buildPrintContent$1(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 r=t.title||document.title||"Print",o=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${r}</title>\n\t${n}\n</head>\n<body>\n\t${o}\n</body>\n</html>`}function waitForImages$1(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 normalizeOptions$j(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,max:100,min:0,height:4,color:"#42b883",backgroundColor:"rgba(0, 0, 0, 0.1)",duration:300,showText:!1,animate:!0,indeterminate:!1,striped:!1,animated:!1,position:"top"},e||{})}function createProgressContainer(e){const t=document.createElement("div");t.className=`v-progress ${e.class||""}`,t.style.cssText=`\n position: absolute;\n ${"bottom"===e.position?"bottom":"top"}: 0;\n left: 0;\n right: 0;\n height: ${e.height}px;\n background: ${e.backgroundColor};\n overflow: hidden;\n z-index: 1000;\n `;const n=document.createElement("div");n.className="v-progress__bar";let r=`\n height: 100%;\n background-color: ${e.color};\n transition: ${!1!==e.animate?`width ${e.duration}ms ease`:"none"};\n width: 0%;\n `;if(e.striped&&(r+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),n.style.cssText=r,e.indeterminate?(n.classList.add("v-progress--indeterminate"),n.style.width="30%",n.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(n.style.animation="v-progress-stripes 1s linear infinite"),t.appendChild(n),e.showText){const n=document.createElement("span");n.className="v-progress__text",n.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max((e.height||4)-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,t.appendChild(n)}return{container:t,progressBar:n}}function ensureStyles$5(){if(!isBrowser())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}const vProgress=defineDirective({name:"progress",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$j(t.value);ensureStyles$5();"static"===getComputedStyle(e).position&&(e.style.position="relative");const{container:r,progressBar:o}=createProgressContainer(n),i={options:n,progressBar:o,container:r,currentValue:0};e.__progress=i,e.appendChild(r),n.indeterminate||setProgress(i,n.value),e.classList.add("v-progress-container")},updated(e,t){const n=e.__progress;if(!n)return;const r=n.options,o=normalizeOptions$j(t.value);n.options=o,n.container&&(n.container.style.height=`${o.height}px`,n.container.style.background=o.backgroundColor||"rgba(0, 0, 0, 0.1)"),n.progressBar&&(n.progressBar.style.backgroundColor=o.color||"#42b883"),r.indeterminate!==o.indeterminate&&n.progressBar?o.indeterminate?(n.progressBar.classList.add("v-progress--indeterminate"),n.progressBar.style.width="30%",n.progressBar.style.animation="v-progress-indeterminate 1.5s infinite linear"):(n.progressBar.classList.remove("v-progress--indeterminate"),n.progressBar.style.animation="",setProgress(n,o.value)):o.indeterminate||o.value===r.value||setProgress(n,o.value)},unmounted(e){const t=e.__progress;t&&(t.container&&t.container.parentNode&&t.container.parentNode.removeChild(t.container),e.classList.remove("v-progress-container"),delete e.__progress)}});function setProgress(e,t){var n,r;const{options:o,progressBar:i,container:s}=e;if(!i||!s)return;const a=o.min||0,l=o.max||100,c=Math.max(a,Math.min(l,t)),u=(c-a)/(l-a)*100;if(i.style.width=`${u}%`,o.showText){const e=s.querySelector(".v-progress__text");e&&(e.textContent=`${Math.round(u)}%`)}e.currentValue=c,null==(n=o.onChange)||n.call(o,c,u),u>=100&&(null==(r=o.onComplete)||r.call(o))}const DEFAULT_DISTANCE=60,DEFAULT_MAX_DISTANCE=100,DEFAULT_SUCCESS_DURATION=500,DEFAULT_ERROR_DURATION=1e3,DEFAULT_INDICATORS={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function normalizeOptions$i(e){var t,n,r,o,i;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:DEFAULT_DISTANCE,maxDistance:null!=(n=e.maxDistance)?n:DEFAULT_MAX_DISTANCE,disabled:null!=(r=e.disabled)&&r,indicator:e.indicator,successDuration:null!=(o=e.successDuration)?o:DEFAULT_SUCCESS_DURATION,errorDuration:null!=(i=e.errorDuration)?i:DEFAULT_ERROR_DURATION,onStateChange:e.onStateChange}}function createIndicator(){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}function updateIndicator(e,t,n){var r;const o=null==(r=n.indicator)?void 0:r[t];e.textContent=o||DEFAULT_INDICATORS[t]}function setState(e,t){var n,r;e.state!==t&&(e.state=t,updateIndicator(e.indicatorEl,t,e.options),null==(r=(n=e.options).onStateChange)||r.call(n,t))}function applyTransform(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function resetPosition(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",setState(e,"idle")}function triggerRefresh(e){return __async(this,null,function*(){setState(e,"loading");const t=e.options.distance;applyTransform(e,t);try{yield e.options.handler(),setState(e,"success"),yield sleep$1(e.options.successDuration)}catch(t){setState(e,"error"),yield sleep$1(e.options.errorDuration)}finally{resetPosition(e)}})}function sleep$1(e){return new Promise(t=>setTimeout(t,e))}function createHandlers(e){const{contentEl:t,options:n}=e;return{touchStart:r=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=r.touches[0].clientY,e.currentY=e.startY,setState(e,"idle"))},touchMove:r=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=r.touches[0].clientY;const o=e.currentY-e.startY;if(o<=0)return void(t.style.transform&&(t.style.transition="",resetPosition(e)));r.preventDefault();const i=Math.min(.5*o,n.maxDistance),s=i/n.distance;t.style.transition="none",applyTransform(e,i),setState(e,s>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const r=e.currentY-e.startY,o=Math.min(.5*r,n.maxDistance);t.style.transition="","ready"===e.state&&o>=n.distance?triggerRefresh(e):resetPosition(e)}}}function bindEvents$1(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function unbindEvents$1(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const vPullRefresh=defineDirective({name:"pull-refresh",ssr:!1,mounted(e,t){const n=normalizeOptions$i(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const r=document.createElement("div");for(r.className="v-pull-refresh__content",r.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)r.appendChild(e.firstChild);e.appendChild(r);const o=createIndicator();e.insertBefore(o,r);const i={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:o,contentEl:r,handlers:null};i.handlers=createHandlers(i),e.__pullRefresh=i,n.disabled||bindEvents$1(e,i.handlers),updateIndicator(o,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const r=n.options.disabled;n.options=normalizeOptions$i(t.value),updateIndicator(n.indicatorEl,n.state,n.options),n.options.disabled&&!r?unbindEvents$1(e,n.handlers):!n.options.disabled&&r&&bindEvents$1(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(unbindEvents$1(e,t.handlers),delete e.__pullRefresh)}});function getResizeInfo(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}function normalizeOptions$h(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)}function createFallbackResize(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 r=n.contentWindow;return r&&r.addEventListener("resize",t),{iframe:n,cleanup:()=>{r&&r.removeEventListener("resize",t),n.remove()}}}const vResize=defineDirective({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=normalizeOptions$h(t.value);if(n.disabled||!isBrowser())return;ensurePosition(e);const r={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(r.pendingEntry=e,r.debounceTimer||(r.debounceTimer=setTimeout(()=>{r.pendingEntry&&n.handler(r.pendingEntry),r.debounceTimer=null,r.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=r,supportsResizeObserver())r.observer=new ResizeObserver(e=>{for(const t of e)r.handler(t)}),r.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:o}=createFallbackResize(e,()=>{const t=e.getBoundingClientRect(),o={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};r.handler(o),n.onFallback&&n.onFallback(getResizeInfo(o))});r.fallbackIframe=t,e.__resizeCleanup=o}},updated(e,t){const n=e.__resize;n&&(n.options=normalizeOptions$h(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 normalizeOptions$g(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}function createRipple(e,t,n){const r=t.getBoundingClientRect(),o=e.clientX-r.left,i=e.clientY-r.top,s=2*Math.max(r.width,r.height),a=document.createElement("span");return a.className="v-ripple__wave",a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${s}px;\n height: ${s}px;\n left: ${o-s/2}px;\n top: ${i-s/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,a}function animateRipple(e,t){const n=t.duration||600,r=t.initialScale||0,o=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${r})`,opacity:.3},{transform:`scale(${o})`,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`,e.style.transform=`scale(${o})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}const vRipple=defineDirective({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=normalizeOptions$g(t.value);if(n.disabled||!isBrowser())return;ensurePosition(e),ensureOverflowHidden(e),e.classList.add("v-ripple");const r={options:n,clickHandler:t=>{if(r.options.disabled)return;const n=createRipple(t,e,r.options);n&&(e.appendChild(n),animateRipple(n,r.options))}};e.__ripple=r,on(e,"click",r.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=normalizeOptions$g(t.value))},unmounted(e){const t=e.__ripple;t&&(off(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}});function normalizeOptions$f(e){return"function"==typeof e?{onRotate:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function getAngle$2(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}function getCenter$2(e){return e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function createRotateEvent(e,t,n=!1,r=!1){const o=getCenter$2(e.touches),i=t.currentAngle*(Math.PI/180);return{originalEvent:e,angle:t.currentAngle,radians:i,rotation:t.currentAngle-t.initialAngle,centerX:o.x,centerY:o.y,isRotating:t.isRotating,isFirst:n,isFinal:r}}const vRotateGesture=defineDirective({name:"rotate-gesture",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$f(t.value),initialAngle:0,currentAngle:0,isRotating:!1,baseRotation:0,savedTransition:"",touchstartHandler:t=>handleStart(t,n,e),touchmoveHandler:t=>handleMove(t,n,e),touchendHandler:t=>handleEnd(t,n,e)};e.__rotateGesture=n,on(e,"touchstart",n.touchstartHandler,{passive:!1}),on(e,"touchmove",n.touchmoveHandler,{passive:!1}),on(e,"touchend",n.touchendHandler),on(e,"touchcancel",n.touchendHandler),e.classList.add("v-rotate-gesture")},updated(e,t){const n=e.__rotateGesture;n&&(n.options=normalizeOptions$f(t.value))},unmounted(e){const t=e.__rotateGesture;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),e.classList.remove("v-rotate-gesture"),delete e.__rotateGesture)}});function handleStart(e,t,n){if(2===e.touches.length){if(t.initialAngle=getAngle$2(e.touches),t.currentAngle=t.initialAngle,t.isRotating=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,r=new DOMMatrix(e);t.baseRotation=Math.atan2(r.b,r.a)*(180/Math.PI),t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation()}}function handleMove(e,t,n){var r,o,i,s;if(2!==e.touches.length)return;t.currentAngle=getAngle$2(e.touches),t.options.preventDefault&&e.preventDefault();const a=t.isRotating;t.isRotating=!0;const l=createRotateEvent(e,t,!a);if(a||null==(o=(r=t.options).onStart)||o.call(r,l),t.options.enableTransform){const e=t.currentAngle-t.initialAngle,r=t.options.transformOrigin||"center center";n.style.transformOrigin=r,n.style.transform=`rotate(${t.baseRotation+e}deg)`}null==(s=(i=t.options).onRotate)||s.call(i,l)}function handleEnd(e,t,n){var r,o;if(!t.isRotating)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const i=createRotateEvent(__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),t,!1,!0);null==(o=(r=t.options).onEnd)||o.call(r,i),t.isRotating=!1,t.initialAngle=0,t.currentAngle=0}const DEFAULT_ALLOWED_TAGS$2=["b","i","u","strong","em","br","p","span","div"],DEFAULT_ALLOWED_ATTRIBUTES$2=["title","alt","href","src"],DANGEROUS_TAGS$2=["script","iframe","object","embed","form","input","style","link","meta","base"],DANGEROUS_ATTRIBUTES$2=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function normalizeOptions$e(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2}:__spreadValues({allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function sanitizeHtml$1(e,t){var n;if(t.handler)return t.handler(e);const r=document.createElement("div");r.innerHTML=e;for(const e of DANGEROUS_TAGS$2){const t=r.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const o=e=>{var n;const r=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(r)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of DANGEROUS_ATTRIBUTES$2)e.removeAttribute(t);const i=e.getAttribute("href");if(i&&i.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 r of n){const n=t.allowedAttributes.includes(r.name.toLowerCase()),o="class"===r.name&&t.allowClass,i="id"===r.name&&t.allowId,s="style"===r.name&&t.allowStyles;n||o||i||s||e.removeAttribute(r.name)}}for(const t of Array.from(e.children))o(t)};for(const e of Array.from(r.children))o(e);return r.innerHTML}const vSanitize=defineDirective({name:"sanitize",ssr:!0,defaults:{allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$e(t.value);if(e.__sanitize={options:n},n.disabled)return;const r=e.innerHTML;r&&(e.innerHTML=sanitizeHtml$1(r,n))},updated(e,t){const n=e.__sanitize;if(!n)return;const r=n.options.disabled;if(n.options=normalizeOptions$e(t.value),n.options.disabled||!n.options.sanitizeOnUpdate){if(r&&!n.options.disabled){const t=e.innerHTML;t&&(e.innerHTML=sanitizeHtml$1(t,n.options))}return}const o=e.innerHTML;o&&(e.innerHTML=sanitizeHtml$1(o,n.options))},unmounted(e){delete e.__sanitize}});function getScrollInfo(e,t,n){let r=0,o=0,i=0,s=0;if(e===window)r=window.scrollX||document.documentElement.scrollLeft,o=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,s=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;r=t.scrollLeft,o=t.scrollTop,i=t.scrollWidth-t.clientWidth,s=t.scrollHeight-t.clientHeight}return{scrollLeft:r,scrollTop:o,scrollLeftMax:i,scrollTopMax:s,progressX:i>0?r/i:0,progressY:s>0?o/s:0,directionX:r!==t?r>t?1:-1:0,directionY:o!==n?o>n?1:-1:0,container:e}}function normalizeOptions$d(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 vScroll=defineDirective({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=normalizeOptions$d(t.value);if(n.disabled||!isBrowser())return;let r;if(n.container)if(n.container===window)r=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);r=t||getScrollParent$2(e)}else r=n.container;else{const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e),i=/(auto|scroll)/.test(t+n+o);r=i?e:getScrollParent$2(e)}const o={options:n,container:r,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)o.pendingEvent=e,o.throttleTimer||(o.throttleTimer=setTimeout(()=>{if(o.pendingEvent){const e=getScrollInfo(r,o.lastScrollLeft,o.lastScrollTop);o.lastScrollLeft=e.scrollLeft,o.lastScrollTop=e.scrollTop,n.handler(o.pendingEvent,e)}o.throttleTimer=null,o.pendingEvent=null},n.throttle));else{const t=getScrollInfo(r,o.lastScrollLeft,o.lastScrollTop);o.lastScrollLeft=t.scrollLeft,o.lastScrollTop=t.scrollTop,n.handler(e,t)}}},i=getScrollInfo(r,0,0);o.lastScrollLeft=i.scrollLeft,o.lastScrollTop=i.scrollTop,e.__scroll=o,on(r,"scroll",o.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=normalizeOptions$d(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),off(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),defaultOptions={loading:!0,animation:"wave",width:"100%",height:"1em",radius:"4px",color:"#e8e8e8",animationColor:"#f0f0f0",preserveDimensions:!0};function normalizeOptions$c(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},defaultOptions),{loading:e}):__spreadValues(__spreadValues({},defaultOptions),e)}function createSkeleton(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width,r="number"==typeof e.height?`${e.height}px`:e.height,o="number"==typeof e.radius?`${e.radius}px`:e.radius;let i="";return i="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color} 25%, ${e.animationColor} 50%, ${e.color} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color};`,t.style.cssText=`\n width: ${n};\n height: ${r};\n border-radius: ${o};\n ${i}\n `,t}function ensureStyles$4(){if(!isBrowser())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}const vSkeleton=defineDirective({name:"skeleton",ssr:!0,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$c(t.value);ensureStyles$4();const r={options:n,originalDisplay:getComputedStyle(e).display,originalWidth:e.style.width,originalHeight:e.style.height,skeletonEl:null};e.__skeleton=r,n.loading&&showSkeleton(e,r),e.classList.add("v-skeleton-container")},updated(e,t){const n=e.__skeleton;if(!n)return;const r=normalizeOptions$c(t.value),o=n.options.loading;n.options=r,r.loading&&!o?showSkeleton(e,n):!r.loading&&o&&hideSkeleton(e,n)},unmounted(e){const t=e.__skeleton;t&&(t.skeletonEl&&t.skeletonEl.parentNode&&t.skeletonEl.parentNode.removeChild(t.skeletonEl),e.classList.remove("v-skeleton-container"),e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight,delete e.__skeleton)}});function showSkeleton(e,t){var n;const r=t.options;if(t.originalDisplay=e.style.display||getComputedStyle(e).display,r.preserveDimensions){const n=getComputedStyle(e);t.originalWidth||(t.originalWidth=e.style.width),t.originalHeight||(t.originalHeight=e.style.height),r.width=n.width,r.height=n.height}e.style.display="none",t.skeletonEl=createSkeleton(r),null==(n=e.parentNode)||n.insertBefore(t.skeletonEl,e.nextSibling)}function hideSkeleton(e,t){t.skeletonEl&&t.skeletonEl.parentNode&&(t.skeletonEl.parentNode.removeChild(t.skeletonEl),t.skeletonEl=null),e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight}const STATE_KEY="__sticky";function normalizeOptions$b(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 parseOffset(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function getScrollContainer(e,t){if(t)return"string"==typeof t?document.querySelector(t)||getScrollParent$2(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:r}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+r))return n}return getScrollParent$2(e)}function checkSticky(e,t){if(t.options.disabled)return void unsetSticky(e,t);const n=parseFloat(parseOffset(t.options.top)),r=t.container===window?{top:0}:t.container.getBoundingClientRect(),o=(t.placeholder||e).getBoundingClientRect().top-r.top<=n;o&&!t.isSticky?setSticky(e,t,n,r.top):!o&&t.isSticky&&unsetSticky(e,t)}function setSticky(e,t,n,r){var o,i,s;t.isSticky=!0;const a=document.createElement("div");a.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(o=e.parentNode)||o.insertBefore(a,e),t.placeholder=a;const l=t.container===window?n:r+n;e.style.position="fixed",e.style.top=`${l}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=parseOffset(t.options.bottom)),t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(s=(i=t.options).onChange)||s.call(i,!0)}function unsetSticky(e,t){var n,r,o,i;t.isSticky&&(t.isSticky=!1,null==(r=null==(n=t.placeholder)?void 0:n.parentNode)||r.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==(i=(o=t.options).onChange)||i.call(o,!1))}const vSticky=defineDirective({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=normalizeOptions$b(t.value);if(n.disabled||!isBrowser())return;const r=getScrollContainer(e,n.container),o={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:r,scrollHandler:()=>checkSticky(e,o),resizeHandler:()=>checkSticky(e,o)};e.classList.add("v-sticky"),e[STATE_KEY]=o,on(r,"scroll",o.scrollHandler,{passive:!0}),on(window,"resize",o.resizeHandler,{passive:!0}),checkSticky(e,o)},updated(e,t){const n=e[STATE_KEY];n&&(n.options=normalizeOptions$b(t.value),checkSticky(e,n))},unmounted(e){var t,n;const r=e[STATE_KEY];r&&(null==(n=null==(t=r.placeholder)?void 0:t.parentNode)||n.removeChild(r.placeholder),Object.assign(e.style,r.originalStyles),e.classList.remove("v-sticky",r.options.stickyClass||"v-sticky--fixed"),off(r.container,"scroll",r.scrollHandler),off(window,"resize",r.resizeHandler),delete e[STATE_KEY])}}),DEFAULT_THRESHOLD=30,DEFAULT_MAX_TIME=500,DEFAULT_DIRECTIONS$1=["left","right","up","down"];function getSwipeDirection$1(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}}function normalizeOptions$a(e){var t,n,r,o,i,s;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:DEFAULT_THRESHOLD,maxTime:null!=(n=e.maxTime)?n:DEFAULT_MAX_TIME,directions:null!=(r=e.directions)?r:[...DEFAULT_DIRECTIONS$1],preventScrollOnSwipe:null==(o=e.preventScrollOnSwipe)||o,disabled:null!=(i=e.disabled)&&i,mouse:null==(s=e.mouse)||s,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function triggerSwipe(e,t,n,r,o,i){var s,a,l,c,u;const{options:d}=e;if(r>(null!=(s=d.maxTime)?s:DEFAULT_MAX_TIME))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(a=d.threshold)?a:DEFAULT_THRESHOLD))return;const p=getSwipeDirection$1(t,n,null!=(l=d.directions)?l:DEFAULT_DIRECTIONS$1);if(!p)return;d.preventScrollOnSwipe&&o.cancelable&&o.preventDefault(),null==(c=d.handler)||c.call(d,p,o);const m={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(u=m[p])||u.call(m),i.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:r}}))}function createSwipeHandler(e,t){return(n,r,o)=>{const i=n-t.startX,s=r-t.startY,a=Date.now()-t.startTime;triggerSwipe(t,i,s,a,o,e)}}function setupState(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},r=createSwipeHandler(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];r(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,r(e.clientX,e.clientY,e))}},n}function bindEvents(e,t){var n;const{handlers:r}=t,o=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",r.touchStart,{passive:!0}),e.addEventListener("touchmove",r.touchMove,{passive:!1}),e.addEventListener("touchend",r.touchEnd),e.addEventListener("touchcancel",r.touchEnd),o&&(e.addEventListener("mousedown",r.mouseDown),e.addEventListener("mouseup",r.mouseUp),e.addEventListener("mouseleave",r.mouseUp))}function unbindEvents(e,t){var n;const{handlers:r}=t,o=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",r.touchStart),e.removeEventListener("touchmove",r.touchMove),e.removeEventListener("touchend",r.touchEnd),e.removeEventListener("touchcancel",r.touchEnd),o&&(e.removeEventListener("mousedown",r.mouseDown),e.removeEventListener("mouseup",r.mouseUp),e.removeEventListener("mouseleave",r.mouseUp))}const vSwipe=defineDirective({name:"swipe",ssr:!1,mounted(e,t){const n=setupState(e,normalizeOptions$a(t.value));n&&(e.__swipe=n,bindEvents(e,n))},updated(e,t){var n,r;const o=e.__swipe,i=normalizeOptions$a(t.value);if(!o){const t=setupState(e,i);return void(t&&(e.__swipe=t,bindEvents(e,t)))}const s=o.options.disabled,a=null==(n=o.options.mouse)||n,l=null==(r=i.mouse)||r;o.options=i,i.disabled&&!s?unbindEvents(e,o):!i.disabled&&s?bindEvents(e,o):a!==l&&(a&&(e.removeEventListener("mousedown",o.handlers.mouseDown),e.removeEventListener("mouseup",o.handlers.mouseUp),e.removeEventListener("mouseleave",o.handlers.mouseUp)),l&&(e.addEventListener("mousedown",o.handlers.mouseDown),e.addEventListener("mouseup",o.handlers.mouseUp),e.addEventListener("mouseleave",o.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(unbindEvents(e,t),delete e.__swipe)}});function normalizeOptions$9(e,t){const n=parseTime(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const vThrottle=defineDirective({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=normalizeOptions$9(t.value,t),r=getEventTypeFromModifiers(t.modifiers)||getDefaultEventType(e),o=throttle(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(r,o),e.__throttle={throttledFn:o,eventType:r,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const r=normalizeOptions$9(t.value,t);if(r.wait!==n.options.wait||r.leading!==n.options.leading||r.trailing!==n.options.trailing){n.throttledFn.cancel();const t=throttle(r.handler,r.wait,{leading:r.leading,trailing:r.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:r}}else r.handler!==n.options.handler&&(n.options.handler=r.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),TOOLTIP_STYLES={padding:"8px 12px",background:"#333",color:"#fff",borderRadius:"6px",fontSize:"14px",lineHeight:"1.5",minWidth:"96px",maxWidth:"320px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"};let tooltipContainer=null;function getTooltipContainer(){return tooltipContainer&&document.body.contains(tooltipContainer)||(tooltipContainer=document.createElement("div"),tooltipContainer.id="directix-tooltip-container",tooltipContainer.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(tooltipContainer)),tooltipContainer}function createTooltip(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:TOOLTIP_STYLES.maxWidth;if(t.style.cssText=["position: absolute",`padding: ${TOOLTIP_STYLES.padding}`,`background: ${TOOLTIP_STYLES.background}`,`color: ${TOOLTIP_STYLES.color}`,`border-radius: ${TOOLTIP_STYLES.borderRadius}`,`font-size: ${TOOLTIP_STYLES.fontSize}`,`line-height: ${TOOLTIP_STYLES.lineHeight}`,`min-width: ${TOOLTIP_STYLES.minWidth}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${TOOLTIP_STYLES.boxShadow}`,"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 r=document.createElement("div");return r.className="v-tooltip__content",r.textContent=e.content,t.appendChild(r),t}function positionTooltip(e,t,n,r){const o=t.getBoundingClientRect(),i=e.getBoundingClientRect();let s=0,a=0;switch(n){case"top":s=o.top-i.height-r,a=o.left+(o.width-i.width)/2;break;case"bottom":s=o.bottom+r,a=o.left+(o.width-i.width)/2;break;case"left":s=o.top+(o.height-i.height)/2,a=o.left-i.width-r;break;case"right":s=o.top+(o.height-i.height)/2,a=o.right+r}const l=window.innerWidth,c=window.innerHeight;a<0&&(a=8),a+i.width>l&&(a=l-i.width-8),s<0&&(s=8),s+i.height>c&&(s=c-i.height-8),e.style.top=`${s}px`,e.style.left=`${a}px`;const u=e.querySelector(".v-tooltip__arrow");if(u){const e=4;switch(n){case"top":Object.assign(u.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(u.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(u.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(u.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}function showTooltip(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,r;const o=createTooltip(t.options);t.tooltip=o,getTooltipContainer().appendChild(o),requestAnimationFrame(()=>{positionTooltip(o,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{o.style.opacity="1"})}),t.isVisible=!0,null==(r=(n=t.options).onShow)||r.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function hideTooltip(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 setupTriggerHandlers(e,t){const{trigger:n="hover"}=t.options,r=()=>showTooltip(e,t),o=()=>hideTooltip(t),i=()=>t.isVisible?o():r();switch(t.handlers={show:r,hide:o,toggle:i},n){case"hover":e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",o);break;case"click":e.addEventListener("click",i),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&o()});break;case"focus":e.addEventListener("focus",r),e.addEventListener("blur",o)}}function removeTriggerHandlers(e,t){const{show:n,hide:r,toggle:o,docHide:i}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),r&&(e.removeEventListener("mouseleave",r),e.removeEventListener("blur",r)),o&&e.removeEventListener("click",o),i&&document.removeEventListener("click",i)}function normalizeOptions$8(e){var t,n,r,o,i,s,a,l;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!=(r=e.delay)?r:0,hideDelay:null!=(o=e.hideDelay)?o:0,offset:null!=(i=e.offset)?i:8,class:e.class,arrow:null==(s=e.arrow)||s,disabled:null!=(a=e.disabled)&&a,maxWidth:e.maxWidth,zIndex:null!=(l=e.zIndex)?l:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function createState(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const vTooltip=defineDirective({name:"tooltip",ssr:!1,mounted(e,t){const n=normalizeOptions$8(t.value);if(n.disabled||!n.content)return;const r=createState(n);e.__tooltip=r,setupTriggerHandlers(e,r),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,r=normalizeOptions$8(t.value);if(n){if("manual"===r.trigger){const t=n.options.disabled;return n.options=r,void(r.disabled&&!t?hideTooltip(n):!r.disabled&&t&&showTooltip(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=r.content)}n.options=r}else if(!r.disabled&&r.content){const t=createState(r);e.__tooltip=t,setupTriggerHandlers(e,t),e.setAttribute("aria-describedby","v-tooltip"),"manual"===r.trigger&&showTooltip(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(),removeTriggerHandlers(e,n),delete e.__tooltip)}}),getDistance$1=(e,t,n,r)=>Math.sqrt(__pow(n-e,2)+__pow(r-t,2)),getAngle$1=(e,t,n,r)=>180*Math.atan2(r-t,n-e)/Math.PI,MOUSE_IGNORE_DURATION=400,vTouch=defineDirective({name:"touch",ssr:!1,mounted(e,t){const n=normalizeOptions$7(t.value),r={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=r;const o=()=>{r.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)},i=e=>{o(),r.options.enableLongPress&&r.options.onLongPress&&(r.longPressTimer=setTimeout(()=>{r.isLongPress=!0,r.options.onLongPress(e)},r.options.longPressTimeout||500))},s=(e,t)=>{const n=r.options.tapThreshold||10;return Math.abs(e-r.startX)>n||Math.abs(t-r.startY)>n},a=(e,t,n)=>{var o,i,s,a,l,c,u,d,p,m,f,v;if(r.isLongPress)return;const h=Date.now()-r.startTime,g=e-r.startX,y=t-r.startY,b=Math.sqrt(__pow(g,2)+__pow(y,2));if(r.options.enableSwipe&&b>=(r.options.swipeThreshold||30)&&h<=(r.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(y)?g>0?"right":"left":y>0?"down":"up";null==(i=(o=r.options).onSwipe)||i.call(o,e,n),"left"===e?null==(a=(s=r.options).onSwipeLeft)||a.call(s,n):"right"===e?null==(c=(l=r.options).onSwipeRight)||c.call(l,n):"up"===e?null==(d=(u=r.options).onSwipeUp)||d.call(u,n):null==(m=(p=r.options).onSwipeDown)||m.call(p,n)}else r.options.enableTap&&b<(r.options.tapThreshold||10)&&h<(r.options.tapTimeout||250)&&(null==(v=(f=r.options).onTap)||v.call(f,n))},l=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),r.startTime=Date.now(),r.isLongPress=!1,1===e.touches.length)r.startX=e.touches[0].clientX,r.startY=e.touches[0].clientY,i(e);else if(2===e.touches.length){o();const[t,n]=e.touches;r.startDistance=getDistance$1(t.clientX,t.clientY,n.clientX,n.clientY),r.startAngle=getAngle$1(t.clientX,t.clientY,n.clientX,n.clientY),r.lastScale=1,r.lastAngle=0}null==(n=(t=r.options).onTouchStart)||n.call(t,e)},c=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),r.longPressTimer&&1===e.touches.length&&s(e.touches[0].clientX,e.touches[0].clientY)&&o(),2===e.touches.length){const[t,n]=e.touches,o=getDistance$1(t.clientX,t.clientY,n.clientX,n.clientY),i=getAngle$1(t.clientX,t.clientY,n.clientX,n.clientY);if(r.options.enablePinch&&r.options.onPinch){const t=o/r.startDistance;Math.abs(t-r.lastScale)>=(r.options.pinchThreshold||.1)&&(r.options.onPinch(t,e),r.lastScale=t)}if(r.options.enableRotate&&r.options.onRotate){const t=i-r.startAngle;Math.abs(t-r.lastAngle)>5&&(r.options.onRotate(t,e),r.lastAngle=t)}}null==(n=(t=r.options).onTouchMove)||n.call(t,e)},u=e=>{var t,n;if(o(),0===e.touches.length){r.lastTouchEndTime=Date.now();const t=e.changedTouches[0];a(t.clientX,t.clientY,e)}null==(n=(t=r.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;r.options.enableMouse&&(Date.now()-r.lastTouchEndTime<MOUSE_IGNORE_DURATION||(e.preventDefault(),r.isMouseDown=!0,r.startTime=Date.now(),r.startX=e.clientX,r.startY=e.clientY,r.isLongPress=!1,i(e),null==(n=(t=r.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;r.isMouseDown&&r.options.enableMouse&&(r.longPressTimer&&s(e.clientX,e.clientY)&&o(),null==(n=(t=r.options).onTouchMove)||n.call(t,e))},m=e=>{var t,n;r.isMouseDown&&r.options.enableMouse&&(r.isMouseDown=!1,o(),r.isLongPress||a(e.clientX,e.clientY,e),null==(n=(t=r.options).onTouchEnd)||n.call(t,e))};r.handlers={touchStart:l,touchMove:c,touchEnd:u,mouseDown:d,mouseMove:p,mouseUp:m},e.addEventListener("touchstart",l,{passive:!1}),e.addEventListener("touchmove",c,{passive:!1}),e.addEventListener("touchend",u),e.addEventListener("touchcancel",u),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",m))},updated(e,t){const n=e.__touch;n&&(n.options=normalizeOptions$7(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 normalizeOptions$7(e){var t,n,r,o,i,s,a,l,c,u,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!=(r=null==e?void 0:e.pinchThreshold)?r:.1,enableSwipe:null==(o=null==e?void 0:e.enableSwipe)||o,enablePinch:null==(i=null==e?void 0:e.enablePinch)||i,enableRotate:null==(s=null==e?void 0:e.enableRotate)||s,enableTap:null==(a=null==e?void 0:e.enableTap)||a,tapTimeout:null!=(l=null==e?void 0:e.tapTimeout)?l:250,tapThreshold:null!=(c=null==e?void 0:e.tapThreshold)?c:10,enableLongPress:null==(u=null==e?void 0:e.enableLongPress)||u,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 trimText$1(e,t){const{position:n="both",chars:r}=t,o=r?`[\\s${escapeRegex$4(r)}]`:"\\s";switch(n){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"),"")}}const vTrim=defineDirective({name:"trim",ssr:!0,mounted(e,t){const n=normalizeOptions$6(t.value);if(isInputElement(e))setupInputElement(e,n);else{const t=e.textContent||"";e.textContent=trimText$1(t,n)}},updated(e,t){const n=normalizeOptions$6(t.value),r=e.__trim;if(isInputElement(e))r&&(r.options=n);else{const t=e.textContent||"";e.textContent=trimText$1(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 setupInputElement(e,t){const n={options:t};e.__trim=n;const r=()=>{const n=e.value,r=trimText$1(n,t);n!==r&&(e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,r=t.replace(/\s+$/g,"");if(t!==r&&(e.value=r,null!==n)){const t=Math.min(n,r.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>r();e.addEventListener("blur",t),n.blurHandler=t}e.value&&r()}function normalizeOptions$6(e){var t,n,r;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==(r=e.onBlur)||r,chars:e.chars}}function truncateText$1(e,t){const{length:n=100,position:r="end",ellipsis:o="..."}=t;if(e.length<=n)return e;switch(r){case"start":return o+e.slice(-(n-o.length));case"middle":{const t=Math.ceil((n-o.length)/2),r=Math.floor((n-o.length)/2);return e.slice(0,t)+o+e.slice(-r)}default:return e.slice(0,n-o.length)+o}}const vTruncate=defineDirective({name:"truncate",ssr:!0,mounted(e,t){const n=normalizeOptions$5(t.value),r=e.textContent||"",o={originalText:r,options:n};e.__truncate=o,applyTruncation(e,r,n)},updated(e,t){const n=e.__truncate,r=normalizeOptions$5(t.value);if(n){const t=n.originalText;JSON.stringify(r)!==JSON.stringify(n.options)&&(n.options=r,applyTruncation(e,t,r))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:r},applyTruncation(e,t,r)}},unmounted(e){delete e.__truncate}});function applyTruncation(e,t,n){const{useCss:r,showTitle:o=!0}=n;if(r)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",o&&t&&e.setAttribute("title",t);else{const r=truncateText$1(t,n);e.textContent=r,o&&t&&t!==r&&e.setAttribute("title",t)}}function normalizeOptions$5(e){var t,n,r,o,i;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!=(r=null==e?void 0:e.ellipsis)?r:"...",useCss:null!=(o=null==e?void 0:e.useCss)&&o,showTitle:null==(i=null==e?void 0:e.showTitle)||i}}function normalizeOptions$4(e){return"string"==typeof e?{text:e}:__spreadProps(__spreadValues({speed:50,delay:0,loop:!1,deleteDelay:1500,deleteSpeed:30,cursor:"|",cursorBlink:!0},e),{text:"string"==typeof e?e:e.text||""})}function createCursor(e){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}function ensureStyles$3(){if(!isBrowser())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}const vTypewriter=defineDirective({name:"typewriter",ssr:!0,mounted(e,t){const n=normalizeOptions$4(t.value);if(!n.text)return;isBrowser()&&ensureStyles$3();const r={options:n,originalContent:e.textContent||"",currentText:"",timeoutId:null,animationFrameId:null,isTyping:!1,isDeleting:!1,cursorElement:null};e.__typewriter=r,e.textContent="",r.cursorElement=createCursor(n),r.cursorElement&&e.appendChild(r.cursorElement),e.classList.add("v-typewriter"),isBrowser()&&(r.timeoutId=setTimeout(()=>{startTyping(e,r)},n.delay||0))},updated(e,t){const n=e.__typewriter;if(!n)return;const r=normalizeOptions$4(t.value);r.text!==n.options.text?(cancelAnimation(n),n.options=r,n.currentText="",n.isTyping=!1,n.isDeleting=!1,e.textContent="",n.cursorElement=createCursor(r),n.cursorElement&&e.appendChild(n.cursorElement),isBrowser()&&(n.timeoutId=setTimeout(()=>{startTyping(e,n)},r.delay||0))):n.options=r},unmounted(e){const t=e.__typewriter;t&&(cancelAnimation(t),e.classList.remove("v-typewriter"),delete e.__typewriter)}});function startTyping(e,t){var n;const{options:r,cursorElement:o}=t;t.isTyping=!0,null==(n=r.onStart)||n.call(r);const i=r.text;!function n(s){var a,l;if(s>=i.length)return t.isTyping=!1,null==(a=r.onComplete)||a.call(r),void(r.loop&&(t.timeoutId=setTimeout(()=>{startDeleting(e,t)},r.deleteDelay)));const c=i[s];t.currentText+=c,e.textContent=t.currentText,o&&e.appendChild(o),null==(l=r.onType)||l.call(r,c,s),t.timeoutId=setTimeout(()=>{n(s+1)},r.speed||50)}(0)}function startDeleting(e,t){var n;const{options:r,cursorElement:o}=t;t.isDeleting=!0,null==(n=r.onDeleteStart)||n.call(r),function n(){var i;if(0===t.currentText.length)return t.isDeleting=!1,null==(i=r.onDeleteComplete)||i.call(r),void(r.loop&&(t.timeoutId=setTimeout(()=>{startTyping(e,t)},r.delay||0)));t.currentText=t.currentText.slice(0,-1),e.textContent=t.currentText,o&&e.appendChild(o),t.timeoutId=setTimeout(()=>{n()},r.deleteSpeed||30)}()}function cancelAnimation(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),e.animationFrameId&&(cancelAnimationFrame(e.animationFrameId),e.animationFrameId=null),e.isTyping=!1,e.isDeleting=!1}function transformText(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function normalizeOptions$3(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 vUppercase=defineDirective({name:"uppercase",ssr:!0,mounted(e,t){const n=normalizeOptions$3(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>transformText(e,n));e.__uppercaseCleanup=t}else transformTextContent(e,e=>transformText(e,n))},updated(e,t){const n=normalizeOptions$3(t.value);isInputElement(e)?n.onInput&&(e.value=transformText(e.value,n)):transformTextContent(e,e=>transformText(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function getItemSize(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}function calculateTotalHeight(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 calculateVisibleRange(e,t,n){const r=n.items,o=n.itemSize||50,i=n.overscan||3;let s=0,a=0,l=0;if("function"==typeof o){let n=0;for(let t=0;t<r.length;t++){const r=o(t);if(n+r>e){s=t,l=n;break}n+=r}for(a=s,n=l;a<r.length&&n<e+t;)n+=o(a),a++;s=Math.max(0,s-i),a=Math.min(r.length,a+i),n=0;for(let e=0;e<s;e++)n+=o(e);return l=n,{startIndex:s,endIndex:a,offsetY:l}}return s=Math.max(0,Math.floor(e/o)-i),a=Math.min(r.length,Math.ceil((e+t)/o)+i),l=s*o,{startIndex:s,endIndex:a,offsetY:l}}function normalizeOptions$2(e){var t,n,r,o;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!=(r=e.overscan)?r:3,render:e.render,keyField:null!=(o=e.keyField)?o:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function createItemElement(e,t,n){const r=document.createElement("div");r.className="v-virtual-list__item",r.dataset.index=String(t);const o=n.keyField||"id";"object"==typeof e&&null!==e&&o in e&&(r.dataset.key=String(e[o]));const i=getItemSize(n,t);return r.style.height=`${i}px`,r.style.boxSizing="border-box",n.render?r.innerHTML=n.render(e,t):r.textContent="object"==typeof e?JSON.stringify(e):String(e),r}const vVirtualList=defineDirective({name:"virtual-list",ssr:!1,mounted(e,t){const n=normalizeOptions$2(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 r=document.createElement("div");r.className="v-virtual-list__content",r.style.position="relative",r.style.height=`${calculateTotalHeight(n)}px`,e.appendChild(r);const o=document.createElement("div");o.className="v-virtual-list__visible",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.right="0",r.appendChild(o);const i={options:n,containerEl:e,contentEl:r,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=i;const s=t=>{const n=e.scrollTop,r=e.clientHeight,{startIndex:s,endIndex:a,offsetY:l}=calculateVisibleRange(n,r,i.options);s===i.startIndex&&a===i.endIndex||(i.startIndex=s,i.endIndex=a,renderVisibleItems(o,i,l),i.options.onVisibleChange&&i.options.onVisibleChange(s,a)),i.options.onScroll&&i.options.onScroll(n)};i.scrollHandler=s,e.addEventListener("scroll",s,{passive:!0});const{startIndex:a,endIndex:l,offsetY:c}=calculateVisibleRange(0,e.clientHeight,n);if(i.startIndex=a,i.endIndex=l,renderVisibleItems(o,i,c),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{s(new Event("scroll"))});t.observe(e),i.resizeObserver=t}},updated(e,t){var n;const r=e.__virtualList;if(!r)return;const o=normalizeOptions$2(t.value);r.options=o,r.contentEl&&(r.contentEl.style.height=`${calculateTotalHeight(o)}px`);const i=e.scrollTop,s=e.clientHeight,{startIndex:a,endIndex:l,offsetY:c}=calculateVisibleRange(i,s,o);r.startIndex=a,r.endIndex=l;const u=null==(n=r.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");u&&renderVisibleItems(u,r,c)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function renderVisibleItems(e,t,n){const{options:r,startIndex:o,endIndex:i}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=o;t<i;t++){const n=r.items[t];if(void 0!==n){const o=createItemElement(n,t,r);e.appendChild(o)}}}function normalizeOptions$1(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const vVisible=defineDirective({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,r;if(!isBrowser())return;const o=normalizeOptions$1(t.value),i=e.style.display,s=e.style.visibility,a={options:o,isVisible:null==(n=o.initial)||n,originalDisplay:i,originalVisibility:s,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:a.isVisible}}))}};e.__visible=a,on(e,"transitionend",a.transitionEndHandler),applyVisibility(e,a,null==(r=o.initial)||r)},updated(e,t){var n;const r=e.__visible;if(!r)return;const o=normalizeOptions$1(t.value);let i;i="boolean"==typeof t.value?t.value:null==(n=o.initial)||n,r.isVisible!==i&&applyVisibility(e,r,i),r.options=o},unmounted(e){const t=e.__visible;t&&(off(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function applyVisibility(e,t,n){const r=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=r=>{r.target!==e||"opacity"!==r.propertyName&&"transform"!==r.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:r}})),t.options.handler&&r!==n&&t.options.handler(n)}function createWatermarkCanvas$1(e){var t;const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("[Directix] v-watermark: Could not get canvas context");const o=e.width||300,i=e.height||200,s=e.fontSize||16,a=e.fontFamily||"sans-serif",l=e.fontWeight||"normal",c=e.color||"rgba(128, 128, 128, 0.15)",u=null!=(t=e.rotate)?t:-22;n.width=o,n.height=i,r.font=`${l} ${s}px ${a}`,r.fillStyle=c,r.textAlign="center",r.textBaseline="middle",r.translate(o/2,i/2),r.rotate(u*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*s,m=-(d.length-1)*p/2;return d.forEach((e,t)=>{r.fillText(e,0,m+t*p)}),n}function createWatermarkElement(e,t){var n;const r=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],o=null!=(n=t.zIndex)?n:9999,i=document.createElement("div");return i.className="v-watermark",i.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: ${o};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${r[0]/2}px ${r[1]/2}px;\n\t\tbackground-size: ${e.width+r[0]}px ${e.height+r[1]}px;\n\t`,i}function normalizeOptions(e){var t,n,r,o,i,s,a,l,c,u,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!=(r=e.rotate)?r:-22,fontSize:null!=(o=e.fontSize)?o:16,fontFamily:null!=(i=e.fontFamily)?i:"sans-serif",fontWeight:null!=(s=e.fontWeight)?s:"normal",color:null!=(a=e.color)?a:"rgba(128, 128, 128, 0.15)",gap:null!=(l=e.gap)?l:[100,100],zIndex:null!=(c=e.zIndex)?c:9999,disabled:null!=(u=e.disabled)&&u,protect:null==(d=e.protect)||d}}const vWatermark=defineDirective({name:"watermark",ssr:!0,mounted(e,t){const n=normalizeOptions(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const r={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=r,n.disabled||applyWatermark(e,r)},updated(e,t){const n=e.__watermark;if(!n)return;const r=normalizeOptions(t.value);r.disabled&&!n.options.disabled?removeWatermark(n):!r.disabled&&n.options.disabled?(n.options=r,applyWatermark(e,n)):r.disabled||(n.options=r,removeWatermark(n),applyWatermark(e,n)),n.options=r},unmounted(e){const t=e.__watermark;t&&(removeWatermark(t),delete e.__watermark)}});function applyWatermark(e,t){const n=t.options;t.canvas=createWatermarkCanvas$1(n),t.watermarkEl=createWatermarkElement(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&setupProtection(e,t)}function removeWatermark(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}function setupProtection(e,t){"undefined"!=typeof MutationObserver&&(t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=createWatermarkCanvas$1(t.options),t.watermarkEl=createWatermarkElement(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"]}))}function createBlurOverlay(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius||5}px);\n -webkit-backdrop-filter: blur(${e.radius||5}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex||999};\n opacity: 0;\n transition: opacity ${e.duration||300}ms ease;\n pointer-events: auto;\n `,t}function useBlur(e={}){var t;const n=vue.ref(null!=(t=vue.unref(e.visible))&&t);let r=null,o="";function i(){var t,i;!r&&isBrowser()&&(n.value=!0,r=createBlurOverlay(__spreadProps(__spreadValues({},e),{radius:null!=(t=vue.unref(e.radius))?t:5})),document.body.appendChild(r),r.style.opacity="1",e.lockScroll&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),null==(i=e.onShow)||i.call(e))}function s(){var t;r&&(n.value=!1,r.style.opacity="0",e.lockScroll&&(document.body.style.overflow=o),setTimeout(()=>{r&&(r.remove(),r=null)},e.duration||300),null==(t=e.onHide)||t.call(e))}function a(){n.value?s():i()}return vue.onUnmounted(()=>{r&&s()}),{isVisible:n,show:i,hide:s,toggle:a,bind:function(t){return isBrowser()?(t.classList.add("v-blur"),"boolean"!=typeof e.visible&&e.visible&&vue.watch(e.visible,e=>{e!==n.value&&a()}),n.value&&i(),()=>{r&&s(),t.classList.remove("v-blur")}):()=>{}}}}const DEFAULT_KEEP_LOWER=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function capitalizeWord(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function capitalizeText(e,t={}){if(!e)return e;const{every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?capitalizeWord(e):r.includes(e.toLowerCase())?e.toLowerCase():capitalizeWord(e)).join(" ")}return capitalizeWord(e)}function useCapitalcase(e){const{text:t,every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER}=e,o=vue.ref(vue.unref(t)),i=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r)],()=>function(){const e=vue.unref(t),s=vue.unref(n),a=vue.unref(r);o.value=e,i.value=capitalizeText(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:i,original:o}}function createCapitalizer(e={}){return t=>capitalizeText(t,e)}function useClickDelay(e){const{handler:t,delay:n=300,disabled:r=!1}=e,o=vue.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}return vue.onUnmounted(()=>{s()}),{isPending:o,click:function(e){if(vue.unref(r)||o.value)return e.preventDefault(),void e.stopPropagation();o.value=!0,t(e),i=setTimeout(()=>{o.value=!1,i=null},vue.unref(n))},reset:function(){i&&(clearTimeout(i),i=null),o.value=!1},cancel:s}}function createDelayedClick(e,t=300){let n=!1;return r=>{if(n)return r.preventDefault(),void r.stopPropagation();n=!0,e(r),setTimeout(()=>{n=!1},t)}}function isValidClick(e,t,n){const r=t.target;if(e.contains(r))return!1;if(null==n?void 0:n.length)for(const e of n){const t="function"==typeof e?e():vue.unref(e),n="string"==typeof t?getElement(t):t;if(n&&(n===r||n.contains(r)))return!1}return!0}function useClickOutside(e){const{handler:t,exclude:n=[],capture:r=!0,events:o=["click"],stop:i=!1,prevent:s=!1}=e;let a=null;const l=new Map;function c(){l.forEach((e,t)=>{document.removeEventListener(t,e,{capture:r})}),l.clear(),a=null}return vue.onUnmounted(()=>{c()}),{bind:function(e){return isBrowser()?(c(),a=e,o.forEach(e=>{const o=e=>{a&&isValidClick(a,e,n)&&(i&&e.stopPropagation(),s&&e.preventDefault(),t(e))};l.set(e,o),document.addEventListener(e,o,{capture:r,passive:!s})}),c):()=>{}}}}function createWaveElement(e,t,n,r,o,i){const s=n.getBoundingClientRect(),a=Math.min(s.width,s.height)*i,l=document.createElement("span");return l.className="v-click-wave__effect",l.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${r};\n width: ${a}px;\n height: ${a}px;\n left: ${e-a/2}px;\n top: ${t-a/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,"function"==typeof l.animate?l.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",opacity:0}],{duration:o,easing:"ease-out",fill:"forwards"}).onfinish=()=>{l.remove()}:(l.style.transition=`transform ${o}ms ease-out, opacity ${o}ms ease-out`,l.style.transform="scale(1)",l.style.opacity="0",setTimeout(()=>l.remove(),o)),l}function useClickWave(e={}){const{color:t="currentColor",duration:n=500,disabled:r=!1,sizeRatio:o=1.5}=e;let i=null,s=null;function a(e){if(vue.unref(r))return;const s=i.getBoundingClientRect(),a=createWaveElement(e.clientX-s.left,e.clientY-s.top,i,vue.unref(t),vue.unref(n),o);i.appendChild(a)}function l(){i&&s&&(i.removeEventListener("click",s),i.classList.remove("v-click-wave")),i=null,s=null}return vue.onUnmounted(()=>{l()}),{bind:function(e){if(!isBrowser())return()=>{};l(),i=e;const t=getComputedStyle(e);return"static"===t.position&&(e.style.position="relative"),"visible"===t.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave"),s=a,e.addEventListener("click",s),l},trigger:function(e){var s,a;if(!i||vue.unref(r))return;const l=i.getBoundingClientRect(),c=createWaveElement(null!=(s=null==e?void 0:e.x)?s:l.width/2,null!=(a=null==e?void 0:e.y)?a:l.height/2,i,vue.unref(t),vue.unref(n),o);i.appendChild(c)}}}function createMenuElement(e,t,n,r){const o=document.createElement("div");o.className=`v-context-menu ${r.class||""}`;const i=r.width?"number"==typeof r.width?`${r.width}px`:r.width:"150px";return o.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${t}px;\n min-width: ${i};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,n.forEach(e=>{if(e.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",o.appendChild(e)}const t=document.createElement("div");if(t.className=`v-context-menu__item ${e.class||""}`,e.disabled&&t.classList.add("v-context-menu__item--disabled"),t.style.cssText=`\n padding: 8px 16px;\n cursor: ${e.disabled?"not-allowed":"pointer"};\n color: ${e.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,e.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=e.icon,t.appendChild(n)}const n=document.createElement("span");n.textContent=e.label,t.appendChild(n),!e.disabled&&e.handler&&(t.addEventListener("click",()=>{e.handler(),o.remove()}),t.addEventListener("mouseenter",()=>{t.style.background="#f5f5f5"}),t.addEventListener("mouseleave",()=>{t.style.background="transparent"})),o.appendChild(t)}),o}function useContextMenu(e){let t=null,n=null,r=null,o=null;function i(){r&&(r.remove(),r=null),o&&document.removeEventListener("click",o)}function s(t,n){if(vue.unref(e.disabled))return;i();const s=vue.unref(e.items);r=createMenuElement(t,n,s,e),document.body.appendChild(r);const a=r.getBoundingClientRect(),l=window.innerWidth,c=window.innerHeight;t+a.width>l&&(r.style.left=l-a.width-8+"px"),n+a.height>c&&(r.style.top=c-a.height-8+"px"),setTimeout(()=>{o=e=>{const t=e.target;r&&!r.contains(t)&&i()},document.addEventListener("click",o)},0)}function a(e){e.preventDefault(),s(e.clientX,e.clientY)}function l(){t&&n&&t.removeEventListener("contextmenu",n),i(),t=null,n=null}return vue.onUnmounted(()=>{l()}),{bind:function(e){return isBrowser()?(l(),t=e,n=a,e.addEventListener("contextmenu",n),l):()=>{}},show:s,hide:i}}function copyToClipboard(e){return __async(this,null,function*(){if(supportsClipboard())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return copyWithExecCommand(e)})}function copyWithExecCommand(e){if(!isBrowser())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)}}function useCopy(e={}){const{source:t,onSuccess:n,onError:r,copiedTimeout:o=1500}=e,i=vue.ref(!1),s=vue.ref(null),a=supportsClipboard()||isBrowser();let l=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:vue.unref(t);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;l&&(clearTimeout(l),l=null),s.value=null;try{if(yield copyToClipboard(a))return i.value=!0,null==n||n(a),l=setTimeout(()=>{i.value=!1,l=null},o),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,i.value=!1,null==r||r(t),!1}})},copied:vue.readonly(i),error:vue.readonly(s),isSupported:a}}function parseTargetTime(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function calculateTime(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 formatTime(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 useCountdown(e){const{target:t,format:n="hh:mm:ss",onComplete:r,onTick:o,interval:i=1e3,autoStart:s=!0}=e,a=vue.ref(calculateTime(0)),l=vue.ref(""),c=vue.ref(!1),u=vue.ref(!1),d=vue.ref(!1);let p=null,m=0,f=0;const v=()=>vue.unref(i),h=()=>vue.unref(n);function g(){const e=Date.now(),t=m-e;if(t<=0)return a.value=calculateTime(0),l.value=formatTime(a.value,h()),d.value=!0,c.value=!1,b(),void(r&&r());a.value=calculateTime(t),l.value=formatTime(a.value,h()),o&&o(a.value)}function y(){c.value||(m=parseTargetTime(vue.unref(t)),c.value=!0,u.value=!1,d.value=!1,g(),p=setInterval(g,v()))}function b(){p&&(clearInterval(p),p=null),c.value=!1}return vue.watch(()=>vue.unref(t),e=>{c.value&&(m=parseTargetTime(e))}),vue.unref(s)&&y(),vue.onUnmounted(()=>{b()}),{time:a,formatted:l,running:c,paused:u,completed:d,start:y,pause:function(){c.value&&(f=m-Date.now(),b(),u.value=!0)},resume:function(){!c.value&&u.value&&(m=Date.now()+f,c.value=!0,u.value=!1,g(),p=setInterval(g,v()))},reset:function(){b(),u.value=!1,d.value=!1,f=0,a.value=calculateTime(0),l.value=formatTime(a.value,h())}}}const easingFunctions={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function formatNumber$1(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale||"en-US",{minimumFractionDigits:t.decimals||0,maximumFractionDigits:t.decimals||0,useGrouping:t.useGrouping||!1}).format(e)}function useCounter(e){var t;const n=vue.ref(null!=(t=e.startValue)?t:0),r=vue.ref(formatNumber$1(n.value,e)),o=vue.ref(!1);let i=null,s=null,a=null,l=vue.unref(e.value),c=n.value;function u(t){var d,p;a||(a=t);const m=t-a,f=e.duration||2e3,v=Math.min(m/f,1),h=(e.customEasing||easingFunctions[e.easing||"easeOutQuart"])(v);n.value=c+(l-c)*h,r.value=formatNumber$1(n.value,e),i&&(i.textContent=r.value),null==(d=e.onUpdate)||d.call(e,n.value,r.value),v<1?s=requestAnimationFrame(u):(n.value=l,r.value=formatNumber$1(l,e),i&&(i.textContent=r.value),o.value=!1,s=null,null==(p=e.onComplete)||p.call(e,l))}function d(){var t;o.value||(o.value=!0,a=null,c=n.value,null==(t=e.onStart)||t.call(e),s=requestAnimationFrame(u))}function p(){s&&(cancelAnimationFrame(s),s=null),o.value=!1}function m(e){l=e,c=n.value,a=null,o.value||d()}function f(){p(),i&&i.classList.remove("v-counter"),i=null}return vue.onUnmounted(()=>{f()}),{currentValue:n,formattedValue:r,isAnimating:o,setValue:m,start:d,stop:p,bind:function(t){return isBrowser()?(f(),i=t,t.classList.add("v-counter"),t.textContent=r.value,"number"!=typeof e.value&&vue.watch(e.value,e=>{m(e)}),d(),f):()=>{}}}}function useDebounce(e){const{handler:t,wait:n=300,leading:r=!1,trailing:o=!0}=e;let i=null,s=null,a=null;const l=()=>{s&&(t.apply(a,s),s=null,a=null)};function c(){i&&(clearTimeout(i),i=null),s=null,a=null}return vue.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,i&&clearTimeout(i),vue.unref(r)&&!i&&l(),i=setTimeout(()=>{vue.unref(o)&&l(),i=null},vue.unref(n))},cancel:c,flush:function(){i&&(clearTimeout(i),l(),i=null)},pending:function(){return null!==i}}}function debounceFn(e,t=300,n){return debounce(e,t,n)}function getBoundary(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()}function getClientCoords(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 parseTranslate(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 useDraggable(e={}){const{axis:t="both",constrain:n=!1,boundary:r,handle:o,grid:i,disabled:s=!1,onStart:a,onDrag:l,onEnd:c}=e,u=vue.ref({x:0,y:0}),d=vue.ref(!1);let p=null,m=null,f=0,v=0,h=0,g=0,y=0,b=0,_=0,w=0,x=0,E=0;function S(e){var t;if(vue.unref(s))return;e.preventDefault();const{clientX:o,clientY:i}=getClientCoords(e);d.value=!0,f=o,v=i;const{x:l,y:c}=parseTranslate(p.style.transform);if(h=l,g=c,vue.unref(n)||r){const e=r?getBoundary(r):null==(t=p.parentElement)?void 0:t.getBoundingClientRect();if(e){const t=p.getBoundingClientRect();y=t.left-e.left,b=t.top-e.top,_=e.width,w=e.height,x=t.width,E=t.height}}p.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",T),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",T),null==a||a({x:h,y:g},e)}function C(e){if(!d.value||vue.unref(s))return;e.preventDefault();const{clientX:o,clientY:a}=getClientCoords(e);let c=o-f,m=a-v;const S=vue.unref(t);"x"===S?m=0:"y"===S&&(c=0);const C=vue.unref(i);C&&(c=Math.round(c/C[0])*C[0],m=Math.round(m/C[1])*C[1]);let T=h+c,L=g+m;if(vue.unref(n)||r){const e=y+c,t=b+m,n=_-x,r=w-E,o=Math.max(0,Math.min(e,n)),i=Math.max(0,Math.min(t,r));T=h+(o-y),L=g+(i-b)}p.style.transform=`translate(${T}px, ${L}px)`,u.value={x:T,y:L},null==l||l({x:T,y:L},e)}function T(e){d.value&&(d.value=!1,null==p||p.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",T),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",T),null==c||c(__spreadValues({},u.value),e))}function L(){if(p){const e=m||p;e.removeEventListener("mousedown",S),e.removeEventListener("touchstart",S)}p=null,m=null}return vue.onUnmounted(()=>{L()}),{position:vue.readonly(u),isDragging:vue.readonly(d),reset:function(){p&&(p.style.transform="translate(0px, 0px)",u.value={x:0,y:0})},bind:function(e){if(!isBrowser())return()=>{};L(),p=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=o?e.querySelector(o):null;const t=m||e;return t.addEventListener("mousedown",S),t.addEventListener("touchstart",S,{passive:!1}),L}}}function measureTextWidth(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const r=document.createElement("canvas").getContext("2d");return r?(r.font=`${t}px ${n}`,r.measureText(e).width):8*e.length}function truncateToWidth(e,t,n="...",r=14,o="sans-serif"){if(t<=0)return e;if(measureTextWidth(e,r,o)<=t)return e;const i=t-measureTextWidth(n,r,o);if(i<=0)return n;let s=0,a=e.length;for(;s<a;){const t=Math.floor((s+a+1)/2);measureTextWidth(e.slice(0,t),r,o)<=i?s=t:a=t-1}return e.slice(0,s)+n}function truncateToLines(e,t,n="..."){if(t<=0)return"";const r=80*t;return e.length<=r?e:e.slice(0,r-n.length)+n}function useEllipsis(e){const{text:t,lines:n=1,ellipsis:r="...",maxWidth:o=0}=e,i=vue.ref(vue.unref(t)),s=vue.ref(""),a=vue.ref(!1);return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r),vue.unref(o)],()=>function(){const e=vue.unref(t),l=vue.unref(n),c=vue.unref(r),u=vue.unref(o);if(i.value=e,!e)return s.value="",void(a.value=!1);if(u>0){const t=truncateToWidth(e,u,c);s.value=t,a.value=t!==e}else if(l>1){const t=truncateToLines(e,l,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),vue.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:i,calculateForWidth:function(e){const n=vue.unref(t),o=vue.unref(r);return!n||e<=0?n||"":truncateToWidth(n,e,o)},wouldTruncate:function(e){const n=vue.unref(t);return!(!n||e<=0)&&measureTextWidth(n)>e}}}function truncateText(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n}function wouldTextTruncate(e,t,n=14){return measureTextWidth(e,n)>t}const EMOJI_PATTERN=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;function useEmoji(e={}){const{strip:t=!0,allowList:n,blockList:r,replacement:o="",onEmoji:i}=e,s=vue.ref("");let a=null,l=null,c=null;function u(e){if(!vue.unref(t))return e;let s=e;if(r&&r.length>0){const t=r.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"gu");s=e.replace(n,o)}else if(n&&n.length>0)s=e.replace(EMOJI_PATTERN,t=>n.includes(t)?t:(null==i||i(t,e.indexOf(t)),o));else{const t=e.match(EMOJI_PATTERN);t&&t.forEach(t=>null==i?void 0:i(t,e.indexOf(t))),s=e.replace(EMOJI_PATTERN,o)}return s}function d(e){return EMOJI_PATTERN.test(e)}function p(e){const t=e.target,n=t.value,r=u(n);if(r!==n){const e=t.selectionStart||0,o=t.selectionEnd||0;t.value=r,s.value=r;const i=n.length-r.length;t.setSelectionRange(Math.max(0,e-i),Math.max(0,o-i)),t.dispatchEvent(new Event("input",{bubbles:!0}))}}function m(e){var n;if(!vue.unref(t))return;const r=null==(n=e.clipboardData)?void 0:n.getData("text");if(r&&d(r)){e.preventDefault();const t=u(r),n=e.target,o=n.selectionStart||0,i=n.selectionEnd||0,a=n.value;n.value=a.substring(0,o)+t+a.substring(i),s.value=n.value,n.setSelectionRange(o+t.length,o+t.length),n.dispatchEvent(new Event("input",{bubbles:!0}))}}function f(){a&&(l&&a.removeEventListener("input",l),c&&a.removeEventListener("paste",c),a.classList.remove("v-emoji")),a=null,l=null,c=null}return vue.onUnmounted(()=>{f()}),{value:s,stripEmojis:u,hasEmoji:d,bind:function(e){if(!isBrowser())return()=>{};if(f(),a=e,s.value=e.value,l=p,c=m,e.addEventListener("input",l),e.addEventListener("paste",c),e.classList.add("v-emoji"),e.value&&vue.unref(t)){const t=u(e.value);t!==e.value&&(e.value=t,s.value=t)}return"boolean"!=typeof t&&vue.watch(t,()=>{if(vue.unref(t)&&a){const e=u(a.value);e!==a.value&&(a.value=e,s.value=e)}}),f}}}function toCSV(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",r=t.columns||Object.keys(e[0]),o=t.headers||{};return(!1!==t.includeHeaders?`${r.map(e=>o[e]||e).join(n)}\n`:"")+e.map(e=>r.map(t=>{const r=e[t];return"string"==typeof r&&(r.includes(n)||r.includes("\n")||r.includes('"'))?`"${r.replace(/"/g,'""')}"`:null!=r?r:""}).join(n)).join("\n")}function toHTML(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const r=t.columns||Object.keys(e[0]),o=t.headers||{};let i='<table border="1">\n';if(!1!==t.includeHeaders){i+=" <thead>\n <tr>\n";for(const e of r)i+=` <th>${o[e]||e}</th>\n`;i+=" </tr>\n </thead>\n"}i+=" <tbody>\n";for(const t of e){i+=" <tr>\n";for(const e of r)i+=` <td>${null!=(n=t[e])?n:""}</td>\n`;i+=" </tr>\n"}return i+=" </tbody>\n</table>",i}function downloadFile(e,t,n){const r=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`${t}.${n}`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function useExport(e){function t(t){var n,r,o;if(!1!==(null==(n=e.onBeforeExport)?void 0:n.call(e)))try{const n=vue.unref(e.data),o=t||vue.unref(e.format)||"csv",i=vue.unref(e.filename)||"export";let s;switch(o){case"json":s=JSON.stringify(n,null,2);break;case"html":s=toHTML(Array.isArray(n)?n:[n],e);break;case"txt":s="string"==typeof n?n:JSON.stringify(n,null,2);break;default:s=toCSV(Array.isArray(n)?n:[n],e)}downloadFile(s,i,o),null==(r=e.onAfterExport)||r.call(e)}catch(t){null==(o=e.onError)||o.call(e,t)}}return{exportData:t,exportCSV:function(){t("csv")},exportJSON:function(){t("json")},exportHTML:function(){t("html")},exportText:function(){t("txt")}}}function useFade(e={}){var t;const n=vue.ref(null==(t=vue.unref(e.visible))||t);let r=null,o=!1;function i(){var t;r&&!o&&(o=!0,null==(t=e.onStart)||t.call(e,"in"),r.style.display="",r.style.opacity=String(e.minOpacity||0),requestAnimationFrame(()=>{r&&(r.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,r.style.opacity=String(e.maxOpacity||1),setTimeout(()=>{var t;o=!1,n.value=!0,null==(t=e.onComplete)||t.call(e,"in")},(e.duration||300)+(e.delay||0)))}))}function s(){var t;r&&!o&&(o=!0,null==(t=e.onStart)||t.call(e,"out"),r.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,r.style.opacity=String(e.minOpacity||0),setTimeout(()=>{var t;r&&(r.style.display="none",o=!1,n.value=!1,null==(t=e.onComplete)||t.call(e,"out"))},(e.duration||300)+(e.delay||0)))}function a(){n.value?s():i()}function l(){r&&r.classList.remove("v-fade"),r=null}return vue.onUnmounted(()=>{l()}),{isVisible:n,fadeIn:i,fadeOut:s,toggle:a,bind:function(t){return isBrowser()?(l(),r=t,t.classList.add("v-fade"),t.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,t.style.opacity=n.value?String(e.maxOpacity||1):String(e.minOpacity||0),n.value||(t.style.display="none"),"boolean"!=typeof e.visible&&e.visible&&vue.watch(e.visible,e=>{e!==n.value&&a()}),l):()=>{}}}}const FOCUSABLE_TAGS=new Set(["input","textarea","select","button"]);function isFocusable(e){if(!isBrowser())return!1;const t=e.tagName.toLowerCase();if(FOCUSABLE_TAGS.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")}function useFocus(e={}){const{onFocus:t,onBlur:n}=e,r=vue.ref(!1);let o=null,i=null,s=null;function a(){o&&(i&&o.removeEventListener("focus",i),s&&o.removeEventListener("blur",s)),o=null,i=null,s=null,r.value=!1}return vue.onUnmounted(()=>{a()}),{isFocused:vue.readonly(r),focus:function(){o&&isFocusable(o)&&o.focus()},blur:function(){o&&o.blur()},bind:function(e){return isBrowser()?(a(),o=e,i=e=>{r.value=!0,null==t||t(e)},s=e=>{r.value=!1,null==n||n(e)},e.addEventListener("focus",i),e.addEventListener("blur",s),r.value=document.activeElement===e,a):()=>{}}}}function isFullscreenSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}function getFullscreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function requestFullscreen(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}function exitFullscreen(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}function useFullscreen(e={}){const{fullscreenClass:t="v-fullscreen--active",onEnter:n,onExit:r,onChange:o}=e,i=vue.ref(!1);let s=null,a=[];function l(){return __async(this,null,function*(){s&&!i.value&&(yield requestFullscreen(s))})}function c(){return __async(this,null,function*(){i.value&&(yield exitFullscreen())})}function u(){const e=i.value;i.value=getFullscreenElement()===s,e!==i.value&&(i.value?(null==s||s.classList.add(t),null==n||n()):(null==s||s.classList.remove(t),null==r||r()),null==o||o(i.value))}function d(){s&&(s.classList.remove("v-fullscreen"),s.classList.remove(t)),a.forEach(e=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}),s=null,a=[]}return vue.onUnmounted(()=>{i.value&&c(),d()}),{isFullscreen:i,enter:l,exit:c,toggle:function(){return __async(this,null,function*(){i.value?yield c():yield l()})},bind:function(e){return isBrowser()&&isFullscreenSupported()?(d(),s=e,e.classList.add("v-fullscreen"),a=[u,u,u,u],document.addEventListener("fullscreenchange",a[0]),document.addEventListener("webkitfullscreenchange",a[1]),document.addEventListener("mozfullscreenchange",a[2]),document.addEventListener("MSFullscreenChange",a[3]),d):()=>{}}}}function escapeRegex$2(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function highlightText(e,t){const n=vue.unref(t.keywords),r=Array.isArray(n)?n:[n];if(0===r.length||!e)return{html:e,count:0};const o=t.caseSensitive||!1,i=t.wholeWord||!1,s=t.tag||"mark",a=t.className||"v-highlight",l=t.style?` style="${t.style}"`:"";r.sort((e,t)=>t.length-e.length);let c=e,u=0;for(const e of r){if(!e)continue;const t=escapeRegex$2(e),n=i?"\\b":"",r=new RegExp(`${n}${t}${n}`,o?"g":"gi");c=c.replace(r,e=>(u++,`<${s} class="${a}"${l}>${e}</${s}>`))}return{html:c,count:u}}function useHighlight(e){const t=vue.ref(0);let n=null,r="";function o(){if(!n)return;n.innerHTML=r;const{html:o,count:i}=highlightText(r,e);n.innerHTML=o,t.value=i}function i(){n&&(n.innerHTML=r),n=null}return vue.onUnmounted(()=>{i()}),{count:t,updateKeywords:function(t){e.keywords=t,o()},bind:function(t){return isBrowser()?(i(),n=t,r=t.innerHTML,"string"==typeof e.keywords||Array.isArray(e.keywords)||vue.watch(e.keywords,()=>{o()}),o(),i):()=>{}}}}const KEY_ALIASES={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:"-"},MODIFIERS=new Set(["ctrl","alt","shift","meta"]);function parseHotkey(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let r="";for(const e of t)MODIFIERS.has(e)?n.add(e):r=KEY_ALIASES[e]||e;return{key:r,modifiers:n}}function matchesHotkey(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,r=t.key;return n.toLowerCase()===r.toLowerCase()}function useHotkey(e={}){const{hotkey:t,hotkeys:n=[],target:r,enabled:o=!0}=e,i=vue.ref(vue.unref(o)),s=new Map;let a=null,l=null,c=null;function u(e){const t=parseHotkey(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function d(e,t){if(!i.value)return;const n=e.key.toLowerCase(),r=s.get(n);if(r)for(const n of r){if(vue.unref(n.disabled))continue;if(!!n.keyup!==t)continue;if(matchesHotkey(e,parseHotkey(n.key))){!1!==n.prevent&&e.preventDefault(),n.stop&&e.stopPropagation(),n.handler(e);break}}}function p(){isBrowser()&&(m(),a=r?vue.unref(r):document,l=e=>d(e,!1),c=e=>d(e,!0),null==a||a.addEventListener("keydown",l),null==a||a.addEventListener("keyup",c))}function m(){a&&(l&&a.removeEventListener("keydown",l),c&&a.removeEventListener("keyup",c)),a=null,l=null,c=null}return t&&u(t),n.forEach(u),vue.watch(i,e=>{e?p():m()}),r&&"object"==typeof r&&"value"in r&&vue.watch(r,()=>{i.value&&p()}),i.value&&p(),vue.onUnmounted(()=>{m()}),{enabled:i,enable:function(){i.value=!0},disable:function(){i.value=!1},toggle:function(){i.value=!i.value},add:u,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}}function useHover(e={}){const{onEnter:t,onLeave:n,class:r,enterDelay:o=0,leaveDelay:i=0}=e,s=vue.ref(!1);let a=null,l=null,c=null;function u(){a&&(clearTimeout(a),a=null),l&&(clearTimeout(l),l=null)}function d(e){if(l&&(clearTimeout(l),l=null),s.value)return;const n=vue.unref(o);n&&n>0?a=setTimeout(()=>{s.value=!0,m(),null==t||t(e),a=null},n):(s.value=!0,m(),null==t||t(e))}function p(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const t=vue.unref(i);t&&t>0?l=setTimeout(()=>{s.value=!1,f(),null==n||n(e),l=null},t):(s.value=!1,f(),null==n||n(e))}function m(){c&&r&&c.classList.add(r)}function f(){c&&r&&c.classList.remove(r)}return vue.onUnmounted(()=>{u(),f()}),{isHovering:s,bind:function(e){return isBrowser()?(c=e,e.addEventListener("mouseenter",d),e.addEventListener("mouseleave",p),()=>{e.removeEventListener("mouseenter",d),e.removeEventListener("mouseleave",p),u(),f(),c=null}):()=>{}}}}function useImagePreview(e={}){const{src:t,closeOnClickOutside:n=!0,closeOnEsc:r=!0,showCloseButton:o=!0,onOpen:i,onClose:s}=e,a=vue.ref(!1),l=vue.ref("");let c=null,u=null,d=null,p=null;function m(e){if(!isBrowser())return;const s=e||(t&&"object"==typeof t?t.value:t);if(!s&&!c)return;const m=s||c.src;l.value=m,u=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 v=document.createElement("img");if(v.src=m,v.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",o){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="×",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(),f()}),u.appendChild(e)}u.appendChild(v),document.body.appendChild(u),n&&(d=f,u.addEventListener("click",d)),r&&(p=e=>{"Escape"===e.key&&f()},document.addEventListener("keydown",p)),a.value=!0,null==i||i()}function f(){u&&(u.remove(),u=null),d&&(document.removeEventListener("click",d),d=null),p&&(document.removeEventListener("keydown",p),p=null),a.value=!1,l.value="",null==s||s()}function v(){c&&m(c.src)}function h(){c&&(c.style.cursor="",c.removeEventListener("click",v)),c=null}return vue.onUnmounted(()=>{h(),f()}),{isOpen:vue.readonly(a),currentSrc:vue.readonly(l),open:m,close:f,bind:function(e){return isBrowser()?(h(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",v),h):()=>{}}}}function useInfiniteScroll(e){const{onLoad:t,loading:n,finished:r,distance:o=0,immediate:i=!0,disabled:s=!1}=e,a=vue.ref(!1),l=vue.ref(!1),c=n||a,u=r||l;let d=null,p=null,m=null,f=null;function v(){return __async(this,null,function*(){if(!(vue.unref(c)||vue.unref(u)||vue.unref(s))){a.value=!0;try{yield t()}finally{a.value=!1}}})}function h(){if(!d||vue.unref(c)||vue.unref(u)||vue.unref(s))return;const e=vue.unref(o);let t,n;if(d===window)t=document.documentElement.scrollHeight-window.scrollY,n=window.innerHeight;else{const e=d;t=e.scrollHeight-e.scrollTop,n=e.clientHeight}t<=n+e&&v()}function g(){m&&(m.disconnect(),m=null),f&&(f.remove(),f=null),d&&p&&d.removeEventListener("scroll",p),d=null,p=null}return vue.onUnmounted(()=>{g()}),{loading:vue.readonly(c),finished:vue.readonly(u),load:v,bind:function(e){if(!isBrowser())return()=>{};if(g(),supportsIntersectionObserver()){f=document.createElement("div"),f.style.cssText="height: 1px; width: 100%; visibility: hidden;",e.appendChild(f);const t=getScrollParent$2(e),n=t instanceof Window?null:t;m=new IntersectionObserver(e=>{e[0].isIntersecting&&v()},{root:n,rootMargin:`${vue.unref(o)}px`}),m.observe(f)}else d=getScrollParent$2(e),p=h,d.addEventListener("scroll",p);return i&&v(),g},stop:g}}function useIntersect(e={}){const{handler:t,onEnter:n,onLeave:r,onChange:o,root:i=null,rootMargin:s="0px",threshold:a=0,once:l=!1}=e,c=vue.ref(!1),u=vue.ref(0);let d=null,p=!1;function m(){d&&(d.disconnect(),d=null),c.value=!1,u.value=0}return vue.onUnmounted(()=>{m()}),{isIntersecting:vue.readonly(c),ratio:vue.readonly(u),bind:function(e){return isBrowser()?(m(),d=isBrowser()&&supportsIntersectionObserver()?new IntersectionObserver(e=>{for(const i of e){if(l&&p)continue;const e=i.isIntersecting;c.value=e,u.value=i.intersectionRatio,null==t||t(i,d),null==o||o(e,i),e?(null==n||n(i,d),l&&(p=!0)):null==r||r(i,d)}},{root:vue.unref(i),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),d&&d.observe(e),m):()=>{}},stop:m}}let globalObserver=null;function getGlobalObserver(e){return globalObserver||(globalObserver=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=e.target,n=t.__lazyLoad;n&&(n(),null==globalObserver||globalObserver.unobserve(t))}})},{rootMargin:`${e}px`}),globalObserver)}function setSrc(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function useLazy(e={}){const{src:t,placeholder:n,error:r,preload:o=0,onLoad:i,onError:s,attempt:a=1}=e,l=vue.ref("pending"),c=vue.ref(!1),u=vue.ref(!1),d=vue.ref(!1);let p=null,m=0,f=null;function v(){const e=vue.unref(t);if(!e||!p)return;if("loading"===l.value)return;l.value="loading",c.value=!0;const n=new Image;n.onload=()=>{setSrc(p,e),l.value="loaded",c.value=!1,u.value=!0,d.value=!1,null==p||p.classList.remove("v-lazy--loading"),null==p||p.classList.add("v-lazy--loaded"),null==i||i(p)},n.onerror=()=>{null==p||p.classList.remove("v-lazy--loading"),m++,m<a?setTimeout(()=>v(),1e3*m):(r&&p&&setSrc(p,r),l.value="error",c.value=!1,d.value=!0,null==p||p.classList.add("v-lazy--error"),null==s||s(p,new Error("Failed to load image")))},p.classList.add("v-lazy--loading"),n.src=e}function h(){p&&(f&&f.unobserve(p),delete p.__lazyLoad,p.classList.remove("v-lazy","v-lazy--loading","v-lazy--loaded","v-lazy--error")),p=null}return vue.onUnmounted(()=>{h()}),{state:vue.readonly(l),isLoading:vue.readonly(c),isLoaded:vue.readonly(u),hasError:vue.readonly(d),bind:function(e){return isBrowser()?(h(),p=e,m=0,l.value="pending",e.classList.add("v-lazy"),n&&setSrc(e,n),e.__lazyLoad=v,supportsIntersectionObserver()?(f=getGlobalObserver(o),f.observe(e),h):(v(),h)):()=>{}},load:v,reset:function(){l.value="pending",c.value=!1,u.value=!1,d.value=!1,m=0}}}const DEFAULT_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';function createLoadingOverlay(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||DEFAULT_SPINNER,r=document.createElement("div");if(r.className=e.spinnerClass||"v-loading__spinner",r.innerHTML=n,t.appendChild(r),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}function useLoading(e={}){const{initial:t=!1,text:n,loadingClass:r="v-loading",spinnerClass:o="v-loading__spinner",textClass:i="v-loading__text",spinner:s,background:a="rgba(255, 255, 255, 0.9)",lock:l=!1}=e,c=vue.ref(vue.unref(t));let u=null,d=null,p="",m="";function f(){u&&!d&&(d=createLoadingOverlay({text:vue.unref(n),loadingClass:r,spinnerClass:o,textClass:i,spinner:s,background:a}),u.appendChild(d),l&&(u.style.overflow="hidden"),u.classList.add("v-loading--active"))}function v(){u&&d&&(d.remove(),d=null,l&&(u.style.overflow=m),u.classList.remove("v-loading--active"))}function h(){v(),u&&(u.style.position=p,u.style.overflow=m),u=null}return vue.watch(c,e=>{e?f():v()}),"object"==typeof n&&"value"in n&&vue.watch(n,e=>{if(d){const t=d.querySelector(`.${i}`);t&&(t.textContent=e||"")}}),vue.onUnmounted(()=>{h()}),{loading:c,start:function(){c.value=!0},stop:function(){c.value=!1},toggle:function(){c.value=!c.value},bind:function(e){return isBrowser()?(h(),u=e,p=e.style.position,m=e.style.overflow,"static"===getComputedStyle(e).position&&(e.style.position="relative"),c.value&&f(),h):()=>{}}}}function useLongPress(e={}){const{duration:t=500,distance:n=10,onStart:r,onTrigger:o,onCancel:i,onTick:s,tickInterval:a=100,prevent:l=!0}=e,c=vue.ref(!1);let u=null,d=null,p={x:0,y:0},m=!1;function f(e){if(!isBrowser())return;l&&e.preventDefault(),g();const n=getEventPosition(e);if(p={x:n.x,y:n.y},m=!0,c.value=!0,null==r||r(e),s){let e=vue.unref(t);d=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}u=setTimeout(()=>{g(),c.value=!1,null==o||o(e)},vue.unref(t))}function v(e){c.value&&(g(),m=!1,c.value=!1,null==i||i(e))}function h(e){if(!c.value||!m)return;const t=getEventPosition(e);getDistance$5(p,{x:t.x,y:t.y})>vue.unref(n)&&v(e)}function g(){u&&(clearTimeout(u),u=null),d&&(clearInterval(d),d=null)}return vue.onUnmounted(()=>{g()}),{isPressing:c,start:f,stop:v,bind:function(e){return e.addEventListener("mousedown",f),e.addEventListener("mouseup",v),e.addEventListener("mouseleave",v),e.addEventListener("mousemove",h),e.addEventListener("touchstart",f,{passive:!l}),e.addEventListener("touchend",v),e.addEventListener("touchcancel",v),e.addEventListener("touchmove",h,{passive:!0}),()=>{e.removeEventListener("mousedown",f),e.removeEventListener("mouseup",v),e.removeEventListener("mouseleave",v),e.removeEventListener("mousemove",h),e.removeEventListener("touchstart",f),e.removeEventListener("touchend",v),e.removeEventListener("touchcancel",v),e.removeEventListener("touchmove",h),g()}}}}function loadLottie(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] useLottie: lottie-web not found. Install: npm install lottie-web"),null}})}function useLottie(e){const t=vue.ref("stopped"),n=vue.shallowRef(null);let r=null,o=null;function i(){n.value&&(n.value.destroy(),n.value=null),o&&o.parentNode&&o.parentNode.removeChild(o),r&&r.classList.remove("v-lottie-container"),o=null,r=null,t.value="stopped"}return vue.onUnmounted(()=>{i()}),{state:t,animation:n,play:function(){var e;null==(e=n.value)||e.play(),t.value="playing"},pause:function(){var e;null==(e=n.value)||e.pause(),t.value="paused"},stop:function(){var e;null==(e=n.value)||e.stop(),t.value="stopped"},setSpeed:function(e){var t;null==(t=n.value)||t.setSpeed(e)},setDirection:function(e){var t;null==(t=n.value)||t.setDirection(e)},goToAndPlay:function(e,r=!0){var o;null==(o=n.value)||o.goToAndPlay(e,r),t.value="playing"},goToAndStop:function(e,r=!0){var o;null==(o=n.value)||o.goToAndStop(e,r),t.value="paused"},bind:function(s){return isBrowser()?(i(),r=s,o=document.createElement("div"),o.className="v-lottie",o.style.cssText="width: 100%; height: 100%;",s.appendChild(o),s.classList.add("v-lottie-container"),function(){__async(this,null,function*(){const r=yield loadLottie();if(!r||!o)return;const i=vue.unref(e.animationData),s={container:o,renderer:e.renderer||"svg",loop:!1!==e.loop,autoplay:!1!==e.autoplay};"string"==typeof i&&i.startsWith("http")?s.path=i:s.animationData=i,n.value=r.loadAnimation(s),void 0!==e.speed&&n.value.setSpeed(vue.unref(e.speed)),void 0!==e.direction&&n.value.setDirection(e.direction),t.value=!1!==e.autoplay?"playing":"stopped",n.value.addEventListener("DOMLoaded",()=>{var t;null==(t=e.onReady)||t.call(e,n.value)}),n.value.addEventListener("complete",()=>{var n;t.value="stopped",null==(n=e.onComplete)||n.call(e)}),n.value.addEventListener("loopComplete",()=>{var t;null==(t=e.onLoopComplete)||t.call(e)})})}(),"number"!=typeof e.speed&&e.speed&&vue.watch(e.speed,e=>{var t;null==(t=n.value)||t.setSpeed(e)}),i):()=>{}}}}function lowercaseText(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function useLowercase(e){const{text:t,first:n=!1}=e,r=vue.ref(vue.unref(t)),o=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n)],()=>function(){const e=vue.unref(t),i=vue.unref(n);r.value=e,o.value=lowercaseText(e,i)}(),{immediate:!0}),{transformed:o,original:r}}function createLowercaser(e=!1){return t=>lowercaseText(t,e)}const TOKEN_PATTERNS={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function parseMask(e,t){return[...e].map(e=>{const n=TOKEN_PATTERNS[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function useMask(e){const{mask:t,placeholder:n="_",showPlaceholder:r=!0,showMaskOnBlur:o=!1,clearIncomplete:i=!1,onChange:s,onComplete:a}=e;let l=null,c=null,u=null,d=null;function p(){return parseMask(vue.unref(t),n)}function m(e,t,r){let o="",i=0;for(const s of t){if(i>=e.length){o+=s.isLiteral?s.placeholder:r?n:"";continue}const t=e[i];s.isLiteral?(t===s.placeholder&&i++,o+=s.placeholder):s.pattern.test(t)?(o+=t,i++):t===n?(o+=r?n:"",i++):i++}return o}function f(e,t){let r="";for(let o=0;o<e.length&&o<t.length;o++)t[o].isLiteral||e[o]===n||(r+=e[o]);return r}function v(e,t){for(let r=0;r<t.length;r++)if(!t[r].isLiteral&&(r>=e.length||e[r]===n))return!1;return!0}function h(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}function g(e){const t=e.target,n=p(),o=t.value,i=t.selectionStart||0,l=m(o,n,r);if(l!==o)return t.value=l,t.setSelectionRange(h(n,i),h(n,i)),void t.dispatchEvent(new Event("input",{bubbles:!0}));null==s||s(l,f(l,n)),v(l,n)&&(null==a||a(l))}function y(){if(!l)return;const e=p();!l.value&&r&&(l.value=m("",e,!0))}function b(){if(!l)return;const e=p();o||v(l.value,e)||!i||(l.value="")}function _(){l&&(c&&l.removeEventListener("input",c),u&&l.removeEventListener("focus",u),d&&l.removeEventListener("blur",d)),l=null,c=null,u=null,d=null}return vue.onUnmounted(()=>{_()}),{getFormattedValue:e=>m(e,p(),r),getRawValue:e=>f(e,p()),isComplete:e=>v(e,p()),bind:function(e){if(!isBrowser())return()=>{};if(_(),l=e,c=g,u=y,d=b,e.addEventListener("input",c),e.addEventListener("focus",u),e.addEventListener("blur",d),e.value){const t=p();e.value=m(e.value,t,r)}return _}}}function formatMoney(e,t={}){const{precision:n=2,separator:r=",",decimal:o=".",symbol:i="$",symbolPosition:s="before"}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),"before"===s?i+u:u+i}function parseMoney(e,t={}){const{decimal:n=".",symbol:r="$"}=t;let o=e.replace(new RegExp(`[${r}\\s]`,"g"),"");return"."!==n?(o=o.replace(/,/g,""),o=o.replace(new RegExp(`\\${n}`,"g"),".")):o=o.replace(/,/g,""),parseFloat(o)||0}function useMoney(e){const{value:t,symbol:n="$",symbolPosition:r="before",precision:o=2,separator:i=",",decimal:s="."}=e,a=vue.ref(vue.unref(t));const l=vue.computed(()=>formatMoney(a.value,{precision:vue.unref(o),separator:vue.unref(i),decimal:vue.unref(s),symbol:vue.unref(n),symbolPosition:vue.unref(r)}));return vue.watch(()=>vue.unref(t),e=>{a.value=e}),{value:a,formatted:l,parse:function(e){return parseMoney(e,{decimal:vue.unref(s),symbol:vue.unref(n)})}}}function createMoneyFormatter(e={}){return t=>formatMoney(t,e)}function useMutation(e){const{handler:t,attributes:n=!1,attributeFilter:r,childList:o=!0,subtree:i=!1,characterData:s=!1,attributeOldValue:a=!1,characterDataOldValue:l=!1,disabled:c=!1}=e;let u=null,d=null;function p(){u&&d&&!vue.unref(c)&&d.observe(u,{attributes:n,attributeFilter:r,childList:o,subtree:i,characterData:s,attributeOldValue:a,characterDataOldValue:l})}function m(){d&&d.disconnect()}return vue.onUnmounted(()=>{m(),d=null,u=null}),{bind:function(e){return isBrowser()?(m(),u=e,d=isBrowser()&&supportsMutationObserver()?new MutationObserver((e,n)=>{vue.unref(c)||t(e,n)}):(console.warn("[Directix] useMutation: MutationObserver not supported"),null),d&&!vue.unref(c)&&p(),m):()=>{}},stop:m,start:p}}function formatNumber(e,t={}){const{precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),i+u+s}function parseNumber(e,t={}){const{decimal:n=".",prefix:r="",suffix:o=""}=t;let i=e.replace(new RegExp(`^${escapeRegex$1(r)}`),"").replace(new RegExp(`${escapeRegex$1(o)}$`),"").replace(/\s/g,"");return"."!==n?(i=i.replace(/,/g,""),i=i.replace(new RegExp(`\\${n}`,"g"),".")):i=i.replace(/,/g,""),parseFloat(i)||0}function escapeRegex$1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function useNumber(e){const{value:t,precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=e,a=vue.ref(vue.unref(t));const l=vue.computed(()=>formatNumber(a.value,{precision:vue.unref(n),separator:vue.unref(r),decimal:vue.unref(o),prefix:vue.unref(i),suffix:vue.unref(s)}));return vue.watch(()=>vue.unref(t),e=>{a.value=e}),{value:a,formatted:l,parse:function(e){return parseNumber(e,{decimal:vue.unref(o),prefix:vue.unref(i),suffix:vue.unref(s)})}}}function createNumberFormatter(e={}){return t=>formatNumber(t,e)}function getDirection(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function isDirectionAllowed(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}function getPosition(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}function usePan(e={}){const{onStart:t,onPan:n,onEnd:r,threshold:o=10,direction:i="all",preventDefault:s=!0,pointers:a=["touch","mouse"]}=e,l=vue.ref(!1),c=vue.ref(null),u=vue.ref(0);let d=null,p=0,m=0,f=0,v=0,h=0,g={};function y(e,t=!1,n=!1){const r=f-p,o=v-m,i=Math.sqrt(r*r+o*o),s=Date.now()-h;return{direction:getDirection(r,o),deltaX:r,deltaY:o,distance:i,x:f,y:v,startX:p,startY:m,isPanning:l.value,isFirst:t,isFinal:n,velocity:i/(s||1)}}function b(e){const t=getPosition(e);p=t.x,m=t.y,f=t.x,v=t.y,l.value=!1,h=Date.now(),s&&e.preventDefault()}function _(e){const r=e,a=getPosition(r);f=a.x,v=a.y;const d=f-p,h=v-m,g=Math.sqrt(d*d+h*h);if(!l.value&&g<o)return;const b=getDirection(d,h);if(!isDirectionAllowed(b,i))return;s&&e.preventDefault();const _=l.value;l.value=!0,c.value=b,u.value=g;const w=y(0,!_);_||null==t||t(w),null==n||n(w)}function w(e){if(!l.value)return;const t=y(0,!1,!0);null==r||r(t),l.value=!1,c.value=null,u.value=0}function x(){d&&(Object.entries(g).forEach(([e,t])=>{!e.startsWith("mouse")||"mousemove"!==e&&"mouseup"!==e?null==d||d.removeEventListener(e,t):document.removeEventListener(e,t)}),d.classList.remove("v-pan")),d=null,g={}}return vue.onUnmounted(()=>{x()}),{isPanning:l,direction:c,distance:u,bind:function(e){return isBrowser()?(x(),d=e,a.includes("touch")&&(g.touchstart=b,g.touchmove=_,g.touchend=w,g.touchcancel=w,e.addEventListener("touchstart",g.touchstart,{passive:!1}),e.addEventListener("touchmove",g.touchmove,{passive:!1}),e.addEventListener("touchend",g.touchend),e.addEventListener("touchcancel",g.touchcancel)),a.includes("mouse")&&(g.mousedown=b,g.mousemove=_,g.mouseup=w,e.addEventListener("mousedown",g.mousedown),document.addEventListener("mousemove",g.mousemove),document.addEventListener("mouseup",g.mouseup)),e.classList.add("v-pan"),x):()=>{}}}}function isMobile(e){return!!e&&window.innerWidth<e}function getScrollParent(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}function useParallax(e={}){const t=vue.ref(0),n=vue.ref(!1);let r=null,o=null,i=null,s=!1;function a(){vue.unref(e.enabled)&&!isMobile(e.mobileBreakpoint)&&(s||(s=!0,requestAnimationFrame(()=>{if(!r)return;const o=r.getBoundingClientRect(),i=window.innerHeight;if(n.value=o.top<i&&o.bottom>0,n.value){const n=window.scrollY;let i=(n-(o.top+n))*(vue.unref(e.speed)||.5);e.reverse&&(i=-i),t.value=i,e.transform?r.style.transform=e.transform(i,r):e.horizontal?r.style.transform=`translateX(${i}px)`:r.style.transform=`translateY(${i}px)`}s=!1})))}function l(){i&&o&&(i.removeEventListener("scroll",o),window.removeEventListener("resize",o)),r&&(r.style.willChange="",r.style.transform="",r.classList.remove("v-parallax")),r=null,o=null,i=null}return vue.onUnmounted(()=>{l()}),{offset:t,isActive:n,bind:function(e){return isBrowser()?(l(),r=e,e.style.willChange="transform",o=a,i=getScrollParent(e),i.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),a(),e.classList.add("v-parallax"),l):()=>{}}}}const WILDCARD="*";function hasPermission(e,t){return t.includes(WILDCARD)||t.includes(e)}function usePermission(e){const{value:t,mode:n="some",check:r,getPermissions:o,getRoles:i,roleMap:s={}}=e,a=vue.ref(!1);function l(){a.value=function(){if(r)return r(vue.unref(t),vue.unref(n));if(!o)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=o(),a=(null==i?void 0:i())||[],l=Array.isArray(vue.unref(t))?vue.unref(t):[vue.unref(t)];function c(t){if(t in s)return a.includes(t);if(hasPermission(t,e))return!0;for(const e of a)if(hasPermission(t,s[e]||[]))return!0;return!1}return"every"===vue.unref(n)?l.every(c):l.some(c)}()}return vue.watch(()=>vue.unref(t),()=>l(),{immediate:!0}),"object"==typeof n&&"value"in n&&vue.watch(n,()=>l()),{granted:vue.readonly(a),recheck:l}}function createPermissionChecker(e){const{getPermissions:t,getRoles:n,roleMap:r={}}=e;return(e,o="some")=>{const i=t(),s=(null==n?void 0:n())||[],a=Array.isArray(e)?e:[e];function l(e){if(e in r)return s.includes(e);if(hasPermission(e,i))return!0;for(const t of s){if(hasPermission(e,r[t]||[]))return!0}return!1}return"every"===o?a.every(l):a.some(l)}}function getDistance(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function getCenter$1(e){return 0===e.length?{x:0,y:0}:e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function usePinch(e={}){const{onStart:t,onPinch:n,onEnd:r,minScale:o,maxScale:i,enableTransform:s=!1}=e,a=vue.ref(!1),l=vue.ref(1);let c=null,u=0,d=0,p=1,m="",f={};function v(e,t=!1,n=!1){const r=getCenter$1(e.touches);return{scale:u>0?d/u:1,distance:d,initialDistance:u,centerX:r.x,centerY:r.y,isPinching:a.value,isFirst:t,isFinal:n}}function h(e){const t=e;if(2===t.touches.length){if(u=getDistance(t.touches),d=u,a.value=!1,s&&c){const e=getComputedStyle(c).transform,t=new DOMMatrix(e);p=t.a,m=c.style.transition,c.style.transition="none"}e.preventDefault()}}function g(e){const r=e;if(2!==r.touches.length)return;if(d=getDistance(r.touches),u<=0)return;const m=d/u;if(void 0!==o&&m<o)return;if(void 0!==i&&m>i)return;e.preventDefault();const f=a.value;a.value=!0,l.value=m;const h=v(r,!f);f||null==t||t(h),s&&c&&(c.style.transform=`scale(${p*m})`),null==n||n(h)}function y(e){if(!a.value)return;s&&c&&(c.style.transition=m);const t=v({touches:{length:0,item:()=>null}},!1,!0);null==r||r(t),a.value=!1,u=0,d=0}function b(){c&&(Object.entries(f).forEach(([e,t])=>{null==c||c.removeEventListener(e,t)}),c.classList.remove("v-pinch")),c=null,f={}}return vue.onUnmounted(()=>{b()}),{isPinching:a,scale:l,bind:function(e){return isBrowser()?(b(),c=e,f={touchstart:h,touchmove:g,touchend:y,touchcancel:y},e.addEventListener("touchstart",f.touchstart,{passive:!1}),e.addEventListener("touchmove",f.touchmove,{passive:!1}),e.addEventListener("touchend",f.touchend),e.addEventListener("touchcancel",f.touchcancel),e.classList.add("v-pinch"),b):()=>{}}}}function waitForImages(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 buildPrintContent(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 r=t.title||("undefined"!=typeof document?document.title:"Print"),o=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${r}</title>\n\t${n}\n</head>\n<body>\n\t${o}\n</body>\n</html>`}function printInIframe(e,t){return __async(this,null,function*(){var n,r,o;const i=document.createElement("iframe");i.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(i);const s=i.contentDocument||(null==(n=i.contentWindow)?void 0:n.document);if(!s)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(i);const a=buildPrintContent(e,t);s.open(),s.write(a),s.close(),yield waitForImages(s);try{null==(r=i.contentWindow)||r.focus(),null==(o=i.contentWindow)||o.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(i)},1e3)})}function printInNewWindow(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 r=buildPrintContent(e,t);n.document.open(),n.document.write(r),n.document.close(),yield waitForImages(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}function usePrint(e={}){const{title:t,styles:n,cssUrls:r=[],onBeforePrint:o,onAfterPrint:i,newWindow:s=!1,printClass:a}=e,l=vue.ref(!1);function c(e){return __async(this,null,function*(){if(o){if(!1===o())return}l.value=!0;try{let o=null;if(o="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!o)return void console.warn("[Directix] usePrint: Target element not found");const l={title:vue.unref(t)||"",styles:Array.isArray(vue.unref(n))?vue.unref(n).join("\n"):vue.unref(n)||"",cssUrls:vue.unref(r)||[],printClass:vue.unref(a)};vue.unref(s)?yield printInNewWindow(o,l):yield printInIframe(o,l),i&&i()}finally{l.value=!1}})}return vue.onUnmounted(()=>{}),{isPrinting:l,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function quickPrint(e){return __async(this,arguments,function*(e,t={}){const{print:n}=usePrint(t);yield n(e)})}function ensureStyles$2(){if(!isBrowser())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}function useProgress(e={}){var t,n,r;const o=vue.ref(null!=(t=vue.unref(e.value))?t:0),i=null!=(n=e.max)?n:100,s=null!=(r=e.min)?r:0,a=vue.computed(()=>(Math.max(s,Math.min(i,o.value))-s)/(i-s)*100);let l=null,c=null,u=null,d=null;function p(){var t,n;u&&(vue.unref(e.indeterminate)||(u.style.width=`${a.value}%`,d&&(d.textContent=`${Math.round(a.value)}%`),null==(t=e.onChange)||t.call(e,o.value,a.value),a.value>=100&&(null==(n=e.onComplete)||n.call(e))))}function m(e){o.value=Math.max(s,Math.min(i,e)),p()}function f(){c&&c.parentNode&&c.parentNode.removeChild(c),l&&l.classList.remove("v-progress-container"),c=null,u=null,d=null,l=null}return vue.onUnmounted(()=>{f()}),{value:o,percent:a,setValue:m,increment:function(e=1){m(o.value+e)},decrement:function(e=1){m(o.value-e)},reset:function(){m(s)},bind:function(t){return isBrowser()?(f(),l=t,"static"===getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!l)return;ensureStyles$2();const t=e.height||4,n=e.color||"#42b883",r=e.backgroundColor||"rgba(0, 0, 0, 0.1)",o=e.duration||300;c=document.createElement("div"),c.className="v-progress",c.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: ${t}px;\n background: ${r};\n overflow: hidden;\n z-index: 1000;\n `,u=document.createElement("div"),u.className="v-progress__bar";let i=`\n height: 100%;\n background: ${n};\n transition: width ${o}ms ease;\n width: ${a.value}%;\n `;e.striped&&(i+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),u.style.cssText=i,vue.unref(e.indeterminate)?(u.classList.add("v-progress--indeterminate"),u.style.width="30%",u.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(u.style.animation="v-progress-stripes 1s linear infinite"),c.appendChild(u),e.showText&&(d=document.createElement("span"),d.className="v-progress__text",d.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max(t-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,d.textContent=`${Math.round(a.value)}%`,c.appendChild(d)),l.appendChild(c)}(),t.classList.add("v-progress-container"),"boolean"!=typeof e.indeterminate&&e.indeterminate&&vue.watch(e.indeterminate,t=>{u&&(t?(u.classList.add("v-progress--indeterminate"),u.style.width="30%",u.style.animation="v-progress-indeterminate 1.5s infinite linear"):(u.classList.remove("v-progress--indeterminate"),u.style.animation=e.animated?"v-progress-stripes 1s linear infinite":"",p()))}),f):()=>{}}}}function sleep(e){return new Promise(t=>setTimeout(t,e))}function usePullRefresh(e){const{handler:t,distance:n=60,maxDistance:r=100,disabled:o=!1,successDuration:i=500,errorDuration:s=1e3}=e,a=vue.ref("idle"),l=vue.ref(0),c=vue.ref(!1),u=vue.ref(null);let d=0,p=0;const m=()=>vue.unref(n),f=()=>vue.unref(o);function v(){a.value="idle",l.value=0,c.value=!1}function h(){return __async(this,null,function*(){a.value="loading";try{yield t(),a.value="success",yield sleep(vue.unref(i))}catch(e){a.value="error",yield sleep(vue.unref(s))}finally{v()}})}return vue.onUnmounted(()=>{v()}),{state:a,distance:l,isPulling:c,events:{touchstart:function(e){if(f()||"loading"===a.value)return;const t=u.value;t&&t.scrollTop>0||(c.value=!0,d=e.touches[0].clientY,p=d,a.value="idle")},touchmove:function(e){if(!c.value||f()||"loading"===a.value)return;p=e.touches[0].clientY;const t=p-d;if(t<=0)return l.value=0,void(a.value="idle");e.preventDefault();const n=Math.min(.5*t,vue.unref(r));l.value=n;const o=n/m();a.value=o>=1?"ready":"pulling"},touchend:function(){c.value&&!f()&&(c.value=!1,"ready"===a.value&&l.value>=m()?h():(l.value=0,v()))}},containerRef:u,refresh:h}}function useResize(e={}){const{debounce:t=0,box:n="content-box",onResize:r}=e,o=vue.ref(0),i=vue.ref(0);let s=null,a=null,l=null;function c(e){const n=vue.unref(t);function s(){o.value=e.contentRect.width,i.value=e.contentRect.height,null==r||r({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}n&&n>0?(a&&clearTimeout(a),a=setTimeout(s,n)):s()}function u(){s&&(s.disconnect(),s=null),l&&(l.remove(),l=null),a&&(clearTimeout(a),a=null)}return vue.onUnmounted(()=>{u()}),{width:vue.readonly(o),height:vue.readonly(i),bind:function(e){if(!isBrowser())return()=>{};u();const t=e.getBoundingClientRect();if(o.value=t.width,i.value=t.height,supportsResizeObserver())isBrowser()&&supportsResizeObserver()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:n});else{l=document.createElement("iframe"),l.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(l);const t=l.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return u},stop:u}}function createRippleElement(e,t,n,r,o,i,s){const a=n.getBoundingClientRect(),l=2*Math.max(a.width,a.height),c=document.createElement("span");return c.className="v-ripple__wave",c.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${r};\n width: ${l}px;\n height: ${l}px;\n left: ${e-l/2}px;\n top: ${t-l/2}px;\n transform: scale(${i});\n opacity: 0.3;\n z-index: 0;\n `,"function"==typeof c.animate?c.animate([{transform:`scale(${i})`,opacity:.3},{transform:`scale(${s})`,opacity:0}],{duration:o,easing:"ease-out",fill:"forwards"}).onfinish=()=>{c.remove()}:(c.style.transition=`transform ${o}ms ease-out, opacity ${o}ms ease-out`,c.style.transform=`scale(${s})`,c.style.opacity="0",setTimeout(()=>c.remove(),o)),c}function useRipple(e={}){const{color:t="currentColor",duration:n=600,disabled:r=!1,initialScale:o=0,finalScale:i=2}=e;let s=null,a=null;function l(e){if(vue.unref(r))return;const a=vue.unref(t),l=vue.unref(n),c=createRippleElement(e.clientX-s.getBoundingClientRect().left,e.clientY-s.getBoundingClientRect().top,s,a,l,o,i);s.appendChild(c)}function c(){s&&a&&(s.removeEventListener("click",a),s.classList.remove("v-ripple")),s=null,a=null}return vue.onUnmounted(()=>{c()}),{bind:function(e){if(!isBrowser())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=l,e.addEventListener("click",a),c},trigger:function(e){var a,l;if(!s||vue.unref(r))return;const c=s.getBoundingClientRect(),u=createRippleElement(null!=(a=null==e?void 0:e.x)?a:c.width/2,null!=(l=null==e?void 0:e.y)?l:c.height/2,s,vue.unref(t),vue.unref(n),o,i);s.appendChild(u)}}}function getAngle(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}function getCenter(e){return 0===e.length?{x:0,y:0}:e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function useRotateGesture(e={}){const{onStart:t,onRotate:n,onEnd:r,enableTransform:o=!1}=e,i=vue.ref(!1),s=vue.ref(0);let a=null,l=0,c=0,u=0,d="",p={};function m(e,t=!1,n=!1){const r=getCenter(e.touches),o=c*(Math.PI/180);return{angle:c,radians:o,rotation:c-l,centerX:r.x,centerY:r.y,isRotating:i.value,isFirst:t,isFinal:n}}function f(e){const t=e;if(2===t.touches.length){if(l=getAngle(t.touches),c=l,i.value=!1,o&&a){const e=getComputedStyle(a).transform,t=new DOMMatrix(e);u=Math.atan2(t.b,t.a)*(180/Math.PI),d=a.style.transition,a.style.transition="none"}e.preventDefault()}}function v(e){const r=e;if(2!==r.touches.length)return;c=getAngle(r.touches),e.preventDefault();const d=i.value;i.value=!0,s.value=c;const p=m(r,!d);if(d||null==t||t(p),o&&a){const e=c-l;a.style.transform=`rotate(${u+e}deg)`}null==n||n(p)}function h(e){if(!i.value)return;o&&a&&(a.style.transition=d);const t=m({touches:{length:0,item:()=>null}},!1,!0);null==r||r(t),i.value=!1,l=0,c=0}function g(){a&&(Object.entries(p).forEach(([e,t])=>{null==a||a.removeEventListener(e,t)}),a.classList.remove("v-rotate-gesture")),a=null,p={}}return vue.onUnmounted(()=>{g()}),{isRotating:i,angle:s,bind:function(e){return isBrowser()?(g(),a=e,p={touchstart:f,touchmove:v,touchend:h,touchcancel:h},e.addEventListener("touchstart",p.touchstart,{passive:!1}),e.addEventListener("touchmove",p.touchmove,{passive:!1}),e.addEventListener("touchend",p.touchend),e.addEventListener("touchcancel",p.touchcancel),e.classList.add("v-rotate-gesture"),g):()=>{}}}}const DEFAULT_ALLOWED_TAGS$1=["b","i","u","strong","em","br","p","span","div"],DEFAULT_ALLOWED_ATTRIBUTES$1=["title","alt","href","src"],DANGEROUS_TAGS$1=["script","iframe","object","embed","form","input","style","link","meta","base"],DANGEROUS_ATTRIBUTES$1=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function useSanitize(e={}){const{allowedTags:t=DEFAULT_ALLOWED_TAGS$1,allowedAttributes:n=DEFAULT_ALLOWED_ATTRIBUTES$1,allowDataUrls:r=!1,allowStyles:o=!1,allowClass:i=!1,allowId:s=!1,handler:a}=e;function l(e){var l;if(a)return a(e);if(!isBrowser())return e;const c=document.createElement("div");c.innerHTML=e;for(const e of DANGEROUS_TAGS$1){const t=c.getElementsByTagName(e);for(;t.length>0;)null==(l=t[0].parentNode)||l.removeChild(t[0])}const u=e=>{var a;const l=e.tagName.toLowerCase();if(!t.includes(l)){const t=document.createTextNode(e.textContent||"");return void(null==(a=e.parentNode)||a.replaceChild(t,e))}for(const t of DANGEROUS_ATTRIBUTES$1)e.removeAttribute(t);const c=e.getAttribute("href");if(c&&c.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!r){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 r=n.includes(t.name.toLowerCase()),a="class"===t.name&&i,l="id"===t.name&&s,c="style"===t.name&&o;r||a||l||c||e.removeAttribute(t.name)}for(const t of Array.from(e.children))u(t)};for(const e of Array.from(c.children))u(e);return c.innerHTML}return vue.onUnmounted(()=>{}),{sanitize:l,bind:function(e){if(!isBrowser())return()=>{};const t=e.innerHTML;return t&&(e.innerHTML=l(t)),()=>{}}}}function getScrollInfoFromContainer(e,t,n){let r=0,o=0,i=0,s=0;if(e===window)r=window.scrollX||document.documentElement.scrollLeft,o=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,s=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;r=t.scrollLeft,o=t.scrollTop,i=t.scrollWidth-t.clientWidth,s=t.scrollHeight-t.clientHeight}return{scrollLeft:r,scrollTop:o,scrollLeftMax:i,scrollTopMax:s,progressX:i>0?r/i:0,progressY:s>0?o/s:0,directionX:r!==t?r>t?1:-1:0,directionY:o!==n?o>n?1:-1:0}}function useScroll(e={}){const{throttle:t=0,passive:n=!0}=e,r=vue.ref(0),o=vue.ref(0),i=vue.ref(0),s=vue.ref(0),a=vue.ref(0),l=vue.ref(0),c=vue.ref(!1);let u=null,d=0,p=0,m=null,f=null,v=null;const h=vue.computed(()=>({scrollLeft:r.value,scrollTop:o.value,scrollLeftMax:0,scrollTopMax:0,progressX:i.value,progressY:s.value,directionX:a.value,directionY:l.value}));function g(e){if(!u)return;const n=vue.unref(t);function m(){const e=getScrollInfoFromContainer(u,d,p);r.value=e.scrollLeft,o.value=e.scrollTop,i.value=e.progressX,s.value=e.progressY,a.value=e.directionX,l.value=e.directionY,d=e.scrollLeft,p=e.scrollTop,c.value=!0,v&&clearTimeout(v),v=setTimeout(()=>{c.value=!1},150)}n&&n>0?f||(f=setTimeout(()=>{m(),f=null},n)):m()}function y(){u&&m&&u.removeEventListener("scroll",m),f&&(clearTimeout(f),f=null),v&&(clearTimeout(v),v=null),u=null,m=null}return vue.onUnmounted(()=>{y()}),{scrollLeft:vue.readonly(r),scrollTop:vue.readonly(o),progressX:vue.readonly(i),progressY:vue.readonly(s),directionX:vue.readonly(a),directionY:vue.readonly(l),isScrolling:vue.readonly(c),info:vue.readonly(h),bind:function(e){if(!isBrowser())return()=>{};y(),u=e||window;const t=getScrollInfoFromContainer(u,0,0);return r.value=t.scrollLeft,o.value=t.scrollTop,i.value=t.progressX,s.value=t.progressY,d=t.scrollLeft,p=t.scrollTop,m=g,u.addEventListener("scroll",m,{passive:n}),y},stop:y,scrollTo:function(e){if(!u)return;const{top:t,left:n,behavior:r="smooth"}=e;if(u===window)window.scrollTo({top:t,left:n,behavior:r});else{const e=u;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}}function ensureStyles$1(){if(!isBrowser())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}function createSkeletonElement(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width||"100%",r="number"==typeof e.height?`${e.height}px`:e.height||"1em",o="number"==typeof e.radius?`${e.radius}px`:e.radius||"4px";let i="";return i="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color||"#e8e8e8"} 25%, ${e.animationColor||"#f0f0f0"} 50%, ${e.color||"#e8e8e8"} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color||"#e8e8e8"};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color||"#e8e8e8"};`,t.style.cssText=`\n width: ${n};\n height: ${r};\n border-radius: ${o};\n ${i}\n `,t}function useSkeleton(e={}){var t;const n=vue.ref(null==(t=vue.unref(e.loading))||t);let r=null,o=null,i="";function s(){var t,s,a;r&&(n.value?(i=r.style.display||getComputedStyle(r).display,r.style.display="none",o||(o=createSkeletonElement(__spreadProps(__spreadValues({},e),{width:null!=(t=e.width)?t:r.offsetWidth,height:null!=(s=e.height)?s:r.offsetHeight}))),o.parentNode||null==(a=r.parentNode)||a.insertBefore(o,r.nextSibling)):(r.style.display=i,o&&o.parentNode&&o.parentNode.removeChild(o)))}function a(){o&&o.parentNode&&o.parentNode.removeChild(o),r&&(r.style.display=i,r.classList.remove("v-skeleton-container")),o=null,r=null}return vue.onUnmounted(()=>{a()}),{isLoading:n,show:function(){n.value=!0,s()},hide:function(){n.value=!1,s()},toggle:function(){n.value=!n.value,s()},bind:function(t){return isBrowser()?(ensureStyles$1(),a(),r=t,t.classList.add("v-skeleton-container"),n.value&&s(),e.loading&&"boolean"!=typeof e.loading&&vue.watch(e.loading,()=>{var t;n.value=null!=(t=vue.unref(e.loading))&&t,s()}),a):()=>{}}}}function useSticky(e={}){const{offsetTop:t=0,onStick:n,disabled:r=!1}=e,o=vue.ref(!1);let i=null,s=null,a=null,l=null,c=null;function u(){var e;if(!i||vue.unref(r))return;const a=(s===window?document.documentElement:s).getBoundingClientRect(),u=i.getBoundingClientRect(),d=vue.unref(t),p=u.top<=d&&a.top<=d;p!==o.value&&(o.value=p,p?(l||(l=document.createElement("div"),l.style.width=`${u.width}px`,l.style.height=`${u.height}px`,null==(e=i.parentNode)||e.insertBefore(l,i)),i.style.position="fixed",i.style.top=`${d}px`,i.style.width=`${u.width}px`,i.classList.add("v-sticky--active")):(l&&(l.remove(),l=null),c&&(i.style.position=c.position,i.style.top=c.top,i.style.width=c.width),i.classList.remove("v-sticky--active")),null==n||n(p))}function d(){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")),l&&(l.remove(),l=null),s=null,a=null,i=null,o.value=!1}return vue.onUnmounted(()=>{d()}),{isSticky:vue.readonly(o),bind:function(e){return isBrowser()?(d(),i=e,c={position:e.style.position,top:e.style.top,width:e.style.width},e.classList.add("v-sticky"),s=getScrollParent$2(e),a=u,s.addEventListener("scroll",a,{passive:!0}),u(),d):()=>{}},stop:d}}const DEFAULT_DIRECTIONS=["left","right","up","down"];function getSwipeDirection(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}}function useSwipe(e={}){const{handler:t,threshold:n=30,maxTime:r=500,directions:o=DEFAULT_DIRECTIONS,preventScrollOnSwipe:i=!0,mouse:s=!0,onLeft:a,onRight:l,onUp:c,onDown:u}=e,d=vue.ref(null),p=vue.ref(0),m=vue.ref(0),f=vue.ref(!1);let v=null,h=0,g=0,y=0;function b(e,t){h=e,g=t,y=Date.now(),f.value=!0,d.value=null,p.value=0,m.value=0}function _(e,s,b){if(!f.value)return;f.value=!1;!function(e,s,f,h){var g;const y=vue.unref(n);if(f>vue.unref(r))return;if(Math.max(Math.abs(e),Math.abs(s))<y)return;const b=getSwipeDirection(e,s,o);if(!b)return;d.value=b,p.value=e,m.value=s,i&&h.cancelable&&h.preventDefault(),null==t||t(b,h);const _={left:a,right:l,up:c,down:u};null==(g=_[b])||g.call(_),null==v||v.dispatchEvent(new CustomEvent("swipe",{detail:{direction:b,deltaX:e,deltaY:s,deltaTime:f}}))}(e-h,s-g,Date.now()-y,b)}function w(e){b(e.touches[0].clientX,e.touches[0].clientY)}function x(e){f.value&&i&&e.preventDefault()}function E(e){const t=e.changedTouches[0];_(t.clientX,t.clientY,e)}function S(e){b(e.clientX,e.clientY)}function C(e){_(e.clientX,e.clientY,e)}function T(e){f.value&&_(e.clientX,e.clientY,e)}function L(){v&&(v.removeEventListener("touchstart",w),v.removeEventListener("touchmove",x),v.removeEventListener("touchend",E),v.removeEventListener("touchcancel",E),vue.unref(s)&&(v.removeEventListener("mousedown",S),v.removeEventListener("mouseup",C),v.removeEventListener("mouseleave",T)),v=null)}return vue.onUnmounted(()=>{L()}),{direction:vue.readonly(d),lengthX:vue.readonly(p),lengthY:vue.readonly(m),isSwiping:vue.readonly(f),bind:function(e){return isBrowser()?(L(),v=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",w,{passive:!0}),e.addEventListener("touchmove",x,{passive:!1}),e.addEventListener("touchend",E),e.addEventListener("touchcancel",E),vue.unref(s)&&(e.addEventListener("mousedown",S),e.addEventListener("mouseup",C),e.addEventListener("mouseleave",T)),L):()=>{}}}}function useThrottle(e){const{handler:t,wait:n=300,leading:r=!0,trailing:o=!0}=e;let i=null,s=null,a=null,l=0;const c=()=>vue.unref(r),u=()=>{s&&(t.apply(a,s),s=null,a=null)};function d(){i&&(clearTimeout(i),i=null),l=0,s=null,a=null}return vue.onUnmounted(()=>{d()}),{run:function(...e){const t=Date.now(),r=vue.unref(n);l||c()||(l=t);const d=r-(t-l);s=e,a=this,d<=0||d>r?(i&&(clearTimeout(i),i=null),l=t,u()):!i&&vue.unref(o)&&(i=setTimeout(()=>{l=c()?Date.now():0,i=null,u()},d))},cancel:d}}function throttleFn(e,t=300,n){return throttle(e,t,n)}function useTooltip(e={}){const{content:t,placement:n="top",trigger:r="hover",delay:o=0,hideDelay:i=0,arrow:s=!0,class:a,onShow:l,onHide:c,disabled:u=!1}=e,d=vue.ref(!1);let p=null,m=null,f=null,v=null;const h={};function g(){!vue.unref(u)&&t&&(v&&(clearTimeout(v),v=null),o>0?f=setTimeout(y,o):y())}function y(){var e;p&&(m||(m=function(){const e=document.createElement("div");return e.className=`v-tooltip v-tooltip--${n}${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=vue.unref(t))?e:null,function(){if(!m||!p)return;const e=p.getBoundingClientRect(),t=m.getBoundingClientRect();let r=0,o=0;switch(n){case"top":r=e.top-t.height-8,o=e.left+(e.width-t.width)/2;break;case"bottom":r=e.bottom+8,o=e.left+(e.width-t.width)/2;break;case"left":r=e.top+(e.height-t.height)/2,o=e.left-t.width-8;break;case"right":r=e.top+(e.height-t.height)/2,o=e.right+8}o<0&&(o=8),o+t.width>window.innerWidth&&(o=window.innerWidth-t.width-8),r<0&&(r=8),r+t.height>window.innerHeight&&(r=window.innerHeight-t.height-8),m.style.top=`${r+window.scrollY}px`,m.style.left=`${o+window.scrollX}px`}(),m.style.opacity="1",d.value=!0,null==l||l())}function b(){f&&(clearTimeout(f),f=null),i>0?v=setTimeout(_,i):_()}function _(){m&&(m.style.opacity="0"),d.value=!1,null==c||c()}function w(){d.value?b():g()}function x(){p&&Object.entries(h).forEach(([e,t])=>{p.removeEventListener(e,t)}),m&&(m.remove(),m=null),f&&(clearTimeout(f),f=null),v&&(clearTimeout(v),v=null),p=null,d.value=!1}return vue.onUnmounted(()=>{x()}),{isVisible:vue.readonly(d),show:g,hide:b,toggle:w,bind:function(e){return isBrowser()?(x(),p=e,"hover"===r?(h.mouseenter=g,h.mouseleave=b,e.addEventListener("mouseenter",h.mouseenter),e.addEventListener("mouseleave",h.mouseleave)):"click"===r?(h.click=w,e.addEventListener("click",h.click)):"focus"===r&&(h.focus=g,h.blur=b,e.addEventListener("focus",h.focus),e.addEventListener("blur",h.blur)),x):()=>{}}}}function useTouch(e={}){const{onSwipe:t,onSwipeLeft:n,onSwipeRight:r,onSwipeUp:o,onSwipeDown:i,onPinch:s,onRotate:a,onTap:l,onLongPress:c,swipeThreshold:u=30,longPressDuration:d=500,tapDuration:p=250,disabled:m=!1}=e,f=vue.ref(null);let v=null,h=0,g=0,y=0,b=null,_=0,w=0;function x(e){let t=0,n=0;for(let r=0;r<e.length;r++)t+=e[r].clientX,n+=e[r].clientY;return{x:t/e.length,y:n/e.length}}function E(e,t){const n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(n*n+r*r)}function S(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){vue.unref(m)||(y=Date.now(),f.value=null,1===e.touches.length?(h=e.touches[0].clientX,g=e.touches[0].clientY,c&&(b=setTimeout(()=>{f.value="longPress",c({type:"longPress",center:{x:h,y:g},event:e})},d))):2===e.touches.length&&(_=E(e.touches[0],e.touches[1]),w=S(e.touches[0],e.touches[1])))}function T(e){if(!vue.unref(m)&&(b&&(clearTimeout(b),b=null),2===e.touches.length&&(s||a))){const t=E(e.touches[0],e.touches[1]),n=S(e.touches[0],e.touches[1]);if(s&&_>0){const n=t/_;f.value="pinch",s({type:"pinch",scale:n,center:x(e.touches),event:e})}if(a){const t=n-w;f.value="rotate",a({type:"rotate",rotation:t,center:x(e.touches),event:e})}}}function L(e){if(vue.unref(m))return;b&&(clearTimeout(b),b=null);const s=Date.now()-y;if(1===e.changedTouches.length){const a=e.changedTouches[0].clientX,c=e.changedTouches[0].clientY,d=a-h,m=c-g,v=Math.sqrt(d*d+m*m);if(v>=u){let s;f.value="swipe",s=Math.abs(d)>Math.abs(m)?d>0?"right":"left":m>0?"down":"up";const l={type:"swipe",direction:s,distance:v,angle:Math.atan2(m,d)*(180/Math.PI),center:{x:a,y:c},event:e};switch(null==t||t(l),s){case"left":null==n||n(l);break;case"right":null==r||r(l);break;case"up":null==o||o(l);break;case"down":null==i||i(l)}}else v<10&&s<p&&l&&(f.value="tap",l({type:"tap",center:{x:a,y:c},event:e}))}f.value=null}function $(){v&&(v.removeEventListener("touchstart",C),v.removeEventListener("touchmove",T),v.removeEventListener("touchend",L),v.removeEventListener("touchcancel",L)),b&&(clearTimeout(b),b=null),v=null,f.value=null}return vue.onUnmounted(()=>{$()}),{gesture:vue.readonly(f),bind:function(e){return isBrowser()?($(),v=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",T,{passive:!0}),e.addEventListener("touchend",L),e.addEventListener("touchcancel",L),$):()=>{}}}}function escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function trimText(e,t="both",n){if(!e)return"";const r=n?`[\\s${escapeRegex(n)}]`:"\\s";switch(t){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"),"")}}function useTrim(e){const{text:t,position:n="both",chars:r}=e,o=vue.ref(vue.unref(t)),i=vue.ref(""),s=vue.ref(!1);return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r)],()=>function(){const e=vue.unref(t),a=vue.unref(n),l=vue.unref(r);o.value=e,i.value=trimText(e,a,l),s.value=i.value!==e}(),{immediate:!0}),{trimmed:i,original:o,wasTrimmed:s}}function createTrimmer(e="both",t){return n=>trimText(n,e,t)}function truncateEnd(e,t,n){return e.length<=t?e:e.slice(0,t-n.length)+n}function truncateStart(e,t,n){return e.length<=t?e:n+e.slice(-(t-n.length))}function truncateMiddle(e,t,n){if(e.length<=t)return e;const r=t-n.length,o=Math.ceil(r/2),i=Math.floor(r/2);return e.slice(0,o)+n+e.slice(-i)}function useTruncate(e){const{text:t,length:n=100,position:r="end",omission:o="..."}=e,i=vue.ref(""),s=vue.ref(!1),a=vue.ref(0);function l(e,t,i){const s=null!=t?t:vue.unref(n),a=null!=i?i:vue.unref(r);if(e.length<=s)return e;switch(a){case"start":return truncateStart(e,s,o);case"middle":return truncateMiddle(e,s,o);default:return truncateEnd(e,s,o)}}function c(){const e=vue.unref(t),r=vue.unref(n);a.value=e.length,s.value=e.length>r,i.value=l(e)}return vue.watch(()=>vue.unref(t),c,{immediate:!0}),vue.watch(()=>vue.unref(n),c),vue.watch(()=>vue.unref(r),c),{truncated:vue.readonly(i),isTruncated:vue.readonly(s),originalLength:vue.readonly(a),truncate:l}}function ensureStyles(){if(!isBrowser())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}function useTypewriter(e){const t=vue.ref(""),n=vue.ref(!1),r=vue.ref(!1);let o=null,i=null,s=null,a=0;function l(){o&&(o.textContent=t.value,i&&o.appendChild(i))}function c(){var o,i;const d=vue.unref(e.text);if(a>=d.length)return n.value=!1,null==(o=e.onComplete)||o.call(e),void(e.loop&&(s=setTimeout(()=>{!function(){function n(){if(0===t.value.length)return r.value=!1,void(e.loop&&(s=setTimeout(u,e.delay||0)));t.value=t.value.slice(0,-1),l(),s=setTimeout(n,e.deleteSpeed||30)}r.value=!0,n()}()},e.deleteDelay||1500)));const p=d[a];t.value+=p,a++,l(),null==(i=e.onType)||i.call(e,p,a-1),s=setTimeout(c,e.speed||50)}function u(){var o;n.value||r.value||(n.value=!0,a=0,t.value="",null==(o=e.onStart)||o.call(e),s=setTimeout(c,e.delay||0))}function d(){s&&(clearTimeout(s),s=null),n.value=!1,r.value=!1}function p(){d(),t.value="",a=0,l()}function m(){d(),o&&o.classList.remove("v-typewriter"),o=null,i=null}return vue.onUnmounted(()=>{m()}),{displayedText:t,isTyping:n,isDeleting:r,start:u,stop:d,reset:p,bind:function(t){return isBrowser()?(ensureStyles(),m(),o=t,i=function(){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}(),t.classList.add("v-typewriter"),"string"!=typeof e.text&&vue.watch(e.text,()=>{p(),u()}),u(),m):()=>{}}}}function uppercaseText(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function useUppercase(e){const{text:t,first:n=!1}=e,r=vue.ref(vue.unref(t)),o=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n)],()=>function(){const e=vue.unref(t),i=vue.unref(n);r.value=e,o.value=uppercaseText(e,i)}(),{immediate:!0}),{transformed:o,original:r}}function createUppercaser(e=!1){return t=>uppercaseText(t,e)}function useVirtualList(e){const{items:t,itemSize:n=50,height:r=400,overscan:o=3}=e,i=vue.ref(null),s=vue.ref(0),a=vue.ref(0),l=vue.ref(0),c=()=>vue.unref(t),u=()=>vue.unref(n),d=()=>vue.unref(r),p=vue.computed(()=>{const e=c(),t=u();if("function"==typeof t){let n=0;for(let r=0;r<e.length;r++)n+=t(r);return n}return t*e.length});function m(){const e=c(),t=u(),n=d(),r=vue.unref(o),i=s.value;let a=0,l=0,p=0;if("function"==typeof t){let o=0;for(let n=0;n<e.length;n++){const e=t(n);if(o+e>i){a=n,p=o;break}o+=e}for(l=a,o=p;l<e.length&&o<i+n;)o+=t(l),l++;a=Math.max(0,a-r),l=Math.min(e.length,l+r),o=0;for(let e=0;e<a;e++)o+=t(e);p=o}else a=Math.max(0,Math.floor(i/t)-r),l=Math.min(e.length,Math.ceil((i+n)/t)+r),p=a*t;return{start:a,end:l,offsetY:p}}const f=vue.computed(()=>{const e=c(),t=u(),{start:n,end:r,offsetY:o}=m();a.value=n,l.value=r;const i=[];let s=o;for(let o=n;o<r;o++){const n=e[o];if(void 0!==n){const e="function"==typeof t?t(o):t;i.push({item:n,index:o,style:{position:"absolute",top:`${s}px`,height:`${e}px`,width:"100%"}}),s+=e}}return i}),v=vue.computed(()=>({height:`${d()}px`,overflow:"auto",position:"relative"}));function h(e){const t=e.target;s.value=t.scrollTop}return vue.onMounted(()=>{i.value&&i.value.addEventListener("scroll",h,{passive:!0})}),vue.onUnmounted(()=>{i.value&&i.value.removeEventListener("scroll",h)}),{visibleItems:f,totalHeight:p,scrollTop:s,startIndex:a,endIndex:l,scrollToIndex:function(e){if(!i.value)return;const t=u(),n=c();if("function"==typeof t){let r=0;for(let o=0;o<Math.min(e,n.length);o++)r+=t(o);i.value.scrollTop=r}else i.value.scrollTop=e*t},scrollTo:function(e){i.value&&(i.value.scrollTop=e)},containerRef:i,listStyle:v}}function useVisible(e={}){const{initial:t=!0,useHidden:n=!1,onChange:r}=e,o=vue.ref(vue.unref(t));let i=null,s="",a="";function l(e){i&&(e?(i.classList.remove("v-hidden"),i.classList.add("v-visible"),n?i.style.visibility=a||"visible":i.style.display=s):(i.classList.remove("v-visible"),i.classList.add("v-hidden"),n?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 vue.watch(o,(e,t)=>{e!==t&&(l(e),null==r||r(e))}),"object"==typeof t&&"value"in t&&vue.watch(t,e=>{o.value=e}),vue.onUnmounted(()=>{c()}),{visible:o,show:function(){o.value=!0},hide:function(){o.value=!1},toggle:function(){o.value=!o.value},bind:function(e){return isBrowser()?(c(),i=e,s=e.style.display,a=e.style.visibility,l(o.value),c):()=>{}}}}function createWatermarkCanvas(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:r,width:o,height:i,fontSize:s,fontFamily:a,fontWeight:l,color:c,rotate:u}=e;t.width=o,t.height=i,n.font=`${l} ${s}px ${a}`,n.fillStyle=c,n.textAlign="center",n.textBaseline="middle",n.translate(o/2,i/2),n.rotate(u*Math.PI/180);const d=Array.isArray(r)?r:[r],p=1.5*s,m=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,m+t*p)}),t}function useWatermark(e){const{content:t,width:n=300,height:r=200,rotate:o=-22,fontSize:i=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:l="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:u=9999,disabled:d=!1}=e,p=vue.ref(null),m=vue.ref(""),f=vue.ref(vue.unref(d));function v(){const e=vue.unref(t),c=vue.unref(n),u=vue.unref(r),d=vue.unref(o),f=vue.unref(i),v=vue.unref(s),h=vue.unref(a),g=vue.unref(l);p.value=createWatermarkCanvas({content:e,width:c,height:u,fontSize:f,fontFamily:v,fontWeight:h,color:g,rotate:d}),m.value=p.value.toDataURL()}const h=vue.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:vue.unref(u),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function g(){const e=vue.unref(c),t=vue.unref(u),o=Array.isArray(e)?e:[e,e],i=vue.unref(n),s=vue.unref(r);h.value=__spreadProps(__spreadValues({},h.value),{zIndex:t,backgroundImage:`url("${m.value}")`,backgroundPosition:`${o[0]/2}px ${o[1]/2}px`,backgroundSize:`${i+o[0]}px ${s+o[1]}px`})}return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r),vue.unref(o),vue.unref(i),vue.unref(s),vue.unref(a),vue.unref(l),vue.unref(c),vue.unref(u)],()=>{v(),g()},{immediate:!0}),vue.watch(f,e=>{h.value.display=e?"none":"block"}),vue.unref(d)&&(h.value.display="none"),vue.onUnmounted(()=>{}),{canvas:p,dataUrl:m,style:h,disabled:f,update:function(t){Object.assign(e,t),v(),g()},enable:function(){f.value=!1},disable:function(){f.value=!0}}}function createWatermarkUrl(e,t={}){var n,r,o,i,s;return createWatermarkCanvas({content:e,width:null!=(n=t.width)?n:300,height:null!=(r=t.height)?r:200,fontSize:null!=(o=t.fontSize)?o:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(i=t.color)?i:"rgba(128, 128, 128, 0.15)",rotate:null!=(s=t.rotate)?s:-22}).toDataURL()}const DEFAULT_REGISTRY_URL="https://directix.dev/plugins.json";class PluginRegistry{constructor(e){__publicField(this,"registryUrl"),__publicField(this,"cache",null),__publicField(this,"cacheTime",0),__publicField(this,"cacheTTL",18e5),this.registryUrl=e||DEFAULT_REGISTRY_URL}fetchData(){return __async(this,null,function*(){if(this.cache&&Date.now()-this.cacheTime<this.cacheTTL)return this.cache;try{const e=yield fetch(this.registryUrl);if(!e.ok)throw new Error(`Failed to fetch registry: ${e.status}`);const t=yield e.json();return this.cache=t,this.cacheTime=Date.now(),t}catch(e){return console.warn("[Directix] Failed to fetch plugin registry, using empty cache"),{version:1,updated:(new Date).toISOString().split("T")[0],plugins:[]}}})}setData(e){this.cache=e,this.cacheTime=Date.now()}getAll(){return __async(this,null,function*(){return(yield this.fetchData()).plugins})}getByName(e){return __async(this,null,function*(){return(yield this.getAll()).find(t=>t.name===e||t.package===e)})}search(e){return __async(this,null,function*(){const t=yield this.getAll(),n=e.toLowerCase();return t.filter(e=>e.name.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)||e.keywords.some(e=>e.toLowerCase().includes(n))||e.author.toLowerCase().includes(n))})}getByCategory(e){return __async(this,null,function*(){return(yield this.getAll()).filter(t=>t.category===e)})}getMeta(){return __async(this,null,function*(){const e=yield this.fetchData();return{version:e.version,updated:e.updated,count:e.plugins.length}})}install(e,t){return __async(this,null,function*(){const n=yield this.getByName(e);if(!n)throw new Error(`[Directix] Plugin "${e}" not found in registry`);try{const e=yield import(n.package),r=e.default||e;if("function"!=typeof r.install)throw new TypeError(`[Directix] Invalid plugin format: ${n.package}`);yield t.register(r)}catch(t){throw new Error(`[Directix] Failed to install plugin "${e}". Please install the package "${n.package}" first: npm install ${n.package}`)}})}}let globalRegistry=null;function getPluginRegistry(e){return globalRegistry||(globalRegistry=new PluginRegistry(e)),globalRegistry}function resetPluginRegistry(){globalRegistry=null}class PluginManager{constructor(e={}){__publicField(this,"plugins",new Map),__publicField(this,"hooks",new Map),__publicField(this,"directives",new Map),__publicField(this,"composables",new Map),__publicField(this,"extensions",new Map),__publicField(this,"app",null),__publicField(this,"config"),this.config=__spreadValues({debug:!1,autoLoadOfficial:!1},e)}getRegistry(){return getPluginRegistry(this.config.registryUrl)}setApp(e){this.app=e}register(e){return __async(this,null,function*(){var t;if(this.plugins.has(e.meta.name))return void console.warn(`[Directix] Plugin "${e.meta.name}" is already registered`);if(null==(t=e.dependencies)?void 0:t.length)for(const t of e.dependencies)if(!this.plugins.has(t))throw new Error(`[Directix] Plugin "${e.meta.name}" requires "${t}" to be installed first`);const n=this.createContext(e);yield this.fireHooks("beforeInstall",e,n),yield e.install(n),this.plugins.set(e.meta.name,e),yield this.fireHooks("afterInstall",e,n),this.config.debug&&console.info(`[Directix] Plugin "${e.meta.name}" v${e.meta.version} installed`)})}unregister(e){return __async(this,null,function*(){const t=this.plugins.get(e);if(!t)return void console.warn(`[Directix] Plugin "${e}" is not registered`);const n=this.createContext(t);yield this.fireHooks("beforeUninstall",t,n),t.uninstall&&(yield t.uninstall(n)),this.plugins.delete(e),yield this.fireHooks("afterUninstall",t,n),this.config.debug&&console.info(`[Directix] Plugin "${e}" uninstalled`)})}has(e){return this.plugins.has(e)}get(e){return this.plugins.get(e)}getAll(){return Array.from(this.plugins.values())}onHook(e,t){this.hooks.has(e)||this.hooks.set(e,[]),this.hooks.get(e).push(t)}offHook(e,t){const n=this.hooks.get(e);if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}extendDirective(e){const{target:t}=e;this.extensions.has(t)||this.extensions.set(t,[]),this.extensions.get(t).push(e)}getExtensions(e){return this.extensions.get(e)||[]}getDirective(e){return this.directives.get(e)}getComposable(e){return this.composables.get(e)}createContext(e){return{app:this.app,registerDirective:(e,t)=>{this.directives.set(e,t),this.app&&this.app.directive(e,t)},registerComposable:(e,t)=>{this.composables.set(e,t)},getDirective:e=>this.directives.get(e),warn:t=>console.warn(`[Directix:${e.meta.name}] ${t}`),error:t=>console.error(`[Directix:${e.meta.name}] ${t}`),meta:e.meta}}fireHooks(e,t,n){return __async(this,null,function*(){const r=this.hooks.get(e)||[];for(const e of r)yield e(t,n)})}}let globalManager=null;function getPluginManager(e){return globalManager||(globalManager=new PluginManager(e)),globalManager}function resetPluginManager(){globalManager=null}function definePlugin(e){return e}function createDirectiveTemplate(e){const{name:t,ssr:n=!0,defaults:r,onMount:o,onUpdate:i,onUnmount:s,validate:a,normalize:l}=e;return defineDirective({name:t,ssr:n,defaults:r,mounted(e,n){const r=l?l(n):n.value;if(a){const e=a(r);if(e)return void console.warn(`[Directix] v-${t}: ${e}`)}o(e,r,n),e.__directix_state={},e.__directix_options=r},updated(e,n){const r=l?l(n):n.value;if(a){const e=a(r);if(e)return void console.warn(`[Directix] v-${t}: ${e}`)}e.__directix_options=r,null==i||i(e,r,n)},unmounted(e){const t=e.__directix_state;t&&(s(e,t),delete e.__directix_state,delete e.__directix_options)}})}function createEventDirective(e){const{name:t,eventName:n,handler:r,listenerOptions:o,ssr:i=!0}=e;return defineDirective({name:t,ssr:i,mounted(e,t){const i=n=>r(e,t,n);e.addEventListener(n,i,o),e.__directix_event_handler=i},unmounted(e){const t=e.__directix_event_handler;t&&(e.removeEventListener(n,t,o),delete e.__directix_event_handler)}})}function createStyleDirective(e){const{name:t,cssProperty:n,defaultUnit:r="",validate:o,ssr:i=!0}=e;return defineDirective({name:t,ssr:i,mounted(e,i){const s=i.value;if(o&&!o(s))return void console.warn(`[Directix] v-${t}: Invalid value "${s}"`);const a="number"==typeof s&&r?r:"";e.style.setProperty(n,`${s}${a}`)},updated(e,i){const s=i.value;if(o&&!o(s))return void console.warn(`[Directix] v-${t}: Invalid value "${s}"`);const a="number"==typeof s&&r?r:"";e.style.setProperty(n,`${s}${a}`)},unmounted(e){e.style.removeProperty(n)}})}function applyAriaAttributes(e,t){if(clearAriaAttributes(e),t.role&&e.setAttribute("role",t.role),void 0!==t.ariaExpanded&&e.setAttribute("aria-expanded",String(t.ariaExpanded)),void 0!==t.ariaSelected&&e.setAttribute("aria-selected",String(t.ariaSelected)),void 0!==t.ariaChecked&&e.setAttribute("aria-checked",String(t.ariaChecked)),void 0!==t.ariaDisabled&&(e.setAttribute("aria-disabled",String(t.ariaDisabled)),t.ariaDisabled&&e.setAttribute("tabindex","-1")),void 0!==t.ariaHidden&&e.setAttribute("aria-hidden",String(t.ariaHidden)),void 0!==t.ariaBusy&&e.setAttribute("aria-busy",String(t.ariaBusy)),void 0!==t.ariaPressed&&e.setAttribute("aria-pressed",String(t.ariaPressed)),void 0!==t.ariaCurrent&&e.setAttribute("aria-current","boolean"==typeof t.ariaCurrent?String(t.ariaCurrent):t.ariaCurrent),t.ariaLabel&&e.setAttribute("aria-label",t.ariaLabel),t.ariaLabelledBy&&e.setAttribute("aria-labelledby",t.ariaLabelledBy),t.ariaDescribedBy&&e.setAttribute("aria-describedby",t.ariaDescribedBy),t.ariaControls&&e.setAttribute("aria-controls",t.ariaControls),t.ariaOwns&&e.setAttribute("aria-owns",t.ariaOwns),void 0!==t.ariaHasPopup){const n="boolean"==typeof t.ariaHasPopup?"true":t.ariaHasPopup;e.setAttribute("aria-haspopup",n)}t.ariaAutoComplete&&e.setAttribute("aria-autocomplete",t.ariaAutoComplete),t.ariaLive&&e.setAttribute("aria-live",t.ariaLive),void 0!==t.ariaAtomic&&e.setAttribute("aria-atomic",String(t.ariaAtomic)),t.ariaRelevant&&e.setAttribute("aria-relevant",t.ariaRelevant),void 0!==t.ariaValueNow&&e.setAttribute("aria-valuenow",String(t.ariaValueNow)),void 0!==t.ariaValueMin&&e.setAttribute("aria-valuemin",String(t.ariaValueMin)),void 0!==t.ariaValueMax&&e.setAttribute("aria-valuemax",String(t.ariaValueMax)),t.ariaValueText&&e.setAttribute("aria-valuetext",t.ariaValueText),t.ariaPlaceholder&&e.setAttribute("aria-placeholder",t.ariaPlaceholder),void 0!==t.ariaRequired&&e.setAttribute("aria-required",String(t.ariaRequired)),void 0!==t.ariaReadonly&&e.setAttribute("aria-readonly",String(t.ariaReadonly)),void 0!==t.ariaModal&&e.setAttribute("aria-modal",String(t.ariaModal)),void 0!==t.tabIndex&&e.setAttribute("tabindex",String(t.tabIndex))}function clearAriaAttributes(e){Array.from(e.attributes).filter(e=>e.name.startsWith("aria-")||"role"===e.name).forEach(t=>e.removeAttribute(t.name))}function generateAriaId(e="directix-aria"){return`${e}-${Math.random().toString(36).substring(2,10)}`}let announcerElement=null,announcerId=null;function ensureAnnouncer(){return announcerElement&&document.getElementById(announcerId||"")||(announcerId="directix-sr-announcer",announcerElement=document.createElement("div"),announcerElement.id=announcerId,announcerElement.setAttribute("aria-live","polite"),announcerElement.setAttribute("aria-atomic","true"),announcerElement.setAttribute("style","position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;"),document.body.appendChild(announcerElement)),announcerElement}function announce(e,t={}){if(!isBrowser())return;const{priority:n="polite",timeout:r=1e3,clear:o=!0}=t,i=ensureAnnouncer();i.setAttribute("aria-live",n),i.textContent="",requestAnimationFrame(()=>{i.textContent=e,o&&setTimeout(()=>{i.textContent===e&&(i.textContent="")},r)})}function clearAnnouncer(){announcerElement&&(announcerElement.textContent="")}const DEFAULT_NEXT_KEYS=["ArrowDown","ArrowRight"],DEFAULT_PREV_KEYS=["ArrowUp","ArrowLeft"],DEFAULT_SELECT_KEYS=["Enter"," "],DEFAULT_CLOSE_KEYS=["Escape"],DEFAULT_HOME_KEYS=["Home"],DEFAULT_END_KEYS=["End"];function useKeyboardNavigation(e={}){const{nextKeys:t=DEFAULT_NEXT_KEYS,prevKeys:n=DEFAULT_PREV_KEYS,selectKeys:r=DEFAULT_SELECT_KEYS,closeKeys:o=DEFAULT_CLOSE_KEYS,homeKeys:i=DEFAULT_HOME_KEYS,endKeys:s=DEFAULT_END_KEYS,focusTrap:a=!1,returnFocus:l=!0,loop:c=!0,rovingTabindex:u=!1}=e,d=vue.ref(0);let p=[],m=null,f=null;function v(){return p.filter(e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"))}function h(e){const t=v();if(0===t.length)return;let n=e;n<0?n=c?t.length-1:0:n>=t.length&&(n=c?0:t.length-1);const r=t[n];r&&(r.focus(),u&&t.forEach((e,t)=>{e.setAttribute("tabindex",t===n?"0":"-1")}),d.value=n)}function g(){h(d.value+1)}function y(){h(d.value-1)}function b(){h(0)}function _(){h(v().length-1)}function w(e){var c;if(!(e.altKey||e.ctrlKey||e.metaKey)){if(a&&"Tab"===e.key){if(0===v().length)return;return e.preventDefault(),void(e.shiftKey?y():g())}t.includes(e.key)?(e.preventDefault(),g()):n.includes(e.key)?(e.preventDefault(),y()):i.includes(e.key)?(e.preventDefault(),b()):s.includes(e.key)?(e.preventDefault(),_()):r.includes(e.key)?(e.preventDefault(),null==(c=p[d.value])||c.click()):o.includes(e.key)&&(e.preventDefault(),l&&m&&m.focus())}}return vue.onUnmounted(()=>{null==f||f()}),{focusedIndex:vue.readonly(d),bind:function(e,t){return null==f||f(),p=t,m=document.activeElement,e.addEventListener("keydown",w),u&&p.length>0&&p.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1")}),p.length>0&&h(0),f=()=>{e.removeEventListener("keydown",w),p=[]},f},focusIndex:h,focusNext:g,focusPrev:y,focusFirst:b,focusLast:_}}function useFocusTrap(e,t={}){const{initialFocus:n,allowOutsideClick:r=!1,escapeDeactivates:o=!0,onActivate:i,onDeactivate:s}=t,a=vue.ref(!1);let l=null;function c(){const t=e.value;if(!t)return[];const n=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(t.querySelectorAll(n)).filter(e=>!e.hasAttribute("aria-hidden"))}function u(t){if(!a.value)return;if(o&&"Escape"===t.key)return t.preventDefault(),void p();if("Tab"!==t.key)return;const n=e.value;if(!n)return;const r=c();if(0===r.length)return;const i=r[0],s=r[r.length-1],l=document.activeElement;t.shiftKey?l!==i&&n.contains(l)||(t.preventDefault(),s.focus()):l!==s&&n.contains(l)||(t.preventDefault(),i.focus())}function d(t){a.value&&e.value&&(("boolean"!=typeof r||r)&&("function"!=typeof r||r(t))||t.preventDefault())}function p(){a.value&&(document.removeEventListener("keydown",u),document.removeEventListener("mousedown",d),document.removeEventListener("touchstart",d),l&&l.focus&&l.focus(),a.value=!1,null==s||s())}return vue.onUnmounted(()=>{p()}),{activate:function(){var t;if(!a.value){if(l=document.activeElement,n){let r=null;r="function"==typeof n?n():"string"==typeof n?(null==(t=e.value)?void 0:t.querySelector(n))||null:n,null==r||r.focus()}else{const e=c();e.length>0&&e[0].focus()}document.addEventListener("keydown",u),document.addEventListener("mousedown",d),document.addEventListener("touchstart",d),a.value=!0,null==i||i()}},deactivate:p,isActive:vue.readonly(a)}}function getAutoAriaConfig(e){const{type:t,label:n,expanded:r,disabled:o,relatedId:i}=e,s=__spreadValues({},{tooltip:{role:"tooltip",ariaHidden:void 0===r||!r},menu:{role:"menu",ariaLabel:n,ariaExpanded:r,ariaDisabled:o},dialog:{role:"dialog",ariaLabel:n,ariaModal:!0},popover:{role:"region",ariaLabel:n,ariaExpanded:r},dropdown:{role:"listbox",ariaLabel:n,ariaExpanded:r},modal:{role:"dialog",ariaModal:!0,ariaLabel:n},alert:{role:"alert",ariaLive:"assertive",ariaAtomic:!0},region:{role:"region",ariaLabel:n}}[t]||{});return i&&("tooltip"===t?s.ariaDescribedBy=i:s.ariaControls=i),s}const DEFAULT_THRESHOLDS={tap:10,longPress:500,swipe:30,pinch:.1,rotate:5,doubleTap:300,swipeVelocity:.3};function triggerHaptic(e="light"){if(!isBrowser())return;const t=navigator;if(t.vibrate){const n={light:10,medium:20,heavy:30,selection:[10,50,10]};t.vibrate(n[e])}}function applyVisualFeedback(e,t={}){const{visualClass:n="directix-touch-active",visualDuration:r=150}=t;e.classList.add(n);const o=setTimeout(()=>{e.classList.remove(n)},r);return()=>{clearTimeout(o),e.classList.remove(n)}}function calculateVelocity(e,t,n,r,o){if(0===o)return 0;return Math.sqrt(__pow(n-e,2)+__pow(r-t,2))/o}function isEdgePoint(e,t,n=20){if(!isBrowser())return{isEdge:!1};const r=window.innerWidth,o=window.innerHeight;return e<=n?{isEdge:!0,edge:"left"}:e>=r-n?{isEdge:!0,edge:"right"}:t<=n?{isEdge:!0,edge:"top"}:t>=o-n?{isEdge:!0,edge:"bottom"}:{isEdge:!1}}function useEnhancedTouch(e={}){const{thresholds:t={},feedback:n={},debounce:r=0,throttle:o=16,passive:i=!0,disabled:s=!1,onTap:a,onDoubleTap:l,onLongPress:c,onSwipe:u,onSwipeLeft:d,onSwipeRight:p,onSwipeUp:m,onSwipeDown:f,onPan:v,onPinch:h,onPinchIn:g,onPinchOut:y,onRotate:b,onTwoFingerTap:_,onEdgeSwipe:w}=e,x=__spreadValues(__spreadValues({},DEFAULT_THRESHOLDS),t),E=vue.ref(null),S=vue.ref(!1);let C=null,T=0,L=0,$=0,k=0,D=0,A=null,O=0,I=0,P=null,M=0;function R(e){let t=0,n=0;for(let r=0;r<e.length;r++)t+=e[r].clientX,n+=e[r].clientY;return{x:t/e.length,y:n/e.length}}function F(e,t){return Math.sqrt(__pow(e.clientX-t.clientX,2)+__pow(e.clientY-t.clientY,2))}function z(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function V(){return!("boolean"==typeof s?s:s.value)&&!(r>0&&Date.now()-M<r)}function N(e){V()&&(S.value=!0,$=Date.now(),E.value=null,n.haptic&&triggerHaptic("light"),1===e.touches.length?(T=e.touches[0].clientX,L=e.touches[0].clientY,c&&(A=setTimeout(()=>{E.value||(E.value="longPress",M=Date.now(),c({type:"longPress",center:{x:T,y:L},event:e,duration:Date.now()-$}),n.haptic&&triggerHaptic("medium"))},x.longPress))):2===e.touches.length&&(A&&(clearTimeout(A),A=null),O=F(e.touches[0],e.touches[1]),I=z(e.touches[0],e.touches[1])))}function B(e){if(V())if(A&&(clearTimeout(A),A=null),1===e.touches.length){const t=e.touches[0].clientX,n=e.touches[0].clientY;if(v){const r=Date.now();if(r-D>=o){D=r;const o=t-T,i=n-L,s=Math.sqrt(o*o+i*i);s>x.tap&&(E.value="pan",v({type:"pan",distance:s,angle:Math.atan2(i,o)*(180/Math.PI),center:{x:t,y:n},event:e}))}}}else if(2===e.touches.length){const t=F(e.touches[0],e.touches[1]),n=z(e.touches[0],e.touches[1]);if(h&&O>0){const n=t/O;Math.abs(n-1)>x.pinch&&(E.value="pinch",h({type:"pinch",scale:n,center:R(e.touches),event:e}),n<1&&g?g({type:"pinchIn",scale:n,center:R(e.touches),event:e}):n>1&&y&&y({type:"pinchOut",scale:n,center:R(e.touches),event:e}))}if(b){const t=n-I;Math.abs(t)>x.rotate&&(E.value="rotate",b({type:"rotate",rotation:t,center:R(e.touches),event:e}))}}}function H(e){var t,r,o,i;if(!V())return;S.value=!1,A&&(clearTimeout(A),A=null);const s=Date.now()-$,c=null!=(r=null==(t=e.changedTouches[0])?void 0:t.clientX)?r:T,v=null!=(i=null==(o=e.changedTouches[0])?void 0:o.clientY)?i:L,h=c-T,g=v-L,y=Math.sqrt(h*h+g*g),b=calculateVelocity(T,L,c,v,s);if(0===e.touches.length&&2===e.changedTouches.length&&_){F(e.changedTouches[0],e.changedTouches[1])<50&&(E.value="twoFingerTap",_({type:"twoFingerTap",center:R(e.changedTouches),event:e}))}if(1===e.changedTouches.length)if(y>=x.swipe){let t;t=Math.abs(h)>Math.abs(g)?h>0?"right":"left":g>0?"down":"up";if(isEdgePoint(T,L).isEdge&&w&&(E.value="edgeSwipe",w({type:"edgeSwipe",direction:t,distance:y,velocity:b,center:{x:c,y:v},event:e})),!E.value){E.value="swipe";const r={type:"swipe",direction:t,distance:y,velocity:b,angle:Math.atan2(g,h)*(180/Math.PI),center:{x:c,y:v},event:e,duration:s};null==u||u(r),"left"===t&&(null==d||d(r)),"right"===t&&(null==p||p(r)),"up"===t&&(null==m||m(r)),"down"===t&&(null==f||f(r)),n.haptic&&triggerHaptic("light")}}else if(y<x.tap&&s<300){const t=Date.now();t-k<x.doubleTap&&l?(E.value="doubleTap",l({type:"doubleTap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("medium"),k=0):a&&(l?setTimeout(()=>{"doubleTap"!==E.value&&(E.value="tap",a({type:"tap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("light"))},x.doubleTap):(E.value="tap",a({type:"tap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("light")),k=t)}P&&(P(),P=null),M=Date.now(),setTimeout(()=>{E.value=null},100)}function U(){C&&(C.removeEventListener("touchstart",N),C.removeEventListener("touchmove",B),C.removeEventListener("touchend",H),C.removeEventListener("touchcancel",H)),A&&(clearTimeout(A),A=null),P&&(P(),P=null),C=null,E.value=null,S.value=!1}return vue.onUnmounted(U),{activeGesture:vue.readonly(E),bind:function(e){if(!isBrowser())return()=>{};U(),C=e;const t=i?{passive:!0}:void 0;return e.addEventListener("touchstart",N,t),e.addEventListener("touchmove",B,{passive:!1}),e.addEventListener("touchend",H),e.addEventListener("touchcancel",H),n.visual&&e.addEventListener("touchstart",()=>{P=applyVisualFeedback(e,n)}),U},isTouching:vue.readonly(S)}}function addPassiveListener(e,t,n,r){return e.addEventListener(t,n,__spreadValues({passive:!0},r)),()=>e.removeEventListener(t,n)}function addNonPassiveListener(e,t,n,r){return e.addEventListener(t,n,__spreadValues({passive:!1},r)),()=>e.removeEventListener(t,n)}function isTouchDevice(){return!!isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)}function isMobileDevice(){return!!isBrowser()&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function getDevicePixelRatio(){return isBrowser()&&window.devicePixelRatio||1}function usePWA(e={}){const{serviceWorker:t={}}=e,n=vue.ref(!isBrowser()||navigator.onLine),r=vue.ref(!1),o=vue.ref(!1);let i=null;function s(){n.value=!0}function a(){n.value=!1}function l(){return __async(this,null,function*(){if(isBrowser()&&"serviceWorker"in navigator&&t.enabled)try{i=yield navigator.serviceWorker.register(t.path||"/sw.js",{scope:t.scope||"/"}),r.value=!0,i.addEventListener("updatefound",()=>{const e=null==i?void 0:i.installing;e&&e.addEventListener("statechange",()=>{"installed"===e.state&&navigator.serviceWorker.controller&&(o.value=!0)})})}catch(e){console.warn("[Directix] Service Worker registration failed:",e)}})}function c(){return __async(this,null,function*(){if(i)try{yield i.unregister(),r.value=!1,i=null}catch(e){console.warn("[Directix] Service Worker unregistration failed:",e)}})}return vue.onUnmounted(()=>{c()}),{isOnline:vue.readonly(n),isRegistered:vue.readonly(r),needsUpdate:vue.readonly(o),register:l,update:function(){return __async(this,null,function*(){if(i)try{yield i.update(),i.waiting&&i.waiting.postMessage({type:"SKIP_WAITING"})}catch(e){console.warn("[Directix] Service Worker update failed:",e)}})},unregister:c,init:function(){return isBrowser()?(window.addEventListener("online",s),window.addEventListener("offline",a),l(),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",a)}):()=>{}}}}class ObjectPool{constructor(e,t,n=100){__publicField(this,"pool",[]),__publicField(this,"factory"),__publicField(this,"reset"),__publicField(this,"maxSize"),this.factory=e,this.reset=t,this.maxSize=n}acquire(){return this.pool.length>0?this.pool.pop():this.factory()}release(e){this.pool.length<this.maxSize&&(this.reset(e),this.pool.push(e))}get size(){return this.pool.length}clear(){this.pool.length=0}}const DEFAULT_ALLOWED_TAGS=["b","i","u","strong","em","br","p","span","div","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","img","table","thead","tbody","tr","td","th"],DEFAULT_ALLOWED_ATTRIBUTES={"*":["title","alt","class","id"],a:["href","target","rel","title"],img:["src","alt","title","width","height"]},DEFAULT_ALLOWED_PROTOCOLS=["http","https","mailto","tel"],DANGEROUS_TAGS=["script","iframe","object","embed","applet","form","input","button","select","textarea","style","link","meta","base","frame","frameset","svg","math","template"],DANGEROUS_ATTRIBUTES=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onmousemove","onfocus","onblur","onchange","onsubmit","onreset","onkeydown","onkeyup","onkeypress","oninput","onscroll","onresize","onunload","onbeforeunload","onabort","oncanplay","oncanplaythrough","ondurationchange","onemptied","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onafterprint","onbeforeprint","oncontextmenu","oncopy","oncut","onpaste","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","formaction","action","method","enctype"],DANGEROUS_URL_PATTERNS=[/^javascript:/i,/^data:/i,/^vbscript:/i,/^file:/i];function isUrlSafe(e,t=DEFAULT_ALLOWED_PROTOCOLS){if(!e)return!0;const n=e.trim();for(const e of DANGEROUS_URL_PATTERNS)if(e.test(n))return!1;const r=n.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);return!r||t.includes(r[1].toLowerCase())}function sanitizeUrl(e,t=DEFAULT_ALLOWED_PROTOCOLS){if(!e)return"";const n=e.trim();return isUrlSafe(n,t)?n:""}function escapeHtml(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return e.replace(/[&<>"'`=/]/g,e=>t[e]||e)}function unescapeHtml(e){const t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","=":"=","'":"'"};return e.replace(/&[^;]+;/g,e=>t[e]||e).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))}function stripHtml(e){return e.replace(/<[^>]*>/g,"")}function sanitizeHtml(e,t={}){var n;if(!e)return"";if(!isBrowser())return e;const{allowedTags:r=DEFAULT_ALLOWED_TAGS,allowedAttributes:o=DEFAULT_ALLOWED_ATTRIBUTES,allowedProtocols:i=DEFAULT_ALLOWED_PROTOCOLS,allowDataUrls:s=!1,allowInlineStyles:a=!1,allowClass:l=!0,allowId:c=!1,detectDangerousPatterns:u=!0,customFilters:d=[]}=t;let p=e;for(const e of d)p=e(p);if(u){const e=[/<script[\s\S]*?>[\s\S]*?<\/script>/gi,/javascript:/gi,/on\w+\s*=/gi,/data:\s*text\/html/gi,/vbscript:/gi,/expression\s*\(/gi,/url\s*\(\s*["']?javascript:/gi];for(const t of e)t.test(p)&&(p=p.replace(t,""))}const m=document.createElement("div");m.innerHTML=p;for(const e of DANGEROUS_TAGS){const t=m.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}function f(e){var t;const n=e.tagName.toLowerCase();if(!r.includes(n)){const n=document.createTextNode(e.textContent||"");return void(null==(t=e.parentNode)||t.replaceChild(n,e))}for(const t of DANGEROUS_ATTRIBUTES)e.removeAttribute(t);const u=Array.from(e.attributes);for(const t of u){const r=t.name.toLowerCase();if(r.startsWith("on")){e.removeAttribute(t.name);continue}let u=!1;if(Array.isArray(o))u=o.includes(r);else{const e=o["*"]||[],t=o[n]||[];u=e.includes(r)||t.includes(r)}if("class"!==r||l)if("id"!==r||c)if("style"!==r||a){if("href"===r||"src"===r){if(!isUrlSafe(t.value,s?[...i,"data"]:i)){e.removeAttribute(t.name);continue}}u||"class"===r||"id"===r||"style"===r||e.removeAttribute(t.name)}else e.removeAttribute(t.name);else e.removeAttribute(t.name);else e.removeAttribute(t.name)}for(const t of Array.from(e.children))f(t)}for(const e of Array.from(m.children))f(e);return m.innerHTML}function getCSPNonce(){if(!isBrowser())return null;const e=document.querySelector('meta[http-equiv="Content-Security-Policy"]');if(e){const t=e.content.match(/nonce-([a-zA-Z0-9+/=]+)/);if(t)return t[1]}const t=document.querySelectorAll("script[nonce]");return t.length>0&&t[0].nonce||null}function injectStylesCSP(e,t={}){if(!isBrowser())return null;const{nonce:n}=t;if(n||getCSPNonce()){const t=document.createElement("style");return t.setAttribute("nonce",n||getCSPNonce()||""),t.textContent=e,document.head.appendChild(t),t}const r=document.createElement("style");return r.textContent=e,document.head.appendChild(r),r}function injectScriptCSP(e,t={}){if(!isBrowser())return null;const{nonce:n}=t,r=document.createElement("script");return r.src=e,(n||getCSPNonce())&&r.setAttribute("nonce",n||getCSPNonce()||""),document.head.appendChild(r),r}const SecurityAudit={scanHtml(e){const t=[];/<script[\s\S]*?>[\s\S]*?<\/script>/gi.test(e)&&t.push({type:"script-injection",severity:"critical",description:"HTML contains script tags which could lead to XSS attacks",remediation:"Remove script tags or use a sanitization library"});const n=e.match(/on\w+\s*=/gi);return n&&t.push({type:"event-handler",severity:"high",description:`Found ${n.length} event handler(s) which could be exploited`,remediation:"Remove inline event handlers and use addEventListener instead"}),/javascript:/gi.test(e)&&t.push({type:"javascript-url",severity:"high",description:"HTML contains javascript: URLs which could lead to XSS attacks",remediation:"Remove javascript: URLs or validate/sanitize them"}),/data:\s*text\/html/gi.test(e)&&t.push({type:"data-url",severity:"high",description:"HTML contains data:text/html URLs which could execute scripts",remediation:"Remove or sanitize data: URLs"}),/<iframe[\s\S]*?srcdoc=/gi.test(e)&&t.push({type:"iframe-srcdoc",severity:"high",description:"HTML contains iframe with srcdoc attribute",remediation:"Avoid using srcdoc or sanitize its content"}),/<form[\s\S]*?action\s*=/gi.test(e)&&t.push({type:"form-action",severity:"medium",description:"HTML contains form with action attribute",remediation:"Validate form actions or use CSRF protection"}),t},checkCSP(){var e,t;const n={policies:{},warnings:[],recommendations:[]};if(!isBrowser())return n.warnings.push("CSP check requires browser environment"),n;const r=document.querySelector('meta[http-equiv="Content-Security-Policy"]');if(r){const o=r.content.split(";").map(e=>e.trim());for(const e of o){const[t,...r]=e.split(/\s+/);t&&(n.policies[t.toLowerCase()]=r)}(null==(e=n.policies["script-src"])?void 0:e.includes("'unsafe-inline'"))&&n.warnings.push("CSP allows unsafe-inline scripts - this reduces XSS protection"),(null==(t=n.policies["script-src"])?void 0:t.includes("'unsafe-eval'"))&&n.warnings.push("CSP allows unsafe-eval - this reduces XSS protection");const i=["default-src","script-src","style-src","img-src","connect-src"];for(const e of i)n.policies[e]||n.recommendations.push(`Consider adding ${e} directive to CSP`)}else n.warnings.push("No CSP meta tag found - consider adding Content Security Policy"),n.recommendations.push("Add a Content-Security-Policy meta tag or header");return n},checkDependencies(){return __async(this,null,function*(){var e,t,n,r,o;const i=[];if("undefined"==typeof process||!(null==(e=process.versions)?void 0:e.node))return console.warn("[Directix] checkDependencies() is only available in Node.js environment"),i;try{const{execSync:e}=yield import("node:child_process");try{const r=e("npm audit --json",{encoding:"utf-8",timeout:3e4}),o=JSON.parse(r);if(o.vulnerabilities)for(const[e,r]of Object.entries(o.vulnerabilities))if(r.via&&Array.isArray(r.via))for(const o of r.via)"object"==typeof o&&o.title&&i.push({name:e,id:null==(n=null==(t=o.url)?void 0:t.match(/(CVE-\d+-\d+|GHSA-[a-zA-Z0-9-]+)/))?void 0:n[0],version:r.version||"unknown",severity:o.severity||r.severity||"medium",title:o.title,url:o.url,patchedVersions:r.fixAvailable?"Available":void 0})}catch(e){if(e.stdout)try{const t=JSON.parse(e.stdout);if(t.vulnerabilities)for(const[e,n]of Object.entries(t.vulnerabilities))if(n.via&&Array.isArray(n.via))for(const t of n.via)"object"==typeof t&&t.title&&i.push({name:e,id:null==(o=null==(r=t.url)?void 0:r.match(/(CVE-\d+-\d+|GHSA-[a-zA-Z0-9-]+)/))?void 0:o[0],version:n.version||"unknown",severity:t.severity||n.severity||"medium",title:t.title,url:t.url,patchedVersions:n.fixAvailable?"Available":void 0})}catch(e){}}}catch(e){console.warn("[Directix] Failed to check dependencies:",e)}return i})},generateReport(e){const t={vulnerabilities:[],warnings:[],recommendations:[],timestamp:new Date};e&&(t.vulnerabilities=this.scanHtml(e));const n=this.checkCSP();for(const e of n.warnings)t.warnings.push({type:"csp-warning",severity:"medium",description:e});return t.recommendations.push(...n.recommendations),t},formatReport(e,t="text"){if("json"===t)return JSON.stringify(e,null,2);if("html"===t){let t='<div class="security-report">';if(t+="<h2>Security Report</h2>",t+=`<p>Generated: ${e.timestamp.toISOString()}</p>`,e.vulnerabilities.length>0){t+="<h3>Vulnerabilities</h3><ul>";for(const n of e.vulnerabilities)t+=`<li class="severity-${n.severity}"><strong>${n.type}</strong>: ${n.description}</li>`;t+="</ul>"}if(e.warnings.length>0){t+="<h3>Warnings</h3><ul>";for(const n of e.warnings)t+=`<li class="severity-${n.severity}"><strong>${n.type}</strong>: ${n.description}</li>`;t+="</ul>"}if(e.recommendations.length>0){t+="<h3>Recommendations</h3><ul>";for(const n of e.recommendations)t+=`<li>${n}</li>`;t+="</ul>"}return t+="</div>",t}let n="Security Report\n";if(n+=`Generated: ${e.timestamp.toISOString()}\n\n`,e.vulnerabilities.length>0){n+="Vulnerabilities:\n";for(const t of e.vulnerabilities)n+=` [${t.severity.toUpperCase()}] ${t.type}: ${t.description}\n`;n+="\n"}if(e.warnings.length>0){n+="Warnings:\n";for(const t of e.warnings)n+=` [${t.severity.toUpperCase()}] ${t.type}: ${t.description}\n`;n+="\n"}if(e.recommendations.length>0){n+="Recommendations:\n";for(const t of e.recommendations)n+=` - ${t}\n`}return n}};class SafeContentHandler{constructor(e={}){__publicField(this,"config"),this.config=e}setHtml(e,t){e.innerHTML=sanitizeHtml(t,this.config)}setText(e,t){e.textContent=t}setAttribute(e,t,n){t.toLowerCase().startsWith("on")||("href"!==t.toLowerCase()&&"src"!==t.toLowerCase()||(n=sanitizeUrl(n,this.config.allowedProtocols)),e.setAttribute(t,n))}getSanitizedHtml(e){return sanitizeHtml(e,this.config)}}function createSafeContentHandler(e){return new SafeContentHandler(e)}function useLazyOptimized(e={}){const{threshold:t=0,rootMargin:n="0px",once:r=!0,onLoad:o}=e,i=vue.shallowRef({loading:!1,loaded:!1,error:null,isVisible:!1});let s=null;function a(){s&&(s.disconnect(),s=null)}function l(){if(!i.value.loading&&!i.value.loaded){i.value=__spreadProps(__spreadValues({},i.value),{loading:!0,error:null});try{null==o||o({}),i.value=__spreadProps(__spreadValues({},i.value),{loading:!1,loaded:!0})}catch(e){i.value=__spreadProps(__spreadValues({},i.value),{loading:!1,error:e})}}}return{state:vue.readonly(i),observe:function(e){a(),s=new IntersectionObserver(e=>{const t=e[0];(null==t?void 0:t.isIntersecting)&&(i.value=__spreadProps(__spreadValues({},i.value),{isVisible:!0}),l(),r&&a())},{threshold:t,rootMargin:n}),s.observe(e)},disconnect:a,load:l}}function useDirectiveInstance(e={}){const{initialState:t={},shallow:n=!1}=e;let r=null;const o=vue.reactive(t);function i(e){r=vue.markRaw(e)}return{get element(){return r},set element(e){e&&i(e)},state:vue.readonly(o),setElement:i,setState:function(e){const t=e(vue.toRaw(o));Object.assign(o,t)},reset:function(){Object.assign(o,t)}}}function computedWithCleanup(e){const{get:t,cleanup:n}=e;let r;return vue.computed({get(){const e=t();return void 0!==r&&r!==e&&(null==n||n(r)),r=e,e},set(){}})}function watchEffectBinding(e){const{binding:t,effect:n}=e;let r=null,o=e=>{r=e};const i=vue.watchEffect(e=>{o=e,r&&(r(),r=null),vue.isRef(t)?n(t.value,void 0,o):n(t,void 0,o)});return()=>{r&&r(),i()}}function useSuspenseDirective(e){const{loader:t,onSuccess:n,onError:r}=e,o=vue.shallowRef({loading:!1,error:null,data:null});function i(){return __async(this,null,function*(){if(!o.value.loading){o.value=__spreadProps(__spreadValues({},o.value),{loading:!0,error:null});try{const e=yield t();o.value={loading:!1,error:null,data:e},null==n||n(e)}catch(e){o.value=__spreadProps(__spreadValues({},o.value),{loading:!1,error:e}),null==r||r(e)}}})}return{state:vue.readonly(o),load:i,retry:function(){return __async(this,null,function*(){o.value=__spreadProps(__spreadValues({},o.value),{error:null}),yield i()})}}}function ensureTeleportTarget(e){if("undefined"==typeof document)return null;let t=document.querySelector(e);return t||(t=document.createElement("div"),t.id=e.replace("#",""),document.body.appendChild(t)),t}function teleportContent(e,t){const{to:n,disabled:r=!1}=t;if(r||"undefined"==typeof document)return()=>{};const o="string"==typeof n?ensureTeleportTarget(n):n;if(!o)return()=>{};const i=e.parentNode,s=e.nextSibling;return o.appendChild(e),()=>{i&&e.parentNode===o&&i.insertBefore(e,s)}}const zhCN={directives:{debounce:{description:"防抖指令,延迟执行事件处理函数",params:{wait:"延迟时间(毫秒)",leading:"是否在延迟开始前调用",trailing:"是否在延迟结束后调用"},errors:{invalid_wait:"wait 参数无效,必须为正数",invalid_handler:"handler 必须是一个函数"}},throttle:{description:"节流指令,限制事件触发频率",params:{interval:"执行间隔(毫秒)",leading:"是否在间隔开始时调用",trailing:"是否在间隔结束时调用"},errors:{invalid_interval:"interval 参数无效,必须为正数",invalid_handler:"handler 必须是一个函数"}},copy:{description:"复制指令,点击复制文本到剪贴板",params:{value:"要复制的文本",onSuccess:"复制成功回调",onError:"复制失败回调"},errors:{empty_value:"没有要复制的文本",clipboard_failed:"剪贴板 API 失败,回退到 execCommand"}},lazy:{description:"懒加载指令,延迟加载图片或组件",params:{src:"图片源地址",threshold:"触发阈值",rootMargin:"根元素边距"},errors:{invalid_src:"src 参数无效",observer_failed:"IntersectionObserver 创建失败"}},permission:{description:"权限指令,根据权限控制元素显示",params:{value:"权限值或权限数组",mode:"权限模式:any 或 all"},errors:{empty_permission:"权限值不能为空",invalid_mode:"mode 必须是 any 或 all"}},mask:{description:"输入掩码指令,格式化输入内容",params:{pattern:"掩码模式",placeholder:"占位符",allowIncomplete:"是否允许不完整输入"},errors:{invalid_pattern:"pattern 参数无效"}},hotkey:{description:"热键指令,绑定键盘快捷键",params:{key:"快捷键组合",handler:"处理函数",prevent:"是否阻止默认行为"},errors:{invalid_key:"快捷键格式无效",conflict:"快捷键冲突:{key}"}},clickoutside:{description:"点击外部指令,检测元素外部点击",params:{handler:"点击外部时的处理函数",exclude:"排除的元素列表"},errors:{invalid_handler:"handler 必须是一个函数"}},longpress:{description:"长按指令,检测长按手势",params:{duration:"长按时长(毫秒)",handler:"长按触发函数"},errors:{invalid_duration:"duration 必须为正数"}},draggable:{description:"拖拽指令,使元素可拖拽",params:{axis:"拖拽轴:x、y 或空",bounds:"拖拽边界",handle:"拖拽手柄选择器"},errors:{invalid_bounds:"bounds 参数无效"}},intersect:{description:"交叉观察指令,检测元素可见性",params:{threshold:"可见阈值",rootMargin:"根元素边距",once:"是否只触发一次"},errors:{observer_failed:"IntersectionObserver 创建失败"}},loading:{description:"加载指令,显示加载状态",params:{value:"是否加载中",text:"加载提示文字",spinner:"加载图标"}},skeleton:{description:"骨架屏指令,显示内容占位符",params:{value:"是否显示骨架屏",variant:"骨架屏变体",animation:"动画类型"}},virtualList:{description:"虚拟列表指令,优化大数据渲染",params:{itemSize:"项目高度",buffer:"缓冲区大小",estimatedSize:"预估高度"},errors:{invalid_itemSize:"itemSize 必须为正数"}},infiniteScroll:{description:"无限滚动指令,实现滚动加载更多",params:{handler:"加载更多的处理函数",distance:"触发距离",disabled:"是否禁用"},errors:{invalid_handler:"handler 必须是一个函数"}},watermark:{description:"水印指令,为元素添加水印",params:{content:"水印内容",fontSize:"字体大小",color:"水印颜色",opacity:"透明度"},errors:{empty_content:"水印内容不能为空"}},contextmenu:{description:"右键菜单指令,自定义右键菜单",params:{items:"菜单项列表",handler:"菜单项点击处理"},errors:{empty_items:"菜单项列表不能为空"}},fullscreen:{description:"全屏指令,使元素全屏显示",params:{value:"是否全屏",onEnter:"进入全屏回调",onExit:"退出全屏回调"},errors:{not_supported:"当前浏览器不支持全屏 API"}},imagePreview:{description:"图片预览指令,点击预览大图",params:{src:"图片源地址",list:"图片列表",initialIndex:"初始索引"},errors:{invalid_src:"src 参数无效"}},tooltip:{description:"提示指令,显示悬浮提示",params:{content:"提示内容",placement:"显示位置",trigger:"触发方式"},errors:{empty_content:"提示内容不能为空"}},lottie:{description:"Lottie 动画指令,播放 Lottie 动画",params:{path:"动画文件路径",animationData:"动画数据",loop:"是否循环",autoplay:"是否自动播放"},errors:{invalid_source:"必须提供 path 或 animationData",load_failed:"Lottie 动画加载失败"}},swipe:{description:"滑动手势指令,检测滑动方向",params:{threshold:"滑动阈值",velocity:"速度阈值",onSwipe:"滑动回调"},errors:{invalid_threshold:"threshold 必须为正数"}},touch:{description:"触摸手势指令,统一处理触摸事件",params:{onStart:"触摸开始回调",onMove:"触摸移动回调",onEnd:"触摸结束回调"}},pan:{description:"平移手势指令,检测平移操作",params:{threshold:"触发阈值",direction:"平移方向:all、horizontal、vertical"}},pinch:{description:"捏合手势指令,检测缩放操作",params:{threshold:"缩放阈值",onPinch:"缩放回调"}},rotateGesture:{description:"旋转手势指令,检测旋转操作",params:{threshold:"旋转角度阈值",onRotate:"旋转回调"}},parallax:{description:"视差滚动指令,创建视差效果",params:{speed:"视差速度",direction:"视差方向"}},typewriter:{description:"打字机指令,实现打字机效果",params:{text:"要显示的文本",speed:"打字速度",delay:"延迟开始"},errors:{empty_text:"文本内容不能为空"}},countdown:{description:"倒计时指令,显示倒计时",params:{time:"倒计时时间(毫秒)",format:"时间格式",onFinish:"完成回调"},errors:{invalid_time:"time 必须为正数"}},counter:{description:"计数器指令,数字动画",params:{from:"起始值",to:"结束值",duration:"动画时长",decimals:"小数位数"},errors:{invalid_range:"from 和 to 必须为数字"}},progress:{description:"进度条指令,显示进度",params:{value:"进度值(0-100)",showText:"是否显示文字",strokeWidth:"线条宽度"},errors:{invalid_value:"value 必须在 0-100 之间"}},emoji:{description:"表情选择指令,表情选择器",params:{onSelect:"选择回调",exclude:"排除的表情类别"}},money:{description:"金额输入指令,格式化金额",params:{currency:"货币符号",precision:"小数位数",thousands:"千位分隔符"}},number:{description:"数字输入指令,限制数字输入",params:{min:"最小值",max:"最大值",precision:"小数位数"},errors:{invalid_range:"min 必须小于 max"}},truncate:{description:"截断指令,截断文本",params:{length:"最大长度",omission:"省略符号"},errors:{invalid_length:"length 必须为正整数"}},ellipsis:{description:"省略号指令,CSS 省略显示",params:{lines:"最大行数"}},highlight:{description:"高亮指令,高亮文本内容",params:{keyword:"高亮关键词",color:"高亮颜色",className:"CSS 类名"},errors:{empty_keyword:"关键词不能为空"}},sanitize:{description:"净化指令,净化 HTML 内容",params:{allowedTags:"允许的标签",allowedAttrs:"允许的属性"}},focus:{description:"聚焦指令,自动聚焦元素",params:{value:"是否聚焦",preventScroll:"是否阻止滚动"}},visible:{description:"可见性指令,控制元素显示",params:{value:"是否可见"}},blur:{description:"模糊指令,模糊元素内容",params:{value:"模糊程度",transition:"过渡效果"}},hover:{description:"悬停指令,检测鼠标悬停",params:{onEnter:"进入回调",onLeave:"离开回调"}},fade:{description:"淡入淡出指令,淡入淡出效果",params:{duration:"动画时长",delay:"延迟时间"}},clickWave:{description:"点击波纹指令,点击波纹效果",params:{color:"波纹颜色",duration:"动画时长"}},clickDelay:{description:"点击延迟指令,防止快速点击",params:{delay:"延迟时间"},errors:{invalid_delay:"delay 必须为正数"}},scroll:{description:"滚动指令,滚动行为控制",params:{behavior:"滚动行为",smooth:"是否平滑滚动"}},sticky:{description:"粘性定位指令,粘性定位效果",params:{offsetTop:"顶部偏移",offsetBottom:"底部偏移"}},print:{description:"打印指令,打印元素内容",params:{title:"打印标题",onBefore:"打印前回调",onAfter:"打印后回调"}},export_:{description:"导出指令,导出元素内容",params:{type:"导出类型:image、pdf",filename:"文件名",quality:"质量"},errors:{unsupported_type:"不支持的导出类型"}},pullRefresh:{description:"下拉刷新指令,下拉刷新功能",params:{onRefresh:"刷新回调",distance:"触发距离"},errors:{invalid_handler:"onRefresh 必须是一个函数"}},resize:{description:"调整大小指令,监听元素尺寸变化",params:{handler:"尺寸变化回调",debounce:"防抖时间"},errors:{observer_failed:"ResizeObserver 创建失败"}},mutation:{description:"变化观察指令,监听 DOM 变化",params:{handler:"变化回调",options:"观察选项"},errors:{observer_failed:"MutationObserver 创建失败"}},ripple:{description:"涟漪指令,Material Design 涟漪效果",params:{color:"涟漪颜色",duration:"动画时长"}},uppercase:{description:"大写指令,转换为大写"},lowercase:{description:"小写指令,转换为小写"},capitalcase:{description:"首字母大写指令,首字母大写"},trim:{description:"去空格指令,去除首尾空格"}},errors:{invalid_param:"参数 {param} 无效",missing_required:"缺少必需参数 {param}",type_error:"参数 {param} 类型错误,期望 {expected},实际 {actual}",value_out_of_range:"参数 {param} 值超出范围,应在 {min} 到 {max} 之间",not_supported:"{feature} 在当前环境不受支持",ssr_not_supported:"指令 {directive} 不支持 SSR"},warnings:{deprecated:"{feature} 已弃用,请使用 {alternative}",experimental:"{feature} 是实验性功能,可能在未来版本中更改",performance:"{feature} 可能影响性能,建议谨慎使用",fallback:"{feature} 失败,回退到 {alternative}"},help:{installation:"使用 npm install directix 安装",usage:"在 Vue 应用中注册 Directix 插件",contribution:"请参阅 CONTRIBUTING.md 了解如何贡献"}};let currentLocale="zh-CN",currentMessages=zhCN;function createI18n(e){const{locale:n="zh-CN",fallbackLocale:r="en-US",messages:o}=e;return currentLocale=n,currentMessages=o[n]||o[r]||zhCN,{locale:currentLocale,fallbackLocale:r,messages:currentMessages,setLocale:e=>{currentLocale=e,o[e]&&(currentMessages=o[e])},t:(e,n)=>t(e,n)}}function setLocale(e){currentLocale=e}function getLocale(){return currentLocale}function t(e,t){const n=e.split(".");let r=currentMessages;for(const t of n){if(!r||"object"!=typeof r||!(t in r))return e;r=r[t]}return"string"!=typeof r?e:t?r.replace(/\{(\w+)\}/g,(e,n)=>void 0!==t[n]?String(t[n]):`{${n}}`):r}const REGION_FORMATS={CN:{date:{datePattern:"YYYY-MM-DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"-",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"¥",currencyPosition:"before",currencyDecimals:2}},US:{date:{datePattern:"MM/DD/YYYY",timePattern:"hh:mm:ss a",hourCycle:"h12",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"$",currencyPosition:"before",currencyDecimals:2}},JP:{date:{datePattern:"YYYY/MM/DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"¥",currencyPosition:"before",currencyDecimals:0}},DE:{date:{datePattern:"DD.MM.YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:".",timeSeparator:":"},number:{decimalSeparator:",",thousandsSeparator:".",currencySymbol:"€",currencyPosition:"after",currencyDecimals:2}},FR:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:",",thousandsSeparator:" ",currencySymbol:"€",currencyPosition:"after",currencyDecimals:2}},GB:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"£",currencyPosition:"before",currencyDecimals:2}},KR:{date:{datePattern:"YYYY.MM.DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:".",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"₩",currencyPosition:"before",currencyDecimals:0}},IN:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"₹",currencyPosition:"before",currencyDecimals:2}}},DEFAULT_FORMAT={date:{datePattern:"YYYY-MM-DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"-",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"$",currencyPosition:"before",currencyDecimals:2}};function getTimezoneInfo(){const e=new Date,t=-e.getTimezoneOffset(),n=t/60,r=n>=0?"+":"-",o=Math.abs(Math.floor(n)),i=Math.abs(t%60),s=`${r}${String(o).padStart(2,"0")}:${String(i).padStart(2,"0")}`;let a="UTC",l="UTC";if("undefined"!=typeof Intl&&Intl.DateTimeFormat)try{a=Intl.DateTimeFormat().resolvedOptions().timeZone,l=a.split("/").pop()||a}catch(e){l=`UTC${s}`}else l=`UTC${s}`;const c=-new Date(e.getFullYear(),0,1).getTimezoneOffset(),u=-new Date(e.getFullYear(),6,1).getTimezoneOffset();return{id:a,name:l,offset:n,offsetString:s,isDST:t!==Math.max(c,u)}}function detectLocaleInfo(){const e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US",t="undefined"!=typeof Intl&&Intl.DateTimeFormat?Intl.DateTimeFormat().resolvedOptions().timeZone:"UTC",n=e.split("-"),r=n[0]||"en";let o=null,i=null;for(let e=1;e<n.length;e++)2!==n[e].length&&3!==n[e].length||(2===n[e].length?o=n[e].toUpperCase():4===n[e].length&&(i=n[e]));return{locale:e,language:r,region:o,script:i,browserLocale:e,timezone:t}}function getDateFormat(e){var t;const n=detectLocaleInfo(),r=e||n.region||"US";return(null==(t=REGION_FORMATS[r])?void 0:t.date)||DEFAULT_FORMAT.date}function getNumberFormat(e){var t;const n=detectLocaleInfo(),r=e||n.region||"US";return(null==(t=REGION_FORMATS[r])?void 0:t.number)||DEFAULT_FORMAT.number}function formatDateLocale(e,t){const n="string"==typeof e||"number"==typeof e?new Date(e):e,r=t?__spreadValues(__spreadValues({},getDateFormat()),t):getDateFormat();if("undefined"!=typeof Intl)try{const e=detectLocaleInfo();return new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h12"===r.hourCycle?"h12":"h23"}).format(n)}catch(e){}const o=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0"),a=String(n.getHours()).padStart(2,"0"),l=String(n.getMinutes()).padStart(2,"0"),c=String(n.getSeconds()).padStart(2,"0");return`${o}${r.dateSeparator}${i}${r.dateSeparator}${s} ${a}${r.timeSeparator}${l}${r.timeSeparator}${c}`}function formatNumberLocale(e,t,n){const r=n?__spreadValues(__spreadValues({},getNumberFormat()),n):getNumberFormat();if("undefined"!=typeof Intl)try{const n=detectLocaleInfo();return new Intl.NumberFormat(n.locale,{minimumFractionDigits:null!=t?t:0,maximumFractionDigits:null!=t?t:2}).format(e)}catch(e){}const o=void 0!==t?e.toFixed(t):String(e),[i,s]=o.split("."),a=i.replace(/\B(?=(\d{3})+(?!\d))/g,r.thousandsSeparator);return s?`${a}${r.decimalSeparator}${s}`:a}function formatCurrencyLocale(e,t){const n=t?__spreadValues(__spreadValues({},getNumberFormat()),t):getNumberFormat();if("undefined"!=typeof Intl)try{const t=detectLocaleInfo();return new Intl.NumberFormat(t.locale,{style:"currency",currency:getCurrencyCode(t.region||"US"),minimumFractionDigits:n.currencyDecimals,maximumFractionDigits:n.currencyDecimals}).format(e)}catch(e){}const r=formatNumberLocale(e,n.currencyDecimals,n);return"before"===n.currencyPosition?`${n.currencySymbol}${r}`:`${r}${n.currencySymbol}`}function getCurrencyCode(e){return{CN:"CNY",US:"USD",JP:"JPY",DE:"EUR",FR:"EUR",GB:"GBP",KR:"KRW",IN:"INR"}[e]||"USD"}function parseLocale(e){const t=e.replace(/_/g,"-").split("-"),n=t[0]||"en";let r=null,o=null;for(let e=1;e<t.length;e++)2===t[e].length?r=t[e].toUpperCase():4===t[e].length&&(o=t[e]);return{language:n,region:r,script:o}}function getSupportedRegions(){return Object.keys(REGION_FORMATS)}function getLocaleDisplayName(e,t){if("undefined"!=typeof Intl&&Intl.DisplayNames)try{return new Intl.DisplayNames([t||detectLocaleInfo().locale],{type:"locale"}).of(e)||e}catch(t){return e}return e}const enUS={directives:{debounce:{description:"Debounce directive - delay event handler execution",params:{wait:"Delay time in milliseconds",leading:"Whether to invoke before delay starts",trailing:"Whether to invoke after delay ends"},errors:{invalid_wait:'Invalid "wait" parameter, must be a positive number',invalid_handler:"Handler must be a function"}},throttle:{description:"Throttle directive - limit event trigger frequency",params:{interval:"Execution interval in milliseconds",leading:"Whether to invoke at interval start",trailing:"Whether to invoke at interval end"},errors:{invalid_interval:'Invalid "interval" parameter, must be a positive number',invalid_handler:"Handler must be a function"}},copy:{description:"Copy directive - copy text to clipboard on click",params:{value:"Text to copy",onSuccess:"Copy success callback",onError:"Copy error callback"},errors:{empty_value:"No text to copy",clipboard_failed:"Clipboard API failed, falling back to execCommand"}},lazy:{description:"Lazy loading directive - defer image or component loading",params:{src:"Image source URL",threshold:"Intersection threshold",rootMargin:"Root margin"},errors:{invalid_src:'Invalid "src" parameter',observer_failed:"Failed to create IntersectionObserver"}},permission:{description:"Permission directive - control element visibility by permissions",params:{value:"Permission value or array",mode:"Permission mode: any or all"},errors:{empty_permission:"Permission value cannot be empty",invalid_mode:'Mode must be "any" or "all"'}},mask:{description:"Input mask directive - format input content",params:{pattern:"Mask pattern",placeholder:"Placeholder character",allowIncomplete:"Allow incomplete input"},errors:{invalid_pattern:'Invalid "pattern" parameter'}},hotkey:{description:"Hotkey directive - bind keyboard shortcuts",params:{key:"Keyboard shortcut combination",handler:"Handler function",prevent:"Whether to prevent default behavior"},errors:{invalid_key:"Invalid hotkey format",conflict:"Hotkey conflict: {key}"}},clickoutside:{description:"Click outside directive - detect clicks outside element",params:{handler:"Handler function for outside clicks",exclude:"Elements to exclude"},errors:{invalid_handler:"Handler must be a function"}},longpress:{description:"Long press directive - detect long press gesture",params:{duration:"Press duration in milliseconds",handler:"Long press handler function"},errors:{invalid_duration:"Duration must be a positive number"}},draggable:{description:"Draggable directive - make element draggable",params:{axis:"Drag axis: x, y, or empty",bounds:"Drag bounds",handle:"Drag handle selector"},errors:{invalid_bounds:'Invalid "bounds" parameter'}},intersect:{description:"Intersect directive - observe element visibility",params:{threshold:"Visibility threshold",rootMargin:"Root margin",once:"Whether to trigger only once"},errors:{observer_failed:"Failed to create IntersectionObserver"}},loading:{description:"Loading directive - display loading state",params:{value:"Whether loading",text:"Loading text",spinner:"Loading spinner"}},skeleton:{description:"Skeleton directive - display content placeholder",params:{value:"Whether to show skeleton",variant:"Skeleton variant",animation:"Animation type"}},virtualList:{description:"Virtual list directive - optimize large data rendering",params:{itemSize:"Item height",buffer:"Buffer size",estimatedSize:"Estimated size"},errors:{invalid_itemSize:"itemSize must be a positive number"}},infiniteScroll:{description:"Infinite scroll directive - load more on scroll",params:{handler:"Load more handler function",distance:"Trigger distance",disabled:"Whether disabled"},errors:{invalid_handler:"Handler must be a function"}},watermark:{description:"Watermark directive - add watermark overlay",params:{content:"Watermark content",fontSize:"Font size",color:"Watermark color",opacity:"Opacity"},errors:{empty_content:"Watermark content cannot be empty"}},contextmenu:{description:"Context menu directive - custom right-click menu",params:{items:"Menu items list",handler:"Menu item click handler"},errors:{empty_items:"Menu items list cannot be empty"}},fullscreen:{description:"Fullscreen directive - toggle element fullscreen",params:{value:"Whether fullscreen",onEnter:"Enter fullscreen callback",onExit:"Exit fullscreen callback"},errors:{not_supported:"Fullscreen API is not supported in this browser"}},imagePreview:{description:"Image preview directive - click to preview image",params:{src:"Image source URL",list:"Image list",initialIndex:"Initial index"},errors:{invalid_src:'Invalid "src" parameter'}},tooltip:{description:"Tooltip directive - show hover tooltip",params:{content:"Tooltip content",placement:"Display position",trigger:"Trigger method"},errors:{empty_content:"Tooltip content cannot be empty"}},lottie:{description:"Lottie animation directive - play Lottie animations",params:{path:"Animation file path",animationData:"Animation data",loop:"Whether to loop",autoplay:"Whether to autoplay"},errors:{invalid_source:"Must provide path or animationData",load_failed:"Failed to load Lottie animation"}},swipe:{description:"Swipe gesture directive - detect swipe direction",params:{threshold:"Swipe threshold",velocity:"Velocity threshold",onSwipe:"Swipe callback"},errors:{invalid_threshold:"Threshold must be a positive number"}},touch:{description:"Touch gesture directive - unified touch event handling",params:{onStart:"Touch start callback",onMove:"Touch move callback",onEnd:"Touch end callback"}},pan:{description:"Pan gesture directive - detect pan operations",params:{threshold:"Trigger threshold",direction:"Pan direction: all, horizontal, vertical"}},pinch:{description:"Pinch gesture directive - detect zoom operations",params:{threshold:"Zoom threshold",onPinch:"Zoom callback"}},rotateGesture:{description:"Rotate gesture directive - detect rotation operations",params:{threshold:"Rotation angle threshold",onRotate:"Rotation callback"}},parallax:{description:"Parallax directive - create parallax scrolling effect",params:{speed:"Parallax speed",direction:"Parallax direction"}},typewriter:{description:"Typewriter directive - typewriter text animation",params:{text:"Text to display",speed:"Typing speed",delay:"Start delay"},errors:{empty_text:"Text content cannot be empty"}},countdown:{description:"Countdown directive - display countdown timer",params:{time:"Countdown time in milliseconds",format:"Time format",onFinish:"Finish callback"},errors:{invalid_time:"Time must be a positive number"}},counter:{description:"Counter directive - number animation",params:{from:"Start value",to:"End value",duration:"Animation duration",decimals:"Decimal places"},errors:{invalid_range:"From and to must be numbers"}},progress:{description:"Progress directive - display progress bar",params:{value:"Progress value (0-100)",showText:"Whether to show text",strokeWidth:"Stroke width"},errors:{invalid_value:"Value must be between 0 and 100"}},emoji:{description:"Emoji picker directive - emoji selector",params:{onSelect:"Select callback",exclude:"Emoji categories to exclude"}},money:{description:"Money input directive - format currency amounts",params:{currency:"Currency symbol",precision:"Decimal places",thousands:"Thousands separator"}},number:{description:"Number input directive - restrict numeric input",params:{min:"Minimum value",max:"Maximum value",precision:"Decimal places"},errors:{invalid_range:"Min must be less than max"}},truncate:{description:"Truncate directive - truncate text",params:{length:"Maximum length",omission:"Omission string"},errors:{invalid_length:"Length must be a positive integer"}},ellipsis:{description:"Ellipsis directive - CSS text overflow ellipsis",params:{lines:"Maximum lines"}},highlight:{description:"Highlight directive - highlight text content",params:{keyword:"Highlight keyword",color:"Highlight color",className:"CSS class name"},errors:{empty_keyword:"Keyword cannot be empty"}},sanitize:{description:"Sanitize directive - sanitize HTML content",params:{allowedTags:"Allowed tags",allowedAttrs:"Allowed attributes"}},focus:{description:"Focus directive - auto-focus element",params:{value:"Whether to focus",preventScroll:"Whether to prevent scroll"}},visible:{description:"Visibility directive - control element visibility",params:{value:"Whether visible"}},blur:{description:"Blur directive - blur element content",params:{value:"Blur amount",transition:"Transition effect"}},hover:{description:"Hover directive - detect mouse hover",params:{onEnter:"Enter callback",onLeave:"Leave callback"}},fade:{description:"Fade directive - fade in/out effect",params:{duration:"Animation duration",delay:"Delay time"}},clickWave:{description:"Click wave directive - click ripple effect",params:{color:"Ripple color",duration:"Animation duration"}},clickDelay:{description:"Click delay directive - prevent rapid clicks",params:{delay:"Delay time"},errors:{invalid_delay:"Delay must be a positive number"}},scroll:{description:"Scroll directive - scroll behavior control",params:{behavior:"Scroll behavior",smooth:"Whether to smooth scroll"}},sticky:{description:"Sticky directive - sticky positioning",params:{offsetTop:"Top offset",offsetBottom:"Bottom offset"}},print:{description:"Print directive - print element content",params:{title:"Print title",onBefore:"Before print callback",onAfter:"After print callback"}},export_:{description:"Export directive - export element content",params:{type:"Export type: image, pdf",filename:"Filename",quality:"Quality"},errors:{unsupported_type:"Unsupported export type"}},pullRefresh:{description:"Pull refresh directive - pull-to-refresh functionality",params:{onRefresh:"Refresh callback",distance:"Trigger distance"},errors:{invalid_handler:"onRefresh must be a function"}},resize:{description:"Resize directive - observe element size changes",params:{handler:"Size change callback",debounce:"Debounce time"},errors:{observer_failed:"Failed to create ResizeObserver"}},mutation:{description:"Mutation directive - observe DOM mutations",params:{handler:"Mutation callback",options:"Observer options"},errors:{observer_failed:"Failed to create MutationObserver"}},ripple:{description:"Ripple directive - Material Design ripple effect",params:{color:"Ripple color",duration:"Animation duration"}},uppercase:{description:"Uppercase directive - convert to uppercase"},lowercase:{description:"Lowercase directive - convert to lowercase"},capitalcase:{description:"Capitalize directive - capitalize first letter"},trim:{description:"Trim directive - trim whitespace"}},errors:{invalid_param:'Invalid parameter "{param}"',missing_required:'Missing required parameter "{param}"',type_error:'Type error for parameter "{param}": expected {expected}, got {actual}',value_out_of_range:'Parameter "{param}" is out of range, should be between {min} and {max}',not_supported:"{feature} is not supported in the current environment",ssr_not_supported:"Directive {directive} does not support SSR"},warnings:{deprecated:"{feature} is deprecated, please use {alternative}",experimental:"{feature} is experimental and may change in future versions",performance:"{feature} may affect performance, use with caution",fallback:"{feature} failed, falling back to {alternative}"},help:{installation:"Install with npm install directix",usage:"Register the Directix plugin in your Vue app",contribution:"See CONTRIBUTING.md for how to contribute"}},jaJP={directives:{debounce:{description:"デバウンスディレクティブ - イベントハンドラの実行を遅延",params:{wait:"遅延時間(ミリ秒)",leading:"遅延開始前に呼び出すかどうか",trailing:"遅延終了後に呼び出すかどうか"},errors:{invalid_wait:'"wait"パラメータが無効です。正の数値を指定してください',invalid_handler:"ハンドラは関数である必要があります"}},throttle:{description:"スロットルディレクティブ - イベントトリガー頻度を制限",params:{interval:"実行間隔(ミリ秒)",leading:"間隔開始時に呼び出すかどうか",trailing:"間隔終了時に呼び出すかどうか"},errors:{invalid_interval:'"interval"パラメータが無効です。正の数値を指定してください',invalid_handler:"ハンドラは関数である必要があります"}},copy:{description:"コピーディレクティブ - クリックでテキストをクリップボードにコピー",params:{value:"コピーするテキスト",onSuccess:"コピー成功時のコールバック",onError:"コピー失敗時のコールバック"},errors:{empty_value:"コピーするテキストがありません",clipboard_failed:"クリップボードAPIが失敗しました。execCommandにフォールバックします"}},lazy:{description:"遅延ロードディレクティブ - 画像またはコンポーネントの読み込みを延期",params:{src:"画像ソースURL",threshold:"インターセクションしきい値",rootMargin:"ルートマージン"},errors:{invalid_src:'"src"パラメータが無効です',observer_failed:"IntersectionObserverの作成に失敗しました"}},permission:{description:"権限ディレクティブ - 権限による要素表示制御",params:{value:"権限値または配列",mode:"権限モード: any または all"},errors:{empty_permission:"権限値を空にすることはできません",invalid_mode:'モードは"any"または"all"である必要があります'}},mask:{description:"入力マスクディレクティブ - 入力内容をフォーマット",params:{pattern:"マスクパターン",placeholder:"プレースホルダー文字",allowIncomplete:"不完全な入力を許可"},errors:{invalid_pattern:'"pattern"パラメータが無効です'}},hotkey:{description:"ホットキーディレクティブ - キーボードショートカットをバインド",params:{key:"キーボードショートカットの組み合わせ",handler:"ハンドラ関数",prevent:"デフォルトの動作を防止するかどうか"},errors:{invalid_key:"ホットキーの形式が無効です",conflict:"ホットキーが競合しています: {key}"}},clickoutside:{description:"クリック外部ディレクティブ - 要素外のクリックを検出",params:{handler:"外部クリック時のハンドラ関数",exclude:"除外する要素"},errors:{invalid_handler:"ハンドラは関数である必要があります"}},longpress:{description:"長押しディレクティブ - 長押しジェスチャーを検出",params:{duration:"押下時間(ミリ秒)",handler:"長押しハンドラ関数"},errors:{invalid_duration:"時間は正の数値である必要があります"}},draggable:{description:"ドラッグ可能ディレクティブ - 要素をドラッグ可能にする",params:{axis:"ドラッグ軸: x、y、または空",bounds:"ドラッグ境界",handle:"ドラッグハンドルセレクタ"},errors:{invalid_bounds:'"bounds"パラメータが無効です'}},intersect:{description:"インターセクトディレクティブ - 要素の可視性を観察",params:{threshold:"可視性しきい値",rootMargin:"ルートマージン",once:"1回だけトリガーするかどうか"},errors:{observer_failed:"IntersectionObserverの作成に失敗しました"}},loading:{description:"ローディングディレクティブ - ロード状態を表示",params:{value:"ロード中かどうか",text:"ロードテキスト",spinner:"ロードスピナー"}},skeleton:{description:"スケルトンディレクティブ - コンテンツプレースホルダーを表示",params:{value:"スケルトンを表示するかどうか",variant:"スケルトンバリアント",animation:"アニメーションタイプ"}},virtualList:{description:"仮想リストディレクティブ - 大量データのレンダリングを最適化",params:{itemSize:"アイテムの高さ",buffer:"バッファサイズ",estimatedSize:"推定サイズ"},errors:{invalid_itemSize:"itemSizeは正の数値である必要があります"}},infiniteScroll:{description:"無限スクロールディレクティブ - スクロールで更に読み込み",params:{handler:"更に読み込むハンドラ関数",distance:"トリガー距離",disabled:"無効かどうか"},errors:{invalid_handler:"ハンドラは関数である必要があります"}},watermark:{description:"透かしディレクティブ - 透かしオーバーレイを追加",params:{content:"透かしコンテンツ",fontSize:"フォントサイズ",color:"透かしの色",opacity:"不透明度"},errors:{empty_content:"透かしコンテンツを空にすることはできません"}},contextmenu:{description:"コンテキストメニューディレクティブ - カスタム右クリックメニュー",params:{items:"メニューアイテムリスト",handler:"メニューアイテムクリックハンドラ"},errors:{empty_items:"メニューアイテムリストを空にすることはできません"}},fullscreen:{description:"フルスクリーンディレクティブ - 要素をフルスクリーンに切り替え",params:{value:"フルスクリーンかどうか",onEnter:"フルスクリーン进入コールバック",onExit:"フルスクリーン終了コールバック"},errors:{not_supported:"このブラウザではフルスクリーンAPIがサポートされていません"}},imagePreview:{description:"画像プレビューディレクティブ - クリックで画像をプレビュー",params:{src:"画像ソースURL",list:"画像リスト",initialIndex:"初期インデックス"},errors:{invalid_src:'"src"パラメータが無効です'}},tooltip:{description:"ツールチップディレクティブ - ホバーツールチップを表示",params:{content:"ツールチップコンテンツ",placement:"表示位置",trigger:"トリガー方法"},errors:{empty_content:"ツールチップコンテンツを空にすることはできません"}},lottie:{description:"Lottieアニメーションディレクティブ - Lottieアニメーションを再生",params:{path:"アニメーションファイルパス",animationData:"アニメーションデータ",loop:"ループするかどうか",autoplay:"自動再生するかどうか"},errors:{invalid_source:"pathまたはanimationDataを指定してください",load_failed:"Lottieアニメーションの読み込みに失敗しました"}},swipe:{description:"スワイプジェスチャーディレクティブ - スワイプ方向を検出",params:{threshold:"スワイプしきい値",velocity:"速度しきい値",onSwipe:"スワイプコールバック"},errors:{invalid_threshold:"しきい値は正の数値である必要があります"}},touch:{description:"タッチジェスチャーディレクティブ - 統一タッチイベント処理",params:{onStart:"タッチ開始コールバック",onMove:"タッチ移動コールバック",onEnd:"タッチ終了コールバック"}},pan:{description:"パンジェスチャーディレクティブ - パン操作を検出",params:{threshold:"トリガーしきい値",direction:"パン方向: all、horizontal、vertical"}},pinch:{description:"ピンチジェスチャーディレクティブ - ズーム操作を検出",params:{threshold:"ズームしきい値",onPinch:"ズームコールバック"}},rotateGesture:{description:"回転ジェスチャーディレクティブ - 回転操作を検出",params:{threshold:"回転角度しきい値",onRotate:"回転コールバック"}},parallax:{description:"パララックスディレクティブ - パララックススクロール効果を作成",params:{speed:"パララックス速度",direction:"パララックス方向"}},typewriter:{description:"タイプライターディレクティブ - タイプライターテキストアニメーション",params:{text:"表示するテキスト",speed:"タイピング速度",delay:"開始遅延"},errors:{empty_text:"テキストコンテンツを空にすることはできません"}},countdown:{description:"カウントダウンディレクティブ - カウントダウンタイマーを表示",params:{time:"カウントダウン時間(ミリ秒)",format:"時間形式",onFinish:"終了コールバック"},errors:{invalid_time:"時間は正の数値である必要があります"}},counter:{description:"カウンターディレクティブ - 数字アニメーション",params:{from:"開始値",to:"終了値",duration:"アニメーション時間",decimals:"小数点以下の桁数"},errors:{invalid_range:"fromとtoは数値である必要があります"}},progress:{description:"プログレスディレクティブ - プログレスバーを表示",params:{value:"プログレス値(0-100)",showText:"テキストを表示するかどうか",strokeWidth:"ストローク幅"},errors:{invalid_value:"値は0から100の間である必要があります"}},emoji:{description:"絵文字ピッカーディレクティブ - 絵文字セレクター",params:{onSelect:"選択コールバック",exclude:"除外する絵文字カテゴリ"}},money:{description:"金額入力ディレクティブ - 通貨金額をフォーマット",params:{currency:"通貨記号",precision:"小数点以下の桁数",thousands:"千単位の区切り文字"}},number:{description:"数値入力ディレクティブ - 数値入力を制限",params:{min:"最小値",max:"最大値",precision:"小数点以下の桁数"},errors:{invalid_range:"minはmaxより小さい必要があります"}},truncate:{description:"トランケートディレクティブ - テキストを切り捨て",params:{length:"最大長",omission:"省略文字列"},errors:{invalid_length:"長さは正の整数である必要があります"}},ellipsis:{description:"エリプシスディレクティブ - CSSテキストオーバーフローの省略",params:{lines:"最大行数"}},highlight:{description:"ハイライトディレクティブ - テキストコンテンツをハイライト",params:{keyword:"ハイライトキーワード",color:"ハイライト色",className:"CSSクラス名"},errors:{empty_keyword:"キーワードを空にすることはできません"}},sanitize:{description:"サニタイズディレクティブ - HTMLコンテンツをサニタイズ",params:{allowedTags:"許可するタグ",allowedAttrs:"許可する属性"}},focus:{description:"フォーカスディレクティブ - 要素を自動フォーカス",params:{value:"フォーカスするかどうか",preventScroll:"スクロールを防止するかどうか"}},visible:{description:"可視性ディレクティブ - 要素の表示を制御",params:{value:"可視かどうか"}},blur:{description:"ブラーディレクティブ - 要素コンテンツをぼかす",params:{value:"ぼかし量",transition:"トランジション効果"}},hover:{description:"ホバーディレクティブ - マウスホバーを検出",params:{onEnter:"进入コールバック",onLeave:"離脱コールバック"}},fade:{description:"フェードディレクティブ - フェードイン/アウト効果",params:{duration:"アニメーション時間",delay:"遅延時間"}},clickWave:{description:"クリック波紋ディレクティブ - クリック波紋効果",params:{color:"波紋の色",duration:"アニメーション時間"}},clickDelay:{description:"クリック遅延ディレクティブ - 連続クリックを防止",params:{delay:"遅延時間"},errors:{invalid_delay:"遅延は正の数値である必要があります"}},scroll:{description:"スクロールディレクティブ - スクロール動作を制御",params:{behavior:"スクロール動作",smooth:"スムーズスクロールかどうか"}},sticky:{description:"スティッキーディレクティブ - スティッキー配置",params:{offsetTop:"上オフセット",offsetBottom:"下オフセット"}},print:{description:"印刷ディレクティブ - 要素コンテンツを印刷",params:{title:"印刷タイトル",onBefore:"印刷前コールバック",onAfter:"印刷後コールバック"}},export_:{description:"エクスポートディレクティブ - 要素コンテンツをエクスポート",params:{type:"エクスポートタイプ: image、pdf",filename:"ファイル名",quality:"品質"},errors:{unsupported_type:"サポートされていないエクスポートタイプ"}},pullRefresh:{description:"プル更新ディレクティブ - プルツーリフレッシュ機能",params:{onRefresh:"更新コールバック",distance:"トリガー距離"},errors:{invalid_handler:"onRefreshは関数である必要があります"}},resize:{description:"リサイズディレクティブ - 要素サイズの変化を観察",params:{handler:"サイズ変更コールバック",debounce:"デバウンス時間"},errors:{observer_failed:"ResizeObserverの作成に失敗しました"}},mutation:{description:"ミューテーションディレクティブ - DOMの変化を観察",params:{handler:"ミューテーションコールバック",options:"オブザーバーオプション"},errors:{observer_failed:"MutationObserverの作成に失敗しました"}},ripple:{description:"リップルディレクティブ - Material Designリップル効果",params:{color:"リップルの色",duration:"アニメーション時間"}},uppercase:{description:"大文字ディレクティブ - 大文字に変換"},lowercase:{description:"小文字ディレクティブ - 小文字に変換"},capitalcase:{description:"先頭大文字ディレクティブ - 先頭を大文字に"},trim:{description:"トリムディレクティブ - 空白をトリム"}},errors:{invalid_param:'パラメータ"{param}"が無効です',missing_required:'必須パラメータ"{param}"が不足しています',type_error:'パラメータ"{param}"の型エラー: {expected}を期待しましたが、{actual}です',value_out_of_range:'パラメータ"{param}"が範囲外です。{min}から{max}の間である必要があります',not_supported:"{feature}は現在の環境でサポートされていません",ssr_not_supported:"ディレクティブ{directive}はSSRをサポートしていません"},warnings:{deprecated:"{feature}は非推奨です。{alternative}を使用してください",experimental:"{feature}は実験的機能で、将来のバージョンで変更される可能性があります",performance:"{feature}はパフォーマンスに影響する可能性があります。慎重に使用してください",fallback:"{feature}が失敗しました。{alternative}にフォールバックします"},help:{installation:"npm install directix でインストール",usage:"VueアプリにDirectixプラグインを登録してください",contribution:"貢献方法はCONTRIBUTING.mdを参照してください"}},allDirectives={blur:vBlur,"click-outside":vClickOutside,"click-delay":vClickDelay,"click-wave":vClickWave,"context-menu":vContextMenu,copy:vCopy,debounce:vDebounce,throttle:vThrottle,focus:vFocus,hotkey:vHotkey,lazy:vLazy,intersect:vIntersect,visible:vVisible,loading:vLoading,scroll:vScroll,"infinite-scroll":vInfiniteScroll,sticky:vSticky,"long-press":vLongPress,hover:vHover,ripple:vRipple,mask:vMask,permission:vPermission,sanitize:vSanitize,resize:vResize,mutation:vMutation,truncate:vTruncate,ellipsis:vEllipsis,uppercase:vUppercase,lowercase:vLowercase,capitalcase:vCapitalcase,number:vNumber,money:vMoney,trim:vTrim,tooltip:vTooltip,draggable:vDraggable,touch:vTouch,swipe:vSwipe,"image-preview":vImagePreview,countdown:vCountdown,watermark:vWatermark,print:vPrint,"virtual-list":vVirtualList,"pull-refresh":vPullRefresh,counter:vCounter,emoji:vEmoji,export:vExport,fade:vFade,fullscreen:vFullscreen,highlight:vHighlight,lottie:vLottie,pan:vPan,parallax:vParallax,pinch:vPinch,progress:vProgress,"rotate-gesture":vRotateGesture,skeleton:vSkeleton,typewriter:vTypewriter},install=(e,t={})=>{var n,r,o,i,s,a,l;let c=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))c=2;else if((null==e?void 0:e.config)&&(null==(r=null==e?void 0:e.version)?void 0:r.startsWith("3")))c=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(o=e.version)?void 0:o.startsWith("2")))c=2;else if("undefined"!=typeof window){const e=window;(null==(s=null==(i=e.Vue)?void 0:i.version)?void 0:s.startsWith("2"))?c=2:(null==(l=null==(a=e.Vue)?void 0:a.version)?void 0:l.startsWith("3"))&&(c=3)}c&&setVueVersion(c);const{directives:u,all:d=!1}=t;d||!u?Object.entries(allDirectives).forEach(([t,n])=>{e.directive(t,n)}):u.forEach(t=>{const n=allDirectives[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})},Directix={install:install};exports.BREAKING_CHANGES_REGISTRY=BREAKING_CHANGES_REGISTRY,exports.BROWSER_TARGETS=BROWSER_TARGETS,exports.ComputedCache=ComputedCache,exports.DEFAULT_AUDIT_LOG_CONFIG=DEFAULT_AUDIT_LOG_CONFIG,exports.DEFAULT_BENCHMARK_CONFIG=DEFAULT_BENCHMARK_CONFIG,exports.DEFAULT_BREAKING_CHANGES_CONFIG=DEFAULT_BREAKING_CHANGES_CONFIG,exports.DEFAULT_CONFIG_CENTER_CONFIG=DEFAULT_CONFIG_CENTER_CONFIG,exports.DEFAULT_EDGE_CASE_CONFIG=DEFAULT_EDGE_CASE_CONFIG,exports.DEFAULT_ENTERPRISE_PERMISSION_CONFIG=DEFAULT_ENTERPRISE_PERMISSION_CONFIG,exports.DEFAULT_FIRST_SCREEN_CONFIG=DEFAULT_FIRST_SCREEN_CONFIG,exports.DEFAULT_MONITORING_CONFIG=DEFAULT_MONITORING_CONFIG,exports.DEFAULT_PERFORMANCE_CONFIG=DEFAULT_PERFORMANCE_CONFIG,exports.DOMQueryCache=DOMQueryCache,exports.Directix=Directix,exports.EnterprisePermissionManager=EnterprisePermissionManager,exports.EventBatchProcessor=EventBatchProcessor,exports.FEATURE_MATRIX=FEATURE_MATRIX,exports.LazyInitializer=LazyInitializer,exports.MOBILE_DEVICES=MOBILE_DEVICES,exports.MemoryCleanupManager=MemoryCleanupManager,exports.ObjectPool=ObjectPool,exports.PluginManager=PluginManager,exports.PluginRegistry=PluginRegistry,exports.SafeContentHandler=SafeContentHandler,exports.SecurityAudit=SecurityAudit,exports.WeakCache=WeakCache,exports.acknowledgeAlert=acknowledgeAlert,exports.addCleanupVue2=addCleanup$1,exports.addCleanupVue3=addCleanup,exports.addHealthCheck=addHealthCheck,exports.addNonPassiveListener=addNonPassiveListener,exports.addPassiveListener=addPassiveListener,exports.announce=announce,exports.applyAriaAttributes=applyAriaAttributes,exports.assert=assert,exports.assertPositive=assertPositive,exports.assertRange=assertRange,exports.assertType=assertType,exports.audit=audit,exports.benchmark=benchmark,exports.calculateStats=calculateStats,exports.calculateTTI=calculateTTI,exports.calculateTime=calculateTime,exports.cancelIdleCallback=cancelIdleCallback,exports.capitalizeText=capitalizeText,exports.capitalizeWord=capitalizeWord,exports.checkAPIUsage=checkAPIUsage,exports.checkDependency=checkDependency,exports.cleanupFirstScreenOptimizer=cleanupFirstScreenOptimizer,exports.clearAlerts=clearAlerts,exports.clearAnnouncer=clearAnnouncer,exports.clearAriaAttributes=clearAriaAttributes,exports.clearAuditLogs=clearAuditLogs,exports.clearBenchmarkResults=clearBenchmarkResults,exports.clearDevtoolsState=clearDevtoolsState,exports.clearEdgeCaseWarnings=clearEdgeCaseWarnings,exports.clearPerformanceMetrics=clearPerformanceMetrics,exports.clearWarnedChanges=clearWarnedChanges,exports.clearWarnedFeatures=clearWarnedFeatures,exports.compareBenchmarks=compareBenchmarks,exports.compareSnapshots=compareSnapshots,exports.compareVersions=compareVersions,exports.computedWithCleanup=computedWithCleanup,exports.configureAuditLog=configureAuditLog,exports.configureBenchmark=configureBenchmark,exports.configureBreakingChanges=configureBreakingChanges,exports.configureCompatibility=configureCompatibility,exports.configureConfigCenter=configureConfigCenter,exports.configureEdgeCase=configureEdgeCase,exports.configureEnterprisePermission=configureEnterprisePermission,exports.configureFirstScreen=configureFirstScreen,exports.configureMonitoring=configureMonitoring,exports.configurePerformance=configurePerformance,exports.configurePerformanceOptimization=configurePerformanceOptimization,exports.configurePermission=configurePermission,exports.createAuditLogMiddleware=createAuditLogMiddleware,exports.createCapitalizer=createCapitalizer,exports.createDebouncedResizeHandler=createDebouncedResizeHandler,exports.createDelayedClick=createDelayedClick,exports.createDeprecationWarning=createDeprecationWarning,exports.createDirectiveBenchmark=createDirectiveBenchmark,exports.createDirectiveTemplate=createDirectiveTemplate,exports.createEventDirective=createEventDirective,exports.createI18n=createI18n,exports.createLazyLoader=createLazyLoader,exports.createLowercaser=createLowercaser,exports.createMoneyFormatter=createMoneyFormatter,exports.createNumberFormatter=createNumberFormatter,exports.createPerformanceBudget=createPerformanceBudget,exports.createPermissionCheck=createPermissionCheck,exports.createPermissionChecker=createPermissionChecker,exports.createSafeContentHandler=createSafeContentHandler,exports.createSafeDirectiveWrapper=createSafeDirectiveWrapper,exports.createStyleDirective=createStyleDirective,exports.createTrimmer=createTrimmer,exports.createUppercaser=createUppercaser,exports.createVue2Directive=createVue2Directive,exports.createVue3Directive=createVue3Directive,exports.createWatermarkUrl=createWatermarkUrl,exports.debounceFn=debounceFn,exports.debug=debug,exports.deepClone=deepClone,exports.deepMerge=deepMerge,exports.deferNonCriticalDirective=deferNonCriticalDirective,exports.deferTask=deferTask,exports.defineDirective=defineDirective,exports.defineDirectiveGroup=defineDirectiveGroup,exports.definePlugin=definePlugin,exports.deleteConfig=deleteConfig,exports.detectBreakingChangesInCode=detectBreakingChangesInCode,exports.detectLegacyUsage=detectLegacyUsage,exports.detectLocaleInfo=detectLocaleInfo,exports.detectResizeLoop=detectResizeLoop,exports.detectScrollJank=detectScrollJank,exports.directiveError=directiveError,exports.directiveWarn=directiveWarn,exports.disableDevtools=disableDevtools,exports.disablePerformance=disablePerformance,exports.enUS=enUS,exports.enableDevtools=enableDevtools,exports.enablePerformance=enablePerformance,exports.endMeasure=endMeasure,exports.ensureTeleportTarget=ensureTeleportTarget,exports.error=error,exports.escapeHtml=escapeHtml,exports.estimateMigrationEffort=estimateMigrationEffort,exports.executeDeferredTasks=executeDeferredTasks,exports.exportAuditLogs=exportAuditLogs,exports.exportBenchmarkResults=exportBenchmarkResults,exports.exportConfig=exportConfig,exports.exportPerformanceData=exportPerformanceData,exports.exportPrometheusMetrics=exportPrometheusMetrics,exports.extractCriticalCSS=extractCriticalCSS,exports.formatCurrencyLocale=formatCurrencyLocale,exports.formatDateLocale=formatDateLocale,exports.formatMoney=formatMoney,exports.formatNumber=formatNumber,exports.formatNumberLocale=formatNumberLocale,exports.formatTime=formatTime,exports.generateAriaId=generateAriaId,exports.generateBenchmarkReport=generateBenchmarkReport,exports.generateBreakingChangesReport=generateBreakingChangesReport,exports.generateBrowserslistConfig=generateBrowserslistConfig,exports.generateCompatibilityReport=generateCompatibilityReport,exports.generateId=generateId,exports.generateMigrationReport=generateMigrationReport,exports.get=get,exports.getAlerts=getAlerts,exports.getAllBenchmarkResults=getAllBenchmarkResults,exports.getAllBreakingChanges=getAllBreakingChanges,exports.getAllConfig=getAllConfig,exports.getAuditLogById=getAuditLogById,exports.getAuditLogConfig=getAuditLogConfig,exports.getAuditLogStats=getAuditLogStats,exports.getAuditLogs=getAuditLogs,exports.getAutoAriaConfig=getAutoAriaConfig,exports.getBenchmarkConfig=getBenchmarkConfig,exports.getBenchmarkResult=getBenchmarkResult,exports.getBreakingChangesByCategory=getBreakingChangesByCategory,exports.getBreakingChangesBySeverity=getBreakingChangesBySeverity,exports.getBreakingChangesConfig=getBreakingChangesConfig,exports.getBreakingChangesForAPI=getBreakingChangesForAPI,exports.getBreakingChangesForVersion=getBreakingChangesForVersion,exports.getBrowserCompatibilityReport=getBrowserCompatibilityReport,exports.getBrowserInfo=getBrowserInfo,exports.getBrowsersSupportingFeature=getBrowsersSupportingFeature,exports.getCSPNonce=getCSPNonce,exports.getCompatibilityConfig=getCompatibilityConfig,exports.getCompatibilityMatrix=getCompatibilityMatrix,exports.getConfig=getConfig,exports.getConfigCenterConfig=getConfigCenterConfig,exports.getConfigSnapshots=getConfigSnapshots,exports.getConfigStats=getConfigStats,exports.getCounterValue=getCounterValue,exports.getDOMQueryCache=getDOMQueryCache,exports.getDateFormat=getDateFormat,exports.getDevicePixelRatio=getDevicePixelRatio,exports.getDevtoolsState=getDevtoolsState,exports.getDirectiveMetrics=getDirectiveMetrics,exports.getEdgeCaseConfig=getEdgeCaseConfig,exports.getEdgeCaseWarnings=getEdgeCaseWarnings,exports.getElementWithFallback=getElementWithFallback,exports.getEventBatchProcessor=getEventBatchProcessor,exports.getFeatureSupport=getFeatureSupport,exports.getFirstScreenConfig=getFirstScreenConfig,exports.getFirstScreenMetrics=getFirstScreenMetrics,exports.getGaugeValue=getGaugeValue,exports.getHealthStatus=getHealthStatus,exports.getHistogramStats=getHistogramStats,exports.getLocale=getLocale,exports.getLocaleDisplayName=getLocaleDisplayName,exports.getMemoryCleanupManager=getMemoryCleanupManager,exports.getMemoryStats=getMemoryStats,exports.getMetrics=getMetrics,exports.getMigrationRules=getMigrationRules,exports.getMigrationTimeline=getMigrationTimeline,exports.getMissingPolyfills=getMissingPolyfills,exports.getMonitoringConfig=getMonitoringConfig,exports.getMonitoringStats=getMonitoringStats,exports.getMostFrequentDirectives=getMostFrequentDirectives,exports.getNumberFormat=getNumberFormat,exports.getObserverCount=getObserverCount,exports.getPerformanceMetrics=getPerformanceMetrics,exports.getPerformanceOptimizationConfig=getPerformanceOptimizationConfig,exports.getPerformanceReport=getPerformanceReport,exports.getPermissionConfig=getPermissionConfig,exports.getPermissionManager=getPermissionManager,exports.getPluginManager=getPluginManager,exports.getPluginRegistry=getPluginRegistry,exports.getPolyfillStatus=getPolyfillStatus,exports.getSlowestDirectives=getSlowestDirectives,exports.getSupportedRegions=getSupportedRegions,exports.getTimezoneInfo=getTimezoneInfo,exports.getUnsupportedFeatures=getUnsupportedFeatures,exports.getVueVersion=getVueVersion,exports.getWarnedChanges=getWarnedChanges,exports.handleSSRUnsupported=handleSSRUnsupported,exports.handleTouchConflict=handleTouchConflict,exports.hasPermission=hasPermission$2,exports.hasPermissionSync=hasPermissionSync,exports.importConfig=importConfig,exports.incrementCounter=incrementCounter,exports.info=info,exports.initConfigCenter=initConfigCenter,exports.initFirstScreenOptimizer=initFirstScreenOptimizer,exports.injectScriptCSP=injectScriptCSP,exports.injectStylesCSP=injectStylesCSP,exports.inlineCriticalCSS=inlineCriticalCSS,exports.isAPIAffected=isAPIAffected,exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isBrowser=isBrowser,exports.isBrowserSupported=isBrowserSupported,exports.isDOMReady=isDOMReady,exports.isDevtoolsAvailable=isDevtoolsAvailable,exports.isEmpty=isEmpty,exports.isFeatureSupported=isFeatureSupported,exports.isFullySupported=isFullySupported,exports.isFunction=isFunction,exports.isInViewport=isInViewport,exports.isMobileDevice=isMobileDevice,exports.isNumber=isNumber,exports.isObject=isObject,exports.isPageLoaded=isPageLoaded,exports.isPerformanceEnabled=isPerformanceEnabled,exports.isPolyfillLoaded=isPolyfillLoaded,exports.isPromise=isPromise,exports.isSSR=isSSR$2,exports.isSSREnvironment=isSSR$1,exports.isString=isString,exports.isTouchDevice=isTouchDevice,exports.isUnsupportedBrowser=isUnsupportedBrowser,exports.isUrlSafe=isUrlSafe,exports.isVersionAffected=isVersionAffected,exports.isVue2=isVue2,exports.isVue27=isVue27,exports.isVue3=isVue3,exports.jaJP=jaJP,exports.logAudit=logAudit,exports.logDirectiveOperation=logDirectiveOperation,exports.logPerformanceIssue=logPerformanceIssue,exports.logPermissionCheck=logPermissionCheck,exports.logSecurityViolation=logSecurityViolation,exports.lowercaseText=lowercaseText,exports.markPolyfillLoaded=markPolyfillLoaded,exports.measurePerformance=measurePerformance,exports.measurePerformanceAsync=measurePerformanceAsync,exports.meetsMinimumRequirements=meetsMinimumRequirements,exports.migrate=migrate,exports.needsMigration=needsMigration,exports.onDOMReady=onDOMReady,exports.onPageLoad=onPageLoad,exports.parseLocale=parseLocale,exports.parseMoney=parseMoney,exports.parseNumber=parseNumber,exports.parseTargetTime=parseTargetTime,exports.parseTime=parseTime,exports.prefetchModule=prefetchModule,exports.prefetchVisibleElements=prefetchVisibleElements,exports.preloadModule=preloadModule,exports.quickPrint=quickPrint,exports.recordHistogram=recordHistogram,exports.registerPolyfill=registerPolyfill,exports.removeHealthCheck=removeHealthCheck,exports.requestIdleCallback=requestIdleCallback,exports.resetBrowserInfo=resetBrowserInfo,exports.resetConfigCenter=resetConfigCenter,exports.resetMonitoring=resetMonitoring,exports.resetPerformanceOptimizer=resetPerformanceOptimizer,exports.resetPluginManager=resetPluginManager,exports.resetPluginRegistry=resetPluginRegistry,exports.resetVueVersion=resetVueVersion,exports.resolveAlert=resolveAlert,exports.rollbackConfig=rollbackConfig,exports.runBenchmark=runBenchmark,exports.runBenchmarkSuite=runBenchmarkSuite,exports.runMemoryCleanup=runMemoryCleanup,exports.safeQueryElement=safeQueryElement,exports.sanitizeHtml=sanitizeHtml,exports.sanitizeUrl=sanitizeUrl,exports.set=set,exports.setConfig=setConfig,exports.setGauge=setGauge,exports.setLocale=setLocale,exports.setVueVersion=setVueVersion,exports.setWarningDevMode=setWarningDevMode,exports.setWarningI18n=setWarningI18n,exports.setWarningLevel=setWarningLevel,exports.setupCleanupOnUnload=setupCleanupOnUnload,exports.startMeasure=startMeasure,exports.stopCleanupTimer=stopCleanupTimer,exports.stripHtml=stripHtml,exports.supportsClipboard=supportsClipboard,exports.supportsIntersectionObserver=supportsIntersectionObserver,exports.supportsMutationObserver=supportsMutationObserver,exports.supportsPassive=supportsPassive,exports.supportsResizeObserver=supportsResizeObserver,exports.syncConfigToRemote=syncConfigToRemote,exports.t=t,exports.takePerformanceSnapshot=takePerformanceSnapshot,exports.teleportContent=teleportContent,exports.throttleFn=throttleFn,exports.timeOperation=timeOperation,exports.trackDirective=trackDirective,exports.trackObserver=trackObserver,exports.trackPlugin=trackPlugin,exports.triggerAlert=triggerAlert,exports.triggerHaptic=triggerHaptic,exports.trimText=trimText,exports.truncateText=truncateText,exports.unescapeHtml=unescapeHtml,exports.untrackDirective=untrackDirective,exports.untrackObserver=untrackObserver,exports.untrackPlugin=untrackPlugin,exports.uppercaseText=uppercaseText,exports.useBlur=useBlur,exports.useCapitalcase=useCapitalcase,exports.useClickDelay=useClickDelay,exports.useClickOutside=useClickOutside,exports.useClickWave=useClickWave,exports.useContextMenu=useContextMenu,exports.useCopy=useCopy,exports.useCountdown=useCountdown,exports.useCounter=useCounter,exports.useDebounce=useDebounce,exports.useDirectiveInstance=useDirectiveInstance,exports.useDraggable=useDraggable,exports.useEllipsis=useEllipsis,exports.useEmoji=useEmoji,exports.useEnhancedTouch=useEnhancedTouch,exports.useExport=useExport,exports.useFade=useFade,exports.useFocus=useFocus,exports.useFocusTrap=useFocusTrap,exports.useFullscreen=useFullscreen,exports.useHighlight=useHighlight,exports.useHotkey=useHotkey,exports.useHover=useHover,exports.useImagePreview=useImagePreview,exports.useInfiniteScroll=useInfiniteScroll,exports.useIntersect=useIntersect,exports.useKeyboardNavigation=useKeyboardNavigation,exports.useLazy=useLazy,exports.useLazyOptimized=useLazyOptimized,exports.useLoading=useLoading,exports.useLongPress=useLongPress,exports.useLottie=useLottie,exports.useLowercase=useLowercase,exports.useMask=useMask,exports.useMoney=useMoney,exports.useMutation=useMutation,exports.useNumber=useNumber,exports.usePWA=usePWA,exports.usePan=usePan,exports.useParallax=useParallax,exports.usePermission=usePermission,exports.usePinch=usePinch,exports.usePrint=usePrint,exports.useProgress=useProgress,exports.usePullRefresh=usePullRefresh,exports.useResize=useResize,exports.useRipple=useRipple,exports.useRotateGesture=useRotateGesture,exports.useSanitize=useSanitize,exports.useScroll=useScroll,exports.useSkeleton=useSkeleton,exports.useSticky=useSticky,exports.useSuspenseDirective=useSuspenseDirective,exports.useSwipe=useSwipe,exports.useThrottle=useThrottle,exports.useTooltip=useTooltip,exports.useTouch=useTouch,exports.useTrim=useTrim,exports.useTruncate=useTruncate,exports.useTypewriter=useTypewriter,exports.useUppercase=useUppercase,exports.useVirtualList=useVirtualList,exports.useVisible=useVisible,exports.useWatermark=useWatermark,exports.vBlur=vBlur,exports.vCapitalcase=vCapitalcase,exports.vClickDelay=vClickDelay,exports.vClickOutside=vClickOutside,exports.vClickWave=vClickWave,exports.vContextMenu=vContextMenu,exports.vCopy=vCopy,exports.vCountdown=vCountdown,exports.vCounter=vCounter,exports.vDebounce=vDebounce,exports.vDraggable=vDraggable,exports.vEllipsis=vEllipsis,exports.vEmoji=vEmoji,exports.vExport=vExport,exports.vFade=vFade,exports.vFocus=vFocus,exports.vFullscreen=vFullscreen,exports.vHighlight=vHighlight,exports.vHotkey=vHotkey,exports.vHover=vHover,exports.vImagePreview=vImagePreview,exports.vInfiniteScroll=vInfiniteScroll,exports.vIntersect=vIntersect,exports.vLazy=vLazy,exports.vLoading=vLoading,exports.vLongPress=vLongPress,exports.vLottie=vLottie,exports.vLowercase=vLowercase,exports.vMask=vMask,exports.vMoney=vMoney,exports.vMutation=vMutation,exports.vNumber=vNumber,exports.vPan=vPan,exports.vParallax=vParallax,exports.vPermission=vPermission,exports.vPinch=vPinch,exports.vPrint=vPrint,exports.vProgress=vProgress,exports.vPullRefresh=vPullRefresh,exports.vResize=vResize,exports.vRipple=vRipple,exports.vRotateGesture=vRotateGesture,exports.vSanitize=vSanitize,exports.vScroll=vScroll,exports.vSkeleton=vSkeleton,exports.vSticky=vSticky,exports.vSwipe=vSwipe,exports.vThrottle=vThrottle,exports.vTooltip=vTooltip,exports.vTouch=vTouch,exports.vTrim=vTrim,exports.vTruncate=vTruncate,exports.vTypewriter=vTypewriter,exports.vUppercase=vUppercase,exports.vVirtualList=vVirtualList,exports.vVisible=vVisible,exports.vWatermark=vWatermark,exports.validateBinding=validateBinding,exports.waitForDOMReady=waitForDOMReady,exports.warn=warn,exports.warnBreakingChange=warnBreakingChange,exports.warnDeprecated=warnDeprecated,exports.warnInvalidParam=warnInvalidParam,exports.warnMissingParam=warnMissingParam,exports.warnNotSupported=warnNotSupported,exports.warnSSRNotSupported=warnSSRNotSupported,exports.warnUnsupportedFeatureOnce=warnUnsupportedFeatureOnce,exports.warnUnsupportedFeatures=warnUnsupportedFeatures,exports.watchConfig=watchConfig,exports.watchEffectBinding=watchEffectBinding,exports.withAuditLog=withAuditLog,exports.withErrorRecovery=withErrorRecovery,exports.withPerformanceMonitoring=withPerformanceMonitoring,exports.wouldTextTruncate=wouldTextTruncate,exports.zhCN=zhCN,Object.defineProperty(exports,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 r in e)__hasOwnProp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))t.indexOf(r)<0&&__propIsEnum.call(e,r)&&(n[r]=e[r]);return n},__publicField=(e,t,n)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),__async=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{a(n.next(e))}catch(e){o(e)}},s=e=>{try{a(n.throw(e))}catch(e){o(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())});(function(exports,vue){"use strict";var _a;function createVue2Directive(e){return{bind(e,t,n){const r={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=r},inserted(t,n,r){e.mounted&&e.mounted(t,normalizeBinding$2(n),r)},update(t,n,r,o){const i=t.__directix_state__;e.updated&&e.updated(t,normalizeBinding$2(n),r,normalizeBinding$2(__spreadProps(__spreadValues({},n),{value:n.oldValue})),o),i&&(i.value=n.value,i.vnode=r)},componentUpdated(e,t,n,r){},unbind(t,n,r){e.unmounted&&e.unmounted(t,normalizeBinding$2(n),r);const o=t.__directix_state__;(null==o?void 0:o.cleanup)&&o.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function normalizeBinding$2(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 addCleanup$1(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)}function createVue3Directive(e){return{created(e,t,n){const r=vue.shallowReactive({value:null!=t.value?vue.markRaw(t.value):t.value,vnode:n,cleanup:[]});e.__directix_state__=r},beforeMount(e,t,n){},mounted(t,n,r){e.mounted&&e.mounted(t,normalizeBinding$1(n),r)},beforeUpdate(e,t,n,r){},updated(t,n,r,o){const i=t.__directix_state__;e.updated&&e.updated(t,normalizeBinding$1(n),r,normalizeBinding$1(__spreadProps(__spreadValues({},n),{value:n.oldValue})),o),i&&(i.value=null!=n.value?vue.markRaw(n.value):n.value,i.vnode=r)},beforeUnmount(e,t,n){},unmounted(t,n,r){e.unmounted&&e.unmounted(t,normalizeBinding$1(n),r);const o=t.__directix_state__;(null==o?void 0:o.cleanup)&&o.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function normalizeBinding$1(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}function addCleanup(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)}const DEFAULT_AUDIT_LOG_CONFIG={enabled:!0,level:"info",maxEntries:1e4,persistToStorage:!1,storageKey:"__directix_audit_logs",consoleOutput:!1,consoleLevel:"warn",includeStackTrace:!0,sampleRate:1,filters:{excludeTypes:[],excludeLevels:[],minDuration:0},handlers:{},sensitiveFields:["password","token","secret","apiKey","authorization","credential"],maskSensitive:!0},LEVELS=["debug","info","warn","error","critical"];let _config$7=DEFAULT_AUDIT_LOG_CONFIG,_logs=[],_sessionId=null;function configureAuditLog(e){if(_config$7=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG),e),{filters:__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG.filters),e.filters),handlers:__spreadValues(__spreadValues({},DEFAULT_AUDIT_LOG_CONFIG.handlers),e.handlers)}),_config$7.persistToStorage&&"undefined"!=typeof localStorage)try{const e=localStorage.getItem(_config$7.storageKey);e&&(_logs=JSON.parse(e))}catch(e){}}function getAuditLogConfig(){return __spreadValues({},_config$7)}function generateId$1(){return`${Date.now()}-${Math.random().toString(36).slice(2,11)}`}function maskSensitiveData(e,t){const n={};for(const[r,o]of Object.entries(e)){const e=r.toLowerCase(),i=t.some(t=>e.includes(t.toLowerCase()));n[r]=i?"***MASKED***":"object"==typeof o&&null!==o?maskSensitiveData(o,t):o}return n}function shouldLog(e,t){var n,r;if(!_config$7.enabled)return!1;if(_config$7.sampleRate<1&&Math.random()>_config$7.sampleRate)return!1;const o=["debug","info","warn","error","critical"];return!(o.indexOf(e)<o.indexOf(_config$7.level))&&(!(null==(n=_config$7.filters.excludeTypes)?void 0:n.includes(t))&&!(null==(r=_config$7.filters.excludeLevels)?void 0:r.includes(e)))}function getSessionId(){return _sessionId||(_sessionId=`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`),_sessionId}function buildContext(e){var t;return __spreadValues({sessionId:getSessionId(),userAgent:"undefined"!=typeof navigator?navigator.userAgent:void 0,url:"undefined"!=typeof window?window.location.href:void 0,version:"undefined"!=typeof __DIRECTIX_VERSION__?__DIRECTIX_VERSION__:void 0,environment:"undefined"!=typeof process?null==(t=process.env)?void 0:t.NODE_ENV:void 0},e)}function getStackTrace(){if(!_config$7.includeStackTrace)return;const e=new Error("getStackTrace").stack;if(!e)return;return e.split("\n").filter(e=>!e.includes("audit-log")).join("\n")}function persistLogs(){if(_config$7.persistToStorage&&"undefined"!=typeof localStorage)try{localStorage.setItem(_config$7.storageKey,JSON.stringify(_logs))}catch(e){}}function logAudit(e,t,n,r={},o,i){var s,a,l,c,u,d;if(!shouldLog(e,t))return null;const p=_config$7.maskSensitive?maskSensitiveData(r,_config$7.sensitiveFields):r,m={id:generateId$1(),type:t,timestamp:Date.now(),level:e,message:n,details:p,context:buildContext(o),duration:i,stackTrace:"error"===e||"critical"===e?getStackTrace():void 0};if(_logs.push(m),_logs.length>_config$7.maxEntries&&(_logs=_logs.slice(-_config$7.maxEntries)),persistLogs(),_config$7.consoleOutput&&LEVELS.indexOf(e)>=LEVELS.indexOf(_config$7.consoleLevel)){console["critical"===e||"error"===e?"error":"warn"===e?"warn":"info"](`[Directix Audit] [${e.toUpperCase()}] [${t}] ${n}`,p)}return null==(a=(s=_config$7.handlers).onLog)||a.call(s,m),"error"===e&&(null==(c=(l=_config$7.handlers).onError)||c.call(l,m)),"critical"===e&&(null==(d=(u=_config$7.handlers).onCritical)||d.call(u,m)),m}const audit={debug:(e,t,n,r)=>logAudit("debug",e,t,n,r),info:(e,t,n,r)=>logAudit("info",e,t,n,r),warn:(e,t,n,r)=>logAudit("warn",e,t,n,r),error:(e,t,n,r)=>logAudit("error",e,t,n,r),critical:(e,t,n,r)=>logAudit("critical",e,t,n,r)};function logDirectiveOperation(e,t,n,r,o){logAudit(o&&o>100?"warn":"info",`directive.${e}`,`Directive ${t} ${e}`,__spreadValues({directive:t},n),__spreadValues({directive:t},r),o)}function logPermissionCheck(e,t,n,r){logAudit(t?"debug":"warn",t?"permission.grant":"permission.deny",`Permission ${e}: ${t?"granted":"denied"}`,{permission:e,granted:t,source:n},r)}function logSecurityViolation(e,t,n){logAudit("critical","security.violation",`Security violation: ${e}`,t,n)}function logPerformanceIssue(e,t,n,r){logAudit("warn","performance.slow",`Slow operation: ${e} took ${t}ms (threshold: ${n}ms)`,{operation:e,duration:t,threshold:n},r,t)}function getAuditLogs(e){let t=[..._logs];if(!e)return t;if(e.level){const n=Array.isArray(e.level)?e.level:[e.level];t=t.filter(e=>n.includes(e.level))}if(e.type){const n=Array.isArray(e.type)?e.type:[e.type];t=t.filter(e=>n.includes(e.type))}if(e.since&&(t=t.filter(t=>t.timestamp>=e.since)),e.until&&(t=t.filter(t=>t.timestamp<=e.until)),e.directive){const n=Array.isArray(e.directive)?e.directive:[e.directive];t=t.filter(e=>e.context.directive&&n.includes(e.context.directive))}if(e.component){const n=Array.isArray(e.component)?e.component:[e.component];t=t.filter(e=>e.context.component&&n.includes(e.context.component))}return e.offset&&(t=t.slice(e.offset)),e.limit&&(t=t.slice(0,e.limit)),t}function getAuditLogById(e){return _logs.find(t=>t.id===e)}function getAuditLogStats(){const e=Date.now(),t=e-36e5,n=e-864e5,r={debug:0,info:0,warn:0,error:0,critical:0},o={},i={};let s=0,a=0,l=0,c=0;for(const e of _logs){if(r[e.level]++,o[e.type]=(o[e.type]||0)+1,e.context.directive){const t=e.context.directive;i[t]=(i[t]||0)+1}e.duration&&(s+=e.duration,a++),"error"===e.level&&l++,"critical"===e.level&&c++}return{totalEntries:_logs.length,byLevel:r,byType:o,byDirective:i,avgDuration:a>0?s/a:0,errorRate:_logs.length>0?l/_logs.length:0,criticalCount:c,last24Hours:_logs.filter(e=>e.timestamp>=n).length,lastHour:_logs.filter(e=>e.timestamp>=t).length}}function clearAuditLogs(){_logs=[],_config$7.persistToStorage&&"undefined"!=typeof localStorage&&localStorage.removeItem(_config$7.storageKey)}function exportAuditLogs(e={format:"json",includeDetails:!0,includeContext:!0,dateFormat:"iso"}){const{format:t,includeDetails:n,includeContext:r,dateFormat:o}=e,i=e=>{switch(o){case"unix":return String(e);case"locale":return new Date(e).toLocaleString();default:return new Date(e).toISOString()}};switch(t){case"csv":{const e=["id","timestamp","level","type","message"];n&&e.push("details"),r&&e.push("context");const t=_logs.map(e=>{const t=[e.id,i(e.timestamp),e.level,e.type,e.message];return n&&t.push(JSON.stringify(e.details)),r&&t.push(JSON.stringify(e.context)),t.join(",")});return[e.join(","),...t].join("\n")}case"markdown":{let e=`# Directix Audit Logs\n\nGenerated: ${(new Date).toISOString()}\n\n`;e+=`## Summary\n\n- Total entries: ${_logs.length}\n\n`,e+="## Logs\n\n";for(const t of _logs)e+=`### ${t.level.toUpperCase()}: ${t.message}\n\n`,e+=`- **Type**: ${t.type}\n`,e+=`- **Time**: ${i(t.timestamp)}\n`,n&&Object.keys(t.details).length>0&&(e+=`- **Details**: \`\`\`json\n${JSON.stringify(t.details,null,2)}\n\`\`\`\n`),e+="\n";return e}case"html":{let e=`<!DOCTYPE html>\n<html>\n<head>\n\t<title>Directix Audit Logs</title>\n\t<style>\n\t\tbody { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 20px; }\n\t\t.log { border: 1px solid #ddd; margin: 10px 0; padding: 10px; border-radius: 4px; }\n\t\t.log.debug { background: #f5f5f5; }\n\t\t.log.info { background: #e3f2fd; }\n\t\t.log.warn { background: #fff3e0; }\n\t\t.log.error { background: #ffebee; }\n\t\t.log.critical { background: #ffcdd2; border: 2px solid #f44336; }\n\t\t.header { display: flex; justify-content: space-between; margin-bottom: 5px; }\n\t\t.level { font-weight: bold; text-transform: uppercase; }\n\t\t.timestamp { color: #666; }\n\t\t.type { color: #888; font-size: 0.9em; }\n\t\tpre { margin: 5px 0; font-size: 0.85em; background: #f8f8f8; padding: 5px; border-radius: 3px; }\n\t</style>\n</head>\n<body>\n\t<h1>Directix Audit Logs</h1>\n\t<p>Generated: ${(new Date).toISOString()}</p>\n\t<p>Total entries: ${_logs.length}</p>\n`;for(const t of _logs)e+=`\n\t<div class="log ${t.level}">\n\t\t<div class="header">\n\t\t\t<span class="level">${t.level}</span>\n\t\t\t<span class="timestamp">${i(t.timestamp)}</span>\n\t\t</div>\n\t\t<p><strong>${t.message}</strong> <span class="type">[${t.type}]</span></p>\n`,n&&Object.keys(t.details).length>0&&(e+=`\t\t<pre>${JSON.stringify(t.details,null,2)}</pre>\n`),e+="\t</div>\n";return e+="</body></html>",e}default:{const e=_logs.map(e=>__spreadValues(__spreadValues(__spreadValues({id:e.id,type:e.type,timestamp:i(e.timestamp),level:e.level,message:e.message},n&&{details:e.details}),r&&{context:e.context}),e.duration&&{duration:e.duration}));return JSON.stringify({generatedAt:(new Date).toISOString(),total:e.length,entries:e},null,2)}}}function createAuditLogMiddleware(e){return{onMount:(t,n,r)=>{var o;logDirectiveOperation("mount",e,{value:n.value,arg:n.arg,modifiers:n.modifiers},{component:null==(o=null==r?void 0:r.type)?void 0:o.name})},onUpdate:(t,n,r,o)=>{var i;logDirectiveOperation("update",e,{newValue:n.value,oldValue:null==o?void 0:o.value},{component:null==(i=null==r?void 0:r.type)?void 0:i.name})},onUnmount:(t,n,r)=>{var o;logDirectiveOperation("unmount",e,{},{component:null==(o=null==r?void 0:r.type)?void 0:o.name})}}}function withAuditLog(e,t,n,r,o){return __async(this,null,function*(){const i=Date.now();let s=null;try{const s=yield n(),a=Date.now()-i;return a>(_config$7.filters.minDuration||0)&&logAudit("info",e,t,__spreadProps(__spreadValues({},r),{duration:a}),o,a),s}catch(n){s=n;const a=Date.now()-i;throw logAudit("error",e,`${t} (failed: ${s.message})`,__spreadProps(__spreadValues({},r),{error:s.message,stack:s.stack}),o,a),s}})}const DEFAULT_BENCHMARK_CONFIG={iterations:1e3,warmupIterations:100,samples:10,timeout:3e4,gc:!1,verbose:!1};let _config$6=DEFAULT_BENCHMARK_CONFIG;const _results=new Map;function configureBenchmark(e){_config$6=__spreadValues(__spreadValues({},DEFAULT_BENCHMARK_CONFIG),e)}function getBenchmarkConfig(){return __spreadValues({},_config$6)}function runBenchmark(e,t,n){return __async(this,null,function*(){const r=__spreadValues(__spreadValues({},_config$6),n),o=[];for(let e=0;e<r.warmupIterations;e++)yield t();for(let n=0;n<r.samples;n++){const n=[];r.gc&&"function"==typeof globalThis.gc&&globalThis.gc();const i=performance.now();for(let o=0;o<r.iterations;o++){const o=performance.now();if(yield t(),n.push(performance.now()-o),performance.now()-i>r.timeout){r.verbose&&console.warn(`[Benchmark] Timeout exceeded for ${e}`);break}}const s=n.reduce((e,t)=>e+t,0)/n.length;o.push(s)}const i=calculateStatistics(e,o,r.iterations,r.samples);return _results.set(e,i),r.verbose&&console.info(`[Benchmark] ${e}: ${i.mean.toFixed(4)}ms ± ${i.marginOfError.toFixed(4)}ms`),i})}function calculateStatistics(e,t,n,r){const o=[...t].sort((e,t)=>e-t),i=t.reduce((e,t)=>e+t,0)/t.length,s=o[Math.floor(o.length/2)],a=o[0],l=o[o.length-1],c=t.reduce((e,t)=>e+__pow(t-i,2),0)/t.length,u=Math.sqrt(c),d=e=>{const t=Math.ceil(e/100*o.length)-1;return o[Math.max(0,t)]},p=1e3/i,m=1.96*(u/Math.sqrt(t.length));return{name:e,iterations:n,samples:r,mean:i,median:s,min:a,max:l,stdDev:u,percentiles:{p50:d(50),p75:d(75),p90:d(90),p95:d(95),p99:d(99)},opsPerSecond:p,marginOfError:m,timestamp:Date.now()}}function runBenchmarkSuite(e,t,n){return __async(this,null,function*(){const r=[];for(const{name:o,fn:i}of t){const t=yield runBenchmark(`${e}/${o}`,i,n);r.push(t)}const o=r.reduce((e,t)=>e+t.mean,0),i=o/r.length,s=r.reduce((e,t)=>e.mean<t.mean?e:t).name,a=r.reduce((e,t)=>e.mean>t.mean?e:t).name;return{name:e,benchmarks:r,summary:{totalTime:o,averageTime:i,fastest:s,slowest:a},timestamp:Date.now()}})}function compareBenchmarks(e,t,n=.05){const r=(e.mean-t.mean)/e.mean*100,o=Math.sqrt((__pow(e.stdDev,2)+__pow(t.stdDev,2))/2)*Math.sqrt(2/e.samples),i=Math.abs(t.mean-e.mean)/o>2;return{baseline:e,current:t,improvement:r,significant:i,regression:r<100*-n&&i}}function getBenchmarkResult(e){return _results.get(e)}function getAllBenchmarkResults(){return new Map(_results)}function clearBenchmarkResults(){_results.clear()}function createDirectiveBenchmark(e,t,n){let r;return{measureMount:()=>__async(null,null,function*(){return runBenchmark(`${e}/mount`,()=>{r=t()})}),measureUpdate:t=>__async(null,null,function*(){return runBenchmark(`${e}/update`,()=>{r&&r.setAttribute("data-value",JSON.stringify(t))})}),measureUnmount:()=>__async(null,null,function*(){return runBenchmark(`${e}/unmount`,()=>{r&&n&&n(r)})}),measureFullCycle:()=>__async(null,null,function*(){return runBenchmark(`${e}/full-cycle`,()=>{const e=t();n&&n(e)})})}}function takePerformanceSnapshot(){const e={timing:{domContentLoaded:0,loadComplete:0,domInteractive:0},entries:[],timestamp:Date.now()};if("undefined"==typeof performance)return e;if(performance.memory){const t=performance.memory;e.memory={usedJSHeapSize:t.usedJSHeapSize,totalJSHeapSize:t.totalJSHeapSize,jsHeapSizeLimit:t.jsHeapSizeLimit}}const t=performance.timing;t&&(e.timing={domContentLoaded:t.domContentLoadedEventEnd-t.navigationStart,loadComplete:t.loadEventEnd-t.navigationStart,domInteractive:t.domInteractive-t.navigationStart});try{e.entries=performance.getEntries()}catch(e){}return e}function compareSnapshots(e,t){const n={timeDiff:t.timestamp-e.timestamp};return e.memory&&t.memory&&(n.memoryDiff={usedJSHeapSize:t.memory.usedJSHeapSize-e.memory.usedJSHeapSize,totalJSHeapSize:t.memory.totalJSHeapSize-e.memory.totalJSHeapSize}),n}function exportBenchmarkResults(e="json"){const t=Array.from(_results.values());if("csv"===e){const e=["name","iterations","samples","mean","median","min","max","stdDev","opsPerSecond"],n=t.map(e=>[e.name,e.iterations,e.samples,e.mean.toFixed(6),e.median.toFixed(6),e.min.toFixed(6),e.max.toFixed(6),e.stdDev.toFixed(6),e.opsPerSecond.toFixed(2)]);return[e.join(","),...n.map(e=>e.join(","))].join("\n")}return JSON.stringify(t,null,2)}function generateBenchmarkReport(){const e=Array.from(_results.values());if(0===e.length)return"No benchmark results available.";const t=["# Benchmark Report",`Generated: ${(new Date).toISOString()}`,"","## Summary",`Total benchmarks: ${e.length}`,`Total time: ${e.reduce((e,t)=>e+t.mean,0).toFixed(4)}ms`,"","## Results",""],n=[...e].sort((e,t)=>e.mean-t.mean);for(const e of n)t.push(`### ${e.name}`),t.push(`- **Mean**: ${e.mean.toFixed(4)}ms`),t.push(`- **Median**: ${e.median.toFixed(4)}ms`),t.push(`- **Std Dev**: ${e.stdDev.toFixed(4)}ms`),t.push(`- **Min/Max**: ${e.min.toFixed(4)}ms / ${e.max.toFixed(4)}ms`),t.push(`- **Ops/sec**: ${e.opsPerSecond.toFixed(2)}`),t.push(`- **P95**: ${e.percentiles.p95.toFixed(4)}ms`),t.push(`- **P99**: ${e.percentiles.p99.toFixed(4)}ms`),t.push("");return t.join("\n")}function benchmark(e){return function(t,n,r){const o=r.value,i=e||`${t.constructor.name}.${n}`;return r.value=function(...e){return __async(this,null,function*(){return yield runBenchmark(i,()=>o.apply(this,e))})},r}}const BREAKING_CHANGES_REGISTRY=[{id:"v2-drop-vue2-support",version:"2.0.0",description:"Vue 2 support will be removed. Vue 3.x will be the minimum required version.",severity:"critical",status:"planned",category:"api",affectedAPIs:["Vue 2 directives","@vue/composition-api"],migrationGuide:"Upgrade to Vue 3.x. Use the migration build of Vue 3 for gradual migration.",autoFixable:!1,deprecatedIn:"1.10.0",removedIn:"2.0.0",alternatives:["Vue 3.x"]},{id:"v2-rename-directives",version:"2.0.0",description:"Directive naming will be standardized to kebab-case. CamelCase directive names will be removed.",severity:"medium",status:"planned",category:"directive",affectedAPIs:["vClickOutside","vLazyLoad","vInfiniteScroll"],migrationGuide:"Use kebab-case directive names: v-click-outside, v-lazy-load, v-infinite-scroll",detectionPattern:/v[A-Z][a-zA-Z]+/g,autoFixable:!0,deprecatedIn:"1.10.0",removedIn:"2.0.0",examples:{before:'<div v-click-outside="handler"></div>',after:'<div v-click-outside="handler"></div>'}},{id:"v2-option-structure",version:"2.0.0",description:"Directive option structure will be simplified. Legacy option formats will be removed.",severity:"high",status:"planned",category:"config",affectedAPIs:["directive options","binding.value"],migrationGuide:"Update directive options to use the new flat structure.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-handler-signature",version:"2.0.0",description:"Handler function signatures will be standardized. Old handler patterns will be removed.",severity:"medium",status:"planned",category:"api",affectedAPIs:["handlers","callbacks"],migrationGuide:"Update handlers to use (value, oldValue, binding) signature.",autoFixable:!0,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-remove-deprecated-utils",version:"2.0.0",description:"Deprecated utility functions will be removed.",severity:"low",status:"deprecated",category:"api",affectedAPIs:["deepMerge","shallowMerge","isObjectLike"],migrationGuide:"Use native alternatives or lodash equivalents.",detectionPattern:/\b(deepMerge|shallowMerge|isObjectLike)\b/g,autoFixable:!1,deprecatedIn:"1.9.0",removedIn:"2.0.0",alternatives:["Object.assign","structuredClone","typeof check"]},{id:"v2-type-exports",version:"2.0.0",description:"Type exports will be reorganized. Some types will be renamed or removed.",severity:"medium",status:"planned",category:"type",affectedAPIs:["DirectiveBinding","DirectiveConfig"],migrationGuide:"Update type imports. Use renamed types from the new locations.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-default-behavior",version:"2.0.0",description:"Default behavior for some directives will change. Review and update directive usage.",severity:"medium",status:"planned",category:"behavior",affectedAPIs:["v-debounce","v-throttle"],migrationGuide:"Explicitly specify options instead of relying on defaults.",autoFixable:!1,deprecatedIn:"1.11.0",removedIn:"2.0.0"},{id:"v2-event-names",version:"2.0.0",description:"Custom event names will be standardized. Old event names will be removed.",severity:"low",status:"planned",category:"api",affectedAPIs:["on:click","on:change"],migrationGuide:"Use the new event naming convention.",autoFixable:!0,deprecatedIn:"1.11.0",removedIn:"2.0.0"}],DEFAULT_BREAKING_CHANGES_CONFIG={enabled:!0,targetVersion:"2.0.0",warnLevel:"medium",consoleOutput:!0,throwOnCritical:!1,customHandlers:{}};let _config$5=DEFAULT_BREAKING_CHANGES_CONFIG;const _warnedChanges=new Set;function configureBreakingChanges(e){_config$5=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_BREAKING_CHANGES_CONFIG),e),{customHandlers:__spreadValues(__spreadValues({},DEFAULT_BREAKING_CHANGES_CONFIG.customHandlers),e.customHandlers)})}function getBreakingChangesConfig(){return __spreadValues({},_config$5)}function getBreakingChangesForVersion(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.version===e)}function getAllBreakingChanges(){return[...BREAKING_CHANGES_REGISTRY]}function getBreakingChangesBySeverity(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.severity===e)}function getBreakingChangesByCategory(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.category===e)}function isAPIAffected(e,t){return BREAKING_CHANGES_REGISTRY.some(n=>(!t||n.version===t)&&n.affectedAPIs.some(t=>t.includes(e)))}function getBreakingChangesForAPI(e){return BREAKING_CHANGES_REGISTRY.filter(t=>t.affectedAPIs.some(t=>t.includes(e)))}function detectBreakingChangesInCode(e,t){const n=[];for(const r of BREAKING_CHANGES_REGISTRY){if(!r.detectionPattern)continue;const o=e.matchAll(r.detectionPattern);for(const i of o){if(void 0===i.index)continue;const o=e.substring(0,i.index).split("\n"),s=o.length,a=o[o.length-1].length+1;n.push({changeId:r.id,location:{file:null==t?void 0:t.file,line:s,column:a,snippet:i[0]},matchedPattern:i[0],severity:r.severity,suggestion:r.migrationGuide})}}return n}function warnBreakingChange(e){var t,n,r,o;if(!_config$5.enabled)return;if(_warnedChanges.has(e))return;const i=BREAKING_CHANGES_REGISTRY.find(t=>t.id===e);if(!i)return;if(!("all"===_config$5.warnLevel||"low"===_config$5.warnLevel&&["low","medium","high","critical"].includes(i.severity)||"medium"===_config$5.warnLevel&&["medium","high","critical"].includes(i.severity)||"high"===_config$5.warnLevel&&["high","critical"].includes(i.severity)))return;_warnedChanges.add(e);const s=`[Directix Breaking Change] ${"removed"===i.status?"🚨":"deprecated"===i.status?"⚠️":"📢"} [${i.severity.toUpperCase()}] ${i.description}\n Version: ${i.version}\n Status: ${i.status}\n Affected APIs: ${i.affectedAPIs.join(", ")}\n Migration: ${i.migrationGuide}`;if(_config$5.consoleOutput&&("critical"===i.severity?console.error(s):"high"===i.severity?console.warn(s):console.info(s)),null==(n=(t=_config$5.customHandlers).onWarning)||n.call(t,i),"critical"===i.severity&&(null==(o=(r=_config$5.customHandlers).onCritical)||o.call(r,i),_config$5.throwOnCritical))throw new Error(`Critical breaking change detected: ${i.description}`)}function checkAPIUsage(e){const t=getBreakingChangesForAPI(e);for(const e of t)warnBreakingChange(e.id)}function generateBreakingChangesReport(e=_config$5.targetVersion){const t=BREAKING_CHANGES_REGISTRY.filter(t=>t.version===e||t.removedIn===e),n={low:0,medium:0,high:0,critical:0},r={type:0,api:0,behavior:0,config:0,directive:0},o={planned:0,deprecated:0,removed:0};for(const e of t)n[e.severity]++,r[e.category]++,o[e.status]++;let i;i=n.critical>0?"critical":n.high>2||n.medium>5?"high":n.medium>2||n.low>5?"medium":"low";const s=[];n.critical>0&&s.push("Critical changes detected. Plan migration carefully before upgrading."),r.api>0&&s.push("API changes detected. Review and update API usage before migration."),r.directive>0&&s.push("Directive changes detected. Update directive usage and names."),r.type>0&&s.push("Type changes detected. Update TypeScript definitions.");const a=t.filter(e=>e.autoFixable);return a.length>0&&s.push(`${a.length} changes can be auto-fixed using the migration tool.`),{targetVersion:e,generatedAt:Date.now(),totalChanges:t.length,bySeverity:n,byCategory:r,byStatus:o,changes:t,detections:[],readyForMigration:"low"===i,migrationEffort:i,recommendations:s}}function clearWarnedChanges(){_warnedChanges.clear()}function getWarnedChanges(){return Array.from(_warnedChanges)}function createDeprecationWarning(e,t,n){let r=!1;return()=>{if(r)return;r=!0;const o=BREAKING_CHANGES_REGISTRY.find(t=>t.id===e),i=`[Directix] "${t}" is deprecated${o?` and will be removed in v${o.removedIn}`:""}. Use "${n}" instead.`;_config$5.consoleOutput&&console.warn(i)}}function compareVersions(e,t){const n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){const t=n[e]||0,o=r[e]||0;if(t<o)return-1;if(t>o)return 1}return 0}function isVersionAffected(e){return BREAKING_CHANGES_REGISTRY.some(t=>t.version===e||t.deprecatedIn===e||t.removedIn===e)}function getMigrationTimeline(){const e=new Map;for(const t of BREAKING_CHANGES_REGISTRY)t.deprecatedIn&&(e.has(t.deprecatedIn)||e.set(t.deprecatedIn,{deprecated:[],removed:[]}),e.get(t.deprecatedIn).deprecated.push(t)),t.removedIn&&(e.has(t.removedIn)||e.set(t.removedIn,{deprecated:[],removed:[]}),e.get(t.removedIn).removed.push(t));const t=[];for(const[n,r]of e)r.deprecated.length>0&&t.push({version:n,changes:r.deprecated,milestone:"deprecated"}),r.removed.length>0&&t.push({version:n,changes:r.removed,milestone:"removed"});return t.sort((e,t)=>compareVersions(e.version,t.version))}let _vueVersion=null,_isVue2=null,_isVue27=null,_isVue3=null;function parseVersion$1(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function getVueVersion(){var e,t;if(null!==_vueVersion)return _vueVersion;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return _vueVersion=2.7,_vueVersion;if("2"===e)return _vueVersion=2,_vueVersion;if("3"===e)return _vueVersion=3,_vueVersion}try{const e=require("vue"),t=parseVersion$1(null==e?void 0:e.version);if(null!==t)return _vueVersion=t,_vueVersion}catch(e){}if("undefined"!=typeof window){const n=window,r=n.Vue;if(null==r?void 0:r.version){const e=parseVersion$1(r.version);if(null!==e)return _vueVersion=e,_vueVersion}if("function"==typeof(null==r?void 0:r.observable))return _vueVersion=2,_vueVersion;if("function"==typeof(null==r?void 0:r.createApp)&&"function"!=typeof(null==r?void 0:r.observable))return _vueVersion=3,_vueVersion;const o=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==o?void 0:o.Vue)?void 0:e.version){const e=parseVersion$1(o.Vue.version);if(null!==e)return _vueVersion=e,_vueVersion}if(null==(t=null==o?void 0:o.apps)?void 0:t.length)return _vueVersion=3,_vueVersion}return null===_vueVersion&&("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."),_vueVersion=3),_vueVersion}function setVueVersion(e){_vueVersion=e,_isVue2=2===e||2.7===e,_isVue27=2.7===e,_isVue3=3===e}function resetVueVersion(){_vueVersion=null,_isVue2=null,_isVue27=null,_isVue3=null}function isVue2(){if(null===_isVue2){const e=getVueVersion();_isVue2=2===e||2.7===e}return _isVue2}function isVue27(){return null===_isVue27&&(_isVue27=2.7===getVueVersion()),_isVue27}function isVue3(){return null===_isVue3&&(_isVue3=3===getVueVersion()),_isVue3}const isBrowser=()=>"undefined"!=typeof window&&"undefined"!=typeof document,isSSR$2=()=>!isBrowser(),supportsPassive=()=>{if(!isBrowser())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},supportsIntersectionObserver=()=>isBrowser()&&"IntersectionObserver"in window,supportsResizeObserver=()=>isBrowser()&&"ResizeObserver"in window,supportsClipboard=()=>isBrowser()&&"clipboard"in navigator,supportsMutationObserver=()=>isBrowser()&&"MutationObserver"in window,DEFAULT_BROWSER_TARGETS={chrome:">= 80",firefox:">= 78",safari:">= 14",edge:">= 88",samsung:">= 12"},DEFAULT_FALLBACK_CONFIG={intersectionObserver:!0,resizeObserver:!0,clipboard:!0,mutationObserver:!0,pointerEvents:!0,touchEvents:!0};let _browserInfo=null,_compatibilityConfig={targets:DEFAULT_BROWSER_TARGETS,fallback:DEFAULT_FALLBACK_CONFIG,polyfill:"auto",warnOnUnsupported:!0,strictMode:!1};function parseVersion(e){const t=e.match(/(\d+)/);return t?parseInt(t[1],10):0}function detectBrowser(){if(!isBrowser())return{type:"unknown",version:"0"};const e=navigator.userAgent;if(/MicroMessenger/i.test(e)){const t=e.match(/MicroMessenger\/(\d+\.?\d*)/);return{type:"wechat",version:(null==t?void 0:t[1])||"0"}}if(/UCBrowser|UBrowser/i.test(e)){const t=e.match(/UCBrowser\/(\d+\.?\d*)/);return{type:"uc",version:(null==t?void 0:t[1])||"0"}}if(/SamsungBrowser/i.test(e)){const t=e.match(/SamsungBrowser\/(\d+\.?\d*)/);return{type:"samsung",version:(null==t?void 0:t[1])||"0"}}if(/OPR|Opera/i.test(e)){const t=e.match(/(?:OPR|Opera)\/(\d+\.?\d*)/);return{type:"opera",version:(null==t?void 0:t[1])||"0"}}if(/Edg/i.test(e)){const t=e.match(/Edg\/(\d+\.?\d*)/);return{type:"edge",version:(null==t?void 0:t[1])||"0"}}if(/Firefox/i.test(e)){const t=e.match(/Firefox\/(\d+\.?\d*)/);return{type:"firefox",version:(null==t?void 0:t[1])||"0"}}if(/Safari/i.test(e)&&!/Chrome/i.test(e)){const t=e.match(/Version\/(\d+\.?\d*)/);return{type:"safari",version:(null==t?void 0:t[1])||"0"}}if(/Chrome/i.test(e)){const t=e.match(/Chrome\/(\d+\.?\d*)/);return{type:"chrome",version:(null==t?void 0:t[1])||"0"}}return{type:"unknown",version:"0"}}function detectPlatform(){if(!isBrowser())return"desktop";const e=navigator.userAgent;return/tablet|ipad/i.test(e)||/android/i.test(e)&&!/mobile/i.test(e)?"tablet":/mobile|iphone|ipod|android.*mobile/i.test(e)?"mobile":"desktop"}function detectOS(){if(!isBrowser())return"unknown";const e=navigator.userAgent;return/Windows/i.test(e)?"Windows":/Mac/i.test(e)?"macOS":/Linux/i.test(e)?"Linux":/Android/i.test(e)?"Android":/iOS|iPhone|iPad|iPod/i.test(e)?"iOS":"unknown"}function detectFeatures(){if(!isBrowser())return createEmptyFeatures();const e=window,t=navigator;return{passive:checkPassiveSupport(),intersectionObserver:"IntersectionObserver"in e,resizeObserver:"ResizeObserver"in e,mutationObserver:"MutationObserver"in e,clipboard:"clipboard"in t,clipboardItem:"ClipboardItem"in e,clipboardWrite:checkClipboardWrite(),clipboardRead:checkClipboardRead(),pointerEvents:"PointerEvent"in e,touchEvents:"ontouchstart"in e||t.maxTouchPoints>0,webAnimations:"animate"in Element.prototype,customElements:"customElements"in e,shadowDom:"attachShadow"in Element.prototype,cssVariables:checkCSSSupport("--test","test"),cssGrid:checkCSSSupport("grid-template-columns","1fr"),cssFlexbox:checkCSSSupport("display","flex"),es2020:checkES2020Support(),es2021:checkES2021Support(),es2022:checkES2022Support()}}function createEmptyFeatures(){return{passive:!1,intersectionObserver:!1,resizeObserver:!1,mutationObserver:!1,clipboard:!1,clipboardItem:!1,clipboardWrite:!1,clipboardRead:!1,pointerEvents:!1,touchEvents:!1,webAnimations:!1,customElements:!1,shadowDom:!1,cssVariables:!1,cssGrid:!1,cssFlexbox:!1,es2020:!1,es2021:!1,es2022:!1}}function checkPassiveSupport(){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}function checkClipboardWrite(){if(!isBrowser())return!1;const e=navigator;return!!e.clipboard&&("function"==typeof e.clipboard.writeText||"function"==typeof e.clipboard.write)}function checkClipboardRead(){if(!isBrowser())return!1;const e=navigator;return!!e.clipboard&&("function"==typeof e.clipboard.readText||"function"==typeof e.clipboard.read)}function checkCSSSupport(e,t){if(!isBrowser())return!1;const n=document.createElement("div");return n.style[e]=t,n.style[e]===t}function checkES2020Support(){try{return eval("const a = {}; a?.b?.c ?? null"),!0}catch(e){return!1}}function checkES2021Support(){try{return eval("let a = false; a ||= true"),!0}catch(e){return!1}}function checkES2022Support(){try{return eval("class A { static x = 1 }"),!0}catch(e){return!1}}function determineSupportLevel(e,t){switch(e){case"chrome":return t>=80?"full":t>=60?"partial":"none";case"firefox":return t>=78?"full":t>=60?"partial":"none";case"safari":return t>=14?"full":t>=12?"partial":"none";case"edge":return t>=88?"full":t>=79?"partial":"none";case"samsung":return t>=12?"full":t>=10?"partial":"none";case"opera":return t>=67?"full":t>=50?"partial":"none";default:return"partial"}}function getBrowserInfo(){if(_browserInfo)return _browserInfo;const{type:e,version:t}=detectBrowser(),n=parseVersion(t),r=detectPlatform(),o=detectOS(),i=determineSupportLevel(e,n),s=detectFeatures();return _browserInfo={type:e,version:t,major:n,platform:r,os:o,supportLevel:i,features:s},_browserInfo}function configureCompatibility(e){_compatibilityConfig=__spreadProps(__spreadValues(__spreadValues({},_compatibilityConfig),e),{targets:__spreadValues(__spreadValues({},_compatibilityConfig.targets),e.targets),fallback:__spreadValues(__spreadValues({},_compatibilityConfig.fallback),e.fallback)})}function getCompatibilityConfig(){return __spreadValues({},_compatibilityConfig)}function resetBrowserInfo(){_browserInfo=null}function isFeatureSupported(e){return getBrowserInfo().features[e]}function meetsMinimumRequirements(){return"none"!==getBrowserInfo().supportLevel}function isFullySupported(){return"full"===getBrowserInfo().supportLevel}function isUnsupportedBrowser(){return"none"===getBrowserInfo().supportLevel}function getUnsupportedFeatures(){const e=getBrowserInfo();return Object.entries(e.features).filter(([,e])=>!e).map(([e])=>e)}let _warnedFeatures=new Set;function warnUnsupportedFeatures(){if(!_compatibilityConfig.warnOnUnsupported)return;const e=getBrowserInfo();if("none"===e.supportLevel)return void console.warn(`[Directix] Your browser (${e.type} ${e.version}) is not officially supported. Some features may not work correctly.`);"partial"===e.supportLevel&&console.warn(`[Directix] Your browser (${e.type} ${e.version}) has partial support. Some features may be degraded.`);const t=getUnsupportedFeatures();t.length>0&&console.warn(`[Directix] Some features are not supported in your browser: ${t.join(", ")}`)}function warnUnsupportedFeatureOnce(e,t){if(_warnedFeatures.has(e))return;_warnedFeatures.add(e);const n=t?`[Directix] "${e}" is not supported, using fallback: ${t}`:`[Directix] "${e}" is not supported in this browser`;console.warn(n)}function clearWarnedFeatures(){_warnedFeatures=new Set}function generateCompatibilityReport(){const e=getBrowserInfo(),t=getCompatibilityConfig(),n=getUnsupportedFeatures(),r=[],o=[];return!e.features.intersectionObserver&&t.fallback.intersectionObserver&&(r.push("IntersectionObserver is not supported - lazy loading will use fallback"),o.push("Consider adding intersection-observer polyfill for better performance")),!e.features.resizeObserver&&t.fallback.resizeObserver&&(r.push("ResizeObserver is not supported - resize detection will use fallback"),o.push("Consider adding resize-observer-polyfill")),!e.features.clipboard&&t.fallback.clipboard&&(r.push("Clipboard API is not supported - copy/paste will use fallback"),o.push("Copy functionality will use execCommand fallback")),e.features.passive||r.push("Passive event listeners are not supported - scroll performance may be affected"),"partial"===e.supportLevel&&o.push("Consider upgrading your browser for the best experience"),{browser:e,config:t,unsupportedFeatures:n,warnings:r,recommendations:o}}const _polyfills=new Map;function registerPolyfill(e,t=!1){_polyfills.set(e,{name:e,loaded:!1,required:t})}function markPolyfillLoaded(e){const t=_polyfills.get(e);t&&(t.loaded=!0)}function isPolyfillLoaded(e){var t,n;return null!=(n=null==(t=_polyfills.get(e))?void 0:t.loaded)&&n}function getMissingPolyfills(){return Array.from(_polyfills.values()).filter(e=>e.required&&!e.loaded).map(e=>e.name)}function getPolyfillStatus(){const e={};return _polyfills.forEach((t,n)=>{e[n]={loaded:t.loaded,required:t.required}}),e}const BROWSER_TARGETS=[{name:"Chrome",minVersion:80,currentVersion:120,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Firefox",minVersion:78,currentVersion:120,engine:"gecko",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Safari",minVersion:14,currentVersion:17,engine:"webkit",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0,notes:"Partial support"},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Edge",minVersion:88,currentVersion:120,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]},{name:"Samsung Internet",minVersion:12,currentVersion:23,engine:"blink",features:[{name:"IntersectionObserver",supported:!0,polyfillAvailable:!0},{name:"ResizeObserver",supported:!0,polyfillAvailable:!0},{name:"MutationObserver",supported:!0,polyfillAvailable:!1},{name:"Clipboard API",supported:!0,polyfillAvailable:!0},{name:"Pointer Events",supported:!0,polyfillAvailable:!0},{name:"CSS Grid",supported:!0,polyfillAvailable:!1},{name:"CSS Variables",supported:!0,polyfillAvailable:!1},{name:"Passive Events",supported:!0,polyfillAvailable:!1}]}],MOBILE_DEVICES=[{name:"iPhone",os:"iOS",osMinVersion:"14.0",browser:"Safari",browserMinVersion:"14"},{name:"iPad",os:"iPadOS",osMinVersion:"14.0",browser:"Safari",browserMinVersion:"14"},{name:"Android Phone",os:"Android",osMinVersion:"8.0",browser:"Chrome",browserMinVersion:"80"},{name:"Android Tablet",os:"Android",osMinVersion:"8.0",browser:"Chrome",browserMinVersion:"80"},{name:"Samsung Galaxy",os:"Android",osMinVersion:"10",browser:"Samsung Internet",browserMinVersion:"12"}],FEATURE_MATRIX={intersectionObserver:{name:"IntersectionObserver",description:"API for detecting element visibility",browserSupport:{Chrome:{minVersion:51},Firefox:{minVersion:55},Safari:{minVersion:12.1},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!0},resizeObserver:{name:"ResizeObserver",description:"API for detecting element size changes",browserSupport:{Chrome:{minVersion:64},Firefox:{minVersion:69},Safari:{minVersion:13.1},Edge:{minVersion:79},Samsung:{minVersion:8}},fallbackAvailable:!0},mutationObserver:{name:"MutationObserver",description:"API for observing DOM changes",browserSupport:{Chrome:{minVersion:18},Firefox:{minVersion:14},Safari:{minVersion:6},Edge:{minVersion:12},Samsung:{minVersion:1.5}},fallbackAvailable:!1},clipboardApi:{name:"Clipboard API",description:"Modern async clipboard API",browserSupport:{Chrome:{minVersion:66},Firefox:{minVersion:63},Safari:{minVersion:13.1,notes:"Partial support"},Edge:{minVersion:79},Samsung:{minVersion:9}},fallbackAvailable:!0},pointerEvents:{name:"Pointer Events",description:"Unified pointer input API",browserSupport:{Chrome:{minVersion:55},Firefox:{minVersion:59},Safari:{minVersion:13},Edge:{minVersion:12},Samsung:{minVersion:6}},fallbackAvailable:!0},cssGrid:{name:"CSS Grid",description:"CSS Grid Layout",browserSupport:{Chrome:{minVersion:57},Firefox:{minVersion:52},Safari:{minVersion:10.1},Edge:{minVersion:16},Samsung:{minVersion:6}},fallbackAvailable:!1},cssVariables:{name:"CSS Variables",description:"CSS Custom Properties",browserSupport:{Chrome:{minVersion:49},Firefox:{minVersion:31},Safari:{minVersion:9.1},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!1},passiveEvents:{name:"Passive Event Listeners",description:"Passive event listener option",browserSupport:{Chrome:{minVersion:51},Firefox:{minVersion:49},Safari:{minVersion:10},Edge:{minVersion:15},Samsung:{minVersion:5}},fallbackAvailable:!1}};function isBrowserSupported(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase());return!!n&&t>=n.minVersion}function getFeatureSupport(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase());return null==n?void 0:n.features.find(e=>e.name.toLowerCase()===t.toLowerCase())}function getBrowsersSupportingFeature(e){return BROWSER_TARGETS.filter(t=>t.features.some(t=>t.name.toLowerCase()===e.toLowerCase()&&t.supported))}function getBrowserCompatibilityReport(e,t){const n=BROWSER_TARGETS.find(t=>t.name.toLowerCase()===e.toLowerCase()),r=!!n&&t>=n.minVersion,o=(null==n?void 0:n.features)||[],i=[];return!r&&n&&i.push(`Upgrade ${e} to version ${n.minVersion}+`),o.forEach(e=>{!e.supported&&e.polyfillAvailable&&i.push(`Enable polyfill for ${e.name}`)}),{supported:r,features:o,recommendations:i}}function generateBrowserslistConfig(){const e=[];return BROWSER_TARGETS.forEach(t=>{const n=t.name.toLowerCase().replace(" ","");"samsung internet"===n?e.push(`Samsung >= ${t.minVersion}`):"chrome"===n?e.push(`Chrome >= ${t.minVersion}`):"firefox"===n?e.push(`Firefox >= ${t.minVersion}`):"safari"===n?e.push(`Safari >= ${t.minVersion}`):"edge"===n&&e.push(`Edge >= ${t.minVersion}`)}),e.push("iOS >= 14"),e.push("Android >= 80"),e}function getCompatibilityMatrix(){return{browsers:BROWSER_TARGETS,features:FEATURE_MATRIX,mobileDevices:MOBILE_DEVICES}}const DEFAULT_CONFIG_CENTER_CONFIG={sources:[],mergeStrategy:"deepMerge",cache:{key:"__directix_config",enabled:!0,ttl:3e5},sync:{enabled:!1},validation:{enabled:!1},encryption:{enabled:!1,algorithm:"none"}};let _config$4=DEFAULT_CONFIG_CENTER_CONFIG,_values=new Map,_broadcastChannel=null,_refreshTimer=null,_initialized=!1,_snapshots=[];const _listeners=new Map,_globalListeners=new Set;function configureConfigCenter(e){_config$4=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG),e),{cache:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.cache),e.cache),sync:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.sync),e.sync),validation:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.validation),e.validation),encryption:__spreadValues(__spreadValues({},DEFAULT_CONFIG_CENTER_CONFIG.encryption),e.encryption)}),_config$4.sync.enabled&&"undefined"!=typeof BroadcastChannel&&(_broadcastChannel=new BroadcastChannel(_config$4.sync.broadcastChannel||"directix-config"),_broadcastChannel.onmessage=e=>{var t,n;"config-update"===e.data.type&&(_values.set(e.data.key,e.data.value),null==(n=(t=_config$4.sync).onUpdate)||n.call(t,e.data.key,e.data.value))})}function getConfigCenterConfig(){return __spreadValues({},_config$4)}function initConfigCenter(){return __async(this,null,function*(){if(_initialized)return;const e=[..._config$4.sources].sort((e,t)=>t.priority-e.priority);for(const t of e)try{mergeValues(yield loadFromSource(t))}catch(e){console.warn(`[Directix Config] Failed to load from ${t.type}:`,e)}setupRefreshTimer(),loadCachedConfig(),_initialized=!0})}function loadFromSource(e){return __async(this,null,function*(){switch(e.type){case"static":return e.static||{};case"api":return loadFromAPI(e);case"localStorage":case"sessionStorage":return loadFromStorage(e);default:return{}}})}function loadFromAPI(e){return __async(this,null,function*(){if(!e.api)return{};try{const t=yield fetch(e.api.url,{method:e.api.method,headers:e.api.headers});if(!t.ok)throw new Error(`API returned ${t.status}`);return yield t.json()}catch(e){throw new Error(`API config load failed: ${e}`)}})}function loadFromStorage(e){var t;if("undefined"==typeof window)return{};const n="localStorage"===e.type?localStorage:sessionStorage,r=(null==(t=e.storage)?void 0:t.key)||"directix-config",o=n.getItem(r);if(!o)return{};try{return JSON.parse(o)}catch(e){return{}}}function mergeValues(e){for(const[t,n]of Object.entries(e)){const e=_values.get(t);"override"===_config$4.mergeStrategy?_values.set(t,n):"merge"===_config$4.mergeStrategy?_values.set(t,__spreadValues(__spreadValues({},e),n)):_values.set(t,deepMerge$1(e,n)),e!==n&&emitChange(t,e,n)}}function deepMerge$1(e,t){if("object"!=typeof e||"object"!=typeof t)return t;const n=__spreadValues({},e);for(const r of Object.keys(t))"object"==typeof t[r]&&"object"==typeof e[r]?n[r]=deepMerge$1(e[r],t[r]):n[r]=t[r];return n}function setupRefreshTimer(){const e=_config$4.sources.filter(e=>{var t;return"api"===e.type&&(null==(t=e.api)?void 0:t.refreshInterval)});if(e.length>0&&"undefined"!=typeof window){const t=Math.min(...e.map(e=>e.api.refreshInterval));_refreshTimer=window.setInterval(()=>__async(null,null,function*(){for(const t of e)try{mergeValues(yield loadFromAPI(t))}catch(e){}}),t)}}function loadCachedConfig(){if(_config$4.cache.enabled&&"undefined"!=typeof localStorage)try{const e=localStorage.getItem(_config$4.cache.key);if(e){const{config:t,timestamp:n}=JSON.parse(e);Date.now()-n<_config$4.cache.ttl&&mergeValues(t)}}catch(e){}}function saveToCache(){if(_config$4.cache.enabled&&"undefined"!=typeof localStorage)try{const e={config:Object.fromEntries(_values),timestamp:Date.now()};localStorage.setItem(_config$4.cache.key,JSON.stringify(e))}catch(e){}}function getConfig(e,t){var n;if(!_values.has(e))return t;const r=_values.get(e);if(_config$4.validation.enabled&&(null==(n=_config$4.validation.schema)?void 0:n[e])){if(!validateValue(e,r))return null!=t?t:_config$4.validation.schema[e].default}return r}function setConfig(e,t,n="manual"){var r;const o=_values.get(e);if(_config$4.validation.enabled&&(null==(r=_config$4.validation.schema)?void 0:r[e])&&!validateValue(e,t))throw new Error(`Invalid config value for key: ${e}`);_values.set(e,t),saveToCache(),emitChange(e,o,t,n),_broadcastChannel&&_broadcastChannel.postMessage({key:e,type:"config-update",value:t}),createSnapshot(n)}function validateValue(e,t){var n;const r=null==(n=_config$4.validation.schema)?void 0:n[e];if(!r)return!0;if(r.required&&void 0===t)return!1;if(r.type){if((Array.isArray(t)?"array":typeof t)!==r.type)return!1}if(r.enum&&!r.enum.includes(t))return!1;if("number"===r.type){if(void 0!==r.min&&t<r.min)return!1;if(void 0!==r.max&&t>r.max)return!1}return!(r.pattern&&"string"===r.type&&!new RegExp(r.pattern).test(t))&&!(r.validator&&!r.validator(t))}function deleteConfig(e){const t=_values.get(e);_values.delete(e),saveToCache(),emitChange(e,t,void 0,"manual")}function getAllConfig(){return Object.fromEntries(_values)}function watchConfig(e,t){return"*"===e?(_globalListeners.add(t),()=>_globalListeners.delete(t)):(_listeners.has(e)||_listeners.set(e,new Set),_listeners.get(e).add(t),()=>{var n;return null==(n=_listeners.get(e))?void 0:n.delete(t)})}function emitChange(e,t,n,r="unknown"){var o;const i={key:e,oldValue:t,newValue:n,source:r,timestamp:Date.now()};null==(o=_listeners.get(e))||o.forEach(e=>e(i)),_globalListeners.forEach(e=>e(i))}function createSnapshot(e){const t=Object.fromEntries(_values),n=generateHash(t);_snapshots.push({version:`v${_snapshots.length+1}`,config:t,timestamp:Date.now(),source:e,hash:n}),_snapshots.length>20&&(_snapshots=_snapshots.slice(-20))}function generateHash(e){const t=JSON.stringify(e);let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n.toString(16)}function getConfigSnapshots(){return[..._snapshots]}function rollbackConfig(e){const t=_snapshots.find(t=>t.version===e);if(!t)return!1;_values=new Map(Object.entries(t.config)),saveToCache();for(const[e,t]of _values)emitChange(e,void 0,t,"rollback");return!0}function exportConfig(e="json"){const t=Object.fromEntries(_values);switch(e){case"yaml":return toYAML(t);case"env":return toEnv(t);default:return JSON.stringify(t,null,2)}}function toYAML(e,t=0){const n=[],r=" ".repeat(t);for(const[o,i]of Object.entries(e))if("object"!=typeof i||Array.isArray(i)){const e="string"==typeof i?`"${i}"`:String(i);n.push(`${r}${o}: ${e}`)}else n.push(`${r}${o}:`),n.push(toYAML(i,t+1));return n.join("\n")}function toEnv(e,t=""){const n=[];for(const[r,o]of Object.entries(e)){const e=t?`${t}_${r.toUpperCase()}`:r.toUpperCase();"object"!=typeof o||Array.isArray(o)?n.push(`${e}=${o}`):n.push(toEnv(o,e))}return n.join("\n")}function importConfig(e,t="json",n=!0){return __async(this,null,function*(){let r;switch(t){case"yaml":r=parseYAML(e);break;case"env":r=parseEnv(e);break;default:r=JSON.parse(e)}n?mergeValues(r):_values=new Map(Object.entries(r)),saveToCache(),createSnapshot("import")})}function parseYAML(e){var t;const n={},r=e.split("\n");for(const e of r){if(!e.trim()||e.trim().startsWith("#"))continue;const r=e.match(/^(\s*)([^:]+):\s*(.+)?$/);if(r){const e=r[2].trim(),o=null==(t=r[3])?void 0:t.trim();o&&(o.startsWith('"')&&o.endsWith('"')?n[e]=o.slice(1,-1):"true"===o?n[e]=!0:"false"===o?n[e]=!1:isNaN(Number(o))?n[e]=o:n[e]=Number(o))}}return n}function parseEnv(e){const t={};for(const n of e.split("\n")){if(!n.trim()||n.startsWith("#"))continue;const[e,r]=n.split("=");e&&r&&(t[e]=r)}return t}function resetConfigCenter(){if(_refreshTimer&&(clearInterval(_refreshTimer),_refreshTimer=null),_values.clear(),_listeners.clear(),_globalListeners.clear(),_snapshots=[],_initialized=!1,_broadcastChannel&&(_broadcastChannel.close(),_broadcastChannel=null),"undefined"!=typeof localStorage)try{localStorage.removeItem(_config$4.cache.key)}catch(e){}_config$4=DEFAULT_CONFIG_CENTER_CONFIG}function syncConfigToRemote(e,t){return __async(this,null,function*(){var n;try{return(yield fetch(e,{method:null!=(n=null==t?void 0:t.method)?n:"POST",headers:__spreadValues({"Content-Type":"application/json"},null==t?void 0:t.headers),body:JSON.stringify(Object.fromEntries(_values))})).ok}catch(e){return!1}})}function getConfigStats(){return{totalKeys:_values.size,snapshotCount:_snapshots.length,listenerCount:_listeners.size+_globalListeners.size,cacheEnabled:_config$4.cache.enabled,syncEnabled:_config$4.sync.enabled}}function defineDirective(e){var t;const n=e,{name:r,version:o,ssr:i,defaults:s}=n,a=__objRest(n,["name","version","ssr","defaults"]);if(isSSR$2()&&!i)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.`),createNoOpDirective();return createLazyDirective({mounted:a.mounted?(e,t,n)=>{a.mounted(e,applyDefaults(t,s),n)}:void 0,updated:a.updated?(e,t,n,r,o)=>{a.updated(e,applyDefaults(t,s),n,r,o)}:void 0,unmounted:a.unmounted})}function createLazyDirective(e){let t=null;function n(n){return function(r,o,i,s){var a,l;null==(l=(t||(t=2===getVueVersion()?createVue2Directive(e):createVue3Directive(e)),a=t)[n])||l.call(a,r,o,i,s)}}return{bind:n("bind"),inserted:n("inserted"),update:n("update"),componentUpdated:n("componentUpdated"),unbind:n("unbind"),created:n("created"),beforeMount:n("beforeMount"),mounted:n("mounted"),beforeUpdate:n("beforeUpdate"),updated:n("updated"),beforeUnmount:n("beforeUnmount"),unmounted:n("unmounted")}}function applyDefaults(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 createNoOpDirective(){return{mounted:()=>{},updated:()=>{},unmounted:()=>{}}}function defineDirectiveGroup(e,t){return{name:e,directives:t,install(n,r){Object.entries(t).forEach(([t,r])=>{const o=`${e}-${t}`;n.directive(o,r)})}}}const state$1={enabled:!1,directives:new Map,plugins:new Map,events:[],maxEvents:100};function getDevtoolsHook(){if(!isBrowser())return null;return window.__VUE_DEVTOOLS_GLOBAL_HOOK__||null}function isDevtoolsAvailable(){return null!==getDevtoolsHook()}function enableDevtools(){if(!isBrowser())return;const e=getDevtoolsHook();e?(state$1.enabled=!0,isVue3()?setupVue3Devtools(e):setupVue2Devtools(e),console.info("[Directix] DevTools integration enabled")):console.warn("[Directix] Vue DevTools not detected. Install Vue DevTools extension to enable debugging.")}function setupVue3Devtools(e){e.on("app:init",e=>{registerInspector(e)}),e.on("component:updated",e=>{})}function setupVue2Devtools(e){e.Vue&&(e.emit("inspector:add",{id:"directix",app:e.Vue,label:"Directix",icon:"view_grid",treeFilterPlaceholder:"Search directives"}),e.on("inspector:tree",t=>{t.app===e.Vue&&"directix"===t.inspectorId&&(t.rootNodes=getDirectiveTree())}),e.on("inspector:state",t=>{t.app===e.Vue&&"directix"===t.inspectorId&&(t.state=getDirectiveState(t.nodeId))}))}function registerInspector(e){const t=getDevtoolsHook();if(!t)return;const n={id:"directix",app:e,label:"Directix",icon:"view_grid",treeFilterPlaceholder:"Search directives..."};t.emit("custom-inspector:add",n),t.on("custom-inspector:tree",e=>{"directix"===e.inspectorId&&(e.rootNodes=getDirectiveTree())}),t.on("custom-inspector:state",e=>{"directix"===e.inspectorId&&(e.state=getDirectiveState(e.nodeId))})}function getDirectiveTree(){const e=[],t=Array.from(state$1.directives.entries()).map(([e,t])=>({id:`directive:${e}`,label:`v-${e}`,children:[],tags:[{label:`${t.bindings} bindings`,textColor:6710886,backgroundColor:15658734}]}));e.push({id:"directives",label:"Directives",children:t,tags:[{label:`${state$1.directives.size}`,textColor:16777215,backgroundColor:4372611}]});const n=Array.from(state$1.plugins.entries()).map(([e,t])=>({id:`plugin:${e}`,label:e,children:[],tags:[{label:t.version,textColor:6710886,backgroundColor:15658734}]}));e.push({id:"plugins",label:"Plugins",children:n,tags:[{label:`${state$1.plugins.size}`,textColor:16777215,backgroundColor:4372611}]});const r=state$1.events.slice(-20).map((e,t)=>({id:`event:${t}`,label:`${e.type}:${e.name}`,children:[],tags:[{label:new Date(e.timestamp).toLocaleTimeString(),textColor:6710886,backgroundColor:15658734}]}));return e.push({id:"events",label:"Events",children:r,tags:[{label:`${state$1.events.length}`,textColor:16777215,backgroundColor:4372611}]}),e}function getDirectiveState(e){if(e.startsWith("directive:")){const t=e.replace("directive:",""),n=state$1.directives.get(t);if(n)return[{key:"info",value:{name:n.name,bindings:n.bindings,lastUpdated:new Date(n.lastUpdated).toLocaleString(),element:n.element||"unknown",options:n.options},editable:!1}]}if(e.startsWith("plugin:")){const t=e.replace("plugin:",""),n=state$1.plugins.get(t);if(n)return[{key:"info",value:{name:n.name,version:n.version,description:n.description,enabled:n.enabled,registeredAt:new Date(n.registeredAt).toLocaleString()},editable:!1}]}if(e.startsWith("event:")){const t=Number.parseInt(e.replace("event:","")),n=state$1.events[state$1.events.length-20+t];if(n)return[{key:"event",value:{name:n.name,type:n.type,timestamp:new Date(n.timestamp).toLocaleString(),data:n.data},editable:!1}]}return[]}function trackDirective(e,t){if(!state$1.enabled)return;const n=state$1.directives.get(e);n?state$1.directives.set(e,__spreadValues(__spreadProps(__spreadValues({},n),{bindings:n.bindings+1,lastUpdated:Date.now()}),t)):state$1.directives.set(e,__spreadValues({name:e,bindings:1,lastUpdated:Date.now()},t)),addEvent("directive:mounted",e)}function untrackDirective(e){if(!state$1.enabled)return;const t=state$1.directives.get(e);t&&state$1.directives.set(e,__spreadProps(__spreadValues({},t),{bindings:Math.max(0,t.bindings-1),lastUpdated:Date.now()})),addEvent("directive:unmounted",e)}function trackPlugin(e){state$1.enabled&&(state$1.plugins.set(e.name,__spreadProps(__spreadValues({},e),{registeredAt:Date.now()})),addEvent("plugin:install",e.name,{version:e.version}))}function untrackPlugin(e){if(!state$1.enabled)return;const t=state$1.plugins.get(e);t&&state$1.plugins.set(e,__spreadProps(__spreadValues({},t),{enabled:!1})),addEvent("plugin:uninstall",e)}function addEvent(e,t,n){state$1.events.push({name:t,type:e,timestamp:Date.now(),data:n}),state$1.events.length>state$1.maxEvents&&(state$1.events=state$1.events.slice(-100))}function disableDevtools(){state$1.enabled=!1}function getDevtoolsState(){return{enabled:state$1.enabled,directiveCount:state$1.directives.size,pluginCount:state$1.plugins.size,eventCount:state$1.events.length}}function clearDevtoolsState(){state$1.directives.clear(),state$1.plugins.clear(),state$1.events=[]}const DEFAULT_EDGE_CASE_CONFIG={ssr:{enabled:!0,warnOnUnsupported:!0,fallbackBehavior:"skip"},domReady:{waitForReady:!0,timeout:5e3,retryCount:3},memory:{maxObservers:100,cleanupInterval:6e4,warnThreshold:80},errorRecovery:{enabled:!0,maxRetries:3,retryDelay:100},mobile:{touchDelay:300,debounceResize:150,preventDefaultOnTouch:!1}};let _config$3=DEFAULT_EDGE_CASE_CONFIG,_warnings=[],_observerCount=0,_cleanupTimer=null;function configureEdgeCase(e){_config$3=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG),e),{ssr:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.ssr),e.ssr),domReady:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.domReady),e.domReady),memory:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.memory),e.memory),errorRecovery:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.errorRecovery),e.errorRecovery),mobile:__spreadValues(__spreadValues({},DEFAULT_EDGE_CASE_CONFIG.mobile),e.mobile)}),_config$3.memory.cleanupInterval>0&&"undefined"!=typeof window&&startCleanupTimer()}function getEdgeCaseConfig(){return __spreadValues({},_config$3)}function isSSR$1(){return"undefined"==typeof window||"undefined"==typeof document}function handleSSRUnsupported(e,t){if(!_config$3.ssr.enabled)return{success:!0,recovered:!1,retryCount:0};switch(_config$3.ssr.warnOnUnsupported&&logWarning("ssr-unsupported",`Operation "${e}" is not supported in SSR environment`,t),_config$3.ssr.fallbackBehavior){case"skip":case"mock":return{success:!0,recovered:!0,retryCount:0};case"throw":return{success:!1,error:new Error(`SSR unsupported: ${e}`),recovered:!1,retryCount:0};default:return{success:!0,recovered:!1,retryCount:0}}}function waitForDOMReady(){return new Promise((e,t)=>{if(!isSSR$1()&&"loading"!==document.readyState)return void e();if(!_config$3.domReady.waitForReady)return void e();const n=setTimeout(()=>{logWarning("dom-not-ready","DOM ready timeout exceeded"),t(new Error("DOM ready timeout"))},_config$3.domReady.timeout),r=()=>{clearTimeout(n),document.removeEventListener("DOMContentLoaded",r),e()};isSSR$1()?(clearTimeout(n),e()):document.addEventListener("DOMContentLoaded",r)})}function safeQueryElement(e,t){return __async(this,null,function*(){var n,r,o;const i=null!=(n=null==t?void 0:t.retryCount)?n:_config$3.domReady.retryCount,s=null!=(r=null==t?void 0:t.retryDelay)?r:_config$3.errorRecovery.retryDelay,a=null!=(o=null==t?void 0:t.parent)?o:document;for(let t=0;t<=i;t++){const n=a.querySelector(e);if(n)return n;t<i&&(yield new Promise(e=>setTimeout(e,s)))}return logWarning("element-not-found",`Element not found: ${e}`),null})}function trackObserver(){return _observerCount++,_observerCount>_config$3.memory.maxObservers?(logWarning("observer-limit",`Observer limit exceeded: ${_observerCount}/${_config$3.memory.maxObservers}`),!1):(_observerCount>_config$3.memory.warnThreshold&&logWarning("observer-limit",`Observer count approaching limit: ${_observerCount}/${_config$3.memory.maxObservers}`),!0)}function untrackObserver(){_observerCount>0&&_observerCount--}function getObserverCount(){return _observerCount}function withErrorRecovery(e,t){return __async(this,null,function*(){var n,r,o,i;if(!_config$3.errorRecovery.enabled)try{return{value:yield e(),success:!0,recovered:!1,retryCount:0}}catch(e){return{success:!1,error:e,recovered:!1,retryCount:0}}const s=null!=(n=null==t?void 0:t.maxRetries)?n:_config$3.errorRecovery.maxRetries,a=null!=(r=null==t?void 0:t.retryDelay)?r:_config$3.errorRecovery.retryDelay,l=null!=(o=null==t?void 0:t.fallbackValue)?o:_config$3.errorRecovery.fallbackValue;let c;for(let n=0;n<=s;n++)try{return{value:yield e(),success:!0,recovered:n>0,retryCount:n}}catch(e){c=e,null==(i=null==t?void 0:t.onError)||i.call(t,c,n),n<s&&(yield new Promise(e=>setTimeout(e,a*(n+1))))}return void 0!==l?{value:l,success:!0,recovered:!0,retryCount:s}:{success:!1,error:c,recovered:!1,retryCount:s}})}function handleTouchConflict(e,t,n){if(!_config$3.mobile.preventDefaultOnTouch)return!1;return!(!e.hasAttribute("data-prevent-touch")&&!e.closest("[data-prevent-touch]"))&&(t.preventDefault(),logWarning("touch-conflict","Touch event prevented due to conflict",n),!0)}function createDebouncedResizeHandler(e,t){let n=null;const r=null!=t?t:_config$3.mobile.debounceResize;return()=>{null!==n&&clearTimeout(n),n=window.setTimeout(()=>{e(),n=null},r)}}function detectResizeLoop(e,t=3){const n=Date.now(),r=detectResizeLoop._timestamps||[];return detectResizeLoop._timestamps=r.filter(e=>n-e<1e3),detectResizeLoop._timestamps.push(n),detectResizeLoop._timestamps.length>t&&(logWarning("resize-loop","Potential resize loop detected"),!0)}function detectScrollJank(e,t=50){return e>t&&(logWarning("scroll-jank",`Scroll jank detected: ${e}ms frame time`),!0)}function validateBinding(e,t,n){const{type:r,required:o,validator:i}=t;if(o&&null==e){const e=new Error("Binding value is required");return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}if(r&&null!=e){const t=Array.isArray(r)?r:[r],o=Array.isArray(e)?"array":typeof e;if(!t.includes(o)){const e=new Error(`Expected type ${t.join(" | ")}, got ${o}`);return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}}if(i&&!i(e)){const e=new Error("Binding validation failed");return logWarning("invalid-binding",e.message,n),{success:!1,error:e,recovered:!1,retryCount:0}}return{value:e,success:!0,recovered:!1,retryCount:0}}function checkDependency(e,t){if(isSSR$1())return!1;if(t){const n=t.split(".");let r=window;for(const t of n)if(r=null==r?void 0:r[t],!r)return logWarning("missing-dependency",`Missing dependency: ${e}`),!1;return!0}return!!window[e]||(logWarning("missing-dependency",`Missing dependency: ${e}`),!1)}function logWarning(e,t,n,r){const o={type:e,message:t,element:r,directive:n,timestamp:Date.now(),handled:!0};_warnings.push(o),_warnings.length>100&&(_warnings=_warnings.slice(-100)),console.warn(`[Directix Edge Case] [${e}] ${t}${n?` (directive: ${n})`:""}`)}function getEdgeCaseWarnings(e){let t=[..._warnings];return(null==e?void 0:e.type)&&(t=t.filter(t=>t.type===e.type)),(null==e?void 0:e.directive)&&(t=t.filter(t=>t.directive===e.directive)),void 0!==(null==e?void 0:e.since)&&(t=t.filter(t=>t.timestamp>=e.since)),t}function clearEdgeCaseWarnings(){_warnings=[]}function startCleanupTimer(){null!==_cleanupTimer&&clearInterval(_cleanupTimer),_cleanupTimer=window.setInterval(()=>{_observerCount>_config$3.memory.warnThreshold&&logWarning("memory-leak",`High observer count during cleanup: ${_observerCount}`)},_config$3.memory.cleanupInterval)}function stopCleanupTimer(){null!==_cleanupTimer&&(clearInterval(_cleanupTimer),_cleanupTimer=null)}function createSafeDirectiveWrapper(e,t,n){return(r,o,i)=>__async(null,null,function*(){if(!1!==(null==n?void 0:n.requireDOM)&&isSSR$1())return void handleSSRUnsupported(e,e);if(null==n?void 0:n.validateBinding){if(!validateBinding(o.value,{validator:n.validateBinding},e).success)return}const s=yield withErrorRecovery(()=>t(r,o,i),{onError:(t,n)=>{logWarning("invalid-binding",`${e} error (attempt ${n+1}): ${t.message}`,e)}});return s.success?s.value:void 0})}function getElementWithFallback(e,t){let n=document.querySelector(e);if(!n&&t)for(const e of t)if(n=document.querySelector(e),n)break;return n||logWarning("element-not-found",`Element not found: ${e}`),n}function isInViewport(e){if(isSSR$1())return!1;try{const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}catch(e){return logWarning("element-not-found","Failed to get element bounds"),!1}}function setupCleanupOnUnload(e){isSSR$1()||(window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e))}function getMemoryStats(){return{observerCount:_observerCount,maxObservers:_config$3.memory.maxObservers,warningCount:_warnings.length,usedPercentage:_observerCount/_config$3.memory.maxObservers*100}}const DEFAULT_ENTERPRISE_PERMISSION_CONFIG={sources:[],roles:{},cache:{key:"__directix_permissions",enabled:!0,ttl:3e5},audit:{enabled:!0,logToConsole:!1},defaultBehavior:"deny"};class EnterprisePermissionManager{constructor(e={}){__publicField(this,"config"),__publicField(this,"permissions",new Set),__publicField(this,"resolvedRoles",new Map),__publicField(this,"auditLogs",[]),__publicField(this,"cacheTimestamp",0),__publicField(this,"refreshTimer",null),__publicField(this,"initialized",!1),this.config=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG),e),{cache:__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG.cache),e.cache),audit:__spreadValues(__spreadValues({},DEFAULT_ENTERPRISE_PERMISSION_CONFIG.audit),e.audit)})}initialize(){return __async(this,null,function*(){this.initialized||(yield this.loadPermissions(),this.resolveAllRoles(),this.setupRefreshTimer(),this.initialized=!0)})}loadPermissions(){return __async(this,null,function*(){const e=[];for(const t of this.config.sources)try{const n=yield this.loadFromSource(t);e.push(...n)}catch(e){console.warn(`[Directix] Failed to load permissions from ${t.type}:`,e)}this.permissions=new Set(e),this.cacheTimestamp=Date.now()})}loadFromSource(e){return __async(this,null,function*(){switch(e.type){case"static":return e.permissions||[];case"api":return this.loadFromApi(e);case"localStorage":case"sessionStorage":return this.loadFromStorage(e);case"custom":return e.custom?yield e.custom():[];default:return[]}})}loadFromApi(e){return __async(this,null,function*(){if(!e.api)return[];try{const t=yield fetch(e.api.url,{method:e.api.method,headers:e.api.headers});if(!t.ok)throw new Error(`API returned ${t.status}`);const n=yield t.json();return e.api.transform?e.api.transform(n):n.permissions||[]}catch(e){throw new Error(`API permission load failed: ${e}`)}})}loadFromStorage(e){var t,n;if("undefined"==typeof window)return[];const r=("localStorage"===e.type?localStorage:sessionStorage).getItem((null==(t=e.storage)?void 0:t.key)||"permissions");return r?(null==(n=e.storage)?void 0:n.parse)?e.storage.parse(r):JSON.parse(r):[]}resolveAllRoles(){for(const e of Object.keys(this.config.roles))this.resolveRole(e,new Set)}resolveRole(e,t){if(this.resolvedRoles.has(e))return this.resolvedRoles.get(e);if(t.has(e))return console.warn(`[Directix] Circular role inheritance detected: ${e}`),new Set;t.add(e);const n=this.config.roles[e];if(!n)return new Set;const r=new Set(n.permissions);if(n.inherits)for(const e of n.inherits){this.resolveRole(e,new Set(t)).forEach(e=>r.add(e))}return this.resolvedRoles.set(e,r),r}setupRefreshTimer(){var e;const t=this.config.sources.find(e=>{var t;return"api"===e.type&&(null==(t=e.api)?void 0:t.refreshInterval)});(null==(e=null==t?void 0:t.api)?void 0:e.refreshInterval)&&"undefined"!=typeof window&&(this.refreshTimer=window.setInterval(()=>this.loadPermissions(),t.api.refreshInterval))}check(e,t){return __async(this,null,function*(){this.config.cache.enabled&&Date.now()-this.cacheTimestamp>this.config.cache.ttl&&(yield this.loadPermissions());let n,r=!1,o="direct";if(this.config.customCheck){(yield this.config.customCheck(e,t))&&(r=!0,o="custom")}if(!r&&this.permissions.has(e)&&(r=!0,o="permission"),!r&&this.permissions.has("*")&&(r=!0,o="wildcard",n="User has wildcard permission"),!r)for(const[t,n]of this.resolvedRoles)if(n.has(e)){r=!0,o=`role:${t}`;break}if(!r)for(const[e,t]of this.resolvedRoles)if(t.has("*")){r=!0,o=`role:${e}:wildcard`,n=`Role ${e} has wildcard permission`;break}r||"allow"!==this.config.defaultBehavior||(r=!0,o="default",n="Default behavior is allow");const i={granted:r,permission:e,source:o,timestamp:Date.now(),context:t,reason:n};return this.config.audit.enabled&&this.logAudit(i),i})}checkSync(e,t){let n=!1,r="direct";if(this.permissions.has(e)&&(n=!0,r="permission"),!n&&this.permissions.has("*")&&(n=!0,r="wildcard"),!n)for(const[t,o]of this.resolvedRoles)if(o.has(e)||o.has("*")){n=!0,r=`role:${t}`;break}const o={granted:n,permission:e,source:r,timestamp:Date.now(),context:t};return this.config.audit.enabled&&this.logAudit(o),o}checkAll(e,t){return __async(this,null,function*(){const n={};for(const r of e){const e=yield this.check(r,t);n[r]=e.granted}return n})}checkAny(e,t){return __async(this,null,function*(){for(const n of e){if((yield this.check(n,t)).granted)return!0}return!1})}logAudit(e){const t={id:`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,timestamp:e.timestamp,permission:e.permission,result:e.granted?"granted":"denied",source:e.source,context:e.context,reason:e.reason,userAgent:"undefined"!=typeof navigator?navigator.userAgent:void 0,url:"undefined"!=typeof window?window.location.href:void 0};this.auditLogs.push(t),this.config.audit.onCheck&&this.config.audit.onCheck(e),e.granted&&this.config.audit.onGrant&&this.config.audit.onGrant(e),!e.granted&&this.config.audit.onDeny&&this.config.audit.onDeny(e),this.config.audit.logToConsole&&console.info(`[Directix Permission] ${e.permission}: ${e.granted?"GRANTED":"DENIED"} (${e.source})`)}getAuditLogs(e){let t=[...this.auditLogs];return e&&(e.permission&&(t=t.filter(t=>t.permission===e.permission)),e.result&&(t=t.filter(t=>t.result===e.result)),void 0!==e.since&&(t=t.filter(t=>t.timestamp>=e.since))),(null==e?void 0:e.limit)&&(t=t.slice(-e.limit)),t}clearAuditLogs(){this.auditLogs=[]}addPermission(e){this.permissions.add(e)}removePermission(e){this.permissions.delete(e)}getPermissions(){return Array.from(this.permissions)}addRole(e){this.config.roles[e.name]=e,this.resolvedRoles.clear(),this.resolveRole(e.name,new Set)}removeRole(e){delete this.config.roles[e],this.resolvedRoles.delete(e)}getRolePermissions(e){const t=this.resolvedRoles.get(e);return t?Array.from(t):[]}exportAuditLogs(e="json"){if("csv"===e){const e=["id","timestamp","permission","result","source","reason","url"],t=this.auditLogs.map(e=>[e.id,e.timestamp,e.permission,e.result,e.source,e.reason||"",e.url||""]);return[e.join(","),...t.map(e=>e.join(","))].join("\n")}return JSON.stringify(this.auditLogs,null,2)}destroy(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.permissions.clear(),this.resolvedRoles.clear(),this.auditLogs=[],this.initialized=!1}}let _globalManager=null;function configureEnterprisePermission(e){return _globalManager=new EnterprisePermissionManager(e),_globalManager}function getPermissionManager(){return _globalManager}function hasPermission$2(e,t){return __async(this,null,function*(){if(!_globalManager)return console.warn("[Directix] Permission manager not initialized"),!1;return(yield _globalManager.check(e,t)).granted})}function hasPermissionSync(e,t){return!!_globalManager&&_globalManager.checkSync(e,t).granted}function createPermissionCheck(e,t="any"){return n=>__async(null,null,function*(){if(!_globalManager)return!1;const r=Array.isArray(e)?e:[e];if("all"===t){const e=yield _globalManager.checkAll(r,n);return Object.values(e).every(Boolean)}return _globalManager.checkAny(r,n)})}const DEFAULT_FIRST_SCREEN_CONFIG={lazyLoading:{enabled:!0,rootMargin:"50px",threshold:.1,deferNonCritical:!0},codeSplitting:{enabled:!0,preloadAfter:1e3,prefetchVisible:!0},resourceHints:{preconnect:[],preload:[],prefetch:[],dnsPrefetch:[]},deferredExecution:{enabled:!0,deferDelay:100,priorityQueue:!0},criticalCSS:{extract:!1,inline:!0,inlineThreshold:14e3}};let _config$2=DEFAULT_FIRST_SCREEN_CONFIG,_deferredTasks=[],_metrics$1={},_isDOMReady=!1,_isPageLoaded=!1;function configureFirstScreen(e){_config$2=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG),e),{lazyLoading:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.lazyLoading),e.lazyLoading),codeSplitting:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.codeSplitting),e.codeSplitting),resourceHints:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.resourceHints),e.resourceHints),deferredExecution:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.deferredExecution),e.deferredExecution),criticalCSS:__spreadValues(__spreadValues({},DEFAULT_FIRST_SCREEN_CONFIG.criticalCSS),e.criticalCSS)})}function getFirstScreenConfig(){return __spreadValues({},_config$2)}function isSSR(){return"undefined"==typeof window}function initFirstScreenOptimizer(){isSSR()||(injectResourceHints(),setupPerformanceObserver(),"loading"!==document.readyState?_isDOMReady=!0:document.addEventListener("DOMContentLoaded",()=>{_isDOMReady=!0,_metrics$1.domContentLoaded=performance.now()}),"complete"===document.readyState?_isPageLoaded=!0:window.addEventListener("load",()=>{_isPageLoaded=!0,_metrics$1.load=performance.now(),_config$2.deferredExecution.enabled&&executeDeferredTasks()}))}function injectResourceHints(){if(!_config$2.resourceHints)return;const e=document.head;for(const t of _config$2.resourceHints.preconnect){const n=document.createElement("link");n.rel="preconnect",n.href=t,e.appendChild(n)}for(const t of _config$2.resourceHints.dnsPrefetch){const n=document.createElement("link");n.rel="dns-prefetch",n.href=t,e.appendChild(n)}for(const t of _config$2.resourceHints.preload){const n=document.createElement("link");n.rel="preload",n.href=t,n.as=getResourceType(t),e.appendChild(n)}for(const t of _config$2.resourceHints.prefetch){const n=document.createElement("link");n.rel="prefetch",n.href=t,e.appendChild(n)}}function getResourceType(e){return e.endsWith(".js")?"script":e.endsWith(".css")?"style":/\.(woff2?|ttf|otf|eot)$/.test(e)?"font":/\.(png|jpg|jpeg|gif|webp|svg|ico)$/.test(e)?"image":"fetch"}function setupPerformanceObserver(){if("PerformanceObserver"in window)try{new PerformanceObserver(e=>{for(const t of e.getEntries())"first-paint"===t.name?_metrics$1.firstPaint=t.startTime:"first-contentful-paint"===t.name&&(_metrics$1.firstContentfulPaint=t.startTime)}).observe({type:"paint",buffered:!0});new PerformanceObserver(e=>{const t=e.getEntries();t.length>0&&(_metrics$1.largestContentfulPaint=t[t.length-1].startTime)}).observe({type:"largest-contentful-paint",buffered:!0});let e=0;new PerformanceObserver(t=>{for(const n of t.getEntries())n.hadRecentInput||(e+=n.value);_metrics$1.cumulativeLayoutShift=e}).observe({type:"layout-shift",buffered:!0});new PerformanceObserver(e=>{var t;let n=null!=(t=_metrics$1.totalBlockingTime)?t:0;for(const t of e.getEntries())n+=t.duration-50;_metrics$1.totalBlockingTime=n}).observe({type:"longtask",buffered:!0})}catch(e){}}function createLazyLoader(e){var t,n;if(isSSR()||!("IntersectionObserver"in window))return{observe:()=>{},unobserve:()=>{},disconnect:()=>{}};const r=new IntersectionObserver(t=>{var n;for(const o of t)o.isIntersecting&&(null==(n=null==e?void 0:e.onVisible)||n.call(e,o.target),r.unobserve(o.target))},{rootMargin:null!=(t=null==e?void 0:e.rootMargin)?t:_config$2.lazyLoading.rootMargin,threshold:null!=(n=null==e?void 0:e.threshold)?n:_config$2.lazyLoading.threshold});return{observe:e=>r.observe(e),unobserve:e=>r.unobserve(e),disconnect:()=>r.disconnect()}}function deferTask(e,t,n="medium"){_config$2.deferredExecution.enabled?_deferredTasks.some(t=>t.id===e)||_deferredTasks.push({id:e,priority:n,execute:t,executed:!1}):t()}function executeDeferredTasks(){return __async(this,null,function*(){if(!_config$2.deferredExecution.priorityQueue){for(const e of _deferredTasks)e.executed||(yield e.execute(),e.executed=!0);return}const e=["critical","high","medium","low"];for(const t of e){const e=_deferredTasks.filter(e=>e.priority===t&&!e.executed);if("low"===t&&"requestIdleCallback"in window)for(const t of e)window.requestIdleCallback(()=>__async(null,null,function*(){yield t.execute(),t.executed=!0}));else for(const t of e)yield t.execute(),t.executed=!0}})}function preloadModule(e){if(isSSR())return;const t=document.createElement("link");t.rel="modulepreload",t.href=e,document.head.appendChild(t)}function prefetchModule(e){if(isSSR())return;const t=document.createElement("link");t.rel="prefetch",t.href=e,t.as="script",document.head.appendChild(t)}function deferNonCriticalDirective(e,t,n=!1){!n&&_config$2.lazyLoading.deferNonCritical?"requestIdleCallback"in window?window.requestIdleCallback(()=>{t()},{timeout:_config$2.codeSplitting.preloadAfter}):setTimeout(t,_config$2.codeSplitting.preloadAfter):t()}function prefetchVisibleElements(e,t,n){var r;if(!_config$2.codeSplitting.prefetchVisible||isSSR())return;const o=createLazyLoader({rootMargin:null!=(r=null==n?void 0:n.rootMargin)?r:"200px",onVisible:e=>{const n=t(e);n&&prefetchModule(n)}});document.querySelectorAll(e).forEach(e=>o.observe(e))}function getFirstScreenMetrics(){return __spreadValues({},_metrics$1)}function calculateTTI(){if(_metrics$1.load&&_metrics$1.domContentLoaded)return Math.max(_metrics$1.load,_metrics$1.domContentLoaded)}function extractCriticalCSS(){if(isSSR())return"";const e=[],t=Array.from(document.styleSheets);for(const n of t)try{const t=Array.from(n.cssRules||[]);for(const n of t)isCriticalRule(n)&&e.push(n.cssText)}catch(e){}return e.join("\n")}function isCriticalRule(e){if(e instanceof CSSStyleRule)try{const t=document.querySelectorAll(e.selectorText);for(const e of t)if(isElementAboveFold(e))return!0}catch(e){}return!1}function isElementAboveFold(e){const t=e.getBoundingClientRect(),n=window.innerHeight;return t.top<n&&t.bottom>0}function inlineCriticalCSS(e){if(isSSR()||!e)return;const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}function isDOMReady(){return _isDOMReady}function isPageLoaded(){return _isPageLoaded}function onDOMReady(e){_isDOMReady?e():document.addEventListener("DOMContentLoaded",e)}function onPageLoad(e){_isPageLoaded?e():window.addEventListener("load",e)}function requestIdleCallback(e,t){if("undefined"!=typeof window&&"requestIdleCallback"in window)return window.requestIdleCallback(e,t);const n=setTimeout(()=>{const t=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1);return"number"==typeof n?n:Number(n)}function cancelIdleCallback(e){"undefined"!=typeof window&&"cancelIdleCallback"in window?window.cancelIdleCallback(e):clearTimeout(e)}function createPerformanceBudget(e){return{check:()=>{const t=[],n=getFirstScreenMetrics();return e.fcp&&n.firstContentfulPaint&&n.firstContentfulPaint>e.fcp&&t.push(`FCP exceeded: ${n.firstContentfulPaint}ms > ${e.fcp}ms`),e.lcp&&n.largestContentfulPaint&&n.largestContentfulPaint>e.lcp&&t.push(`LCP exceeded: ${n.largestContentfulPaint}ms > ${e.lcp}ms`),e.tti&&n.timeToInteractive&&n.timeToInteractive>e.tti&&t.push(`TTI exceeded: ${n.timeToInteractive}ms > ${e.tti}ms`),e.cls&&n.cumulativeLayoutShift&&n.cumulativeLayoutShift>e.cls&&t.push(`CLS exceeded: ${n.cumulativeLayoutShift} > ${e.cls}`),e.tbt&&n.totalBlockingTime&&n.totalBlockingTime>e.tbt&&t.push(`TBT exceeded: ${n.totalBlockingTime}ms > ${e.tbt}ms`),{passed:0===t.length,violations:t}},report:()=>{const e=getFirstScreenMetrics(),t=["First Screen Performance Report","=".repeat(40)];return e.firstPaint&&t.push(`First Paint: ${e.firstPaint.toFixed(2)}ms`),e.firstContentfulPaint&&t.push(`FCP: ${e.firstContentfulPaint.toFixed(2)}ms`),e.largestContentfulPaint&&t.push(`LCP: ${e.largestContentfulPaint.toFixed(2)}ms`),e.domContentLoaded&&t.push(`DCL: ${e.domContentLoaded.toFixed(2)}ms`),e.load&&t.push(`Load: ${e.load.toFixed(2)}ms`),e.cumulativeLayoutShift&&t.push(`CLS: ${e.cumulativeLayoutShift.toFixed(4)}`),e.totalBlockingTime&&t.push(`TBT: ${e.totalBlockingTime.toFixed(2)}ms`),t.join("\n")}}}function cleanupFirstScreenOptimizer(){_deferredTasks=[],_metrics$1={}}const DEPRECATED_APIS_REGISTRY={"directix-v1":[{name:"v-debounce.immediate modifier",pattern:/v-debounce\.immediate/g,deprecatedIn:"1.5.0",removedIn:"2.0.0",replacement:"v-debounce with { immediate: true } option",migrationCode:'v-debounce="{ handler, wait, immediate: true }"'},{name:"v-throttle.leading modifier",pattern:/v-throttle\.leading/g,deprecatedIn:"1.5.0",removedIn:"2.0.0",replacement:"v-throttle with { leading: true } option",migrationCode:'v-throttle="{ handler, wait, leading: true }"'},{name:"v-copy.static modifier",pattern:/v-copy\.static/g,deprecatedIn:"1.8.0",removedIn:"2.0.0",replacement:"v-copy with value directly",migrationCode:'v-copy="text"'}],vueuse:[{name:"useDebounceFn",pattern:/useDebounceFn/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useDebounce from @directix/core",migrationCode:'import { useDebounce } from "@directix/core"'},{name:"useThrottleFn",pattern:/useThrottleFn/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useThrottle from @directix/core",migrationCode:'import { useThrottle } from "@directix/core"'},{name:"useIntersectionObserver",pattern:/useIntersectionObserver/g,deprecatedIn:"vueuse",removedIn:"n/a",replacement:"useIntersection from @directix/core",migrationCode:'import { useIntersection } from "@directix/core"'}],"v-directives":[{name:"v-clickaway",pattern:/v-clickaway/g,deprecatedIn:"v-directives",removedIn:"n/a",replacement:"v-click-outside from directix",migrationCode:'v-click-outside="handler"'},{name:"v-lazy-img",pattern:/v-lazy-img/g,deprecatedIn:"v-directives",removedIn:"n/a",replacement:"v-lazy from directix",migrationCode:'v-lazy="imageUrl"'}],custom:[]};function detectLegacyUsage(e,t="directix-v1"){const n=[],r=[],o=[],i=[],s=DEPRECATED_APIS_REGISTRY[t]||[];for(const t of s){const r=findMatches(e,t.pattern);for(const e of r)n.push({name:t.name,location:e.location,line:e.line,deprecatedIn:t.deprecatedIn,removedIn:t.removedIn,replacement:t.replacement,migrationCode:t.migrationCode}),t.migrationCode&&i.push({original:e.text,suggested:t.migrationCode,location:e.location,line:e.line,autoFixable:void 0!==t.migrationCode})}checkBreakingChanges(e,r,o);const a=n.length+r.length+o.length;let l="low";return a>10||r.some(e=>"api"===e.type)?l="high":(a>5||r.length>0)&&(l="medium"),{deprecatedAPIs:n,breakingChanges:r,warnings:o,suggestions:i,totalIssues:a,severity:l}}function findMatches(e,t){const n=[],r=e.split("\n");for(let e=0;e<r.length;e++){const o=r[e].match(t);o&&n.push({text:o[0],location:`line ${e+1}`,line:e+1})}return n}function checkBreakingChanges(e,t,n){/Vue\.component\(|new Vue\(/.test(e)&&n.push({message:"Vue 2 syntax detected - will need changes for Vue 3",location:"codebase",line:0,severity:"warning"}),/export default\s*\{[\s\S]*methods:/.test(e)&&n.push({message:"Options API detected - consider using Composition API",location:"codebase",line:0,severity:"info"}),/this\.\$directix/.test(e)&&t.push({name:"this.$directix",type:"api",location:"codebase",line:0,description:"Global injection pattern changed",migration:"Use useDirectix() composable instead"})}function migrate(e,t){const n=[],r=[];let o=e;for(const e of t.rules){const t="string"==typeof e.pattern?new RegExp(e.pattern,"g"):e.pattern,i=findMatches(o,t);if(e.autoFixable&&i.length>0){o=o.replace(t,e.replacement);for(const t of i)n.push({type:"replace",location:t.location,line:t.line,original:t.text,new:e.replacement,description:e.description})}else if(!e.autoFixable&&i.length>0)for(const t of i)r.push(`Manual fix needed at ${t.location}: ${e.description}`)}const i={filesProcessed:1,filesChanged:n.length>0?1:0,totalChanges:n.length,autoFixes:n.filter(e=>"replace"===e.type).length,manualFixes:r.length,warnings:r.length,errors:0};return{code:o,changes:n,warnings:r,stats:i}}function generateMigrationReport(e,t){return"json"===t?JSON.stringify(e,null,2):"markdown"===t?generateMarkdownReport(e):generateTextReport(e)}function generateTextReport(e){const t=[];if(t.push("=".repeat(60)),t.push("Directix Migration Report"),t.push("=".repeat(60)),t.push(""),t.push(`Total Issues: ${e.totalIssues}`),t.push(`Severity: ${e.severity.toUpperCase()}`),t.push(""),e.deprecatedAPIs.length>0){t.push("Deprecated APIs:"),t.push("-".repeat(40));for(const n of e.deprecatedAPIs)t.push(` ${n.name}`),t.push(` Location: ${n.location}`),t.push(` Deprecated: ${n.deprecatedIn}, Removed: ${n.removedIn}`),t.push(` Replacement: ${n.replacement}`),n.migrationCode&&t.push(` Migration: ${n.migrationCode}`),t.push("")}if(e.breakingChanges.length>0){t.push("Breaking Changes:"),t.push("-".repeat(40));for(const n of e.breakingChanges)t.push(` ${n.name} (${n.type})`),t.push(` Description: ${n.description}`),t.push(` Migration: ${n.migration}`),t.push("")}if(e.suggestions.length>0){t.push("Suggestions:"),t.push("-".repeat(40));for(const n of e.suggestions)t.push(` ${n.location}`),t.push(` Original: ${n.original}`),t.push(` Suggested: ${n.suggested}`),t.push(" Auto-fixable: "+(n.autoFixable?"Yes":"No")),t.push("")}return t.join("\n")}function generateMarkdownReport(e){const t=[];if(t.push("# Directix Migration Report"),t.push(""),t.push(`**Total Issues:** ${e.totalIssues}`),t.push(`**Severity:** ${e.severity}`),t.push(""),e.deprecatedAPIs.length>0){t.push("## Deprecated APIs"),t.push(""),t.push("| API | Location | Deprecated | Removed | Replacement |"),t.push("|-----|----------|------------|---------|-------------|");for(const n of e.deprecatedAPIs)t.push(`| ${n.name} | ${n.location} | ${n.deprecatedIn} | ${n.removedIn} | ${n.replacement} |`);t.push("")}if(e.breakingChanges.length>0){t.push("## Breaking Changes"),t.push("");for(const n of e.breakingChanges)t.push(`### ${n.name}`),t.push(""),t.push(`- **Type:** ${n.type}`),t.push(`- **Description:** ${n.description}`),t.push(`- **Migration:** ${n.migration}`),t.push("")}if(e.suggestions.length>0){t.push("## Suggestions"),t.push(""),t.push("| Location | Original | Suggested | Auto-fixable |"),t.push("|----------|----------|-----------|--------------|");for(const n of e.suggestions)t.push(`| ${n.location} | ${n.original} | ${n.suggested} | ${n.autoFixable?"✓":"✗"} |`);t.push("")}return t.join("\n")}function getMigrationRules(e){const t=[],n=DEPRECATED_APIS_REGISTRY[e]||[];for(const e of n)e.migrationCode&&t.push({pattern:e.pattern,replacement:e.migrationCode,description:`Migrate ${e.name} to ${e.replacement}`,autoFixable:!0});return t}function needsMigration(e,t="directix-v1"){return detectLegacyUsage(e,t).totalIssues>0}function estimateMigrationEffort(e){const t=e.suggestions.filter(e=>e.autoFixable).length,n=e.suggestions.length||1,r=Math.round(t/n*100);let o="easy",i="5 minutes";return"high"===e.severity?(o="hard",i="1-2 hours"):"medium"===e.severity?(o="medium",i="15-30 minutes"):r<50&&(o="medium",i="30 minutes"),{estimatedTime:i,difficulty:o,autoFixablePercentage:r}}const DEFAULT_MONITORING_CONFIG={enabled:!0,metrics:{enabled:!0,prefix:"directix_",labels:{},flushInterval:6e4,maxBatchSize:100},alerts:{enabled:!0,channels:[],rules:[],cooldown:3e5,aggregation:!0,aggregationWindow:6e4},health:{enabled:!0,endpoint:"/health",checks:[],interval:3e4},integrations:{}};let _config$1=DEFAULT_MONITORING_CONFIG,_metrics=[],_alerts=[],_flushTimer=null,_healthTimer=null;const _counters=new Map,_gauges=new Map,_histograms=new Map,_alertCooldowns=new Map,_healthStatus=new Map;function configureMonitoring(e){_config$1=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG),e),{metrics:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.metrics),e.metrics),alerts:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.alerts),e.alerts),health:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.health),e.health),integrations:__spreadValues(__spreadValues({},DEFAULT_MONITORING_CONFIG.integrations),e.integrations)}),_config$1.enabled&&(startFlushTimer(),startHealthChecks())}function getMonitoringConfig(){return __spreadValues({},_config$1)}function incrementCounter(e,t,n=1){var r;if(!_config$1.enabled||!_config$1.metrics.enabled)return;const o=getMetricKey(e,t),i=null!=(r=_counters.get(o))?r:0;_counters.set(o,i+n),addMetric(e,"counter",i+n,t)}function setGauge(e,t,n){if(!_config$1.enabled||!_config$1.metrics.enabled)return;const r=getMetricKey(e,n);_gauges.set(r,t),addMetric(e,"gauge",t,n)}function recordHistogram(e,t,n){var r;if(!_config$1.enabled||!_config$1.metrics.enabled)return;const o=getMetricKey(e,n),i=null!=(r=_histograms.get(o))?r:[];i.push(t),_histograms.set(o,i),addMetric(e,"histogram",t,n)}function timeOperation(e,t,n){return __async(this,null,function*(){const r=performance.now();try{const o=yield t(),i=performance.now()-r;return recordHistogram(`${e}_duration`,i,n),incrementCounter(`${e}_total`,n),incrementCounter(`${e}_success`,n),o}catch(t){throw incrementCounter(`${e}_total`,n),incrementCounter(`${e}_error`,n),t}})}function getMetricKey(e,t){return`${e}{${t?Object.entries(t).map(([e,t])=>`${e}="${t}"`).join(","):""}}`}function addMetric(e,t,n,r){_metrics.push({name:`${_config$1.metrics.prefix}${e}`,type:t,value:n,labels:__spreadValues(__spreadValues({},_config$1.metrics.labels),r),timestamp:Date.now()}),_metrics.length>=_config$1.metrics.maxBatchSize&&flushMetrics()}function getMetrics(e){let t=[..._metrics];return(null==e?void 0:e.name)&&(t=t.filter(t=>t.name.includes(e.name))),(null==e?void 0:e.type)&&(t=t.filter(t=>t.type===e.type)),(null==e?void 0:e.since)&&(t=t.filter(t=>t.timestamp>=e.since)),t}function getCounterValue(e,t){var n;const r=getMetricKey(e,t);return null!=(n=_counters.get(r))?n:0}function getGaugeValue(e,t){const n=getMetricKey(e,t);return _gauges.get(n)}function getHistogramStats(e,t){const n=getMetricKey(e,t),r=_histograms.get(n);if(!r||0===r.length)return;const o=[...r].sort((e,t)=>e-t),i=o.reduce((e,t)=>e+t,0);return{count:o.length,min:o[0],max:o[o.length-1],mean:i/o.length,p50:o[Math.floor(.5*o.length)],p95:o[Math.floor(.95*o.length)],p99:o[Math.floor(.99*o.length)]}}function flushMetrics(){if(0===_metrics.length)return;const e=[..._metrics];_metrics=[],pushToIntegrations(e)}function pushToIntegrations(e){return __async(this,null,function*(){const{datadog:t,custom:n}=_config$1.integrations;(null==n?void 0:n.enabled)&&n.pushMetrics&&(yield n.pushMetrics(e)),(null==t?void 0:t.enabled)&&(yield pushToDatadog(e,t))})}function pushToDatadog(e,t){return __async(this,null,function*(){var n;try{yield fetch("https://api.datadoghq.com/api/v1/series",{method:"POST",headers:{"Content-Type":"application/json","DD-API-KEY":t.apiKey,"DD-APPLICATION-KEY":null!=(n=t.appKey)?n:""},body:JSON.stringify({series:e.map(e=>({metric:e.name,points:[[e.timestamp/1e3,e.value]],tags:Object.entries(e.labels).map(([e,t])=>`${e}:${t}`),host:t.host}))})})}catch(e){}})}function startFlushTimer(){_flushTimer&&clearInterval(_flushTimer),_flushTimer=window.setInterval(()=>{flushMetrics()},_config$1.metrics.flushInterval)}function triggerAlert(e,t,n,r,o){var i;if(!_config$1.enabled||!_config$1.alerts.enabled)return null;if(_alertCooldowns.has(e)){const t=_alertCooldowns.get(e);if(Date.now()-t<_config$1.alerts.cooldown)return null}const s=_config$1.alerts.rules.find(t=>t.id===e);if(!s||!s.enabled)return null;const a={id:`alert-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,name:s.name,value:n,ruleId:e,severity:s.severity,status:"active",message:t,labels:__spreadValues(__spreadValues({},s.labels),o),threshold:r,startedAt:Date.now()};return _alerts.push(a),_alertCooldowns.set(e,Date.now()),sendAlertToChannels(a),(null==(i=_config$1.integrations.custom)?void 0:i.enabled)&&_config$1.integrations.custom.pushAlert&&_config$1.integrations.custom.pushAlert(a),a}function resolveAlert(e){const t=_alerts.find(t=>t.id===e);return!(!t||"resolved"===t.status)&&(t.status="resolved",t.resolvedAt=Date.now(),!0)}function acknowledgeAlert(e,t){const n=_alerts.find(t=>t.id===e);return!(!n||"active"!==n.status)&&(n.status="acknowledged",n.acknowledgedAt=Date.now(),n.acknowledgedBy=t,!0)}function sendAlertToChannels(e){return __async(this,null,function*(){for(const t of _config$1.alerts.channels)if(t.severity.includes(e.severity))try{switch(t.type){case"webhook":yield sendWebhookAlert(e,t.config);break;case"slack":yield sendSlackAlert(e,t.config);break;case"custom":t.config.handler&&(yield t.config.handler(e))}}catch(e){}})}function sendWebhookAlert(e,t){return __async(this,null,function*(){yield fetch(t.url,{method:"POST",headers:t.headers||{"Content-Type":"application/json"},body:JSON.stringify(e)})})}function sendSlackAlert(e,t){return __async(this,null,function*(){const n={info:"#36a64f",warning:"#ff9900",error:"#ff0000",critical:"#990000"}[e.severity];yield fetch(t.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attachments:[{color:n,title:e.name,text:e.message,fields:[{value:e.severity,title:"Severity",short:!0},{value:e.status,title:"Status",short:!0},{value:String(e.value),title:"Value",short:!0},{value:String(e.threshold),title:"Threshold",short:!0}],ts:Math.floor(e.startedAt/1e3)}]})})})}function getAlerts(e){let t=[..._alerts];return(null==e?void 0:e.status)&&(t=t.filter(t=>t.status===e.status)),(null==e?void 0:e.severity)&&(t=t.filter(t=>t.severity===e.severity)),(null==e?void 0:e.ruleId)&&(t=t.filter(t=>t.ruleId===e.ruleId)),(null==e?void 0:e.since)&&(t=t.filter(t=>t.startedAt>=e.since)),t}function clearAlerts(){_alerts=[],_alertCooldowns.clear()}function startHealthChecks(){_config$1.health.enabled&&0!==_config$1.health.checks.length&&(runHealthChecks(),_healthTimer&&clearInterval(_healthTimer),_healthTimer=window.setInterval(runHealthChecks,_config$1.health.interval))}function runHealthChecks(){return __async(this,null,function*(){for(const e of _config$1.health.checks){if(!e.enabled)continue;const t=performance.now();try{const n=new Promise((t,n)=>setTimeout(()=>n(new Error("Timeout")),e.timeout)),r=yield Promise.race([Promise.resolve(e.check()),n]);_healthStatus.set(e.name,{name:e.name,healthy:r,lastCheck:Date.now(),latency:performance.now()-t})}catch(n){_healthStatus.set(e.name,{name:e.name,healthy:!1,lastCheck:Date.now(),error:String(n),latency:performance.now()-t})}}})}function getHealthStatus(){const e=Array.from(_healthStatus.values());return{healthy:e.every(e=>e.healthy),checks:e,timestamp:Date.now()}}function addHealthCheck(e){_config$1.health.checks.push(e),_healthStatus.set(e.name,{name:e.name,healthy:!0,lastCheck:0,latency:0})}function removeHealthCheck(e){_config$1.health.checks=_config$1.health.checks.filter(t=>t.name!==e),_healthStatus.delete(e)}function exportPrometheusMetrics(){const e=[];for(const[t,n]of _counters)e.push(`# TYPE ${t.split("{")[0]} counter`),e.push(`${t} ${n}`);for(const[t,n]of _gauges)e.push(`# TYPE ${t.split("{")[0]} gauge`),e.push(`${t} ${n}`);for(const[t,n]of _histograms){const r=t.split("{")[0];e.push(`# TYPE ${r} histogram`);const o=[...n].sort((e,t)=>e-t);for(const n of o)e.push(`${t} ${n}`)}return e.join("\n")}function resetMonitoring(){_flushTimer&&(clearInterval(_flushTimer),_flushTimer=null),_healthTimer&&(clearInterval(_healthTimer),_healthTimer=null),_metrics=[],_counters.clear(),_gauges.clear(),_histograms.clear(),_alerts=[],_alertCooldowns.clear(),_healthStatus.clear()}function getMonitoringStats(){return{metricsCount:_metrics.length,alertsCount:_alerts.length,activeAlerts:_alerts.filter(e=>"active"===e.status).length,healthChecksCount:_config$1.health.checks.length,healthyChecks:Array.from(_healthStatus.values()).filter(e=>e.healthy).length}}const state={config:{enabled:!1,maxMetrics:1e3,sampleRate:1,warnThreshold:16},metrics:[],directiveMetrics:new Map,startMarks:new Map};function configurePerformance(e){state.config=__spreadValues(__spreadValues({},state.config),e)}function enablePerformance(){state.config.enabled=!0}function disablePerformance(){state.config.enabled=!1}function isPerformanceEnabled(){return state.config.enabled}function startMeasure(e,t){if(!state.config.enabled||isSSR$2())return"";if(state.config.sampleRate<1&&Math.random()>state.config.sampleRate)return"";const n=`${e}:${t}:${Date.now()}:${Math.random().toString(36).slice(2,7)}`;if(state.startMarks.set(n,performance.now()),"undefined"!=typeof performance&&performance.mark)try{performance.mark(`${n}-start`)}catch(e){}return n}function endMeasure(e,t,n,r){if(!e||!state.config.enabled||isSSR$2())return;const o=state.startMarks.get(e);if(void 0===o)return;const i=performance.now()-o;if(state.startMarks.delete(e),"undefined"!=typeof performance&&performance.mark&&performance.measure)try{performance.mark(`${e}-end`),performance.measure(`directix:${t}:${n}`,`${e}-start`,`${e}-end`)}catch(e){}const s={name:n,directive:t,duration:i,timestamp:Date.now(),metadata:r};state.metrics.push(s),state.metrics.length>state.config.maxMetrics&&state.metrics.shift(),state.directiveMetrics.has(t)||state.directiveMetrics.set(t,[]);const a=state.directiveMetrics.get(t);a.push(s),a.length>state.config.maxMetrics&&a.shift(),i>state.config.warnThreshold&&console.warn(`[Directix Performance] v-${t} ${n} took ${i.toFixed(2)}ms (threshold: ${state.config.warnThreshold}ms)`)}function getPerformanceMetrics(){return[...state.metrics]}function getDirectiveMetrics(e){return[...state.directiveMetrics.get(e)||[]]}function calculateStats(e){if(0===e.length)return{totalCalls:0,averageDuration:0,minDuration:0,maxDuration:0,p50:0,p95:0,p99:0};const t=e.map(e=>e.duration).sort((e,t)=>e-t),n=t.reduce((e,t)=>e+t,0);return{totalCalls:e.length,averageDuration:n/e.length,minDuration:t[0],maxDuration:t[t.length-1],p50:t[Math.floor(.5*t.length)],p95:t[Math.floor(.95*t.length)],p99:t[Math.floor(.99*t.length)]}}function getPerformanceReport(){const e=[];for(const[t,n]of state.directiveMetrics){const r=n.filter(e=>"mount"===e.name),o=n.filter(e=>"update"===e.name),i=n.filter(e=>"unmount"===e.name),s=n.reduce((e,t)=>e+t.duration,0);e.push({name:t,mount:calculateStats(r),update:calculateStats(o),unmount:calculateStats(i),totalTime:s,callCount:n.length})}return e.sort((e,t)=>t.totalTime-e.totalTime)}function getSlowestDirectives(e=10){return getPerformanceReport().slice(0,e)}function getMostFrequentDirectives(e=10){return getPerformanceReport().sort((e,t)=>t.callCount-e.callCount).slice(0,e)}function clearPerformanceMetrics(){state.metrics=[],state.directiveMetrics.clear(),state.startMarks.clear()}function exportPerformanceData(){return{config:state.config,metrics:getPerformanceMetrics(),report:getPerformanceReport()}}function measurePerformance(e,t,n,r){if(!state.config.enabled||isSSR$2())return n();const o=startMeasure(e,t);try{const i=n();return endMeasure(o,e,t,r),i}catch(n){throw endMeasure(o,e,t,__spreadProps(__spreadValues({},r),{error:!0})),n}}function measurePerformanceAsync(e,t,n,r){return __async(this,null,function*(){if(!state.config.enabled||isSSR$2())return n();const o=startMeasure(e,t);try{const i=yield n();return endMeasure(o,e,t,r),i}catch(n){throw endMeasure(o,e,t,__spreadProps(__spreadValues({},r),{error:!0})),n}})}function withPerformanceMonitoring(e,t){if(!state.config.enabled)return t;const n={};for(const[r,o]of Object.entries(t))if("function"==typeof o&&["mounted","updated","unmounted"].includes(r)){const t="mounted"===r?"mount":"updated"===r?"update":"unmount";n[r]=function(...n){return measurePerformance(e,t,()=>o.apply(this,n))}}else n[r]=o;return n}const DEFAULT_PERFORMANCE_CONFIG={eventDelegation:{enabled:!0,globalListeners:!0,batchProcessing:!0,batchSize:10},virtualization:{enabled:!0,scrollThreshold:100,listItemHeight:"auto",bufferSize:5},caching:{computedResults:!0,domQueries:!0,styleCalculations:!0,maxCacheSize:100},lazyInit:{directives:!0,events:!0,observers:!0,debounceMs:100},memory:{objectPool:!0,weakReferences:!0,cleanupOnUnmount:!0,periodicCleanup:6e4}};class EventBatchProcessor{constructor(e=10){__publicField(this,"queue",[]),__publicField(this,"processing",!1),__publicField(this,"batchSize"),__publicField(this,"scheduled",!1),this.batchSize=e}add(e,t,n){this.queue.push({target:e,event:t,handler:n}),this.scheduled||(this.scheduled=!0,requestAnimationFrame(()=>this.processBatch()))}processBatch(){if(this.scheduled=!1,this.processing||0===this.queue.length)return;this.processing=!0;const e=this.queue.splice(0,this.batchSize);for(const t of e)t.target.addEventListener(t.event,t.handler,{passive:!0});this.processing=!1,this.queue.length>0&&(this.scheduled=!0,requestAnimationFrame(()=>this.processBatch()))}clear(){this.queue.length=0,this.scheduled=!1}}class WeakCache{constructor(e=50){__publicField(this,"cache",new WeakMap),__publicField(this,"strongCache",new Map),__publicField(this,"maxStrongSize"),this.maxStrongSize=e}get(e){var t;return null!=(t=this.cache.get(e))?t:this.strongCache.get(e)}set(e,t){this.cache.set(e,t),this.strongCache.size<this.maxStrongSize&&this.strongCache.set(e,t)}has(e){return this.cache.has(e)||this.strongCache.has(e)}delete(e){const t=this.cache.delete(e),n=this.strongCache.delete(e);return t||n}clearStrong(){this.strongCache.clear()}size(){return this.strongCache.size}}class LazyInitializer{constructor(e){__publicField(this,"value",null),__publicField(this,"initFunction"),__publicField(this,"initialized",!1),__publicField(this,"pendingPromise",null),this.initFunction=e}get(){return this.initialized||(this.value=this.initFunction(),this.initialized=!0),this.value}getAsync(){return __async(this,null,function*(){return this.initialized?this.value:this.pendingPromise?this.pendingPromise:(this.pendingPromise=Promise.resolve(this.initFunction()),this.value=yield this.pendingPromise,this.initialized=!0,this.pendingPromise=null,this.value)})}isInitialized(){return this.initialized}reset(){this.value=null,this.initialized=!1,this.pendingPromise=null}}class ComputedCache{constructor(e,t=100,n=6e4){__publicField(this,"cache",new Map),__publicField(this,"maxSize"),__publicField(this,"computeFunction"),__publicField(this,"ttl"),this.computeFunction=e,this.maxSize=t,this.ttl=n}get(e,t){const n=this.cache.get(e);if(n){const e=this.compareDependencies(n.dependencies,t),r=Date.now()-n.timestamp<this.ttl;if(e&&r)return n.value}const r=this.computeFunction(e,...t);if(this.cache.size>=this.maxSize){const e=this.cache.keys().next().value;void 0!==e&&this.cache.delete(e)}return this.cache.set(e,{value:r,dependencies:t,timestamp:Date.now()}),r}compareDependencies(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}invalidate(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}}class DOMQueryCache{constructor(){__publicField(this,"queryCache",new WeakCache),__publicField(this,"styleCache",new WeakCache)}querySelector(e,t){var n;const r=null!=(n=this.queryCache.get(e))?n:new Map;if(this.queryCache.set(e,r),r.has(t))return r.get(t);const o=e.querySelector(t);return r.set(t,o),o}querySelectorAll(e,t){var n;const r=`all:${t}`,o=null!=(n=this.queryCache.get(e))?n:new Map;if(this.queryCache.set(e,o),o.has(r))return o.get(r);const i=Array.from(e.querySelectorAll(t));return o.set(r,i),i}getComputedStyle(e){const t=this.styleCache.get(e);if(t)return t;const n=window.getComputedStyle(e);return this.styleCache.set(e,n),n}invalidate(e){this.queryCache.delete(e),this.styleCache.delete(e)}}class MemoryCleanupManager{constructor(e=6e4){__publicField(this,"cleanupCallbacks",new Set),__publicField(this,"intervalId",null),__publicField(this,"cleanupInterval"),this.cleanupInterval=e}register(e){this.cleanupCallbacks.add(e)}unregister(e){this.cleanupCallbacks.delete(e)}start(){null===this.intervalId&&(this.intervalId=window.setInterval(()=>{this.runCleanup()},this.cleanupInterval))}stop(){null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null)}runCleanup(){for(const e of this.cleanupCallbacks)try{e()}catch(e){console.warn("[Directix] Cleanup callback failed:",e)}}size(){return this.cleanupCallbacks.size}}let _config=DEFAULT_PERFORMANCE_CONFIG,_eventBatchProcessor=null,_domQueryCache=null,_memoryCleanupManager=null;function configurePerformanceOptimization(e){_config=__spreadProps(__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG),e),{eventDelegation:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.eventDelegation),e.eventDelegation),virtualization:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.virtualization),e.virtualization),caching:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.caching),e.caching),lazyInit:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.lazyInit),e.lazyInit),memory:__spreadValues(__spreadValues({},DEFAULT_PERFORMANCE_CONFIG.memory),e.memory)}),_config.eventDelegation.enabled&&_config.eventDelegation.batchProcessing&&(_eventBatchProcessor=new EventBatchProcessor(_config.eventDelegation.batchSize)),(_config.caching.domQueries||_config.caching.styleCalculations)&&(_domQueryCache=new DOMQueryCache),_config.memory.periodicCleanup&&(_memoryCleanupManager=new MemoryCleanupManager(_config.memory.periodicCleanup),_memoryCleanupManager.start())}function getPerformanceOptimizationConfig(){return __spreadValues({},_config)}function getEventBatchProcessor(){return _eventBatchProcessor}function getDOMQueryCache(){return _domQueryCache}function getMemoryCleanupManager(){return _memoryCleanupManager}function runMemoryCleanup(){_memoryCleanupManager&&_memoryCleanupManager.runCleanup()}function resetPerformanceOptimizer(){_eventBatchProcessor&&_eventBatchProcessor.clear(),_memoryCleanupManager&&_memoryCleanupManager.stop(),_config=DEFAULT_PERFORMANCE_CONFIG}let globalI18n=null,isDev="undefined"!=typeof process&&"production"!==(null==(_a=process.env)?void 0:_a.NODE_ENV),globalLevel="warn";function setWarningI18n(e){globalI18n=e}function setWarningDevMode(e){isDev=e}function setWarningLevel(e){globalLevel=e}function formatMessage(e){const{directive:t,message:n,params:r={}}=e;let o=n;if(globalI18n&&!n.includes(" ")){const e=t?`directives.${t}.${n}`:n,i=globalI18n(e,r);i!==e&&(o=i)}return r&&Object.keys(r).length>0&&(o=o.replace(/\{(\w+)\}/g,(e,t)=>void 0!==r[t]?String(r[t]):`{${t}}`)),t?`[Directix] v-${t}: ${o}`:`[Directix] ${o}`}function log(e,t,n=!1){var r;const o=["debug","info","warn","error"],i=o.indexOf(globalLevel);if(o.indexOf(e)<i)return;const s="debug"===e?"info":e,a=n&&isDev?`\n${null==(r=new Error("Stack trace").stack)?void 0:r.split("\n").slice(2).join("\n")}`:"";"info"===s?console.info(t,a):"warn"===s?console.warn(t,a):"error"===s&&console.error(t,a)}function debug(e,t){log("debug",formatMessage({message:e,params:t}),!1)}function info(e,t){log("info",formatMessage({message:e,params:t}),!1)}function warn(e,t){const n="string"==typeof e?{message:e,params:t}:e;log(n.level||"warn",formatMessage(n),n.stack&&isDev)}function error(e,t){const n="string"==typeof e?{message:e,params:t}:__spreadValues({},e);log("error",formatMessage(n),n.stack&&isDev)}function directiveWarn(e,t,n){warn({directive:e,message:t,params:n})}function directiveError(e,t,n){error({directive:e,message:t,params:n})}function warnInvalidParam(e,t,n,r){warn({directive:e,message:"errors.type_error",params:{param:t,expected:r,actual:typeof n}})}function warnMissingParam(e,t){warn({directive:e,message:"errors.missing_required",params:{param:t}})}function warnSSRNotSupported(e){warn({directive:e,message:"errors.ssr_not_supported",params:{directive:e}})}function warnDeprecated(e,t){warn({message:"warnings.deprecated",params:{feature:e,alternative:t}})}function warnNotSupported(e){warn({message:"errors.not_supported",params:{feature:e}})}function assert(e,t,n){if(!e)throw new Error(formatMessage({directive:n,message:t}))}function assertType(e,t,n,r){if(typeof e!==t)throw new TypeError(formatMessage({directive:n,message:"errors.type_error",params:{param:r,expected:t,actual:typeof e}}))}function assertPositive(e,t,n){if(assertType(e,"number",t,n),e<=0)throw new Error(formatMessage({directive:t,message:"errors.value_out_of_range",params:{param:n,min:"0",max:"Infinity"}}))}function assertRange(e,t,n,r,o){if(assertType(e,"number",r,o),e<t||e>n)throw new Error(formatMessage({directive:r,message:"errors.value_out_of_range",params:{param:o,min:String(t),max:String(n)}}))}function normalizeOptions$S(e){return"boolean"==typeof e?{visible:e,radius:5,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:"number"==typeof e?{visible:!0,radius:e,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1}:__spreadValues({radius:5,visible:!0,duration:300,overlayColor:"transparent",zIndex:999,lockScroll:!1},e)}function createBlurOverlay$1(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius}px);\n -webkit-backdrop-filter: blur(${e.radius}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex};\n opacity: 0;\n transition: opacity ${e.duration}ms ease;\n pointer-events: auto;\n border-radius: inherit;\n `,t}const vBlur=defineDirective({name:"blur",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$S(t.value),r={options:n,blurContainer:null,originalOverflow:""};e.__blur=r,n.visible&&showBlur(e,r),e.classList.add("v-blur")},updated(e,t){const n=e.__blur;if(!n)return;const r=normalizeOptions$S(t.value),o=n.options.visible;n.options=r,r.visible&&!o?showBlur(e,n):!r.visible&&o?hideBlur(e,n):r.visible&&o&&n.blurContainer&&(n.blurContainer.style.backdropFilter=`blur(${r.radius}px)`,n.blurContainer.style.webkitBackdropFilter=`blur(${r.radius}px)`,n.blurContainer.style.background=r.overlayColor||"rgba(0, 0, 0, 0.5)")},unmounted(e){const t=e.__blur;t&&(hideBlur(e,t),e.classList.remove("v-blur"),delete e.__blur)}});function showBlur(e,t){var n;const r=t.options;"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),t.blurContainer=createBlurOverlay$1(r),e.appendChild(t.blurContainer),t.blurContainer.style.opacity="1",r.lockScroll&&(t.originalOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),null==(n=r.onShow)||n.call(r)}function hideBlur(e,t){var n;if(!t.blurContainer)return;const r=t.options;t.blurContainer.style.opacity="0",r.lockScroll&&(document.body.style.overflow=t.originalOverflow),setTimeout(()=>{t.blurContainer&&t.blurContainer.parentNode&&t.blurContainer.parentNode.removeChild(t.blurContainer),t.blurContainer=null},r.duration),null==(n=r.onHide)||n.call(r)}const STATE_PREFIX="__directix_";function setState$1(e,t,n){e[STATE_PREFIX+t]=n}function getState$1(e,t){return e[STATE_PREFIX+t]}function deleteState(e,t){delete e[STATE_PREFIX+t]}function isElement(e){return e instanceof Element}function getElement(e){return e?"string"==typeof e?isBrowser()?document.querySelector(e):null:isElement(e)?e:null:null}function getScrollParent$2(e){if(!isBrowser())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}function isInputElement(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function ensurePosition(e,t="relative"){isBrowser()&&"static"===getComputedStyle(e).position&&(e.style.position=t)}function ensureOverflowHidden(e){isBrowser()&&"visible"===getComputedStyle(e).overflow&&(e.style.overflow="hidden")}function on(e,t,n,r=!1){if(!isBrowser())return;const o=normalizeOptions$R(r);e.addEventListener(t,n,o)}function off(e,t,n,r=!1){if(!isBrowser())return;const o=normalizeOptions$R(r);e.removeEventListener(t,n,o)}function normalizeOptions$R(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:r=!1}=e;return supportsPassive()?{capture:t,passive:n,once:r}:t}function getEventPosition(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 bindEvents$2(e,t,n=!1){return Object.entries(t).forEach(([t,r])=>{e.addEventListener(t,r,"boolean"==typeof n?n:normalizeOptionsObject(n))}),()=>{Object.entries(t).forEach(([t,r])=>{e.removeEventListener(t,r,"boolean"==typeof n?n:normalizeOptionsObject(n))})}}function normalizeOptionsObject(e){const{capture:t=!1,passive:n=!1,once:r=!1}=e;return supportsPassive()?{capture:t,passive:n,once:r}:t}const EVENT_MODIFIERS=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function getEventTypeFromModifiers(e){for(const t of EVENT_MODIFIERS)if(e[t])return t;return null}function getDefaultEventType(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e&&!isNaN(e)}function isBoolean(e){return"boolean"==typeof e}function isFunction(e){return"function"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}function isEmpty(e){return null==e||(isString(e)||isArray(e)?0===e.length:!!isObject(e)&&0===Object.keys(e).length)}function isPromise(e){return isObject(e)&&isFunction(e.then)}function deepClone(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e=>deepClone(e));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=deepClone(e[n]));return t}function deepMerge(e,...t){if(!t.length)return e;const n=t.shift();if(isObject(e)&&isObject(n))for(const t in n)isObject(n[t])?(e[t]||Object.assign(e,{[t]:{}}),deepMerge(e[t],n[t])):Object.assign(e,{[t]:n[t]});return deepMerge(e,...t)}function get(e,t,n){const r=t.split(".");let o=e;for(const e of r){if(null==o)return n;o=o[e]}return void 0===o?n:o}function set(e,t,n){const r=t.split("."),o=r.pop();let i=e;for(const e of r)void 0===i[e]&&(i[e]={}),i=i[e];i[o]=n}function debounce(e,t=300,n={}){let r=null,o=null,i=null;const{leading:s=!1,trailing:a=!0}=n,l=()=>{o&&(e.apply(i,o),o=null,i=null)},c=function(...e){o=e,i=this,r&&clearTimeout(r),s&&!r&&l(),r=setTimeout(()=>{a&&l(),r=null},t)};return c.cancel=()=>{r&&(clearTimeout(r),r=null),o=null,i=null},c.flush=()=>{r&&(clearTimeout(r),l(),r=null)},c}function throttle(e,t=300,n={}){let r=null,o=null,i=null,s=0;const{leading:a=!0,trailing:l=!0}=n,c=()=>{o&&(e.apply(i,o),o=null,i=null)},u=function(...e){const n=Date.now();s||a||(s=n);const u=t-(n-s);o=e,i=this,u<=0||u>t?(r&&(clearTimeout(r),r=null),s=n,c()):!r&&l&&(r=setTimeout(()=>{s=a?Date.now():0,r=null,c()},u))};return u.cancel=()=>{r&&(clearTimeout(r),r=null),s=0,o=null,i=null},u}function parseTime(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}function generateId(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`}function getDistance$5(e,t){return Math.sqrt(__pow(t.x-e.x,2)+__pow(t.y-e.y,2))}function clamp$1(e,t,n){let r=e;return void 0!==t&&(r=Math.max(t,r)),void 0!==n&&(r=Math.min(n,r)),r}function escapeRegex$4(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function setupTextTransformInput(e,t,n){if(!t.onInput)return()=>{};const r=()=>{const t=e.selectionStart,r=e.selectionEnd,o=e.value,i=n(o);o!==i&&(e.value=i,null!==t&&null!==r&&e.setSelectionRange(t,r),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",r),e.value=n(e.value),()=>{e.removeEventListener("input",r)}}function transformTextContent(e,t){const n=e.textContent||"";e.textContent=t(n)}const DEFAULT_KEEP_LOWER$1=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function capitalizeText$1(e,t){if(!e)return e;const{every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER$1}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?capitalizeWord$1(e):r.includes(e.toLowerCase())?e.toLowerCase():capitalizeWord$1(e)).join(" ")}return capitalizeWord$1(e)}function capitalizeWord$1(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function normalizeOptions$Q(e){var t,n,r;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:DEFAULT_KEEP_LOWER$1,onInput:null==(r=e.onInput)||r}}const vCapitalcase=defineDirective({name:"capitalcase",ssr:!0,mounted(e,t){const n=normalizeOptions$Q(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>capitalizeText$1(e,n));e.__capitalcaseCleanup=t}else transformTextContent(e,e=>capitalizeText$1(e,n))},updated(e,t){const n=normalizeOptions$Q(t.value);isInputElement(e)?n.onInput&&(e.value=capitalizeText$1(e.value,n)):transformTextContent(e,e=>capitalizeText$1(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}}),STATE_KEY$5="clickDelay";function removePendingClass(e,t){t.feedback&&t.pendingClass&&e.classList.remove(t.pendingClass)}function createClickHandler(e,t){return n=>{const r=getState$1(e,STATE_KEY$5);if(!r||r.isPending)return n.preventDefault(),void n.stopPropagation();r.isPending=!0,t.feedback&&t.pendingClass&&e.classList.add(t.pendingClass),t.handler(n),r.timeoutId=setTimeout(()=>{r.isPending=!1,r.timeoutId=null,removePendingClass(e,t)},t.delay)}}function normalizeOptions$P(e,t){var n,r,o,i;const s=parseTime(t.arg)||300;if("function"==typeof e)return{handler:e,delay:s,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:s,disabled:null!=(r=e.disabled)&&r,pendingClass:null!=(o=e.pendingClass)?o:"v-click-delay--pending",feedback:null==(i=e.feedback)||i}}const vClickDelay=defineDirective({name:"click-delay",ssr:!0,defaults:{delay:300,disabled:!1,pendingClass:"v-click-delay--pending",feedback:!0},mounted(e,t){const n=normalizeOptions$P(t.value,t);if(n.disabled)return;const r={options:n,handler:createClickHandler(e,n),isPending:!1,timeoutId:null};setState$1(e,STATE_KEY$5,r),e.addEventListener("click",r.handler),e.addEventListener("touchend",r.handler)},updated(e,t){const n=getState$1(e,STATE_KEY$5);if(!n){const n=normalizeOptions$P(t.value,t);if(!n.disabled){const t={options:n,handler:createClickHandler(e,n),isPending:!1,timeoutId:null};setState$1(e,STATE_KEY$5,t),e.addEventListener("click",t.handler),e.addEventListener("touchend",t.handler)}return}const r=normalizeOptions$P(t.value,t);r.disabled&&!n.options.disabled?(e.removeEventListener("click",n.handler),e.removeEventListener("touchend",n.handler),n.timeoutId&&clearTimeout(n.timeoutId),removePendingClass(e,n.options),deleteState(e,STATE_KEY$5)):!r.disabled&&n.options.disabled&&(n.handler=createClickHandler(e,r),n.isPending=!1,n.timeoutId=null,e.addEventListener("click",n.handler),e.addEventListener("touchend",n.handler)),n.options=r},unmounted(e){const t=getState$1(e,STATE_KEY$5);t&&(e.removeEventListener("click",t.handler),e.removeEventListener("touchend",t.handler),t.timeoutId&&clearTimeout(t.timeoutId),removePendingClass(e,t.options),deleteState(e,STATE_KEY$5))}}),vClickOutside=defineDirective({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=normalizeOptions$O(t.value);if(n.disabled)return;const r={options:n,handlers:new Map};e.__clickOutside=r;n.events.forEach(t=>{const o=t=>{isValidClick$1(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};r.handlers.set(t,o);const i={capture:n.capture,passive:!n.prevent};on(document,t,o,i)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const r=n.options,o=normalizeOptions$O(t.value);if(r.disabled!==o.disabled)if(o.disabled)n.handlers.forEach((e,t)=>{off(document,t,e,{capture:r.capture})}),n.handlers.clear();else{const t=t=>t=>{isValidClick$1(e,t,o)&&(o.stop&&t.stopPropagation(),o.prevent&&t.preventDefault(),o.handler(t))};o.events.forEach(e=>{const r=t();n.handlers.set(e,r),on(document,e,r,{capture:o.capture,passive:!o.prevent})})}n.options=o},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{off(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function normalizeOptions$O(e){var t,n,r,o,i;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!=(r=e.disabled)&&r,stop:null!=(o=e.stop)&&o,prevent:null!=(i=e.prevent)&&i},e)}function isValidClick$1(e,t,n){var r;const o=t.target;if(e.contains(o))return!1;if(null==(r=n.exclude)?void 0:r.length)for(const e of n.exclude){const t="function"==typeof e?e():getElement(e);if(t&&(t===o||t.contains(o)))return!1}return!0}function normalizeOptions$N(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:500,sizeRatio:1.5};if("string"==typeof e)return{color:e,duration:500,sizeRatio:1.5};const t={color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}function createWave(e,t,n){const r=t.getBoundingClientRect(),o=e.clientX-r.left,i=e.clientY-r.top,s=Math.min(r.width,r.height)*(n.sizeRatio||1.5),a=document.createElement("span");return a.className="v-click-wave__effect",a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${s}px;\n height: ${s}px;\n left: ${o-s/2}px;\n top: ${i-s/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,a}function animateWave(e,t){const n=t.duration||500;"function"==typeof e.animate?e.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",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`,e.style.transform="scale(1)",e.style.opacity="0",setTimeout(()=>{e.remove()},n))}const vClickWave=defineDirective({name:"click-wave",ssr:!1,defaults:{color:"currentColor",duration:500,disabled:!1,sizeRatio:1.5},mounted(e,t){const n=normalizeOptions$N(t.value);if(n.disabled||!isBrowser())return;const r=getComputedStyle(e);"static"===r.position&&(e.style.position="relative"),"visible"===r.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave");const o={options:n,clickHandler:t=>{if(o.options.disabled)return;const n=createWave(t,e,o.options);n&&(e.appendChild(n),animateWave(n,o.options))}};e.__clickWave=o,e.addEventListener("click",o.clickHandler)},updated(e,t){const n=e.__clickWave;n&&(n.options=normalizeOptions$N(t.value))},unmounted(e){const t=e.__clickWave;t&&(e.removeEventListener("click",t.clickHandler),e.classList.remove("v-click-wave"),delete e.__clickWave)}});function normalizeOptions$M(e){return Array.isArray(e)?{items:e}:e}function createMenu(e,t,n){const r=document.createElement("div");r.className=`v-context-menu ${e.class||""}`;const o=e.width?"number"==typeof e.width?`${e.width}px`:e.width:"150px";return r.style.cssText=`\n position: fixed;\n left: ${t}px;\n top: ${n}px;\n min-width: ${o};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,e.items.forEach((t,n)=>{if(t.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",r.appendChild(e)}if(e.renderItem){const o=e.renderItem(t,n);r.appendChild(o)}else{const e=document.createElement("div");if(e.className=`v-context-menu__item ${t.class||""}`,t.disabled&&e.classList.add("v-context-menu__item--disabled"),e.style.cssText=`\n padding: 8px 16px;\n cursor: ${t.disabled?"not-allowed":"pointer"};\n color: ${t.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,t.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=t.icon,e.appendChild(n)}const n=document.createElement("span");n.textContent=t.label,e.appendChild(n),!t.disabled&&t.handler&&(e.addEventListener("click",()=>{t.handler(),removeMenu(r)}),e.addEventListener("mouseenter",()=>{e.style.background="#f5f5f5"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"})),r.appendChild(e)}}),r}function removeMenu(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function adjustMenuPosition(e,t,n){const r=e.getBoundingClientRect(),o=window.innerWidth,i=window.innerHeight;t+r.width>o&&(e.style.left=o-r.width-8+"px"),n+r.height>i&&(e.style.top=i-r.height-8+"px")}const vContextMenu=defineDirective({name:"context-menu",ssr:!1,mounted(e,t){const n=normalizeOptions$M(t.value);if(n.disabled||!isBrowser())return;const r={options:n,contextMenuHandler:e=>{var t,o;e.preventDefault(),r.menuElement&&removeMenu(r.menuElement),!1!==(null==(t=n.onBeforeShow)?void 0:t.call(n,e))&&(r.menuElement=createMenu(r.options,e.clientX,e.clientY),document.body.appendChild(r.menuElement),adjustMenuPosition(r.menuElement,e.clientX,e.clientY),setTimeout(()=>{document.addEventListener("click",r.clickOutsideHandler)},0),null==(o=n.onAfterShow)||o.call(n))},menuElement:null,clickOutsideHandler:e=>{var t;const o=e.target;r.menuElement&&r.menuElement.contains(o)||(removeMenu(r.menuElement),r.menuElement=null,document.removeEventListener("click",r.clickOutsideHandler),null==(t=n.onHide)||t.call(n))}};e.__contextMenu=r,on(e,"contextmenu",r.contextMenuHandler)},updated(e,t){const n=e.__contextMenu;n&&(n.options=normalizeOptions$M(t.value))},unmounted(e){const t=e.__contextMenu;t&&(off(e,"contextmenu",t.contextMenuHandler),t.menuElement&&(removeMenu(t.menuElement),document.removeEventListener("click",t.clickOutsideHandler)),delete e.__contextMenu)}});function copyToClipboard$1(e){return __async(this,null,function*(){if(supportsClipboard())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return copyWithExecCommand$1(e)})}function copyWithExecCommand$1(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)}}const vCopy=defineDirective({name:"copy",ssr:!1,mounted(e,t){const n=normalizeOptions$L(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const r={handler:null,options:n};r.handler=()=>__async(null,null,function*(){var t,n,o,i;const s=r.options.value;if(s)try{if(!(yield copyToClipboard$1(s)))throw new Error("Copy failed");null==(n=(t=r.options).onSuccess)||n.call(t,s),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:s}}))}catch(t){const n=t;null==(i=(o=r.options).onError)||i.call(o,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",r.handler),e.__copy=r},updated(e,t){const n=e.__copy;n&&(n.options=normalizeOptions$L(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 normalizeOptions$L(e){return"string"==typeof e?{value:e}:e}function parseTargetTime$1(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function calculateTime$1(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 formatTime$1(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 normalizeOptions$K(e){var t,n,r,o;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!=(r=e.showMilliseconds)&&r,autoStart:null==(o=e.autoStart)||o,labels:e.labels}:{target:e,format:"hh:mm:ss",interval:1e3,showMilliseconds:!1,autoStart:!0}}const vCountdown=defineDirective({name:"countdown",ssr:!0,mounted(e,t){const n=normalizeOptions$K(t.value),r={options:n,targetTime:parseTargetTime$1(n.target),intervalId:null,paused:!1,remaining:0};e.__countdown=r,!1!==n.autoStart?startCountdown(e,r):updateDisplay(e,r)},updated(e,t){const n=e.__countdown,r=normalizeOptions$K(t.value),o=parseTargetTime$1(r.target);o!==n.targetTime?(n.targetTime=o,n.options=r,n.intervalId&&(clearInterval(n.intervalId),n.intervalId=null),n.paused||startCountdown(e,n)):n.options=r},unmounted(e){const t=e.__countdown;(null==t?void 0:t.intervalId)&&clearInterval(t.intervalId),delete e.__countdown}});function startCountdown(e,t){const n=()=>{const n=Date.now();if(t.remaining=t.targetTime-n,t.remaining<=0)return t.remaining=0,updateDisplay(e,t),stopCountdown(t),t.options.onComplete&&t.options.onComplete(),void e.dispatchEvent(new CustomEvent("countdown:complete"));if(updateDisplay(e,t),t.options.onTick){const e=calculateTime$1(t.remaining);t.options.onTick(e)}};n(),t.intervalId=setInterval(n,t.options.interval||1e3)}function stopCountdown(e){e.intervalId&&(clearInterval(e.intervalId),e.intervalId=null)}function updateDisplay(e,t){const n=formatTime$1(calculateTime$1(t.remaining),t.options.format||"hh:mm:ss");e.textContent=n}function normalizeOptions$J(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,startValue:0,duration:2e3,decimals:0,useGrouping:!1,locale:"en-US",easing:"easeOutQuart",delay:0},e||{})}const easingFunctions$1={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function formatNumber$3(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale,{minimumFractionDigits:t.decimals,maximumFractionDigits:t.decimals,useGrouping:t.useGrouping}).format(e)}const vCounter=defineDirective({name:"counter",ssr:!0,mounted(e,t){const n=normalizeOptions$J(t.value),r={options:n,animationFrame:null,startTime:null,startValue:n.startValue||0,currentValue:n.startValue||0};e.__counter=r,e.textContent=formatNumber$3(r.startValue,n),e.classList.add("v-counter"),isBrowser()&&n.value!==r.startValue&&setTimeout(()=>{animateCounter(e,r)},n.delay||0)},updated(e,t){const n=e.__counter;if(!n)return;const r=normalizeOptions$J(t.value),o=n.options.value,i=r.value;n.animationFrame&&(cancelAnimationFrame(n.animationFrame),n.animationFrame=null),n.startValue=n.currentValue,n.startTime=null,n.options=r,i!==o&&animateCounter(e,n)},unmounted(e){const t=e.__counter;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-counter"),delete e.__counter)}});function animateCounter(e,t){var n;const{options:r,startValue:o}=t,i=r.value,s=r.duration||2e3;t.startTime=null,null==(n=r.onStart)||n.call(r),t.animationFrame=requestAnimationFrame(function n(a){var l,c;t.startTime||(t.startTime=a);const u=a-t.startTime,d=Math.min(u/s,1),p=(r.customEasing||easingFunctions$1[r.easing||"easeOutQuart"])(d);t.currentValue=o+(i-o)*p;const m=formatNumber$3(t.currentValue,r);e.textContent=m,null==(l=r.onUpdate)||l.call(r,t.currentValue,m),d<1?t.animationFrame=requestAnimationFrame(n):(t.currentValue=i,e.textContent=formatNumber$3(i,r),t.animationFrame=null,null==(c=r.onComplete)||c.call(r,i))})}function normalizeOptions$I(e,t){const n=parseTime(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const vDebounce=defineDirective({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=normalizeOptions$I(t.value,t),r=getEventTypeFromModifiers(t.modifiers)||getDefaultEventType(e),o=debounce(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(r,o),e.__debounce={debouncedFn:o,eventType:r,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const r=normalizeOptions$I(t.value,t);if(r.wait!==n.options.wait||r.leading!==n.options.leading||r.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=debounce(r.handler,r.wait,{leading:r.leading,trailing:r.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:r}}else r.handler!==n.options.handler&&(n.options.handler=r.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function getBoundary$1(e,t){var n,r;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!=(r=null==e?void 0:e.getBoundingClientRect())?r:null}return t.getBoundingClientRect()}function getClientCoords$1(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 parseTranslate$1(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 normalizeOptions$H(e){var t,n,r;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!=(r=e.disabled)&&r,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const vDraggable=defineDirective({name:"draggable",ssr:!1,mounted(e,t){const n=normalizeOptions$H(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const r={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=r;const o=r.handleEl||e;function i(t){var n,o,i;if(r.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:s,clientY:a}=getClientCoords$1(t);r.isDragging=!0,r.startX=s,r.startY=a;const{x:l,y:c}=parseTranslate$1(e.style.transform);if(r.offsetX=l,r.offsetY=c,r.options.constrain||r.options.boundary){const t=r.options.boundary?getBoundary$1(e,r.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();r.initialLeft=n.left-t.left,r.initialTop=n.top-t.top,r.boundaryWidth=t.width,r.boundaryHeight=t.height,r.elWidth=n.width,r.elHeight=n.height}}e.classList.add("v-draggable--dragging"),r.moveHandler=t=>{var n,o;if(!r.isDragging)return;const{clientX:i,clientY:s}=getClientCoords$1(t);let a=i-r.startX,l=s-r.startY;"x"===r.options.axis?l=0:"y"===r.options.axis&&(a=0),r.options.grid&&(a=Math.round(a/r.options.grid[0])*r.options.grid[0],l=Math.round(l/r.options.grid[1])*r.options.grid[1]);let c=r.offsetX+a,u=r.offsetY+l;if(r.options.constrain||r.options.boundary){const e=r.initialLeft+a,t=r.initialTop+l,n=r.boundaryWidth-r.elWidth,o=r.boundaryHeight-r.elHeight,i=Math.max(0,Math.min(e,n)),s=Math.max(0,Math.min(t,o));c=r.offsetX+(i-r.initialLeft),u=r.offsetY+(s-r.initialTop)}e.style.transform=`translate(${c}px, ${u}px)`,null==(o=(n=r.options).onDrag)||o.call(n,{x:c,y:u},t)},r.endHandler=()=>{var t,n;if(!r.isDragging)return;r.isDragging=!1,e.classList.remove("v-draggable--dragging"),r.moveHandler&&(document.removeEventListener("mousemove",r.moveHandler),document.removeEventListener("touchmove",r.moveHandler)),r.endHandler&&(document.removeEventListener("mouseup",r.endHandler),document.removeEventListener("touchend",r.endHandler));const{x:o,y:i}=parseTranslate$1(e.style.transform);null==(n=(t=r.options).onEnd)||n.call(t,{x:o,y:i},new MouseEvent("mouseup"))},document.addEventListener("mousemove",r.moveHandler),document.addEventListener("touchmove",r.moveHandler,{passive:!1}),document.addEventListener("mouseup",r.endHandler),document.addEventListener("touchend",r.endHandler),null==(i=(o=r.options).onStart)||i.call(o,{x:r.offsetX,y:r.offsetY},t)}o.addEventListener("mousedown",i),o.addEventListener("touchstart",i,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=normalizeOptions$H(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)}}),vEllipsis=defineDirective({name:"ellipsis",ssr:!0,defaults:{lines:1,ellipsis:"...",expandable:!1,titleBehavior:"auto"},mounted(e,t){const n=normalizeOptions$G(t.value);applyEllipsis(e,n);const r={options:n,originalText:e.textContent||"",clickHandler:null,expanded:!1};if(n.expandable){const t=()=>{r.expanded?(applyEllipsis(e,n),r.expanded=!1):(e.textContent=r.originalText,e.style.webkitLineClamp="",e.style.display="",e.style.overflow="",e.style.cursor="",r.expanded=!0)};e.addEventListener("click",t),e.style.cursor="pointer",r.clickHandler=t}("always"===n.titleBehavior||"auto"===n.titleBehavior&&isTextTruncated(e))&&(e.title=r.originalText),e.__ellipsis=r},updated(e,t){const n=e.__ellipsis;if(!n){const n=normalizeOptions$G(t.value);return void applyEllipsis(e,n)}const r=normalizeOptions$G(t.value);if(e.textContent!==n.originalText&&(n.originalText=e.textContent||"",n.expanded=!1),n.options.expandable!==r.expandable)if(n.clickHandler&&(e.removeEventListener("click",n.clickHandler),n.clickHandler=null),r.expandable){const t=()=>{n.expanded?(applyEllipsis(e,r),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=r,n.expanded||applyEllipsis(e,r),"always"===r.titleBehavior?e.title=n.originalText:"auto"===r.titleBehavior?e.title=isTextTruncated(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 applyEllipsis(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 isTextTruncated(e){return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight}function normalizeOptions$G(e){var t,n,r,o;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!=(r=null==e?void 0:e.expandable)&&r,titleBehavior:null!=(o=null==e?void 0:e.titleBehavior)?o:"auto"}}const EMOJI_PATTERN$1=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;function normalizeOptions$F(e){return!1===e?{strip:!1}:!0===e||void 0===e?{strip:!0}:__spreadValues({strip:!0,replacement:""},e)}function getEmojiPattern(e){if(e.pattern)return new RegExp(e.pattern,"gu");if(e.blockList&&e.blockList.length>0){const t=e.blockList.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(t,"gu")}return e.allowList&&e.allowList.length,EMOJI_PATTERN$1}function isAllowed(e,t){return!(!t||0===t.length)&&t.includes(e)}function stripEmojis(e,t){var n;const r=getEmojiPattern(t),o=t.replacement||"";let i=e;if(t.allowList&&t.allowList.length>0)i=e.replace(r,n=>{var r;return isAllowed(n,t.allowList)?n:(null==(r=t.onEmoji)||r.call(t,n,e.indexOf(n)),o)});else{const n=e.match(r);n&&n.forEach(n=>{var r;null==(r=t.onEmoji)||r.call(t,n,e.indexOf(n))}),i=e.replace(r,o)}return i!==e&&(null==(n=t.onStrip)||n.call(t,e,i)),i}const vEmoji=defineDirective({name:"emoji",ssr:!1,mounted(e,t){var n;if(!isBrowser())return;const r=normalizeOptions$F(t.value);if(!r.strip&&!(null==(n=r.blockList)?void 0:n.length))return;const o={options:r,inputHandler:e=>{const t=e.target,n=t.value,r=stripEmojis(n,o.options);if(r!==n){const e=t.selectionStart||0,o=t.selectionEnd||0;t.value=r;const i=n.length-r.length;t.setSelectionRange(Math.max(0,e-i),Math.max(0,o-i)),t.dispatchEvent(new Event("input",{bubbles:!0}))}},pasteHandler:e=>{var t;if(!o.options.strip)return;const n=null==(t=e.clipboardData)?void 0:t.getData("text");if(n&&EMOJI_PATTERN$1.test(n)){e.preventDefault();const t=stripEmojis(n,o.options),r=e.target,i=r.selectionStart||0,s=r.selectionEnd||0,a=r.value;r.value=a.substring(0,i)+t+a.substring(s),r.setSelectionRange(i+t.length,i+t.length),r.dispatchEvent(new Event("input",{bubbles:!0}))}}};if(e.__emoji=o,on(e,"input",o.inputHandler),on(e,"paste",o.pasteHandler),e.value){const t=stripEmojis(e.value,o.options);t!==e.value&&(e.value=t)}e.classList.add("v-emoji")},updated(e,t){const n=e.__emoji;n&&(n.options=normalizeOptions$F(t.value))},unmounted(e){const t=e.__emoji;t&&(off(e,"input",t.inputHandler),off(e,"paste",t.pasteHandler),e.classList.remove("v-emoji"),delete e.__emoji)}});function normalizeOptions$E(e){var t;if(!e||"string"==typeof e||Array.isArray(e))return{data:e,format:"csv",filename:"export"};const n=e;return __spreadProps(__spreadValues({format:"csv",filename:"export",includeHeaders:!0,delimiter:","},n),{data:null!=(t=n.data)?t:[]})}function toCSV$1(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",r=t.columns||Object.keys(e[0]),o=t.headers||{};return(t.includeHeaders?`${r.map(e=>o[e]||e).join(n)}\n`:"")+e.map(e=>r.map(t=>{const r=e[t];return"string"==typeof r&&(r.includes(n)||r.includes("\n")||r.includes('"'))?`"${r.replace(/"/g,'""')}"`:null!=r?r:""}).join(n)).join("\n")}function toJSON(e){return JSON.stringify(e,null,2)}function toHTML$1(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const r=t.columns||Object.keys(e[0]),o=t.headers||{};let i='<table border="1">\n';if(t.includeHeaders){i+=" <thead>\n <tr>\n";for(const e of r)i+=` <th>${o[e]||e}</th>\n`;i+=" </tr>\n </thead>\n"}i+=" <tbody>\n";for(const t of e){i+=" <tr>\n";for(const e of r)i+=` <td>${null!=(n=t[e])?n:""}</td>\n`;i+=" </tr>\n"}return i+=" </tbody>\n</table>",i}function downloadFile$1(e,t,n){const r=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`${t}.${n}`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function exportData(e){const{data:t,format:n="csv",filename:r="export"}=e;let o;switch(n){case"json":o=toJSON(t);break;case"html":o=toHTML$1(Array.isArray(t)?t:[t],e);break;case"txt":o="string"==typeof t?t:JSON.stringify(t,null,2);break;default:o=toCSV$1(Array.isArray(t)?t:[t],e)}downloadFile$1(o,r,n)}const vExport=defineDirective({name:"export",ssr:!1,mounted(e,t){const n=normalizeOptions$E(t.value);if(!isBrowser())return;const r={options:n,clickHandler:()=>{var e,t,n,o,i,s;if(!1!==(null==(t=(e=r.options).onBeforeExport)?void 0:t.call(e)))try{exportData(r.options),null==(o=(n=r.options).onAfterExport)||o.call(n)}catch(e){null==(s=(i=r.options).onError)||s.call(i,e)}}};e.__export=r,on(e,"click",r.clickHandler),e.classList.add("v-export")},updated(e,t){const n=e.__export;n&&(n.options=normalizeOptions$E(t.value))},unmounted(e){const t=e.__export;t&&(off(e,"click",t.clickHandler),e.classList.remove("v-export"),delete e.__export)}}),defaultOptions$1={direction:"toggle",visible:!0,duration:300,delay:0,easing:"ease",minOpacity:0,maxOpacity:1};function normalizeOptions$D(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},defaultOptions$1),{visible:e}):"string"==typeof e?__spreadProps(__spreadValues({},defaultOptions$1),{direction:e}):__spreadValues(__spreadValues({},defaultOptions$1),e)}function getTimingFunction(e){return{ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",linear:"linear"}[e]||e}const vFade=defineDirective({name:"fade",ssr:!0,mounted(e,t){const n=normalizeOptions$D(t.value),r={options:n,currentOpacity:n.visible?n.maxOpacity||1:n.minOpacity||0,animationFrame:null,isAnimating:!1};e.__fade=r,e.style.transition=`opacity ${n.duration}ms ${getTimingFunction(n.easing||"ease")} ${n.delay}ms`,"in"===n.direction?(e.style.opacity=String(n.minOpacity||0),e.style.display="",r.animationFrame=requestAnimationFrame(()=>{r.animationFrame=null,e.style.opacity=String(n.maxOpacity||1),r.currentOpacity=n.maxOpacity||1})):"out"===n.direction?(e.style.opacity=String(n.maxOpacity||1),e.style.display="",r.animationFrame=requestAnimationFrame(()=>{r.animationFrame=null,e.style.opacity=String(n.minOpacity||0),setTimeout(()=>{e.style.display="none"},(n.duration||300)+(n.delay||0))})):(e.style.opacity=String(r.currentOpacity),n.visible||(e.style.display="none")),e.classList.add("v-fade")},updated(e,t){const n=e.__fade;if(!n)return;const r=normalizeOptions$D(t.value),o=!1!==r.visible,i=n.options.visible;n.options=r,e.style.transition=`opacity ${r.duration}ms ${getTimingFunction(r.easing||"ease")} ${r.delay}ms`,i!==r.visible&&animate(e,n,o?"in":"out")},unmounted(e){const t=e.__fade;t&&(t.animationFrame&&cancelAnimationFrame(t.animationFrame),e.classList.remove("v-fade"),delete e.__fade)}});function animate(e,t,n){var r;if(t.isAnimating)return;const o=t.options;t.isAnimating=!0,null==(r=o.onStart)||r.call(o,n),"in"===n?(e.style.display="",e.style.opacity=String(o.minOpacity||0),requestAnimationFrame(()=>{e.style.opacity=String(o.maxOpacity||1),setTimeout(()=>{var e;t.isAnimating=!1,t.currentOpacity=o.maxOpacity||1,null==(e=o.onComplete)||e.call(o,n)},(o.duration||300)+(o.delay||0))})):(e.style.opacity=String(o.minOpacity||0),setTimeout(()=>{var r;t.isAnimating=!1,t.currentOpacity=o.minOpacity||0,e.style.display="none",null==(r=o.onComplete)||r.call(o,n)},(o.duration||300)+(o.delay||0)))}const FOCUSABLE_TAGS$1=new Set(["input","textarea","select","button"]);function isEqual(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,r=t,o=Object.keys(n),i=Object.keys(r);return o.length===i.length&&o.every(e=>n[e]===r[e])}const vFocus=defineDirective({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$C(t.value);if(!n.focus||!isFocusable$1(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const r=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},o=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",r),e.addEventListener("blur",o),e.__focus={options:n,handleFocus:r,handleBlur:o,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const r=normalizeOptions$C(t.value);r.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=r.onFocus)?void 0:t.call(r,e)},e.addEventListener("focus",n.handleFocus)),r.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=r.onBlur)?void 0:t.call(r,e)},e.addEventListener("blur",n.handleBlur));const o=!isEqual(t.value,n.lastValue);r.refocus&&r.focus&&o&&e.focus(),n.options=r,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 normalizeOptions$C(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}function isFocusable$1(e){if(!isBrowser())return!1;const t=e.tagName.toLowerCase();if(FOCUSABLE_TAGS$1.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")}function isFullscreenSupported$1(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}function getFullscreenElement$1(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function requestFullscreen$1(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}function exitFullscreen$1(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}function toggleFullscreen(e,t){return __async(this,null,function*(){t.isFullscreen?yield exitFullscreen$1():yield requestFullscreen$1(e)})}function normalizeOptions$B(e){return"boolean"==typeof e?{initialState:e}:__spreadValues({initialState:!1,toggleKey:"Escape"},e)}const vFullscreen=defineDirective({name:"fullscreen",ssr:!1,mounted(e,t){const n=normalizeOptions$B(t.value);if(!isBrowser()||!isFullscreenSupported$1())return;const r={options:n,clickHandler:()=>toggleFullscreen(e,r),keydownHandler:e=>{!1!==r.options.toggleKey&&e.key===r.options.toggleKey&&r.isFullscreen&&exitFullscreen$1()},changeHandler:()=>{var t,n,o,i,s,a;const l=r.isFullscreen;r.isFullscreen=getFullscreenElement$1()===e,l!==r.isFullscreen&&(r.isFullscreen?(e.classList.add(r.options.fullscreenClass||"v-fullscreen--active"),null==(n=(t=r.options).onEnter)||n.call(t)):(e.classList.remove(r.options.fullscreenClass||"v-fullscreen--active"),null==(i=(o=r.options).onExit)||i.call(o)),null==(a=(s=r.options).onChange)||a.call(s,r.isFullscreen))},isFullscreen:!1};e.__fullscreen=r,document.addEventListener("fullscreenchange",r.changeHandler),document.addEventListener("webkitfullscreenchange",r.changeHandler),document.addEventListener("mozfullscreenchange",r.changeHandler),document.addEventListener("MSFullscreenChange",r.changeHandler),!1!==n.toggleKey&&document.addEventListener("keydown",r.keydownHandler),e.toggleFullscreen=r.clickHandler,n.initialState&&requestFullscreen$1(e),e.classList.add("v-fullscreen")},updated(e,t){const n=e.__fullscreen;n&&(n.options=normalizeOptions$B(t.value))},unmounted(e){const t=e.__fullscreen;t&&(t.isFullscreen&&exitFullscreen$1(),document.removeEventListener("fullscreenchange",t.changeHandler),document.removeEventListener("webkitfullscreenchange",t.changeHandler),document.removeEventListener("mozfullscreenchange",t.changeHandler),document.removeEventListener("MSFullscreenChange",t.changeHandler),!1!==t.options.toggleKey&&document.removeEventListener("keydown",t.keydownHandler),e.classList.remove("v-fullscreen"),e.classList.remove(t.options.fullscreenClass||"v-fullscreen--active"),delete e.__fullscreen,delete e.toggleFullscreen)}});function normalizeOptions$A(e){return"string"==typeof e||Array.isArray(e)?{keywords:e}:__spreadValues({className:"v-highlight",caseSensitive:!1,wholeWord:!1,tag:"mark"},e)}function escapeRegex$3(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function highlightKeywords(e,t){const n=Array.isArray(t.keywords)?t.keywords:[t.keywords];if(0===n.length||!e)return e;const r=t.caseSensitive||!1,o=t.wholeWord||!1,i=t.tag||"mark",s=t.className||"v-highlight",a=t.style?` style="${t.style}"`:"";n.sort((e,t)=>t.length-e.length);let l=e;for(const e of n){if(!e)continue;const t=escapeRegex$3(e),n=o?"\\b":"",c=new RegExp(`${n}${t}${n}`,r?"g":"gi");l=l.replace(c,`<${i} class="${s}"${a}>$&</${i}>`)}return l}function isTextNodeOnly(e){for(const t of e.childNodes)if(t.nodeType===Node.ELEMENT_NODE)return!1;return!0}const vHighlight=defineDirective({name:"highlight",ssr:!0,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$A(t.value);if(!n.keywords||Array.isArray(n.keywords)&&0===n.keywords.length)return;const r={options:n,originalContent:e.innerHTML};e.__highlight=r,applyHighlight(e,r)},updated(e,t){const n=e.__highlight;if(!n){const n=normalizeOptions$A(t.value);if(n.keywords){const t={options:n,originalContent:e.innerHTML};e.__highlight=t,applyHighlight(e,t)}return}const r=normalizeOptions$A(t.value);(Array.isArray(n.options.keywords)?n.options.keywords.join(","):n.options.keywords)===(Array.isArray(r.keywords)?r.keywords.join(","):r.keywords)&&JSON.stringify(n.options)===JSON.stringify(r)||(e.innerHTML=n.originalContent,n.options=r,n.originalContent=e.innerHTML,applyHighlight(e,n))},unmounted(e){const t=e.__highlight;t&&(e.innerHTML=t.originalContent,delete e.__highlight)}});function applyHighlight(e,t){var n,r;if(isTextNodeOnly(e)){const o=highlightKeywords(t.originalContent,t.options);e.innerHTML=o;const i=e.querySelectorAll(t.options.tag||"mark").length;null==(r=(n=t.options).onHighlight)||r.call(n,i)}else processTextNodes(e,t)}function processTextNodes(e,t){var n,r,o,i;const s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),a=[];let l=s.nextNode(),c=0;for(;l;)(null==(r=null==(n=l.parentNode)?void 0:n.tagName)?void 0:r.toLowerCase())!==(t.options.tag||"mark").toLowerCase()?(a.push(l),l=s.nextNode()):l=s.nextNode();for(const n of a){const r=n.textContent||"",o=highlightKeywords(r,t.options);if(o!==r){const r=document.createElement("span");r.innerHTML=o;const i=n.parentNode;if(i){for(i.insertBefore(r,n),i.removeChild(n);r.firstChild;)i.insertBefore(r.firstChild,r);i.removeChild(r)}c+=e.querySelectorAll(t.options.tag||"mark").length}}null==(i=(o=t.options).onHighlight)||i.call(o,c)}const KEY_ALIASES$1={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"},MODIFIER_KEYS=new Set(["ctrl","alt","shift","meta"]);function normalizeKey(e){const t=e.toLowerCase();return KEY_ALIASES$1[t]||t}function parseHotkeyString(e){const t=e.toLowerCase().split(/[+.]/),n=[];let r="";for(const e of t)MODIFIER_KEYS.has(e)?n.push(e):r=normalizeKey(e);return{key:r,modifiers:n}}function matchesHotkey$1(e,t){if(normalizeKey(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 createEntry(e,t,n,r={}){var o,i,s;return{key:normalizeKey(e),modifiers:new Set(t),handler:n,prevent:null==(o=r.prevent)||o,stop:null==(i=r.stop)||i,disabled:null!=(s=r.disabled)&&s}}function normalizeBinding(e,t,n){if(t){const r=t.toLowerCase();let o;const i=[];if(MODIFIER_KEYS.has(r)){i.push(r);for(const e of Object.keys(n)){const t=e.toLowerCase();MODIFIER_KEYS.has(t)?i.push(t):o=normalizeKey(e)}}else{const e=parseHotkeyString(t);o=e.key,i.push(...e.modifiers);for(const e of Object.keys(n)){const t=e.toLowerCase();MODIFIER_KEYS.has(t)&&i.push(t)}}return[createEntry(o,i,"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=>createEntry(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[createEntry(t.key,t.modifiers||[],t.handler,t)]}const t=[];for(const[n,r]of Object.entries(e)){const{key:e,modifiers:o}=parseHotkeyString(n),i="function"==typeof r?r:r.handler,s="object"==typeof r?r:{};t.push(createEntry(e,o,i,s))}return t}return[]}function createKeydownHandler(e){return t=>{for(const n of e.entries)if(!n.disabled&&matchesHotkey$1(t,n))return n.prevent&&t.preventDefault(),n.stop&&t.stopPropagation(),void n.handler(t)}}function setupState$1(e,t){if(0===t.length)return null;const n={entries:t,handler:null};return n.handler=createKeydownHandler(n),e.tabIndex=e.tabIndex||-1,e.addEventListener("keydown",n.handler),e.__hotkey=n,n}const vHotkey=defineDirective({name:"hotkey",ssr:!0,mounted(e,t){setupState$1(e,normalizeBinding(t.value,t.arg,t.modifiers))},updated(e,t){const n=e.__hotkey,r=normalizeBinding(t.value,t.arg,t.modifiers);n?n.entries=r:setupState$1(e,r)},unmounted(e){const t=e.__hotkey;t&&(e.removeEventListener("keydown",t.handler),delete e.__hotkey)}});function useTimer(){const e=new Set,t=new Set;return{setTimeout(t,n){const r=setTimeout(()=>{e.delete(r),t()},n);return e.add(r),r},clearTimeout(t){clearTimeout(t),e.delete(t)},setInterval(e,n){const r=setInterval(e,n);return t.add(r),r},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}}const STATE_KEY$4="hover";function normalizeOptions$z(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}function applyHoverState(e,t,n){var r,o;const{options:i}=t;i.class&&e.classList.add(i.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(r=i.onEnter)||r.call(i,n),null==(o=i.handler)||o.call(i,!0,n)}function applyLeaveState(e,t,n){var r,o;const{options:i}=t;i.class&&e.classList.remove(i.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(r=i.onLeave)||r.call(i,n),null==(o=i.handler)||o.call(i,!1,n)}const vHover=defineDirective({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=normalizeOptions$z(t.value);if(n.disabled||!isBrowser())return;const r=useTimer();let o=!1;const i={options:n,isHovering:!1,timer:r,cleanup:null};i.cleanup=bindEvents$2(e,{mouseenter:t=>{const s=t;r.clearAll(),o||(n.enterDelay&&n.enterDelay>0?r.setTimeout(()=>{o=!0,i.isHovering=!0,applyHoverState(e,i,s)},n.enterDelay):(o=!0,i.isHovering=!0,applyHoverState(e,i,s)))},mouseleave:t=>{const s=t;r.clearAll(),o&&(n.leaveDelay&&n.leaveDelay>0?r.setTimeout(()=>{o=!1,i.isHovering=!1,applyLeaveState(e,i,s)},n.leaveDelay):(o=!1,i.isHovering=!1,applyLeaveState(e,i,s)))}}),setState$1(e,STATE_KEY$4,i)},updated(e,t){const n=getState$1(e,STATE_KEY$4);if(!n)return;const r=normalizeOptions$z(t.value);r.disabled&&!n.options.disabled&&e.classList.remove(n.options.class||"v-hover"),n.options=r},unmounted(e){var t;const n=getState$1(e,STATE_KEY$4);n&&(n.timer.clearAll(),null==(t=n.cleanup)||t.call(n),e.classList.remove(n.options.class||"v-hover"),deleteState(e,STATE_KEY$4))}}),DEFAULTS={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let globalZIndex=9999;function getDistance$4(e,t,n,r){return Math.sqrt(__pow(n-e,2)+__pow(r-t,2))}function clamp(e,t,n){return Math.max(t,Math.min(n,e))}function createOverlay(e){var t;const n=null!=(t=e.zIndex)?t:++globalZIndex,r=document.createElement("div");r.className="v-image-preview-overlay",e.class&&r.classList.add(e.class),Object.assign(r.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 o=document.createElement("div");Object.assign(o.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const i=document.createElement("img");if(i.src=e.previewSrc||e.src||"",i.alt=e.alt||"",Object.assign(i.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),i.addEventListener("dragstart",e=>e.preventDefault()),o.appendChild(i),!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}),r.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)"}),r.appendChild(e)}const s=document.createElement("div");return s.className="v-image-preview-hint",s.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(s.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"}),r.appendChild(s),setTimeout(()=>s.style.opacity="0",DEFAULTS.hintDuration),r.appendChild(o),{overlay:r,imageContainer:o,image:i}}function createTransformManager(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:r,translateX:o,translateY:i}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${o}px, ${i}px) scale(${r})`;const s=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");s&&(s.textContent=`${Math.round(100*r)}%`,s.style.opacity="1",clearTimeout(s._hideTimer),s._hideTimer=setTimeout(()=>{s.style.opacity="0"},DEFAULTS.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=DEFAULTS.minScale,maxScale:r=DEFAULTS.maxScale}=e.options;return clamp(t,n,r)},constrainTranslate:(t,n)=>{const{scale:r}=e.transform;if(!e.image||r<=1)return{x:0,y:0};const o=e.image.getBoundingClientRect(),i=o.width*(r-1)/2,s=o.height*(r-1)/2;return{x:clamp(t,-i,i),y:clamp(n,-s,s)}}}}function createGestureHandlers(e,t,n){const{updateTransform:r,resetTransform:o,constrainScale:i,constrainTranslate:s}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:o,transform:s,options:a}=e;if(1===t.touches.length){if(!1!==a.enableDoubleTap&&n-o.lastTapTime<DEFAULTS.tapTimeout)return t.preventDefault(),s.scale=s.scale>1?1:i(DEFAULTS.doubleTapZoom),o.lastTapTime=0,void r(!0);o.lastTapTime=n,o.isDragging=!0,o.startX=t.touches[0].clientX-s.translateX,o.startY=t.touches[0].clientY-s.translateY,o.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==a.enablePinchZoom&&(o.isDragging=!1,o.startDistance=getDistance$4(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),o.startScale=s.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:o,options:a}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,i=t.touches[0].clientY-n.startY,a=s(e,i);o.translateX=a.x,o.translateY=a.y,r(!1)}else if(2===t.touches.length&&!1!==a.enablePinchZoom){const e=getDistance$4(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);o.scale=i(n.startScale*(e/n.startDistance)),r(!1)}},handleTouchEnd:t=>{const{gesture:r,transform:i,options:s}=e;if(r.isDragging=!1,!1!==s.enableSwipeClose&&1===t.changedTouches.length&&i.scale<=1){if(t.changedTouches[0].clientY-r.swipeStartY<-100)return void n()}i.scale<1&&o()},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,o=t.clientY-e.gesture.startY,i=s(n,o);e.transform.translateX=i.x,e.transform.translateY=i.y,r(!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=i(e.transform.scale*n),r(!1),e.transform.scale<.8&&setTimeout(o,100)}}}function normalizeOptions$y(e,t){var n,r,o,i,s,a,l,c,u,d;const p="IMG"===t.tagName?t.src:void 0,m=t.getAttribute("data-preview")||void 0,f="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:m,alt:f,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:DEFAULTS.minScale,maxScale:DEFAULTS.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||m,alt:(null==e?void 0:e.alt)||f,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(r=null==e?void 0:e.closeOnClickOutside)||r,closeOnEsc:null==(o=null==e?void 0:e.closeOnEsc)||o,showCloseButton:null==(i=null==e?void 0:e.showCloseButton)||i,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(s=null==e?void 0:e.enablePinchZoom)||s,enableDoubleTap:null==(a=null==e?void 0:e.enableDoubleTap)||a,enableSwipeClose:null==(l=null==e?void 0:e.enableSwipeClose)||l,showZoomIndicator:null==(c=null==e?void 0:e.showZoomIndicator)||c,minScale:null!=(u=null==e?void 0:e.minScale)?u:DEFAULTS.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:DEFAULTS.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const vImagePreview=defineDirective({name:"image-preview",ssr:!1,mounted(e,t){const n=normalizeOptions$y(t.value,e),r={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=r,n.disabled)return;e.style.cursor="zoom-in";const o=createTransformManager(r),i=()=>{r.isOpen&&r.overlay&&(r.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!r.overlay)return;r.overlay.remove(),r.overlay=null,r.imageContainer=null,r.image=null,r.isOpen=!1,r.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=r;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=r.options).onClose)||t.call(e)},DEFAULTS.animationDuration))},s=createGestureHandlers(r,o,i),a=()=>{var e,t,n;if(r.isOpen||r.options.disabled)return;const{overlay:a,imageContainer:l,image:c}=createOverlay(r.options);r.overlay=a,r.imageContainer=l,r.image=c,r.isOpen=!0,document.body.appendChild(a),document.body.style.overflow="hidden",requestAnimationFrame(()=>a.style.opacity="1"),r.handlers.touchStart=s.handleTouchStart,r.handlers.touchMove=s.handleTouchMove,r.handlers.touchEnd=s.handleTouchEnd,r.handlers.mouseDown=s.handleMouseDown,r.handlers.mouseMove=s.handleMouseMove,r.handlers.mouseUp=s.handleMouseUp,r.handlers.wheel=s.handleWheel,a.addEventListener("touchstart",s.handleTouchStart,{passive:!1}),a.addEventListener("touchmove",s.handleTouchMove,{passive:!1}),a.addEventListener("touchend",s.handleTouchEnd,{passive:!0}),c.addEventListener("mousedown",s.handleMouseDown),document.addEventListener("mousemove",s.handleMouseMove),document.addEventListener("mouseup",s.handleMouseUp),a.addEventListener("wheel",s.handleWheel,{passive:!1}),null==(e=a.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),i()}),!1!==r.options.closeOnClickOutside&&a.addEventListener("click",()=>{r.transform.scale<=1?i():o.resetTransform()}),!1!==r.options.closeOnEsc&&(r.handlers.esc=e=>{"Escape"===e.key&&(r.transform.scale>1?o.resetTransform():i())},document.addEventListener("keydown",r.handlers.esc)),null==(n=(t=r.options).onOpen)||n.call(t)};r.handlers.click=a,e.addEventListener("click",a)},updated(e,t){const n=e.__imagePreview;n&&(n.options=normalizeOptions$y(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 normalizeOptions$x(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 vInfiniteScroll=defineDirective({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=normalizeOptions$x(t.value);if(n.disabled||!isBrowser())return;let r;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);r=t||getScrollParent$2(e)}else r=n.container;else r=getScrollParent$2(e);const o={options:n,container:r,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(o.isLoading||o.options.disabled||o.options.loading)return;if(o.throttleTimer)return;o.throttleTimer=setTimeout(()=>{o.throttleTimer=null},n.throttle);checkShouldLoad(r,e,n.distance||0)&&(yield triggerLoad(o,e))})};e.__infiniteScroll=o,n.useIntersection&&supportsIntersectionObserver()?setupIntersectionObserver(e,o):on(r,"scroll",o.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=normalizeOptions$x(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),off(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function checkShouldLoad(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const r=e,o=r.scrollTop,i=r.scrollHeight;return o+r.clientHeight>=i-n}function triggerLoad(e,t){return __async(this,null,function*(){var n,r,o,i,s,a;e.isLoading=!0,null==(r=(n=e.options).onLoadStart)||r.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(i=(o=e.options).onError)||i.call(o,t)}finally{e.isLoading=!1,null==(a=(s=e.options).onLoadEnd)||a.call(s),t.classList.remove("v-infinite-scroll--loading")}})}function setupIntersectionObserver(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 r of n)r.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield triggerLoad(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}const STATE_KEY$3="__intersect";function normalizeOptions$w(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 createObserverCallback(e,t,n){return r=>{var o,i,s,a;for(const l of r){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:r}=l;null==(o=n.handler)||o.call(n,l,t.observer),null==(i=n.onChange)||i.call(n,r,l),r?(null==(s=n.onEnter)||s.call(n,l,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(a=n.onLeave)||a.call(n,l,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:r,entry:l}}))}}}function createObserver(e,t,n){return new IntersectionObserver(createObserverCallback(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const vIntersect=defineDirective({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=normalizeOptions$w(t.value);if(n.disabled||!isBrowser()||!supportsIntersectionObserver())return void(supportsIntersectionObserver()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const r={options:n,observer:null,hasTriggeredOnce:!1};r.observer=createObserver(e,r,n),e[STATE_KEY$3]=r,r.observer.observe(e)},updated(e,t){var n,r,o;const i=e[STATE_KEY$3];if(!i)return;const s=normalizeOptions$w(t.value),a=s.root!==i.options.root||s.rootMargin!==i.options.rootMargin||s.threshold!==i.options.threshold;s.disabled!==i.options.disabled&&(s.disabled?null==(n=i.observer)||n.disconnect():null==(r=i.observer)||r.observe(e)),a&&(null==(o=i.observer)||o.disconnect(),i.observer=createObserver(e,i,s),i.observer.observe(e)),i.options=s},unmounted(e){var t;const n=e[STATE_KEY$3];n&&(null==(t=n.observer)||t.disconnect(),delete e[STATE_KEY$3])}});let globalObserver$1=null;function getGlobalObserver$1(e){return globalObserver$1||(globalObserver$1=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(load(e.target),null==globalObserver$1||globalObserver$1.unobserve(e.target))})},{rootMargin:`${e}px`}),globalObserver$1)}function setSrc$1(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function setLazyState(e,t){e.dataset.lazyState=t}function getLazyState(e){return e.dataset.lazyState||"pending"}function load(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;setLazyState(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,r;setSrc$1(e,t.options.src),setLazyState(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(r=(n=t.options).onLoad)||r.call(n,e)},n.onerror=()=>{var n,r;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>load(e),1e3*t.attempt):(t.options.error&&setSrc$1(e,t.options.error),setLazyState(e,"error"),e.classList.add("v-lazy--error"),null==(r=(n=t.options).onError)||r.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function observe(e){const t=e.__lazy;if(t)if(supportsIntersectionObserver())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const n=getGlobalObserver$1(t.options.preload||0);t.observer=n,n.observe(e)}else load(e)}function unobserve(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):globalObserver$1&&globalObserver$1.unobserve(e))}function normalizeOptions$v(e){return"string"==typeof e?{src:e}:e||{}}const vLazy=defineDirective({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=normalizeOptions$v(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");setLazyState(e,"pending"),n.placeholder&&setSrc$1(e,n.placeholder),e.classList.add("v-lazy");const r={options:n,attempt:0};e.__lazy=r,observe(e)},updated(e,t){const n=e.__lazy;if(!n)return;const r=normalizeOptions$v(t.value);r.disabled?unobserve(e):r.src!==n.options.src&&(n.options=r,n.attempt=0,"pending"!==getLazyState(e)&&(setLazyState(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),r.placeholder&&setSrc$1(e,r.placeholder),observe(e)))},unmounted(e){unobserve(e),delete e.__lazy}});function normalizeOptions$u(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 DEFAULT_SPINNER$1='\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';function createLoadingOverlay$1(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||DEFAULT_SPINNER$1,r=document.createElement("div");if(r.className=e.spinnerClass||"v-loading__spinner",r.innerHTML=n,t.appendChild(r),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}const vLoading=defineDirective({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(!isBrowser())return;const n=normalizeOptions$u(t.value);if(n.disabled)return;const r={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=r,ensurePosition(e),n.value&&showLoading(e,r)},updated(e,t){const n=e.__loading;if(!n)return;const r=normalizeOptions$u(t.value);if(r.disabled)hideLoading(e,n);else{if(r.value&&!n.options.value?showLoading(e,n):!r.value&&n.options.value&&hideLoading(e,n),n.loadingOverlay&&r.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=r.text||"")}n.options=r}},unmounted(e){const t=e.__loading;t&&(hideLoading(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function showLoading(e,t){t.loadingOverlay||(t.loadingOverlay=createLoadingOverlay$1(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function hideLoading(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 normalizeOptions$t(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)}function getDistance$3(e,t){return Math.sqrt(__pow(t.x-e.x,2)+__pow(t.y-e.y,2))}const vLongPress=defineDirective({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=normalizeOptions$t(t.value);if(n.disabled||!isBrowser())return;const r={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};r.startHandler=e=>{var t;const o=e;n.prevent&&o.preventDefault(),n.stop&&o.stopPropagation(),r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null);const i=getEventPosition(o);if(r.startPos={x:i.x,y:i.y},r.startTime=Date.now(),null==(t=n.onStart)||t.call(n,o),n.onTick){let e=n.duration;r.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}r.timerId=setTimeout(()=>{r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),n.handler(o)},n.duration)},r.endHandler=e=>{var t;const o=e;r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),r.startTime>0&&(null==(t=n.onCancel)||t.call(n,o)),r.startTime=0},r.moveHandler=e=>{var t;if(!r.timerId)return;const o=e,i=getEventPosition(o);getDistance$3(r.startPos,{x:i.x,y:i.y})>(n.distance||10)&&(r.timerId&&(clearTimeout(r.timerId),r.timerId=null),r.tickTimerId&&(clearInterval(r.tickTimerId),r.tickTimerId=null),null==(t=n.onCancel)||t.call(n,o),r.startTime=0)},e.__longPress=r,on(e,"mousedown",r.startHandler),on(e,"mouseup",r.endHandler),on(e,"mouseleave",r.endHandler),on(e,"mousemove",r.moveHandler),on(e,"touchstart",r.startHandler,{passive:!n.prevent}),on(e,"touchend",r.endHandler),on(e,"touchcancel",r.endHandler),on(e,"touchmove",r.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(normalizeOptions$t(t.value).disabled||(e.__longPress=null))}n.options=normalizeOptions$t(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),off(e,"mousedown",t.startHandler),off(e,"mouseup",t.endHandler),off(e,"mouseleave",t.endHandler),off(e,"mousemove",t.moveHandler),off(e,"touchstart",t.startHandler),off(e,"touchend",t.endHandler),off(e,"touchcancel",t.endHandler),off(e,"touchmove",t.moveHandler),delete e.__longPress)}});function normalizeOptions$s(e){return"string"==typeof e||e&&"object"==typeof e&&!("animationData"in e)?{animationData:e}:__spreadValues({autoplay:!0,loop:!0,speed:1,direction:1,renderer:"svg",preserveAspectRatio:!0},e)}function loadLottie$1(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] v-lottie: lottie-web not found. Please install it: npm install lottie-web"),null}})}const vLottie=defineDirective({name:"lottie",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$s(t.value),r=document.createElement("div");r.className=`v-lottie ${n.class||""}`,r.style.cssText=`\n width: 100%;\n height: 100%;\n ${!1!==n.preserveAspectRatio?"display: flex; align-items: center; justify-content: center;":""}\n `,e.appendChild(r);const o={options:n,animation:null,container:r};e.__lottie=o,initAnimation(o),e.classList.add("v-lottie-container")},updated(e,t){const n=e.__lottie;if(!n)return;const r=normalizeOptions$s(t.value),o=n.options.animationData,i=r.animationData;JSON.stringify(o)!==JSON.stringify(i)?(n.animation&&n.animation.destroy(),n.options=r,initAnimation(n)):(n.options=r,n.animation&&(void 0!==r.speed&&n.animation.setSpeed(r.speed),void 0!==r.direction&&n.animation.setDirection(r.direction),void 0!==r.loop&&(n.animation.loop=r.loop)))},unmounted(e){const t=e.__lottie;t&&(t.animation&&t.animation.destroy(),e.removeChild(t.container),e.classList.remove("v-lottie-container"),delete e.__lottie)}});function initAnimation(e){return __async(this,null,function*(){const t=yield loadLottie$1();if(!t)return;const n=e.options,r={container:e.container,renderer:n.renderer||"svg",loop:!1!==n.loop,autoplay:!1!==n.autoplay};"string"==typeof n.animationData&&n.animationData.startsWith("http")?r.path=n.animationData:r.animationData=n.animationData,e.animation=t.loadAnimation(r),void 0!==n.speed&&e.animation.setSpeed(n.speed),void 0!==n.direction&&e.animation.setDirection(n.direction),n.segments&&e.animation.playSegments(n.segments,!0),n.onReady&&e.animation.addEventListener("DOMLoaded",()=>{n.onReady(e.animation)}),n.onComplete&&e.animation.addEventListener("complete",n.onComplete),n.onLoopComplete&&e.animation.addEventListener("loopComplete",n.onLoopComplete),n.onEnterFrame&&e.animation.addEventListener("enterFrame",e=>{n.onEnterFrame(e.currentTime)});const o=e.container.parentElement;o&&(o.lottiePlay=()=>{var t;return null==(t=e.animation)?void 0:t.play()},o.lottiePause=()=>{var t;return null==(t=e.animation)?void 0:t.pause()},o.lottieStop=()=>{var t;return null==(t=e.animation)?void 0:t.stop()},o.lottieSetSpeed=t=>{var n;return null==(n=e.animation)?void 0:n.setSpeed(t)},o.lottieSetDirection=t=>{var n;return null==(n=e.animation)?void 0:n.setDirection(t)},o.lottieGoToAndPlay=(t,n=!0)=>{var r;return null==(r=e.animation)?void 0:r.goToAndPlay(t,n)},o.lottieGoToAndStop=(t,n=!0)=>{var r;return null==(r=e.animation)?void 0:r.goToAndStop(t,n)})})}function transformText$1(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function normalizeOptions$r(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 vLowercase=defineDirective({name:"lowercase",ssr:!0,mounted(e,t){const n=normalizeOptions$r(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>transformText$1(e,n));e.__lowercaseCleanup=t}else transformTextContent(e,e=>transformText$1(e,n))},updated(e,t){const n=normalizeOptions$r(t.value);isInputElement(e)?n.onInput&&(e.value=transformText$1(e.value,n)):transformTextContent(e,e=>transformText$1(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),STATE_KEY$2="__mask",TOKEN_PATTERNS$1={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function parseMask$1(e,t){return[...e].map(e=>{const n=TOKEN_PATTERNS$1[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function normalizeOptions$q(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 formatValue(e,t,n,r){let o="",i=0;for(const s of t){if(i>=e.length){o+=s.isLiteral?s.placeholder:r?n:"";continue}const t=e[i];s.isLiteral?(t===s.placeholder&&i++,o+=s.placeholder):s.pattern.test(t)?(o+=t,i++):t===n?(o+=r?n:"",i++):i++}return o}function getRawValue(e,t,n){let r="";for(let o=0;o<e.length&&o<t.length;o++)t[o].isLiteral||e[o]===n||(r+=e[o]);return r}function isComplete(e,t,n){for(let r=0;r<t.length;r++)if(!t[r].isLiteral&&(r>=e.length||e[r]===n))return!1;return!0}function getCursorPos(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const vMask=defineDirective({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!isInputElement(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const r=normalizeOptions$q(t.value);if(r.disabled||!isBrowser())return;const o=r.placeholder||"_",i=parseMask$1(r.mask,o),s=e=>{var t,n,s;const a=e.target,l=a.value,c=a.selectionStart||0,u=formatValue(l,i,o,null==(t=r.showPlaceholder)||t);if(u!==l)return a.value=u,a.setSelectionRange(getCursorPos(i,c),getCursorPos(i,c)),void a.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=r.onChange)||n.call(r,u,getRawValue(u,i,o)),isComplete(u,i,o)&&(null==(s=r.onComplete)||s.call(r,u))},a=()=>{!e.value&&r.showPlaceholder&&(e.value=formatValue("",i,o,!0))},l=()=>{r.showMaskOnBlur||isComplete(e.value,i,o)||!r.clearIncomplete||(e.value="")};on(e,"input",s),on(e,"focus",a),on(e,"blur",l),e[STATE_KEY$2]={options:r,tokens:i,placeholder:o,inputHandler:s,focusHandler:a,blurHandler:l},e.value&&(e.value=formatValue(e.value,i,o,null==(n=r.showPlaceholder)||n))},updated(e,t){const n=e[STATE_KEY$2];n&&(n.options=normalizeOptions$q(t.value),n.tokens=parseMask$1(n.options.mask,n.placeholder))},unmounted(e){const t=e[STATE_KEY$2];t&&(off(e,"input",t.inputHandler),off(e,"focus",t.focusHandler),off(e,"blur",t.blurHandler),delete e[STATE_KEY$2])}});function formatNumber$2(e,t){const{precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),i+u+s}function parseToNumber(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),r=Number.parseFloat(n);return isNaN(r)?null:r}function clampValue(e,t){var n;let r=e;return!(null==(n=t.allowNegative)||n)&&r<0&&(r=Math.abs(r)),clamp$1(r,t.min,t.max)}function calculateCursorPosition(e,t,n,r=0){let o=0,i=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&o++;for(let e=r;e<t.length;e++)if(/\d/.test(t[e])&&i++,i>=o)return e+1;return t.length}function setupNumberInput(e,t,n){const{decimal:r=".",prefix:o=""}=t;let i=!1;const s=()=>{if(i)return;const s=e.value,a=e.selectionStart||0;if(!s||"-"===s)return;const l=parseToNumber(s,r);if(null===l)return i=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(i=!1);const c=clampValue(l,t),u=n(c,t);if(u!==s){i=!0;const t=calculateCursorPosition(s,u,a,o.length);e.value=u,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}},a=()=>{if(!e.value||"-"===e.value)return;const o=parseToNumber(e.value,r);if(null!==o){const r=clampValue(o,t),s=n(r,t);i=!0,e.value=s,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}};if(e.addEventListener("input",s),e.addEventListener("blur",a),e.value){const o=parseToNumber(e.value,r);if(null!==o){const r=n(clampValue(o,t),t);i=!0,e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}}return()=>{e.removeEventListener("input",s),e.removeEventListener("blur",a)}}function formatMoney$1(e,t){const{precision:n=2,separator:r=",",decimal:o=".",symbol:i="$",symbolPosition:s="before"}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),"before"===s?i+u:u+i}const vMoney=defineDirective({name:"money",ssr:!0,mounted(e,t){var n,r,o;const i="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(i.precision=null!=(r=i.precision)?r:2,isInputElement(e)){const{symbol:t="$",symbolPosition:n="before"}=i,r="before"===n?t:"",o=setupNumberInput(e,__spreadProps(__spreadValues({},i),{prefix:r}),formatMoney$1);e.__money={options:i,cleanup:o},requestAnimationFrame(()=>{const t=e;if(t.value){const e=parseToNumber(t.value,i.decimal||".");if(null!==e){const n=formatMoney$1(clampValue(e,i),i);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==(o=e.textContent)?void 0:o.trim();t&&(n=parseToNumber(t,i.decimal||"."))}null!==n&&(e.textContent=formatMoney$1(clampValue(n,i),i))}},updated(e,t){var n,r;const o="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};o.precision=null!=(r=o.precision)?r:2;const i=e.__money;if(i)i.options=o;else if(!isInputElement(e)){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=formatMoney$1(clampValue(n,o),o))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function normalizeOptions$p(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 vMutation=defineDirective({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=normalizeOptions$p(t.value);if(n.disabled||!isBrowser())return;if(!supportsMutationObserver())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const r={options:n,observer:null};r.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),r.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=r},updated(e,t){const n=e.__mutation;if(!n)return;const r=normalizeOptions$p(t.value);r.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!r.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:r.attributes,attributeFilter:r.attributeFilter,childList:r.childList,subtree:r.subtree,characterData:r.characterData,attributeOldValue:r.attributeOldValue,characterDataOldValue:r.characterDataOldValue}):r.disabled||r.attributes===n.options.attributes&&r.childList===n.options.childList&&r.subtree===n.options.subtree&&r.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:r.attributes,attributeFilter:r.attributeFilter,childList:r.childList,subtree:r.subtree,characterData:r.characterData,attributeOldValue:r.attributeOldValue,characterDataOldValue:r.characterDataOldValue})),n.options=r},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),vNumber=defineDirective({name:"number",ssr:!0,mounted(e,t){var n,r;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if(isInputElement(e)){const t=setupNumberInput(e,o,formatNumber$2);e.__number={options:o,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=parseToNumber(t.value,o.decimal||".");if(null!==e){const n=formatNumber$2(clampValue(e,o),o);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==(r=e.textContent)?void 0:r.trim();t&&(n=parseToNumber(t,o.decimal||"."))}null!==n&&(e.textContent=formatNumber$2(clampValue(n,o),o))}},updated(e,t){var n;const r="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},o=e.__number;if(o)o.options=r;else if(!isInputElement(e)){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=formatNumber$2(clampValue(n,r),r))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}});function normalizeOptions$o(e){return"function"==typeof e?{onPan:e}:__spreadValues({threshold:10,direction:"all",preventDefault:!0,stopPropagation:!1,pointers:["touch","mouse"]},e)}function getDirection$1(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function createPanEvent(e,t,n=!1,r=!1){const o=t.currentX-t.startX,i=t.currentY-t.startY,s=Math.sqrt(o*o+i*i),a=Date.now()-t.startTime;return{originalEvent:e,direction:getDirection$1(o,i),deltaX:o,deltaY:i,distance:s,x:t.currentX,y:t.currentY,startX:t.startX,startY:t.startY,isPanning:t.isPanning,isFirst:n,isFinal:r,velocity:s/(a||1)}}function getPosition$1(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}function isDirectionAllowed$1(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}const vPan=defineDirective({name:"pan",ssr:!1,mounted(e,t){var n,r;if(!isBrowser())return;const o=normalizeOptions$o(t.value),i={options:o,startX:0,startY:0,currentX:0,currentY:0,isPanning:!1,startTime:0,touchstartHandler:e=>handleStart$2(e,i),touchmoveHandler:e=>handleMove$2(e,i),touchendHandler:e=>handleEnd$2(e,i),mousedownHandler:e=>handleStart$2(e,i),mousemoveHandler:e=>handleMove$2(e,i),mouseupHandler:e=>handleEnd$2(e,i)};e.__pan=i,(null==(n=o.pointers)?void 0:n.includes("touch"))&&(on(e,"touchstart",i.touchstartHandler,{passive:!1}),on(e,"touchmove",i.touchmoveHandler,{passive:!1}),on(e,"touchend",i.touchendHandler),on(e,"touchcancel",i.touchendHandler)),(null==(r=o.pointers)?void 0:r.includes("mouse"))&&on(e,"mousedown",i.mousedownHandler),e.classList.add("v-pan")},updated(e,t){const n=e.__pan;n&&(n.options=normalizeOptions$o(t.value))},unmounted(e){const t=e.__pan;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),off(e,"mousedown",t.mousedownHandler),e.classList.remove("v-pan"),delete e.__pan)}});function handleStart$2(e,t,n){const r=getPosition$1(e);t.startX=r.x,t.startY=r.y,t.currentX=r.x,t.currentY=r.y,t.isPanning=!1,t.startTime=Date.now(),t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation(),"mousedown"===e.type&&(document.addEventListener("mousemove",t.mousemoveHandler),document.addEventListener("mouseup",t.mouseupHandler))}function handleMove$2(e,t,n){var r,o,i,s;const a=getPosition$1(e);t.currentX=a.x,t.currentY=a.y;const l=t.currentX-t.startX,c=t.currentY-t.startY,u=Math.sqrt(l*l+c*c),d=t.options.threshold||10;if(!t.isPanning&&u<d)return;if(!isDirectionAllowed$1(getDirection$1(l,c),t.options.direction))return;t.options.preventDefault&&e.preventDefault();const p=t.isPanning;t.isPanning=!0;const m=createPanEvent(e,t,!p);p||null==(o=(r=t.options).onStart)||o.call(r,m),null==(s=(i=t.options).onPan)||s.call(i,m)}function handleEnd$2(e,t){var n,r;if(document.removeEventListener("mousemove",t.mousemoveHandler),document.removeEventListener("mouseup",t.mouseupHandler),!t.isPanning)return;const o=createPanEvent(e,t,!1,!0);null==(r=(n=t.options).onEnd)||r.call(n,o),t.isPanning=!1}function normalizeOptions$n(e){return"boolean"==typeof e?{enabled:e,speed:.5}:"number"==typeof e?{speed:e,enabled:!0}:__spreadValues({speed:.5,enabled:!0,reverse:!1,horizontal:!1,useTransform:!0},e)}function isMobile$1(e){return!!e&&window.innerWidth<e}const vParallax=defineDirective({name:"parallax",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$n(t.value),scrollHandler:()=>handleScroll(e,n),resizeHandler:()=>handleResize(e,n),isVisible:!0,lastOffset:0,ticking:!1};e.__parallax=n,e.style.willChange="transform";on(getScrollParent$1(e),"scroll",n.scrollHandler,{passive:!0}),on(window,"resize",n.resizeHandler,{passive:!0}),handleScroll(e,n),e.classList.add("v-parallax")},updated(e,t){const n=e.__parallax;n&&(n.options=normalizeOptions$n(t.value))},unmounted(e){const t=e.__parallax;if(!t)return;off(getScrollParent$1(e),"scroll",t.scrollHandler),off(window,"resize",t.resizeHandler),e.style.willChange="",e.style.transform="",e.classList.remove("v-parallax"),delete e.__parallax}});function handleScroll(e,t){t.options.enabled&&!isMobile$1(t.options.mobileBreakpoint)&&(t.ticking||(t.ticking=!0,requestAnimationFrame(()=>{const n=e.getBoundingClientRect(),r=window.innerHeight;if(t.isVisible=n.top<r&&n.bottom>0,t.isVisible){const r=window.scrollY;let o=(r-(n.top+r))*(t.options.speed||.5);void 0!==t.options.minScroll&&(o=Math.max(o,t.options.minScroll)),void 0!==t.options.maxScroll&&(o=Math.min(o,t.options.maxScroll)),t.options.reverse&&(o=-o),t.options.transform?e.style.transform=t.options.transform(o,e):!1!==t.options.useTransform&&(t.options.horizontal?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`),t.lastOffset=o}t.ticking=!1})))}function handleResize(e,t){handleScroll(e,t)}function getScrollParent$1(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}const STATE_KEY$1="__permission",WILDCARD$1="*";let globalConfig=null;function configurePermission(e){globalConfig=e}function getPermissionConfig(){return globalConfig}function normalizeOptions$m(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}function hasPermission$1(e,t){return t.includes(WILDCARD$1)||t.includes(e)}function verifyPermission(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!globalConfig)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=globalConfig.getPermissions(),r=(null==(t=globalConfig.getRoles)?void 0:t.call(globalConfig))||[],o=globalConfig.roleMap||{},i=Array.isArray(e.value)?e.value:[e.value];function s(e){if(e in o)return r.includes(e);if(hasPermission$1(e,n))return!0;for(const t of r){if(hasPermission$1(e,o[t]||[]))return!0}return!1}return"every"===(e.mode||"some")?i.every(s):i.some(s)}function handleDenied(e,t,n){var r,o;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(r=e.parentNode)||r.insertBefore(n.placeholder,e),null==(o=e.parentNode)||o.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")}}function handleGranted(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")}}function getState(e){return e[STATE_KEY$1]||(e[STATE_KEY$1]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[STATE_KEY$1]}function checkPermission(e,t){var n,r;const o=getState(e);o.options=normalizeOptions$m(t.value);const i=verifyPermission(o.options);null==(r=(n=o.options).onChange)||r.call(n,i);const s=o.options.action||"remove";i?handleGranted(e,s,o):handleDenied(e,s,o)}function cleanup(e){const t=e[STATE_KEY$1];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[STATE_KEY$1]}const vPermission=defineDirective({name:"permission",ssr:!0,mounted(e,t){checkPermission(e,t)},updated(e,t){checkPermission(e,t)},unmounted(e){cleanup(e)}});function normalizeOptions$l(e){return"function"==typeof e?{onPinch:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function getDistance$2(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function getCenter$3(e){return e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function createPinchEvent(e,t,n=!1,r=!1){const o=getCenter$3(e.touches);return{originalEvent:e,scale:t.initialDistance>0?t.currentDistance/t.initialDistance:1,distance:t.currentDistance,initialDistance:t.initialDistance,centerX:o.x,centerY:o.y,isPinching:t.isPinching,isFirst:n,isFinal:r}}const vPinch=defineDirective({name:"pinch",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$l(t.value),initialDistance:0,currentDistance:0,isPinching:!1,initialScale:1,savedTransition:"",touchstartHandler:t=>handleStart$1(t,n,e),touchmoveHandler:t=>handleMove$1(t,n,e),touchendHandler:t=>handleEnd$1(t,n,e)};e.__pinch=n,on(e,"touchstart",n.touchstartHandler,{passive:!1}),on(e,"touchmove",n.touchmoveHandler,{passive:!1}),on(e,"touchend",n.touchendHandler),on(e,"touchcancel",n.touchendHandler),e.classList.add("v-pinch")},updated(e,t){const n=e.__pinch;n&&(n.options=normalizeOptions$l(t.value))},unmounted(e){const t=e.__pinch;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),e.classList.remove("v-pinch"),delete e.__pinch)}});function handleStart$1(e,t,n){if(2===e.touches.length){if(t.initialDistance=getDistance$2(e.touches),t.currentDistance=t.initialDistance,t.isPinching=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,r=new DOMMatrix(e);t.initialScale=r.a,t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation()}}function handleMove$1(e,t,n){var r,o,i,s;if(2!==e.touches.length)return;if(t.currentDistance=getDistance$2(e.touches),t.initialDistance<=0)return;const a=t.currentDistance/t.initialDistance;if(void 0!==t.options.minScale&&a<t.options.minScale)return;if(void 0!==t.options.maxScale&&a>t.options.maxScale)return;t.options.preventDefault&&e.preventDefault();const l=t.isPinching;t.isPinching=!0;const c=createPinchEvent(e,t,!l);if(l||null==(o=(r=t.options).onStart)||o.call(r,c),t.options.enableTransform){const e=t.options.transformOrigin||"center center";n.style.transformOrigin=e,n.style.transform=`scale(${t.initialScale*a})`}null==(s=(i=t.options).onPinch)||s.call(i,c)}function handleEnd$1(e,t,n){var r,o;if(!t.isPinching)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const i=createPinchEvent(__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),t,!1,!0);null==(o=(r=t.options).onEnd)||o.call(r,i),t.isPinching=!1,t.initialDistance=0,t.currentDistance=0}const vPrint=defineDirective({name:"print",ssr:!0,mounted(e,t){const n=normalizeOptions$k(t.value),r={options:n,clickHandler:null};if(e.__print=r,n.immediate)return void setTimeout(()=>printElement(e,n),100);const o=()=>{printElement(e,r.options)};e.addEventListener("click",o),r.clickHandler=o,e.style.cursor="pointer"},updated(e,t){const n=e.__print;if(!n)return;const r=normalizeOptions$k(t.value);n.options=r},unmounted(e){const t=e.__print;t&&(t.clickHandler&&e.removeEventListener("click",t.clickHandler),e.style.cursor="",delete e.__print)}});function normalizeOptions$k(e){return!0===e?{immediate:!0}:!1===e?{}:e||{}}function printElement(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 printInNewWindow$1(n,t):yield printInIframe$1(n,t),t.onAfterPrint&&t.onAfterPrint()):console.warn("[Directix] v-print: Target element not found")})}function printInIframe$1(e,t){return __async(this,null,function*(){var n,r,o;const i=document.createElement("iframe");i.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(i);const s=i.contentDocument||(null==(n=i.contentWindow)?void 0:n.document);if(!s)return console.warn("[Directix] v-print: Could not access iframe document"),void document.body.removeChild(i);const a=buildPrintContent$1(e,t);s.open(),s.write(a),s.close(),yield waitForImages$1(s);try{null==(r=i.contentWindow)||r.focus(),null==(o=i.contentWindow)||o.print()}catch(e){console.error("[Directix] v-print: Print failed",e)}setTimeout(()=>{document.body.removeChild(i)},1e3)})}function printInNewWindow$1(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 r=buildPrintContent$1(e,t);n.document.open(),n.document.write(r),n.document.close(),yield waitForImages$1(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}function buildPrintContent$1(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 r=t.title||document.title||"Print",o=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${r}</title>\n\t${n}\n</head>\n<body>\n\t${o}\n</body>\n</html>`}function waitForImages$1(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 normalizeOptions$j(e){return"number"==typeof e?{value:e}:__spreadValues({value:0,max:100,min:0,height:4,color:"#42b883",backgroundColor:"rgba(0, 0, 0, 0.1)",duration:300,showText:!1,animate:!0,indeterminate:!1,striped:!1,animated:!1,position:"top"},e||{})}function createProgressContainer(e){const t=document.createElement("div");t.className=`v-progress ${e.class||""}`,t.style.cssText=`\n position: absolute;\n ${"bottom"===e.position?"bottom":"top"}: 0;\n left: 0;\n right: 0;\n height: ${e.height}px;\n background: ${e.backgroundColor};\n overflow: hidden;\n z-index: 1000;\n `;const n=document.createElement("div");n.className="v-progress__bar";let r=`\n height: 100%;\n background-color: ${e.color};\n transition: ${!1!==e.animate?`width ${e.duration}ms ease`:"none"};\n width: 0%;\n `;if(e.striped&&(r+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),n.style.cssText=r,e.indeterminate?(n.classList.add("v-progress--indeterminate"),n.style.width="30%",n.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(n.style.animation="v-progress-stripes 1s linear infinite"),t.appendChild(n),e.showText){const n=document.createElement("span");n.className="v-progress__text",n.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max((e.height||4)-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,t.appendChild(n)}return{container:t,progressBar:n}}function ensureStyles$5(){if(!isBrowser())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}const vProgress=defineDirective({name:"progress",ssr:!1,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$j(t.value);ensureStyles$5();"static"===getComputedStyle(e).position&&(e.style.position="relative");const{container:r,progressBar:o}=createProgressContainer(n),i={options:n,progressBar:o,container:r,currentValue:0};e.__progress=i,e.appendChild(r),n.indeterminate||setProgress(i,n.value),e.classList.add("v-progress-container")},updated(e,t){const n=e.__progress;if(!n)return;const r=n.options,o=normalizeOptions$j(t.value);n.options=o,n.container&&(n.container.style.height=`${o.height}px`,n.container.style.background=o.backgroundColor||"rgba(0, 0, 0, 0.1)"),n.progressBar&&(n.progressBar.style.backgroundColor=o.color||"#42b883"),r.indeterminate!==o.indeterminate&&n.progressBar?o.indeterminate?(n.progressBar.classList.add("v-progress--indeterminate"),n.progressBar.style.width="30%",n.progressBar.style.animation="v-progress-indeterminate 1.5s infinite linear"):(n.progressBar.classList.remove("v-progress--indeterminate"),n.progressBar.style.animation="",setProgress(n,o.value)):o.indeterminate||o.value===r.value||setProgress(n,o.value)},unmounted(e){const t=e.__progress;t&&(t.container&&t.container.parentNode&&t.container.parentNode.removeChild(t.container),e.classList.remove("v-progress-container"),delete e.__progress)}});function setProgress(e,t){var n,r;const{options:o,progressBar:i,container:s}=e;if(!i||!s)return;const a=o.min||0,l=o.max||100,c=Math.max(a,Math.min(l,t)),u=(c-a)/(l-a)*100;if(i.style.width=`${u}%`,o.showText){const e=s.querySelector(".v-progress__text");e&&(e.textContent=`${Math.round(u)}%`)}e.currentValue=c,null==(n=o.onChange)||n.call(o,c,u),u>=100&&(null==(r=o.onComplete)||r.call(o))}const DEFAULT_DISTANCE=60,DEFAULT_MAX_DISTANCE=100,DEFAULT_SUCCESS_DURATION=500,DEFAULT_ERROR_DURATION=1e3,DEFAULT_INDICATORS={idle:"↓",pulling:"↓ Pull",ready:"↓ Release",loading:"⟳ Loading...",success:"✓ Done",error:"✗ Failed"};function normalizeOptions$i(e){var t,n,r,o,i;return"function"==typeof e?{handler:e}:{handler:e.handler,distance:null!=(t=e.distance)?t:DEFAULT_DISTANCE,maxDistance:null!=(n=e.maxDistance)?n:DEFAULT_MAX_DISTANCE,disabled:null!=(r=e.disabled)&&r,indicator:e.indicator,successDuration:null!=(o=e.successDuration)?o:DEFAULT_SUCCESS_DURATION,errorDuration:null!=(i=e.errorDuration)?i:DEFAULT_ERROR_DURATION,onStateChange:e.onStateChange}}function createIndicator(){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}function updateIndicator(e,t,n){var r;const o=null==(r=n.indicator)?void 0:r[t];e.textContent=o||DEFAULT_INDICATORS[t]}function setState(e,t){var n,r;e.state!==t&&(e.state=t,updateIndicator(e.indicatorEl,t,e.options),null==(r=(n=e.options).onStateChange)||r.call(n,t))}function applyTransform(e,t,n){e.contentEl.style.transform=`translateY(${t}px)`,e.indicatorEl.style.opacity="1",e.indicatorEl.style.transform=`translateY(${t}px)`}function resetPosition(e){e.contentEl.style.transform="",e.indicatorEl.style.opacity="0",setState(e,"idle")}function triggerRefresh(e){return __async(this,null,function*(){setState(e,"loading");const t=e.options.distance;applyTransform(e,t);try{yield e.options.handler(),setState(e,"success"),yield sleep$1(e.options.successDuration)}catch(t){setState(e,"error"),yield sleep$1(e.options.errorDuration)}finally{resetPosition(e)}})}function sleep$1(e){return new Promise(t=>setTimeout(t,e))}function createHandlers(e){const{contentEl:t,options:n}=e;return{touchStart:r=>{n.disabled||"loading"===e.state||t.scrollTop>0||(e.pulling=!0,e.startY=r.touches[0].clientY,e.currentY=e.startY,setState(e,"idle"))},touchMove:r=>{if(!e.pulling||n.disabled||"loading"===e.state)return;e.currentY=r.touches[0].clientY;const o=e.currentY-e.startY;if(o<=0)return void(t.style.transform&&(t.style.transition="",resetPosition(e)));r.preventDefault();const i=Math.min(.5*o,n.maxDistance),s=i/n.distance;t.style.transition="none",applyTransform(e,i),setState(e,s>=1?"ready":"pulling")},touchEnd:()=>{if(!e.pulling||n.disabled)return;e.pulling=!1;const r=e.currentY-e.startY,o=Math.min(.5*r,n.maxDistance);t.style.transition="","ready"===e.state&&o>=n.distance?triggerRefresh(e):resetPosition(e)}}}function bindEvents$1(e,t){e.addEventListener("touchstart",t.touchStart,{passive:!1}),e.addEventListener("touchmove",t.touchMove,{passive:!1}),e.addEventListener("touchend",t.touchEnd,{passive:!0})}function unbindEvents$1(e,t){e.removeEventListener("touchstart",t.touchStart),e.removeEventListener("touchmove",t.touchMove),e.removeEventListener("touchend",t.touchEnd)}const vPullRefresh=defineDirective({name:"pull-refresh",ssr:!1,mounted(e,t){const n=normalizeOptions$i(t.value);e.style.position="relative",e.style.overflow="hidden",e.classList.add("v-pull-refresh");const r=document.createElement("div");for(r.className="v-pull-refresh__content",r.style.cssText="position: relative; height: 100%; overflow-y: auto;";e.firstChild;)r.appendChild(e.firstChild);e.appendChild(r);const o=createIndicator();e.insertBefore(o,r);const i={options:n,state:"idle",startY:0,currentY:0,pulling:!1,indicatorEl:o,contentEl:r,handlers:null};i.handlers=createHandlers(i),e.__pullRefresh=i,n.disabled||bindEvents$1(e,i.handlers),updateIndicator(o,"idle",n)},updated(e,t){const n=e.__pullRefresh;if(!n)return;const r=n.options.disabled;n.options=normalizeOptions$i(t.value),updateIndicator(n.indicatorEl,n.state,n.options),n.options.disabled&&!r?unbindEvents$1(e,n.handlers):!n.options.disabled&&r&&bindEvents$1(e,n.handlers)},unmounted(e){const t=e.__pullRefresh;t&&(unbindEvents$1(e,t.handlers),delete e.__pullRefresh)}});function getResizeInfo(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}function normalizeOptions$h(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)}function createFallbackResize(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 r=n.contentWindow;return r&&r.addEventListener("resize",t),{iframe:n,cleanup:()=>{r&&r.removeEventListener("resize",t),n.remove()}}}const vResize=defineDirective({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=normalizeOptions$h(t.value);if(n.disabled||!isBrowser())return;ensurePosition(e);const r={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(r.pendingEntry=e,r.debounceTimer||(r.debounceTimer=setTimeout(()=>{r.pendingEntry&&n.handler(r.pendingEntry),r.debounceTimer=null,r.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=r,supportsResizeObserver())r.observer=new ResizeObserver(e=>{for(const t of e)r.handler(t)}),r.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:o}=createFallbackResize(e,()=>{const t=e.getBoundingClientRect(),o={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};r.handler(o),n.onFallback&&n.onFallback(getResizeInfo(o))});r.fallbackIframe=t,e.__resizeCleanup=o}},updated(e,t){const n=e.__resize;n&&(n.options=normalizeOptions$h(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 normalizeOptions$g(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}function createRipple(e,t,n){const r=t.getBoundingClientRect(),o=e.clientX-r.left,i=e.clientY-r.top,s=2*Math.max(r.width,r.height),a=document.createElement("span");return a.className="v-ripple__wave",a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${s}px;\n height: ${s}px;\n left: ${o-s/2}px;\n top: ${i-s/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,a}function animateRipple(e,t){const n=t.duration||600,r=t.initialScale||0,o=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${r})`,opacity:.3},{transform:`scale(${o})`,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`,e.style.transform=`scale(${o})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}const vRipple=defineDirective({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=normalizeOptions$g(t.value);if(n.disabled||!isBrowser())return;ensurePosition(e),ensureOverflowHidden(e),e.classList.add("v-ripple");const r={options:n,clickHandler:t=>{if(r.options.disabled)return;const n=createRipple(t,e,r.options);n&&(e.appendChild(n),animateRipple(n,r.options))}};e.__ripple=r,on(e,"click",r.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=normalizeOptions$g(t.value))},unmounted(e){const t=e.__ripple;t&&(off(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}});function normalizeOptions$f(e){return"function"==typeof e?{onRotate:e}:__spreadValues({preventDefault:!0,stopPropagation:!1,enableTransform:!1,transformOrigin:"center center"},e)}function getAngle$2(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}function getCenter$2(e){return e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function createRotateEvent(e,t,n=!1,r=!1){const o=getCenter$2(e.touches),i=t.currentAngle*(Math.PI/180);return{originalEvent:e,angle:t.currentAngle,radians:i,rotation:t.currentAngle-t.initialAngle,centerX:o.x,centerY:o.y,isRotating:t.isRotating,isFirst:n,isFinal:r}}const vRotateGesture=defineDirective({name:"rotate-gesture",ssr:!1,mounted(e,t){if(!isBrowser())return;const n={options:normalizeOptions$f(t.value),initialAngle:0,currentAngle:0,isRotating:!1,baseRotation:0,savedTransition:"",touchstartHandler:t=>handleStart(t,n,e),touchmoveHandler:t=>handleMove(t,n,e),touchendHandler:t=>handleEnd(t,n,e)};e.__rotateGesture=n,on(e,"touchstart",n.touchstartHandler,{passive:!1}),on(e,"touchmove",n.touchmoveHandler,{passive:!1}),on(e,"touchend",n.touchendHandler),on(e,"touchcancel",n.touchendHandler),e.classList.add("v-rotate-gesture")},updated(e,t){const n=e.__rotateGesture;n&&(n.options=normalizeOptions$f(t.value))},unmounted(e){const t=e.__rotateGesture;t&&(off(e,"touchstart",t.touchstartHandler),off(e,"touchmove",t.touchmoveHandler),off(e,"touchend",t.touchendHandler),off(e,"touchcancel",t.touchendHandler),e.classList.remove("v-rotate-gesture"),delete e.__rotateGesture)}});function handleStart(e,t,n){if(2===e.touches.length){if(t.initialAngle=getAngle$2(e.touches),t.currentAngle=t.initialAngle,t.isRotating=!1,t.options.enableTransform){const e=getComputedStyle(n).transform,r=new DOMMatrix(e);t.baseRotation=Math.atan2(r.b,r.a)*(180/Math.PI),t.savedTransition=n.style.transition,n.style.transition="none"}t.options.preventDefault&&e.preventDefault(),t.options.stopPropagation&&e.stopPropagation()}}function handleMove(e,t,n){var r,o,i,s;if(2!==e.touches.length)return;t.currentAngle=getAngle$2(e.touches),t.options.preventDefault&&e.preventDefault();const a=t.isRotating;t.isRotating=!0;const l=createRotateEvent(e,t,!a);if(a||null==(o=(r=t.options).onStart)||o.call(r,l),t.options.enableTransform){const e=t.currentAngle-t.initialAngle,r=t.options.transformOrigin||"center center";n.style.transformOrigin=r,n.style.transform=`rotate(${t.baseRotation+e}deg)`}null==(s=(i=t.options).onRotate)||s.call(i,l)}function handleEnd(e,t,n){var r,o;if(!t.isRotating)return;t.options.enableTransform&&(n.style.transition=t.savedTransition);const i=createRotateEvent(__spreadProps(__spreadValues({},e),{touches:e.touches.length>=2?e.touches:[]}),t,!1,!0);null==(o=(r=t.options).onEnd)||o.call(r,i),t.isRotating=!1,t.initialAngle=0,t.currentAngle=0}const DEFAULT_ALLOWED_TAGS$2=["b","i","u","strong","em","br","p","span","div"],DEFAULT_ALLOWED_ATTRIBUTES$2=["title","alt","href","src"],DANGEROUS_TAGS$2=["script","iframe","object","embed","form","input","style","link","meta","base"],DANGEROUS_ATTRIBUTES$2=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function normalizeOptions$e(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2}:__spreadValues({allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function sanitizeHtml$1(e,t){var n;if(t.handler)return t.handler(e);const r=document.createElement("div");r.innerHTML=e;for(const e of DANGEROUS_TAGS$2){const t=r.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const o=e=>{var n;const r=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(r)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of DANGEROUS_ATTRIBUTES$2)e.removeAttribute(t);const i=e.getAttribute("href");if(i&&i.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 r of n){const n=t.allowedAttributes.includes(r.name.toLowerCase()),o="class"===r.name&&t.allowClass,i="id"===r.name&&t.allowId,s="style"===r.name&&t.allowStyles;n||o||i||s||e.removeAttribute(r.name)}}for(const t of Array.from(e.children))o(t)};for(const e of Array.from(r.children))o(e);return r.innerHTML}const vSanitize=defineDirective({name:"sanitize",ssr:!0,defaults:{allowedTags:DEFAULT_ALLOWED_TAGS$2,allowedAttributes:DEFAULT_ALLOWED_ATTRIBUTES$2,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$e(t.value);if(e.__sanitize={options:n},n.disabled)return;const r=e.innerHTML;r&&(e.innerHTML=sanitizeHtml$1(r,n))},updated(e,t){const n=e.__sanitize;if(!n)return;const r=n.options.disabled;if(n.options=normalizeOptions$e(t.value),n.options.disabled||!n.options.sanitizeOnUpdate){if(r&&!n.options.disabled){const t=e.innerHTML;t&&(e.innerHTML=sanitizeHtml$1(t,n.options))}return}const o=e.innerHTML;o&&(e.innerHTML=sanitizeHtml$1(o,n.options))},unmounted(e){delete e.__sanitize}});function getScrollInfo(e,t,n){let r=0,o=0,i=0,s=0;if(e===window)r=window.scrollX||document.documentElement.scrollLeft,o=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,s=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;r=t.scrollLeft,o=t.scrollTop,i=t.scrollWidth-t.clientWidth,s=t.scrollHeight-t.clientHeight}return{scrollLeft:r,scrollTop:o,scrollLeftMax:i,scrollTopMax:s,progressX:i>0?r/i:0,progressY:s>0?o/s:0,directionX:r!==t?r>t?1:-1:0,directionY:o!==n?o>n?1:-1:0,container:e}}function normalizeOptions$d(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 vScroll=defineDirective({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=normalizeOptions$d(t.value);if(n.disabled||!isBrowser())return;let r;if(n.container)if(n.container===window)r=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);r=t||getScrollParent$2(e)}else r=n.container;else{const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e),i=/(auto|scroll)/.test(t+n+o);r=i?e:getScrollParent$2(e)}const o={options:n,container:r,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)o.pendingEvent=e,o.throttleTimer||(o.throttleTimer=setTimeout(()=>{if(o.pendingEvent){const e=getScrollInfo(r,o.lastScrollLeft,o.lastScrollTop);o.lastScrollLeft=e.scrollLeft,o.lastScrollTop=e.scrollTop,n.handler(o.pendingEvent,e)}o.throttleTimer=null,o.pendingEvent=null},n.throttle));else{const t=getScrollInfo(r,o.lastScrollLeft,o.lastScrollTop);o.lastScrollLeft=t.scrollLeft,o.lastScrollTop=t.scrollTop,n.handler(e,t)}}},i=getScrollInfo(r,0,0);o.lastScrollLeft=i.scrollLeft,o.lastScrollTop=i.scrollTop,e.__scroll=o,on(r,"scroll",o.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=normalizeOptions$d(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),off(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),defaultOptions={loading:!0,animation:"wave",width:"100%",height:"1em",radius:"4px",color:"#e8e8e8",animationColor:"#f0f0f0",preserveDimensions:!0};function normalizeOptions$c(e){return"boolean"==typeof e?__spreadProps(__spreadValues({},defaultOptions),{loading:e}):__spreadValues(__spreadValues({},defaultOptions),e)}function createSkeleton(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width,r="number"==typeof e.height?`${e.height}px`:e.height,o="number"==typeof e.radius?`${e.radius}px`:e.radius;let i="";return i="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color} 25%, ${e.animationColor} 50%, ${e.color} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color};`,t.style.cssText=`\n width: ${n};\n height: ${r};\n border-radius: ${o};\n ${i}\n `,t}function ensureStyles$4(){if(!isBrowser())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}const vSkeleton=defineDirective({name:"skeleton",ssr:!0,mounted(e,t){if(!isBrowser())return;const n=normalizeOptions$c(t.value);ensureStyles$4();const r={options:n,originalDisplay:getComputedStyle(e).display,originalWidth:e.style.width,originalHeight:e.style.height,skeletonEl:null};e.__skeleton=r,n.loading&&showSkeleton(e,r),e.classList.add("v-skeleton-container")},updated(e,t){const n=e.__skeleton;if(!n)return;const r=normalizeOptions$c(t.value),o=n.options.loading;n.options=r,r.loading&&!o?showSkeleton(e,n):!r.loading&&o&&hideSkeleton(e,n)},unmounted(e){const t=e.__skeleton;t&&(t.skeletonEl&&t.skeletonEl.parentNode&&t.skeletonEl.parentNode.removeChild(t.skeletonEl),e.classList.remove("v-skeleton-container"),e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight,delete e.__skeleton)}});function showSkeleton(e,t){var n;const r=t.options;if(t.originalDisplay=e.style.display||getComputedStyle(e).display,r.preserveDimensions){const n=getComputedStyle(e);t.originalWidth||(t.originalWidth=e.style.width),t.originalHeight||(t.originalHeight=e.style.height),r.width=n.width,r.height=n.height}e.style.display="none",t.skeletonEl=createSkeleton(r),null==(n=e.parentNode)||n.insertBefore(t.skeletonEl,e.nextSibling)}function hideSkeleton(e,t){t.skeletonEl&&t.skeletonEl.parentNode&&(t.skeletonEl.parentNode.removeChild(t.skeletonEl),t.skeletonEl=null),e.style.display=t.originalDisplay,e.style.width=t.originalWidth,e.style.height=t.originalHeight}const STATE_KEY="__sticky";function normalizeOptions$b(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 parseOffset(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function getScrollContainer(e,t){if(t)return"string"==typeof t?document.querySelector(t)||getScrollParent$2(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:r}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+r))return n}return getScrollParent$2(e)}function checkSticky(e,t){if(t.options.disabled)return void unsetSticky(e,t);const n=parseFloat(parseOffset(t.options.top)),r=t.container===window?{top:0}:t.container.getBoundingClientRect(),o=(t.placeholder||e).getBoundingClientRect().top-r.top<=n;o&&!t.isSticky?setSticky(e,t,n,r.top):!o&&t.isSticky&&unsetSticky(e,t)}function setSticky(e,t,n,r){var o,i,s;t.isSticky=!0;const a=document.createElement("div");a.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(o=e.parentNode)||o.insertBefore(a,e),t.placeholder=a;const l=t.container===window?n:r+n;e.style.position="fixed",e.style.top=`${l}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=parseOffset(t.options.bottom)),t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(s=(i=t.options).onChange)||s.call(i,!0)}function unsetSticky(e,t){var n,r,o,i;t.isSticky&&(t.isSticky=!1,null==(r=null==(n=t.placeholder)?void 0:n.parentNode)||r.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==(i=(o=t.options).onChange)||i.call(o,!1))}const vSticky=defineDirective({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=normalizeOptions$b(t.value);if(n.disabled||!isBrowser())return;const r=getScrollContainer(e,n.container),o={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:r,scrollHandler:()=>checkSticky(e,o),resizeHandler:()=>checkSticky(e,o)};e.classList.add("v-sticky"),e[STATE_KEY]=o,on(r,"scroll",o.scrollHandler,{passive:!0}),on(window,"resize",o.resizeHandler,{passive:!0}),checkSticky(e,o)},updated(e,t){const n=e[STATE_KEY];n&&(n.options=normalizeOptions$b(t.value),checkSticky(e,n))},unmounted(e){var t,n;const r=e[STATE_KEY];r&&(null==(n=null==(t=r.placeholder)?void 0:t.parentNode)||n.removeChild(r.placeholder),Object.assign(e.style,r.originalStyles),e.classList.remove("v-sticky",r.options.stickyClass||"v-sticky--fixed"),off(r.container,"scroll",r.scrollHandler),off(window,"resize",r.resizeHandler),delete e[STATE_KEY])}}),DEFAULT_THRESHOLD=30,DEFAULT_MAX_TIME=500,DEFAULT_DIRECTIONS$1=["left","right","up","down"];function getSwipeDirection$1(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}}function normalizeOptions$a(e){var t,n,r,o,i,s;return"function"==typeof e?{handler:e}:{handler:e.handler,threshold:null!=(t=e.threshold)?t:DEFAULT_THRESHOLD,maxTime:null!=(n=e.maxTime)?n:DEFAULT_MAX_TIME,directions:null!=(r=e.directions)?r:[...DEFAULT_DIRECTIONS$1],preventScrollOnSwipe:null==(o=e.preventScrollOnSwipe)||o,disabled:null!=(i=e.disabled)&&i,mouse:null==(s=e.mouse)||s,onLeft:e.onLeft,onRight:e.onRight,onUp:e.onUp,onDown:e.onDown}}function triggerSwipe(e,t,n,r,o,i){var s,a,l,c,u;const{options:d}=e;if(r>(null!=(s=d.maxTime)?s:DEFAULT_MAX_TIME))return;if(Math.max(Math.abs(t),Math.abs(n))<(null!=(a=d.threshold)?a:DEFAULT_THRESHOLD))return;const p=getSwipeDirection$1(t,n,null!=(l=d.directions)?l:DEFAULT_DIRECTIONS$1);if(!p)return;d.preventScrollOnSwipe&&o.cancelable&&o.preventDefault(),null==(c=d.handler)||c.call(d,p,o);const m={left:d.onLeft,right:d.onRight,up:d.onUp,down:d.onDown};null==(u=m[p])||u.call(m),i.dispatchEvent(new CustomEvent("swipe",{detail:{direction:p,deltaX:t,deltaY:n,deltaTime:r}}))}function createSwipeHandler(e,t){return(n,r,o)=>{const i=n-t.startX,s=r-t.startY,a=Date.now()-t.startTime;triggerSwipe(t,i,s,a,o,e)}}function setupState(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},r=createSwipeHandler(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];r(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,r(e.clientX,e.clientY,e))}},n}function bindEvents(e,t){var n;const{handlers:r}=t,o=null==(n=t.options.mouse)||n;e.addEventListener("touchstart",r.touchStart,{passive:!0}),e.addEventListener("touchmove",r.touchMove,{passive:!1}),e.addEventListener("touchend",r.touchEnd),e.addEventListener("touchcancel",r.touchEnd),o&&(e.addEventListener("mousedown",r.mouseDown),e.addEventListener("mouseup",r.mouseUp),e.addEventListener("mouseleave",r.mouseUp))}function unbindEvents(e,t){var n;const{handlers:r}=t,o=null==(n=t.options.mouse)||n;e.removeEventListener("touchstart",r.touchStart),e.removeEventListener("touchmove",r.touchMove),e.removeEventListener("touchend",r.touchEnd),e.removeEventListener("touchcancel",r.touchEnd),o&&(e.removeEventListener("mousedown",r.mouseDown),e.removeEventListener("mouseup",r.mouseUp),e.removeEventListener("mouseleave",r.mouseUp))}const vSwipe=defineDirective({name:"swipe",ssr:!1,mounted(e,t){const n=setupState(e,normalizeOptions$a(t.value));n&&(e.__swipe=n,bindEvents(e,n))},updated(e,t){var n,r;const o=e.__swipe,i=normalizeOptions$a(t.value);if(!o){const t=setupState(e,i);return void(t&&(e.__swipe=t,bindEvents(e,t)))}const s=o.options.disabled,a=null==(n=o.options.mouse)||n,l=null==(r=i.mouse)||r;o.options=i,i.disabled&&!s?unbindEvents(e,o):!i.disabled&&s?bindEvents(e,o):a!==l&&(a&&(e.removeEventListener("mousedown",o.handlers.mouseDown),e.removeEventListener("mouseup",o.handlers.mouseUp),e.removeEventListener("mouseleave",o.handlers.mouseUp)),l&&(e.addEventListener("mousedown",o.handlers.mouseDown),e.addEventListener("mouseup",o.handlers.mouseUp),e.addEventListener("mouseleave",o.handlers.mouseUp)))},unmounted(e){const t=e.__swipe;t&&(unbindEvents(e,t),delete e.__swipe)}});function normalizeOptions$9(e,t){const n=parseTime(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const vThrottle=defineDirective({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=normalizeOptions$9(t.value,t),r=getEventTypeFromModifiers(t.modifiers)||getDefaultEventType(e),o=throttle(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(r,o),e.__throttle={throttledFn:o,eventType:r,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const r=normalizeOptions$9(t.value,t);if(r.wait!==n.options.wait||r.leading!==n.options.leading||r.trailing!==n.options.trailing){n.throttledFn.cancel();const t=throttle(r.handler,r.wait,{leading:r.leading,trailing:r.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:r}}else r.handler!==n.options.handler&&(n.options.handler=r.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),TOOLTIP_STYLES={padding:"8px 12px",background:"#333",color:"#fff",borderRadius:"6px",fontSize:"14px",lineHeight:"1.5",minWidth:"96px",maxWidth:"320px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"};let tooltipContainer=null;function getTooltipContainer(){return tooltipContainer&&document.body.contains(tooltipContainer)||(tooltipContainer=document.createElement("div"),tooltipContainer.id="directix-tooltip-container",tooltipContainer.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(tooltipContainer)),tooltipContainer}function createTooltip(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:TOOLTIP_STYLES.maxWidth;if(t.style.cssText=["position: absolute",`padding: ${TOOLTIP_STYLES.padding}`,`background: ${TOOLTIP_STYLES.background}`,`color: ${TOOLTIP_STYLES.color}`,`border-radius: ${TOOLTIP_STYLES.borderRadius}`,`font-size: ${TOOLTIP_STYLES.fontSize}`,`line-height: ${TOOLTIP_STYLES.lineHeight}`,`min-width: ${TOOLTIP_STYLES.minWidth}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${TOOLTIP_STYLES.boxShadow}`,"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 r=document.createElement("div");return r.className="v-tooltip__content",r.textContent=e.content,t.appendChild(r),t}function positionTooltip(e,t,n,r){const o=t.getBoundingClientRect(),i=e.getBoundingClientRect();let s=0,a=0;switch(n){case"top":s=o.top-i.height-r,a=o.left+(o.width-i.width)/2;break;case"bottom":s=o.bottom+r,a=o.left+(o.width-i.width)/2;break;case"left":s=o.top+(o.height-i.height)/2,a=o.left-i.width-r;break;case"right":s=o.top+(o.height-i.height)/2,a=o.right+r}const l=window.innerWidth,c=window.innerHeight;a<0&&(a=8),a+i.width>l&&(a=l-i.width-8),s<0&&(s=8),s+i.height>c&&(s=c-i.height-8),e.style.top=`${s}px`,e.style.left=`${a}px`;const u=e.querySelector(".v-tooltip__arrow");if(u){const e=4;switch(n){case"top":Object.assign(u.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(u.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(u.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(u.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}function showTooltip(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,r;const o=createTooltip(t.options);t.tooltip=o,getTooltipContainer().appendChild(o),requestAnimationFrame(()=>{positionTooltip(o,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{o.style.opacity="1"})}),t.isVisible=!0,null==(r=(n=t.options).onShow)||r.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function hideTooltip(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 setupTriggerHandlers(e,t){const{trigger:n="hover"}=t.options,r=()=>showTooltip(e,t),o=()=>hideTooltip(t),i=()=>t.isVisible?o():r();switch(t.handlers={show:r,hide:o,toggle:i},n){case"hover":e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",o);break;case"click":e.addEventListener("click",i),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&o()});break;case"focus":e.addEventListener("focus",r),e.addEventListener("blur",o)}}function removeTriggerHandlers(e,t){const{show:n,hide:r,toggle:o,docHide:i}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),r&&(e.removeEventListener("mouseleave",r),e.removeEventListener("blur",r)),o&&e.removeEventListener("click",o),i&&document.removeEventListener("click",i)}function normalizeOptions$8(e){var t,n,r,o,i,s,a,l;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!=(r=e.delay)?r:0,hideDelay:null!=(o=e.hideDelay)?o:0,offset:null!=(i=e.offset)?i:8,class:e.class,arrow:null==(s=e.arrow)||s,disabled:null!=(a=e.disabled)&&a,maxWidth:e.maxWidth,zIndex:null!=(l=e.zIndex)?l:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function createState(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const vTooltip=defineDirective({name:"tooltip",ssr:!1,mounted(e,t){const n=normalizeOptions$8(t.value);if(n.disabled||!n.content)return;const r=createState(n);e.__tooltip=r,setupTriggerHandlers(e,r),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,r=normalizeOptions$8(t.value);if(n){if("manual"===r.trigger){const t=n.options.disabled;return n.options=r,void(r.disabled&&!t?hideTooltip(n):!r.disabled&&t&&showTooltip(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=r.content)}n.options=r}else if(!r.disabled&&r.content){const t=createState(r);e.__tooltip=t,setupTriggerHandlers(e,t),e.setAttribute("aria-describedby","v-tooltip"),"manual"===r.trigger&&showTooltip(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(),removeTriggerHandlers(e,n),delete e.__tooltip)}}),getDistance$1=(e,t,n,r)=>Math.sqrt(__pow(n-e,2)+__pow(r-t,2)),getAngle$1=(e,t,n,r)=>180*Math.atan2(r-t,n-e)/Math.PI,MOUSE_IGNORE_DURATION=400,vTouch=defineDirective({name:"touch",ssr:!1,mounted(e,t){const n=normalizeOptions$7(t.value),r={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=r;const o=()=>{r.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)},i=e=>{o(),r.options.enableLongPress&&r.options.onLongPress&&(r.longPressTimer=setTimeout(()=>{r.isLongPress=!0,r.options.onLongPress(e)},r.options.longPressTimeout||500))},s=(e,t)=>{const n=r.options.tapThreshold||10;return Math.abs(e-r.startX)>n||Math.abs(t-r.startY)>n},a=(e,t,n)=>{var o,i,s,a,l,c,u,d,p,m,f,v;if(r.isLongPress)return;const h=Date.now()-r.startTime,g=e-r.startX,y=t-r.startY,b=Math.sqrt(__pow(g,2)+__pow(y,2));if(r.options.enableSwipe&&b>=(r.options.swipeThreshold||30)&&h<=(r.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(y)?g>0?"right":"left":y>0?"down":"up";null==(i=(o=r.options).onSwipe)||i.call(o,e,n),"left"===e?null==(a=(s=r.options).onSwipeLeft)||a.call(s,n):"right"===e?null==(c=(l=r.options).onSwipeRight)||c.call(l,n):"up"===e?null==(d=(u=r.options).onSwipeUp)||d.call(u,n):null==(m=(p=r.options).onSwipeDown)||m.call(p,n)}else r.options.enableTap&&b<(r.options.tapThreshold||10)&&h<(r.options.tapTimeout||250)&&(null==(v=(f=r.options).onTap)||v.call(f,n))},l=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),r.startTime=Date.now(),r.isLongPress=!1,1===e.touches.length)r.startX=e.touches[0].clientX,r.startY=e.touches[0].clientY,i(e);else if(2===e.touches.length){o();const[t,n]=e.touches;r.startDistance=getDistance$1(t.clientX,t.clientY,n.clientX,n.clientY),r.startAngle=getAngle$1(t.clientX,t.clientY,n.clientX,n.clientY),r.lastScale=1,r.lastAngle=0}null==(n=(t=r.options).onTouchStart)||n.call(t,e)},c=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),r.longPressTimer&&1===e.touches.length&&s(e.touches[0].clientX,e.touches[0].clientY)&&o(),2===e.touches.length){const[t,n]=e.touches,o=getDistance$1(t.clientX,t.clientY,n.clientX,n.clientY),i=getAngle$1(t.clientX,t.clientY,n.clientX,n.clientY);if(r.options.enablePinch&&r.options.onPinch){const t=o/r.startDistance;Math.abs(t-r.lastScale)>=(r.options.pinchThreshold||.1)&&(r.options.onPinch(t,e),r.lastScale=t)}if(r.options.enableRotate&&r.options.onRotate){const t=i-r.startAngle;Math.abs(t-r.lastAngle)>5&&(r.options.onRotate(t,e),r.lastAngle=t)}}null==(n=(t=r.options).onTouchMove)||n.call(t,e)},u=e=>{var t,n;if(o(),0===e.touches.length){r.lastTouchEndTime=Date.now();const t=e.changedTouches[0];a(t.clientX,t.clientY,e)}null==(n=(t=r.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;r.options.enableMouse&&(Date.now()-r.lastTouchEndTime<MOUSE_IGNORE_DURATION||(e.preventDefault(),r.isMouseDown=!0,r.startTime=Date.now(),r.startX=e.clientX,r.startY=e.clientY,r.isLongPress=!1,i(e),null==(n=(t=r.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;r.isMouseDown&&r.options.enableMouse&&(r.longPressTimer&&s(e.clientX,e.clientY)&&o(),null==(n=(t=r.options).onTouchMove)||n.call(t,e))},m=e=>{var t,n;r.isMouseDown&&r.options.enableMouse&&(r.isMouseDown=!1,o(),r.isLongPress||a(e.clientX,e.clientY,e),null==(n=(t=r.options).onTouchEnd)||n.call(t,e))};r.handlers={touchStart:l,touchMove:c,touchEnd:u,mouseDown:d,mouseMove:p,mouseUp:m},e.addEventListener("touchstart",l,{passive:!1}),e.addEventListener("touchmove",c,{passive:!1}),e.addEventListener("touchend",u),e.addEventListener("touchcancel",u),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",m))},updated(e,t){const n=e.__touch;n&&(n.options=normalizeOptions$7(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 normalizeOptions$7(e){var t,n,r,o,i,s,a,l,c,u,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!=(r=null==e?void 0:e.pinchThreshold)?r:.1,enableSwipe:null==(o=null==e?void 0:e.enableSwipe)||o,enablePinch:null==(i=null==e?void 0:e.enablePinch)||i,enableRotate:null==(s=null==e?void 0:e.enableRotate)||s,enableTap:null==(a=null==e?void 0:e.enableTap)||a,tapTimeout:null!=(l=null==e?void 0:e.tapTimeout)?l:250,tapThreshold:null!=(c=null==e?void 0:e.tapThreshold)?c:10,enableLongPress:null==(u=null==e?void 0:e.enableLongPress)||u,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 trimText$1(e,t){const{position:n="both",chars:r}=t,o=r?`[\\s${escapeRegex$4(r)}]`:"\\s";switch(n){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"),"")}}const vTrim=defineDirective({name:"trim",ssr:!0,mounted(e,t){const n=normalizeOptions$6(t.value);if(isInputElement(e))setupInputElement(e,n);else{const t=e.textContent||"";e.textContent=trimText$1(t,n)}},updated(e,t){const n=normalizeOptions$6(t.value),r=e.__trim;if(isInputElement(e))r&&(r.options=n);else{const t=e.textContent||"";e.textContent=trimText$1(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 setupInputElement(e,t){const n={options:t};e.__trim=n;const r=()=>{const n=e.value,r=trimText$1(n,t);n!==r&&(e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,r=t.replace(/\s+$/g,"");if(t!==r&&(e.value=r,null!==n)){const t=Math.min(n,r.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>r();e.addEventListener("blur",t),n.blurHandler=t}e.value&&r()}function normalizeOptions$6(e){var t,n,r;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==(r=e.onBlur)||r,chars:e.chars}}function truncateText$1(e,t){const{length:n=100,position:r="end",ellipsis:o="..."}=t;if(e.length<=n)return e;switch(r){case"start":return o+e.slice(-(n-o.length));case"middle":{const t=Math.ceil((n-o.length)/2),r=Math.floor((n-o.length)/2);return e.slice(0,t)+o+e.slice(-r)}default:return e.slice(0,n-o.length)+o}}const vTruncate=defineDirective({name:"truncate",ssr:!0,mounted(e,t){const n=normalizeOptions$5(t.value),r=e.textContent||"",o={originalText:r,options:n};e.__truncate=o,applyTruncation(e,r,n)},updated(e,t){const n=e.__truncate,r=normalizeOptions$5(t.value);if(n){const t=n.originalText;JSON.stringify(r)!==JSON.stringify(n.options)&&(n.options=r,applyTruncation(e,t,r))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:r},applyTruncation(e,t,r)}},unmounted(e){delete e.__truncate}});function applyTruncation(e,t,n){const{useCss:r,showTitle:o=!0}=n;if(r)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",o&&t&&e.setAttribute("title",t);else{const r=truncateText$1(t,n);e.textContent=r,o&&t&&t!==r&&e.setAttribute("title",t)}}function normalizeOptions$5(e){var t,n,r,o,i;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!=(r=null==e?void 0:e.ellipsis)?r:"...",useCss:null!=(o=null==e?void 0:e.useCss)&&o,showTitle:null==(i=null==e?void 0:e.showTitle)||i}}function normalizeOptions$4(e){return"string"==typeof e?{text:e}:__spreadProps(__spreadValues({speed:50,delay:0,loop:!1,deleteDelay:1500,deleteSpeed:30,cursor:"|",cursorBlink:!0},e),{text:"string"==typeof e?e:e.text||""})}function createCursor(e){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}function ensureStyles$3(){if(!isBrowser())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}const vTypewriter=defineDirective({name:"typewriter",ssr:!0,mounted(e,t){const n=normalizeOptions$4(t.value);if(!n.text)return;isBrowser()&&ensureStyles$3();const r={options:n,originalContent:e.textContent||"",currentText:"",timeoutId:null,animationFrameId:null,isTyping:!1,isDeleting:!1,cursorElement:null};e.__typewriter=r,e.textContent="",r.cursorElement=createCursor(n),r.cursorElement&&e.appendChild(r.cursorElement),e.classList.add("v-typewriter"),isBrowser()&&(r.timeoutId=setTimeout(()=>{startTyping(e,r)},n.delay||0))},updated(e,t){const n=e.__typewriter;if(!n)return;const r=normalizeOptions$4(t.value);r.text!==n.options.text?(cancelAnimation(n),n.options=r,n.currentText="",n.isTyping=!1,n.isDeleting=!1,e.textContent="",n.cursorElement=createCursor(r),n.cursorElement&&e.appendChild(n.cursorElement),isBrowser()&&(n.timeoutId=setTimeout(()=>{startTyping(e,n)},r.delay||0))):n.options=r},unmounted(e){const t=e.__typewriter;t&&(cancelAnimation(t),e.classList.remove("v-typewriter"),delete e.__typewriter)}});function startTyping(e,t){var n;const{options:r,cursorElement:o}=t;t.isTyping=!0,null==(n=r.onStart)||n.call(r);const i=r.text;!function n(s){var a,l;if(s>=i.length)return t.isTyping=!1,null==(a=r.onComplete)||a.call(r),void(r.loop&&(t.timeoutId=setTimeout(()=>{startDeleting(e,t)},r.deleteDelay)));const c=i[s];t.currentText+=c,e.textContent=t.currentText,o&&e.appendChild(o),null==(l=r.onType)||l.call(r,c,s),t.timeoutId=setTimeout(()=>{n(s+1)},r.speed||50)}(0)}function startDeleting(e,t){var n;const{options:r,cursorElement:o}=t;t.isDeleting=!0,null==(n=r.onDeleteStart)||n.call(r),function n(){var i;if(0===t.currentText.length)return t.isDeleting=!1,null==(i=r.onDeleteComplete)||i.call(r),void(r.loop&&(t.timeoutId=setTimeout(()=>{startTyping(e,t)},r.delay||0)));t.currentText=t.currentText.slice(0,-1),e.textContent=t.currentText,o&&e.appendChild(o),t.timeoutId=setTimeout(()=>{n()},r.deleteSpeed||30)}()}function cancelAnimation(e){e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=null),e.animationFrameId&&(cancelAnimationFrame(e.animationFrameId),e.animationFrameId=null),e.isTyping=!1,e.isDeleting=!1}function transformText(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function normalizeOptions$3(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 vUppercase=defineDirective({name:"uppercase",ssr:!0,mounted(e,t){const n=normalizeOptions$3(t.value);if(isInputElement(e)){const t=setupTextTransformInput(e,n,e=>transformText(e,n));e.__uppercaseCleanup=t}else transformTextContent(e,e=>transformText(e,n))},updated(e,t){const n=normalizeOptions$3(t.value);isInputElement(e)?n.onInput&&(e.value=transformText(e.value,n)):transformTextContent(e,e=>transformText(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function getItemSize(e,t){return"function"==typeof e.itemSize?e.itemSize(t):e.itemSize||50}function calculateTotalHeight(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 calculateVisibleRange(e,t,n){const r=n.items,o=n.itemSize||50,i=n.overscan||3;let s=0,a=0,l=0;if("function"==typeof o){let n=0;for(let t=0;t<r.length;t++){const r=o(t);if(n+r>e){s=t,l=n;break}n+=r}for(a=s,n=l;a<r.length&&n<e+t;)n+=o(a),a++;s=Math.max(0,s-i),a=Math.min(r.length,a+i),n=0;for(let e=0;e<s;e++)n+=o(e);return l=n,{startIndex:s,endIndex:a,offsetY:l}}return s=Math.max(0,Math.floor(e/o)-i),a=Math.min(r.length,Math.ceil((e+t)/o)+i),l=s*o,{startIndex:s,endIndex:a,offsetY:l}}function normalizeOptions$2(e){var t,n,r,o;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!=(r=e.overscan)?r:3,render:e.render,keyField:null!=(o=e.keyField)?o:"id",onScroll:e.onScroll,onVisibleChange:e.onVisibleChange}}function createItemElement(e,t,n){const r=document.createElement("div");r.className="v-virtual-list__item",r.dataset.index=String(t);const o=n.keyField||"id";"object"==typeof e&&null!==e&&o in e&&(r.dataset.key=String(e[o]));const i=getItemSize(n,t);return r.style.height=`${i}px`,r.style.boxSizing="border-box",n.render?r.innerHTML=n.render(e,t):r.textContent="object"==typeof e?JSON.stringify(e):String(e),r}const vVirtualList=defineDirective({name:"virtual-list",ssr:!1,mounted(e,t){const n=normalizeOptions$2(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 r=document.createElement("div");r.className="v-virtual-list__content",r.style.position="relative",r.style.height=`${calculateTotalHeight(n)}px`,e.appendChild(r);const o=document.createElement("div");o.className="v-virtual-list__visible",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.right="0",r.appendChild(o);const i={options:n,containerEl:e,contentEl:r,scrollHandler:null,resizeObserver:null,startIndex:0,endIndex:0,visibleItems:[]};e.__virtualList=i;const s=t=>{const n=e.scrollTop,r=e.clientHeight,{startIndex:s,endIndex:a,offsetY:l}=calculateVisibleRange(n,r,i.options);s===i.startIndex&&a===i.endIndex||(i.startIndex=s,i.endIndex=a,renderVisibleItems(o,i,l),i.options.onVisibleChange&&i.options.onVisibleChange(s,a)),i.options.onScroll&&i.options.onScroll(n)};i.scrollHandler=s,e.addEventListener("scroll",s,{passive:!0});const{startIndex:a,endIndex:l,offsetY:c}=calculateVisibleRange(0,e.clientHeight,n);if(i.startIndex=a,i.endIndex=l,renderVisibleItems(o,i,c),"undefined"!=typeof ResizeObserver){const t=new ResizeObserver(()=>{s(new Event("scroll"))});t.observe(e),i.resizeObserver=t}},updated(e,t){var n;const r=e.__virtualList;if(!r)return;const o=normalizeOptions$2(t.value);r.options=o,r.contentEl&&(r.contentEl.style.height=`${calculateTotalHeight(o)}px`);const i=e.scrollTop,s=e.clientHeight,{startIndex:a,endIndex:l,offsetY:c}=calculateVisibleRange(i,s,o);r.startIndex=a,r.endIndex=l;const u=null==(n=r.contentEl)?void 0:n.querySelector(".v-virtual-list__visible");u&&renderVisibleItems(u,r,c)},unmounted(e){const t=e.__virtualList;t&&(t.scrollHandler&&e.removeEventListener("scroll",t.scrollHandler),t.resizeObserver&&t.resizeObserver.disconnect(),delete e.__virtualList)}});function renderVisibleItems(e,t,n){const{options:r,startIndex:o,endIndex:i}=t;e.style.transform=`translateY(${n}px)`,e.innerHTML="";for(let t=o;t<i;t++){const n=r.items[t];if(void 0!==n){const o=createItemElement(n,t,r);e.appendChild(o)}}}function normalizeOptions$1(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const vVisible=defineDirective({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,r;if(!isBrowser())return;const o=normalizeOptions$1(t.value),i=e.style.display,s=e.style.visibility,a={options:o,isVisible:null==(n=o.initial)||n,originalDisplay:i,originalVisibility:s,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:a.isVisible}}))}};e.__visible=a,on(e,"transitionend",a.transitionEndHandler),applyVisibility(e,a,null==(r=o.initial)||r)},updated(e,t){var n;const r=e.__visible;if(!r)return;const o=normalizeOptions$1(t.value);let i;i="boolean"==typeof t.value?t.value:null==(n=o.initial)||n,r.isVisible!==i&&applyVisibility(e,r,i),r.options=o},unmounted(e){const t=e.__visible;t&&(off(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function applyVisibility(e,t,n){const r=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=r=>{r.target!==e||"opacity"!==r.propertyName&&"transform"!==r.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:r}})),t.options.handler&&r!==n&&t.options.handler(n)}function createWatermarkCanvas$1(e){var t;const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("[Directix] v-watermark: Could not get canvas context");const o=e.width||300,i=e.height||200,s=e.fontSize||16,a=e.fontFamily||"sans-serif",l=e.fontWeight||"normal",c=e.color||"rgba(128, 128, 128, 0.15)",u=null!=(t=e.rotate)?t:-22;n.width=o,n.height=i,r.font=`${l} ${s}px ${a}`,r.fillStyle=c,r.textAlign="center",r.textBaseline="middle",r.translate(o/2,i/2),r.rotate(u*Math.PI/180);const d=Array.isArray(e.content)?e.content:[e.content],p=1.5*s,m=-(d.length-1)*p/2;return d.forEach((e,t)=>{r.fillText(e,0,m+t*p)}),n}function createWatermarkElement(e,t){var n;const r=Array.isArray(t.gap)?t.gap:[t.gap||100,t.gap||100],o=null!=(n=t.zIndex)?n:9999,i=document.createElement("div");return i.className="v-watermark",i.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: ${o};\n\t\tbackground-image: url("${e.toDataURL()}");\n\t\tbackground-repeat: repeat;\n\t\tbackground-position: ${r[0]/2}px ${r[1]/2}px;\n\t\tbackground-size: ${e.width+r[0]}px ${e.height+r[1]}px;\n\t`,i}function normalizeOptions(e){var t,n,r,o,i,s,a,l,c,u,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!=(r=e.rotate)?r:-22,fontSize:null!=(o=e.fontSize)?o:16,fontFamily:null!=(i=e.fontFamily)?i:"sans-serif",fontWeight:null!=(s=e.fontWeight)?s:"normal",color:null!=(a=e.color)?a:"rgba(128, 128, 128, 0.15)",gap:null!=(l=e.gap)?l:[100,100],zIndex:null!=(c=e.zIndex)?c:9999,disabled:null!=(u=e.disabled)&&u,protect:null==(d=e.protect)||d}}const vWatermark=defineDirective({name:"watermark",ssr:!0,mounted(e,t){const n=normalizeOptions(t.value);"static"===getComputedStyle(e).position&&(e.style.position="relative");const r={options:n,watermarkEl:null,observer:null,canvas:null};e.__watermark=r,n.disabled||applyWatermark(e,r)},updated(e,t){const n=e.__watermark;if(!n)return;const r=normalizeOptions(t.value);r.disabled&&!n.options.disabled?removeWatermark(n):!r.disabled&&n.options.disabled?(n.options=r,applyWatermark(e,n)):r.disabled||(n.options=r,removeWatermark(n),applyWatermark(e,n)),n.options=r},unmounted(e){const t=e.__watermark;t&&(removeWatermark(t),delete e.__watermark)}});function applyWatermark(e,t){const n=t.options;t.canvas=createWatermarkCanvas$1(n),t.watermarkEl=createWatermarkElement(t.canvas,n),e.appendChild(t.watermarkEl),n.protect&&setupProtection(e,t)}function removeWatermark(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}function setupProtection(e,t){"undefined"!=typeof MutationObserver&&(t.observer=new MutationObserver(n=>{t.watermarkEl&&e.contains(t.watermarkEl)||t.options.disabled||(t.canvas=createWatermarkCanvas$1(t.options),t.watermarkEl=createWatermarkElement(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"]}))}function createBlurOverlay(e){const t=document.createElement("div");return t.className=`v-blur-overlay ${e.class||""}`,t.style.cssText=`\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n backdrop-filter: blur(${e.radius||5}px);\n -webkit-backdrop-filter: blur(${e.radius||5}px);\n background: ${e.overlayColor||"transparent"};\n z-index: ${e.zIndex||999};\n opacity: 0;\n transition: opacity ${e.duration||300}ms ease;\n pointer-events: auto;\n `,t}function useBlur(e={}){var t;const n=vue.ref(null!=(t=vue.unref(e.visible))&&t);let r=null,o="";function i(){var t,i;!r&&isBrowser()&&(n.value=!0,r=createBlurOverlay(__spreadProps(__spreadValues({},e),{radius:null!=(t=vue.unref(e.radius))?t:5})),document.body.appendChild(r),r.style.opacity="1",e.lockScroll&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),null==(i=e.onShow)||i.call(e))}function s(){var t;r&&(n.value=!1,r.style.opacity="0",e.lockScroll&&(document.body.style.overflow=o),setTimeout(()=>{r&&(r.remove(),r=null)},e.duration||300),null==(t=e.onHide)||t.call(e))}function a(){n.value?s():i()}return vue.onUnmounted(()=>{r&&s()}),{isVisible:n,show:i,hide:s,toggle:a,bind:function(t){return isBrowser()?(t.classList.add("v-blur"),"boolean"!=typeof e.visible&&e.visible&&vue.watch(e.visible,e=>{e!==n.value&&a()}),n.value&&i(),()=>{r&&s(),t.classList.remove("v-blur")}):()=>{}}}}const DEFAULT_KEEP_LOWER=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function capitalizeWord(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function capitalizeText(e,t={}){if(!e)return e;const{every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?capitalizeWord(e):r.includes(e.toLowerCase())?e.toLowerCase():capitalizeWord(e)).join(" ")}return capitalizeWord(e)}function useCapitalcase(e){const{text:t,every:n=!0,keepLower:r=DEFAULT_KEEP_LOWER}=e,o=vue.ref(vue.unref(t)),i=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r)],()=>function(){const e=vue.unref(t),s=vue.unref(n),a=vue.unref(r);o.value=e,i.value=capitalizeText(e,{every:s,keepLower:a})}(),{immediate:!0}),{capitalized:i,original:o}}function createCapitalizer(e={}){return t=>capitalizeText(t,e)}function useClickDelay(e){const{handler:t,delay:n=300,disabled:r=!1}=e,o=vue.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}return vue.onUnmounted(()=>{s()}),{isPending:o,click:function(e){if(vue.unref(r)||o.value)return e.preventDefault(),void e.stopPropagation();o.value=!0,t(e),i=setTimeout(()=>{o.value=!1,i=null},vue.unref(n))},reset:function(){i&&(clearTimeout(i),i=null),o.value=!1},cancel:s}}function createDelayedClick(e,t=300){let n=!1;return r=>{if(n)return r.preventDefault(),void r.stopPropagation();n=!0,e(r),setTimeout(()=>{n=!1},t)}}function isValidClick(e,t,n){const r=t.target;if(e.contains(r))return!1;if(null==n?void 0:n.length)for(const e of n){const t="function"==typeof e?e():vue.unref(e),n="string"==typeof t?getElement(t):t;if(n&&(n===r||n.contains(r)))return!1}return!0}function useClickOutside(e){const{handler:t,exclude:n=[],capture:r=!0,events:o=["click"],stop:i=!1,prevent:s=!1}=e;let a=null;const l=new Map;function c(){l.forEach((e,t)=>{document.removeEventListener(t,e,{capture:r})}),l.clear(),a=null}return vue.onUnmounted(()=>{c()}),{bind:function(e){return isBrowser()?(c(),a=e,o.forEach(e=>{const o=e=>{a&&isValidClick(a,e,n)&&(i&&e.stopPropagation(),s&&e.preventDefault(),t(e))};l.set(e,o),document.addEventListener(e,o,{capture:r,passive:!s})}),c):()=>{}}}}function createWaveElement(e,t,n,r,o,i){const s=n.getBoundingClientRect(),a=Math.min(s.width,s.height)*i,l=document.createElement("span");return l.className="v-click-wave__effect",l.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${r};\n width: ${a}px;\n height: ${a}px;\n left: ${e-a/2}px;\n top: ${t-a/2}px;\n transform: scale(0);\n opacity: 0.5;\n z-index: 0;\n `,"function"==typeof l.animate?l.animate([{transform:"scale(0)",opacity:.5},{transform:"scale(1)",opacity:0}],{duration:o,easing:"ease-out",fill:"forwards"}).onfinish=()=>{l.remove()}:(l.style.transition=`transform ${o}ms ease-out, opacity ${o}ms ease-out`,l.style.transform="scale(1)",l.style.opacity="0",setTimeout(()=>l.remove(),o)),l}function useClickWave(e={}){const{color:t="currentColor",duration:n=500,disabled:r=!1,sizeRatio:o=1.5}=e;let i=null,s=null;function a(e){if(vue.unref(r))return;const s=i.getBoundingClientRect(),a=createWaveElement(e.clientX-s.left,e.clientY-s.top,i,vue.unref(t),vue.unref(n),o);i.appendChild(a)}function l(){i&&s&&(i.removeEventListener("click",s),i.classList.remove("v-click-wave")),i=null,s=null}return vue.onUnmounted(()=>{l()}),{bind:function(e){if(!isBrowser())return()=>{};l(),i=e;const t=getComputedStyle(e);return"static"===t.position&&(e.style.position="relative"),"visible"===t.overflow&&(e.style.overflow="hidden"),e.classList.add("v-click-wave"),s=a,e.addEventListener("click",s),l},trigger:function(e){var s,a;if(!i||vue.unref(r))return;const l=i.getBoundingClientRect(),c=createWaveElement(null!=(s=null==e?void 0:e.x)?s:l.width/2,null!=(a=null==e?void 0:e.y)?a:l.height/2,i,vue.unref(t),vue.unref(n),o);i.appendChild(c)}}}function createMenuElement(e,t,n,r){const o=document.createElement("div");o.className=`v-context-menu ${r.class||""}`;const i=r.width?"number"==typeof r.width?`${r.width}px`:r.width:"150px";return o.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${t}px;\n min-width: ${i};\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);\n padding: 4px 0;\n z-index: 9999;\n font-size: 14px;\n `,n.forEach(e=>{if(e.divider){const e=document.createElement("div");e.className="v-context-menu__divider",e.style.cssText="\n height: 1px;\n background: #e8e8e8;\n margin: 4px 0;\n ",o.appendChild(e)}const t=document.createElement("div");if(t.className=`v-context-menu__item ${e.class||""}`,e.disabled&&t.classList.add("v-context-menu__item--disabled"),t.style.cssText=`\n padding: 8px 16px;\n cursor: ${e.disabled?"not-allowed":"pointer"};\n color: ${e.disabled?"#b0b0b0":"#333"};\n display: flex;\n align-items: center;\n gap: 8px;\n `,e.icon){const n=document.createElement("span");n.className="v-context-menu__icon",n.innerHTML=e.icon,t.appendChild(n)}const n=document.createElement("span");n.textContent=e.label,t.appendChild(n),!e.disabled&&e.handler&&(t.addEventListener("click",()=>{e.handler(),o.remove()}),t.addEventListener("mouseenter",()=>{t.style.background="#f5f5f5"}),t.addEventListener("mouseleave",()=>{t.style.background="transparent"})),o.appendChild(t)}),o}function useContextMenu(e){let t=null,n=null,r=null,o=null;function i(){r&&(r.remove(),r=null),o&&document.removeEventListener("click",o)}function s(t,n){if(vue.unref(e.disabled))return;i();const s=vue.unref(e.items);r=createMenuElement(t,n,s,e),document.body.appendChild(r);const a=r.getBoundingClientRect(),l=window.innerWidth,c=window.innerHeight;t+a.width>l&&(r.style.left=l-a.width-8+"px"),n+a.height>c&&(r.style.top=c-a.height-8+"px"),setTimeout(()=>{o=e=>{const t=e.target;r&&!r.contains(t)&&i()},document.addEventListener("click",o)},0)}function a(e){e.preventDefault(),s(e.clientX,e.clientY)}function l(){t&&n&&t.removeEventListener("contextmenu",n),i(),t=null,n=null}return vue.onUnmounted(()=>{l()}),{bind:function(e){return isBrowser()?(l(),t=e,n=a,e.addEventListener("contextmenu",n),l):()=>{}},show:s,hide:i}}function copyToClipboard(e){return __async(this,null,function*(){if(supportsClipboard())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return copyWithExecCommand(e)})}function copyWithExecCommand(e){if(!isBrowser())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)}}function useCopy(e={}){const{source:t,onSuccess:n,onError:r,copiedTimeout:o=1500}=e,i=vue.ref(!1),s=vue.ref(null),a=supportsClipboard()||isBrowser();let l=null;return{copy:function(e){return __async(this,null,function*(){const a=null!=e?e:vue.unref(t);if(!a)return console.warn("[Directix] useCopy: No text to copy"),!1;l&&(clearTimeout(l),l=null),s.value=null;try{if(yield copyToClipboard(a))return i.value=!0,null==n||n(a),l=setTimeout(()=>{i.value=!1,l=null},o),!0;throw new Error("Copy failed")}catch(e){const t=e;return s.value=t,i.value=!1,null==r||r(t),!1}})},copied:vue.readonly(i),error:vue.readonly(s),isSupported:a}}function parseTargetTime(e){return e instanceof Date?e.getTime():"number"==typeof e?e:new Date(e).getTime()}function calculateTime(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 formatTime(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 useCountdown(e){const{target:t,format:n="hh:mm:ss",onComplete:r,onTick:o,interval:i=1e3,autoStart:s=!0}=e,a=vue.ref(calculateTime(0)),l=vue.ref(""),c=vue.ref(!1),u=vue.ref(!1),d=vue.ref(!1);let p=null,m=0,f=0;const v=()=>vue.unref(i),h=()=>vue.unref(n);function g(){const e=Date.now(),t=m-e;if(t<=0)return a.value=calculateTime(0),l.value=formatTime(a.value,h()),d.value=!0,c.value=!1,b(),void(r&&r());a.value=calculateTime(t),l.value=formatTime(a.value,h()),o&&o(a.value)}function y(){c.value||(m=parseTargetTime(vue.unref(t)),c.value=!0,u.value=!1,d.value=!1,g(),p=setInterval(g,v()))}function b(){p&&(clearInterval(p),p=null),c.value=!1}return vue.watch(()=>vue.unref(t),e=>{c.value&&(m=parseTargetTime(e))}),vue.unref(s)&&y(),vue.onUnmounted(()=>{b()}),{time:a,formatted:l,running:c,paused:u,completed:d,start:y,pause:function(){c.value&&(f=m-Date.now(),b(),u.value=!0)},resume:function(){!c.value&&u.value&&(m=Date.now()+f,c.value=!0,u.value=!1,g(),p=setInterval(g,v()))},reset:function(){b(),u.value=!1,d.value=!1,f=0,a.value=calculateTime(0),l.value=formatTime(a.value,h())}}}const easingFunctions={linear:e=>e,easeOut:e=>1-__pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-__pow(-2*e+2,3)/2,easeOutQuart:e=>1-__pow(1-e,4),easeOutExpo:e=>1===e?1:1-__pow(2,-10*e)};function formatNumber$1(e,t){return t.formatter?t.formatter(e):new Intl.NumberFormat(t.locale||"en-US",{minimumFractionDigits:t.decimals||0,maximumFractionDigits:t.decimals||0,useGrouping:t.useGrouping||!1}).format(e)}function useCounter(e){var t;const n=vue.ref(null!=(t=e.startValue)?t:0),r=vue.ref(formatNumber$1(n.value,e)),o=vue.ref(!1);let i=null,s=null,a=null,l=vue.unref(e.value),c=n.value;function u(t){var d,p;a||(a=t);const m=t-a,f=e.duration||2e3,v=Math.min(m/f,1),h=(e.customEasing||easingFunctions[e.easing||"easeOutQuart"])(v);n.value=c+(l-c)*h,r.value=formatNumber$1(n.value,e),i&&(i.textContent=r.value),null==(d=e.onUpdate)||d.call(e,n.value,r.value),v<1?s=requestAnimationFrame(u):(n.value=l,r.value=formatNumber$1(l,e),i&&(i.textContent=r.value),o.value=!1,s=null,null==(p=e.onComplete)||p.call(e,l))}function d(){var t;o.value||(o.value=!0,a=null,c=n.value,null==(t=e.onStart)||t.call(e),s=requestAnimationFrame(u))}function p(){s&&(cancelAnimationFrame(s),s=null),o.value=!1}function m(e){l=e,c=n.value,a=null,o.value||d()}function f(){p(),i&&i.classList.remove("v-counter"),i=null}return vue.onUnmounted(()=>{f()}),{currentValue:n,formattedValue:r,isAnimating:o,setValue:m,start:d,stop:p,bind:function(t){return isBrowser()?(f(),i=t,t.classList.add("v-counter"),t.textContent=r.value,"number"!=typeof e.value&&vue.watch(e.value,e=>{m(e)}),d(),f):()=>{}}}}function useDebounce(e){const{handler:t,wait:n=300,leading:r=!1,trailing:o=!0}=e;let i=null,s=null,a=null;const l=()=>{s&&(t.apply(a,s),s=null,a=null)};function c(){i&&(clearTimeout(i),i=null),s=null,a=null}return vue.onUnmounted(()=>{c()}),{run:function(...e){s=e,a=this,i&&clearTimeout(i),vue.unref(r)&&!i&&l(),i=setTimeout(()=>{vue.unref(o)&&l(),i=null},vue.unref(n))},cancel:c,flush:function(){i&&(clearTimeout(i),l(),i=null)},pending:function(){return null!==i}}}function debounceFn(e,t=300,n){return debounce(e,t,n)}function getBoundary(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()}function getClientCoords(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 parseTranslate(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 useDraggable(e={}){const{axis:t="both",constrain:n=!1,boundary:r,handle:o,grid:i,disabled:s=!1,onStart:a,onDrag:l,onEnd:c}=e,u=vue.ref({x:0,y:0}),d=vue.ref(!1);let p=null,m=null,f=0,v=0,h=0,g=0,y=0,b=0,_=0,w=0,x=0,E=0;function S(e){var t;if(vue.unref(s))return;e.preventDefault();const{clientX:o,clientY:i}=getClientCoords(e);d.value=!0,f=o,v=i;const{x:l,y:c}=parseTranslate(p.style.transform);if(h=l,g=c,vue.unref(n)||r){const e=r?getBoundary(r):null==(t=p.parentElement)?void 0:t.getBoundingClientRect();if(e){const t=p.getBoundingClientRect();y=t.left-e.left,b=t.top-e.top,_=e.width,w=e.height,x=t.width,E=t.height}}p.classList.add("v-draggable--dragging"),document.addEventListener("mousemove",C),document.addEventListener("mouseup",T),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",T),null==a||a({x:h,y:g},e)}function C(e){if(!d.value||vue.unref(s))return;e.preventDefault();const{clientX:o,clientY:a}=getClientCoords(e);let c=o-f,m=a-v;const S=vue.unref(t);"x"===S?m=0:"y"===S&&(c=0);const C=vue.unref(i);C&&(c=Math.round(c/C[0])*C[0],m=Math.round(m/C[1])*C[1]);let T=h+c,L=g+m;if(vue.unref(n)||r){const e=y+c,t=b+m,n=_-x,r=w-E,o=Math.max(0,Math.min(e,n)),i=Math.max(0,Math.min(t,r));T=h+(o-y),L=g+(i-b)}p.style.transform=`translate(${T}px, ${L}px)`,u.value={x:T,y:L},null==l||l({x:T,y:L},e)}function T(e){d.value&&(d.value=!1,null==p||p.classList.remove("v-draggable--dragging"),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",T),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",T),null==c||c(__spreadValues({},u.value),e))}function L(){if(p){const e=m||p;e.removeEventListener("mousedown",S),e.removeEventListener("touchstart",S)}p=null,m=null}return vue.onUnmounted(()=>{L()}),{position:vue.readonly(u),isDragging:vue.readonly(d),reset:function(){p&&(p.style.transform="translate(0px, 0px)",u.value={x:0,y:0})},bind:function(e){if(!isBrowser())return()=>{};L(),p=e,"static"===getComputedStyle(e).position&&(e.style.position="absolute"),m=o?e.querySelector(o):null;const t=m||e;return t.addEventListener("mousedown",S),t.addEventListener("touchstart",S,{passive:!1}),L}}}function measureTextWidth(e,t=14,n="sans-serif"){if("undefined"==typeof document)return 8*e.length;const r=document.createElement("canvas").getContext("2d");return r?(r.font=`${t}px ${n}`,r.measureText(e).width):8*e.length}function truncateToWidth(e,t,n="...",r=14,o="sans-serif"){if(t<=0)return e;if(measureTextWidth(e,r,o)<=t)return e;const i=t-measureTextWidth(n,r,o);if(i<=0)return n;let s=0,a=e.length;for(;s<a;){const t=Math.floor((s+a+1)/2);measureTextWidth(e.slice(0,t),r,o)<=i?s=t:a=t-1}return e.slice(0,s)+n}function truncateToLines(e,t,n="..."){if(t<=0)return"";const r=80*t;return e.length<=r?e:e.slice(0,r-n.length)+n}function useEllipsis(e){const{text:t,lines:n=1,ellipsis:r="...",maxWidth:o=0}=e,i=vue.ref(vue.unref(t)),s=vue.ref(""),a=vue.ref(!1);return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r),vue.unref(o)],()=>function(){const e=vue.unref(t),l=vue.unref(n),c=vue.unref(r),u=vue.unref(o);if(i.value=e,!e)return s.value="",void(a.value=!1);if(u>0){const t=truncateToWidth(e,u,c);s.value=t,a.value=t!==e}else if(l>1){const t=truncateToLines(e,l,c);s.value=t,a.value=t!==e}else s.value=e,a.value=!1}(),{immediate:!0}),vue.onUnmounted(()=>{}),{truncated:s,isTruncated:a,original:i,calculateForWidth:function(e){const n=vue.unref(t),o=vue.unref(r);return!n||e<=0?n||"":truncateToWidth(n,e,o)},wouldTruncate:function(e){const n=vue.unref(t);return!(!n||e<=0)&&measureTextWidth(n)>e}}}function truncateText(e,t,n="..."){return!e||e.length<=t?e:e.slice(0,t-n.length)+n}function wouldTextTruncate(e,t,n=14){return measureTextWidth(e,n)>t}const EMOJI_PATTERN=/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu;function useEmoji(e={}){const{strip:t=!0,allowList:n,blockList:r,replacement:o="",onEmoji:i}=e,s=vue.ref("");let a=null,l=null,c=null;function u(e){if(!vue.unref(t))return e;let s=e;if(r&&r.length>0){const t=r.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(t,"gu");s=e.replace(n,o)}else if(n&&n.length>0)s=e.replace(EMOJI_PATTERN,t=>n.includes(t)?t:(null==i||i(t,e.indexOf(t)),o));else{const t=e.match(EMOJI_PATTERN);t&&t.forEach(t=>null==i?void 0:i(t,e.indexOf(t))),s=e.replace(EMOJI_PATTERN,o)}return s}function d(e){return EMOJI_PATTERN.test(e)}function p(e){const t=e.target,n=t.value,r=u(n);if(r!==n){const e=t.selectionStart||0,o=t.selectionEnd||0;t.value=r,s.value=r;const i=n.length-r.length;t.setSelectionRange(Math.max(0,e-i),Math.max(0,o-i)),t.dispatchEvent(new Event("input",{bubbles:!0}))}}function m(e){var n;if(!vue.unref(t))return;const r=null==(n=e.clipboardData)?void 0:n.getData("text");if(r&&d(r)){e.preventDefault();const t=u(r),n=e.target,o=n.selectionStart||0,i=n.selectionEnd||0,a=n.value;n.value=a.substring(0,o)+t+a.substring(i),s.value=n.value,n.setSelectionRange(o+t.length,o+t.length),n.dispatchEvent(new Event("input",{bubbles:!0}))}}function f(){a&&(l&&a.removeEventListener("input",l),c&&a.removeEventListener("paste",c),a.classList.remove("v-emoji")),a=null,l=null,c=null}return vue.onUnmounted(()=>{f()}),{value:s,stripEmojis:u,hasEmoji:d,bind:function(e){if(!isBrowser())return()=>{};if(f(),a=e,s.value=e.value,l=p,c=m,e.addEventListener("input",l),e.addEventListener("paste",c),e.classList.add("v-emoji"),e.value&&vue.unref(t)){const t=u(e.value);t!==e.value&&(e.value=t,s.value=t)}return"boolean"!=typeof t&&vue.watch(t,()=>{if(vue.unref(t)&&a){const e=u(a.value);e!==a.value&&(a.value=e,s.value=e)}}),f}}}function toCSV(e,t){if(!Array.isArray(e)||0===e.length)return"";const n=t.delimiter||",",r=t.columns||Object.keys(e[0]),o=t.headers||{};return(!1!==t.includeHeaders?`${r.map(e=>o[e]||e).join(n)}\n`:"")+e.map(e=>r.map(t=>{const r=e[t];return"string"==typeof r&&(r.includes(n)||r.includes("\n")||r.includes('"'))?`"${r.replace(/"/g,'""')}"`:null!=r?r:""}).join(n)).join("\n")}function toHTML(e,t){var n;if(!Array.isArray(e)||0===e.length)return"";const r=t.columns||Object.keys(e[0]),o=t.headers||{};let i='<table border="1">\n';if(!1!==t.includeHeaders){i+=" <thead>\n <tr>\n";for(const e of r)i+=` <th>${o[e]||e}</th>\n`;i+=" </tr>\n </thead>\n"}i+=" <tbody>\n";for(const t of e){i+=" <tr>\n";for(const e of r)i+=` <td>${null!=(n=t[e])?n:""}</td>\n`;i+=" </tr>\n"}return i+=" </tbody>\n</table>",i}function downloadFile(e,t,n){const r=new Blob([e],{type:{csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",txt:"text/plain;charset=utf-8;",html:"text/html;charset=utf-8;"}[n]}),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=`${t}.${n}`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)}function useExport(e){function t(t){var n,r,o;if(!1!==(null==(n=e.onBeforeExport)?void 0:n.call(e)))try{const n=vue.unref(e.data),o=t||vue.unref(e.format)||"csv",i=vue.unref(e.filename)||"export";let s;switch(o){case"json":s=JSON.stringify(n,null,2);break;case"html":s=toHTML(Array.isArray(n)?n:[n],e);break;case"txt":s="string"==typeof n?n:JSON.stringify(n,null,2);break;default:s=toCSV(Array.isArray(n)?n:[n],e)}downloadFile(s,i,o),null==(r=e.onAfterExport)||r.call(e)}catch(t){null==(o=e.onError)||o.call(e,t)}}return{exportData:t,exportCSV:function(){t("csv")},exportJSON:function(){t("json")},exportHTML:function(){t("html")},exportText:function(){t("txt")}}}function useFade(e={}){var t;const n=vue.ref(null==(t=vue.unref(e.visible))||t);let r=null,o=!1;function i(){var t;r&&!o&&(o=!0,null==(t=e.onStart)||t.call(e,"in"),r.style.display="",r.style.opacity=String(e.minOpacity||0),requestAnimationFrame(()=>{r&&(r.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,r.style.opacity=String(e.maxOpacity||1),setTimeout(()=>{var t;o=!1,n.value=!0,null==(t=e.onComplete)||t.call(e,"in")},(e.duration||300)+(e.delay||0)))}))}function s(){var t;r&&!o&&(o=!0,null==(t=e.onStart)||t.call(e,"out"),r.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,r.style.opacity=String(e.minOpacity||0),setTimeout(()=>{var t;r&&(r.style.display="none",o=!1,n.value=!1,null==(t=e.onComplete)||t.call(e,"out"))},(e.duration||300)+(e.delay||0)))}function a(){n.value?s():i()}function l(){r&&r.classList.remove("v-fade"),r=null}return vue.onUnmounted(()=>{l()}),{isVisible:n,fadeIn:i,fadeOut:s,toggle:a,bind:function(t){return isBrowser()?(l(),r=t,t.classList.add("v-fade"),t.style.transition=`opacity ${e.duration||300}ms ${e.easing||"ease"} ${e.delay||0}ms`,t.style.opacity=n.value?String(e.maxOpacity||1):String(e.minOpacity||0),n.value||(t.style.display="none"),"boolean"!=typeof e.visible&&e.visible&&vue.watch(e.visible,e=>{e!==n.value&&a()}),l):()=>{}}}}const FOCUSABLE_TAGS=new Set(["input","textarea","select","button"]);function isFocusable(e){if(!isBrowser())return!1;const t=e.tagName.toLowerCase();if(FOCUSABLE_TAGS.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")}function useFocus(e={}){const{onFocus:t,onBlur:n}=e,r=vue.ref(!1);let o=null,i=null,s=null;function a(){o&&(i&&o.removeEventListener("focus",i),s&&o.removeEventListener("blur",s)),o=null,i=null,s=null,r.value=!1}return vue.onUnmounted(()=>{a()}),{isFocused:vue.readonly(r),focus:function(){o&&isFocusable(o)&&o.focus()},blur:function(){o&&o.blur()},bind:function(e){return isBrowser()?(a(),o=e,i=e=>{r.value=!0,null==t||t(e)},s=e=>{r.value=!1,null==n||n(e)},e.addEventListener("focus",i),e.addEventListener("blur",s),r.value=document.activeElement===e,a):()=>{}}}}function isFullscreenSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}function getFullscreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function requestFullscreen(e){return __async(this,null,function*(){e.requestFullscreen?yield e.requestFullscreen():e.webkitRequestFullscreen?yield e.webkitRequestFullscreen():e.mozRequestFullScreen?yield e.mozRequestFullScreen():e.msRequestFullscreen&&(yield e.msRequestFullscreen())})}function exitFullscreen(){return __async(this,null,function*(){document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.mozCancelFullScreen?yield document.mozCancelFullScreen():document.msExitFullscreen&&(yield document.msExitFullscreen())})}function useFullscreen(e={}){const{fullscreenClass:t="v-fullscreen--active",onEnter:n,onExit:r,onChange:o}=e,i=vue.ref(!1);let s=null,a=[];function l(){return __async(this,null,function*(){s&&!i.value&&(yield requestFullscreen(s))})}function c(){return __async(this,null,function*(){i.value&&(yield exitFullscreen())})}function u(){const e=i.value;i.value=getFullscreenElement()===s,e!==i.value&&(i.value?(null==s||s.classList.add(t),null==n||n()):(null==s||s.classList.remove(t),null==r||r()),null==o||o(i.value))}function d(){s&&(s.classList.remove("v-fullscreen"),s.classList.remove(t)),a.forEach(e=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}),s=null,a=[]}return vue.onUnmounted(()=>{i.value&&c(),d()}),{isFullscreen:i,enter:l,exit:c,toggle:function(){return __async(this,null,function*(){i.value?yield c():yield l()})},bind:function(e){return isBrowser()&&isFullscreenSupported()?(d(),s=e,e.classList.add("v-fullscreen"),a=[u,u,u,u],document.addEventListener("fullscreenchange",a[0]),document.addEventListener("webkitfullscreenchange",a[1]),document.addEventListener("mozfullscreenchange",a[2]),document.addEventListener("MSFullscreenChange",a[3]),d):()=>{}}}}function escapeRegex$2(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function highlightText(e,t){const n=vue.unref(t.keywords),r=Array.isArray(n)?n:[n];if(0===r.length||!e)return{html:e,count:0};const o=t.caseSensitive||!1,i=t.wholeWord||!1,s=t.tag||"mark",a=t.className||"v-highlight",l=t.style?` style="${t.style}"`:"";r.sort((e,t)=>t.length-e.length);let c=e,u=0;for(const e of r){if(!e)continue;const t=escapeRegex$2(e),n=i?"\\b":"",r=new RegExp(`${n}${t}${n}`,o?"g":"gi");c=c.replace(r,e=>(u++,`<${s} class="${a}"${l}>${e}</${s}>`))}return{html:c,count:u}}function useHighlight(e){const t=vue.ref(0);let n=null,r="";function o(){if(!n)return;n.innerHTML=r;const{html:o,count:i}=highlightText(r,e);n.innerHTML=o,t.value=i}function i(){n&&(n.innerHTML=r),n=null}return vue.onUnmounted(()=>{i()}),{count:t,updateKeywords:function(t){e.keywords=t,o()},bind:function(t){return isBrowser()?(i(),n=t,r=t.innerHTML,"string"==typeof e.keywords||Array.isArray(e.keywords)||vue.watch(e.keywords,()=>{o()}),o(),i):()=>{}}}}const KEY_ALIASES={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:"-"},MODIFIERS=new Set(["ctrl","alt","shift","meta"]);function parseHotkey(e){const t=e.toLowerCase().split("+").map(e=>e.trim()),n=new Set;let r="";for(const e of t)MODIFIERS.has(e)?n.add(e):r=KEY_ALIASES[e]||e;return{key:r,modifiers:n}}function matchesHotkey(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,r=t.key;return n.toLowerCase()===r.toLowerCase()}function useHotkey(e={}){const{hotkey:t,hotkeys:n=[],target:r,enabled:o=!0}=e,i=vue.ref(vue.unref(o)),s=new Map;let a=null,l=null,c=null;function u(e){const t=parseHotkey(e.key).key.toLowerCase();s.has(t)||s.set(t,[]),s.get(t).push(e)}function d(e,t){if(!i.value)return;const n=e.key.toLowerCase(),r=s.get(n);if(r)for(const n of r){if(vue.unref(n.disabled))continue;if(!!n.keyup!==t)continue;if(matchesHotkey(e,parseHotkey(n.key))){!1!==n.prevent&&e.preventDefault(),n.stop&&e.stopPropagation(),n.handler(e);break}}}function p(){isBrowser()&&(m(),a=r?vue.unref(r):document,l=e=>d(e,!1),c=e=>d(e,!0),null==a||a.addEventListener("keydown",l),null==a||a.addEventListener("keyup",c))}function m(){a&&(l&&a.removeEventListener("keydown",l),c&&a.removeEventListener("keyup",c)),a=null,l=null,c=null}return t&&u(t),n.forEach(u),vue.watch(i,e=>{e?p():m()}),r&&"object"==typeof r&&"value"in r&&vue.watch(r,()=>{i.value&&p()}),i.value&&p(),vue.onUnmounted(()=>{m()}),{enabled:i,enable:function(){i.value=!0},disable:function(){i.value=!1},toggle:function(){i.value=!i.value},add:u,remove:function(e){s.delete(e.toLowerCase())},clear:function(){s.clear()}}}function useHover(e={}){const{onEnter:t,onLeave:n,class:r,enterDelay:o=0,leaveDelay:i=0}=e,s=vue.ref(!1);let a=null,l=null,c=null;function u(){a&&(clearTimeout(a),a=null),l&&(clearTimeout(l),l=null)}function d(e){if(l&&(clearTimeout(l),l=null),s.value)return;const n=vue.unref(o);n&&n>0?a=setTimeout(()=>{s.value=!0,m(),null==t||t(e),a=null},n):(s.value=!0,m(),null==t||t(e))}function p(e){if(a&&(clearTimeout(a),a=null),!s.value)return;const t=vue.unref(i);t&&t>0?l=setTimeout(()=>{s.value=!1,f(),null==n||n(e),l=null},t):(s.value=!1,f(),null==n||n(e))}function m(){c&&r&&c.classList.add(r)}function f(){c&&r&&c.classList.remove(r)}return vue.onUnmounted(()=>{u(),f()}),{isHovering:s,bind:function(e){return isBrowser()?(c=e,e.addEventListener("mouseenter",d),e.addEventListener("mouseleave",p),()=>{e.removeEventListener("mouseenter",d),e.removeEventListener("mouseleave",p),u(),f(),c=null}):()=>{}}}}function useImagePreview(e={}){const{src:t,closeOnClickOutside:n=!0,closeOnEsc:r=!0,showCloseButton:o=!0,onOpen:i,onClose:s}=e,a=vue.ref(!1),l=vue.ref("");let c=null,u=null,d=null,p=null;function m(e){if(!isBrowser())return;const s=e||(t&&"object"==typeof t?t.value:t);if(!s&&!c)return;const m=s||c.src;l.value=m,u=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 v=document.createElement("img");if(v.src=m,v.style.cssText="\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n cursor: default;\n ",o){const e=document.createElement("button");e.className="v-image-preview__close",e.innerHTML="×",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(),f()}),u.appendChild(e)}u.appendChild(v),document.body.appendChild(u),n&&(d=f,u.addEventListener("click",d)),r&&(p=e=>{"Escape"===e.key&&f()},document.addEventListener("keydown",p)),a.value=!0,null==i||i()}function f(){u&&(u.remove(),u=null),d&&(document.removeEventListener("click",d),d=null),p&&(document.removeEventListener("keydown",p),p=null),a.value=!1,l.value="",null==s||s()}function v(){c&&m(c.src)}function h(){c&&(c.style.cursor="",c.removeEventListener("click",v)),c=null}return vue.onUnmounted(()=>{h(),f()}),{isOpen:vue.readonly(a),currentSrc:vue.readonly(l),open:m,close:f,bind:function(e){return isBrowser()?(h(),c=e,e.style.cursor="zoom-in",e.addEventListener("click",v),h):()=>{}}}}function useInfiniteScroll(e){const{onLoad:t,loading:n,finished:r,distance:o=0,immediate:i=!0,disabled:s=!1}=e,a=vue.ref(!1),l=vue.ref(!1),c=n||a,u=r||l;let d=null,p=null,m=null,f=null;function v(){return __async(this,null,function*(){if(!(vue.unref(c)||vue.unref(u)||vue.unref(s))){a.value=!0;try{yield t()}finally{a.value=!1}}})}function h(){if(!d||vue.unref(c)||vue.unref(u)||vue.unref(s))return;const e=vue.unref(o);let t,n;if(d===window)t=document.documentElement.scrollHeight-window.scrollY,n=window.innerHeight;else{const e=d;t=e.scrollHeight-e.scrollTop,n=e.clientHeight}t<=n+e&&v()}function g(){m&&(m.disconnect(),m=null),f&&(f.remove(),f=null),d&&p&&d.removeEventListener("scroll",p),d=null,p=null}return vue.onUnmounted(()=>{g()}),{loading:vue.readonly(c),finished:vue.readonly(u),load:v,bind:function(e){if(!isBrowser())return()=>{};if(g(),supportsIntersectionObserver()){f=document.createElement("div"),f.style.cssText="height: 1px; width: 100%; visibility: hidden;",e.appendChild(f);const t=getScrollParent$2(e),n=t instanceof Window?null:t;m=new IntersectionObserver(e=>{e[0].isIntersecting&&v()},{root:n,rootMargin:`${vue.unref(o)}px`}),m.observe(f)}else d=getScrollParent$2(e),p=h,d.addEventListener("scroll",p);return i&&v(),g},stop:g}}function useIntersect(e={}){const{handler:t,onEnter:n,onLeave:r,onChange:o,root:i=null,rootMargin:s="0px",threshold:a=0,once:l=!1}=e,c=vue.ref(!1),u=vue.ref(0);let d=null,p=!1;function m(){d&&(d.disconnect(),d=null),c.value=!1,u.value=0}return vue.onUnmounted(()=>{m()}),{isIntersecting:vue.readonly(c),ratio:vue.readonly(u),bind:function(e){return isBrowser()?(m(),d=isBrowser()&&supportsIntersectionObserver()?new IntersectionObserver(e=>{for(const i of e){if(l&&p)continue;const e=i.isIntersecting;c.value=e,u.value=i.intersectionRatio,null==t||t(i,d),null==o||o(e,i),e?(null==n||n(i,d),l&&(p=!0)):null==r||r(i,d)}},{root:vue.unref(i),rootMargin:s,threshold:a}):(console.warn("[Directix] useIntersect: IntersectionObserver not supported"),null),d&&d.observe(e),m):()=>{}},stop:m}}let globalObserver=null;function getGlobalObserver(e){return globalObserver||(globalObserver=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=e.target,n=t.__lazyLoad;n&&(n(),null==globalObserver||globalObserver.unobserve(t))}})},{rootMargin:`${e}px`}),globalObserver)}function setSrc(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function useLazy(e={}){const{src:t,placeholder:n,error:r,preload:o=0,onLoad:i,onError:s,attempt:a=1}=e,l=vue.ref("pending"),c=vue.ref(!1),u=vue.ref(!1),d=vue.ref(!1);let p=null,m=0,f=null;function v(){const e=vue.unref(t);if(!e||!p)return;if("loading"===l.value)return;l.value="loading",c.value=!0;const n=new Image;n.onload=()=>{setSrc(p,e),l.value="loaded",c.value=!1,u.value=!0,d.value=!1,null==p||p.classList.remove("v-lazy--loading"),null==p||p.classList.add("v-lazy--loaded"),null==i||i(p)},n.onerror=()=>{null==p||p.classList.remove("v-lazy--loading"),m++,m<a?setTimeout(()=>v(),1e3*m):(r&&p&&setSrc(p,r),l.value="error",c.value=!1,d.value=!0,null==p||p.classList.add("v-lazy--error"),null==s||s(p,new Error("Failed to load image")))},p.classList.add("v-lazy--loading"),n.src=e}function h(){p&&(f&&f.unobserve(p),delete p.__lazyLoad,p.classList.remove("v-lazy","v-lazy--loading","v-lazy--loaded","v-lazy--error")),p=null}return vue.onUnmounted(()=>{h()}),{state:vue.readonly(l),isLoading:vue.readonly(c),isLoaded:vue.readonly(u),hasError:vue.readonly(d),bind:function(e){return isBrowser()?(h(),p=e,m=0,l.value="pending",e.classList.add("v-lazy"),n&&setSrc(e,n),e.__lazyLoad=v,supportsIntersectionObserver()?(f=getGlobalObserver(o),f.observe(e),h):(v(),h)):()=>{}},load:v,reset:function(){l.value="pending",c.value=!1,u.value=!1,d.value=!1,m=0}}}const DEFAULT_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';function createLoadingOverlay(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||DEFAULT_SPINNER,r=document.createElement("div");if(r.className=e.spinnerClass||"v-loading__spinner",r.innerHTML=n,t.appendChild(r),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}function useLoading(e={}){const{initial:t=!1,text:n,loadingClass:r="v-loading",spinnerClass:o="v-loading__spinner",textClass:i="v-loading__text",spinner:s,background:a="rgba(255, 255, 255, 0.9)",lock:l=!1}=e,c=vue.ref(vue.unref(t));let u=null,d=null,p="",m="";function f(){u&&!d&&(d=createLoadingOverlay({text:vue.unref(n),loadingClass:r,spinnerClass:o,textClass:i,spinner:s,background:a}),u.appendChild(d),l&&(u.style.overflow="hidden"),u.classList.add("v-loading--active"))}function v(){u&&d&&(d.remove(),d=null,l&&(u.style.overflow=m),u.classList.remove("v-loading--active"))}function h(){v(),u&&(u.style.position=p,u.style.overflow=m),u=null}return vue.watch(c,e=>{e?f():v()}),"object"==typeof n&&"value"in n&&vue.watch(n,e=>{if(d){const t=d.querySelector(`.${i}`);t&&(t.textContent=e||"")}}),vue.onUnmounted(()=>{h()}),{loading:c,start:function(){c.value=!0},stop:function(){c.value=!1},toggle:function(){c.value=!c.value},bind:function(e){return isBrowser()?(h(),u=e,p=e.style.position,m=e.style.overflow,"static"===getComputedStyle(e).position&&(e.style.position="relative"),c.value&&f(),h):()=>{}}}}function useLongPress(e={}){const{duration:t=500,distance:n=10,onStart:r,onTrigger:o,onCancel:i,onTick:s,tickInterval:a=100,prevent:l=!0}=e,c=vue.ref(!1);let u=null,d=null,p={x:0,y:0},m=!1;function f(e){if(!isBrowser())return;l&&e.preventDefault(),g();const n=getEventPosition(e);if(p={x:n.x,y:n.y},m=!0,c.value=!0,null==r||r(e),s){let e=vue.unref(t);d=setInterval(()=>{e-=a,null==s||s(Math.max(0,e))},a)}u=setTimeout(()=>{g(),c.value=!1,null==o||o(e)},vue.unref(t))}function v(e){c.value&&(g(),m=!1,c.value=!1,null==i||i(e))}function h(e){if(!c.value||!m)return;const t=getEventPosition(e);getDistance$5(p,{x:t.x,y:t.y})>vue.unref(n)&&v(e)}function g(){u&&(clearTimeout(u),u=null),d&&(clearInterval(d),d=null)}return vue.onUnmounted(()=>{g()}),{isPressing:c,start:f,stop:v,bind:function(e){return e.addEventListener("mousedown",f),e.addEventListener("mouseup",v),e.addEventListener("mouseleave",v),e.addEventListener("mousemove",h),e.addEventListener("touchstart",f,{passive:!l}),e.addEventListener("touchend",v),e.addEventListener("touchcancel",v),e.addEventListener("touchmove",h,{passive:!0}),()=>{e.removeEventListener("mousedown",f),e.removeEventListener("mouseup",v),e.removeEventListener("mouseleave",v),e.removeEventListener("mousemove",h),e.removeEventListener("touchstart",f),e.removeEventListener("touchend",v),e.removeEventListener("touchcancel",v),e.removeEventListener("touchmove",h),g()}}}}function loadLottie(){return __async(this,null,function*(){if(window.lottie)return window.lottie;try{const e=yield import("lottie-web");return window.lottie=e.default||e,e.default||e}catch(e){return console.warn("[Directix] useLottie: lottie-web not found. Install: npm install lottie-web"),null}})}function useLottie(e){const t=vue.ref("stopped"),n=vue.shallowRef(null);let r=null,o=null;function i(){n.value&&(n.value.destroy(),n.value=null),o&&o.parentNode&&o.parentNode.removeChild(o),r&&r.classList.remove("v-lottie-container"),o=null,r=null,t.value="stopped"}return vue.onUnmounted(()=>{i()}),{state:t,animation:n,play:function(){var e;null==(e=n.value)||e.play(),t.value="playing"},pause:function(){var e;null==(e=n.value)||e.pause(),t.value="paused"},stop:function(){var e;null==(e=n.value)||e.stop(),t.value="stopped"},setSpeed:function(e){var t;null==(t=n.value)||t.setSpeed(e)},setDirection:function(e){var t;null==(t=n.value)||t.setDirection(e)},goToAndPlay:function(e,r=!0){var o;null==(o=n.value)||o.goToAndPlay(e,r),t.value="playing"},goToAndStop:function(e,r=!0){var o;null==(o=n.value)||o.goToAndStop(e,r),t.value="paused"},bind:function(s){return isBrowser()?(i(),r=s,o=document.createElement("div"),o.className="v-lottie",o.style.cssText="width: 100%; height: 100%;",s.appendChild(o),s.classList.add("v-lottie-container"),function(){__async(this,null,function*(){const r=yield loadLottie();if(!r||!o)return;const i=vue.unref(e.animationData),s={container:o,renderer:e.renderer||"svg",loop:!1!==e.loop,autoplay:!1!==e.autoplay};"string"==typeof i&&i.startsWith("http")?s.path=i:s.animationData=i,n.value=r.loadAnimation(s),void 0!==e.speed&&n.value.setSpeed(vue.unref(e.speed)),void 0!==e.direction&&n.value.setDirection(e.direction),t.value=!1!==e.autoplay?"playing":"stopped",n.value.addEventListener("DOMLoaded",()=>{var t;null==(t=e.onReady)||t.call(e,n.value)}),n.value.addEventListener("complete",()=>{var n;t.value="stopped",null==(n=e.onComplete)||n.call(e)}),n.value.addEventListener("loopComplete",()=>{var t;null==(t=e.onLoopComplete)||t.call(e)})})}(),"number"!=typeof e.speed&&e.speed&&vue.watch(e.speed,e=>{var t;null==(t=n.value)||t.setSpeed(e)}),i):()=>{}}}}function lowercaseText(e,t=!1){return e?t?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function useLowercase(e){const{text:t,first:n=!1}=e,r=vue.ref(vue.unref(t)),o=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n)],()=>function(){const e=vue.unref(t),i=vue.unref(n);r.value=e,o.value=lowercaseText(e,i)}(),{immediate:!0}),{transformed:o,original:r}}function createLowercaser(e=!1){return t=>lowercaseText(t,e)}const TOKEN_PATTERNS={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function parseMask(e,t){return[...e].map(e=>{const n=TOKEN_PATTERNS[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function useMask(e){const{mask:t,placeholder:n="_",showPlaceholder:r=!0,showMaskOnBlur:o=!1,clearIncomplete:i=!1,onChange:s,onComplete:a}=e;let l=null,c=null,u=null,d=null;function p(){return parseMask(vue.unref(t),n)}function m(e,t,r){let o="",i=0;for(const s of t){if(i>=e.length){o+=s.isLiteral?s.placeholder:r?n:"";continue}const t=e[i];s.isLiteral?(t===s.placeholder&&i++,o+=s.placeholder):s.pattern.test(t)?(o+=t,i++):t===n?(o+=r?n:"",i++):i++}return o}function f(e,t){let r="";for(let o=0;o<e.length&&o<t.length;o++)t[o].isLiteral||e[o]===n||(r+=e[o]);return r}function v(e,t){for(let r=0;r<t.length;r++)if(!t[r].isLiteral&&(r>=e.length||e[r]===n))return!1;return!0}function h(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}function g(e){const t=e.target,n=p(),o=t.value,i=t.selectionStart||0,l=m(o,n,r);if(l!==o)return t.value=l,t.setSelectionRange(h(n,i),h(n,i)),void t.dispatchEvent(new Event("input",{bubbles:!0}));null==s||s(l,f(l,n)),v(l,n)&&(null==a||a(l))}function y(){if(!l)return;const e=p();!l.value&&r&&(l.value=m("",e,!0))}function b(){if(!l)return;const e=p();o||v(l.value,e)||!i||(l.value="")}function _(){l&&(c&&l.removeEventListener("input",c),u&&l.removeEventListener("focus",u),d&&l.removeEventListener("blur",d)),l=null,c=null,u=null,d=null}return vue.onUnmounted(()=>{_()}),{getFormattedValue:e=>m(e,p(),r),getRawValue:e=>f(e,p()),isComplete:e=>v(e,p()),bind:function(e){if(!isBrowser())return()=>{};if(_(),l=e,c=g,u=y,d=b,e.addEventListener("input",c),e.addEventListener("focus",u),e.addEventListener("blur",d),e.value){const t=p();e.value=m(e.value,t,r)}return _}}}function formatMoney(e,t={}){const{precision:n=2,separator:r=",",decimal:o=".",symbol:i="$",symbolPosition:s="before"}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),"before"===s?i+u:u+i}function parseMoney(e,t={}){const{decimal:n=".",symbol:r="$"}=t;let o=e.replace(new RegExp(`[${r}\\s]`,"g"),"");return"."!==n?(o=o.replace(/,/g,""),o=o.replace(new RegExp(`\\${n}`,"g"),".")):o=o.replace(/,/g,""),parseFloat(o)||0}function useMoney(e){const{value:t,symbol:n="$",symbolPosition:r="before",precision:o=2,separator:i=",",decimal:s="."}=e,a=vue.ref(vue.unref(t));const l=vue.computed(()=>formatMoney(a.value,{precision:vue.unref(o),separator:vue.unref(i),decimal:vue.unref(s),symbol:vue.unref(n),symbolPosition:vue.unref(r)}));return vue.watch(()=>vue.unref(t),e=>{a.value=e}),{value:a,formatted:l,parse:function(e){return parseMoney(e,{decimal:vue.unref(s),symbol:vue.unref(n)})}}}function createMoneyFormatter(e={}){return t=>formatMoney(t,e)}function useMutation(e){const{handler:t,attributes:n=!1,attributeFilter:r,childList:o=!0,subtree:i=!1,characterData:s=!1,attributeOldValue:a=!1,characterDataOldValue:l=!1,disabled:c=!1}=e;let u=null,d=null;function p(){u&&d&&!vue.unref(c)&&d.observe(u,{attributes:n,attributeFilter:r,childList:o,subtree:i,characterData:s,attributeOldValue:a,characterDataOldValue:l})}function m(){d&&d.disconnect()}return vue.onUnmounted(()=>{m(),d=null,u=null}),{bind:function(e){return isBrowser()?(m(),u=e,d=isBrowser()&&supportsMutationObserver()?new MutationObserver((e,n)=>{vue.unref(c)||t(e,n)}):(console.warn("[Directix] useMutation: MutationObserver not supported"),null),d&&!vue.unref(c)&&p(),m):()=>{}},stop:m,start:p}}function formatNumber(e,t={}){const{precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=t,a=e.toFixed(n),[l,c]=a.split(".");let u=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return n>0&&c&&(u+=o+c),i+u+s}function parseNumber(e,t={}){const{decimal:n=".",prefix:r="",suffix:o=""}=t;let i=e.replace(new RegExp(`^${escapeRegex$1(r)}`),"").replace(new RegExp(`${escapeRegex$1(o)}$`),"").replace(/\s/g,"");return"."!==n?(i=i.replace(/,/g,""),i=i.replace(new RegExp(`\\${n}`,"g"),".")):i=i.replace(/,/g,""),parseFloat(i)||0}function escapeRegex$1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function useNumber(e){const{value:t,precision:n=0,separator:r=",",decimal:o=".",prefix:i="",suffix:s=""}=e,a=vue.ref(vue.unref(t));const l=vue.computed(()=>formatNumber(a.value,{precision:vue.unref(n),separator:vue.unref(r),decimal:vue.unref(o),prefix:vue.unref(i),suffix:vue.unref(s)}));return vue.watch(()=>vue.unref(t),e=>{a.value=e}),{value:a,formatted:l,parse:function(e){return parseNumber(e,{decimal:vue.unref(o),prefix:vue.unref(i),suffix:vue.unref(s)})}}}function createNumberFormatter(e={}){return t=>formatNumber(t,e)}function getDirection(e,t){return Math.abs(e)>Math.abs(t)?e>0?"right":"left":t>0?"down":"up"}function isDirectionAllowed(e,t){return!t||"all"===t||("horizontal"===t?"left"===e||"right"===e:"up"===e||"down"===e)}function getPosition(e){return"touches"in e&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}function usePan(e={}){const{onStart:t,onPan:n,onEnd:r,threshold:o=10,direction:i="all",preventDefault:s=!0,pointers:a=["touch","mouse"]}=e,l=vue.ref(!1),c=vue.ref(null),u=vue.ref(0);let d=null,p=0,m=0,f=0,v=0,h=0,g={};function y(e,t=!1,n=!1){const r=f-p,o=v-m,i=Math.sqrt(r*r+o*o),s=Date.now()-h;return{direction:getDirection(r,o),deltaX:r,deltaY:o,distance:i,x:f,y:v,startX:p,startY:m,isPanning:l.value,isFirst:t,isFinal:n,velocity:i/(s||1)}}function b(e){const t=getPosition(e);p=t.x,m=t.y,f=t.x,v=t.y,l.value=!1,h=Date.now(),s&&e.preventDefault()}function _(e){const r=e,a=getPosition(r);f=a.x,v=a.y;const d=f-p,h=v-m,g=Math.sqrt(d*d+h*h);if(!l.value&&g<o)return;const b=getDirection(d,h);if(!isDirectionAllowed(b,i))return;s&&e.preventDefault();const _=l.value;l.value=!0,c.value=b,u.value=g;const w=y(0,!_);_||null==t||t(w),null==n||n(w)}function w(e){if(!l.value)return;const t=y(0,!1,!0);null==r||r(t),l.value=!1,c.value=null,u.value=0}function x(){d&&(Object.entries(g).forEach(([e,t])=>{!e.startsWith("mouse")||"mousemove"!==e&&"mouseup"!==e?null==d||d.removeEventListener(e,t):document.removeEventListener(e,t)}),d.classList.remove("v-pan")),d=null,g={}}return vue.onUnmounted(()=>{x()}),{isPanning:l,direction:c,distance:u,bind:function(e){return isBrowser()?(x(),d=e,a.includes("touch")&&(g.touchstart=b,g.touchmove=_,g.touchend=w,g.touchcancel=w,e.addEventListener("touchstart",g.touchstart,{passive:!1}),e.addEventListener("touchmove",g.touchmove,{passive:!1}),e.addEventListener("touchend",g.touchend),e.addEventListener("touchcancel",g.touchcancel)),a.includes("mouse")&&(g.mousedown=b,g.mousemove=_,g.mouseup=w,e.addEventListener("mousedown",g.mousedown),document.addEventListener("mousemove",g.mousemove),document.addEventListener("mouseup",g.mouseup)),e.classList.add("v-pan"),x):()=>{}}}}function isMobile(e){return!!e&&window.innerWidth<e}function getScrollParent(e){let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+r))return t;t=t.parentElement}return window}function useParallax(e={}){const t=vue.ref(0),n=vue.ref(!1);let r=null,o=null,i=null,s=!1;function a(){vue.unref(e.enabled)&&!isMobile(e.mobileBreakpoint)&&(s||(s=!0,requestAnimationFrame(()=>{if(!r)return;const o=r.getBoundingClientRect(),i=window.innerHeight;if(n.value=o.top<i&&o.bottom>0,n.value){const n=window.scrollY;let i=(n-(o.top+n))*(vue.unref(e.speed)||.5);e.reverse&&(i=-i),t.value=i,e.transform?r.style.transform=e.transform(i,r):e.horizontal?r.style.transform=`translateX(${i}px)`:r.style.transform=`translateY(${i}px)`}s=!1})))}function l(){i&&o&&(i.removeEventListener("scroll",o),window.removeEventListener("resize",o)),r&&(r.style.willChange="",r.style.transform="",r.classList.remove("v-parallax")),r=null,o=null,i=null}return vue.onUnmounted(()=>{l()}),{offset:t,isActive:n,bind:function(e){return isBrowser()?(l(),r=e,e.style.willChange="transform",o=a,i=getScrollParent(e),i.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),a(),e.classList.add("v-parallax"),l):()=>{}}}}const WILDCARD="*";function hasPermission(e,t){return t.includes(WILDCARD)||t.includes(e)}function usePermission(e){const{value:t,mode:n="some",check:r,getPermissions:o,getRoles:i,roleMap:s={}}=e,a=vue.ref(!1);function l(){a.value=function(){if(r)return r(vue.unref(t),vue.unref(n));if(!o)return console.warn("[Directix] usePermission: getPermissions function is required"),!0;const e=o(),a=(null==i?void 0:i())||[],l=Array.isArray(vue.unref(t))?vue.unref(t):[vue.unref(t)];function c(t){if(t in s)return a.includes(t);if(hasPermission(t,e))return!0;for(const e of a)if(hasPermission(t,s[e]||[]))return!0;return!1}return"every"===vue.unref(n)?l.every(c):l.some(c)}()}return vue.watch(()=>vue.unref(t),()=>l(),{immediate:!0}),"object"==typeof n&&"value"in n&&vue.watch(n,()=>l()),{granted:vue.readonly(a),recheck:l}}function createPermissionChecker(e){const{getPermissions:t,getRoles:n,roleMap:r={}}=e;return(e,o="some")=>{const i=t(),s=(null==n?void 0:n())||[],a=Array.isArray(e)?e:[e];function l(e){if(e in r)return s.includes(e);if(hasPermission(e,i))return!0;for(const t of s){if(hasPermission(e,r[t]||[]))return!0}return!1}return"every"===o?a.every(l):a.some(l)}}function getDistance(e){if(e.length<2)return 0;const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)}function getCenter$1(e){return 0===e.length?{x:0,y:0}:e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function usePinch(e={}){const{onStart:t,onPinch:n,onEnd:r,minScale:o,maxScale:i,enableTransform:s=!1}=e,a=vue.ref(!1),l=vue.ref(1);let c=null,u=0,d=0,p=1,m="",f={};function v(e,t=!1,n=!1){const r=getCenter$1(e.touches);return{scale:u>0?d/u:1,distance:d,initialDistance:u,centerX:r.x,centerY:r.y,isPinching:a.value,isFirst:t,isFinal:n}}function h(e){const t=e;if(2===t.touches.length){if(u=getDistance(t.touches),d=u,a.value=!1,s&&c){const e=getComputedStyle(c).transform,t=new DOMMatrix(e);p=t.a,m=c.style.transition,c.style.transition="none"}e.preventDefault()}}function g(e){const r=e;if(2!==r.touches.length)return;if(d=getDistance(r.touches),u<=0)return;const m=d/u;if(void 0!==o&&m<o)return;if(void 0!==i&&m>i)return;e.preventDefault();const f=a.value;a.value=!0,l.value=m;const h=v(r,!f);f||null==t||t(h),s&&c&&(c.style.transform=`scale(${p*m})`),null==n||n(h)}function y(e){if(!a.value)return;s&&c&&(c.style.transition=m);const t=v({touches:{length:0,item:()=>null}},!1,!0);null==r||r(t),a.value=!1,u=0,d=0}function b(){c&&(Object.entries(f).forEach(([e,t])=>{null==c||c.removeEventListener(e,t)}),c.classList.remove("v-pinch")),c=null,f={}}return vue.onUnmounted(()=>{b()}),{isPinching:a,scale:l,bind:function(e){return isBrowser()?(b(),c=e,f={touchstart:h,touchmove:g,touchend:y,touchcancel:y},e.addEventListener("touchstart",f.touchstart,{passive:!1}),e.addEventListener("touchmove",f.touchmove,{passive:!1}),e.addEventListener("touchend",f.touchend),e.addEventListener("touchcancel",f.touchcancel),e.classList.add("v-pinch"),b):()=>{}}}}function waitForImages(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 buildPrintContent(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 r=t.title||("undefined"!=typeof document?document.title:"Print"),o=e.outerHTML;return`<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset="utf-8">\n\t<title>${r}</title>\n\t${n}\n</head>\n<body>\n\t${o}\n</body>\n</html>`}function printInIframe(e,t){return __async(this,null,function*(){var n,r,o;const i=document.createElement("iframe");i.style.cssText="position: absolute; top: -10000px; left: -10000px; width: 0; height: 0; border: none;",document.body.appendChild(i);const s=i.contentDocument||(null==(n=i.contentWindow)?void 0:n.document);if(!s)return console.warn("[Directix] usePrint: Could not access iframe document"),void document.body.removeChild(i);const a=buildPrintContent(e,t);s.open(),s.write(a),s.close(),yield waitForImages(s);try{null==(r=i.contentWindow)||r.focus(),null==(o=i.contentWindow)||o.print()}catch(e){console.error("[Directix] usePrint: Print failed",e)}setTimeout(()=>{document.body.removeChild(i)},1e3)})}function printInNewWindow(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 r=buildPrintContent(e,t);n.document.open(),n.document.write(r),n.document.close(),yield waitForImages(n.document),n.focus(),n.print(),setTimeout(()=>{n.close()},1e3)})}function usePrint(e={}){const{title:t,styles:n,cssUrls:r=[],onBeforePrint:o,onAfterPrint:i,newWindow:s=!1,printClass:a}=e,l=vue.ref(!1);function c(e){return __async(this,null,function*(){if(o){if(!1===o())return}l.value=!0;try{let o=null;if(o="string"==typeof e?document.querySelector(e):e instanceof HTMLElement?e:document.body,!o)return void console.warn("[Directix] usePrint: Target element not found");const l={title:vue.unref(t)||"",styles:Array.isArray(vue.unref(n))?vue.unref(n).join("\n"):vue.unref(n)||"",cssUrls:vue.unref(r)||[],printClass:vue.unref(a)};vue.unref(s)?yield printInNewWindow(o,l):yield printInIframe(o,l),i&&i()}finally{l.value=!1}})}return vue.onUnmounted(()=>{}),{isPrinting:l,print:c,printPage:function(){return __async(this,null,function*(){yield c()})}}}function quickPrint(e){return __async(this,arguments,function*(e,t={}){const{print:n}=usePrint(t);yield n(e)})}function ensureStyles$2(){if(!isBrowser())return;const e="v-progress-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-progress-stripes {\n from { background-position: 1rem 0; }\n to { background-position: 0 0; }\n }\n @keyframes v-progress-indeterminate {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(400%); }\n }\n .v-progress--indeterminate {\n position: absolute;\n width: 30% !important;\n }\n ",document.head.appendChild(t)}function useProgress(e={}){var t,n,r;const o=vue.ref(null!=(t=vue.unref(e.value))?t:0),i=null!=(n=e.max)?n:100,s=null!=(r=e.min)?r:0,a=vue.computed(()=>(Math.max(s,Math.min(i,o.value))-s)/(i-s)*100);let l=null,c=null,u=null,d=null;function p(){var t,n;u&&(vue.unref(e.indeterminate)||(u.style.width=`${a.value}%`,d&&(d.textContent=`${Math.round(a.value)}%`),null==(t=e.onChange)||t.call(e,o.value,a.value),a.value>=100&&(null==(n=e.onComplete)||n.call(e))))}function m(e){o.value=Math.max(s,Math.min(i,e)),p()}function f(){c&&c.parentNode&&c.parentNode.removeChild(c),l&&l.classList.remove("v-progress-container"),c=null,u=null,d=null,l=null}return vue.onUnmounted(()=>{f()}),{value:o,percent:a,setValue:m,increment:function(e=1){m(o.value+e)},decrement:function(e=1){m(o.value-e)},reset:function(){m(s)},bind:function(t){return isBrowser()?(f(),l=t,"static"===getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!l)return;ensureStyles$2();const t=e.height||4,n=e.color||"#42b883",r=e.backgroundColor||"rgba(0, 0, 0, 0.1)",o=e.duration||300;c=document.createElement("div"),c.className="v-progress",c.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: ${t}px;\n background: ${r};\n overflow: hidden;\n z-index: 1000;\n `,u=document.createElement("div"),u.className="v-progress__bar";let i=`\n height: 100%;\n background: ${n};\n transition: width ${o}ms ease;\n width: ${a.value}%;\n `;e.striped&&(i+="\n background-image: linear-gradient(\n 45deg,\n rgba(255, 255, 255, 0.15) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.15) 50%,\n rgba(255, 255, 255, 0.15) 75%,\n transparent 75%,\n transparent\n );\n background-size: 1rem 1rem;\n "),u.style.cssText=i,vue.unref(e.indeterminate)?(u.classList.add("v-progress--indeterminate"),u.style.width="30%",u.style.animation="v-progress-indeterminate 1.5s infinite linear"):e.animated&&(u.style.animation="v-progress-stripes 1s linear infinite"),c.appendChild(u),e.showText&&(d=document.createElement("span"),d.className="v-progress__text",d.style.cssText=`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: ${Math.max(t-2,10)}px;\n color: #fff;\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);\n `,d.textContent=`${Math.round(a.value)}%`,c.appendChild(d)),l.appendChild(c)}(),t.classList.add("v-progress-container"),"boolean"!=typeof e.indeterminate&&e.indeterminate&&vue.watch(e.indeterminate,t=>{u&&(t?(u.classList.add("v-progress--indeterminate"),u.style.width="30%",u.style.animation="v-progress-indeterminate 1.5s infinite linear"):(u.classList.remove("v-progress--indeterminate"),u.style.animation=e.animated?"v-progress-stripes 1s linear infinite":"",p()))}),f):()=>{}}}}function sleep(e){return new Promise(t=>setTimeout(t,e))}function usePullRefresh(e){const{handler:t,distance:n=60,maxDistance:r=100,disabled:o=!1,successDuration:i=500,errorDuration:s=1e3}=e,a=vue.ref("idle"),l=vue.ref(0),c=vue.ref(!1),u=vue.ref(null);let d=0,p=0;const m=()=>vue.unref(n),f=()=>vue.unref(o);function v(){a.value="idle",l.value=0,c.value=!1}function h(){return __async(this,null,function*(){a.value="loading";try{yield t(),a.value="success",yield sleep(vue.unref(i))}catch(e){a.value="error",yield sleep(vue.unref(s))}finally{v()}})}return vue.onUnmounted(()=>{v()}),{state:a,distance:l,isPulling:c,events:{touchstart:function(e){if(f()||"loading"===a.value)return;const t=u.value;t&&t.scrollTop>0||(c.value=!0,d=e.touches[0].clientY,p=d,a.value="idle")},touchmove:function(e){if(!c.value||f()||"loading"===a.value)return;p=e.touches[0].clientY;const t=p-d;if(t<=0)return l.value=0,void(a.value="idle");e.preventDefault();const n=Math.min(.5*t,vue.unref(r));l.value=n;const o=n/m();a.value=o>=1?"ready":"pulling"},touchend:function(){c.value&&!f()&&(c.value=!1,"ready"===a.value&&l.value>=m()?h():(l.value=0,v()))}},containerRef:u,refresh:h}}function useResize(e={}){const{debounce:t=0,box:n="content-box",onResize:r}=e,o=vue.ref(0),i=vue.ref(0);let s=null,a=null,l=null;function c(e){const n=vue.unref(t);function s(){o.value=e.contentRect.width,i.value=e.contentRect.height,null==r||r({width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect})}n&&n>0?(a&&clearTimeout(a),a=setTimeout(s,n)):s()}function u(){s&&(s.disconnect(),s=null),l&&(l.remove(),l=null),a&&(clearTimeout(a),a=null)}return vue.onUnmounted(()=>{u()}),{width:vue.readonly(o),height:vue.readonly(i),bind:function(e){if(!isBrowser())return()=>{};u();const t=e.getBoundingClientRect();if(o.value=t.width,i.value=t.height,supportsResizeObserver())isBrowser()&&supportsResizeObserver()&&(s=new ResizeObserver(e=>{for(const t of e)c(t)})),null==s||s.observe(e,{box:n});else{l=document.createElement("iframe"),l.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(l);const t=l.contentWindow;t&&t.addEventListener("resize",()=>{c({contentRect:e.getBoundingClientRect()})})}return u},stop:u}}function createRippleElement(e,t,n,r,o,i,s){const a=n.getBoundingClientRect(),l=2*Math.max(a.width,a.height),c=document.createElement("span");return c.className="v-ripple__wave",c.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${r};\n width: ${l}px;\n height: ${l}px;\n left: ${e-l/2}px;\n top: ${t-l/2}px;\n transform: scale(${i});\n opacity: 0.3;\n z-index: 0;\n `,"function"==typeof c.animate?c.animate([{transform:`scale(${i})`,opacity:.3},{transform:`scale(${s})`,opacity:0}],{duration:o,easing:"ease-out",fill:"forwards"}).onfinish=()=>{c.remove()}:(c.style.transition=`transform ${o}ms ease-out, opacity ${o}ms ease-out`,c.style.transform=`scale(${s})`,c.style.opacity="0",setTimeout(()=>c.remove(),o)),c}function useRipple(e={}){const{color:t="currentColor",duration:n=600,disabled:r=!1,initialScale:o=0,finalScale:i=2}=e;let s=null,a=null;function l(e){if(vue.unref(r))return;const a=vue.unref(t),l=vue.unref(n),c=createRippleElement(e.clientX-s.getBoundingClientRect().left,e.clientY-s.getBoundingClientRect().top,s,a,l,o,i);s.appendChild(c)}function c(){s&&a&&(s.removeEventListener("click",a),s.classList.remove("v-ripple")),s=null,a=null}return vue.onUnmounted(()=>{c()}),{bind:function(e){if(!isBrowser())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=l,e.addEventListener("click",a),c},trigger:function(e){var a,l;if(!s||vue.unref(r))return;const c=s.getBoundingClientRect(),u=createRippleElement(null!=(a=null==e?void 0:e.x)?a:c.width/2,null!=(l=null==e?void 0:e.y)?l:c.height/2,s,vue.unref(t),vue.unref(n),o,i);s.appendChild(u)}}}function getAngle(e){if(e.length<2)return 0;const t=e[1].clientX-e[0].clientX,n=e[1].clientY-e[0].clientY;return Math.atan2(n,t)*(180/Math.PI)}function getCenter(e){return 0===e.length?{x:0,y:0}:e.length<2?{x:e[0].clientX,y:e[0].clientY}:{x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}}function useRotateGesture(e={}){const{onStart:t,onRotate:n,onEnd:r,enableTransform:o=!1}=e,i=vue.ref(!1),s=vue.ref(0);let a=null,l=0,c=0,u=0,d="",p={};function m(e,t=!1,n=!1){const r=getCenter(e.touches),o=c*(Math.PI/180);return{angle:c,radians:o,rotation:c-l,centerX:r.x,centerY:r.y,isRotating:i.value,isFirst:t,isFinal:n}}function f(e){const t=e;if(2===t.touches.length){if(l=getAngle(t.touches),c=l,i.value=!1,o&&a){const e=getComputedStyle(a).transform,t=new DOMMatrix(e);u=Math.atan2(t.b,t.a)*(180/Math.PI),d=a.style.transition,a.style.transition="none"}e.preventDefault()}}function v(e){const r=e;if(2!==r.touches.length)return;c=getAngle(r.touches),e.preventDefault();const d=i.value;i.value=!0,s.value=c;const p=m(r,!d);if(d||null==t||t(p),o&&a){const e=c-l;a.style.transform=`rotate(${u+e}deg)`}null==n||n(p)}function h(e){if(!i.value)return;o&&a&&(a.style.transition=d);const t=m({touches:{length:0,item:()=>null}},!1,!0);null==r||r(t),i.value=!1,l=0,c=0}function g(){a&&(Object.entries(p).forEach(([e,t])=>{null==a||a.removeEventListener(e,t)}),a.classList.remove("v-rotate-gesture")),a=null,p={}}return vue.onUnmounted(()=>{g()}),{isRotating:i,angle:s,bind:function(e){return isBrowser()?(g(),a=e,p={touchstart:f,touchmove:v,touchend:h,touchcancel:h},e.addEventListener("touchstart",p.touchstart,{passive:!1}),e.addEventListener("touchmove",p.touchmove,{passive:!1}),e.addEventListener("touchend",p.touchend),e.addEventListener("touchcancel",p.touchcancel),e.classList.add("v-rotate-gesture"),g):()=>{}}}}const DEFAULT_ALLOWED_TAGS$1=["b","i","u","strong","em","br","p","span","div"],DEFAULT_ALLOWED_ATTRIBUTES$1=["title","alt","href","src"],DANGEROUS_TAGS$1=["script","iframe","object","embed","form","input","style","link","meta","base"],DANGEROUS_ATTRIBUTES$1=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function useSanitize(e={}){const{allowedTags:t=DEFAULT_ALLOWED_TAGS$1,allowedAttributes:n=DEFAULT_ALLOWED_ATTRIBUTES$1,allowDataUrls:r=!1,allowStyles:o=!1,allowClass:i=!1,allowId:s=!1,handler:a}=e;function l(e){var l;if(a)return a(e);if(!isBrowser())return e;const c=document.createElement("div");c.innerHTML=e;for(const e of DANGEROUS_TAGS$1){const t=c.getElementsByTagName(e);for(;t.length>0;)null==(l=t[0].parentNode)||l.removeChild(t[0])}const u=e=>{var a;const l=e.tagName.toLowerCase();if(!t.includes(l)){const t=document.createTextNode(e.textContent||"");return void(null==(a=e.parentNode)||a.replaceChild(t,e))}for(const t of DANGEROUS_ATTRIBUTES$1)e.removeAttribute(t);const c=e.getAttribute("href");if(c&&c.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!r){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 r=n.includes(t.name.toLowerCase()),a="class"===t.name&&i,l="id"===t.name&&s,c="style"===t.name&&o;r||a||l||c||e.removeAttribute(t.name)}for(const t of Array.from(e.children))u(t)};for(const e of Array.from(c.children))u(e);return c.innerHTML}return vue.onUnmounted(()=>{}),{sanitize:l,bind:function(e){if(!isBrowser())return()=>{};const t=e.innerHTML;return t&&(e.innerHTML=l(t)),()=>{}}}}function getScrollInfoFromContainer(e,t,n){let r=0,o=0,i=0,s=0;if(e===window)r=window.scrollX||document.documentElement.scrollLeft,o=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,s=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;r=t.scrollLeft,o=t.scrollTop,i=t.scrollWidth-t.clientWidth,s=t.scrollHeight-t.clientHeight}return{scrollLeft:r,scrollTop:o,scrollLeftMax:i,scrollTopMax:s,progressX:i>0?r/i:0,progressY:s>0?o/s:0,directionX:r!==t?r>t?1:-1:0,directionY:o!==n?o>n?1:-1:0}}function useScroll(e={}){const{throttle:t=0,passive:n=!0}=e,r=vue.ref(0),o=vue.ref(0),i=vue.ref(0),s=vue.ref(0),a=vue.ref(0),l=vue.ref(0),c=vue.ref(!1);let u=null,d=0,p=0,m=null,f=null,v=null;const h=vue.computed(()=>({scrollLeft:r.value,scrollTop:o.value,scrollLeftMax:0,scrollTopMax:0,progressX:i.value,progressY:s.value,directionX:a.value,directionY:l.value}));function g(e){if(!u)return;const n=vue.unref(t);function m(){const e=getScrollInfoFromContainer(u,d,p);r.value=e.scrollLeft,o.value=e.scrollTop,i.value=e.progressX,s.value=e.progressY,a.value=e.directionX,l.value=e.directionY,d=e.scrollLeft,p=e.scrollTop,c.value=!0,v&&clearTimeout(v),v=setTimeout(()=>{c.value=!1},150)}n&&n>0?f||(f=setTimeout(()=>{m(),f=null},n)):m()}function y(){u&&m&&u.removeEventListener("scroll",m),f&&(clearTimeout(f),f=null),v&&(clearTimeout(v),v=null),u=null,m=null}return vue.onUnmounted(()=>{y()}),{scrollLeft:vue.readonly(r),scrollTop:vue.readonly(o),progressX:vue.readonly(i),progressY:vue.readonly(s),directionX:vue.readonly(a),directionY:vue.readonly(l),isScrolling:vue.readonly(c),info:vue.readonly(h),bind:function(e){if(!isBrowser())return()=>{};y(),u=e||window;const t=getScrollInfoFromContainer(u,0,0);return r.value=t.scrollLeft,o.value=t.scrollTop,i.value=t.progressX,s.value=t.progressY,d=t.scrollLeft,p=t.scrollTop,m=g,u.addEventListener("scroll",m,{passive:n}),y},stop:y,scrollTo:function(e){if(!u)return;const{top:t,left:n,behavior:r="smooth"}=e;if(u===window)window.scrollTo({top:t,left:n,behavior:r});else{const e=u;void 0!==t&&(e.scrollTop=t),void 0!==n&&(e.scrollLeft=n)}}}}function ensureStyles$1(){if(!isBrowser())return;const e="v-skeleton-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes skeleton-wave {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n @keyframes skeleton-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ",document.head.appendChild(t)}function createSkeletonElement(e){const t=document.createElement("div");t.className=`v-skeleton ${e.class||""}`;const n="number"==typeof e.width?`${e.width}px`:e.width||"100%",r="number"==typeof e.height?`${e.height}px`:e.height||"1em",o="number"==typeof e.radius?`${e.radius}px`:e.radius||"4px";let i="";return i="wave"===e.animation?`\n background: linear-gradient(90deg, ${e.color||"#e8e8e8"} 25%, ${e.animationColor||"#f0f0f0"} 50%, ${e.color||"#e8e8e8"} 75%);\n background-size: 200% 100%;\n animation: skeleton-wave 1.5s ease-in-out infinite;\n `:"pulse"===e.animation?`\n background: ${e.color||"#e8e8e8"};\n animation: skeleton-pulse 1.5s ease-in-out infinite;\n `:`background: ${e.color||"#e8e8e8"};`,t.style.cssText=`\n width: ${n};\n height: ${r};\n border-radius: ${o};\n ${i}\n `,t}function useSkeleton(e={}){var t;const n=vue.ref(null==(t=vue.unref(e.loading))||t);let r=null,o=null,i="";function s(){var t,s,a;r&&(n.value?(i=r.style.display||getComputedStyle(r).display,r.style.display="none",o||(o=createSkeletonElement(__spreadProps(__spreadValues({},e),{width:null!=(t=e.width)?t:r.offsetWidth,height:null!=(s=e.height)?s:r.offsetHeight}))),o.parentNode||null==(a=r.parentNode)||a.insertBefore(o,r.nextSibling)):(r.style.display=i,o&&o.parentNode&&o.parentNode.removeChild(o)))}function a(){o&&o.parentNode&&o.parentNode.removeChild(o),r&&(r.style.display=i,r.classList.remove("v-skeleton-container")),o=null,r=null}return vue.onUnmounted(()=>{a()}),{isLoading:n,show:function(){n.value=!0,s()},hide:function(){n.value=!1,s()},toggle:function(){n.value=!n.value,s()},bind:function(t){return isBrowser()?(ensureStyles$1(),a(),r=t,t.classList.add("v-skeleton-container"),n.value&&s(),e.loading&&"boolean"!=typeof e.loading&&vue.watch(e.loading,()=>{var t;n.value=null!=(t=vue.unref(e.loading))&&t,s()}),a):()=>{}}}}function useSticky(e={}){const{offsetTop:t=0,onStick:n,disabled:r=!1}=e,o=vue.ref(!1);let i=null,s=null,a=null,l=null,c=null;function u(){var e;if(!i||vue.unref(r))return;const a=(s===window?document.documentElement:s).getBoundingClientRect(),u=i.getBoundingClientRect(),d=vue.unref(t),p=u.top<=d&&a.top<=d;p!==o.value&&(o.value=p,p?(l||(l=document.createElement("div"),l.style.width=`${u.width}px`,l.style.height=`${u.height}px`,null==(e=i.parentNode)||e.insertBefore(l,i)),i.style.position="fixed",i.style.top=`${d}px`,i.style.width=`${u.width}px`,i.classList.add("v-sticky--active")):(l&&(l.remove(),l=null),c&&(i.style.position=c.position,i.style.top=c.top,i.style.width=c.width),i.classList.remove("v-sticky--active")),null==n||n(p))}function d(){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")),l&&(l.remove(),l=null),s=null,a=null,i=null,o.value=!1}return vue.onUnmounted(()=>{d()}),{isSticky:vue.readonly(o),bind:function(e){return isBrowser()?(d(),i=e,c={position:e.style.position,top:e.style.top,width:e.style.width},e.classList.add("v-sticky"),s=getScrollParent$2(e),a=u,s.addEventListener("scroll",a,{passive:!0}),u(),d):()=>{}},stop:d}}const DEFAULT_DIRECTIONS=["left","right","up","down"];function getSwipeDirection(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}}function useSwipe(e={}){const{handler:t,threshold:n=30,maxTime:r=500,directions:o=DEFAULT_DIRECTIONS,preventScrollOnSwipe:i=!0,mouse:s=!0,onLeft:a,onRight:l,onUp:c,onDown:u}=e,d=vue.ref(null),p=vue.ref(0),m=vue.ref(0),f=vue.ref(!1);let v=null,h=0,g=0,y=0;function b(e,t){h=e,g=t,y=Date.now(),f.value=!0,d.value=null,p.value=0,m.value=0}function _(e,s,b){if(!f.value)return;f.value=!1;!function(e,s,f,h){var g;const y=vue.unref(n);if(f>vue.unref(r))return;if(Math.max(Math.abs(e),Math.abs(s))<y)return;const b=getSwipeDirection(e,s,o);if(!b)return;d.value=b,p.value=e,m.value=s,i&&h.cancelable&&h.preventDefault(),null==t||t(b,h);const _={left:a,right:l,up:c,down:u};null==(g=_[b])||g.call(_),null==v||v.dispatchEvent(new CustomEvent("swipe",{detail:{direction:b,deltaX:e,deltaY:s,deltaTime:f}}))}(e-h,s-g,Date.now()-y,b)}function w(e){b(e.touches[0].clientX,e.touches[0].clientY)}function x(e){f.value&&i&&e.preventDefault()}function E(e){const t=e.changedTouches[0];_(t.clientX,t.clientY,e)}function S(e){b(e.clientX,e.clientY)}function C(e){_(e.clientX,e.clientY,e)}function T(e){f.value&&_(e.clientX,e.clientY,e)}function L(){v&&(v.removeEventListener("touchstart",w),v.removeEventListener("touchmove",x),v.removeEventListener("touchend",E),v.removeEventListener("touchcancel",E),vue.unref(s)&&(v.removeEventListener("mousedown",S),v.removeEventListener("mouseup",C),v.removeEventListener("mouseleave",T)),v=null)}return vue.onUnmounted(()=>{L()}),{direction:vue.readonly(d),lengthX:vue.readonly(p),lengthY:vue.readonly(m),isSwiping:vue.readonly(f),bind:function(e){return isBrowser()?(L(),v=e,e.style.touchAction="none",e.style.userSelect="none",e.addEventListener("touchstart",w,{passive:!0}),e.addEventListener("touchmove",x,{passive:!1}),e.addEventListener("touchend",E),e.addEventListener("touchcancel",E),vue.unref(s)&&(e.addEventListener("mousedown",S),e.addEventListener("mouseup",C),e.addEventListener("mouseleave",T)),L):()=>{}}}}function useThrottle(e){const{handler:t,wait:n=300,leading:r=!0,trailing:o=!0}=e;let i=null,s=null,a=null,l=0;const c=()=>vue.unref(r),u=()=>{s&&(t.apply(a,s),s=null,a=null)};function d(){i&&(clearTimeout(i),i=null),l=0,s=null,a=null}return vue.onUnmounted(()=>{d()}),{run:function(...e){const t=Date.now(),r=vue.unref(n);l||c()||(l=t);const d=r-(t-l);s=e,a=this,d<=0||d>r?(i&&(clearTimeout(i),i=null),l=t,u()):!i&&vue.unref(o)&&(i=setTimeout(()=>{l=c()?Date.now():0,i=null,u()},d))},cancel:d}}function throttleFn(e,t=300,n){return throttle(e,t,n)}function useTooltip(e={}){const{content:t,placement:n="top",trigger:r="hover",delay:o=0,hideDelay:i=0,arrow:s=!0,class:a,onShow:l,onHide:c,disabled:u=!1}=e,d=vue.ref(!1);let p=null,m=null,f=null,v=null;const h={};function g(){!vue.unref(u)&&t&&(v&&(clearTimeout(v),v=null),o>0?f=setTimeout(y,o):y())}function y(){var e;p&&(m||(m=function(){const e=document.createElement("div");return e.className=`v-tooltip v-tooltip--${n}${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=vue.unref(t))?e:null,function(){if(!m||!p)return;const e=p.getBoundingClientRect(),t=m.getBoundingClientRect();let r=0,o=0;switch(n){case"top":r=e.top-t.height-8,o=e.left+(e.width-t.width)/2;break;case"bottom":r=e.bottom+8,o=e.left+(e.width-t.width)/2;break;case"left":r=e.top+(e.height-t.height)/2,o=e.left-t.width-8;break;case"right":r=e.top+(e.height-t.height)/2,o=e.right+8}o<0&&(o=8),o+t.width>window.innerWidth&&(o=window.innerWidth-t.width-8),r<0&&(r=8),r+t.height>window.innerHeight&&(r=window.innerHeight-t.height-8),m.style.top=`${r+window.scrollY}px`,m.style.left=`${o+window.scrollX}px`}(),m.style.opacity="1",d.value=!0,null==l||l())}function b(){f&&(clearTimeout(f),f=null),i>0?v=setTimeout(_,i):_()}function _(){m&&(m.style.opacity="0"),d.value=!1,null==c||c()}function w(){d.value?b():g()}function x(){p&&Object.entries(h).forEach(([e,t])=>{p.removeEventListener(e,t)}),m&&(m.remove(),m=null),f&&(clearTimeout(f),f=null),v&&(clearTimeout(v),v=null),p=null,d.value=!1}return vue.onUnmounted(()=>{x()}),{isVisible:vue.readonly(d),show:g,hide:b,toggle:w,bind:function(e){return isBrowser()?(x(),p=e,"hover"===r?(h.mouseenter=g,h.mouseleave=b,e.addEventListener("mouseenter",h.mouseenter),e.addEventListener("mouseleave",h.mouseleave)):"click"===r?(h.click=w,e.addEventListener("click",h.click)):"focus"===r&&(h.focus=g,h.blur=b,e.addEventListener("focus",h.focus),e.addEventListener("blur",h.blur)),x):()=>{}}}}function useTouch(e={}){const{onSwipe:t,onSwipeLeft:n,onSwipeRight:r,onSwipeUp:o,onSwipeDown:i,onPinch:s,onRotate:a,onTap:l,onLongPress:c,swipeThreshold:u=30,longPressDuration:d=500,tapDuration:p=250,disabled:m=!1}=e,f=vue.ref(null);let v=null,h=0,g=0,y=0,b=null,_=0,w=0;function x(e){let t=0,n=0;for(let r=0;r<e.length;r++)t+=e[r].clientX,n+=e[r].clientY;return{x:t/e.length,y:n/e.length}}function E(e,t){const n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(n*n+r*r)}function S(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function C(e){vue.unref(m)||(y=Date.now(),f.value=null,1===e.touches.length?(h=e.touches[0].clientX,g=e.touches[0].clientY,c&&(b=setTimeout(()=>{f.value="longPress",c({type:"longPress",center:{x:h,y:g},event:e})},d))):2===e.touches.length&&(_=E(e.touches[0],e.touches[1]),w=S(e.touches[0],e.touches[1])))}function T(e){if(!vue.unref(m)&&(b&&(clearTimeout(b),b=null),2===e.touches.length&&(s||a))){const t=E(e.touches[0],e.touches[1]),n=S(e.touches[0],e.touches[1]);if(s&&_>0){const n=t/_;f.value="pinch",s({type:"pinch",scale:n,center:x(e.touches),event:e})}if(a){const t=n-w;f.value="rotate",a({type:"rotate",rotation:t,center:x(e.touches),event:e})}}}function L(e){if(vue.unref(m))return;b&&(clearTimeout(b),b=null);const s=Date.now()-y;if(1===e.changedTouches.length){const a=e.changedTouches[0].clientX,c=e.changedTouches[0].clientY,d=a-h,m=c-g,v=Math.sqrt(d*d+m*m);if(v>=u){let s;f.value="swipe",s=Math.abs(d)>Math.abs(m)?d>0?"right":"left":m>0?"down":"up";const l={type:"swipe",direction:s,distance:v,angle:Math.atan2(m,d)*(180/Math.PI),center:{x:a,y:c},event:e};switch(null==t||t(l),s){case"left":null==n||n(l);break;case"right":null==r||r(l);break;case"up":null==o||o(l);break;case"down":null==i||i(l)}}else v<10&&s<p&&l&&(f.value="tap",l({type:"tap",center:{x:a,y:c},event:e}))}f.value=null}function $(){v&&(v.removeEventListener("touchstart",C),v.removeEventListener("touchmove",T),v.removeEventListener("touchend",L),v.removeEventListener("touchcancel",L)),b&&(clearTimeout(b),b=null),v=null,f.value=null}return vue.onUnmounted(()=>{$()}),{gesture:vue.readonly(f),bind:function(e){return isBrowser()?($(),v=e,e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",T,{passive:!0}),e.addEventListener("touchend",L),e.addEventListener("touchcancel",L),$):()=>{}}}}function escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function trimText(e,t="both",n){if(!e)return"";const r=n?`[\\s${escapeRegex(n)}]`:"\\s";switch(t){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"),"")}}function useTrim(e){const{text:t,position:n="both",chars:r}=e,o=vue.ref(vue.unref(t)),i=vue.ref(""),s=vue.ref(!1);return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r)],()=>function(){const e=vue.unref(t),a=vue.unref(n),l=vue.unref(r);o.value=e,i.value=trimText(e,a,l),s.value=i.value!==e}(),{immediate:!0}),{trimmed:i,original:o,wasTrimmed:s}}function createTrimmer(e="both",t){return n=>trimText(n,e,t)}function truncateEnd(e,t,n){return e.length<=t?e:e.slice(0,t-n.length)+n}function truncateStart(e,t,n){return e.length<=t?e:n+e.slice(-(t-n.length))}function truncateMiddle(e,t,n){if(e.length<=t)return e;const r=t-n.length,o=Math.ceil(r/2),i=Math.floor(r/2);return e.slice(0,o)+n+e.slice(-i)}function useTruncate(e){const{text:t,length:n=100,position:r="end",omission:o="..."}=e,i=vue.ref(""),s=vue.ref(!1),a=vue.ref(0);function l(e,t,i){const s=null!=t?t:vue.unref(n),a=null!=i?i:vue.unref(r);if(e.length<=s)return e;switch(a){case"start":return truncateStart(e,s,o);case"middle":return truncateMiddle(e,s,o);default:return truncateEnd(e,s,o)}}function c(){const e=vue.unref(t),r=vue.unref(n);a.value=e.length,s.value=e.length>r,i.value=l(e)}return vue.watch(()=>vue.unref(t),c,{immediate:!0}),vue.watch(()=>vue.unref(n),c),vue.watch(()=>vue.unref(r),c),{truncated:vue.readonly(i),isTruncated:vue.readonly(s),originalLength:vue.readonly(a),truncate:l}}function ensureStyles(){if(!isBrowser())return;const e="v-typewriter-styles";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent="\n @keyframes v-typewriter-blink {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n }\n .v-typewriter__cursor {\n display: inline-block;\n margin-left: 1px;\n }\n ",document.head.appendChild(t)}function useTypewriter(e){const t=vue.ref(""),n=vue.ref(!1),r=vue.ref(!1);let o=null,i=null,s=null,a=0;function l(){o&&(o.textContent=t.value,i&&o.appendChild(i))}function c(){var o,i;const d=vue.unref(e.text);if(a>=d.length)return n.value=!1,null==(o=e.onComplete)||o.call(e),void(e.loop&&(s=setTimeout(()=>{!function(){function n(){if(0===t.value.length)return r.value=!1,void(e.loop&&(s=setTimeout(u,e.delay||0)));t.value=t.value.slice(0,-1),l(),s=setTimeout(n,e.deleteSpeed||30)}r.value=!0,n()}()},e.deleteDelay||1500)));const p=d[a];t.value+=p,a++,l(),null==(i=e.onType)||i.call(e,p,a-1),s=setTimeout(c,e.speed||50)}function u(){var o;n.value||r.value||(n.value=!0,a=0,t.value="",null==(o=e.onStart)||o.call(e),s=setTimeout(c,e.delay||0))}function d(){s&&(clearTimeout(s),s=null),n.value=!1,r.value=!1}function p(){d(),t.value="",a=0,l()}function m(){d(),o&&o.classList.remove("v-typewriter"),o=null,i=null}return vue.onUnmounted(()=>{m()}),{displayedText:t,isTyping:n,isDeleting:r,start:u,stop:d,reset:p,bind:function(t){return isBrowser()?(ensureStyles(),m(),o=t,i=function(){if(!1===e.cursor)return null;const t=document.createElement("span");return t.className="v-typewriter__cursor",t.textContent=e.cursor||"|",!1!==e.cursorBlink&&(t.style.animation="v-typewriter-blink 0.7s infinite"),t}(),t.classList.add("v-typewriter"),"string"!=typeof e.text&&vue.watch(e.text,()=>{p(),u()}),u(),m):()=>{}}}}function uppercaseText(e,t=!1){return e?t?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function useUppercase(e){const{text:t,first:n=!1}=e,r=vue.ref(vue.unref(t)),o=vue.ref("");return vue.watch(()=>[vue.unref(t),vue.unref(n)],()=>function(){const e=vue.unref(t),i=vue.unref(n);r.value=e,o.value=uppercaseText(e,i)}(),{immediate:!0}),{transformed:o,original:r}}function createUppercaser(e=!1){return t=>uppercaseText(t,e)}function useVirtualList(e){const{items:t,itemSize:n=50,height:r=400,overscan:o=3}=e,i=vue.ref(null),s=vue.ref(0),a=vue.ref(0),l=vue.ref(0),c=()=>vue.unref(t),u=()=>vue.unref(n),d=()=>vue.unref(r),p=vue.computed(()=>{const e=c(),t=u();if("function"==typeof t){let n=0;for(let r=0;r<e.length;r++)n+=t(r);return n}return t*e.length});function m(){const e=c(),t=u(),n=d(),r=vue.unref(o),i=s.value;let a=0,l=0,p=0;if("function"==typeof t){let o=0;for(let n=0;n<e.length;n++){const e=t(n);if(o+e>i){a=n,p=o;break}o+=e}for(l=a,o=p;l<e.length&&o<i+n;)o+=t(l),l++;a=Math.max(0,a-r),l=Math.min(e.length,l+r),o=0;for(let e=0;e<a;e++)o+=t(e);p=o}else a=Math.max(0,Math.floor(i/t)-r),l=Math.min(e.length,Math.ceil((i+n)/t)+r),p=a*t;return{start:a,end:l,offsetY:p}}const f=vue.computed(()=>{const e=c(),t=u(),{start:n,end:r,offsetY:o}=m();a.value=n,l.value=r;const i=[];let s=o;for(let o=n;o<r;o++){const n=e[o];if(void 0!==n){const e="function"==typeof t?t(o):t;i.push({item:n,index:o,style:{position:"absolute",top:`${s}px`,height:`${e}px`,width:"100%"}}),s+=e}}return i}),v=vue.computed(()=>({height:`${d()}px`,overflow:"auto",position:"relative"}));function h(e){const t=e.target;s.value=t.scrollTop}return vue.onMounted(()=>{i.value&&i.value.addEventListener("scroll",h,{passive:!0})}),vue.onUnmounted(()=>{i.value&&i.value.removeEventListener("scroll",h)}),{visibleItems:f,totalHeight:p,scrollTop:s,startIndex:a,endIndex:l,scrollToIndex:function(e){if(!i.value)return;const t=u(),n=c();if("function"==typeof t){let r=0;for(let o=0;o<Math.min(e,n.length);o++)r+=t(o);i.value.scrollTop=r}else i.value.scrollTop=e*t},scrollTo:function(e){i.value&&(i.value.scrollTop=e)},containerRef:i,listStyle:v}}function useVisible(e={}){const{initial:t=!0,useHidden:n=!1,onChange:r}=e,o=vue.ref(vue.unref(t));let i=null,s="",a="";function l(e){i&&(e?(i.classList.remove("v-hidden"),i.classList.add("v-visible"),n?i.style.visibility=a||"visible":i.style.display=s):(i.classList.remove("v-visible"),i.classList.add("v-hidden"),n?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 vue.watch(o,(e,t)=>{e!==t&&(l(e),null==r||r(e))}),"object"==typeof t&&"value"in t&&vue.watch(t,e=>{o.value=e}),vue.onUnmounted(()=>{c()}),{visible:o,show:function(){o.value=!0},hide:function(){o.value=!1},toggle:function(){o.value=!o.value},bind:function(e){return isBrowser()?(c(),i=e,s=e.style.display,a=e.style.visibility,l(o.value),c):()=>{}}}}function createWatermarkCanvas(e){const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("[Directix] useWatermark: Could not get canvas context");const{content:r,width:o,height:i,fontSize:s,fontFamily:a,fontWeight:l,color:c,rotate:u}=e;t.width=o,t.height=i,n.font=`${l} ${s}px ${a}`,n.fillStyle=c,n.textAlign="center",n.textBaseline="middle",n.translate(o/2,i/2),n.rotate(u*Math.PI/180);const d=Array.isArray(r)?r:[r],p=1.5*s,m=-(d.length-1)*p/2;return d.forEach((e,t)=>{n.fillText(e,0,m+t*p)}),t}function useWatermark(e){const{content:t,width:n=300,height:r=200,rotate:o=-22,fontSize:i=16,fontFamily:s="sans-serif",fontWeight:a="normal",color:l="rgba(128, 128, 128, 0.15)",gap:c=[100,100],zIndex:u=9999,disabled:d=!1}=e,p=vue.ref(null),m=vue.ref(""),f=vue.ref(vue.unref(d));function v(){const e=vue.unref(t),c=vue.unref(n),u=vue.unref(r),d=vue.unref(o),f=vue.unref(i),v=vue.unref(s),h=vue.unref(a),g=vue.unref(l);p.value=createWatermarkCanvas({content:e,width:c,height:u,fontSize:f,fontFamily:v,fontWeight:h,color:g,rotate:d}),m.value=p.value.toDataURL()}const h=vue.ref({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",zIndex:vue.unref(u),backgroundImage:"",backgroundRepeat:"repeat",backgroundPosition:"0 0",backgroundSize:""});function g(){const e=vue.unref(c),t=vue.unref(u),o=Array.isArray(e)?e:[e,e],i=vue.unref(n),s=vue.unref(r);h.value=__spreadProps(__spreadValues({},h.value),{zIndex:t,backgroundImage:`url("${m.value}")`,backgroundPosition:`${o[0]/2}px ${o[1]/2}px`,backgroundSize:`${i+o[0]}px ${s+o[1]}px`})}return vue.watch(()=>[vue.unref(t),vue.unref(n),vue.unref(r),vue.unref(o),vue.unref(i),vue.unref(s),vue.unref(a),vue.unref(l),vue.unref(c),vue.unref(u)],()=>{v(),g()},{immediate:!0}),vue.watch(f,e=>{h.value.display=e?"none":"block"}),vue.unref(d)&&(h.value.display="none"),vue.onUnmounted(()=>{}),{canvas:p,dataUrl:m,style:h,disabled:f,update:function(t){Object.assign(e,t),v(),g()},enable:function(){f.value=!1},disable:function(){f.value=!0}}}function createWatermarkUrl(e,t={}){var n,r,o,i,s;return createWatermarkCanvas({content:e,width:null!=(n=t.width)?n:300,height:null!=(r=t.height)?r:200,fontSize:null!=(o=t.fontSize)?o:16,fontFamily:"sans-serif",fontWeight:"normal",color:null!=(i=t.color)?i:"rgba(128, 128, 128, 0.15)",rotate:null!=(s=t.rotate)?s:-22}).toDataURL()}const DEFAULT_REGISTRY_URL="https://directix.dev/plugins.json";class PluginRegistry{constructor(e){__publicField(this,"registryUrl"),__publicField(this,"cache",null),__publicField(this,"cacheTime",0),__publicField(this,"cacheTTL",18e5),this.registryUrl=e||DEFAULT_REGISTRY_URL}fetchData(){return __async(this,null,function*(){if(this.cache&&Date.now()-this.cacheTime<this.cacheTTL)return this.cache;try{const e=yield fetch(this.registryUrl);if(!e.ok)throw new Error(`Failed to fetch registry: ${e.status}`);const t=yield e.json();return this.cache=t,this.cacheTime=Date.now(),t}catch(e){return console.warn("[Directix] Failed to fetch plugin registry, using empty cache"),{version:1,updated:(new Date).toISOString().split("T")[0],plugins:[]}}})}setData(e){this.cache=e,this.cacheTime=Date.now()}getAll(){return __async(this,null,function*(){return(yield this.fetchData()).plugins})}getByName(e){return __async(this,null,function*(){return(yield this.getAll()).find(t=>t.name===e||t.package===e)})}search(e){return __async(this,null,function*(){const t=yield this.getAll(),n=e.toLowerCase();return t.filter(e=>e.name.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)||e.keywords.some(e=>e.toLowerCase().includes(n))||e.author.toLowerCase().includes(n))})}getByCategory(e){return __async(this,null,function*(){return(yield this.getAll()).filter(t=>t.category===e)})}getMeta(){return __async(this,null,function*(){const e=yield this.fetchData();return{version:e.version,updated:e.updated,count:e.plugins.length}})}install(e,t){return __async(this,null,function*(){const n=yield this.getByName(e);if(!n)throw new Error(`[Directix] Plugin "${e}" not found in registry`);try{const e=yield import(n.package),r=e.default||e;if("function"!=typeof r.install)throw new TypeError(`[Directix] Invalid plugin format: ${n.package}`);yield t.register(r)}catch(t){throw new Error(`[Directix] Failed to install plugin "${e}". Please install the package "${n.package}" first: npm install ${n.package}`)}})}}let globalRegistry=null;function getPluginRegistry(e){return globalRegistry||(globalRegistry=new PluginRegistry(e)),globalRegistry}function resetPluginRegistry(){globalRegistry=null}class PluginManager{constructor(e={}){__publicField(this,"plugins",new Map),__publicField(this,"hooks",new Map),__publicField(this,"directives",new Map),__publicField(this,"composables",new Map),__publicField(this,"extensions",new Map),__publicField(this,"app",null),__publicField(this,"config"),this.config=__spreadValues({debug:!1,autoLoadOfficial:!1},e)}getRegistry(){return getPluginRegistry(this.config.registryUrl)}setApp(e){this.app=e}register(e){return __async(this,null,function*(){var t;if(this.plugins.has(e.meta.name))return void console.warn(`[Directix] Plugin "${e.meta.name}" is already registered`);if(null==(t=e.dependencies)?void 0:t.length)for(const t of e.dependencies)if(!this.plugins.has(t))throw new Error(`[Directix] Plugin "${e.meta.name}" requires "${t}" to be installed first`);const n=this.createContext(e);yield this.fireHooks("beforeInstall",e,n),yield e.install(n),this.plugins.set(e.meta.name,e),yield this.fireHooks("afterInstall",e,n),this.config.debug&&console.info(`[Directix] Plugin "${e.meta.name}" v${e.meta.version} installed`)})}unregister(e){return __async(this,null,function*(){const t=this.plugins.get(e);if(!t)return void console.warn(`[Directix] Plugin "${e}" is not registered`);const n=this.createContext(t);yield this.fireHooks("beforeUninstall",t,n),t.uninstall&&(yield t.uninstall(n)),this.plugins.delete(e),yield this.fireHooks("afterUninstall",t,n),this.config.debug&&console.info(`[Directix] Plugin "${e}" uninstalled`)})}has(e){return this.plugins.has(e)}get(e){return this.plugins.get(e)}getAll(){return Array.from(this.plugins.values())}onHook(e,t){this.hooks.has(e)||this.hooks.set(e,[]),this.hooks.get(e).push(t)}offHook(e,t){const n=this.hooks.get(e);if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}extendDirective(e){const{target:t}=e;this.extensions.has(t)||this.extensions.set(t,[]),this.extensions.get(t).push(e)}getExtensions(e){return this.extensions.get(e)||[]}getDirective(e){return this.directives.get(e)}getComposable(e){return this.composables.get(e)}createContext(e){return{app:this.app,registerDirective:(e,t)=>{this.directives.set(e,t),this.app&&this.app.directive(e,t)},registerComposable:(e,t)=>{this.composables.set(e,t)},getDirective:e=>this.directives.get(e),warn:t=>console.warn(`[Directix:${e.meta.name}] ${t}`),error:t=>console.error(`[Directix:${e.meta.name}] ${t}`),meta:e.meta}}fireHooks(e,t,n){return __async(this,null,function*(){const r=this.hooks.get(e)||[];for(const e of r)yield e(t,n)})}}let globalManager=null;function getPluginManager(e){return globalManager||(globalManager=new PluginManager(e)),globalManager}function resetPluginManager(){globalManager=null}function definePlugin(e){return e}function createDirectiveTemplate(e){const{name:t,ssr:n=!0,defaults:r,onMount:o,onUpdate:i,onUnmount:s,validate:a,normalize:l}=e;return defineDirective({name:t,ssr:n,defaults:r,mounted(e,n){const r=l?l(n):n.value;if(a){const e=a(r);if(e)return void console.warn(`[Directix] v-${t}: ${e}`)}o(e,r,n),e.__directix_state={},e.__directix_options=r},updated(e,n){const r=l?l(n):n.value;if(a){const e=a(r);if(e)return void console.warn(`[Directix] v-${t}: ${e}`)}e.__directix_options=r,null==i||i(e,r,n)},unmounted(e){const t=e.__directix_state;t&&(s(e,t),delete e.__directix_state,delete e.__directix_options)}})}function createEventDirective(e){const{name:t,eventName:n,handler:r,listenerOptions:o,ssr:i=!0}=e;return defineDirective({name:t,ssr:i,mounted(e,t){const i=n=>r(e,t,n);e.addEventListener(n,i,o),e.__directix_event_handler=i},unmounted(e){const t=e.__directix_event_handler;t&&(e.removeEventListener(n,t,o),delete e.__directix_event_handler)}})}function createStyleDirective(e){const{name:t,cssProperty:n,defaultUnit:r="",validate:o,ssr:i=!0}=e;return defineDirective({name:t,ssr:i,mounted(e,i){const s=i.value;if(o&&!o(s))return void console.warn(`[Directix] v-${t}: Invalid value "${s}"`);const a="number"==typeof s&&r?r:"";e.style.setProperty(n,`${s}${a}`)},updated(e,i){const s=i.value;if(o&&!o(s))return void console.warn(`[Directix] v-${t}: Invalid value "${s}"`);const a="number"==typeof s&&r?r:"";e.style.setProperty(n,`${s}${a}`)},unmounted(e){e.style.removeProperty(n)}})}function applyAriaAttributes(e,t){if(clearAriaAttributes(e),t.role&&e.setAttribute("role",t.role),void 0!==t.ariaExpanded&&e.setAttribute("aria-expanded",String(t.ariaExpanded)),void 0!==t.ariaSelected&&e.setAttribute("aria-selected",String(t.ariaSelected)),void 0!==t.ariaChecked&&e.setAttribute("aria-checked",String(t.ariaChecked)),void 0!==t.ariaDisabled&&(e.setAttribute("aria-disabled",String(t.ariaDisabled)),t.ariaDisabled&&e.setAttribute("tabindex","-1")),void 0!==t.ariaHidden&&e.setAttribute("aria-hidden",String(t.ariaHidden)),void 0!==t.ariaBusy&&e.setAttribute("aria-busy",String(t.ariaBusy)),void 0!==t.ariaPressed&&e.setAttribute("aria-pressed",String(t.ariaPressed)),void 0!==t.ariaCurrent&&e.setAttribute("aria-current","boolean"==typeof t.ariaCurrent?String(t.ariaCurrent):t.ariaCurrent),t.ariaLabel&&e.setAttribute("aria-label",t.ariaLabel),t.ariaLabelledBy&&e.setAttribute("aria-labelledby",t.ariaLabelledBy),t.ariaDescribedBy&&e.setAttribute("aria-describedby",t.ariaDescribedBy),t.ariaControls&&e.setAttribute("aria-controls",t.ariaControls),t.ariaOwns&&e.setAttribute("aria-owns",t.ariaOwns),void 0!==t.ariaHasPopup){const n="boolean"==typeof t.ariaHasPopup?"true":t.ariaHasPopup;e.setAttribute("aria-haspopup",n)}t.ariaAutoComplete&&e.setAttribute("aria-autocomplete",t.ariaAutoComplete),t.ariaLive&&e.setAttribute("aria-live",t.ariaLive),void 0!==t.ariaAtomic&&e.setAttribute("aria-atomic",String(t.ariaAtomic)),t.ariaRelevant&&e.setAttribute("aria-relevant",t.ariaRelevant),void 0!==t.ariaValueNow&&e.setAttribute("aria-valuenow",String(t.ariaValueNow)),void 0!==t.ariaValueMin&&e.setAttribute("aria-valuemin",String(t.ariaValueMin)),void 0!==t.ariaValueMax&&e.setAttribute("aria-valuemax",String(t.ariaValueMax)),t.ariaValueText&&e.setAttribute("aria-valuetext",t.ariaValueText),t.ariaPlaceholder&&e.setAttribute("aria-placeholder",t.ariaPlaceholder),void 0!==t.ariaRequired&&e.setAttribute("aria-required",String(t.ariaRequired)),void 0!==t.ariaReadonly&&e.setAttribute("aria-readonly",String(t.ariaReadonly)),void 0!==t.ariaModal&&e.setAttribute("aria-modal",String(t.ariaModal)),void 0!==t.tabIndex&&e.setAttribute("tabindex",String(t.tabIndex))}function clearAriaAttributes(e){Array.from(e.attributes).filter(e=>e.name.startsWith("aria-")||"role"===e.name).forEach(t=>e.removeAttribute(t.name))}function generateAriaId(e="directix-aria"){return`${e}-${Math.random().toString(36).substring(2,10)}`}let announcerElement=null,announcerId=null;function ensureAnnouncer(){return announcerElement&&document.getElementById(announcerId||"")||(announcerId="directix-sr-announcer",announcerElement=document.createElement("div"),announcerElement.id=announcerId,announcerElement.setAttribute("aria-live","polite"),announcerElement.setAttribute("aria-atomic","true"),announcerElement.setAttribute("style","position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;"),document.body.appendChild(announcerElement)),announcerElement}function announce(e,t={}){if(!isBrowser())return;const{priority:n="polite",timeout:r=1e3,clear:o=!0}=t,i=ensureAnnouncer();i.setAttribute("aria-live",n),i.textContent="",requestAnimationFrame(()=>{i.textContent=e,o&&setTimeout(()=>{i.textContent===e&&(i.textContent="")},r)})}function clearAnnouncer(){announcerElement&&(announcerElement.textContent="")}const DEFAULT_NEXT_KEYS=["ArrowDown","ArrowRight"],DEFAULT_PREV_KEYS=["ArrowUp","ArrowLeft"],DEFAULT_SELECT_KEYS=["Enter"," "],DEFAULT_CLOSE_KEYS=["Escape"],DEFAULT_HOME_KEYS=["Home"],DEFAULT_END_KEYS=["End"];function useKeyboardNavigation(e={}){const{nextKeys:t=DEFAULT_NEXT_KEYS,prevKeys:n=DEFAULT_PREV_KEYS,selectKeys:r=DEFAULT_SELECT_KEYS,closeKeys:o=DEFAULT_CLOSE_KEYS,homeKeys:i=DEFAULT_HOME_KEYS,endKeys:s=DEFAULT_END_KEYS,focusTrap:a=!1,returnFocus:l=!0,loop:c=!0,rovingTabindex:u=!1}=e,d=vue.ref(0);let p=[],m=null,f=null;function v(){return p.filter(e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"))}function h(e){const t=v();if(0===t.length)return;let n=e;n<0?n=c?t.length-1:0:n>=t.length&&(n=c?0:t.length-1);const r=t[n];r&&(r.focus(),u&&t.forEach((e,t)=>{e.setAttribute("tabindex",t===n?"0":"-1")}),d.value=n)}function g(){h(d.value+1)}function y(){h(d.value-1)}function b(){h(0)}function _(){h(v().length-1)}function w(e){var c;if(!(e.altKey||e.ctrlKey||e.metaKey)){if(a&&"Tab"===e.key){if(0===v().length)return;return e.preventDefault(),void(e.shiftKey?y():g())}t.includes(e.key)?(e.preventDefault(),g()):n.includes(e.key)?(e.preventDefault(),y()):i.includes(e.key)?(e.preventDefault(),b()):s.includes(e.key)?(e.preventDefault(),_()):r.includes(e.key)?(e.preventDefault(),null==(c=p[d.value])||c.click()):o.includes(e.key)&&(e.preventDefault(),l&&m&&m.focus())}}return vue.onUnmounted(()=>{null==f||f()}),{focusedIndex:vue.readonly(d),bind:function(e,t){return null==f||f(),p=t,m=document.activeElement,e.addEventListener("keydown",w),u&&p.length>0&&p.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1")}),p.length>0&&h(0),f=()=>{e.removeEventListener("keydown",w),p=[]},f},focusIndex:h,focusNext:g,focusPrev:y,focusFirst:b,focusLast:_}}function useFocusTrap(e,t={}){const{initialFocus:n,allowOutsideClick:r=!1,escapeDeactivates:o=!0,onActivate:i,onDeactivate:s}=t,a=vue.ref(!1);let l=null;function c(){const t=e.value;if(!t)return[];const n=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(t.querySelectorAll(n)).filter(e=>!e.hasAttribute("aria-hidden"))}function u(t){if(!a.value)return;if(o&&"Escape"===t.key)return t.preventDefault(),void p();if("Tab"!==t.key)return;const n=e.value;if(!n)return;const r=c();if(0===r.length)return;const i=r[0],s=r[r.length-1],l=document.activeElement;t.shiftKey?l!==i&&n.contains(l)||(t.preventDefault(),s.focus()):l!==s&&n.contains(l)||(t.preventDefault(),i.focus())}function d(t){a.value&&e.value&&(("boolean"!=typeof r||r)&&("function"!=typeof r||r(t))||t.preventDefault())}function p(){a.value&&(document.removeEventListener("keydown",u),document.removeEventListener("mousedown",d),document.removeEventListener("touchstart",d),l&&l.focus&&l.focus(),a.value=!1,null==s||s())}return vue.onUnmounted(()=>{p()}),{activate:function(){var t;if(!a.value){if(l=document.activeElement,n){let r=null;r="function"==typeof n?n():"string"==typeof n?(null==(t=e.value)?void 0:t.querySelector(n))||null:n,null==r||r.focus()}else{const e=c();e.length>0&&e[0].focus()}document.addEventListener("keydown",u),document.addEventListener("mousedown",d),document.addEventListener("touchstart",d),a.value=!0,null==i||i()}},deactivate:p,isActive:vue.readonly(a)}}function getAutoAriaConfig(e){const{type:t,label:n,expanded:r,disabled:o,relatedId:i}=e,s=__spreadValues({},{tooltip:{role:"tooltip",ariaHidden:void 0===r||!r},menu:{role:"menu",ariaLabel:n,ariaExpanded:r,ariaDisabled:o},dialog:{role:"dialog",ariaLabel:n,ariaModal:!0},popover:{role:"region",ariaLabel:n,ariaExpanded:r},dropdown:{role:"listbox",ariaLabel:n,ariaExpanded:r},modal:{role:"dialog",ariaModal:!0,ariaLabel:n},alert:{role:"alert",ariaLive:"assertive",ariaAtomic:!0},region:{role:"region",ariaLabel:n}}[t]||{});return i&&("tooltip"===t?s.ariaDescribedBy=i:s.ariaControls=i),s}const DEFAULT_THRESHOLDS={tap:10,longPress:500,swipe:30,pinch:.1,rotate:5,doubleTap:300,swipeVelocity:.3};function triggerHaptic(e="light"){if(!isBrowser())return;const t=navigator;if(t.vibrate){const n={light:10,medium:20,heavy:30,selection:[10,50,10]};t.vibrate(n[e])}}function applyVisualFeedback(e,t={}){const{visualClass:n="directix-touch-active",visualDuration:r=150}=t;e.classList.add(n);const o=setTimeout(()=>{e.classList.remove(n)},r);return()=>{clearTimeout(o),e.classList.remove(n)}}function calculateVelocity(e,t,n,r,o){if(0===o)return 0;return Math.sqrt(__pow(n-e,2)+__pow(r-t,2))/o}function isEdgePoint(e,t,n=20){if(!isBrowser())return{isEdge:!1};const r=window.innerWidth,o=window.innerHeight;return e<=n?{isEdge:!0,edge:"left"}:e>=r-n?{isEdge:!0,edge:"right"}:t<=n?{isEdge:!0,edge:"top"}:t>=o-n?{isEdge:!0,edge:"bottom"}:{isEdge:!1}}function useEnhancedTouch(e={}){const{thresholds:t={},feedback:n={},debounce:r=0,throttle:o=16,passive:i=!0,disabled:s=!1,onTap:a,onDoubleTap:l,onLongPress:c,onSwipe:u,onSwipeLeft:d,onSwipeRight:p,onSwipeUp:m,onSwipeDown:f,onPan:v,onPinch:h,onPinchIn:g,onPinchOut:y,onRotate:b,onTwoFingerTap:_,onEdgeSwipe:w}=e,x=__spreadValues(__spreadValues({},DEFAULT_THRESHOLDS),t),E=vue.ref(null),S=vue.ref(!1);let C=null,T=0,L=0,$=0,k=0,D=0,A=null,O=0,I=0,P=null,M=0;function R(e){let t=0,n=0;for(let r=0;r<e.length;r++)t+=e[r].clientX,n+=e[r].clientY;return{x:t/e.length,y:n/e.length}}function F(e,t){return Math.sqrt(__pow(e.clientX-t.clientX,2)+__pow(e.clientY-t.clientY,2))}function z(e,t){return Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)*(180/Math.PI)}function V(){return!("boolean"==typeof s?s:s.value)&&!(r>0&&Date.now()-M<r)}function N(e){V()&&(S.value=!0,$=Date.now(),E.value=null,n.haptic&&triggerHaptic("light"),1===e.touches.length?(T=e.touches[0].clientX,L=e.touches[0].clientY,c&&(A=setTimeout(()=>{E.value||(E.value="longPress",M=Date.now(),c({type:"longPress",center:{x:T,y:L},event:e,duration:Date.now()-$}),n.haptic&&triggerHaptic("medium"))},x.longPress))):2===e.touches.length&&(A&&(clearTimeout(A),A=null),O=F(e.touches[0],e.touches[1]),I=z(e.touches[0],e.touches[1])))}function B(e){if(V())if(A&&(clearTimeout(A),A=null),1===e.touches.length){const t=e.touches[0].clientX,n=e.touches[0].clientY;if(v){const r=Date.now();if(r-D>=o){D=r;const o=t-T,i=n-L,s=Math.sqrt(o*o+i*i);s>x.tap&&(E.value="pan",v({type:"pan",distance:s,angle:Math.atan2(i,o)*(180/Math.PI),center:{x:t,y:n},event:e}))}}}else if(2===e.touches.length){const t=F(e.touches[0],e.touches[1]),n=z(e.touches[0],e.touches[1]);if(h&&O>0){const n=t/O;Math.abs(n-1)>x.pinch&&(E.value="pinch",h({type:"pinch",scale:n,center:R(e.touches),event:e}),n<1&&g?g({type:"pinchIn",scale:n,center:R(e.touches),event:e}):n>1&&y&&y({type:"pinchOut",scale:n,center:R(e.touches),event:e}))}if(b){const t=n-I;Math.abs(t)>x.rotate&&(E.value="rotate",b({type:"rotate",rotation:t,center:R(e.touches),event:e}))}}}function H(e){var t,r,o,i;if(!V())return;S.value=!1,A&&(clearTimeout(A),A=null);const s=Date.now()-$,c=null!=(r=null==(t=e.changedTouches[0])?void 0:t.clientX)?r:T,v=null!=(i=null==(o=e.changedTouches[0])?void 0:o.clientY)?i:L,h=c-T,g=v-L,y=Math.sqrt(h*h+g*g),b=calculateVelocity(T,L,c,v,s);if(0===e.touches.length&&2===e.changedTouches.length&&_){F(e.changedTouches[0],e.changedTouches[1])<50&&(E.value="twoFingerTap",_({type:"twoFingerTap",center:R(e.changedTouches),event:e}))}if(1===e.changedTouches.length)if(y>=x.swipe){let t;t=Math.abs(h)>Math.abs(g)?h>0?"right":"left":g>0?"down":"up";if(isEdgePoint(T,L).isEdge&&w&&(E.value="edgeSwipe",w({type:"edgeSwipe",direction:t,distance:y,velocity:b,center:{x:c,y:v},event:e})),!E.value){E.value="swipe";const r={type:"swipe",direction:t,distance:y,velocity:b,angle:Math.atan2(g,h)*(180/Math.PI),center:{x:c,y:v},event:e,duration:s};null==u||u(r),"left"===t&&(null==d||d(r)),"right"===t&&(null==p||p(r)),"up"===t&&(null==m||m(r)),"down"===t&&(null==f||f(r)),n.haptic&&triggerHaptic("light")}}else if(y<x.tap&&s<300){const t=Date.now();t-k<x.doubleTap&&l?(E.value="doubleTap",l({type:"doubleTap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("medium"),k=0):a&&(l?setTimeout(()=>{"doubleTap"!==E.value&&(E.value="tap",a({type:"tap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("light"))},x.doubleTap):(E.value="tap",a({type:"tap",center:{x:c,y:v},event:e,duration:s}),n.haptic&&triggerHaptic("light")),k=t)}P&&(P(),P=null),M=Date.now(),setTimeout(()=>{E.value=null},100)}function U(){C&&(C.removeEventListener("touchstart",N),C.removeEventListener("touchmove",B),C.removeEventListener("touchend",H),C.removeEventListener("touchcancel",H)),A&&(clearTimeout(A),A=null),P&&(P(),P=null),C=null,E.value=null,S.value=!1}return vue.onUnmounted(U),{activeGesture:vue.readonly(E),bind:function(e){if(!isBrowser())return()=>{};U(),C=e;const t=i?{passive:!0}:void 0;return e.addEventListener("touchstart",N,t),e.addEventListener("touchmove",B,{passive:!1}),e.addEventListener("touchend",H),e.addEventListener("touchcancel",H),n.visual&&e.addEventListener("touchstart",()=>{P=applyVisualFeedback(e,n)}),U},isTouching:vue.readonly(S)}}function addPassiveListener(e,t,n,r){return e.addEventListener(t,n,__spreadValues({passive:!0},r)),()=>e.removeEventListener(t,n)}function addNonPassiveListener(e,t,n,r){return e.addEventListener(t,n,__spreadValues({passive:!1},r)),()=>e.removeEventListener(t,n)}function isTouchDevice(){return!!isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)}function isMobileDevice(){return!!isBrowser()&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function getDevicePixelRatio(){return isBrowser()&&window.devicePixelRatio||1}function usePWA(e={}){const{serviceWorker:t={}}=e,n=vue.ref(!isBrowser()||navigator.onLine),r=vue.ref(!1),o=vue.ref(!1);let i=null;function s(){n.value=!0}function a(){n.value=!1}function l(){return __async(this,null,function*(){if(isBrowser()&&"serviceWorker"in navigator&&t.enabled)try{i=yield navigator.serviceWorker.register(t.path||"/sw.js",{scope:t.scope||"/"}),r.value=!0,i.addEventListener("updatefound",()=>{const e=null==i?void 0:i.installing;e&&e.addEventListener("statechange",()=>{"installed"===e.state&&navigator.serviceWorker.controller&&(o.value=!0)})})}catch(e){console.warn("[Directix] Service Worker registration failed:",e)}})}function c(){return __async(this,null,function*(){if(i)try{yield i.unregister(),r.value=!1,i=null}catch(e){console.warn("[Directix] Service Worker unregistration failed:",e)}})}return vue.onUnmounted(()=>{c()}),{isOnline:vue.readonly(n),isRegistered:vue.readonly(r),needsUpdate:vue.readonly(o),register:l,update:function(){return __async(this,null,function*(){if(i)try{yield i.update(),i.waiting&&i.waiting.postMessage({type:"SKIP_WAITING"})}catch(e){console.warn("[Directix] Service Worker update failed:",e)}})},unregister:c,init:function(){return isBrowser()?(window.addEventListener("online",s),window.addEventListener("offline",a),l(),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",a)}):()=>{}}}}class ObjectPool{constructor(e,t,n=100){__publicField(this,"pool",[]),__publicField(this,"factory"),__publicField(this,"reset"),__publicField(this,"maxSize"),this.factory=e,this.reset=t,this.maxSize=n}acquire(){return this.pool.length>0?this.pool.pop():this.factory()}release(e){this.pool.length<this.maxSize&&(this.reset(e),this.pool.push(e))}get size(){return this.pool.length}clear(){this.pool.length=0}}const DEFAULT_ALLOWED_TAGS=["b","i","u","strong","em","br","p","span","div","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","img","table","thead","tbody","tr","td","th"],DEFAULT_ALLOWED_ATTRIBUTES={"*":["title","alt","class","id"],a:["href","target","rel","title"],img:["src","alt","title","width","height"]},DEFAULT_ALLOWED_PROTOCOLS=["http","https","mailto","tel"],DANGEROUS_TAGS=["script","iframe","object","embed","applet","form","input","button","select","textarea","style","link","meta","base","frame","frameset","svg","math","template"],DANGEROUS_ATTRIBUTES=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onmousemove","onfocus","onblur","onchange","onsubmit","onreset","onkeydown","onkeyup","onkeypress","oninput","onscroll","onresize","onunload","onbeforeunload","onabort","oncanplay","oncanplaythrough","ondurationchange","onemptied","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onafterprint","onbeforeprint","oncontextmenu","oncopy","oncut","onpaste","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","formaction","action","method","enctype"],DANGEROUS_URL_PATTERNS=[/^javascript:/i,/^data:/i,/^vbscript:/i,/^file:/i];function isUrlSafe(e,t=DEFAULT_ALLOWED_PROTOCOLS){if(!e)return!0;const n=e.trim();for(const e of DANGEROUS_URL_PATTERNS)if(e.test(n))return!1;const r=n.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);return!r||t.includes(r[1].toLowerCase())}function sanitizeUrl(e,t=DEFAULT_ALLOWED_PROTOCOLS){if(!e)return"";const n=e.trim();return isUrlSafe(n,t)?n:""}function escapeHtml(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return e.replace(/[&<>"'`=/]/g,e=>t[e]||e)}function unescapeHtml(e){const t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","=":"=","'":"'"};return e.replace(/&[^;]+;/g,e=>t[e]||e).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))}function stripHtml(e){return e.replace(/<[^>]*>/g,"")}function sanitizeHtml(e,t={}){var n;if(!e)return"";if(!isBrowser())return e;const{allowedTags:r=DEFAULT_ALLOWED_TAGS,allowedAttributes:o=DEFAULT_ALLOWED_ATTRIBUTES,allowedProtocols:i=DEFAULT_ALLOWED_PROTOCOLS,allowDataUrls:s=!1,allowInlineStyles:a=!1,allowClass:l=!0,allowId:c=!1,detectDangerousPatterns:u=!0,customFilters:d=[]}=t;let p=e;for(const e of d)p=e(p);if(u){const e=[/<script[\s\S]*?>[\s\S]*?<\/script>/gi,/javascript:/gi,/on\w+\s*=/gi,/data:\s*text\/html/gi,/vbscript:/gi,/expression\s*\(/gi,/url\s*\(\s*["']?javascript:/gi];for(const t of e)t.test(p)&&(p=p.replace(t,""))}const m=document.createElement("div");m.innerHTML=p;for(const e of DANGEROUS_TAGS){const t=m.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}function f(e){var t;const n=e.tagName.toLowerCase();if(!r.includes(n)){const n=document.createTextNode(e.textContent||"");return void(null==(t=e.parentNode)||t.replaceChild(n,e))}for(const t of DANGEROUS_ATTRIBUTES)e.removeAttribute(t);const u=Array.from(e.attributes);for(const t of u){const r=t.name.toLowerCase();if(r.startsWith("on")){e.removeAttribute(t.name);continue}let u=!1;if(Array.isArray(o))u=o.includes(r);else{const e=o["*"]||[],t=o[n]||[];u=e.includes(r)||t.includes(r)}if("class"!==r||l)if("id"!==r||c)if("style"!==r||a){if("href"===r||"src"===r){if(!isUrlSafe(t.value,s?[...i,"data"]:i)){e.removeAttribute(t.name);continue}}u||"class"===r||"id"===r||"style"===r||e.removeAttribute(t.name)}else e.removeAttribute(t.name);else e.removeAttribute(t.name);else e.removeAttribute(t.name)}for(const t of Array.from(e.children))f(t)}for(const e of Array.from(m.children))f(e);return m.innerHTML}function getCSPNonce(){if(!isBrowser())return null;const e=document.querySelector('meta[http-equiv="Content-Security-Policy"]');if(e){const t=e.content.match(/nonce-([a-zA-Z0-9+/=]+)/);if(t)return t[1]}const t=document.querySelectorAll("script[nonce]");return t.length>0&&t[0].nonce||null}function injectStylesCSP(e,t={}){if(!isBrowser())return null;const{nonce:n}=t;if(n||getCSPNonce()){const t=document.createElement("style");return t.setAttribute("nonce",n||getCSPNonce()||""),t.textContent=e,document.head.appendChild(t),t}const r=document.createElement("style");return r.textContent=e,document.head.appendChild(r),r}function injectScriptCSP(e,t={}){if(!isBrowser())return null;const{nonce:n}=t,r=document.createElement("script");return r.src=e,(n||getCSPNonce())&&r.setAttribute("nonce",n||getCSPNonce()||""),document.head.appendChild(r),r}const SecurityAudit={scanHtml(e){const t=[];/<script[\s\S]*?>[\s\S]*?<\/script>/gi.test(e)&&t.push({type:"script-injection",severity:"critical",description:"HTML contains script tags which could lead to XSS attacks",remediation:"Remove script tags or use a sanitization library"});const n=e.match(/on\w+\s*=/gi);return n&&t.push({type:"event-handler",severity:"high",description:`Found ${n.length} event handler(s) which could be exploited`,remediation:"Remove inline event handlers and use addEventListener instead"}),/javascript:/gi.test(e)&&t.push({type:"javascript-url",severity:"high",description:"HTML contains javascript: URLs which could lead to XSS attacks",remediation:"Remove javascript: URLs or validate/sanitize them"}),/data:\s*text\/html/gi.test(e)&&t.push({type:"data-url",severity:"high",description:"HTML contains data:text/html URLs which could execute scripts",remediation:"Remove or sanitize data: URLs"}),/<iframe[\s\S]*?srcdoc=/gi.test(e)&&t.push({type:"iframe-srcdoc",severity:"high",description:"HTML contains iframe with srcdoc attribute",remediation:"Avoid using srcdoc or sanitize its content"}),/<form[\s\S]*?action\s*=/gi.test(e)&&t.push({type:"form-action",severity:"medium",description:"HTML contains form with action attribute",remediation:"Validate form actions or use CSRF protection"}),t},checkCSP(){var e,t;const n={policies:{},warnings:[],recommendations:[]};if(!isBrowser())return n.warnings.push("CSP check requires browser environment"),n;const r=document.querySelector('meta[http-equiv="Content-Security-Policy"]');if(r){const o=r.content.split(";").map(e=>e.trim());for(const e of o){const[t,...r]=e.split(/\s+/);t&&(n.policies[t.toLowerCase()]=r)}(null==(e=n.policies["script-src"])?void 0:e.includes("'unsafe-inline'"))&&n.warnings.push("CSP allows unsafe-inline scripts - this reduces XSS protection"),(null==(t=n.policies["script-src"])?void 0:t.includes("'unsafe-eval'"))&&n.warnings.push("CSP allows unsafe-eval - this reduces XSS protection");const i=["default-src","script-src","style-src","img-src","connect-src"];for(const e of i)n.policies[e]||n.recommendations.push(`Consider adding ${e} directive to CSP`)}else n.warnings.push("No CSP meta tag found - consider adding Content Security Policy"),n.recommendations.push("Add a Content-Security-Policy meta tag or header");return n},checkDependencies(){return __async(this,null,function*(){var e,t,n,r,o;const i=[];if("undefined"==typeof process||!(null==(e=process.versions)?void 0:e.node))return console.warn("[Directix] checkDependencies() is only available in Node.js environment"),i;try{const{execSync:e}=yield import("node:child_process");try{const r=e("npm audit --json",{encoding:"utf-8",timeout:3e4}),o=JSON.parse(r);if(o.vulnerabilities)for(const[e,r]of Object.entries(o.vulnerabilities))if(r.via&&Array.isArray(r.via))for(const o of r.via)"object"==typeof o&&o.title&&i.push({name:e,id:null==(n=null==(t=o.url)?void 0:t.match(/(CVE-\d+-\d+|GHSA-[a-zA-Z0-9-]+)/))?void 0:n[0],version:r.version||"unknown",severity:o.severity||r.severity||"medium",title:o.title,url:o.url,patchedVersions:r.fixAvailable?"Available":void 0})}catch(e){if(e.stdout)try{const t=JSON.parse(e.stdout);if(t.vulnerabilities)for(const[e,n]of Object.entries(t.vulnerabilities))if(n.via&&Array.isArray(n.via))for(const t of n.via)"object"==typeof t&&t.title&&i.push({name:e,id:null==(o=null==(r=t.url)?void 0:r.match(/(CVE-\d+-\d+|GHSA-[a-zA-Z0-9-]+)/))?void 0:o[0],version:n.version||"unknown",severity:t.severity||n.severity||"medium",title:t.title,url:t.url,patchedVersions:n.fixAvailable?"Available":void 0})}catch(e){}}}catch(e){console.warn("[Directix] Failed to check dependencies:",e)}return i})},generateReport(e){const t={vulnerabilities:[],warnings:[],recommendations:[],timestamp:new Date};e&&(t.vulnerabilities=this.scanHtml(e));const n=this.checkCSP();for(const e of n.warnings)t.warnings.push({type:"csp-warning",severity:"medium",description:e});return t.recommendations.push(...n.recommendations),t},formatReport(e,t="text"){if("json"===t)return JSON.stringify(e,null,2);if("html"===t){let t='<div class="security-report">';if(t+="<h2>Security Report</h2>",t+=`<p>Generated: ${e.timestamp.toISOString()}</p>`,e.vulnerabilities.length>0){t+="<h3>Vulnerabilities</h3><ul>";for(const n of e.vulnerabilities)t+=`<li class="severity-${n.severity}"><strong>${n.type}</strong>: ${n.description}</li>`;t+="</ul>"}if(e.warnings.length>0){t+="<h3>Warnings</h3><ul>";for(const n of e.warnings)t+=`<li class="severity-${n.severity}"><strong>${n.type}</strong>: ${n.description}</li>`;t+="</ul>"}if(e.recommendations.length>0){t+="<h3>Recommendations</h3><ul>";for(const n of e.recommendations)t+=`<li>${n}</li>`;t+="</ul>"}return t+="</div>",t}let n="Security Report\n";if(n+=`Generated: ${e.timestamp.toISOString()}\n\n`,e.vulnerabilities.length>0){n+="Vulnerabilities:\n";for(const t of e.vulnerabilities)n+=` [${t.severity.toUpperCase()}] ${t.type}: ${t.description}\n`;n+="\n"}if(e.warnings.length>0){n+="Warnings:\n";for(const t of e.warnings)n+=` [${t.severity.toUpperCase()}] ${t.type}: ${t.description}\n`;n+="\n"}if(e.recommendations.length>0){n+="Recommendations:\n";for(const t of e.recommendations)n+=` - ${t}\n`}return n}};class SafeContentHandler{constructor(e={}){__publicField(this,"config"),this.config=e}setHtml(e,t){e.innerHTML=sanitizeHtml(t,this.config)}setText(e,t){e.textContent=t}setAttribute(e,t,n){t.toLowerCase().startsWith("on")||("href"!==t.toLowerCase()&&"src"!==t.toLowerCase()||(n=sanitizeUrl(n,this.config.allowedProtocols)),e.setAttribute(t,n))}getSanitizedHtml(e){return sanitizeHtml(e,this.config)}}function createSafeContentHandler(e){return new SafeContentHandler(e)}function useLazyOptimized(e={}){const{threshold:t=0,rootMargin:n="0px",once:r=!0,onLoad:o}=e,i=vue.shallowRef({loading:!1,loaded:!1,error:null,isVisible:!1});let s=null;function a(){s&&(s.disconnect(),s=null)}function l(){if(!i.value.loading&&!i.value.loaded){i.value=__spreadProps(__spreadValues({},i.value),{loading:!0,error:null});try{null==o||o({}),i.value=__spreadProps(__spreadValues({},i.value),{loading:!1,loaded:!0})}catch(e){i.value=__spreadProps(__spreadValues({},i.value),{loading:!1,error:e})}}}return{state:vue.readonly(i),observe:function(e){a(),s=new IntersectionObserver(e=>{const t=e[0];(null==t?void 0:t.isIntersecting)&&(i.value=__spreadProps(__spreadValues({},i.value),{isVisible:!0}),l(),r&&a())},{threshold:t,rootMargin:n}),s.observe(e)},disconnect:a,load:l}}function useDirectiveInstance(e={}){const{initialState:t={},shallow:n=!1}=e;let r=null;const o=vue.reactive(t);function i(e){r=vue.markRaw(e)}return{get element(){return r},set element(e){e&&i(e)},state:vue.readonly(o),setElement:i,setState:function(e){const t=e(vue.toRaw(o));Object.assign(o,t)},reset:function(){Object.assign(o,t)}}}function computedWithCleanup(e){const{get:t,cleanup:n}=e;let r;return vue.computed({get(){const e=t();return void 0!==r&&r!==e&&(null==n||n(r)),r=e,e},set(){}})}function watchEffectBinding(e){const{binding:t,effect:n}=e;let r=null,o=e=>{r=e};const i=vue.watchEffect(e=>{o=e,r&&(r(),r=null),vue.isRef(t)?n(t.value,void 0,o):n(t,void 0,o)});return()=>{r&&r(),i()}}function useSuspenseDirective(e){const{loader:t,onSuccess:n,onError:r}=e,o=vue.shallowRef({loading:!1,error:null,data:null});function i(){return __async(this,null,function*(){if(!o.value.loading){o.value=__spreadProps(__spreadValues({},o.value),{loading:!0,error:null});try{const e=yield t();o.value={loading:!1,error:null,data:e},null==n||n(e)}catch(e){o.value=__spreadProps(__spreadValues({},o.value),{loading:!1,error:e}),null==r||r(e)}}})}return{state:vue.readonly(o),load:i,retry:function(){return __async(this,null,function*(){o.value=__spreadProps(__spreadValues({},o.value),{error:null}),yield i()})}}}function ensureTeleportTarget(e){if("undefined"==typeof document)return null;let t=document.querySelector(e);return t||(t=document.createElement("div"),t.id=e.replace("#",""),document.body.appendChild(t)),t}function teleportContent(e,t){const{to:n,disabled:r=!1}=t;if(r||"undefined"==typeof document)return()=>{};const o="string"==typeof n?ensureTeleportTarget(n):n;if(!o)return()=>{};const i=e.parentNode,s=e.nextSibling;return o.appendChild(e),()=>{i&&e.parentNode===o&&i.insertBefore(e,s)}}function isCustomElement(e){return e.tagName.includes("-")||void 0!==customElements.get(e.tagName.toLowerCase())}function applyDirectiveToCustomElement(e,t,n,r){const o={value:n,oldValue:null,arg:null==r?void 0:r.arg,modifiers:(null==r?void 0:r.modifiers)||{},instance:null},i={el:e},s=t.mounted;return s&&s(e,o,i,null),()=>{const n=t.unmounted;n&&n(e,o,i,null)}}function defineCustomElementDirective(e){const{name:t,directive:n,defaultValue:r,shadow:o=!1,shadowMode:i="open"}=e;class s extends HTMLElement{constructor(){super(),__publicField(this,"cleanup"),__publicField(this,"currentValue",r),o&&this.attachShadow({mode:i})}connectedCallback(){this.cleanup=applyDirectiveToCustomElement(this,n,this.currentValue)}disconnectedCallback(){this.cleanup&&(this.cleanup(),this.cleanup=void 0)}static get observedAttributes(){return["value"]}attributeChangedCallback(e,t,r){"value"===e&&t!==r&&(this.currentValue=r,this.cleanup&&this.cleanup(),this.cleanup=applyDirectiveToCustomElement(this,n,this.currentValue))}}customElements.define(t,s)}function createDirectiveElement(e,t,n){const{defaultValue:r,shadow:o=!1,shadowMode:i="open"}=n||{};return class extends HTMLElement{constructor(){super(),__publicField(this,"cleanup"),__publicField(this,"currentValue",r),o&&this.attachShadow({mode:i})}connectedCallback(){this.cleanup=applyDirectiveToCustomElement(this,t,this.currentValue)}disconnectedCallback(){this.cleanup&&(this.cleanup(),this.cleanup=void 0)}static get observedAttributes(){return["value"]}attributeChangedCallback(e,n,r){n!==r&&(this.currentValue=r,this.cleanup&&this.cleanup(),this.cleanup=applyDirectiveToCustomElement(this,t,this.currentValue))}}}function registerDirectiveElements(e){Object.entries(e).forEach(([e,t])=>{const n=createDirectiveElement(e,t);customElements.define(e,n)})}function isCustomElementDefined(e){return void 0!==customElements.get(e)}function whenCustomElementDefined(e){return __async(this,null,function*(){yield customElements.whenDefined(e)})}function getRegisteredCustomElements(){const e=customElements.__registry;return e&&"function"==typeof e.keys?Array.from(e.keys()):[]}function hydrateCustomElements(e=document.body){e.querySelectorAll("*").forEach(e=>{var t;if(isCustomElement(e)){const n=e.cloneNode(!0);null==(t=e.parentNode)||t.replaceChild(n,e)}})}function createSSRSafeCustomElement(e,t,n){const{styles:r,shadow:o=!1}=n||{};return{elementClass:"undefined"==typeof window?class extends HTMLElement{}:createDirectiveElement(e,t,n),ssrRender:(t={})=>{const n=Object.entries(t).map(([e,t])=>`${e}="${t}"`).join(" ");if(o){const t=r?`<style>${Array.isArray(r)?r.join(""):r}</style>`:"";return`<${e} ${n}><template shadowroot="open">${t}<slot></slot></template></${e}>`}return`<${e} ${n}></${e}>`}}}const zhCN={directives:{debounce:{description:"防抖指令,延迟执行事件处理函数",params:{wait:"延迟时间(毫秒)",leading:"是否在延迟开始前调用",trailing:"是否在延迟结束后调用"},errors:{invalid_wait:"wait 参数无效,必须为正数",invalid_handler:"handler 必须是一个函数"}},throttle:{description:"节流指令,限制事件触发频率",params:{interval:"执行间隔(毫秒)",leading:"是否在间隔开始时调用",trailing:"是否在间隔结束时调用"},errors:{invalid_interval:"interval 参数无效,必须为正数",invalid_handler:"handler 必须是一个函数"}},copy:{description:"复制指令,点击复制文本到剪贴板",params:{value:"要复制的文本",onSuccess:"复制成功回调",onError:"复制失败回调"},errors:{empty_value:"没有要复制的文本",clipboard_failed:"剪贴板 API 失败,回退到 execCommand"}},lazy:{description:"懒加载指令,延迟加载图片或组件",params:{src:"图片源地址",threshold:"触发阈值",rootMargin:"根元素边距"},errors:{invalid_src:"src 参数无效",observer_failed:"IntersectionObserver 创建失败"}},permission:{description:"权限指令,根据权限控制元素显示",params:{value:"权限值或权限数组",mode:"权限模式:any 或 all"},errors:{empty_permission:"权限值不能为空",invalid_mode:"mode 必须是 any 或 all"}},mask:{description:"输入掩码指令,格式化输入内容",params:{pattern:"掩码模式",placeholder:"占位符",allowIncomplete:"是否允许不完整输入"},errors:{invalid_pattern:"pattern 参数无效"}},hotkey:{description:"热键指令,绑定键盘快捷键",params:{key:"快捷键组合",handler:"处理函数",prevent:"是否阻止默认行为"},errors:{invalid_key:"快捷键格式无效",conflict:"快捷键冲突:{key}"}},clickoutside:{description:"点击外部指令,检测元素外部点击",params:{handler:"点击外部时的处理函数",exclude:"排除的元素列表"},errors:{invalid_handler:"handler 必须是一个函数"}},longpress:{description:"长按指令,检测长按手势",params:{duration:"长按时长(毫秒)",handler:"长按触发函数"},errors:{invalid_duration:"duration 必须为正数"}},draggable:{description:"拖拽指令,使元素可拖拽",params:{axis:"拖拽轴:x、y 或空",bounds:"拖拽边界",handle:"拖拽手柄选择器"},errors:{invalid_bounds:"bounds 参数无效"}},intersect:{description:"交叉观察指令,检测元素可见性",params:{threshold:"可见阈值",rootMargin:"根元素边距",once:"是否只触发一次"},errors:{observer_failed:"IntersectionObserver 创建失败"}},loading:{description:"加载指令,显示加载状态",params:{value:"是否加载中",text:"加载提示文字",spinner:"加载图标"}},skeleton:{description:"骨架屏指令,显示内容占位符",params:{value:"是否显示骨架屏",variant:"骨架屏变体",animation:"动画类型"}},virtualList:{description:"虚拟列表指令,优化大数据渲染",params:{itemSize:"项目高度",buffer:"缓冲区大小",estimatedSize:"预估高度"},errors:{invalid_itemSize:"itemSize 必须为正数"}},infiniteScroll:{description:"无限滚动指令,实现滚动加载更多",params:{handler:"加载更多的处理函数",distance:"触发距离",disabled:"是否禁用"},errors:{invalid_handler:"handler 必须是一个函数"}},watermark:{description:"水印指令,为元素添加水印",params:{content:"水印内容",fontSize:"字体大小",color:"水印颜色",opacity:"透明度"},errors:{empty_content:"水印内容不能为空"}},contextmenu:{description:"右键菜单指令,自定义右键菜单",params:{items:"菜单项列表",handler:"菜单项点击处理"},errors:{empty_items:"菜单项列表不能为空"}},fullscreen:{description:"全屏指令,使元素全屏显示",params:{value:"是否全屏",onEnter:"进入全屏回调",onExit:"退出全屏回调"},errors:{not_supported:"当前浏览器不支持全屏 API"}},imagePreview:{description:"图片预览指令,点击预览大图",params:{src:"图片源地址",list:"图片列表",initialIndex:"初始索引"},errors:{invalid_src:"src 参数无效"}},tooltip:{description:"提示指令,显示悬浮提示",params:{content:"提示内容",placement:"显示位置",trigger:"触发方式"},errors:{empty_content:"提示内容不能为空"}},lottie:{description:"Lottie 动画指令,播放 Lottie 动画",params:{path:"动画文件路径",animationData:"动画数据",loop:"是否循环",autoplay:"是否自动播放"},errors:{invalid_source:"必须提供 path 或 animationData",load_failed:"Lottie 动画加载失败"}},swipe:{description:"滑动手势指令,检测滑动方向",params:{threshold:"滑动阈值",velocity:"速度阈值",onSwipe:"滑动回调"},errors:{invalid_threshold:"threshold 必须为正数"}},touch:{description:"触摸手势指令,统一处理触摸事件",params:{onStart:"触摸开始回调",onMove:"触摸移动回调",onEnd:"触摸结束回调"}},pan:{description:"平移手势指令,检测平移操作",params:{threshold:"触发阈值",direction:"平移方向:all、horizontal、vertical"}},pinch:{description:"捏合手势指令,检测缩放操作",params:{threshold:"缩放阈值",onPinch:"缩放回调"}},rotateGesture:{description:"旋转手势指令,检测旋转操作",params:{threshold:"旋转角度阈值",onRotate:"旋转回调"}},parallax:{description:"视差滚动指令,创建视差效果",params:{speed:"视差速度",direction:"视差方向"}},typewriter:{description:"打字机指令,实现打字机效果",params:{text:"要显示的文本",speed:"打字速度",delay:"延迟开始"},errors:{empty_text:"文本内容不能为空"}},countdown:{description:"倒计时指令,显示倒计时",params:{time:"倒计时时间(毫秒)",format:"时间格式",onFinish:"完成回调"},errors:{invalid_time:"time 必须为正数"}},counter:{description:"计数器指令,数字动画",params:{from:"起始值",to:"结束值",duration:"动画时长",decimals:"小数位数"},errors:{invalid_range:"from 和 to 必须为数字"}},progress:{description:"进度条指令,显示进度",params:{value:"进度值(0-100)",showText:"是否显示文字",strokeWidth:"线条宽度"},errors:{invalid_value:"value 必须在 0-100 之间"}},emoji:{description:"表情选择指令,表情选择器",params:{onSelect:"选择回调",exclude:"排除的表情类别"}},money:{description:"金额输入指令,格式化金额",params:{currency:"货币符号",precision:"小数位数",thousands:"千位分隔符"}},number:{description:"数字输入指令,限制数字输入",params:{min:"最小值",max:"最大值",precision:"小数位数"},errors:{invalid_range:"min 必须小于 max"}},truncate:{description:"截断指令,截断文本",params:{length:"最大长度",omission:"省略符号"},errors:{invalid_length:"length 必须为正整数"}},ellipsis:{description:"省略号指令,CSS 省略显示",params:{lines:"最大行数"}},highlight:{description:"高亮指令,高亮文本内容",params:{keyword:"高亮关键词",color:"高亮颜色",className:"CSS 类名"},errors:{empty_keyword:"关键词不能为空"}},sanitize:{description:"净化指令,净化 HTML 内容",params:{allowedTags:"允许的标签",allowedAttrs:"允许的属性"}},focus:{description:"聚焦指令,自动聚焦元素",params:{value:"是否聚焦",preventScroll:"是否阻止滚动"}},visible:{description:"可见性指令,控制元素显示",params:{value:"是否可见"}},blur:{description:"模糊指令,模糊元素内容",params:{value:"模糊程度",transition:"过渡效果"}},hover:{description:"悬停指令,检测鼠标悬停",params:{onEnter:"进入回调",onLeave:"离开回调"}},fade:{description:"淡入淡出指令,淡入淡出效果",params:{duration:"动画时长",delay:"延迟时间"}},clickWave:{description:"点击波纹指令,点击波纹效果",params:{color:"波纹颜色",duration:"动画时长"}},clickDelay:{description:"点击延迟指令,防止快速点击",params:{delay:"延迟时间"},errors:{invalid_delay:"delay 必须为正数"}},scroll:{description:"滚动指令,滚动行为控制",params:{behavior:"滚动行为",smooth:"是否平滑滚动"}},sticky:{description:"粘性定位指令,粘性定位效果",params:{offsetTop:"顶部偏移",offsetBottom:"底部偏移"}},print:{description:"打印指令,打印元素内容",params:{title:"打印标题",onBefore:"打印前回调",onAfter:"打印后回调"}},export_:{description:"导出指令,导出元素内容",params:{type:"导出类型:image、pdf",filename:"文件名",quality:"质量"},errors:{unsupported_type:"不支持的导出类型"}},pullRefresh:{description:"下拉刷新指令,下拉刷新功能",params:{onRefresh:"刷新回调",distance:"触发距离"},errors:{invalid_handler:"onRefresh 必须是一个函数"}},resize:{description:"调整大小指令,监听元素尺寸变化",params:{handler:"尺寸变化回调",debounce:"防抖时间"},errors:{observer_failed:"ResizeObserver 创建失败"}},mutation:{description:"变化观察指令,监听 DOM 变化",params:{handler:"变化回调",options:"观察选项"},errors:{observer_failed:"MutationObserver 创建失败"}},ripple:{description:"涟漪指令,Material Design 涟漪效果",params:{color:"涟漪颜色",duration:"动画时长"}},uppercase:{description:"大写指令,转换为大写"},lowercase:{description:"小写指令,转换为小写"},capitalcase:{description:"首字母大写指令,首字母大写"},trim:{description:"去空格指令,去除首尾空格"}},errors:{invalid_param:"参数 {param} 无效",missing_required:"缺少必需参数 {param}",type_error:"参数 {param} 类型错误,期望 {expected},实际 {actual}",value_out_of_range:"参数 {param} 值超出范围,应在 {min} 到 {max} 之间",not_supported:"{feature} 在当前环境不受支持",ssr_not_supported:"指令 {directive} 不支持 SSR"},warnings:{deprecated:"{feature} 已弃用,请使用 {alternative}",experimental:"{feature} 是实验性功能,可能在未来版本中更改",performance:"{feature} 可能影响性能,建议谨慎使用",fallback:"{feature} 失败,回退到 {alternative}"},help:{installation:"使用 npm install directix 安装",usage:"在 Vue 应用中注册 Directix 插件",contribution:"请参阅 CONTRIBUTING.md 了解如何贡献"}};let currentLocale="zh-CN",currentMessages=zhCN;function createI18n(e){const{locale:n="zh-CN",fallbackLocale:r="en-US",messages:o}=e;return currentLocale=n,currentMessages=o[n]||o[r]||zhCN,{locale:currentLocale,fallbackLocale:r,messages:currentMessages,setLocale:e=>{currentLocale=e,o[e]&&(currentMessages=o[e])},t:(e,n)=>t(e,n)}}function setLocale(e){currentLocale=e}function getLocale(){return currentLocale}function t(e,t){const n=e.split(".");let r=currentMessages;for(const t of n){if(!r||"object"!=typeof r||!(t in r))return e;r=r[t]}return"string"!=typeof r?e:t?r.replace(/\{(\w+)\}/g,(e,n)=>void 0!==t[n]?String(t[n]):`{${n}}`):r}const REGION_FORMATS={CN:{date:{datePattern:"YYYY-MM-DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"-",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"¥",currencyPosition:"before",currencyDecimals:2}},US:{date:{datePattern:"MM/DD/YYYY",timePattern:"hh:mm:ss a",hourCycle:"h12",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"$",currencyPosition:"before",currencyDecimals:2}},JP:{date:{datePattern:"YYYY/MM/DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"¥",currencyPosition:"before",currencyDecimals:0}},DE:{date:{datePattern:"DD.MM.YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:".",timeSeparator:":"},number:{decimalSeparator:",",thousandsSeparator:".",currencySymbol:"€",currencyPosition:"after",currencyDecimals:2}},FR:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:",",thousandsSeparator:" ",currencySymbol:"€",currencyPosition:"after",currencyDecimals:2}},GB:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"£",currencyPosition:"before",currencyDecimals:2}},KR:{date:{datePattern:"YYYY.MM.DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:".",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"₩",currencyPosition:"before",currencyDecimals:0}},IN:{date:{datePattern:"DD/MM/YYYY",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:0,dateSeparator:"/",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"₹",currencyPosition:"before",currencyDecimals:2}}},DEFAULT_FORMAT={date:{datePattern:"YYYY-MM-DD",timePattern:"HH:mm:ss",hourCycle:"h23",firstDayOfWeek:1,dateSeparator:"-",timeSeparator:":"},number:{decimalSeparator:".",thousandsSeparator:",",currencySymbol:"$",currencyPosition:"before",currencyDecimals:2}};function getTimezoneInfo(){const e=new Date,t=-e.getTimezoneOffset(),n=t/60,r=n>=0?"+":"-",o=Math.abs(Math.floor(n)),i=Math.abs(t%60),s=`${r}${String(o).padStart(2,"0")}:${String(i).padStart(2,"0")}`;let a="UTC",l="UTC";if("undefined"!=typeof Intl&&Intl.DateTimeFormat)try{a=Intl.DateTimeFormat().resolvedOptions().timeZone,l=a.split("/").pop()||a}catch(e){l=`UTC${s}`}else l=`UTC${s}`;const c=-new Date(e.getFullYear(),0,1).getTimezoneOffset(),u=-new Date(e.getFullYear(),6,1).getTimezoneOffset();return{id:a,name:l,offset:n,offsetString:s,isDST:t!==Math.max(c,u)}}function detectLocaleInfo(){const e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US",t="undefined"!=typeof Intl&&Intl.DateTimeFormat?Intl.DateTimeFormat().resolvedOptions().timeZone:"UTC",n=e.split("-"),r=n[0]||"en";let o=null,i=null;for(let e=1;e<n.length;e++)2!==n[e].length&&3!==n[e].length||(2===n[e].length?o=n[e].toUpperCase():4===n[e].length&&(i=n[e]));return{locale:e,language:r,region:o,script:i,browserLocale:e,timezone:t}}function getDateFormat(e){var t;const n=detectLocaleInfo(),r=e||n.region||"US";return(null==(t=REGION_FORMATS[r])?void 0:t.date)||DEFAULT_FORMAT.date}function getNumberFormat(e){var t;const n=detectLocaleInfo(),r=e||n.region||"US";return(null==(t=REGION_FORMATS[r])?void 0:t.number)||DEFAULT_FORMAT.number}function formatDateLocale(e,t){const n="string"==typeof e||"number"==typeof e?new Date(e):e,r=t?__spreadValues(__spreadValues({},getDateFormat()),t):getDateFormat();if("undefined"!=typeof Intl)try{const e=detectLocaleInfo();return new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h12"===r.hourCycle?"h12":"h23"}).format(n)}catch(e){}const o=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0"),a=String(n.getHours()).padStart(2,"0"),l=String(n.getMinutes()).padStart(2,"0"),c=String(n.getSeconds()).padStart(2,"0");return`${o}${r.dateSeparator}${i}${r.dateSeparator}${s} ${a}${r.timeSeparator}${l}${r.timeSeparator}${c}`}function formatNumberLocale(e,t,n){const r=n?__spreadValues(__spreadValues({},getNumberFormat()),n):getNumberFormat();if("undefined"!=typeof Intl)try{const n=detectLocaleInfo();return new Intl.NumberFormat(n.locale,{minimumFractionDigits:null!=t?t:0,maximumFractionDigits:null!=t?t:2}).format(e)}catch(e){}const o=void 0!==t?e.toFixed(t):String(e),[i,s]=o.split("."),a=i.replace(/\B(?=(\d{3})+(?!\d))/g,r.thousandsSeparator);return s?`${a}${r.decimalSeparator}${s}`:a}function formatCurrencyLocale(e,t){const n=t?__spreadValues(__spreadValues({},getNumberFormat()),t):getNumberFormat();if("undefined"!=typeof Intl)try{const t=detectLocaleInfo();return new Intl.NumberFormat(t.locale,{style:"currency",currency:getCurrencyCode(t.region||"US"),minimumFractionDigits:n.currencyDecimals,maximumFractionDigits:n.currencyDecimals}).format(e)}catch(e){}const r=formatNumberLocale(e,n.currencyDecimals,n);return"before"===n.currencyPosition?`${n.currencySymbol}${r}`:`${r}${n.currencySymbol}`}function getCurrencyCode(e){return{CN:"CNY",US:"USD",JP:"JPY",DE:"EUR",FR:"EUR",GB:"GBP",KR:"KRW",IN:"INR"}[e]||"USD"}function parseLocale(e){const t=e.replace(/_/g,"-").split("-"),n=t[0]||"en";let r=null,o=null;for(let e=1;e<t.length;e++)2===t[e].length?r=t[e].toUpperCase():4===t[e].length&&(o=t[e]);return{language:n,region:r,script:o}}function getSupportedRegions(){return Object.keys(REGION_FORMATS)}function getLocaleDisplayName(e,t){if("undefined"!=typeof Intl&&Intl.DisplayNames)try{return new Intl.DisplayNames([t||detectLocaleInfo().locale],{type:"locale"}).of(e)||e}catch(t){return e}return e}const enUS={directives:{debounce:{description:"Debounce directive - delay event handler execution",params:{wait:"Delay time in milliseconds",leading:"Whether to invoke before delay starts",trailing:"Whether to invoke after delay ends"},errors:{invalid_wait:'Invalid "wait" parameter, must be a positive number',invalid_handler:"Handler must be a function"}},throttle:{description:"Throttle directive - limit event trigger frequency",params:{interval:"Execution interval in milliseconds",leading:"Whether to invoke at interval start",trailing:"Whether to invoke at interval end"},errors:{invalid_interval:'Invalid "interval" parameter, must be a positive number',invalid_handler:"Handler must be a function"}},copy:{description:"Copy directive - copy text to clipboard on click",params:{value:"Text to copy",onSuccess:"Copy success callback",onError:"Copy error callback"},errors:{empty_value:"No text to copy",clipboard_failed:"Clipboard API failed, falling back to execCommand"}},lazy:{description:"Lazy loading directive - defer image or component loading",params:{src:"Image source URL",threshold:"Intersection threshold",rootMargin:"Root margin"},errors:{invalid_src:'Invalid "src" parameter',observer_failed:"Failed to create IntersectionObserver"}},permission:{description:"Permission directive - control element visibility by permissions",params:{value:"Permission value or array",mode:"Permission mode: any or all"},errors:{empty_permission:"Permission value cannot be empty",invalid_mode:'Mode must be "any" or "all"'}},mask:{description:"Input mask directive - format input content",params:{pattern:"Mask pattern",placeholder:"Placeholder character",allowIncomplete:"Allow incomplete input"},errors:{invalid_pattern:'Invalid "pattern" parameter'}},hotkey:{description:"Hotkey directive - bind keyboard shortcuts",params:{key:"Keyboard shortcut combination",handler:"Handler function",prevent:"Whether to prevent default behavior"},errors:{invalid_key:"Invalid hotkey format",conflict:"Hotkey conflict: {key}"}},clickoutside:{description:"Click outside directive - detect clicks outside element",params:{handler:"Handler function for outside clicks",exclude:"Elements to exclude"},errors:{invalid_handler:"Handler must be a function"}},longpress:{description:"Long press directive - detect long press gesture",params:{duration:"Press duration in milliseconds",handler:"Long press handler function"},errors:{invalid_duration:"Duration must be a positive number"}},draggable:{description:"Draggable directive - make element draggable",params:{axis:"Drag axis: x, y, or empty",bounds:"Drag bounds",handle:"Drag handle selector"},errors:{invalid_bounds:'Invalid "bounds" parameter'}},intersect:{description:"Intersect directive - observe element visibility",params:{threshold:"Visibility threshold",rootMargin:"Root margin",once:"Whether to trigger only once"},errors:{observer_failed:"Failed to create IntersectionObserver"}},loading:{description:"Loading directive - display loading state",params:{value:"Whether loading",text:"Loading text",spinner:"Loading spinner"}},skeleton:{description:"Skeleton directive - display content placeholder",params:{value:"Whether to show skeleton",variant:"Skeleton variant",animation:"Animation type"}},virtualList:{description:"Virtual list directive - optimize large data rendering",params:{itemSize:"Item height",buffer:"Buffer size",estimatedSize:"Estimated size"},errors:{invalid_itemSize:"itemSize must be a positive number"}},infiniteScroll:{description:"Infinite scroll directive - load more on scroll",params:{handler:"Load more handler function",distance:"Trigger distance",disabled:"Whether disabled"},errors:{invalid_handler:"Handler must be a function"}},watermark:{description:"Watermark directive - add watermark overlay",params:{content:"Watermark content",fontSize:"Font size",color:"Watermark color",opacity:"Opacity"},errors:{empty_content:"Watermark content cannot be empty"}},contextmenu:{description:"Context menu directive - custom right-click menu",params:{items:"Menu items list",handler:"Menu item click handler"},errors:{empty_items:"Menu items list cannot be empty"}},fullscreen:{description:"Fullscreen directive - toggle element fullscreen",params:{value:"Whether fullscreen",onEnter:"Enter fullscreen callback",onExit:"Exit fullscreen callback"},errors:{not_supported:"Fullscreen API is not supported in this browser"}},imagePreview:{description:"Image preview directive - click to preview image",params:{src:"Image source URL",list:"Image list",initialIndex:"Initial index"},errors:{invalid_src:'Invalid "src" parameter'}},tooltip:{description:"Tooltip directive - show hover tooltip",params:{content:"Tooltip content",placement:"Display position",trigger:"Trigger method"},errors:{empty_content:"Tooltip content cannot be empty"}},lottie:{description:"Lottie animation directive - play Lottie animations",params:{path:"Animation file path",animationData:"Animation data",loop:"Whether to loop",autoplay:"Whether to autoplay"},errors:{invalid_source:"Must provide path or animationData",load_failed:"Failed to load Lottie animation"}},swipe:{description:"Swipe gesture directive - detect swipe direction",params:{threshold:"Swipe threshold",velocity:"Velocity threshold",onSwipe:"Swipe callback"},errors:{invalid_threshold:"Threshold must be a positive number"}},touch:{description:"Touch gesture directive - unified touch event handling",params:{onStart:"Touch start callback",onMove:"Touch move callback",onEnd:"Touch end callback"}},pan:{description:"Pan gesture directive - detect pan operations",params:{threshold:"Trigger threshold",direction:"Pan direction: all, horizontal, vertical"}},pinch:{description:"Pinch gesture directive - detect zoom operations",params:{threshold:"Zoom threshold",onPinch:"Zoom callback"}},rotateGesture:{description:"Rotate gesture directive - detect rotation operations",params:{threshold:"Rotation angle threshold",onRotate:"Rotation callback"}},parallax:{description:"Parallax directive - create parallax scrolling effect",params:{speed:"Parallax speed",direction:"Parallax direction"}},typewriter:{description:"Typewriter directive - typewriter text animation",params:{text:"Text to display",speed:"Typing speed",delay:"Start delay"},errors:{empty_text:"Text content cannot be empty"}},countdown:{description:"Countdown directive - display countdown timer",params:{time:"Countdown time in milliseconds",format:"Time format",onFinish:"Finish callback"},errors:{invalid_time:"Time must be a positive number"}},counter:{description:"Counter directive - number animation",params:{from:"Start value",to:"End value",duration:"Animation duration",decimals:"Decimal places"},errors:{invalid_range:"From and to must be numbers"}},progress:{description:"Progress directive - display progress bar",params:{value:"Progress value (0-100)",showText:"Whether to show text",strokeWidth:"Stroke width"},errors:{invalid_value:"Value must be between 0 and 100"}},emoji:{description:"Emoji picker directive - emoji selector",params:{onSelect:"Select callback",exclude:"Emoji categories to exclude"}},money:{description:"Money input directive - format currency amounts",params:{currency:"Currency symbol",precision:"Decimal places",thousands:"Thousands separator"}},number:{description:"Number input directive - restrict numeric input",params:{min:"Minimum value",max:"Maximum value",precision:"Decimal places"},errors:{invalid_range:"Min must be less than max"}},truncate:{description:"Truncate directive - truncate text",params:{length:"Maximum length",omission:"Omission string"},errors:{invalid_length:"Length must be a positive integer"}},ellipsis:{description:"Ellipsis directive - CSS text overflow ellipsis",params:{lines:"Maximum lines"}},highlight:{description:"Highlight directive - highlight text content",params:{keyword:"Highlight keyword",color:"Highlight color",className:"CSS class name"},errors:{empty_keyword:"Keyword cannot be empty"}},sanitize:{description:"Sanitize directive - sanitize HTML content",params:{allowedTags:"Allowed tags",allowedAttrs:"Allowed attributes"}},focus:{description:"Focus directive - auto-focus element",params:{value:"Whether to focus",preventScroll:"Whether to prevent scroll"}},visible:{description:"Visibility directive - control element visibility",params:{value:"Whether visible"}},blur:{description:"Blur directive - blur element content",params:{value:"Blur amount",transition:"Transition effect"}},hover:{description:"Hover directive - detect mouse hover",params:{onEnter:"Enter callback",onLeave:"Leave callback"}},fade:{description:"Fade directive - fade in/out effect",params:{duration:"Animation duration",delay:"Delay time"}},clickWave:{description:"Click wave directive - click ripple effect",params:{color:"Ripple color",duration:"Animation duration"}},clickDelay:{description:"Click delay directive - prevent rapid clicks",params:{delay:"Delay time"},errors:{invalid_delay:"Delay must be a positive number"}},scroll:{description:"Scroll directive - scroll behavior control",params:{behavior:"Scroll behavior",smooth:"Whether to smooth scroll"}},sticky:{description:"Sticky directive - sticky positioning",params:{offsetTop:"Top offset",offsetBottom:"Bottom offset"}},print:{description:"Print directive - print element content",params:{title:"Print title",onBefore:"Before print callback",onAfter:"After print callback"}},export_:{description:"Export directive - export element content",params:{type:"Export type: image, pdf",filename:"Filename",quality:"Quality"},errors:{unsupported_type:"Unsupported export type"}},pullRefresh:{description:"Pull refresh directive - pull-to-refresh functionality",params:{onRefresh:"Refresh callback",distance:"Trigger distance"},errors:{invalid_handler:"onRefresh must be a function"}},resize:{description:"Resize directive - observe element size changes",params:{handler:"Size change callback",debounce:"Debounce time"},errors:{observer_failed:"Failed to create ResizeObserver"}},mutation:{description:"Mutation directive - observe DOM mutations",params:{handler:"Mutation callback",options:"Observer options"},errors:{observer_failed:"Failed to create MutationObserver"}},ripple:{description:"Ripple directive - Material Design ripple effect",params:{color:"Ripple color",duration:"Animation duration"}},uppercase:{description:"Uppercase directive - convert to uppercase"},lowercase:{description:"Lowercase directive - convert to lowercase"},capitalcase:{description:"Capitalize directive - capitalize first letter"},trim:{description:"Trim directive - trim whitespace"}},errors:{invalid_param:'Invalid parameter "{param}"',missing_required:'Missing required parameter "{param}"',type_error:'Type error for parameter "{param}": expected {expected}, got {actual}',value_out_of_range:'Parameter "{param}" is out of range, should be between {min} and {max}',not_supported:"{feature} is not supported in the current environment",ssr_not_supported:"Directive {directive} does not support SSR"},warnings:{deprecated:"{feature} is deprecated, please use {alternative}",experimental:"{feature} is experimental and may change in future versions",performance:"{feature} may affect performance, use with caution",fallback:"{feature} failed, falling back to {alternative}"},help:{installation:"Install with npm install directix",usage:"Register the Directix plugin in your Vue app",contribution:"See CONTRIBUTING.md for how to contribute"}},jaJP={directives:{debounce:{description:"デバウンスディレクティブ - イベントハンドラの実行を遅延",params:{wait:"遅延時間(ミリ秒)",leading:"遅延開始前に呼び出すかどうか",trailing:"遅延終了後に呼び出すかどうか"},errors:{invalid_wait:'"wait"パラメータが無効です。正の数値を指定してください',invalid_handler:"ハンドラは関数である必要があります"}},throttle:{description:"スロットルディレクティブ - イベントトリガー頻度を制限",params:{interval:"実行間隔(ミリ秒)",leading:"間隔開始時に呼び出すかどうか",trailing:"間隔終了時に呼び出すかどうか"},errors:{invalid_interval:'"interval"パラメータが無効です。正の数値を指定してください',invalid_handler:"ハンドラは関数である必要があります"}},copy:{description:"コピーディレクティブ - クリックでテキストをクリップボードにコピー",params:{value:"コピーするテキスト",onSuccess:"コピー成功時のコールバック",onError:"コピー失敗時のコールバック"},errors:{empty_value:"コピーするテキストがありません",clipboard_failed:"クリップボードAPIが失敗しました。execCommandにフォールバックします"}},lazy:{description:"遅延ロードディレクティブ - 画像またはコンポーネントの読み込みを延期",params:{src:"画像ソースURL",threshold:"インターセクションしきい値",rootMargin:"ルートマージン"},errors:{invalid_src:'"src"パラメータが無効です',observer_failed:"IntersectionObserverの作成に失敗しました"}},permission:{description:"権限ディレクティブ - 権限による要素表示制御",params:{value:"権限値または配列",mode:"権限モード: any または all"},errors:{empty_permission:"権限値を空にすることはできません",invalid_mode:'モードは"any"または"all"である必要があります'}},mask:{description:"入力マスクディレクティブ - 入力内容をフォーマット",params:{pattern:"マスクパターン",placeholder:"プレースホルダー文字",allowIncomplete:"不完全な入力を許可"},errors:{invalid_pattern:'"pattern"パラメータが無効です'}},hotkey:{description:"ホットキーディレクティブ - キーボードショートカットをバインド",params:{key:"キーボードショートカットの組み合わせ",handler:"ハンドラ関数",prevent:"デフォルトの動作を防止するかどうか"},errors:{invalid_key:"ホットキーの形式が無効です",conflict:"ホットキーが競合しています: {key}"}},clickoutside:{description:"クリック外部ディレクティブ - 要素外のクリックを検出",params:{handler:"外部クリック時のハンドラ関数",exclude:"除外する要素"},errors:{invalid_handler:"ハンドラは関数である必要があります"}},longpress:{description:"長押しディレクティブ - 長押しジェスチャーを検出",params:{duration:"押下時間(ミリ秒)",handler:"長押しハンドラ関数"},errors:{invalid_duration:"時間は正の数値である必要があります"}},draggable:{description:"ドラッグ可能ディレクティブ - 要素をドラッグ可能にする",params:{axis:"ドラッグ軸: x、y、または空",bounds:"ドラッグ境界",handle:"ドラッグハンドルセレクタ"},errors:{invalid_bounds:'"bounds"パラメータが無効です'}},intersect:{description:"インターセクトディレクティブ - 要素の可視性を観察",params:{threshold:"可視性しきい値",rootMargin:"ルートマージン",once:"1回だけトリガーするかどうか"},errors:{observer_failed:"IntersectionObserverの作成に失敗しました"}},loading:{description:"ローディングディレクティブ - ロード状態を表示",params:{value:"ロード中かどうか",text:"ロードテキスト",spinner:"ロードスピナー"}},skeleton:{description:"スケルトンディレクティブ - コンテンツプレースホルダーを表示",params:{value:"スケルトンを表示するかどうか",variant:"スケルトンバリアント",animation:"アニメーションタイプ"}},virtualList:{description:"仮想リストディレクティブ - 大量データのレンダリングを最適化",params:{itemSize:"アイテムの高さ",buffer:"バッファサイズ",estimatedSize:"推定サイズ"},errors:{invalid_itemSize:"itemSizeは正の数値である必要があります"}},infiniteScroll:{description:"無限スクロールディレクティブ - スクロールで更に読み込み",params:{handler:"更に読み込むハンドラ関数",distance:"トリガー距離",disabled:"無効かどうか"},errors:{invalid_handler:"ハンドラは関数である必要があります"}},watermark:{description:"透かしディレクティブ - 透かしオーバーレイを追加",params:{content:"透かしコンテンツ",fontSize:"フォントサイズ",color:"透かしの色",opacity:"不透明度"},errors:{empty_content:"透かしコンテンツを空にすることはできません"}},contextmenu:{description:"コンテキストメニューディレクティブ - カスタム右クリックメニュー",params:{items:"メニューアイテムリスト",handler:"メニューアイテムクリックハンドラ"},errors:{empty_items:"メニューアイテムリストを空にすることはできません"}},fullscreen:{description:"フルスクリーンディレクティブ - 要素をフルスクリーンに切り替え",params:{value:"フルスクリーンかどうか",onEnter:"フルスクリーン进入コールバック",onExit:"フルスクリーン終了コールバック"},errors:{not_supported:"このブラウザではフルスクリーンAPIがサポートされていません"}},imagePreview:{description:"画像プレビューディレクティブ - クリックで画像をプレビュー",params:{src:"画像ソースURL",list:"画像リスト",initialIndex:"初期インデックス"},errors:{invalid_src:'"src"パラメータが無効です'}},tooltip:{description:"ツールチップディレクティブ - ホバーツールチップを表示",params:{content:"ツールチップコンテンツ",placement:"表示位置",trigger:"トリガー方法"},errors:{empty_content:"ツールチップコンテンツを空にすることはできません"}},lottie:{description:"Lottieアニメーションディレクティブ - Lottieアニメーションを再生",params:{path:"アニメーションファイルパス",animationData:"アニメーションデータ",loop:"ループするかどうか",autoplay:"自動再生するかどうか"},errors:{invalid_source:"pathまたはanimationDataを指定してください",load_failed:"Lottieアニメーションの読み込みに失敗しました"}},swipe:{description:"スワイプジェスチャーディレクティブ - スワイプ方向を検出",params:{threshold:"スワイプしきい値",velocity:"速度しきい値",onSwipe:"スワイプコールバック"},errors:{invalid_threshold:"しきい値は正の数値である必要があります"}},touch:{description:"タッチジェスチャーディレクティブ - 統一タッチイベント処理",params:{onStart:"タッチ開始コールバック",onMove:"タッチ移動コールバック",onEnd:"タッチ終了コールバック"}},pan:{description:"パンジェスチャーディレクティブ - パン操作を検出",params:{threshold:"トリガーしきい値",direction:"パン方向: all、horizontal、vertical"}},pinch:{description:"ピンチジェスチャーディレクティブ - ズーム操作を検出",params:{threshold:"ズームしきい値",onPinch:"ズームコールバック"}},rotateGesture:{description:"回転ジェスチャーディレクティブ - 回転操作を検出",params:{threshold:"回転角度しきい値",onRotate:"回転コールバック"}},parallax:{description:"パララックスディレクティブ - パララックススクロール効果を作成",params:{speed:"パララックス速度",direction:"パララックス方向"}},typewriter:{description:"タイプライターディレクティブ - タイプライターテキストアニメーション",params:{text:"表示するテキスト",speed:"タイピング速度",delay:"開始遅延"},errors:{empty_text:"テキストコンテンツを空にすることはできません"}},countdown:{description:"カウントダウンディレクティブ - カウントダウンタイマーを表示",params:{time:"カウントダウン時間(ミリ秒)",format:"時間形式",onFinish:"終了コールバック"},errors:{invalid_time:"時間は正の数値である必要があります"}},counter:{description:"カウンターディレクティブ - 数字アニメーション",params:{from:"開始値",to:"終了値",duration:"アニメーション時間",decimals:"小数点以下の桁数"},errors:{invalid_range:"fromとtoは数値である必要があります"}},progress:{description:"プログレスディレクティブ - プログレスバーを表示",params:{value:"プログレス値(0-100)",showText:"テキストを表示するかどうか",strokeWidth:"ストローク幅"},errors:{invalid_value:"値は0から100の間である必要があります"}},emoji:{description:"絵文字ピッカーディレクティブ - 絵文字セレクター",params:{onSelect:"選択コールバック",exclude:"除外する絵文字カテゴリ"}},money:{description:"金額入力ディレクティブ - 通貨金額をフォーマット",params:{currency:"通貨記号",precision:"小数点以下の桁数",thousands:"千単位の区切り文字"}},number:{description:"数値入力ディレクティブ - 数値入力を制限",params:{min:"最小値",max:"最大値",precision:"小数点以下の桁数"},errors:{invalid_range:"minはmaxより小さい必要があります"}},truncate:{description:"トランケートディレクティブ - テキストを切り捨て",params:{length:"最大長",omission:"省略文字列"},errors:{invalid_length:"長さは正の整数である必要があります"}},ellipsis:{description:"エリプシスディレクティブ - CSSテキストオーバーフローの省略",params:{lines:"最大行数"}},highlight:{description:"ハイライトディレクティブ - テキストコンテンツをハイライト",params:{keyword:"ハイライトキーワード",color:"ハイライト色",className:"CSSクラス名"},errors:{empty_keyword:"キーワードを空にすることはできません"}},sanitize:{description:"サニタイズディレクティブ - HTMLコンテンツをサニタイズ",params:{allowedTags:"許可するタグ",allowedAttrs:"許可する属性"}},focus:{description:"フォーカスディレクティブ - 要素を自動フォーカス",params:{value:"フォーカスするかどうか",preventScroll:"スクロールを防止するかどうか"}},visible:{description:"可視性ディレクティブ - 要素の表示を制御",params:{value:"可視かどうか"}},blur:{description:"ブラーディレクティブ - 要素コンテンツをぼかす",params:{value:"ぼかし量",transition:"トランジション効果"}},hover:{description:"ホバーディレクティブ - マウスホバーを検出",params:{onEnter:"进入コールバック",onLeave:"離脱コールバック"}},fade:{description:"フェードディレクティブ - フェードイン/アウト効果",params:{duration:"アニメーション時間",delay:"遅延時間"}},clickWave:{description:"クリック波紋ディレクティブ - クリック波紋効果",params:{color:"波紋の色",duration:"アニメーション時間"}},clickDelay:{description:"クリック遅延ディレクティブ - 連続クリックを防止",params:{delay:"遅延時間"},errors:{invalid_delay:"遅延は正の数値である必要があります"}},scroll:{description:"スクロールディレクティブ - スクロール動作を制御",params:{behavior:"スクロール動作",smooth:"スムーズスクロールかどうか"}},sticky:{description:"スティッキーディレクティブ - スティッキー配置",params:{offsetTop:"上オフセット",offsetBottom:"下オフセット"}},print:{description:"印刷ディレクティブ - 要素コンテンツを印刷",params:{title:"印刷タイトル",onBefore:"印刷前コールバック",onAfter:"印刷後コールバック"}},export_:{description:"エクスポートディレクティブ - 要素コンテンツをエクスポート",params:{type:"エクスポートタイプ: image、pdf",filename:"ファイル名",quality:"品質"},errors:{unsupported_type:"サポートされていないエクスポートタイプ"}},pullRefresh:{description:"プル更新ディレクティブ - プルツーリフレッシュ機能",params:{onRefresh:"更新コールバック",distance:"トリガー距離"},errors:{invalid_handler:"onRefreshは関数である必要があります"}},resize:{description:"リサイズディレクティブ - 要素サイズの変化を観察",params:{handler:"サイズ変更コールバック",debounce:"デバウンス時間"},errors:{observer_failed:"ResizeObserverの作成に失敗しました"}},mutation:{description:"ミューテーションディレクティブ - DOMの変化を観察",params:{handler:"ミューテーションコールバック",options:"オブザーバーオプション"},errors:{observer_failed:"MutationObserverの作成に失敗しました"}},ripple:{description:"リップルディレクティブ - Material Designリップル効果",params:{color:"リップルの色",duration:"アニメーション時間"}},uppercase:{description:"大文字ディレクティブ - 大文字に変換"},lowercase:{description:"小文字ディレクティブ - 小文字に変換"},capitalcase:{description:"先頭大文字ディレクティブ - 先頭を大文字に"},trim:{description:"トリムディレクティブ - 空白をトリム"}},errors:{invalid_param:'パラメータ"{param}"が無効です',missing_required:'必須パラメータ"{param}"が不足しています',type_error:'パラメータ"{param}"の型エラー: {expected}を期待しましたが、{actual}です',value_out_of_range:'パラメータ"{param}"が範囲外です。{min}から{max}の間である必要があります',not_supported:"{feature}は現在の環境でサポートされていません",ssr_not_supported:"ディレクティブ{directive}はSSRをサポートしていません"},warnings:{deprecated:"{feature}は非推奨です。{alternative}を使用してください",experimental:"{feature}は実験的機能で、将来のバージョンで変更される可能性があります",performance:"{feature}はパフォーマンスに影響する可能性があります。慎重に使用してください",fallback:"{feature}が失敗しました。{alternative}にフォールバックします"},help:{installation:"npm install directix でインストール",usage:"VueアプリにDirectixプラグインを登録してください",contribution:"貢献方法はCONTRIBUTING.mdを参照してください"}},allDirectives={blur:vBlur,"click-outside":vClickOutside,"click-delay":vClickDelay,"click-wave":vClickWave,"context-menu":vContextMenu,copy:vCopy,debounce:vDebounce,throttle:vThrottle,focus:vFocus,hotkey:vHotkey,lazy:vLazy,intersect:vIntersect,visible:vVisible,loading:vLoading,scroll:vScroll,"infinite-scroll":vInfiniteScroll,sticky:vSticky,"long-press":vLongPress,hover:vHover,ripple:vRipple,mask:vMask,permission:vPermission,sanitize:vSanitize,resize:vResize,mutation:vMutation,truncate:vTruncate,ellipsis:vEllipsis,uppercase:vUppercase,lowercase:vLowercase,capitalcase:vCapitalcase,number:vNumber,money:vMoney,trim:vTrim,tooltip:vTooltip,draggable:vDraggable,touch:vTouch,swipe:vSwipe,"image-preview":vImagePreview,countdown:vCountdown,watermark:vWatermark,print:vPrint,"virtual-list":vVirtualList,"pull-refresh":vPullRefresh,counter:vCounter,emoji:vEmoji,export:vExport,fade:vFade,fullscreen:vFullscreen,highlight:vHighlight,lottie:vLottie,pan:vPan,parallax:vParallax,pinch:vPinch,progress:vProgress,"rotate-gesture":vRotateGesture,skeleton:vSkeleton,typewriter:vTypewriter},install=(e,t={})=>{var n,r,o,i,s,a,l;let c=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))c=2;else if((null==e?void 0:e.config)&&(null==(r=null==e?void 0:e.version)?void 0:r.startsWith("3")))c=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(o=e.version)?void 0:o.startsWith("2")))c=2;else if("undefined"!=typeof window){const e=window;(null==(s=null==(i=e.Vue)?void 0:i.version)?void 0:s.startsWith("2"))?c=2:(null==(l=null==(a=e.Vue)?void 0:a.version)?void 0:l.startsWith("3"))&&(c=3)}c&&setVueVersion(c);const{directives:u,all:d=!1}=t;d||!u?Object.entries(allDirectives).forEach(([t,n])=>{e.directive(t,n)}):u.forEach(t=>{const n=allDirectives[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})},Directix={install:install};exports.BREAKING_CHANGES_REGISTRY=BREAKING_CHANGES_REGISTRY,exports.BROWSER_TARGETS=BROWSER_TARGETS,exports.ComputedCache=ComputedCache,exports.DEFAULT_AUDIT_LOG_CONFIG=DEFAULT_AUDIT_LOG_CONFIG,exports.DEFAULT_BENCHMARK_CONFIG=DEFAULT_BENCHMARK_CONFIG,exports.DEFAULT_BREAKING_CHANGES_CONFIG=DEFAULT_BREAKING_CHANGES_CONFIG,exports.DEFAULT_CONFIG_CENTER_CONFIG=DEFAULT_CONFIG_CENTER_CONFIG,exports.DEFAULT_EDGE_CASE_CONFIG=DEFAULT_EDGE_CASE_CONFIG,exports.DEFAULT_ENTERPRISE_PERMISSION_CONFIG=DEFAULT_ENTERPRISE_PERMISSION_CONFIG,exports.DEFAULT_FIRST_SCREEN_CONFIG=DEFAULT_FIRST_SCREEN_CONFIG,exports.DEFAULT_MONITORING_CONFIG=DEFAULT_MONITORING_CONFIG,exports.DEFAULT_PERFORMANCE_CONFIG=DEFAULT_PERFORMANCE_CONFIG,exports.DOMQueryCache=DOMQueryCache,exports.Directix=Directix,exports.EnterprisePermissionManager=EnterprisePermissionManager,exports.EventBatchProcessor=EventBatchProcessor,exports.FEATURE_MATRIX=FEATURE_MATRIX,exports.LazyInitializer=LazyInitializer,exports.MOBILE_DEVICES=MOBILE_DEVICES,exports.MemoryCleanupManager=MemoryCleanupManager,exports.ObjectPool=ObjectPool,exports.PluginManager=PluginManager,exports.PluginRegistry=PluginRegistry,exports.SafeContentHandler=SafeContentHandler,exports.SecurityAudit=SecurityAudit,exports.WeakCache=WeakCache,exports.acknowledgeAlert=acknowledgeAlert,exports.addCleanupVue2=addCleanup$1,exports.addCleanupVue3=addCleanup,exports.addHealthCheck=addHealthCheck,exports.addNonPassiveListener=addNonPassiveListener,exports.addPassiveListener=addPassiveListener,exports.announce=announce,exports.applyAriaAttributes=applyAriaAttributes,exports.applyDirectiveToCustomElement=applyDirectiveToCustomElement,exports.assert=assert,exports.assertPositive=assertPositive,exports.assertRange=assertRange,exports.assertType=assertType,exports.audit=audit,exports.benchmark=benchmark,exports.calculateStats=calculateStats,exports.calculateTTI=calculateTTI,exports.calculateTime=calculateTime,exports.cancelIdleCallback=cancelIdleCallback,exports.capitalizeText=capitalizeText,exports.capitalizeWord=capitalizeWord,exports.checkAPIUsage=checkAPIUsage,exports.checkDependency=checkDependency,exports.cleanupFirstScreenOptimizer=cleanupFirstScreenOptimizer,exports.clearAlerts=clearAlerts,exports.clearAnnouncer=clearAnnouncer,exports.clearAriaAttributes=clearAriaAttributes,exports.clearAuditLogs=clearAuditLogs,exports.clearBenchmarkResults=clearBenchmarkResults,exports.clearDevtoolsState=clearDevtoolsState,exports.clearEdgeCaseWarnings=clearEdgeCaseWarnings,exports.clearPerformanceMetrics=clearPerformanceMetrics,exports.clearWarnedChanges=clearWarnedChanges,exports.clearWarnedFeatures=clearWarnedFeatures,exports.compareBenchmarks=compareBenchmarks,exports.compareSnapshots=compareSnapshots,exports.compareVersions=compareVersions,exports.computedWithCleanup=computedWithCleanup,exports.configureAuditLog=configureAuditLog,exports.configureBenchmark=configureBenchmark,exports.configureBreakingChanges=configureBreakingChanges,exports.configureCompatibility=configureCompatibility,exports.configureConfigCenter=configureConfigCenter,exports.configureEdgeCase=configureEdgeCase,exports.configureEnterprisePermission=configureEnterprisePermission,exports.configureFirstScreen=configureFirstScreen,exports.configureMonitoring=configureMonitoring,exports.configurePerformance=configurePerformance,exports.configurePerformanceOptimization=configurePerformanceOptimization,exports.configurePermission=configurePermission,exports.createAuditLogMiddleware=createAuditLogMiddleware,exports.createCapitalizer=createCapitalizer,exports.createDebouncedResizeHandler=createDebouncedResizeHandler,exports.createDelayedClick=createDelayedClick,exports.createDeprecationWarning=createDeprecationWarning,exports.createDirectiveBenchmark=createDirectiveBenchmark,exports.createDirectiveElement=createDirectiveElement,exports.createDirectiveTemplate=createDirectiveTemplate,exports.createEventDirective=createEventDirective,exports.createI18n=createI18n,exports.createLazyLoader=createLazyLoader,exports.createLowercaser=createLowercaser,exports.createMoneyFormatter=createMoneyFormatter,exports.createNumberFormatter=createNumberFormatter,exports.createPerformanceBudget=createPerformanceBudget,exports.createPermissionCheck=createPermissionCheck,exports.createPermissionChecker=createPermissionChecker,exports.createSSRSafeCustomElement=createSSRSafeCustomElement,exports.createSafeContentHandler=createSafeContentHandler,exports.createSafeDirectiveWrapper=createSafeDirectiveWrapper,exports.createStyleDirective=createStyleDirective,exports.createTrimmer=createTrimmer,exports.createUppercaser=createUppercaser,exports.createVue2Directive=createVue2Directive,exports.createVue3Directive=createVue3Directive,exports.createWatermarkUrl=createWatermarkUrl,exports.debounceFn=debounceFn,exports.debug=debug,exports.deepClone=deepClone,exports.deepMerge=deepMerge,exports.deferNonCriticalDirective=deferNonCriticalDirective,exports.deferTask=deferTask,exports.defineCustomElementDirective=defineCustomElementDirective,exports.defineDirective=defineDirective,exports.defineDirectiveGroup=defineDirectiveGroup,exports.definePlugin=definePlugin,exports.deleteConfig=deleteConfig,exports.detectBreakingChangesInCode=detectBreakingChangesInCode,exports.detectLegacyUsage=detectLegacyUsage,exports.detectLocaleInfo=detectLocaleInfo,exports.detectResizeLoop=detectResizeLoop,exports.detectScrollJank=detectScrollJank,exports.directiveError=directiveError,exports.directiveWarn=directiveWarn,exports.disableDevtools=disableDevtools,exports.disablePerformance=disablePerformance,exports.enUS=enUS,exports.enableDevtools=enableDevtools,exports.enablePerformance=enablePerformance,exports.endMeasure=endMeasure,exports.ensureTeleportTarget=ensureTeleportTarget,exports.error=error,exports.escapeHtml=escapeHtml,exports.estimateMigrationEffort=estimateMigrationEffort,exports.executeDeferredTasks=executeDeferredTasks,exports.exportAuditLogs=exportAuditLogs,exports.exportBenchmarkResults=exportBenchmarkResults,exports.exportConfig=exportConfig,exports.exportPerformanceData=exportPerformanceData,exports.exportPrometheusMetrics=exportPrometheusMetrics,exports.extractCriticalCSS=extractCriticalCSS,exports.formatCurrencyLocale=formatCurrencyLocale,exports.formatDateLocale=formatDateLocale,exports.formatMoney=formatMoney,exports.formatNumber=formatNumber,exports.formatNumberLocale=formatNumberLocale,exports.formatTime=formatTime,exports.generateAriaId=generateAriaId,exports.generateBenchmarkReport=generateBenchmarkReport,exports.generateBreakingChangesReport=generateBreakingChangesReport,exports.generateBrowserslistConfig=generateBrowserslistConfig,exports.generateCompatibilityReport=generateCompatibilityReport,exports.generateId=generateId,exports.generateMigrationReport=generateMigrationReport,exports.get=get,exports.getAlerts=getAlerts,exports.getAllBenchmarkResults=getAllBenchmarkResults,exports.getAllBreakingChanges=getAllBreakingChanges,exports.getAllConfig=getAllConfig,exports.getAuditLogById=getAuditLogById,exports.getAuditLogConfig=getAuditLogConfig,exports.getAuditLogStats=getAuditLogStats,exports.getAuditLogs=getAuditLogs,exports.getAutoAriaConfig=getAutoAriaConfig,exports.getBenchmarkConfig=getBenchmarkConfig,exports.getBenchmarkResult=getBenchmarkResult,exports.getBreakingChangesByCategory=getBreakingChangesByCategory,exports.getBreakingChangesBySeverity=getBreakingChangesBySeverity,exports.getBreakingChangesConfig=getBreakingChangesConfig,exports.getBreakingChangesForAPI=getBreakingChangesForAPI,exports.getBreakingChangesForVersion=getBreakingChangesForVersion,exports.getBrowserCompatibilityReport=getBrowserCompatibilityReport,exports.getBrowserInfo=getBrowserInfo,exports.getBrowsersSupportingFeature=getBrowsersSupportingFeature,exports.getCSPNonce=getCSPNonce,exports.getCompatibilityConfig=getCompatibilityConfig,exports.getCompatibilityMatrix=getCompatibilityMatrix,exports.getConfig=getConfig,exports.getConfigCenterConfig=getConfigCenterConfig,exports.getConfigSnapshots=getConfigSnapshots,exports.getConfigStats=getConfigStats,exports.getCounterValue=getCounterValue,exports.getDOMQueryCache=getDOMQueryCache,exports.getDateFormat=getDateFormat,exports.getDevicePixelRatio=getDevicePixelRatio,exports.getDevtoolsState=getDevtoolsState,exports.getDirectiveMetrics=getDirectiveMetrics,exports.getEdgeCaseConfig=getEdgeCaseConfig,exports.getEdgeCaseWarnings=getEdgeCaseWarnings,exports.getElementWithFallback=getElementWithFallback,exports.getEventBatchProcessor=getEventBatchProcessor,exports.getFeatureSupport=getFeatureSupport,exports.getFirstScreenConfig=getFirstScreenConfig,exports.getFirstScreenMetrics=getFirstScreenMetrics,exports.getGaugeValue=getGaugeValue,exports.getHealthStatus=getHealthStatus,exports.getHistogramStats=getHistogramStats,exports.getLocale=getLocale,exports.getLocaleDisplayName=getLocaleDisplayName,exports.getMemoryCleanupManager=getMemoryCleanupManager,exports.getMemoryStats=getMemoryStats,exports.getMetrics=getMetrics,exports.getMigrationRules=getMigrationRules,exports.getMigrationTimeline=getMigrationTimeline,exports.getMissingPolyfills=getMissingPolyfills,exports.getMonitoringConfig=getMonitoringConfig,exports.getMonitoringStats=getMonitoringStats,exports.getMostFrequentDirectives=getMostFrequentDirectives,exports.getNumberFormat=getNumberFormat,exports.getObserverCount=getObserverCount,exports.getPerformanceMetrics=getPerformanceMetrics,exports.getPerformanceOptimizationConfig=getPerformanceOptimizationConfig,exports.getPerformanceReport=getPerformanceReport,exports.getPermissionConfig=getPermissionConfig,exports.getPermissionManager=getPermissionManager,exports.getPluginManager=getPluginManager,exports.getPluginRegistry=getPluginRegistry,exports.getPolyfillStatus=getPolyfillStatus,exports.getRegisteredCustomElements=getRegisteredCustomElements,exports.getSlowestDirectives=getSlowestDirectives,exports.getSupportedRegions=getSupportedRegions,exports.getTimezoneInfo=getTimezoneInfo,exports.getUnsupportedFeatures=getUnsupportedFeatures,exports.getVueVersion=getVueVersion,exports.getWarnedChanges=getWarnedChanges,exports.handleSSRUnsupported=handleSSRUnsupported,exports.handleTouchConflict=handleTouchConflict,exports.hasPermission=hasPermission$2,exports.hasPermissionSync=hasPermissionSync,exports.hydrateCustomElements=hydrateCustomElements,exports.importConfig=importConfig,exports.incrementCounter=incrementCounter,exports.info=info,exports.initConfigCenter=initConfigCenter,exports.initFirstScreenOptimizer=initFirstScreenOptimizer,exports.injectScriptCSP=injectScriptCSP,exports.injectStylesCSP=injectStylesCSP,exports.inlineCriticalCSS=inlineCriticalCSS,exports.isAPIAffected=isAPIAffected,exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isBrowser=isBrowser,exports.isBrowserSupported=isBrowserSupported,exports.isCustomElement=isCustomElement,exports.isCustomElementDefined=isCustomElementDefined,exports.isDOMReady=isDOMReady,exports.isDevtoolsAvailable=isDevtoolsAvailable,exports.isEmpty=isEmpty,exports.isFeatureSupported=isFeatureSupported,exports.isFullySupported=isFullySupported,exports.isFunction=isFunction,exports.isInViewport=isInViewport,exports.isMobileDevice=isMobileDevice,exports.isNumber=isNumber,exports.isObject=isObject,exports.isPageLoaded=isPageLoaded,exports.isPerformanceEnabled=isPerformanceEnabled,exports.isPolyfillLoaded=isPolyfillLoaded,exports.isPromise=isPromise,exports.isSSR=isSSR$2,exports.isSSREnvironment=isSSR$1,exports.isString=isString,exports.isTouchDevice=isTouchDevice,exports.isUnsupportedBrowser=isUnsupportedBrowser,exports.isUrlSafe=isUrlSafe,exports.isVersionAffected=isVersionAffected,exports.isVue2=isVue2,exports.isVue27=isVue27,exports.isVue3=isVue3,exports.jaJP=jaJP,exports.logAudit=logAudit,exports.logDirectiveOperation=logDirectiveOperation,exports.logPerformanceIssue=logPerformanceIssue,exports.logPermissionCheck=logPermissionCheck,exports.logSecurityViolation=logSecurityViolation,exports.lowercaseText=lowercaseText,exports.markPolyfillLoaded=markPolyfillLoaded,exports.measurePerformance=measurePerformance,exports.measurePerformanceAsync=measurePerformanceAsync,exports.meetsMinimumRequirements=meetsMinimumRequirements,exports.migrate=migrate,exports.needsMigration=needsMigration,exports.onDOMReady=onDOMReady,exports.onPageLoad=onPageLoad,exports.parseLocale=parseLocale,exports.parseMoney=parseMoney,exports.parseNumber=parseNumber,exports.parseTargetTime=parseTargetTime,exports.parseTime=parseTime,exports.prefetchModule=prefetchModule,exports.prefetchVisibleElements=prefetchVisibleElements,exports.preloadModule=preloadModule,exports.quickPrint=quickPrint,exports.recordHistogram=recordHistogram,exports.registerDirectiveElements=registerDirectiveElements,exports.registerPolyfill=registerPolyfill,exports.removeHealthCheck=removeHealthCheck,exports.requestIdleCallback=requestIdleCallback,exports.resetBrowserInfo=resetBrowserInfo,exports.resetConfigCenter=resetConfigCenter,exports.resetMonitoring=resetMonitoring,exports.resetPerformanceOptimizer=resetPerformanceOptimizer,exports.resetPluginManager=resetPluginManager,exports.resetPluginRegistry=resetPluginRegistry,exports.resetVueVersion=resetVueVersion,exports.resolveAlert=resolveAlert,exports.rollbackConfig=rollbackConfig,exports.runBenchmark=runBenchmark,exports.runBenchmarkSuite=runBenchmarkSuite,exports.runMemoryCleanup=runMemoryCleanup,exports.safeQueryElement=safeQueryElement,exports.sanitizeHtml=sanitizeHtml,exports.sanitizeUrl=sanitizeUrl,exports.set=set,exports.setConfig=setConfig,exports.setGauge=setGauge,exports.setLocale=setLocale,exports.setVueVersion=setVueVersion,exports.setWarningDevMode=setWarningDevMode,exports.setWarningI18n=setWarningI18n,exports.setWarningLevel=setWarningLevel,exports.setupCleanupOnUnload=setupCleanupOnUnload,exports.startMeasure=startMeasure,exports.stopCleanupTimer=stopCleanupTimer,exports.stripHtml=stripHtml,exports.supportsClipboard=supportsClipboard,exports.supportsIntersectionObserver=supportsIntersectionObserver,exports.supportsMutationObserver=supportsMutationObserver,exports.supportsPassive=supportsPassive,exports.supportsResizeObserver=supportsResizeObserver,exports.syncConfigToRemote=syncConfigToRemote,exports.t=t,exports.takePerformanceSnapshot=takePerformanceSnapshot,exports.teleportContent=teleportContent,exports.throttleFn=throttleFn,exports.timeOperation=timeOperation,exports.trackDirective=trackDirective,exports.trackObserver=trackObserver,exports.trackPlugin=trackPlugin,exports.triggerAlert=triggerAlert,exports.triggerHaptic=triggerHaptic,exports.trimText=trimText,exports.truncateText=truncateText,exports.unescapeHtml=unescapeHtml,exports.untrackDirective=untrackDirective,exports.untrackObserver=untrackObserver,exports.untrackPlugin=untrackPlugin,exports.uppercaseText=uppercaseText,exports.useBlur=useBlur,exports.useCapitalcase=useCapitalcase,exports.useClickDelay=useClickDelay,exports.useClickOutside=useClickOutside,exports.useClickWave=useClickWave,exports.useContextMenu=useContextMenu,exports.useCopy=useCopy,exports.useCountdown=useCountdown,exports.useCounter=useCounter,exports.useDebounce=useDebounce,exports.useDirectiveInstance=useDirectiveInstance,exports.useDraggable=useDraggable,exports.useEllipsis=useEllipsis,exports.useEmoji=useEmoji,exports.useEnhancedTouch=useEnhancedTouch,exports.useExport=useExport,exports.useFade=useFade,exports.useFocus=useFocus,exports.useFocusTrap=useFocusTrap,exports.useFullscreen=useFullscreen,exports.useHighlight=useHighlight,exports.useHotkey=useHotkey,exports.useHover=useHover,exports.useImagePreview=useImagePreview,exports.useInfiniteScroll=useInfiniteScroll,exports.useIntersect=useIntersect,exports.useKeyboardNavigation=useKeyboardNavigation,exports.useLazy=useLazy,exports.useLazyOptimized=useLazyOptimized,exports.useLoading=useLoading,exports.useLongPress=useLongPress,exports.useLottie=useLottie,exports.useLowercase=useLowercase,exports.useMask=useMask,exports.useMoney=useMoney,exports.useMutation=useMutation,exports.useNumber=useNumber,exports.usePWA=usePWA,exports.usePan=usePan,exports.useParallax=useParallax,exports.usePermission=usePermission,exports.usePinch=usePinch,exports.usePrint=usePrint,exports.useProgress=useProgress,exports.usePullRefresh=usePullRefresh,exports.useResize=useResize,exports.useRipple=useRipple,exports.useRotateGesture=useRotateGesture,exports.useSanitize=useSanitize,exports.useScroll=useScroll,exports.useSkeleton=useSkeleton,exports.useSticky=useSticky,exports.useSuspenseDirective=useSuspenseDirective,exports.useSwipe=useSwipe,exports.useThrottle=useThrottle,exports.useTooltip=useTooltip,exports.useTouch=useTouch,exports.useTrim=useTrim,exports.useTruncate=useTruncate,exports.useTypewriter=useTypewriter,exports.useUppercase=useUppercase,exports.useVirtualList=useVirtualList,exports.useVisible=useVisible,exports.useWatermark=useWatermark,exports.vBlur=vBlur,exports.vCapitalcase=vCapitalcase,exports.vClickDelay=vClickDelay,exports.vClickOutside=vClickOutside,exports.vClickWave=vClickWave,exports.vContextMenu=vContextMenu,exports.vCopy=vCopy,exports.vCountdown=vCountdown,exports.vCounter=vCounter,exports.vDebounce=vDebounce,exports.vDraggable=vDraggable,exports.vEllipsis=vEllipsis,exports.vEmoji=vEmoji,exports.vExport=vExport,exports.vFade=vFade,exports.vFocus=vFocus,exports.vFullscreen=vFullscreen,exports.vHighlight=vHighlight,exports.vHotkey=vHotkey,exports.vHover=vHover,exports.vImagePreview=vImagePreview,exports.vInfiniteScroll=vInfiniteScroll,exports.vIntersect=vIntersect,exports.vLazy=vLazy,exports.vLoading=vLoading,exports.vLongPress=vLongPress,exports.vLottie=vLottie,exports.vLowercase=vLowercase,exports.vMask=vMask,exports.vMoney=vMoney,exports.vMutation=vMutation,exports.vNumber=vNumber,exports.vPan=vPan,exports.vParallax=vParallax,exports.vPermission=vPermission,exports.vPinch=vPinch,exports.vPrint=vPrint,exports.vProgress=vProgress,exports.vPullRefresh=vPullRefresh,exports.vResize=vResize,exports.vRipple=vRipple,exports.vRotateGesture=vRotateGesture,exports.vSanitize=vSanitize,exports.vScroll=vScroll,exports.vSkeleton=vSkeleton,exports.vSticky=vSticky,exports.vSwipe=vSwipe,exports.vThrottle=vThrottle,exports.vTooltip=vTooltip,exports.vTouch=vTouch,exports.vTrim=vTrim,exports.vTruncate=vTruncate,exports.vTypewriter=vTypewriter,exports.vUppercase=vUppercase,exports.vVirtualList=vVirtualList,exports.vVisible=vVisible,exports.vWatermark=vWatermark,exports.validateBinding=validateBinding,exports.waitForDOMReady=waitForDOMReady,exports.warn=warn,exports.warnBreakingChange=warnBreakingChange,exports.warnDeprecated=warnDeprecated,exports.warnInvalidParam=warnInvalidParam,exports.warnMissingParam=warnMissingParam,exports.warnNotSupported=warnNotSupported,exports.warnSSRNotSupported=warnSSRNotSupported,exports.warnUnsupportedFeatureOnce=warnUnsupportedFeatureOnce,exports.warnUnsupportedFeatures=warnUnsupportedFeatures,exports.watchConfig=watchConfig,exports.watchEffectBinding=watchEffectBinding,exports.whenCustomElementDefined=whenCustomElementDefined,exports.withAuditLog=withAuditLog,exports.withErrorRecovery=withErrorRecovery,exports.withPerformanceMonitoring=withPerformanceMonitoring,exports.wouldTextTruncate=wouldTextTruncate,exports.zhCN=zhCN,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})})(this.Directix=this.Directix||{},Vue);
|