@vtj/pro 0.9.24 → 0.9.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
  2. package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
  3. package/dist/@vtj/materials/assets/element/index.umd.js +3 -3
  4. package/dist/@vtj/materials/assets/ui/index.umd.js +3 -3
  5. package/dist/@vtj/materials/assets/vant/index.umd.js +3 -3
  6. package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
  7. package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
  8. package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +8 -8
  9. package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +17 -17
  10. package/dist/@vtj/materials/deps/@vueuse/shared/index.iife.min.js +1 -1
  11. package/dist/@vtj/materials/deps/element-plus/index.css +1 -1
  12. package/dist/@vtj/materials/deps/element-plus/index.full.min.js +19 -27
  13. package/dist/@vtj/materials/deps/element-plus/zh-cn.js +1 -1
  14. package/dist/@vtj/materials/deps/vant/vant.min.js +1 -1
  15. package/dist/assets/{@element-plus-icons-vue-CClttscX.js → @element-plus-icons-vue-JgjQwxw0.js} +1 -1
  16. package/dist/assets/@vueuse-DbIzleUK.js +1 -0
  17. package/dist/assets/Editor-BFm57YMW-C94rZ-PX.js +1 -0
  18. package/dist/assets/auth-huY96-8A.js +1 -0
  19. package/dist/assets/{css.worker-DcQjDQkA-DTHP9D1P.js → css.worker-DhE07keG-DPvIRz-E.js} +17 -17
  20. package/dist/assets/{dayjs-D_Mdy0hN.js → dayjs-DO-COJPZ.js} +1 -1
  21. package/dist/assets/{editor.worker-lG8NyUhA-Fj8qvYlB.js → editor.worker-DKpUct5n-Y3jripZQ.js} +1 -1
  22. package/dist/assets/element-plus-ChXQlg1L.js +13 -0
  23. package/dist/assets/element-plus-l5LgIwv6.css +1 -0
  24. package/dist/assets/{extension-GDgUZ8am.js → extension-CzuY4oyZ.js} +41 -41
  25. package/dist/assets/html.worker-C5hxLCyX-CnBobk15.js +1 -0
  26. package/dist/assets/{html2canvas-D2Pt4KSj.js → html2canvas-CIV5arX1.js} +2 -2
  27. package/dist/assets/index-Bn0IAJVs.js +1 -0
  28. package/dist/assets/index-D0DJL71C.js +157 -0
  29. package/dist/assets/{json.worker-Cz3wPAlQ-CAknfGu-.js → json.worker-DCDqLFYI-C7_rWj4n.js} +1 -1
  30. package/dist/assets/{lodash-es-Cd_vyJR8.js → lodash-es-BL-d_OSa.js} +1 -1
  31. package/dist/assets/{mockjs-CT240U6v.js → mockjs-CmECu50v.js} +6 -6
  32. package/dist/assets/{monaco-editor-BhWNbPWS.js → monaco-editor-BfuwkNVi.js} +261 -261
  33. package/dist/assets/page-BD3-WWrn.js +2 -0
  34. package/dist/assets/preview-poDnhcfZ.js +2 -0
  35. package/dist/assets/shared-CFJLz5mK.js +25 -0
  36. package/dist/assets/{ts.worker-C2xNNmKz-DfuXuMr6.js → ts.worker-D9KUThWN-CwisnTF3.js} +168 -168
  37. package/dist/assets/utils-Ds6D30Rp.js +1 -0
  38. package/dist/assets/{vue-DEqBd9tH.js → vue-Crnm0cHZ.js} +9 -9
  39. package/dist/assets/{vue-router-CrZzyM_O.js → vue-router-CmJCdr1O.js} +2 -2
  40. package/dist/assets/{vxe-CzgOUQRv.js → vxe-2KpaR_hB.js} +3 -3
  41. package/dist/index.html +14 -14
  42. package/package.json +11 -11
  43. package/dist/assets/@vueuse-54eSL_G4.js +0 -1
  44. package/dist/assets/Editor-Cp9Sb2ni-Dk9vII-5.js +0 -1
  45. package/dist/assets/auth-BH2T_Fcd.js +0 -1
  46. package/dist/assets/element-plus-C1NYT3Gu.js +0 -21
  47. package/dist/assets/element-plus-IIQy0ps0.css +0 -1
  48. package/dist/assets/html.worker-B83UVBG6-DuLWH66p.js +0 -1
  49. package/dist/assets/index-BpBJej6g.js +0 -1
  50. package/dist/assets/index-OPg8nyHz.js +0 -157
  51. package/dist/assets/page-BRgGFdAM.js +0 -2
  52. package/dist/assets/preview-DSX6cKGd.js +0 -2
  53. package/dist/assets/shared-CMPiinVg.js +0 -25
  54. package/dist/assets/utils-B9i9aHNx.js +0 -1
package/dist/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  <meta http-equiv="Expires" content="0"/>
10
10
  <title>低代码设计器 - VTJ.PRO</title>
11
11
  <script>
12
- var __BUILD_TIME__ = '1737534432366';
12
+ var __BUILD_TIME__ = '1739259208460';
13
13
  (function () {
14
14
  const regex = /<!--{{(\d*)}}-->/;
15
15
  window.fetch('?t=' + Date.now()).then(async (res) => {
@@ -25,20 +25,20 @@
25
25
  });
26
26
  })();
27
27
  </script>
28
- <!--{{1737534432366}}-->
28
+ <!--{{1739259208460}}-->
29
29
 
30
- <script type="module" crossorigin src="./assets/index-OPg8nyHz.js"></script>
31
- <link rel="modulepreload" crossorigin href="./assets/vue-DEqBd9tH.js">
32
- <link rel="modulepreload" crossorigin href="./assets/dayjs-D_Mdy0hN.js">
33
- <link rel="modulepreload" crossorigin href="./assets/mockjs-CT240U6v.js">
34
- <link rel="modulepreload" crossorigin href="./assets/vue-router-CrZzyM_O.js">
35
- <link rel="modulepreload" crossorigin href="./assets/lodash-es-Cd_vyJR8.js">
36
- <link rel="modulepreload" crossorigin href="./assets/@vueuse-54eSL_G4.js">
37
- <link rel="modulepreload" crossorigin href="./assets/@element-plus-icons-vue-CClttscX.js">
38
- <link rel="modulepreload" crossorigin href="./assets/shared-CMPiinVg.js">
39
- <link rel="modulepreload" crossorigin href="./assets/element-plus-C1NYT3Gu.js">
40
- <link rel="modulepreload" crossorigin href="./assets/monaco-editor-BhWNbPWS.js">
41
- <link rel="stylesheet" crossorigin href="./assets/element-plus-IIQy0ps0.css">
30
+ <script type="module" crossorigin src="./assets/index-D0DJL71C.js"></script>
31
+ <link rel="modulepreload" crossorigin href="./assets/vue-Crnm0cHZ.js">
32
+ <link rel="modulepreload" crossorigin href="./assets/dayjs-DO-COJPZ.js">
33
+ <link rel="modulepreload" crossorigin href="./assets/mockjs-CmECu50v.js">
34
+ <link rel="modulepreload" crossorigin href="./assets/vue-router-CmJCdr1O.js">
35
+ <link rel="modulepreload" crossorigin href="./assets/lodash-es-BL-d_OSa.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/@vueuse-DbIzleUK.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/@element-plus-icons-vue-JgjQwxw0.js">
38
+ <link rel="modulepreload" crossorigin href="./assets/shared-CFJLz5mK.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/element-plus-ChXQlg1L.js">
40
+ <link rel="modulepreload" crossorigin href="./assets/monaco-editor-BfuwkNVi.js">
41
+ <link rel="stylesheet" crossorigin href="./assets/element-plus-l5LgIwv6.css">
42
42
  <link rel="stylesheet" crossorigin href="./assets/monaco-editor-Cpw7ccEV.css">
43
43
  <link rel="stylesheet" crossorigin href="./assets/index-B-FTarqg.css">
44
44
 
package/package.json CHANGED
@@ -2,23 +2,23 @@
2
2
  "name": "@vtj/pro",
3
3
  "description": "VTJ.PRO",
4
4
  "private": false,
5
- "version": "0.9.24",
5
+ "version": "0.9.26",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@vtj/core": "~0.9.24",
9
- "@vtj/designer": "~0.9.24",
10
- "@vtj/local": "~0.9.24",
11
- "@vtj/renderer": "~0.9.24",
12
- "@vtj/materials": "~0.9.24"
8
+ "@vtj/local": "~0.9.26",
9
+ "@vtj/designer": "~0.9.26",
10
+ "@vtj/renderer": "~0.9.26",
11
+ "@vtj/core": "~0.9.26",
12
+ "@vtj/materials": "~0.9.26"
13
13
  },
14
14
  "devDependencies": {
15
15
  "vue": "~3.5.5",
16
16
  "vue-router": "~4.5.0",
17
- "@vtj/charts": "~0.9.24",
18
- "@vtj/icons": "~0.9.24",
19
- "@vtj/utils": "~0.9.24",
20
- "@vtj/ui": "~0.9.24",
21
- "@vtj/cli": "~0.9.8"
17
+ "@vtj/cli": "~0.9.8",
18
+ "@vtj/charts": "~0.9.26",
19
+ "@vtj/ui": "~0.9.26",
20
+ "@vtj/utils": "~0.9.26",
21
+ "@vtj/icons": "~0.9.26"
22
22
  },
23
23
  "exports": {
24
24
  "./vite": {
@@ -1 +0,0 @@
1
- var ke=Object.defineProperty,Be=Object.defineProperties;var Xe=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var ie=(e,t,n)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))ae.call(t,n)&&ie(e,n,t[n]);if(X)for(var n of X(t))le.call(t,n)&&ie(e,n,t[n]);return e},k=(e,t)=>Be(e,Xe(t));var Y=(e,t)=>{var n={};for(var r in e)ae.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&X)for(var r of X(e))t.indexOf(r)<0&&le.call(e,r)&&(n[r]=e[r]);return n};import{u as Se,g as Ee,b as Pe,s as ee,w as Te,r as G,e as g,f as C,h as B,i as te,n as ne,j as re,k as x,l as Ye,t as Qe,m as Je,p as xe,q as Ge}from"./vue-DEqBd9tH.js";var Ue=Object.defineProperty,Ke=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,fe=(e,t,n)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tt=(e,t)=>{for(var n in t||(t={}))Ze.call(t,n)&&fe(e,n,t[n]);if(ce)for(var n of ce(t))et.call(t,n)&&fe(e,n,t[n]);return e},nt=(e,t)=>Ke(e,qe(t));function nn(e,t){var n;const r=ee();return Te(()=>{r.value=e()},nt(tt({},t),{flush:(n=void 0)!=null?n:"sync"})),G(r)}var de;const U=typeof window!="undefined",rt=e=>typeof e!="undefined",Z=e=>typeof e=="function",ot=e=>typeof e=="string",H=()=>{},st=U&&((de=window==null?void 0:window.navigator)==null?void 0:de.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function z(e){return typeof e=="function"?e():Se(e)}function Ce(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}function ut(e,t={}){let n,r,o=H;const s=i=>{clearTimeout(i),o(),o=H};return i=>{const l=z(e),d=z(t.maxWait);return n&&s(n),l<=0||d!==void 0&&d<=0?(r&&(s(r),r=null),Promise.resolve(i())):new Promise((p,c)=>{o=t.rejectOnCancel?c:p,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,p(i())},d)),n=setTimeout(()=>{r&&s(r),r=null,p(i())},l)})}}function it(e,t=!0,n=!0,r=!1){let o=0,s,u=!0,i=H,l;const d=()=>{s&&(clearTimeout(s),s=void 0,i(),i=H)};return c=>{const a=z(e),f=Date.now()-o,v=()=>l=c();return d(),a<=0?(o=Date.now(),v()):(f>a&&(n||!u)?(o=Date.now(),v()):t&&(l=new Promise((m,y)=>{i=r?y:m,s=setTimeout(()=>{o=Date.now(),u=!0,m(v()),d()},Math.max(0,a-f))})),!n&&!s&&(s=setTimeout(()=>u=!0,a)),u=!1,l)}}function at(e){return e}function lt(e,t){let n,r,o;const s=g(!0),u=()=>{s.value=!0,o()};C(e,u,{flush:"sync"});const i=Z(t)?t:t.get,l=Z(t)?void 0:t.set,d=re((p,c)=>(r=p,o=c,{get(){return s.value&&(n=i(),s.value=!1),r(),n},set(a){l==null||l(a)}}));return Object.isExtensible(d)&&(d.trigger=u),d}function K(e){return Ee()?(Pe(e),!0):!1}function ct(e,t=200,n={}){return Ce(ut(t,n),e)}function rn(e,t=200,n={}){const r=g(e.value),o=ct(()=>{r.value=e.value},t,n);return C(e,()=>o()),r}function on(e,t=200,n=!1,r=!0,o=!1){return Ce(it(t,n,r,o),e)}function oe(e,t=!0){B()?te(e):t?e():ne(e)}function sn(e,t,n={}){const{immediate:r=!0}=n,o=g(!1);let s=null;function u(){s&&(clearTimeout(s),s=null)}function i(){o.value=!1,u()}function l(...d){u(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,e(...d)},z(t))}return r&&(o.value=!0,U&&l()),K(i),{isPending:G(o),start:l,stop:i}}function R(e){var t;const n=z(e);return(t=n==null?void 0:n.$el)!=null?t:n}const j=U?window:void 0,ft=U?window.document:void 0;function M(...e){let t,n,r,o;if(ot(e[0])||Array.isArray(e[0])?([n,r,o]=e,t=j):[t,n,r,o]=e,!t)return H;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],u=()=>{s.forEach(p=>p()),s.length=0},i=(p,c,a,f)=>(p.addEventListener(c,a,f),()=>p.removeEventListener(c,a,f)),l=C(()=>[R(t),z(o)],([p,c])=>{u(),p&&s.push(...n.flatMap(a=>r.map(f=>i(p,a,f,c))))},{immediate:!0,flush:"post"}),d=()=>{l(),u()};return K(d),d}let pe=!1;function un(e,t,n={}){const{window:r=j,ignore:o=[],capture:s=!0,detectIframe:u=!1}=n;if(!r)return;st&&!pe&&(pe=!0,Array.from(r.document.body.children).forEach(a=>a.addEventListener("click",H)));let i=!0;const l=a=>o.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(v=>v===a.target||a.composedPath().includes(v));{const v=R(f);return v&&(a.target===v||a.composedPath().includes(v))}}),p=[M(r,"click",a=>{const f=R(e);if(!(!f||f===a.target||a.composedPath().includes(f))){if(a.detail===0&&(i=!l(a)),!i){i=!0;return}t(a)}},{passive:!0,capture:s}),M(r,"pointerdown",a=>{const f=R(e);f&&(i=!a.composedPath().includes(f)&&!l(a))},{passive:!0}),u&&M(r,"blur",a=>{var f;const v=R(e);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(v!=null&&v.contains(r.document.activeElement))&&t(a)})].filter(Boolean);return()=>p.forEach(a=>a())}function an(e={}){var t;const{window:n=j}=e,r=(t=e.document)!=null?t:n==null?void 0:n.document,o=lt(()=>null,()=>r==null?void 0:r.activeElement);return n&&(M(n,"blur",s=>{s.relatedTarget===null&&o.trigger()},!0),M(n,"focus",o.trigger,!0)),o}function Ae(e,t=!1){const n=g(),r=()=>n.value=!!e();return r(),oe(r,t),n}function dt(e){return JSON.parse(JSON.stringify(e))}const ve=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},me="__vueuse_ssr_handlers__";ve[me]=ve[me]||{};function ln(e,t,{window:n=j,initialValue:r=""}={}){const o=g(r),s=x(()=>{var u;return R(t)||((u=n==null?void 0:n.document)==null?void 0:u.documentElement)});return C([s,()=>z(e)],([u,i])=>{var l;if(u&&n){const d=(l=n.getComputedStyle(u).getPropertyValue(i))==null?void 0:l.trim();o.value=d||r}},{immediate:!0}),C(o,u=>{var i;(i=s.value)!=null&&i.style&&s.value.style.setProperty(z(e),u)}),o}function cn({document:e=ft}={}){if(!e)return g("visible");const t=g(e.visibilityState);return M(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var he=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,mt=(e,t)=>{var n={};for(var r in e)pt.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&he)for(var r of he(e))t.indexOf(r)<0&&vt.call(e,r)&&(n[r]=e[r]);return n};function ht(e,t,n={}){const r=n,{window:o=j}=r,s=mt(r,["window"]);let u;const i=Ae(()=>o&&"ResizeObserver"in o),l=()=>{u&&(u.disconnect(),u=void 0)},d=C(()=>R(e),c=>{l(),i.value&&o&&c&&(u=new ResizeObserver(t),u.observe(c,s))},{immediate:!0,flush:"post"}),p=()=>{l(),d()};return K(p),{isSupported:i,stop:p}}function fn(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:o=!0,immediate:s=!0}=t,u=g(0),i=g(0),l=g(0),d=g(0),p=g(0),c=g(0),a=g(0),f=g(0);function v(){const m=R(e);if(!m){n&&(u.value=0,i.value=0,l.value=0,d.value=0,p.value=0,c.value=0,a.value=0,f.value=0);return}const y=m.getBoundingClientRect();u.value=y.height,i.value=y.bottom,l.value=y.left,d.value=y.right,p.value=y.top,c.value=y.width,a.value=y.x,f.value=y.y}return ht(e,v),C(()=>R(e),m=>!m&&v()),o&&M("scroll",v,{capture:!0,passive:!0}),r&&M("resize",v,{passive:!0}),oe(()=>{s&&v()}),{height:u,bottom:i,left:l,right:d,top:p,width:c,x:a,y:f,update:v}}var ge=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,wt=(e,t)=>{var n={};for(var r in e)gt.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ge)for(var r of ge(e))t.indexOf(r)<0&&yt.call(e,r)&&(n[r]=e[r]);return n};function dn(e,t,n={}){const r=n,{window:o=j}=r,s=wt(r,["window"]);let u;const i=Ae(()=>o&&"MutationObserver"in o),l=()=>{u&&(u.disconnect(),u=void 0)},d=C(()=>R(e),c=>{l(),i.value&&o&&c&&(u=new MutationObserver(t),u.observe(c,s))},{immediate:!0}),p=()=>{l(),d()};return K(p),{isSupported:i,stop:p}}var ye;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(ye||(ye={}));var bt=Object.defineProperty,we=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,be=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,St=(e,t)=>{for(var n in t)Ot.call(t,n)&&be(e,n,t[n]);if(we)for(var n of we(t))_t.call(t,n)&&be(e,n,t[n]);return e};const Et={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};St({linear:at},Et);function pn(e,t,n,r={}){var o,s,u;const{clone:i=!1,passive:l=!1,eventName:d,deep:p=!1,defaultValue:c}=r,a=B(),f=n||(a==null?void 0:a.emit)||((o=a==null?void 0:a.$emit)==null?void 0:o.bind(a))||((u=(s=a==null?void 0:a.proxy)==null?void 0:s.$emit)==null?void 0:u.bind(a==null?void 0:a.proxy));let v=d;t||(t="modelValue"),v=d||v||`update:${t.toString()}`;const m=O=>i?Z(i)?i(O):dt(O):O,y=()=>rt(e[t])?m(e[t]):c;if(l){const O=y(),_=g(O);return C(()=>e[t],A=>_.value=m(A)),C(_,A=>{(A!==e[t]||p)&&f(v,A)},{deep:p}),_}else return x({get(){return y()},set(O){f(v,O)}})}function vn({window:e=j}={}){if(!e)return g(!1);const t=g(e.document.hasFocus());return M(e,"blur",()=>{t.value=!1}),M(e,"focus",()=>{t.value=!0}),t}function mn(e={}){const{window:t=j,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:o=!0,includeScrollbar:s=!0}=e,u=g(n),i=g(r),l=()=>{t&&(s?(u.value=t.innerWidth,i.value=t.innerHeight):(u.value=t.document.documentElement.clientWidth,i.value=t.document.documentElement.clientHeight))};return l(),oe(l),M("resize",l,{passive:!0}),o&&M("orientationchange",l,{passive:!0}),{width:u,height:i}}function se(e){return Ee()?(Pe(e),!0):!1}const q=new WeakMap,Pt=(...e)=>{var t;const n=e[0],r=(t=B())==null?void 0:t.proxy;if(r==null&&!xe())throw new Error("injectLocal must be called in setup");return r&&q.has(r)&&n in q.get(r)?q.get(r)[n]:Ge(...e)};function T(e){return typeof e=="function"?e():Se(e)}const We=typeof window!="undefined"&&typeof document!="undefined";typeof WorkerGlobalScope!="undefined"&&globalThis instanceof WorkerGlobalScope;const Tt=Object.prototype.toString,xt=e=>Tt.call(e)==="[object Object]",$e=()=>{};function Ct(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}const Le=e=>e();function At(e=Le){const t=g(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...s)=>{t.value&&e(...s)};return{isActive:G(t),pause:n,resume:r,eventFilter:o}}function Oe(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Wt(e){return B()}function $t(...e){if(e.length!==1)return Je(...e);const t=e[0];return typeof t=="function"?G(re(()=>({get:t,set:$e}))):g(t)}function Lt(e,t,n={}){const s=n,{eventFilter:r=Le}=s,o=Y(s,["eventFilter"]);return C(e,Ct(r,t),o)}function Mt(e,t,n={}){const p=n,{eventFilter:r}=p,o=Y(p,["eventFilter"]),{eventFilter:s,pause:u,resume:i,isActive:l}=At(r);return{stop:Lt(e,t,k(F({},o),{eventFilter:s})),pause:u,resume:i,isActive:l}}function Rt(e,t={}){if(!Ye(e))return Qe(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=re(()=>({get(){return e.value[r]},set(o){var s;if((s=T(t.replaceRef))!=null?s:!0)if(Array.isArray(e.value)){const i=[...e.value];i[r]=o,e.value=i}else{const i=k(F({},e.value),{[r]:o});Object.setPrototypeOf(i,Object.getPrototypeOf(e.value)),e.value=i}else e.value[r]=o}}));return n}function ue(e,t=!0,n){Wt()?te(e,n):t?e():ne(e)}const D=We?window:void 0;function V(e){var t;const n=T(e);return(t=n==null?void 0:n.$el)!=null?t:n}function I(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=D):[t,n,r,o]=e,!t)return $e;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],u=()=>{s.forEach(p=>p()),s.length=0},i=(p,c,a,f)=>(p.addEventListener(c,a,f),()=>p.removeEventListener(c,a,f)),l=C(()=>[V(t),T(o)],([p,c])=>{if(u(),!p)return;const a=xt(c)?F({},c):c;s.push(...n.flatMap(f=>r.map(v=>i(p,f,v,a))))},{immediate:!0,flush:"post"}),d=()=>{l(),u()};return se(d),d}function It(){const e=g(!1),t=B();return t&&te(()=>{e.value=!0},t),e}function Me(e){const t=It();return x(()=>(t.value,!!e()))}const Dt=Symbol("vueuse-ssr-width");function Ft(){const e=xe()?Pt(Dt,null):null;return typeof e=="number"?e:void 0}function Vt(e,t={}){const{window:n=D,ssrWidth:r=Ft()}=t,o=Me(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),s=g(typeof r=="number");let u;const i=g(!1),l=c=>{i.value=c.matches},d=()=>{u&&("removeEventListener"in u?u.removeEventListener("change",l):u.removeListener(l))},p=Te(()=>{if(s.value){s.value=!o.value;const c=T(e).split(",");i.value=c.some(a=>{const f=a.includes("not all"),v=a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),m=a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let y=!!(v||m);return v&&y&&(y=r>=Oe(v[1])),m&&y&&(y=r<=Oe(m[1])),f?!y:y});return}o.value&&(d(),u=n.matchMedia(T(e)),"addEventListener"in u?u.addEventListener("change",l):u.addListener(l),i.value=u.matches)});return se(()=>{p(),d(),u=void 0}),x(()=>i.value)}const Q=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},J="__vueuse_ssr_handlers__",Nt=zt();function zt(){return J in Q||(Q[J]=Q[J]||{}),Q[J]}function Re(e,t){return Nt[e]||t}function jt(e){return Vt("(prefers-color-scheme: dark)",e)}function Ht(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const kt={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},_e="vueuse-storage";function Bt(e,t,n,r={}){var o;const{flush:s="pre",deep:u=!0,listenToStorageChanges:i=!0,writeDefaults:l=!0,mergeDefaults:d=!1,shallow:p,window:c=D,eventFilter:a,onError:f=h=>{console.error(h)},initOnMounted:v}=r,m=(p?ee:g)(typeof t=="function"?t():t);if(!n)try{n=Re("getDefaultStorage",()=>{var h;return(h=D)==null?void 0:h.localStorage})()}catch(h){f(h)}if(!n)return m;const y=T(t),O=Ht(y),_=(o=r.serializer)!=null?o:kt[O],{pause:A,resume:P}=Mt(m,()=>L(m.value),{flush:s,deep:u,eventFilter:a});c&&i&&ue(()=>{n instanceof Storage?I(c,"storage",w):I(c,_e,$),v&&w()}),v||w();function W(h,S){if(c){const E={key:e,oldValue:h,newValue:S,storageArea:n};c.dispatchEvent(n instanceof Storage?new StorageEvent("storage",E):new CustomEvent(_e,{detail:E}))}}function L(h){try{const S=n.getItem(e);if(h==null)W(S,null),n.removeItem(e);else{const E=_.write(h);S!==E&&(n.setItem(e,E),W(S,E))}}catch(S){f(S)}}function b(h){const S=h?h.newValue:n.getItem(e);if(S==null)return l&&y!=null&&n.setItem(e,_.write(y)),y;if(!h&&d){const E=_.read(S);return typeof d=="function"?d(E,y):O==="object"&&!Array.isArray(E)?F(F({},y),E):E}else return typeof S!="string"?S:_.read(S)}function w(h){if(!(h&&h.storageArea!==n)){if(h&&h.key==null){m.value=y;return}if(!(h&&h.key!==e)){A();try{(h==null?void 0:h.newValue)!==_.write(m.value)&&(m.value=b(h))}catch(S){f(S)}finally{h?ne(P):P()}}}}function $(h){w(h.detail)}return m}const Xt="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Yt(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:o=D,storage:s,storageKey:u="vueuse-color-scheme",listenToStorageChanges:i=!0,storageRef:l,emitAuto:d,disableTransition:p=!0}=e,c=F({auto:"",light:"light",dark:"dark"},e.modes||{}),a=jt({window:o}),f=x(()=>a.value?"dark":"light"),v=l||(u==null?$t(r):Bt(u,r,s,{window:o,listenToStorageChanges:i})),m=x(()=>v.value==="auto"?f.value:v.value),y=Re("updateHTMLAttrs",(P,W,L)=>{const b=typeof P=="string"?o==null?void 0:o.document.querySelector(P):V(P);if(!b)return;const w=new Set,$=new Set;let h=null;if(W==="class"){const E=L.split(/\s/g);Object.values(c).flatMap(N=>(N||"").split(/\s/g)).filter(Boolean).forEach(N=>{E.includes(N)?w.add(N):$.add(N)})}else h={key:W,value:L};if(w.size===0&&$.size===0&&h===null)return;let S;p&&(S=o.document.createElement("style"),S.appendChild(document.createTextNode(Xt)),o.document.head.appendChild(S));for(const E of w)b.classList.add(E);for(const E of $)b.classList.remove(E);h&&b.setAttribute(h.key,h.value),p&&(o.getComputedStyle(S).opacity,document.head.removeChild(S))});function O(P){var W;y(t,n,(W=c[P])!=null?W:P)}function _(P){e.onChanged?e.onChanged(P,O):O(P)}C(m,_,{flush:"post",immediate:!0}),ue(()=>_(m.value));const A=x({get(){return d?v.value:m.value},set(P){v.value=P}});return Object.assign(A,{store:v,system:f,state:m})}function hn(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=Yt(k(F({},e),{onChanged:(u,i)=>{var l;e.onChanged?(l=e.onChanged)==null||l.call(e,u==="dark",i,u):i(u)},modes:{dark:t,light:n}})),o=x(()=>r.system.value);return x({get(){return r.value==="dark"},set(u){const i=u?"dark":"light";o.value===i?r.value="auto":r.value=i}})}function gn(e,t={}){var n,r;const{pointerTypes:o,preventDefault:s,stopPropagation:u,exact:i,onMove:l,onEnd:d,onStart:p,initialValue:c,axis:a="both",draggingElement:f=D,containerElement:v,handle:m=e,buttons:y=[0]}=t,O=g((n=T(c))!=null?n:{x:0,y:0}),_=g(),A=w=>o?o.includes(w.pointerType):!0,P=w=>{T(s)&&w.preventDefault(),T(u)&&w.stopPropagation()},W=w=>{var $;if(!T(y).includes(w.button)||T(t.disabled)||!A(w)||T(i)&&w.target!==T(e))return;const h=T(v),S=($=h==null?void 0:h.getBoundingClientRect)==null?void 0:$.call(h),E=T(e).getBoundingClientRect(),N={x:w.clientX-(h?E.left-S.left+h.scrollLeft:E.left),y:w.clientY-(h?E.top-S.top+h.scrollTop:E.top)};(p==null?void 0:p(N,w))!==!1&&(_.value=N,P(w))},L=w=>{if(T(t.disabled)||!A(w)||!_.value)return;const $=T(v),h=T(e).getBoundingClientRect();let{x:S,y:E}=O.value;(a==="x"||a==="both")&&(S=w.clientX-_.value.x,$&&(S=Math.min(Math.max(0,S),$.scrollWidth-h.width))),(a==="y"||a==="both")&&(E=w.clientY-_.value.y,$&&(E=Math.min(Math.max(0,E),$.scrollHeight-h.height))),O.value={x:S,y:E},l==null||l(O.value,w),P(w)},b=w=>{T(t.disabled)||!A(w)||_.value&&(_.value=void 0,d==null||d(O.value,w),P(w))};if(We){const w={capture:(r=t.capture)!=null?r:!0};I(m,"pointerdown",W,w),I(f,"pointermove",L,w),I(f,"pointerup",b,w)}return k(F({},Rt(O)),{position:O,isDragging:x(()=>!!_.value),style:x(()=>`left:${O.value.x}px;top:${O.value.y}px;`)})}function Qt(e,t,n={}){const c=n,{window:r=D}=c,o=Y(c,["window"]);let s;const u=Me(()=>r&&"ResizeObserver"in r),i=()=>{s&&(s.disconnect(),s=void 0)},l=x(()=>{const a=T(e);return Array.isArray(a)?a.map(f=>V(f)):[V(a)]}),d=C(l,a=>{if(i(),u.value&&r){s=new ResizeObserver(t);for(const f of a)f&&s.observe(f,o)}},{immediate:!0,flush:"post"}),p=()=>{i(),d()};return se(p),{isSupported:u,stop:p}}function Jt(e,t={width:0,height:0},n={}){const{window:r=D,box:o="content-box"}=n,s=x(()=>{var c,a;return(a=(c=V(e))==null?void 0:c.namespaceURI)==null?void 0:a.includes("svg")}),u=g(t.width),i=g(t.height),{stop:l}=Qt(e,([c])=>{const a=o==="border-box"?c.borderBoxSize:o==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(r&&s.value){const f=V(e);if(f){const v=f.getBoundingClientRect();u.value=v.width,i.value=v.height}}else if(a){const f=Array.isArray(a)?a:[a];u.value=f.reduce((v,{inlineSize:m})=>v+m,0),i.value=f.reduce((v,{blockSize:m})=>v+m,0)}else u.value=c.contentRect.width,i.value=c.contentRect.height},n);ue(()=>{const c=V(e);c&&(u.value="offsetWidth"in c?c.offsetWidth:t.width,i.value="offsetHeight"in c?c.offsetHeight:t.height)});const d=C(()=>V(e),c=>{u.value=c?t.width:0,i.value=c?t.height:0});function p(){l(),d()}return{width:u,height:i,stop:p}}const Gt={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function Ut(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:o={x:0,y:0},window:s=D,target:u=s,scroll:i=!0,eventFilter:l}=e;let d=null,p=0,c=0;const a=g(o.x),f=g(o.y),v=g(null),m=typeof t=="function"?t:Gt[t],y=b=>{const w=m(b);d=b,w&&([a.value,f.value]=w,v.value="mouse"),s&&(p=s.scrollX,c=s.scrollY)},O=b=>{if(b.touches.length>0){const w=m(b.touches[0]);w&&([a.value,f.value]=w,v.value="touch")}},_=()=>{if(!d||!s)return;const b=m(d);d instanceof MouseEvent&&b&&(a.value=b[0]+s.scrollX-p,f.value=b[1]+s.scrollY-c)},A=()=>{a.value=o.x,f.value=o.y},P=l?b=>l(()=>y(b),{}):b=>y(b),W=l?b=>l(()=>O(b),{}):b=>O(b),L=l?()=>l(()=>_(),{}):()=>_();if(u){const b={passive:!0};I(u,["mousemove","dragover"],P,b),n&&t!=="movement"&&(I(u,["touchstart","touchmove"],W,b),r&&I(u,"touchend",A,b)),i&&t==="page"&&I(s,"scroll",L,{passive:!0})}return{x:a,y:f,sourceType:v}}function yn(e,t={}){const{handleOutside:n=!0,window:r=D}=t,o=t.type||"page",{x:s,y:u,sourceType:i}=Ut(t),l=g(e!=null?e:r==null?void 0:r.document.body),d=g(0),p=g(0),c=g(0),a=g(0),f=g(0),v=g(0),m=g(!0);let y=()=>{};return r&&(y=C([l,s,u],()=>{const O=V(l);if(!O||!(O instanceof Element))return;const{left:_,top:A,width:P,height:W}=O.getBoundingClientRect();c.value=_+(o==="page"?r.pageXOffset:0),a.value=A+(o==="page"?r.pageYOffset:0),f.value=W,v.value=P;const L=s.value-c.value,b=u.value-a.value;m.value=P===0||W===0||L<0||b<0||L>P||b>W,(n||!m.value)&&(d.value=L,p.value=b)},{immediate:!0}),I(document,"mouseleave",()=>{m.value=!0})),{x:s,y:u,sourceType:i,elementX:d,elementY:p,elementPositionX:c,elementPositionY:a,elementHeight:f,elementWidth:v,isOutside:m,stop:y}}function wn(e,t){const{containerStyle:n,wrapperProps:r,scrollTo:o,calculateRange:s,currentList:u,containerRef:i}="itemHeight"in t?Zt(t,e):qt(t,e);return{list:u,scrollTo:o,containerProps:{ref:i,onScroll:()=>{s()},style:n},wrapperProps:r}}function Ie(e){const t=g(null),n=Jt(t),r=g([]),o=ee(e);return{state:g({start:0,end:10}),source:o,currentList:r,size:n,containerRef:t}}function De(e,t,n){return r=>{if(typeof n=="number")return Math.ceil(r/n);const{start:o=0}=e.value;let s=0,u=0;for(let i=o;i<t.value.length;i++){const l=n(i);if(s+=l,u=i,s>r)break}return u-o}}function Fe(e,t){return n=>{if(typeof t=="number")return Math.floor(n/t)+1;let r=0,o=0;for(let s=0;s<e.value.length;s++){const u=t(s);if(r+=u,r>=n){o=s;break}}return o+1}}function Ve(e,t,n,r,{containerRef:o,state:s,currentList:u,source:i}){return()=>{const l=o.value;if(l){const d=n(e==="vertical"?l.scrollTop:l.scrollLeft),p=r(e==="vertical"?l.clientHeight:l.clientWidth),c=d-t,a=d+p+t;s.value={start:c<0?0:c,end:a>i.value.length?i.value.length:a},u.value=i.value.slice(s.value.start,s.value.end).map((f,v)=>({data:f,index:v+s.value.start}))}}}function Ne(e,t){return n=>typeof e=="number"?n*e:t.value.slice(0,n).reduce((o,s,u)=>o+e(u),0)}function ze(e,t,n,r){C([e.width,e.height,t,n],()=>{r()})}function je(e,t){return x(()=>typeof e=="number"?t.value.length*e:t.value.reduce((n,r,o)=>n+e(o),0))}const Kt={horizontal:"scrollLeft",vertical:"scrollTop"};function He(e,t,n,r){return o=>{r.value&&(r.value[Kt[e]]=n(o),t())}}function qt(e,t){const n=Ie(t),{state:r,source:o,currentList:s,size:u,containerRef:i}=n,l={overflowX:"auto"},{itemWidth:d,overscan:p=5}=e,c=De(r,o,d),a=Fe(o,d),f=Ve("horizontal",p,a,c,n),v=Ne(d,o),m=x(()=>v(r.value.start)),y=je(d,o);ze(u,t,i,f);const O=He("horizontal",f,v,i),_=x(()=>({style:{height:"100%",width:`${y.value-m.value}px`,marginLeft:`${m.value}px`,display:"flex"}}));return{scrollTo:O,calculateRange:f,wrapperProps:_,containerStyle:l,currentList:s,containerRef:i}}function Zt(e,t){const n=Ie(t),{state:r,source:o,currentList:s,size:u,containerRef:i}=n,l={overflowY:"auto"},{itemHeight:d,overscan:p=5}=e,c=De(r,o,d),a=Fe(o,d),f=Ve("vertical",p,a,c,n),v=Ne(d,o),m=x(()=>v(r.value.start)),y=je(d,o);ze(u,t,i,f);const O=He("vertical",f,v,i),_=x(()=>({style:{width:"100%",height:`${y.value-m.value}px`,marginTop:`${m.value}px`}}));return{calculateRange:f,scrollTo:O,containerStyle:l,wrapperProps:_,currentList:s,containerRef:i}}export{fn as a,M as b,nn as c,ht as d,R as e,on as f,ln as g,sn as h,U as i,st as j,dn as k,cn as l,vn as m,pn as n,un as o,an as p,gn as q,rn as r,yn as s,K as t,mn as u,I as v,wn as w,Jt as x,hn as y};
@@ -1 +0,0 @@
1
- var V=Object.defineProperty;var f=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var y=(o,a,t)=>a in o?V(o,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[a]=t,g=(o,a)=>{for(var t in a||(a={}))h.call(a,t)&&y(o,t,a[t]);if(f)for(var t of f(a))E.call(a,t)&&y(o,t,a[t]);return o};var _=(o,a,t)=>new Promise((n,u)=>{var c=l=>{try{d(t.next(l))}catch(m){u(m)}},e=l=>{try{d(t.throw(l))}catch(m){u(m)}},d=l=>l.done?n(l.value):Promise.resolve(l.value).then(c,e);d((t=t.apply(o,a)).next())});import{_ as p,e as w}from"./monaco-editor-BhWNbPWS.js";import{d as v,e as T,i as k,n as D,V as b,f as B,o as P,c as A,F as L,a7 as O,X as x,G as I}from"./vue-DEqBd9tH.js";const z=v({__name:"Editor",props:{lang:{default:"typescript"},modelValue:{default:""},options:{default:()=>({})},height:{default:"300px"},readonly:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},border:{type:Boolean},minimap:{type:Boolean,default:!1}},emits:["change","blur","update:modelValue"],setup(o,{expose:a,emit:t}){const n=o;self.MonacoEnvironment={createTrustedTypesPolicy:void 0,getWorker(r,i){return _(this,null,function*(){let s;return i==="json"&&(s=yield p(()=>import("./json.worker-Cz3wPAlQ-CAknfGu-.js"),[],import.meta.url)),["css","scss","less"].includes(i)&&(s=yield p(()=>import("./css.worker-DcQjDQkA-DTHP9D1P.js"),[],import.meta.url)),["html","handlebars","razor","vue"].includes(i)&&(s=yield p(()=>import("./html.worker-B83UVBG6-DuLWH66p.js"),[],import.meta.url)),["typescript","javascript"].includes(i)&&(s=yield p(()=>import("./ts.worker-C2xNNmKz-DfuXuMr6.js"),[],import.meta.url)),s=s||(yield p(()=>import("./editor.worker-lG8NyUhA-Fj8qvYlB.js"),[],import.meta.url)),new s.default})}};const u=t,c=T();let e=null;const d=()=>_(this,null,function*(){var r;e&&(yield(r=e.getAction("editor.action.formatDocument"))==null?void 0:r.run(),e.setValue(e.getValue()))}),l=()=>_(this,null,function*(){yield d();const r=e==null?void 0:e.getValue();u("update:modelValue",r),u("blur",r)}),m=()=>{e=w.create(c.value,g({value:n.modelValue,language:n.lang,readOnly:n.readonly,theme:n.dark?"vs-dark":"vs",automaticLayout:!0,minimap:{enabled:n.minimap}},n.options)),e.onDidChangeModelContent(r=>{u("change",e==null?void 0:e.getValue(),r)}),e.onDidBlurEditorText(l)};return k(()=>{D(m)}),b(()=>{e&&e.dispose()}),B(()=>n.modelValue,r=>{e&&e.setValue(r)}),a({getEditor:()=>e}),(r,i)=>(P(),A("div",{class:L(["v-code-editor",{"is-border":n.border}]),ref_key:"container",ref:c,onKeyup:i[0]||(i[0]=O(x(()=>{},["stop"]),["enter"])),style:I({height:n.height})},null,38))}});export{z as default};
@@ -1 +0,0 @@
1
- var B=Object.defineProperty,C=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(e,t,o)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,E=(e,t)=>{for(var o in t||(t={}))v.call(t,o)&&g(e,o,t[o]);if(w)for(var o of w(t))I.call(t,o)&&g(e,o,t[o]);return e},x=(e,t)=>C(e,k(t));var u=(e,t,o)=>new Promise((i,m)=>{var p=n=>{try{r(o.next(n))}catch(a){m(a)}},s=n=>{try{r(o.throw(n))}catch(a){m(a)}},r=n=>n.done?i(n.value):Promise.resolve(n.value).then(p,s);r((o=o.apply(e,t)).next())});import{useRoute as R}from"./vue-router-CrZzyM_O.js";import{A as S,a as q,B as K,u as O}from"./index-OPg8nyHz.js";import{a as y}from"./element-plus-C1NYT3Gu.js";import"./vxe-CzgOUQRv.js";import{E as $}from"./extension-GDgUZ8am.js";import{d as b,aA as _,c as G,o as L}from"./vue-DEqBd9tH.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./mockjs-CT240U6v.js";import"./dayjs-D_Mdy0hN.js";import"./monaco-editor-BhWNbPWS.js";import"./lodash-es-Cd_vyJR8.js";import"./@vueuse-54eSL_G4.js";import"./@element-plus-icons-vue-CClttscX.js";import"./shared-CMPiinVg.js";import"./html2canvas-D2Pt4KSj.js";const T={class:"loading"},U=b({__name:"auth",setup(e){return u(this,null,function*(){let t,o;const i=R(),m=new K,p=([t,o]=_(()=>m.getExtension().catch(()=>null)),t=yield t,o(),t),{adapters:s}=p?([t,o]=_(()=>new $(p).load()),t=yield t,o(),t):{},r=s==null?void 0:s.access,n=s==null?void 0:s.remote,a=r?new S(x(E({},r),{alert:y.alert,storageKey:q})):void 0,A=c=>u(this,null,function*(){const h=`${n}/api/open/user/${c}`,l=yield O(h).catch(()=>null);return!l||!l.success?(yield y.alert("登录失败"),null):l.data}),f=i.query.token,d=f?([t,o]=_(()=>A(f)),t=yield t,o(),t):null;if(d)try{a==null||a.login(d);const c=i.query.redirect;location.href=decodeURIComponent(c||"/")}catch(c){location.reload()}return(c,h)=>(L(),G("div",T,"正在登录中..."))})}}),et=M(U,[["__scopeId","data-v-b861aa1a"]]);export{et as default};