@smartos-lib/components 1.8.1 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -64,5 +64,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
64
64
|
`]],["__scopeId","data-v-01a5af76"]]),v3=eu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(p3,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(jA)],64))}}),[["styles",[`@charset "UTF-8";[data-use-vue-component-wrap],[__use_react_component_wrap]{display:contents}.smart-docx-editor{font-size:1rem;line-height:1.5rem;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.3s;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%}.smart-docx-editor>:first-child{margin-top:0!important}docx-h1,docx-h2,docx-h3,docx-h4,docx-h5,docx-h6{display:block;font-weight:700}docx-h1{margin-top:26px;margin-bottom:10px;font-size:26px}docx-h2{margin-top:22px;margin-bottom:8px;font-size:22px}docx-h3{margin-top:20px;margin-bottom:8px;font-size:20px}docx-h4{margin-top:18px;margin-bottom:8px;font-size:18px}docx-h5{margin-top:18px;margin-bottom:8px;font-size:16px}docx-h6{margin-top:16px;margin-bottom:8px;font-size:16px}docx-blockquote{display:block;--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity));border-left-width:2px;--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgb(163 163 163 / var(--un-border-left-opacity));border-left-style:solid;margin-top:.5rem;margin-bottom:.5rem;padding-left:.75rem}:host-context(.dark) docx-blockquote{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}docx-ul,docx-ol,docx-li{display:block}docx-li{list-style-type:none}docx-li:not(.ordered){position:relative;padding-left:1.5rem;line-height:1.5rem}docx-li:not(.ordered):before{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 14a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;pointer-events:none;position:absolute;top:0;left:0;display:flex;--un-translate-x:-25%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));align-items:center;justify-content:left;content:"";width:1.5rem;height:1.5rem}
|
65
65
|
`,`*[data-v-1360e702],[data-v-1360e702]:before,[data-v-1360e702]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-1360e702]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
|
66
66
|
`]],["__scopeId","data-v-1360e702"]]),h3=eu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(v3,v.normalizeProps(v.guardReactiveProps(t)),null,16))}}),[["styles",[`*[data-v-9cb0b441],[data-v-9cb0b441]:before,[data-v-9cb0b441]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9cb0b441]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
|
67
|
-
`]],["__scopeId","data-v-9cb0b441"]]),m3="1.8.
|
68
|
-
`]],["__scopeId","data-v-6eedc1cf"]]),C3="smart-docx-editor";function w3(e,t){var n;tE&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}w3(C3,D3)})((Hy=SmartCore["1.8.
|
67
|
+
`]],["__scopeId","data-v-9cb0b441"]]),m3="1.8.3";function g3(e=eE()){const t=Fa(),n=`style[cssr-id^="${e}-"]`;return v.onMounted(()=>{function r(){const o=t.value.parentNode;o.querySelectorAll(n).forEach(u=>{o.removeChild(u)}),Array.from(document.querySelectorAll(n)).forEach(u=>{o.appendChild(u.cloneNode()).textContent=u.textContent})}qw(document.head,r,{childList:!0}),r()}),e}function y3(){const e=Fa();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[m3])??{};if(n&&(t.appendChild(document.createElement("style")).textContent=n),r){const u=document.createElement("style");u.setAttribute("namespace","smart"),t.appendChild(u).textContent=r,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(u.cloneNode()).textContent=r)}}),{classPrefix:g3()}}const D3=eu(v.defineComponent({__name:"App",props:{initialValue:{type:null}},emits:["change"],setup(e,{emit:t}){const n=t;return y3(),$p.on(r=>{n("change",r)}),v.onMounted(()=>{Oa.value=Fa().value.parentNode}),(r,o)=>{const u=TD;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(h3,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",[`*[data-v-6eedc1cf],[data-v-6eedc1cf]:before,[data-v-6eedc1cf]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-6eedc1cf]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
|
68
|
+
`]],["__scopeId","data-v-6eedc1cf"]]),C3="smart-docx-editor";function w3(e,t){var n;tE&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}w3(C3,D3)})((Hy=SmartCore["1.8.3"])==null?void 0:Hy.Vue);
|
@@ -12,7 +12,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
12
12
|
monaco.config({ paths: { vs: '...' } })
|
13
13
|
|
14
14
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
15
|
-
`},Qt=Cr(Or)(Jt),Nr={config:zr},Ir=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function en(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],en(t[n],e[n]))}),Yt(Yt({},t),e)}var Br={type:"cancelation",msg:"operation is manually canceled"};function rt(t){var e=!1,n=new Promise(function(i,r){t.then(function(o){return e?r(Br):i(o)}),t.catch(r)});return n.cancel=function(){return e=!0},n}var Dr=Er.create({config:_r,isInitialized:!1,resolve:null,reject:null,monaco:null}),tn=or(Dr,2),ke=tn[0],Pe=tn[1];function Pr(t){var e=Nr.config(t),n=e.monaco,i=rr(e,["monaco"]);Pe(function(r){return{config:en(r.config,i),monaco:n}})}function Rr(){var t=ke(function(e){var n=e.monaco,i=e.isInitialized,r=e.resolve;return{monaco:n,isInitialized:i,resolve:r}});if(!t.isInitialized){if(Pe({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),rt(ot);if(window.monaco&&window.monaco.editor)return nn(window.monaco),t.resolve(window.monaco),rt(ot);Ir(Mr,jr)(Vr)}return rt(ot)}function Mr(t){return document.body.appendChild(t)}function Lr(t){var e=document.createElement("script");return t&&(e.src=t),e}function jr(t){var e=ke(function(i){var r=i.config,o=i.reject;return{config:r,reject:o}}),n=Lr("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function Vr(){var t=ke(function(n){var i=n.config,r=n.resolve,o=n.reject;return{config:i,resolve:r,reject:o}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){nn(n),t.resolve(n)},function(n){t.reject(n)})}function nn(t){ke().monaco||Pe({monaco:t})}function Fr(){return ke(function(t){var e=t.monaco;return e})}var ot=new Promise(function(t,e){return Pe({resolve:t,reject:e})}),rn={config:Pr,init:Rr,__getMonacoInstance:Fr};const $r="https://unpkg.com",Hr="https://cdn.jsdelivr.net/npm",Wr="https://esm.sh",qr="https://cdnjs.cloudflare.com/ajax/libs",Ur="https://cdn.bootcdn.net/ajax/libs",Xr="https://cdn.staticfile.org";async function Yr(t,e){const{version:n,file:i}=e??{},r=[],o=`${t}${n?`@${n}`:""}`,s=i||"/package.json",l=`${$r}/${o}`,u=`${Hr}/${o}`,f=`${Wr}/${o}`;if(r.push([l,`${l}${s}`],[u,`${u}${s}`],[f,`${f}${s}`]),n){const g=`${t}/${n}`,m=`${qr}/${g}`,p=`${Ur}/${g}`,v=`${Xr}/${g}`;r.push([m,`${m}${i||""}`],[p,`${p}${i||""}`],[v,`${v}${i||""}`])}const d=new AbortController,c={method:"get",signal:d.signal},h=await Promise.any(r.map(async([g,m])=>fetch(m,c).then(p=>{if(p.ok)return g;throw new Error(g)})));return d.abort(),h}const Gr={"@floating-ui/vue":"^1.0.4","@formkit/auto-animate":"^0.8.1","@iconify/json":"^2.2.172","@mixte/snippets":"1.7.0","@mixte/use":"1.7.0","@monaco-editor/loader":"^1.4.0","@moomfe/eslint-config":"^2.7.2","@types/fs-extra":"^11.0.4","@types/lodash-es":"^4.17.12","@types/node":"^20.11.5","@types/react":"^18.2.48","@types/spark-md5":"^3.0.4","@unplugin-vue-ce/sub-style":"1.0.0-beta.17","@vitejs/plugin-react":"^4.2.1","@vitejs/plugin-vue":"^5.0.3","@vitejs/plugin-vue-jsx":"^3.1.0","@vitest/coverage-v8":"^1.2.1","@vitest/ui":"^1.2.1","@vue/compiler-sfc":"^3.4.15","@vueuse/core":"^10.7.2","@vueuse/math":"^10.7.2",axios:"^1.6.5",chalk:"^5.3.0","change-case":"^5.4.2","element-plus":"^2.5.3",eslint:"^8.56.0","fast-glob":"^3.3.2","fs-extra":"^11.2.0",jsdom:"^24.0.0","lint-staged":"^15.2.0","lodash-es":"^4.17.21","magic-string":"^0.30.5",mixte:"1.7.0","monaco-editor":"^0.45.0","naive-ui":"^2.37.3",pnpm:"^8.14.3","pretty-bytes":"^6.1.1",react:"^18.2.0","react-dom":"^18.2.0",rollup:"^4.9.6","rollup-plugin-dts":"^6.1.0",sass:"^1.70.0",shiki:"^0.14.7","simple-git-hooks":"^2.9.0",slate:"^0.101.5","slate-history":"^0.100.0","slate-react":"^0.101.5","spark-md5":"^3.0.2",tsx:"^4.7.0","type-fest":"^4.10.0",typescript:"^5.3.3",unocss:"^0.58.3","unocss-preset-extra":"^0.5.3","unocss-preset-scrollbar":"^0.3.0","unplugin-auto-import":"^0.17.3","unplugin-icons":"^0.18.2","unplugin-vue-components":"^0.26.0",veaury:"^2.3.12",viewerjs:"^1.11.6",vite:"4.5.0",vitepress:"1.0.0-rc.25",vitest:"^1.2.1",vue:"^3.4.15","vue-demi":"^0.14.6"};function Kr(t,e){let n,i,r;const o=a.ref(!0),s=()=>{o.value=!0,r()};a.watch(t,s,{flush:"sync"});const l=typeof e=="function"?e:e.get,u=typeof e=="function"?void 0:e.set,f=a.customRef((d,c)=>(i=d,r=c,{get(){return o.value&&(n=l(),o.value=!1),i(),n},set(h){u==null||u(h)}}));return Object.isExtensible(f)&&(f.trigger=s),f}function ae(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function Zr(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const o=()=>e(r);return ae(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(t).map(o=>o(...r)))}}function O(t){return typeof t=="function"?t():a.unref(t)}const on=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jr=Object.prototype.toString,an=t=>Jr.call(t)==="[object Object]",Qr=()=>{};function eo(t,e){function n(...i){return new Promise((r,o)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(o)})}return n}const to=t=>t();function sn(t,e=!1,n="Timeout"){return new Promise((i,r)=>{setTimeout(e?()=>r(n):i,t)})}function no(t){return t||a.getCurrentInstance()}function io(t,e=!0,n){no()?a.onMounted(t,n):e?t():a.nextTick(t)}function at(t,e=!1){function n(c,{flush:h="sync",deep:g=!1,timeout:m,throwOnTimeout:p}={}){let v=null;const E=[new Promise(x=>{v=a.watch(t,_=>{c(_)!==e&&(v==null||v(),x(_))},{flush:h,deep:g,immediate:!0})})];return m!=null&&E.push(sn(m,p).then(()=>O(t)).finally(()=>v==null?void 0:v())),Promise.race(E)}function i(c,h){if(!a.isRef(c))return n(_=>_===c,h);const{flush:g="sync",deep:m=!1,timeout:p,throwOnTimeout:v}=h??{};let y=null;const x=[new Promise(_=>{y=a.watch([t,c],([R,M])=>{e!==(R===M)&&(y==null||y(),_(R))},{flush:g,deep:m,immediate:!0})})];return p!=null&&x.push(sn(p,v).then(()=>O(t)).finally(()=>(y==null||y(),O(t)))),Promise.race(x)}function r(c){return n(h=>!!h,c)}function o(c){return i(null,c)}function s(c){return i(void 0,c)}function l(c){return n(Number.isNaN,c)}function u(c,h){return n(g=>{const m=Array.from(g);return m.includes(c)||m.includes(O(c))},h)}function f(c){return d(1,c)}function d(c=1,h){let g=-1;return n(()=>(g+=1,g>=c),h)}return Array.isArray(O(t))?{toMatch:n,toContains:u,changed:f,changedTimes:d,get not(){return at(t,!e)}}:{toMatch:n,toBe:i,toBeTruthy:r,toBeNull:o,toBeNaN:l,toBeUndefined:s,changed:f,changedTimes:d,get not(){return at(t,!e)}}}function ro(t){return at(t)}function oo(t,e,n){return a.watch(t,e,{...n,deep:!0})}function ln(t,e,n={}){const{eventFilter:i=to,...r}=n,o=eo(i,e);let s,l,u;if(r.flush==="sync"){const f=a.ref(!1);l=()=>{},s=d=>{f.value=!0,d(),f.value=!1},u=a.watch(t,(...d)=>{f.value||o(...d)},r)}else{const f=[],d=a.ref(0),c=a.ref(0);l=()=>{d.value=c.value},f.push(a.watch(t,()=>{c.value++},{...r,flush:"sync"})),s=h=>{const g=c.value;h(),d.value+=c.value-g},f.push(a.watch(t,(...h)=>{const g=d.value>0&&d.value===c.value;d.value=0,c.value=0,!g&&o(...h)},r)),u=()=>{f.forEach(h=>h())}}return{stop:u,ignoreUpdates:s,ignorePrevAsyncUpdates:l}}function te(t){var e;const n=O(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Re=on?window:void 0,ao=on?window.document:void 0;function L(...t){let e,n,i,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,r]=t,e=Re):[e,n,i,r]=t,!e)return Qr;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,c,h,g)=>(d.addEventListener(c,h,g),()=>d.removeEventListener(c,h,g)),u=a.watch(()=>[te(e),O(r)],([d,c])=>{if(s(),!d)return;const h=an(c)?{...c}:c;o.push(...n.flatMap(g=>i.map(m=>l(d,g,m,h))))},{immediate:!0,flush:"post"}),f=()=>{u(),s()};return ae(f),f}function so(){const t=a.ref(!1);return a.getCurrentInstance()&&a.onMounted(()=>{t.value=!0}),t}function cn(t){const e=so();return a.computed(()=>(e.value,!!t()))}function un(t,e,n={}){const{window:i=Re,...r}=n;let o;const s=cn(()=>i&&"MutationObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=a.watch(()=>te(t),c=>{l(),s.value&&i&&c&&(o=new MutationObserver(e),o.observe(c,r))},{immediate:!0}),f=()=>o==null?void 0:o.takeRecords(),d=()=>{l(),u()};return ae(d),{isSupported:s,stop:d,takeRecords:f}}function st(){const t=a.getCurrentInstance(),e=Kr(()=>null,()=>t.proxy.$el);return a.onUpdated(e.trigger),a.onMounted(e.trigger),e}function lo(t,e,n={}){const{window:i=Re,...r}=n;let o;const s=cn(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=a.computed(()=>Array.isArray(t)?t.map(c=>te(c)):[te(t)]),f=a.watch(u,c=>{if(l(),s.value&&i){o=new ResizeObserver(e);for(const h of c)h&&o.observe(h,r)}},{immediate:!0,flush:"post",deep:!0}),d=()=>{l(),f()};return ae(d),{isSupported:s,stop:d}}function co(t,e={width:0,height:0},n={}){const{window:i=Re,box:r="content-box"}=n,o=a.computed(()=>{var c,h;return(h=(c=te(t))==null?void 0:c.namespaceURI)==null?void 0:h.includes("svg")}),s=a.ref(e.width),l=a.ref(e.height),{stop:u}=lo(t,([c])=>{const h=r==="border-box"?c.borderBoxSize:r==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(i&&o.value){const g=te(t);if(g){const m=i.getComputedStyle(g);s.value=Number.parseFloat(m.width),l.value=Number.parseFloat(m.height)}}else if(h){const g=Array.isArray(h)?h:[h];s.value=g.reduce((m,{inlineSize:p})=>m+p,0),l.value=g.reduce((m,{blockSize:p})=>m+p,0)}else s.value=c.contentRect.width,l.value=c.contentRect.height},n);io(()=>{const c=te(t);c&&(s.value="offsetWidth"in c?c.offsetWidth:e.width,l.value="offsetHeight"in c?c.offsetHeight:e.height)});const f=a.watch(()=>te(t),c=>{s.value=c?e.width:0,l.value=c?e.height:0});function d(){u(),f()}return{width:s,height:l,stop:d}}function lt(t,e){O(t)&&e(O(t))}function uo(t){let e=[];for(let n=0;n<t.length;++n)e=[...e,[t.start(n),t.end(n)]];return e}function ct(t){return Array.from(t).map(({label:e,kind:n,language:i,mode:r,activeCues:o,cues:s,inBandMetadataTrackDispatchType:l},u)=>({id:u,label:e,kind:n,language:i,mode:r,activeCues:o,cues:s,inBandMetadataTrackDispatchType:l}))}const fo={src:"",tracks:[]};function ho(t,e={}){e={...fo,...e};const{document:n=ao}=e,i=a.ref(0),r=a.ref(0),o=a.ref(!1),s=a.ref(1),l=a.ref(!1),u=a.ref(!1),f=a.ref(!1),d=a.ref(1),c=a.ref(!1),h=a.ref([]),g=a.ref([]),m=a.ref(-1),p=a.ref(!1),v=a.ref(!1),y=n&&"pictureInPictureEnabled"in n,E=Zr(),x=b=>{lt(t,A=>{if(b){const j=typeof b=="number"?b:b.id;A.textTracks[j].mode="disabled"}else for(let j=0;j<A.textTracks.length;++j)A.textTracks[j].mode="disabled";m.value=-1})},_=(b,A=!0)=>{lt(t,j=>{const Z=typeof b=="number"?b:b.id;A&&x(),j.textTracks[Z].mode="showing",m.value=Z})},R=()=>new Promise((b,A)=>{lt(t,async j=>{y&&(p.value?n.exitPictureInPicture().then(b).catch(A):j.requestPictureInPicture().then(b).catch(A))})});a.watchEffect(()=>{if(!n)return;const b=O(t);if(!b)return;const A=O(e.src);let j=[];A&&(typeof A=="string"?j=[{src:A}]:Array.isArray(A)?j=A:an(A)&&(j=[A]),b.querySelectorAll("source").forEach(Z=>{Z.removeEventListener("error",E.trigger),Z.remove()}),j.forEach(({src:Z,type:kt})=>{const ye=n.createElement("source");ye.setAttribute("src",Z),ye.setAttribute("type",kt||""),ye.addEventListener("error",E.trigger),b.appendChild(ye)}),b.load())}),ae(()=>{const b=O(t);b&&b.querySelectorAll("source").forEach(A=>A.removeEventListener("error",E.trigger))}),a.watch([t,s],()=>{const b=O(t);b&&(b.volume=s.value)}),a.watch([t,v],()=>{const b=O(t);b&&(b.muted=v.value)}),a.watch([t,d],()=>{const b=O(t);b&&(b.playbackRate=d.value)}),a.watchEffect(()=>{if(!n)return;const b=O(e.tracks),A=O(t);!b||!b.length||!A||(A.querySelectorAll("track").forEach(j=>j.remove()),b.forEach(({default:j,kind:Z,label:kt,src:ye,srcLang:xa},ka)=>{const ce=n.createElement("track");ce.default=j||!1,ce.kind=Z,ce.label=kt,ce.src=ye,ce.srclang=xa,ce.default&&(m.value=ka),A.appendChild(ce)}))});const{ignoreUpdates:M}=ln(i,b=>{const A=O(t);A&&(A.currentTime=b)}),{ignoreUpdates:I}=ln(f,b=>{const A=O(t);A&&(b?A.play():A.pause())});L(t,"timeupdate",()=>M(()=>i.value=O(t).currentTime)),L(t,"durationchange",()=>r.value=O(t).duration),L(t,"progress",()=>h.value=uo(O(t).buffered)),L(t,"seeking",()=>o.value=!0),L(t,"seeked",()=>o.value=!1),L(t,["waiting","loadstart"],()=>{l.value=!0,I(()=>f.value=!1)}),L(t,"loadeddata",()=>l.value=!1),L(t,"playing",()=>{l.value=!1,u.value=!1,I(()=>f.value=!0)}),L(t,"ratechange",()=>d.value=O(t).playbackRate),L(t,"stalled",()=>c.value=!0),L(t,"ended",()=>u.value=!0),L(t,"pause",()=>I(()=>f.value=!1)),L(t,"play",()=>I(()=>f.value=!0)),L(t,"enterpictureinpicture",()=>p.value=!0),L(t,"leavepictureinpicture",()=>p.value=!1),L(t,"volumechange",()=>{const b=O(t);b&&(s.value=b.volume,v.value=b.muted)});const Y=[],ne=a.watch([t],()=>{const b=O(t);b&&(ne(),Y[0]=L(b.textTracks,"addtrack",()=>g.value=ct(b.textTracks)),Y[1]=L(b.textTracks,"removetrack",()=>g.value=ct(b.textTracks)),Y[2]=L(b.textTracks,"change",()=>g.value=ct(b.textTracks)))});return ae(()=>Y.forEach(b=>b())),{currentTime:i,duration:r,waiting:l,seeking:o,ended:u,stalled:c,buffered:h,playing:f,rate:d,volume:s,muted:v,tracks:g,selectedTrack:m,enableTrack:_,disableTrack:x,supportsPictureInPicture:y,togglePictureInPicture:R,isPictureInPicture:p,onSourceError:E.on}}function ut(t){const e=a.ref(),n=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return a.watch(()=>O(t),i=>{n(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),ae(n),a.readonly(e)}function po(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function ft(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const o=()=>e(r);return po(o),{off:o}},off:e,trigger:r=>Promise.all(Array.from(t).map(o=>r?o(r):o()))}}function dt(t){return typeof t=="function"?t():a.unref(t)}function go(t){if(!a.isRef(t))return a.reactive(t);const e=new Proxy({},{get(n,i,r){return a.unref(Reflect.get(t.value,i,r))},set(n,i,r){return a.isRef(t.value[i])&&!a.isRef(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return a.reactive(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Me(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function mo(){return String.fromCharCode(Me(97,122))}function vo(){return String.fromCharCode(Me(65,90))}function fn(t=12,e={}){const{lowercase:n=!0,uppercase:i=!1,number:r=!1}=e,o=[];let s;if(n&&o.push("l"),i&&o.push("u"),r&&o.push("n"),!(s=o.length))throw new Error("???");let l="";for(;t-- >0;){const u=s>1?Me(0,s-1):0,f=o[u];f==="l"?l+=mo():f==="u"?l+=vo():f==="n"&&(l+=Me(0,9))}return l}function bo(){return fn(1,{uppercase:!0})+fn(17,{uppercase:!0,number:!0})}const yo=typeof window<"u";function wo(t,e,n){let i;const r=()=>{i==null||i.stop(),i=void 0},o=a.watch(t,(s,l,u)=>{s?(i&&r(),i=a.effectScope(),i.run(()=>e(s,l,u))):r()},n);return()=>{r(),o()}}function Le(t,e,n){return wo(t,e,{...n,immediate:!0})}function xo(t,e={}){const{initialData:n,immediate:i=!1,shallow:r=!1}=e,o=ft(),s=ft(),l=ft(),u=a.shallowRef(),f=(r?a.shallowRef:a.ref)(),d=a.shallowRef(),c=a.ref(!1),h=a.ref(!1),g=a.ref(!1),m=a.ref(!1),p=a.ref(0);function v(){p.value=0}let y=0;async function E(...R){const M=++y;c.value=!0,h.value=!0,g.value=!1,m.value=!1,(dt(e.resetOnExecute)??!0)&&(u.value=void 0,f.value=dt(n),d.value=void 0);try{const I=await t(...R);return M!==y||(u.value=I,f.value=I==null?void 0:I.data,h.value=!1,g.value=!0,m.value=!0,p.value++,o.trigger(I),l.trigger()),I}catch(I){throw M!==y||(h.value=!1,g.value=!0,m.value=!1,d.value=I,s.trigger(I),l.trigger()),I}}f.value=dt(n),i&&E();const x={response:u,data:f,error:d,isExecuted:c,isLoading:h,isFinished:g,isSuccess:m,successCount:p,clearSuccessCount:v,execute:E,onSuccess:o.on,onError:s.on,onFinally:l.on},_=go(a.computed(()=>({...x,response:a.computed(()=>a.shallowRef(u.value)),data:a.computed(()=>a.shallowRef(f.value)),error:a.computed(()=>a.shallowRef(d.value))})));return{...x,reactive:_}}function ko(t,e={}){return xo(t,e).reactive}const So={"size-full":"",flex:"~ justify-center items-center",pos:"absolute top-0 left-0","c-neutral":"","bg-dark":""},Eo={key:0,flex:"~ col gap-2 items-center"},_o={key:0,"text-sm":""},Co={flex:"~ col justify-center items-center gap-3","c-gray":""},Ao=a.defineComponent({__name:"Code",props:{file:{type:null},fileExt:{type:String}},setup(t){const e=t,n=a.ref(),{width:i,height:r}=co(n),o=a.ref(!1),s=a.ref(!1),l=a.ref(!1),u=a.shallowRef(),f=a.shallowRef(),d=a.shallowRef(),c=a.ref(),h=a.ref(),g=a.ref(0),m=ko(()=>Yr("monaco-editor",{version:Gr["monaco-editor"].replace(/^\^/g,""),file:"/min/vs/basic-languages/css/css.js"}),{immediate:!0});async function p(){var y,E;(y=f.value)==null||y.dispose(),s.value=!0,l.value=!1,await ro(()=>m.isSuccess).toBeTruthy(),rn.config({"vs/nls":{availableLanguages:{"*":"zh-cn"}},paths:{vs:`${m.response}/min/vs`}});try{u.value=await rn.init(),d.value??(d.value=u.value.languages.getLanguages()),c.value=(E=d.value.find(x=>{var _;return(_=x.extensions)==null?void 0:_.includes(`.${e.fileExt}`)}))==null?void 0:E.id,s.value=!1,(l.value=!c.value)||v()}catch{s.value=!1}}async function v(){l.value=!1,await a.nextTick(),f.value=u.value.editor.create(n.value,{value:h.value,language:c.value||"plaintext",tabSize:2,multiCursorModifier:"ctrlCmd",minimap:{showSlider:"always"},padding:{top:10},wordWrap:"on",theme:"vs-dark",readOnly:!0})}return Le(()=>e.file,(y,E,x)=>{o.value=!0;const _=new FileReader;_.onprogress=R=>{g.value=Math.round(R.loaded/R.total*100)},_.onload=async R=>{var M;o.value=!1,h.value=(M=R.target)==null?void 0:M.result,p()},_.readAsText(y),x(()=>{_.abort()})}),Le(Ut,y=>{const E='[data-name^="vs/editor"]';function x(){y.querySelectorAll(E).forEach(_=>{y.removeChild(_)}),Array.from(document.querySelectorAll(E)).forEach(_=>{y.appendChild(_.cloneNode(!0))})}un(document.head,x,{childList:!0}),x()}),oo(()=>({width:i.value,height:r.value}),y=>{var E;(E=f.value)==null||E.layout(y)}),a.onUnmounted(()=>{var y;(y=f.value)==null||y.dispose()}),(y,E)=>{const x=tr,_=Zi,R=Ui;return a.openBlock(),a.createElementBlock("div",So,[a.createCommentVNode(" 加载中 "),a.unref(o)||a.unref(s)?(a.openBlock(),a.createElementBlock("div",Eo,[a.createVNode(x),a.unref(o)?(a.openBlock(),a.createElementBlock("div",_o,"文件读取中, 当前进度 "+a.toDisplayString(a.unref(g))+"%",1)):a.createCommentVNode("v-if",!0)])):a.unref(l)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createCommentVNode(" 不支持的文件 "),a.createElementVNode("div",Co,[a.createVNode(_,{class:"text-5xl text-yellow"}),a.createTextVNode(" 此文件类型暂不支持预览 "),a.createVNode(R,{class:"rounded-sm",color:"#3177d3",onClick:E[0]||(E[0]=M=>v())},{default:a.withCtx(()=>[a.createTextVNode("仍然打开")]),_:1})])],2112)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createCommentVNode(" 编辑器 "),a.createElementVNode("div",{ref_key:"editorRef",ref:n,"size-full":""},null,512)],2112))])}}}),zo=`*[data-v-3e5cdc11],[data-v-3e5cdc11]:before,[data-v-3e5cdc11]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-3e5cdc11]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-3e5cdc11],[pos~=absolute][data-v-3e5cdc11]{position:absolute}.left-0[data-v-3e5cdc11],[pos~=left-0][data-v-3e5cdc11]{left:0}.top-0[data-v-3e5cdc11],[pos~=top-0][data-v-3e5cdc11]{top:0}[flex~="~"][data-v-3e5cdc11]{display:flex}[flex~=col][data-v-3e5cdc11]{flex-direction:column}.items-center[data-v-3e5cdc11],[flex~=items-center][data-v-3e5cdc11]{align-items:center}.justify-center[data-v-3e5cdc11],[flex~=justify-center][data-v-3e5cdc11]{justify-content:center}.gap-2[data-v-3e5cdc11],[flex~=gap-2][data-v-3e5cdc11]{gap:.5rem}.gap-3[data-v-3e5cdc11],[flex~=gap-3][data-v-3e5cdc11]{gap:.75rem}.rounded-sm[data-v-3e5cdc11]{border-radius:.125rem}[bg-dark=""][data-v-3e5cdc11]{--un-bg-opacity:1;background-color:rgb(34 34 34 / var(--un-bg-opacity))}.text-5xl[data-v-3e5cdc11]{font-size:3rem;line-height:1}[text-sm=""][data-v-3e5cdc11]{font-size:.875rem;line-height:1.25rem}.text-yellow[data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(250 204 21 / var(--un-text-opacity))}.c-neutral[data-v-3e5cdc11],[c-neutral=""][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}[c-gray=""][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}[color~="#3177d3"][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(49 119 211 / var(--un-text-opacity))}.size-full[data-v-3e5cdc11],[size-full=""][data-v-3e5cdc11]{width:100%;height:100%}
|
15
|
+
`},Qt=Cr(Or)(Jt),Nr={config:zr},Ir=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function en(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],en(t[n],e[n]))}),Yt(Yt({},t),e)}var Br={type:"cancelation",msg:"operation is manually canceled"};function rt(t){var e=!1,n=new Promise(function(i,r){t.then(function(o){return e?r(Br):i(o)}),t.catch(r)});return n.cancel=function(){return e=!0},n}var Dr=Er.create({config:_r,isInitialized:!1,resolve:null,reject:null,monaco:null}),tn=or(Dr,2),ke=tn[0],Pe=tn[1];function Pr(t){var e=Nr.config(t),n=e.monaco,i=rr(e,["monaco"]);Pe(function(r){return{config:en(r.config,i),monaco:n}})}function Rr(){var t=ke(function(e){var n=e.monaco,i=e.isInitialized,r=e.resolve;return{monaco:n,isInitialized:i,resolve:r}});if(!t.isInitialized){if(Pe({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),rt(ot);if(window.monaco&&window.monaco.editor)return nn(window.monaco),t.resolve(window.monaco),rt(ot);Ir(Mr,jr)(Vr)}return rt(ot)}function Mr(t){return document.body.appendChild(t)}function Lr(t){var e=document.createElement("script");return t&&(e.src=t),e}function jr(t){var e=ke(function(i){var r=i.config,o=i.reject;return{config:r,reject:o}}),n=Lr("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function Vr(){var t=ke(function(n){var i=n.config,r=n.resolve,o=n.reject;return{config:i,resolve:r,reject:o}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){nn(n),t.resolve(n)},function(n){t.reject(n)})}function nn(t){ke().monaco||Pe({monaco:t})}function Fr(){return ke(function(t){var e=t.monaco;return e})}var ot=new Promise(function(t,e){return Pe({resolve:t,reject:e})}),rn={config:Pr,init:Rr,__getMonacoInstance:Fr};const $r="https://unpkg.com",Hr="https://cdn.jsdelivr.net/npm",Wr="https://esm.sh",qr="https://cdnjs.cloudflare.com/ajax/libs",Ur="https://cdn.bootcdn.net/ajax/libs",Xr="https://cdn.staticfile.org";async function Yr(t,e){const{version:n,file:i}=e??{},r=[],o=`${t}${n?`@${n}`:""}`,s=i||"/package.json",l=`${$r}/${o}`,u=`${Hr}/${o}`,f=`${Wr}/${o}`;if(r.push([l,`${l}${s}`],[u,`${u}${s}`],[f,`${f}${s}`]),n){const g=`${t}/${n}`,m=`${qr}/${g}`,p=`${Ur}/${g}`,v=`${Xr}/${g}`;r.push([m,`${m}${i||""}`],[p,`${p}${i||""}`],[v,`${v}${i||""}`])}const d=new AbortController,c={method:"get",signal:d.signal},h=await Promise.any(r.map(async([g,m])=>fetch(m,c).then(p=>{if(p.ok)return g;throw new Error(g)})));return d.abort(),h}const Gr={"@floating-ui/vue":"^1.0.4","@formkit/auto-animate":"^0.8.1","@iconify/json":"^2.2.172","@mixte/snippets":"1.7.0","@mixte/use":"1.7.0","@monaco-editor/loader":"^1.4.0","@moomfe/eslint-config":"^2.7.2","@types/fs-extra":"^11.0.4","@types/lodash-es":"^4.17.12","@types/node":"^20.11.5","@types/react":"^18.2.48","@types/spark-md5":"^3.0.4","@unplugin-vue-ce/sub-style":"1.0.0-beta.17","@vitejs/plugin-react":"^4.2.1","@vitejs/plugin-vue":"^5.0.3","@vitejs/plugin-vue-jsx":"^3.1.0","@vitest/coverage-v8":"^1.2.1","@vitest/ui":"^1.2.1","@vue/compiler-sfc":"^3.4.15","@vueuse/core":"^10.7.2","@vueuse/math":"^10.7.2",axios:"^1.6.5",chalk:"^5.3.0","change-case":"^4.1.2","element-plus":"^2.5.3",eslint:"^8.56.0","fast-glob":"^3.3.2","fs-extra":"^11.2.0",jsdom:"^24.0.0","lint-staged":"^15.2.0","lodash-es":"^4.17.21","magic-string":"^0.30.5",mixte:"1.7.0","monaco-editor":"^0.45.0","naive-ui":"^2.37.3",pnpm:"^8.14.3","pretty-bytes":"^6.1.1",react:"^18.2.0","react-dom":"^18.2.0",rollup:"^4.9.6","rollup-plugin-dts":"^6.1.0",sass:"^1.70.0",shiki:"^0.14.7","simple-git-hooks":"^2.9.0",slate:"^0.101.5","slate-history":"^0.100.0","slate-react":"^0.101.5","spark-md5":"^3.0.2",tsx:"^4.7.0","type-fest":"^4.10.0",typescript:"^5.3.3",unocss:"^0.58.3","unocss-preset-extra":"^0.5.3","unocss-preset-scrollbar":"^0.3.0","unplugin-auto-import":"^0.17.3","unplugin-icons":"^0.18.2","unplugin-vue-components":"^0.26.0",veaury:"^2.3.12",viewerjs:"^1.11.6",vite:"4.5.0",vitepress:"1.0.0-rc.25",vitest:"^1.2.1",vue:"^3.4.15","vue-demi":"^0.14.6"};function Kr(t,e){let n,i,r;const o=a.ref(!0),s=()=>{o.value=!0,r()};a.watch(t,s,{flush:"sync"});const l=typeof e=="function"?e:e.get,u=typeof e=="function"?void 0:e.set,f=a.customRef((d,c)=>(i=d,r=c,{get(){return o.value&&(n=l(),o.value=!1),i(),n},set(h){u==null||u(h)}}));return Object.isExtensible(f)&&(f.trigger=s),f}function ae(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function Zr(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const o=()=>e(r);return ae(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(t).map(o=>o(...r)))}}function O(t){return typeof t=="function"?t():a.unref(t)}const on=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jr=Object.prototype.toString,an=t=>Jr.call(t)==="[object Object]",Qr=()=>{};function eo(t,e){function n(...i){return new Promise((r,o)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(o)})}return n}const to=t=>t();function sn(t,e=!1,n="Timeout"){return new Promise((i,r)=>{setTimeout(e?()=>r(n):i,t)})}function no(t){return t||a.getCurrentInstance()}function io(t,e=!0,n){no()?a.onMounted(t,n):e?t():a.nextTick(t)}function at(t,e=!1){function n(c,{flush:h="sync",deep:g=!1,timeout:m,throwOnTimeout:p}={}){let v=null;const E=[new Promise(x=>{v=a.watch(t,_=>{c(_)!==e&&(v==null||v(),x(_))},{flush:h,deep:g,immediate:!0})})];return m!=null&&E.push(sn(m,p).then(()=>O(t)).finally(()=>v==null?void 0:v())),Promise.race(E)}function i(c,h){if(!a.isRef(c))return n(_=>_===c,h);const{flush:g="sync",deep:m=!1,timeout:p,throwOnTimeout:v}=h??{};let y=null;const x=[new Promise(_=>{y=a.watch([t,c],([R,M])=>{e!==(R===M)&&(y==null||y(),_(R))},{flush:g,deep:m,immediate:!0})})];return p!=null&&x.push(sn(p,v).then(()=>O(t)).finally(()=>(y==null||y(),O(t)))),Promise.race(x)}function r(c){return n(h=>!!h,c)}function o(c){return i(null,c)}function s(c){return i(void 0,c)}function l(c){return n(Number.isNaN,c)}function u(c,h){return n(g=>{const m=Array.from(g);return m.includes(c)||m.includes(O(c))},h)}function f(c){return d(1,c)}function d(c=1,h){let g=-1;return n(()=>(g+=1,g>=c),h)}return Array.isArray(O(t))?{toMatch:n,toContains:u,changed:f,changedTimes:d,get not(){return at(t,!e)}}:{toMatch:n,toBe:i,toBeTruthy:r,toBeNull:o,toBeNaN:l,toBeUndefined:s,changed:f,changedTimes:d,get not(){return at(t,!e)}}}function ro(t){return at(t)}function oo(t,e,n){return a.watch(t,e,{...n,deep:!0})}function ln(t,e,n={}){const{eventFilter:i=to,...r}=n,o=eo(i,e);let s,l,u;if(r.flush==="sync"){const f=a.ref(!1);l=()=>{},s=d=>{f.value=!0,d(),f.value=!1},u=a.watch(t,(...d)=>{f.value||o(...d)},r)}else{const f=[],d=a.ref(0),c=a.ref(0);l=()=>{d.value=c.value},f.push(a.watch(t,()=>{c.value++},{...r,flush:"sync"})),s=h=>{const g=c.value;h(),d.value+=c.value-g},f.push(a.watch(t,(...h)=>{const g=d.value>0&&d.value===c.value;d.value=0,c.value=0,!g&&o(...h)},r)),u=()=>{f.forEach(h=>h())}}return{stop:u,ignoreUpdates:s,ignorePrevAsyncUpdates:l}}function te(t){var e;const n=O(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Re=on?window:void 0,ao=on?window.document:void 0;function L(...t){let e,n,i,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,r]=t,e=Re):[e,n,i,r]=t,!e)return Qr;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,c,h,g)=>(d.addEventListener(c,h,g),()=>d.removeEventListener(c,h,g)),u=a.watch(()=>[te(e),O(r)],([d,c])=>{if(s(),!d)return;const h=an(c)?{...c}:c;o.push(...n.flatMap(g=>i.map(m=>l(d,g,m,h))))},{immediate:!0,flush:"post"}),f=()=>{u(),s()};return ae(f),f}function so(){const t=a.ref(!1);return a.getCurrentInstance()&&a.onMounted(()=>{t.value=!0}),t}function cn(t){const e=so();return a.computed(()=>(e.value,!!t()))}function un(t,e,n={}){const{window:i=Re,...r}=n;let o;const s=cn(()=>i&&"MutationObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=a.watch(()=>te(t),c=>{l(),s.value&&i&&c&&(o=new MutationObserver(e),o.observe(c,r))},{immediate:!0}),f=()=>o==null?void 0:o.takeRecords(),d=()=>{l(),u()};return ae(d),{isSupported:s,stop:d,takeRecords:f}}function st(){const t=a.getCurrentInstance(),e=Kr(()=>null,()=>t.proxy.$el);return a.onUpdated(e.trigger),a.onMounted(e.trigger),e}function lo(t,e,n={}){const{window:i=Re,...r}=n;let o;const s=cn(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=a.computed(()=>Array.isArray(t)?t.map(c=>te(c)):[te(t)]),f=a.watch(u,c=>{if(l(),s.value&&i){o=new ResizeObserver(e);for(const h of c)h&&o.observe(h,r)}},{immediate:!0,flush:"post",deep:!0}),d=()=>{l(),f()};return ae(d),{isSupported:s,stop:d}}function co(t,e={width:0,height:0},n={}){const{window:i=Re,box:r="content-box"}=n,o=a.computed(()=>{var c,h;return(h=(c=te(t))==null?void 0:c.namespaceURI)==null?void 0:h.includes("svg")}),s=a.ref(e.width),l=a.ref(e.height),{stop:u}=lo(t,([c])=>{const h=r==="border-box"?c.borderBoxSize:r==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(i&&o.value){const g=te(t);if(g){const m=i.getComputedStyle(g);s.value=Number.parseFloat(m.width),l.value=Number.parseFloat(m.height)}}else if(h){const g=Array.isArray(h)?h:[h];s.value=g.reduce((m,{inlineSize:p})=>m+p,0),l.value=g.reduce((m,{blockSize:p})=>m+p,0)}else s.value=c.contentRect.width,l.value=c.contentRect.height},n);io(()=>{const c=te(t);c&&(s.value="offsetWidth"in c?c.offsetWidth:e.width,l.value="offsetHeight"in c?c.offsetHeight:e.height)});const f=a.watch(()=>te(t),c=>{s.value=c?e.width:0,l.value=c?e.height:0});function d(){u(),f()}return{width:s,height:l,stop:d}}function lt(t,e){O(t)&&e(O(t))}function uo(t){let e=[];for(let n=0;n<t.length;++n)e=[...e,[t.start(n),t.end(n)]];return e}function ct(t){return Array.from(t).map(({label:e,kind:n,language:i,mode:r,activeCues:o,cues:s,inBandMetadataTrackDispatchType:l},u)=>({id:u,label:e,kind:n,language:i,mode:r,activeCues:o,cues:s,inBandMetadataTrackDispatchType:l}))}const fo={src:"",tracks:[]};function ho(t,e={}){e={...fo,...e};const{document:n=ao}=e,i=a.ref(0),r=a.ref(0),o=a.ref(!1),s=a.ref(1),l=a.ref(!1),u=a.ref(!1),f=a.ref(!1),d=a.ref(1),c=a.ref(!1),h=a.ref([]),g=a.ref([]),m=a.ref(-1),p=a.ref(!1),v=a.ref(!1),y=n&&"pictureInPictureEnabled"in n,E=Zr(),x=b=>{lt(t,A=>{if(b){const j=typeof b=="number"?b:b.id;A.textTracks[j].mode="disabled"}else for(let j=0;j<A.textTracks.length;++j)A.textTracks[j].mode="disabled";m.value=-1})},_=(b,A=!0)=>{lt(t,j=>{const Z=typeof b=="number"?b:b.id;A&&x(),j.textTracks[Z].mode="showing",m.value=Z})},R=()=>new Promise((b,A)=>{lt(t,async j=>{y&&(p.value?n.exitPictureInPicture().then(b).catch(A):j.requestPictureInPicture().then(b).catch(A))})});a.watchEffect(()=>{if(!n)return;const b=O(t);if(!b)return;const A=O(e.src);let j=[];A&&(typeof A=="string"?j=[{src:A}]:Array.isArray(A)?j=A:an(A)&&(j=[A]),b.querySelectorAll("source").forEach(Z=>{Z.removeEventListener("error",E.trigger),Z.remove()}),j.forEach(({src:Z,type:kt})=>{const ye=n.createElement("source");ye.setAttribute("src",Z),ye.setAttribute("type",kt||""),ye.addEventListener("error",E.trigger),b.appendChild(ye)}),b.load())}),ae(()=>{const b=O(t);b&&b.querySelectorAll("source").forEach(A=>A.removeEventListener("error",E.trigger))}),a.watch([t,s],()=>{const b=O(t);b&&(b.volume=s.value)}),a.watch([t,v],()=>{const b=O(t);b&&(b.muted=v.value)}),a.watch([t,d],()=>{const b=O(t);b&&(b.playbackRate=d.value)}),a.watchEffect(()=>{if(!n)return;const b=O(e.tracks),A=O(t);!b||!b.length||!A||(A.querySelectorAll("track").forEach(j=>j.remove()),b.forEach(({default:j,kind:Z,label:kt,src:ye,srcLang:xa},ka)=>{const ce=n.createElement("track");ce.default=j||!1,ce.kind=Z,ce.label=kt,ce.src=ye,ce.srclang=xa,ce.default&&(m.value=ka),A.appendChild(ce)}))});const{ignoreUpdates:M}=ln(i,b=>{const A=O(t);A&&(A.currentTime=b)}),{ignoreUpdates:I}=ln(f,b=>{const A=O(t);A&&(b?A.play():A.pause())});L(t,"timeupdate",()=>M(()=>i.value=O(t).currentTime)),L(t,"durationchange",()=>r.value=O(t).duration),L(t,"progress",()=>h.value=uo(O(t).buffered)),L(t,"seeking",()=>o.value=!0),L(t,"seeked",()=>o.value=!1),L(t,["waiting","loadstart"],()=>{l.value=!0,I(()=>f.value=!1)}),L(t,"loadeddata",()=>l.value=!1),L(t,"playing",()=>{l.value=!1,u.value=!1,I(()=>f.value=!0)}),L(t,"ratechange",()=>d.value=O(t).playbackRate),L(t,"stalled",()=>c.value=!0),L(t,"ended",()=>u.value=!0),L(t,"pause",()=>I(()=>f.value=!1)),L(t,"play",()=>I(()=>f.value=!0)),L(t,"enterpictureinpicture",()=>p.value=!0),L(t,"leavepictureinpicture",()=>p.value=!1),L(t,"volumechange",()=>{const b=O(t);b&&(s.value=b.volume,v.value=b.muted)});const Y=[],ne=a.watch([t],()=>{const b=O(t);b&&(ne(),Y[0]=L(b.textTracks,"addtrack",()=>g.value=ct(b.textTracks)),Y[1]=L(b.textTracks,"removetrack",()=>g.value=ct(b.textTracks)),Y[2]=L(b.textTracks,"change",()=>g.value=ct(b.textTracks)))});return ae(()=>Y.forEach(b=>b())),{currentTime:i,duration:r,waiting:l,seeking:o,ended:u,stalled:c,buffered:h,playing:f,rate:d,volume:s,muted:v,tracks:g,selectedTrack:m,enableTrack:_,disableTrack:x,supportsPictureInPicture:y,togglePictureInPicture:R,isPictureInPicture:p,onSourceError:E.on}}function ut(t){const e=a.ref(),n=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return a.watch(()=>O(t),i=>{n(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),ae(n),a.readonly(e)}function po(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}function ft(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const o=()=>e(r);return po(o),{off:o}},off:e,trigger:r=>Promise.all(Array.from(t).map(o=>r?o(r):o()))}}function dt(t){return typeof t=="function"?t():a.unref(t)}function go(t){if(!a.isRef(t))return a.reactive(t);const e=new Proxy({},{get(n,i,r){return a.unref(Reflect.get(t.value,i,r))},set(n,i,r){return a.isRef(t.value[i])&&!a.isRef(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return a.reactive(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Me(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function mo(){return String.fromCharCode(Me(97,122))}function vo(){return String.fromCharCode(Me(65,90))}function fn(t=12,e={}){const{lowercase:n=!0,uppercase:i=!1,number:r=!1}=e,o=[];let s;if(n&&o.push("l"),i&&o.push("u"),r&&o.push("n"),!(s=o.length))throw new Error("???");let l="";for(;t-- >0;){const u=s>1?Me(0,s-1):0,f=o[u];f==="l"?l+=mo():f==="u"?l+=vo():f==="n"&&(l+=Me(0,9))}return l}function bo(){return fn(1,{uppercase:!0})+fn(17,{uppercase:!0,number:!0})}const yo=typeof window<"u";function wo(t,e,n){let i;const r=()=>{i==null||i.stop(),i=void 0},o=a.watch(t,(s,l,u)=>{s?(i&&r(),i=a.effectScope(),i.run(()=>e(s,l,u))):r()},n);return()=>{r(),o()}}function Le(t,e,n){return wo(t,e,{...n,immediate:!0})}function xo(t,e={}){const{initialData:n,immediate:i=!1,shallow:r=!1}=e,o=ft(),s=ft(),l=ft(),u=a.shallowRef(),f=(r?a.shallowRef:a.ref)(),d=a.shallowRef(),c=a.ref(!1),h=a.ref(!1),g=a.ref(!1),m=a.ref(!1),p=a.ref(0);function v(){p.value=0}let y=0;async function E(...R){const M=++y;c.value=!0,h.value=!0,g.value=!1,m.value=!1,(dt(e.resetOnExecute)??!0)&&(u.value=void 0,f.value=dt(n),d.value=void 0);try{const I=await t(...R);return M!==y||(u.value=I,f.value=I==null?void 0:I.data,h.value=!1,g.value=!0,m.value=!0,p.value++,o.trigger(I),l.trigger()),I}catch(I){throw M!==y||(h.value=!1,g.value=!0,m.value=!1,d.value=I,s.trigger(I),l.trigger()),I}}f.value=dt(n),i&&E();const x={response:u,data:f,error:d,isExecuted:c,isLoading:h,isFinished:g,isSuccess:m,successCount:p,clearSuccessCount:v,execute:E,onSuccess:o.on,onError:s.on,onFinally:l.on},_=go(a.computed(()=>({...x,response:a.computed(()=>a.shallowRef(u.value)),data:a.computed(()=>a.shallowRef(f.value)),error:a.computed(()=>a.shallowRef(d.value))})));return{...x,reactive:_}}function ko(t,e={}){return xo(t,e).reactive}const So={"size-full":"",flex:"~ justify-center items-center",pos:"absolute top-0 left-0","c-neutral":"","bg-dark":""},Eo={key:0,flex:"~ col gap-2 items-center"},_o={key:0,"text-sm":""},Co={flex:"~ col justify-center items-center gap-3","c-gray":""},Ao=a.defineComponent({__name:"Code",props:{file:{type:null},fileExt:{type:String}},setup(t){const e=t,n=a.ref(),{width:i,height:r}=co(n),o=a.ref(!1),s=a.ref(!1),l=a.ref(!1),u=a.shallowRef(),f=a.shallowRef(),d=a.shallowRef(),c=a.ref(),h=a.ref(),g=a.ref(0),m=ko(()=>Yr("monaco-editor",{version:Gr["monaco-editor"].replace(/^\^/g,""),file:"/min/vs/basic-languages/css/css.js"}),{immediate:!0});async function p(){var y,E;(y=f.value)==null||y.dispose(),s.value=!0,l.value=!1,await ro(()=>m.isSuccess).toBeTruthy(),rn.config({"vs/nls":{availableLanguages:{"*":"zh-cn"}},paths:{vs:`${m.response}/min/vs`}});try{u.value=await rn.init(),d.value??(d.value=u.value.languages.getLanguages()),c.value=(E=d.value.find(x=>{var _;return(_=x.extensions)==null?void 0:_.includes(`.${e.fileExt}`)}))==null?void 0:E.id,s.value=!1,(l.value=!c.value)||v()}catch{s.value=!1}}async function v(){l.value=!1,await a.nextTick(),f.value=u.value.editor.create(n.value,{value:h.value,language:c.value||"plaintext",tabSize:2,multiCursorModifier:"ctrlCmd",minimap:{showSlider:"always"},padding:{top:10},wordWrap:"on",theme:"vs-dark",readOnly:!0})}return Le(()=>e.file,(y,E,x)=>{o.value=!0;const _=new FileReader;_.onprogress=R=>{g.value=Math.round(R.loaded/R.total*100)},_.onload=async R=>{var M;o.value=!1,h.value=(M=R.target)==null?void 0:M.result,p()},_.readAsText(y),x(()=>{_.abort()})}),Le(Ut,y=>{const E='[data-name^="vs/editor"]';function x(){y.querySelectorAll(E).forEach(_=>{y.removeChild(_)}),Array.from(document.querySelectorAll(E)).forEach(_=>{y.appendChild(_.cloneNode(!0))})}un(document.head,x,{childList:!0}),x()}),oo(()=>({width:i.value,height:r.value}),y=>{var E;(E=f.value)==null||E.layout(y)}),a.onUnmounted(()=>{var y;(y=f.value)==null||y.dispose()}),(y,E)=>{const x=tr,_=Zi,R=Ui;return a.openBlock(),a.createElementBlock("div",So,[a.createCommentVNode(" 加载中 "),a.unref(o)||a.unref(s)?(a.openBlock(),a.createElementBlock("div",Eo,[a.createVNode(x),a.unref(o)?(a.openBlock(),a.createElementBlock("div",_o,"文件读取中, 当前进度 "+a.toDisplayString(a.unref(g))+"%",1)):a.createCommentVNode("v-if",!0)])):a.unref(l)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createCommentVNode(" 不支持的文件 "),a.createElementVNode("div",Co,[a.createVNode(_,{class:"text-5xl text-yellow"}),a.createTextVNode(" 此文件类型暂不支持预览 "),a.createVNode(R,{class:"rounded-sm",color:"#3177d3",onClick:E[0]||(E[0]=M=>v())},{default:a.withCtx(()=>[a.createTextVNode("仍然打开")]),_:1})])],2112)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createCommentVNode(" 编辑器 "),a.createElementVNode("div",{ref_key:"editorRef",ref:n,"size-full":""},null,512)],2112))])}}}),zo=`*[data-v-3e5cdc11],[data-v-3e5cdc11]:before,[data-v-3e5cdc11]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-3e5cdc11]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-3e5cdc11],[pos~=absolute][data-v-3e5cdc11]{position:absolute}.left-0[data-v-3e5cdc11],[pos~=left-0][data-v-3e5cdc11]{left:0}.top-0[data-v-3e5cdc11],[pos~=top-0][data-v-3e5cdc11]{top:0}[flex~="~"][data-v-3e5cdc11]{display:flex}[flex~=col][data-v-3e5cdc11]{flex-direction:column}.items-center[data-v-3e5cdc11],[flex~=items-center][data-v-3e5cdc11]{align-items:center}.justify-center[data-v-3e5cdc11],[flex~=justify-center][data-v-3e5cdc11]{justify-content:center}.gap-2[data-v-3e5cdc11],[flex~=gap-2][data-v-3e5cdc11]{gap:.5rem}.gap-3[data-v-3e5cdc11],[flex~=gap-3][data-v-3e5cdc11]{gap:.75rem}.rounded-sm[data-v-3e5cdc11]{border-radius:.125rem}[bg-dark=""][data-v-3e5cdc11]{--un-bg-opacity:1;background-color:rgb(34 34 34 / var(--un-bg-opacity))}.text-5xl[data-v-3e5cdc11]{font-size:3rem;line-height:1}[text-sm=""][data-v-3e5cdc11]{font-size:.875rem;line-height:1.25rem}.text-yellow[data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(250 204 21 / var(--un-text-opacity))}.c-neutral[data-v-3e5cdc11],[c-neutral=""][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}[c-gray=""][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}[color~="#3177d3"][data-v-3e5cdc11]{--un-text-opacity:1;color:rgb(49 119 211 / var(--un-text-opacity))}.size-full[data-v-3e5cdc11],[size-full=""][data-v-3e5cdc11]{width:100%;height:100%}
|
16
16
|
`,Se=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},To=Se(Ao,[["styles",[zo]],["__scopeId","data-v-3e5cdc11"]]);/*!
|
17
17
|
* Viewer.js v1.11.6
|
18
18
|
* https://fengyuanchen.github.io/viewerjs
|
@@ -33,5 +33,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
33
33
|
`,`*[data-v-76ef470f],[data-v-76ef470f]:before,[data-v-76ef470f]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-76ef470f]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.inline[data-v-76ef470f]{display:inline}[hidden=""][data-v-76ef470f]{display:none}.transition[data-v-76ef470f]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[size-full=""][data-v-76ef470f]{width:100%;height:100%}
|
34
34
|
`]],["__scopeId","data-v-76ef470f"]]),ca=["src"],ua=Se(a.defineComponent({__name:"Pdf",props:{file:{type:null}},setup(t){const e=t,n=ut(()=>e.file);return(i,r)=>(a.openBlock(),a.createElementBlock("iframe",{"size-full":"",frameborder:"0",src:a.unref(n)},null,8,ca))}}),[["styles",[`*[data-v-a8464349],[data-v-a8464349]:before,[data-v-a8464349]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-a8464349]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.size-full[data-v-a8464349],[size-full=""][data-v-a8464349]{width:100%;height:100%}
|
35
35
|
`]],["__scopeId","data-v-a8464349"]]),fa=Se(a.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=a.ref(),i=ut(()=>e.file);return Le(i,()=>{const{playing:r}=ho(n,{src:()=>i.value});a.nextTick(()=>{r.value=!0})}),(r,o)=>(a.openBlock(),a.createElementBlock("video",{ref_key:"videoRef",ref:n,class:"size-full absolute top-0 left-0",controls:""},null,512))}}),[["styles",[`*[data-v-9e308ade],[data-v-9e308ade]:before,[data-v-9e308ade]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9e308ade]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-9e308ade]{position:absolute}.left-0[data-v-9e308ade]{left:0}.top-0[data-v-9e308ade]{top:0}.size-full[data-v-9e308ade]{width:100%;height:100%}
|
36
|
-
`]],["__scopeId","data-v-9e308ade"]]);function da(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const ha="1.8.
|
37
|
-
`]],["__scopeId","data-v-f8443614"]]),ba="smart-file-preview";function ya(t,e){var n;yo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function wa(t,e){return t._instance.exposed[e]}const Un=a.defineCustomElement(va);Object.assign(Un.prototype,{previewFile(...t){return wa(this,"previewFile")(...t)}}),ya(ba,Un)})((Xn=SmartCore["1.8.
|
36
|
+
`]],["__scopeId","data-v-9e308ade"]]);function da(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const ha="1.8.3";function pa(t=bo()){const e=st(),n=`style[cssr-id^="${t}-"]`;return a.onMounted(()=>{function i(){const r=e.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}un(document.head,i,{childList:!0}),i()}),t}function ga(){const t=st();return a.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[ha])??{};if(n&&(e.appendChild(document.createElement("style")).textContent=n),i){const o=document.createElement("style");o.setAttribute("namespace","smart"),e.appendChild(o).textContent=i,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=i)}}),{classPrefix:pa()}}const ma={"size-full":"",relative:""},va=Se(a.defineComponent({__name:"index",setup(t,{expose:e}){const n=a.useAttrs(),i=a.shallowRef(),r=a.ref(),o=a.ref(),s=a.computed(()=>Xi[o.value]),l={image:la,pdf:ua,video:fa},u=(f,d)=>{const{name:c,ext:h}=da(f);i.value=d,r.value=c,o.value=h};return ga(),a.onMounted(()=>{const f=st();Ut.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=vi;return a.openBlock(),a.createBlock(c,{namespace:"smart"},{default:a.withCtx(()=>[a.createElementVNode("div",ma,[a.createCommentVNode(" File / Blob 文件打开 "),a.unref(i)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(l[a.unref(s)]||To),a.mergeProps({key:0,file:a.unref(i),fileName:a.unref(r),fileExt:a.unref(o)},a.unref(n)),null,16,["file","fileName","fileExt"])):a.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",[`*[data-v-f8443614],[data-v-f8443614]:before,[data-v-f8443614]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-f8443614]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[relative=""][data-v-f8443614]{position:relative}.size-full[data-v-f8443614],[size-full=""][data-v-f8443614]{width:100%;height:100%}
|
37
|
+
`]],["__scopeId","data-v-f8443614"]]),ba="smart-file-preview";function ya(t,e){var n;yo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function wa(t,e){return t._instance.exposed[e]}const Un=a.defineCustomElement(va);Object.assign(Un.prototype,{previewFile(...t){return wa(this,"previewFile")(...t)}}),ya(ba,Un)})((Xn=SmartCore["1.8.3"])==null?void 0:Xn.Vue);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var N,M,_;(function(f,g,R){"use strict";function h(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(C(97,122))}function B(){return String.fromCharCode(C(65,90))}function v(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let l;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(l=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=l>1?C(0,l-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=C(0,9))}return c}function z(){return v(1,{uppercase:!0})+v(17,{uppercase:!0,number:!0})}function U(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(h(r)||(o=Array.isArray(r))){let l;if(n.has(r))l=n.get(r);else{let c;l=o?Array.isArray(c=e[t])?c:[]:h(c=e[t])?c:{},U(l,r,n)}e[t]=l}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!h(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(h(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)U(e,t,n);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},A={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},w={common:{fontFamily:A.sans,fontFamilyMono:A.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},w,{}),L({},w,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="1.8.1";function G(e,a){let n,t,r;const o=f.ref(!0),l=()=>{o.value=!0,r()};f.watch(e,l,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(u){p==null||p(u)}}));return Object.isExtensible(b)&&(b.trigger=l),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function x(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const n=a.flat(),t=n[0];return j(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(x(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function K(e,a,n){return f.watch(e,a,{...n,deep:!0})}function J(e){var a;const n=x(e);return(a=n==null?void 0:n.$el)!=null?a:n}const Q=$?window:void 0;function X(){const e=f.ref(!1);return f.getCurrentInstance()&&f.onMounted(()=>{e.value=!0}),e}function Y(e){const a=X();return f.computed(()=>(a.value,!!e()))}function Z(e,a,n={}){const{window:t=Q,...r}=n;let o;const l=Y(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.watch(()=>J(e),s=>{c(),l.value&&t&&s&&(o=new MutationObserver(a),o.observe(s,r))},{immediate:!0}),b=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),p()};return q(d),{isSupported:l,stop:d,takeRecords:b}}function T(){const e=f.getCurrentInstance(),a=G(()=>null,()=>e.proxy.$el);return f.onUpdated(a.trigger),f.onMounted(a.trigger),a}function ee(e=z()){const a=T(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}Z(document.head,t,{childList:!0}),t()}),e}function fe(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:ee()}}const ae=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=fe(),l=W(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:u,onProgress:F}){const S=d.file,re=n.beforeUpload??(y=>y),P=new FormData;P.set("file",S);const oe=re({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:y,total:m}){F({percent:m?Math.ceil(y/m*100):0})}});R.getConfigProvider("request")(oe).then(y=>{const m=y.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:E})=>E===d.id),1,d),t.value.find(({fileName:E})=>E===m.url)||t.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(y=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),u(),console.error(y)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(u=>u.url===s)?d++:t.value.splice(d,1)}},10)}return K(t,d=>{d.forEach(({fileName:s})=>{c.value.some(u=>u.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const u=c.value[s];u.status==="finished"&&u.url&&!d.some(({fileName:F})=>F===u.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(w),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(l),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=u=>f.isRef(c)?c.value=u:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",[`*[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
|
2
|
-
`]],["__scopeId","data-v-da18f512"]]),te="smart-upload";function ne(e,a){var n;I&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(ae);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),ne(te,D)})((N=SmartCore["1.8.
|
1
|
+
var N,M,_;(function(f,g,R){"use strict";function h(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(C(97,122))}function B(){return String.fromCharCode(C(65,90))}function v(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let l;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(l=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=l>1?C(0,l-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=C(0,9))}return c}function z(){return v(1,{uppercase:!0})+v(17,{uppercase:!0,number:!0})}function U(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(h(r)||(o=Array.isArray(r))){let l;if(n.has(r))l=n.get(r);else{let c;l=o?Array.isArray(c=e[t])?c:[]:h(c=e[t])?c:{},U(l,r,n)}e[t]=l}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!h(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(h(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)U(e,t,n);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},A={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},w={common:{fontFamily:A.sans,fontFamilyMono:A.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},w,{}),L({},w,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="1.8.3";function G(e,a){let n,t,r;const o=f.ref(!0),l=()=>{o.value=!0,r()};f.watch(e,l,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(u){p==null||p(u)}}));return Object.isExtensible(b)&&(b.trigger=l),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function x(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const n=a.flat(),t=n[0];return j(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(x(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function K(e,a,n){return f.watch(e,a,{...n,deep:!0})}function J(e){var a;const n=x(e);return(a=n==null?void 0:n.$el)!=null?a:n}const Q=$?window:void 0;function X(){const e=f.ref(!1);return f.getCurrentInstance()&&f.onMounted(()=>{e.value=!0}),e}function Y(e){const a=X();return f.computed(()=>(a.value,!!e()))}function Z(e,a,n={}){const{window:t=Q,...r}=n;let o;const l=Y(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.watch(()=>J(e),s=>{c(),l.value&&t&&s&&(o=new MutationObserver(a),o.observe(s,r))},{immediate:!0}),b=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),p()};return q(d),{isSupported:l,stop:d,takeRecords:b}}function T(){const e=f.getCurrentInstance(),a=G(()=>null,()=>e.proxy.$el);return f.onUpdated(a.trigger),f.onMounted(a.trigger),a}function ee(e=z()){const a=T(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}Z(document.head,t,{childList:!0}),t()}),e}function fe(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:ee()}}const ae=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=fe(),l=W(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:u,onProgress:F}){const S=d.file,re=n.beforeUpload??(y=>y),P=new FormData;P.set("file",S);const oe=re({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:y,total:m}){F({percent:m?Math.ceil(y/m*100):0})}});R.getConfigProvider("request")(oe).then(y=>{const m=y.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:E})=>E===d.id),1,d),t.value.find(({fileName:E})=>E===m.url)||t.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(y=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),u(),console.error(y)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(u=>u.url===s)?d++:t.value.splice(d,1)}},10)}return K(t,d=>{d.forEach(({fileName:s})=>{c.value.some(u=>u.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const u=c.value[s];u.status==="finished"&&u.url&&!d.some(({fileName:F})=>F===u.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(w),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(l),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=u=>f.isRef(c)?c.value=u:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",[`*[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
|
2
|
+
`]],["__scopeId","data-v-da18f512"]]),te="smart-upload";function ne(e,a){var n;I&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(ae);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),ne(te,D)})((N=SmartCore["1.8.3"])==null?void 0:N.Vue,(M=SmartCore["1.8.3"])==null?void 0:M.NaiveUI,(_=SmartCore["1.8.3"])==null?void 0:_.SmartCore);
|