cardbuddy 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -0
- package/dist/preview-editor/assets/index-B9MOriNv.js +80 -0
- package/dist/preview-editor/assets/index-CwD14gm3.css +1 -0
- package/dist/preview-editor/index.html +2 -2
- package/dist/server-core/index.js +19 -0
- package/dist/server-core/logStream.js +275 -0
- package/dist/standalone.js +15 -3
- package/dist/vendored/App.vue +63 -38
- package/dist/vendored/ansi.js +185 -0
- package/dist/vendored/api.js +76 -10
- package/dist/vendored/components/CardGallery.vue +2 -2
- package/dist/vendored/components/ComponentPalette.vue +1 -1
- package/dist/vendored/components/ConfirmDialog.vue +2 -2
- package/dist/vendored/components/DebugPanel.vue +276 -31
- package/dist/vendored/components/EventEditor.vue +2 -0
- package/dist/vendored/components/NodeInspector.vue +1 -1
- package/dist/vendored/components/RemotePreview.vue +3 -1
- package/dist/vendored/components/StructureTree.vue +2 -0
- package/dist/vendored/styles/app.css +245 -49
- package/dist/vendored/styles/card-gallery.css +1 -9
- package/dist/vendored/styles/card-select.css +0 -15
- package/dist/vendored/styles/dropdown.css +0 -15
- package/dist/vendored/styles/json-tree.css +1 -1
- package/dist/vendored/styles/node-inspector.css +28 -12
- package/dist/vendored/styles/structure-tree.css +2 -0
- package/package.json +1 -1
- package/dist/preview-editor/assets/index-BQKzMPBq.js +0 -79
- package/dist/preview-editor/assets/index-D3zp47Dg.css +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<!-- 编辑器原生图标(icon-*):由 preview 自身 UI 使用,统一从此 sprite 取,去重合并。 -->
|
|
3
|
+
|
|
4
|
+
<!-- ===== 24x24 Feather 风格(顶栏 / 面板 / 结构树 / 调试) ===== -->
|
|
5
|
+
<symbol id="icon-refresh" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></symbol>
|
|
6
|
+
<symbol id="icon-undo" viewBox="0 0 24 24"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></symbol>
|
|
7
|
+
<symbol id="icon-redo" viewBox="0 0 24 24"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.13-9.36L23 10"></path></symbol>
|
|
8
|
+
<symbol id="icon-save" viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline></symbol>
|
|
9
|
+
<symbol id="icon-copy" viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></symbol>
|
|
10
|
+
<symbol id="icon-loading" viewBox="0 0 24 24"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></symbol>
|
|
11
|
+
<symbol id="icon-cloud-check" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path><polyline points="9 15 11 17 14 13"></polyline></symbol>
|
|
12
|
+
<symbol id="icon-cloud-alert" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path><line x1="12" y1="13" x2="12" y2="16"></line><line x1="12" y1="18" x2="12.01" y2="18"></line></symbol>
|
|
13
|
+
<symbol id="icon-cloud" viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path></symbol>
|
|
14
|
+
<symbol id="icon-upload-cloud" viewBox="0 0 24 24"><path d="M12 13v8"></path><path d="M8 17l4-4 4 4"></path><path d="M20 16.5A4.5 4.5 0 0 0 17.5 8h-1.26A7 7 0 1 0 4 14.9"></path></symbol>
|
|
15
|
+
<!-- 切图上传(image-upload):图片框 + 框内上箭头,语义「把本地切图传到远端图床」,
|
|
16
|
+
与 icon-upload-cloud(版本推送)区分开:一个传素材,一个传卡片版本。 -->
|
|
17
|
+
<symbol id="icon-image-upload" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M12 19v-7"></path><path d="M9 15l3-3 3 3"></path></symbol>
|
|
18
|
+
<symbol id="icon-grid" viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" rx="1"></rect><rect x="14" y="3" width="7" height="7" rx="1"></rect><rect x="3" y="14" width="7" height="7" rx="1"></rect><path d="M14 14h3v3M21 14v7h-7v-3"></path></symbol>
|
|
19
|
+
<symbol id="icon-sync-box" viewBox="0 0 24 24"><rect x="3" y="5" width="14" height="14" rx="2" ry="2"></rect><path d="M21 7v10a2 2 0 0 1-2 2H7"></path></symbol>
|
|
20
|
+
<symbol id="icon-locate" viewBox="0 0 24 24"><circle cx="12" cy="12" r="7"></circle><line x1="12" y1="1" x2="12" y2="5"></line><line x1="12" y1="19" x2="12" y2="23"></line><line x1="1" y1="12" x2="5" y2="12"></line><line x1="19" y1="12" x2="23" y2="12"></line></symbol>
|
|
21
|
+
<symbol id="icon-gear" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></symbol>
|
|
22
|
+
<symbol id="icon-no-entry" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"></circle><line x1="6" y1="6" x2="18" y2="18"></line></symbol>
|
|
23
|
+
<!-- 警告三角(alert-triangle):确认框 warn 级标题图标(警告操作,橙黄档);danger 级用 icon-no-entry -->
|
|
24
|
+
<symbol id="icon-alert-triangle" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></symbol>
|
|
25
|
+
<symbol id="icon-copy-sm" viewBox="0 0 24 24"><rect x="9" y="9" width="11" height="11" rx="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></symbol>
|
|
26
|
+
<symbol id="icon-trash" viewBox="0 0 24 24"><path d="M3 6h18"></path><path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2"></path><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></symbol>
|
|
27
|
+
<!-- 连接(link):本地开发服务「连接前后端」语义图标,呼应主题【连接】 -->
|
|
28
|
+
<symbol id="icon-link" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></symbol>
|
|
29
|
+
|
|
30
|
+
<!-- ===== 16x16 小图标(下拉 / 卡片选择 / 设置器) ===== -->
|
|
31
|
+
<symbol id="icon-chevron" viewBox="0 0 16 16"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
|
|
32
|
+
<symbol id="icon-check" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-7" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
|
|
33
|
+
<symbol id="icon-search" viewBox="0 0 16 16"><circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" stroke-width="1.4"></circle><path d="M10.5 10.5L14 14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"></path></symbol>
|
|
34
|
+
<symbol id="icon-reset" viewBox="0 0 16 16"><path d="M13 8a5 5 0 1 1-1.46-3.54" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"></path><path d="M12.4 2.4v3h-3" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
|
|
35
|
+
<symbol id="icon-delete" viewBox="0 0 16 16"><path d="M3 4.5h10"></path><path d="M6 3h4"></path><path d="M4.5 4.5l.7 9a1 1 0 0 0 1 .9h3.6a1 1 0 0 0 1-.9l.7-9"></path><path d="M6.5 7v4M9.5 7v4"></path></symbol>
|
|
36
|
+
|
|
37
|
+
<!-- ===== 组件面板语义图标(Feather 同款 24x24,由 ComponentPalette.iconSvg 包裹引用) ===== -->
|
|
38
|
+
<symbol id="icon-glyph-Row" viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="12" rx="2"></rect><line x1="6.5" y1="12" x2="17.5" y2="12"></line></symbol>
|
|
39
|
+
<symbol id="icon-glyph-Column" viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="12" rx="2"></rect><line x1="12" y1="6.5" x2="12" y2="17.5"></line></symbol>
|
|
40
|
+
<symbol id="icon-glyph-MultiColumn" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"></rect><line x1="9" y1="4" x2="9" y2="20"></line><line x1="15" y1="4" x2="15" y2="20"></line></symbol>
|
|
41
|
+
<symbol id="icon-glyph-ListLayout" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"></rect><line x1="7" y1="9" x2="17" y2="9"></line><line x1="7" y1="13" x2="17" y2="13"></line><line x1="7" y1="17" x2="13" y2="17"></line></symbol>
|
|
42
|
+
<symbol id="icon-glyph-GridLayout" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2"></rect><line x1="12" y1="3" x2="12" y2="21"></line><line x1="3" y1="12" x2="21" y2="12"></line></symbol>
|
|
43
|
+
<symbol id="icon-glyph-AbsoluteLayout" viewBox="0 0 24 24"><polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line></symbol>
|
|
44
|
+
<symbol id="icon-glyph-ViewContainer" viewBox="0 0 24 24"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></symbol>
|
|
45
|
+
<symbol id="icon-glyph-Text" viewBox="0 0 24 24"><path d="M4 7V4h16v3"></path><path d="M9 20h6"></path><path d="M12 4v16"></path></symbol>
|
|
46
|
+
<symbol id="icon-glyph-Button" viewBox="0 0 24 24"><rect x="3" y="8" width="18" height="8" rx="4"></rect></symbol>
|
|
47
|
+
<symbol id="icon-glyph-Image" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></symbol>
|
|
48
|
+
<symbol id="icon-glyph-Icon" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></symbol>
|
|
49
|
+
<symbol id="icon-glyph-MultiText" viewBox="0 0 24 24"><line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line></symbol>
|
|
50
|
+
<symbol id="icon-glyph-Canvas" viewBox="0 0 24 24"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></symbol>
|
|
51
|
+
<symbol id="icon-glyph-Input" viewBox="0 0 24 24"><rect x="3" y="7" width="18" height="10" rx="2"></rect><line x1="12" y1="10" x2="12" y2="14"></line></symbol>
|
|
52
|
+
<symbol id="icon-glyph-CheckGroup" viewBox="0 0 24 24"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></symbol>
|
|
53
|
+
<symbol id="icon-glyph-RadioButton" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"></circle><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"></circle></symbol>
|
|
54
|
+
<symbol id="icon-glyph-ProgressSlider" viewBox="0 0 24 24"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></symbol>
|
|
55
|
+
<symbol id="icon-glyph-Video" viewBox="0 0 24 24"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2"></rect></symbol>
|
|
56
|
+
<symbol id="icon-glyph-Map" viewBox="0 0 24 24"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line></symbol>
|
|
57
|
+
<symbol id="icon-glyph-Divider" viewBox="0 0 24 24"><line x1="5" y1="12" x2="19" y2="12"></line></symbol>
|
|
58
|
+
<symbol id="icon-settings" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></symbol>
|
|
59
|
+
</svg>
|
|
60
|
+
`,u=()=>{let e=document.createElement(`div`);e.innerHTML=l;let t=e.getElementsByTagName(`svg`)[0];if(t){t.setAttribute(`aria-hidden`,`true`),t.style.position=`absolute`,t.style.width=`0`,t.style.height=`0`,t.style.overflow=`hidden`;let e=document.body.firstChild;e?document.body.insertBefore(t,e):document.body.appendChild(t)}};(()=>{let e=()=>{document.removeEventListener(`DOMContentLoaded`,e),u()};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e):u()})();function d(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var f={},p=[],m=()=>{},h=()=>!1,g=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),_=e=>e.startsWith(`onUpdate:`),v=Object.assign,y=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},b=Object.prototype.hasOwnProperty,x=(e,t)=>b.call(e,t),S=Array.isArray,C=e=>ae(e)===`[object Map]`,ee=e=>ae(e)===`[object Set]`,te=e=>ae(e)===`[object Date]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,ne=e=>typeof e==`symbol`,E=e=>typeof e==`object`&&!!e,re=e=>(E(e)||w(e))&&w(e.then)&&w(e.catch),ie=Object.prototype.toString,ae=e=>ie.call(e),oe=e=>ae(e).slice(8,-1),se=e=>ae(e)===`[object Object]`,D=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ce=d(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),le=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ue=/-\w/g,de=le(e=>e.replace(ue,e=>e.slice(1).toUpperCase())),fe=/\B([A-Z])/g,pe=le(e=>e.replace(fe,`-$1`).toLowerCase()),me=le(e=>e.charAt(0).toUpperCase()+e.slice(1)),he=le(e=>e?`on${me(e)}`:``),ge=(e,t)=>!Object.is(e,t),_e=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ve=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ye=e=>{let t=parseFloat(e);return isNaN(t)?e:t},be=e=>{let t=T(e)?Number(e):NaN;return isNaN(t)?e:t},xe,Se=()=>xe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function O(e){if(S(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=T(r)?Ee(r):O(r);if(i)for(let e in i)t[e]=i[e]}return t}if(T(e)||E(e))return e}var Ce=/;(?![^(]*\))/g,we=/:([^]+)/,Te=/\/\*[^]*?\*\//g;function Ee(e){let t={};return e.replace(Te,``).split(Ce).forEach(e=>{if(e){let n=e.split(we);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function k(e){let t=``;if(T(e))t=e;else if(S(e))for(let n=0;n<e.length;n++){let r=k(e[n]);r&&(t+=r+` `)}else if(E(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var De=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Oe=d(De);De+``;function ke(e){return!!e||e===``}function Ae(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=je(e[r],t[r]);return n}function je(e,t){if(e===t)return!0;let n=te(e),r=te(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=ne(e),r=ne(t),n||r)return e===t;if(n=S(e),r=S(t),n||r)return n&&r?Ae(e,t):!1;if(n=E(e),r=E(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!je(e[n],t[n]))return!1}}return String(e)===String(t)}var Me=e=>!!(e&&e.__v_isRef===!0),A=e=>T(e)?e:e==null?``:S(e)||E(e)&&(e.toString===ie||!w(e.toString))?Me(e)?A(e.value):JSON.stringify(e,Ne,2):String(e),Ne=(e,t)=>Me(t)?Ne(e,t.value):C(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Pe(t,r)+` =>`]=n,e),{})}:ee(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Pe(e))}:ne(t)?Pe(t):E(t)&&!S(t)&&!se(t)?String(t):t,Pe=(e,t=``)=>ne(e)?`Symbol(${e.description??t})`:e,Fe,Ie=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Fe&&(Fe.active?(this.parent=Fe,this.index=(Fe.scopes||(Fe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=Fe;try{return Fe=this,e()}finally{Fe=t}}}on(){++this._on===1&&(this.prevScope=Fe,Fe=this)}off(){if(this._on>0&&--this._on===0){if(Fe===this)Fe=this.prevScope;else{let e=Fe;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Le(){return Fe}var j,Re=new WeakSet,ze=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fe&&(Fe.active?Fe.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Re.has(this)&&(Re.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ue(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,nt(this),Ke(this);let e=j,t=Qe;j=this,Qe=!0;try{return this.fn()}finally{qe(this),j=e,Qe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Xe(e);this.deps=this.depsTail=void 0,nt(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Re.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Je(this)&&this.run()}get dirty(){return Je(this)}},Be=0,Ve,He;function Ue(e,t=!1){if(e.flags|=8,t){e.next=He,He=e;return}e.next=Ve,Ve=e}function We(){Be++}function Ge(){if(--Be>0)return;if(He){let e=He;for(He=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ve;){let t=Ve;for(Ve=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ke(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Xe(r),Ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Je(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ye(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ye(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rt)||(e.globalVersion=rt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Je(e))))return;e.flags|=2;let t=e.dep,n=j,r=Qe;j=e,Qe=!0;try{Ke(e);let n=e.fn(e._value);(t.version===0||ge(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{j=n,Qe=r,qe(e),e.flags&=-3}}function Xe(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Xe(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Qe=!0,$e=[];function et(){$e.push(Qe),Qe=!1}function tt(){let e=$e.pop();Qe=e===void 0||e}function nt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=j;j=void 0;try{t()}finally{j=e}}}var rt=0,it=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},at=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!j||!Qe||j===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==j)t=this.activeLink=new it(j,this),j.deps?(t.prevDep=j.depsTail,j.depsTail.nextDep=t,j.depsTail=t):j.deps=j.depsTail=t,ot(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=j.depsTail,t.nextDep=void 0,j.depsTail.nextDep=t,j.depsTail=t,j.deps===t&&(j.deps=e)}return t}trigger(e){this.version++,rt++,this.notify(e)}notify(e){We();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ge()}}};function ot(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ot(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var st=new WeakMap,ct=Symbol(``),lt=Symbol(``),ut=Symbol(``);function dt(e,t,n){if(Qe&&j){let t=st.get(e);t||st.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new at),r.map=t,r.key=n),r.track()}}function ft(e,t,n,r,i,a){let o=st.get(e);if(!o){rt++;return}let s=e=>{e&&e.trigger()};if(We(),t===`clear`)o.forEach(s);else{let i=S(e),a=i&&D(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ut||!ne(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ut)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ct)),C(e)&&s(o.get(lt)));break;case`delete`:i||(s(o.get(ct)),C(e)&&s(o.get(lt)));break;case`set`:C(e)&&s(o.get(ct))}}Ge()}function pt(e){let t=N(e);return t===e?t:(dt(t,`iterate`,ut),Zt(e)?t:t.map(en))}function mt(e){return dt(e=N(e),`iterate`,ut),e}function ht(e,t){return Xt(e)?tn(Yt(e)?en(t):t):en(t)}var gt={__proto__:null,[Symbol.iterator](){return _t(this,Symbol.iterator,e=>ht(this,e))},concat(...e){return pt(this).concat(...e.map(e=>S(e)?pt(e):e))},entries(){return _t(this,`entries`,e=>(e[1]=ht(this,e[1]),e))},every(e,t){return yt(this,`every`,e,t,void 0,arguments)},filter(e,t){return yt(this,`filter`,e,t,e=>e.map(e=>ht(this,e)),arguments)},find(e,t){return yt(this,`find`,e,t,e=>ht(this,e),arguments)},findIndex(e,t){return yt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return yt(this,`findLast`,e,t,e=>ht(this,e),arguments)},findLastIndex(e,t){return yt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return yt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return xt(this,`includes`,e)},indexOf(...e){return xt(this,`indexOf`,e)},join(e){return pt(this).join(e)},lastIndexOf(...e){return xt(this,`lastIndexOf`,e)},map(e,t){return yt(this,`map`,e,t,void 0,arguments)},pop(){return St(this,`pop`)},push(...e){return St(this,`push`,e)},reduce(e,...t){return bt(this,`reduce`,e,t)},reduceRight(e,...t){return bt(this,`reduceRight`,e,t)},shift(){return St(this,`shift`)},some(e,t){return yt(this,`some`,e,t,void 0,arguments)},splice(...e){return St(this,`splice`,e)},toReversed(){return pt(this).toReversed()},toSorted(e){return pt(this).toSorted(e)},toSpliced(...e){return pt(this).toSpliced(...e)},unshift(...e){return St(this,`unshift`,e)},values(){return _t(this,`values`,e=>ht(this,e))}};function _t(e,t,n){let r=mt(e),i=r[t]();return r!==e&&!Zt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var vt=Array.prototype;function yt(e,t,n,r,i,a){let o=mt(e),s=o!==e&&!Zt(e),c=o[t];if(c!==vt[t]){let t=c.apply(e,a);return s?en(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,ht(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function bt(e,t,n,r){let i=mt(e),a=i!==e&&!Zt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=ht(e,t)),n.call(this,t,ht(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?ht(e,c):c}function xt(e,t,n){let r=N(e);dt(r,`iterate`,ut);let i=r[t](...n);return(i===-1||i===!1)&&Qt(n[0])?(n[0]=N(n[0]),r[t](...n)):i}function St(e,t,n=[]){et(),We();let r=N(e)[t].apply(e,n);return Ge(),tt(),r}var Ct=d(`__proto__,__v_isRef,__isVue`),wt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(ne));function Tt(e){ne(e)||(e=String(e));let t=N(this);return dt(t,`has`,e),t.hasOwnProperty(e)}var Et=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Wt:Ut:i?Ht:Vt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=S(e);if(!r){let e;if(a&&(e=gt[t]))return e;if(t===`hasOwnProperty`)return Tt}let o=Reflect.get(e,t,nn(e)?e:n);if((ne(t)?wt.has(t):Ct(t))||(r||dt(e,`get`,t),i))return o;if(nn(o)){let e=a&&D(t)?o:o.value;return r&&E(e)?qt(e):e}return E(o)?r?qt(o):M(o):o}},Dt=class extends Et{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=S(e)&&D(t);if(!this._isShallow){let e=Xt(i);if(!Zt(n)&&!Xt(n)&&(i=N(i),n=N(n)),!a&&nn(i)&&!nn(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:x(e,t),s=Reflect.set(e,t,n,nn(e)?e:r);return e===N(r)&&s&&(o?ge(n,i)&&ft(e,`set`,t,n,i):ft(e,`add`,t,n)),s}deleteProperty(e,t){let n=x(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ft(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!ne(t)||!wt.has(t))&&dt(e,`has`,t),n}ownKeys(e){return dt(e,`iterate`,S(e)?`length`:ct),Reflect.ownKeys(e)}},Ot=class extends Et{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},kt=new Dt,At=new Ot,jt=new Dt(!0),Mt=e=>e,Nt=e=>Reflect.getPrototypeOf(e);function Pt(e,t,n){return function(...r){let i=this.__v_raw,a=N(i),o=C(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Mt:t?tn:en;return!t&&dt(a,`iterate`,c?lt:ct),v(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Ft(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function It(e,t){let n={get(n){let r=this.__v_raw,i=N(r),a=N(n);e||(ge(n,a)&&dt(i,`get`,n),dt(i,`get`,a));let{has:o}=Nt(i),s=t?Mt:e?tn:en;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&dt(N(t),`iterate`,ct),t.size},has(t){let n=this.__v_raw,r=N(n),i=N(t);return e||(ge(t,i)&&dt(r,`has`,t),dt(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=N(a),s=t?Mt:e?tn:en;return!e&&dt(o,`iterate`,ct),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return v(n,e?{add:Ft(`add`),set:Ft(`set`),delete:Ft(`delete`),clear:Ft(`clear`)}:{add(e){let n=N(this),r=Nt(n),i=N(e),a=!t&&!Zt(e)&&!Xt(e)?i:e;return r.has.call(n,a)||ge(e,a)&&r.has.call(n,e)||ge(i,a)&&r.has.call(n,i)||(n.add(a),ft(n,`add`,a,a)),this},set(e,n){!t&&!Zt(n)&&!Xt(n)&&(n=N(n));let r=N(this),{has:i,get:a}=Nt(r),o=i.call(r,e);o||=(e=N(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?ge(n,s)&&ft(r,`set`,e,n,s):ft(r,`add`,e,n),this},delete(e){let t=N(this),{has:n,get:r}=Nt(t),i=n.call(t,e);i||=(e=N(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ft(t,`delete`,e,void 0,a),o},clear(){let e=N(this),t=e.size!==0,n=e.clear();return t&&ft(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Pt(r,e,t)}),n}function Lt(e,t){let n=It(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(x(n,r)&&r in t?n:t,r,i)}var Rt={get:Lt(!1,!1)},zt={get:Lt(!1,!0)},Bt={get:Lt(!0,!1)},Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap;function Gt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function M(e){return Xt(e)?e:Jt(e,!1,kt,Rt,Vt)}function Kt(e){return Jt(e,!1,jt,zt,Ht)}function qt(e){return Jt(e,!0,At,Bt,Ut)}function Jt(e,t,n,r,i){if(!E(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Gt(oe(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Yt(e){return Xt(e)?Yt(e.__v_raw):!!(e&&e.__v_isReactive)}function Xt(e){return!!(e&&e.__v_isReadonly)}function Zt(e){return!!(e&&e.__v_isShallow)}function Qt(e){return e?!!e.__v_raw:!1}function N(e){let t=e&&e.__v_raw;return t?N(t):e}function $t(e){return!x(e,`__v_skip`)&&Object.isExtensible(e)&&ve(e,`__v_skip`,!0),e}var en=e=>E(e)?M(e):e,tn=e=>E(e)?qt(e):e;function nn(e){return e?e.__v_isRef===!0:!1}function rn(e){return nn(e)?e.value:e}var an={get:(e,t,n)=>t===`__v_raw`?e:rn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return nn(i)&&!nn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function on(e){return Yt(e)?e:new Proxy(e,an)}var sn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new at(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&j!==this)return Ue(this,!0),!0}get value(){let e=this.dep.track();return Ye(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function cn(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new sn(r,i,n)}var ln={},un=new WeakMap,dn=void 0;function fn(e,t=!1,n=dn){if(n){let t=un.get(n);t||un.set(n,t=[]),t.push(e)}}function pn(e,t,n=f){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:Zt(e)||i===!1||i===0?mn(e,1):mn(e),u,d,p,h,g=!1,_=!1;if(nn(e)?(d=()=>e.value,g=Zt(e)):Yt(e)?(d=()=>l(e),g=!0):S(e)?(_=!0,g=e.some(e=>Yt(e)||Zt(e)),d=()=>e.map(e=>{if(nn(e))return e.value;if(Yt(e))return l(e);if(w(e))return c?c(e,2):e()})):d=w(e)?t?c?()=>c(e,2):e:()=>{if(p){et();try{p()}finally{tt()}}let t=dn;dn=u;try{return c?c(e,3,[h]):e(h)}finally{dn=t}}:m,t&&i){let e=d,t=i===!0?1/0:i;d=()=>mn(e(),t)}let v=Le(),b=()=>{u.stop(),v&&v.active&&y(v.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return b(),n}}let x=_?Array(e.length).fill(ln):ln,C=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let n=u.run();if(e||i||g||(_?n.some((e,t)=>ge(e,x[t])):ge(n,x))){p&&p();let e=dn;dn=u;try{let e=[n,x===ln?void 0:_&&x[0]===ln?[]:x,h];x=n,c?c(t,3,e):t(...e)}finally{dn=e}}}else u.run()};return s&&s(C),u=new ze(d),u.scheduler=o?()=>o(C,!1):C,h=e=>fn(e,!1,u),p=u.onStop=()=>{let e=un.get(u);if(e){if(c)c(e,4);else for(let t of e)t();un.delete(u)}},t?r?C(!0):x=u.run():o?o(C.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function mn(e,t=1/0,n){if(t<=0||!E(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,nn(e))mn(e.value,t,n);else if(S(e))for(let r=0;r<e.length;r++)mn(e[r],t,n);else if(ee(e)||C(e))e.forEach(e=>{mn(e,t,n)});else if(se(e)){for(let r in e)mn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&mn(e[r],t,n)}return e}function hn(e,t,n,r){try{return r?e(...r):e()}catch(e){_n(e,t,n)}}function gn(e,t,n,r){if(w(e)){let i=hn(e,t,n,r);return i&&re(i)&&i.catch(e=>{_n(e,t,n)}),i}if(S(e)){let i=[];for(let a=0;a<e.length;a++)i.push(gn(e[a],t,n,r));return i}}function _n(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||f;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){et(),hn(a,null,10,[e,i,o]),tt();return}}vn(e,n,i,r,o)}function vn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var yn=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=yn.length;for(;t<n;){let r=t+n>>>1,i=yn[r],a=Nn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Nn(e),n=yn[yn.length-1];!n||!(e.flags&2)&&t>=Nn(n)?yn.push(e):yn.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(Pn)}function An(e){S(e)?xn.push(...e):Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),kn()}function jn(e,t,n=bn+1){for(;n<yn.length;n++){let t=yn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;yn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function Mn(e){if(xn.length){let e=[...new Set(xn)].sort((e,t)=>Nn(e)-Nn(t));if(xn.length=0,Sn){Sn.push(...e);return}for(Sn=e,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pn(e){try{for(bn=0;bn<yn.length;bn++){let e=yn[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),hn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<yn.length;bn++){let e=yn[bn];e&&(e.flags&=-2)}bn=-1,yn.length=0,Mn(e),Tn=null,(yn.length||xn.length)&&Pn(e)}}var Fn=null,In=null;function Ln(e){let t=Fn;return Fn=e,In=e&&e.type.__scopeId||null,t}function P(e,t=Fn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&va(-1);let i=Ln(t),a=ma.length,o;try{o=e(...n)}finally{for(let e=ma.length;e>a;e--)ga();Ln(i),r._d&&va(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function F(e,t){if(Fn===null)return e;let n=Qa(Fn),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=f]=t[e];i&&(w(i)&&(i={mounted:i,updated:i}),i.deep&&mn(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function Rn(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(et(),gn(c,n,8,[e.el,s,e,t]),tt())}}function zn(e,t){if(Ia){let n=Ia.provides,r=Ia.parent&&Ia.parent.provides;r===n&&(n=Ia.provides=Object.create(r)),n[e]=t}}function Bn(e,t,n=!1){let r=La();if(r||xi){let i=xi?xi._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&w(t)?t.call(r&&r.proxy):t}}var Vn=Symbol.for(`v-scx`),Hn=()=>Bn(Vn);function Un(e,t,n){return Wn(e,t,n)}function Wn(e,t,n=f){let{immediate:r,deep:i,flush:a,once:o}=n,s=v({},n),c=t&&r||!t&&a!==`post`,l;if(Ua){if(a===`sync`){let e=Hn();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=m,e.resume=m,e.pause=m,e}}let u=Ia;s.call=(e,t,n)=>gn(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Qi(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():On(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let p=pn(e,t,s);return Ua&&(l?l.push(p):c&&p()),p}function Gn(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?Kn(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Ba(this),s=Wn(i,a.bind(r),n);return o(),s}function Kn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var qn=new WeakMap,Jn=Symbol(`_vte`),Yn=e=>e.__isTeleport,Xn=e=>e&&(e.disabled||e.disabled===``),Zn=e=>e&&(e.defer||e.defer===``),Qn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,$n=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,er=(e,t)=>{let n=e&&e.to;return T(n)?t?t(n):null:n},tr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Xn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Xn(e.props),r=e.target=er(e.props,m),a=or(r,e,h,p);r&&(o!==`svg`&&Qn(r)?o=`svg`:o!==`mathml`&&$n(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ar(e,!1)))},S=e=>{let t=()=>{if(qn.get(e)===t){if(qn.delete(e),Xn(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),ar(e,!0)}x(e)}};qn.set(e,t),Qi(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Zn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ar(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=qn.get(e);if(u){u.flags|=8,qn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Xn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Qn(p)?o=`svg`:(o===`mathml`||$n(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),ia(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=er(t.props,m);e&&(t.target=e,nr(t,e,null,l,0))}else g&&nr(t,p,h,l,1);ar(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=Xn(f),m=a||!p,h=qn.get(e);if(h&&(h.flags|=8,qn.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,m,!!i.dynamicChildren)}},move:nr,hydrate:rr};function nr(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!qn.has(e)&&(!d||Xn(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function rr(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=er(t.props,c),h=Xn(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||or(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||or(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),ar(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var ir=tr;function ar(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function or(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Jn]=o,e&&(r(a,e,i),r(o,e,i)),o}var sr=Symbol(`_leaveCb`),cr=Symbol(`_enterCb`);function lr(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ir(()=>{e.isMounted=!0}),zr(()=>{e.isUnmounting=!0}),e}var ur=[Function,Array],dr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ur,onEnter:ur,onAfterEnter:ur,onEnterCancelled:ur,onBeforeLeave:ur,onLeave:ur,onAfterLeave:ur,onLeaveCancelled:ur,onBeforeAppear:ur,onAppear:ur,onAfterAppear:ur,onAppearCancelled:ur},fr=e=>{let t=e.subTree;return t.component?fr(t.component):t},pr={name:`BaseTransition`,props:dr,setup(e,{slots:t}){let n=La(),r=lr();return()=>{let i=t.default&&xr(t.default(),!0),a=i&&i.length?mr(i):n.subTree?G():void 0;if(!a)return;let o=N(e),{mode:s}=o;if(r.isLeaving)return vr(a);let c=yr(a);if(!c)return vr(a);let l=_r(c,o,r,n,e=>l=e);c.type!==fa&&br(c,l);let u=n.subTree&&yr(n.subTree);if(u&&u.type!==fa&&!xa(u,c)&&fr(n).type!==fa){let e=_r(u,o,r,n);if(br(u,e),s===`out-in`&&c.type!==fa)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},vr(a);s===`in-out`&&c.type!==fa?e.delayLeave=(e,t,n)=>{let i=gr(r,u);i[String(u.key)]=u,e[sr]=()=>{t(),e[sr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function mr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==fa){t=n;break}}return t}var hr=pr;function gr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function _r(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),x=gr(n,e),C=(e,t)=>{e&&gn(e,r,9,t)},ee=(e,t)=>{let n=t[1];C(e,t),S(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},te={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=g||c;else return;t[sr]&&t[sr](!0);let i=x[b];i&&xa(e,i)&&i.el[sr]&&i.el[sr](),C(r,[t])},enter(t){if(x[b]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=_||l,i=v||u,o=y||d;else return;let s=!1;t[cr]=e=>{s||(s=!0,C(e?o:i,[t]),te.delayedLeave&&te.delayedLeave(),t[cr]=void 0)};let c=t[cr].bind(null,!1);r?ee(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[cr]&&t[cr](!0),n.isUnmounting)return r();C(f,[t]);let a=!1;t[sr]=n=>{a||(a=!0,r(),C(n?h:m,[t]),t[sr]=void 0,x[i]===e&&delete x[i])};let o=t[sr].bind(null,!1);x[i]=e,p?ee(p,[t,o]):o()},clone(e){let a=_r(e,t,n,r,i);return i&&i(a),a}};return te}function vr(e){if(Or(e))return e=Ea(e),e.children=null,e}function yr(e){if(!Or(e))return Yn(e.type)&&e.children?mr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&w(n.default))return n.default()}}function br(e,t){e.shapeFlag&6&&e.component?(e.transition=t,br(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xr(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===R?(o.patchFlag&128&&i++,r=r.concat(xr(o.children,t,s))):(t||o.type!==fa)&&r.push(s==null?o:Ea(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function Sr(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Cr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var wr=new WeakMap;function Tr(e,t,n,r,i=!1){if(S(e)){e.forEach((e,a)=>Tr(e,t&&(S(t)?t[a]:t),n,r,i));return}if(Dr(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Tr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?Qa(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===f?s.refs={}:s.refs,d=s.setupState,p=N(d),m=d===f?h:e=>!Cr(u,e)&&x(p,e),g=(e,t)=>!(t&&Cr(u,t));if(l!=null&&l!==c){if(Er(t),T(l))u[l]=null,m(l)&&(d[l]=null);else if(nn(l)){let e=t;g(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(w(c))hn(c,s,12,[o,u]);else{let t=T(c),r=nn(c);if(t||r){let s=()=>{if(e.f){let n=t?m(c)?d[c]:u[c]:g(c)||!e.k?c.value:u[e.k];if(i)S(n)&&y(n,a);else if(S(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],m(c)&&(d[c]=u[c]);else{let t=[a];g(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,m(c)&&(d[c]=o)):r&&(g(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),wr.delete(e)};t.id=-1,wr.set(e,t),Qi(t,n)}else Er(e),s()}}}function Er(e){let t=wr.get(e);t&&(t.flags|=8,wr.delete(e))}Se().requestIdleCallback,Se().cancelIdleCallback;var Dr=e=>!!e.type.__asyncLoader,Or=e=>e.type.__isKeepAlive;function kr(e,t){jr(e,`a`,t)}function Ar(e,t){jr(e,`da`,t)}function jr(e,t,n=Ia){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Nr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Or(e.parent.vnode)&&Mr(r,t,n,e),e=e.parent}}function Mr(e,t,n,r){let i=Nr(t,e,r,!0);Br(()=>{y(r[t],i)},n)}function Nr(e,t,n=Ia,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{et();let i=Ba(n),a=gn(t,n,e,r);return i(),tt(),a};return r?i.unshift(a):i.push(a),a}}var Pr=e=>(t,n=Ia)=>{(!Ua||e===`sp`)&&Nr(e,(...e)=>t(...e),n)},Fr=Pr(`bm`),Ir=Pr(`m`),Lr=Pr(`bu`),Rr=Pr(`u`),zr=Pr(`bum`),Br=Pr(`um`),Vr=Pr(`sp`),Hr=Pr(`rtg`),Ur=Pr(`rtc`);function Wr(e,t=Ia){Nr(`ec`,e,t)}var Gr=`components`;function I(e,t){return Jr(Gr,e,!0,t)||e}var Kr=Symbol.for(`v-ndc`);function qr(e){return T(e)?Jr(Gr,e,!1)||e:e||Kr}function Jr(e,t,n=!0,r=!1){let i=Fn||Ia;if(i){let n=i.type;if(e===Gr){let e=$a(n,!1);if(e&&(e===t||e===de(t)||e===me(de(t))))return n}let a=Yr(i[e]||n[e],t)||Yr(i.appContext[e],t);return!a&&r?n:a}}function Yr(e,t){return e&&(e[t]||e[de(t)]||e[me(de(t))])}function L(e,t,n,r){let i,a=n&&n[r],o=S(e);if(o||T(e)){let n=o&&Yt(e),r=!1,s=!1;n&&(r=!Zt(e),s=Xt(e),e=mt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?tn(en(e[n])):en(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(E(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function Xr(e,t,n={},r,i,a){if(Fn.ce||Fn.parent&&Dr(Fn.parent)&&Fn.parent.ce){let e=a!=null&&n.key==null?v({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),z(),V(R,null,[U(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=ma.length;z();let c;try{let i=o&&Zr(o(n)),s=n.key||a||i&&i.key;c=V(R,{key:(s&&!ne(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=ma.length;e>s;e--)ga();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function Zr(e){return e.some(e=>!ba(e)||!(e.type===fa||e.type===R&&!Zr(e.children)))?e:null}var Qr=e=>e?Ha(e)?Qa(e):Qr(e.parent):null,$r=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qr(e.parent),$root:e=>Qr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ci(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>Gn.bind(e)}),ei=(e,t)=>e!==f&&!e.__isScriptSetup&&x(e,t),ti={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(ei(r,t))return o[t]=1,r[t];else if(i!==f&&x(i,t))return o[t]=2,i[t];else if(x(a,t))return o[t]=3,a[t];else if(n!==f&&x(n,t))return o[t]=4,n[t];else ri&&(o[t]=0)}let l=$r[t],u,d;if(l)return t===`$attrs`&&dt(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==f&&x(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,x(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return ei(i,t)?(i[t]=n,!0):r!==f&&x(r,t)?(r[t]=n,!0):x(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==f&&s[0]!==`$`&&x(e,s)||ei(t,s)||x(a,s)||x(r,s)||x($r,s)||x(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?x(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ni(e){return S(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ri=!0;function ii(e){let t=ci(e),n=e.proxy,r=e.ctx;ri=!1,t.beforeCreate&&oi(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:x,render:C,renderTracked:ee,renderTriggered:te,errorCaptured:T,serverPrefetch:ne,expose:re,inheritAttrs:ie,components:ae,directives:oe,filters:se}=t;if(l&&ai(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);E(t)&&(e.data=M(t))}if(ri=!0,a)for(let e in a){let t=a[e],i=to({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):m,set:!w(t)&&w(t.set)?t.set.bind(n):m});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)si(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{zn(t,e[t])})}u&&oi(u,e,`c`);function D(e,t){S(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(D(Fr,d),D(Ir,f),D(Lr,p),D(Rr,h),D(kr,g),D(Ar,_),D(Wr,T),D(Ur,ee),D(Hr,te),D(zr,y),D(Br,x),D(Vr,ne),S(re))if(re.length){let t=e.exposed||={};re.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};C&&e.render===m&&(e.render=C),ie!=null&&(e.inheritAttrs=ie),ae&&(e.components=ae),oe&&(e.directives=oe),ne&&Sr(e)}function ai(e,t,n=m){S(e)&&(e=pi(e));for(let n in e){let r=e[n],i;i=E(r)?`default`in r?Bn(r.from||n,r.default,!0):Bn(r.from||n):Bn(r),nn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function oi(e,t,n){gn(S(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function si(e,t,n,r){let i=r.includes(`.`)?Kn(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&Un(i,n)}else if(w(e))Un(i,e.bind(n));else if(E(e))if(S(e))e.forEach(e=>si(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&Un(i,r,e)}}function ci(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>li(c,e,o,!0)),li(c,t,o)),E(t)&&a.set(t,c),c}function li(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&li(e,a,n,!0),i&&i.forEach(t=>li(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=ui[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var ui={data:di,props:gi,emits:gi,methods:hi,computed:hi,beforeCreate:mi,created:mi,beforeMount:mi,mounted:mi,beforeUpdate:mi,updated:mi,beforeDestroy:mi,beforeUnmount:mi,destroyed:mi,unmounted:mi,activated:mi,deactivated:mi,errorCaptured:mi,serverPrefetch:mi,components:hi,directives:hi,watch:_i,provide:di,inject:fi};function di(e,t){return t?e?function(){return v(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function fi(e,t){return hi(pi(e),pi(t))}function pi(e){if(S(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mi(e,t){return e?[...new Set([].concat(e,t))]:t}function hi(e,t){return e?v(Object.create(null),e,t):t}function gi(e,t){return e?S(e)&&S(t)?[...new Set([...e,...t])]:v(Object.create(null),ni(e),ni(t??{})):t}function _i(e,t){if(!e)return t;if(!t)return e;let n=v(Object.create(null),e);for(let r in t)n[r]=mi(e[r],t[r]);return n}function vi(){return{app:null,config:{isNativeTag:h,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var yi=0;function bi(e,t){return function(n,r=null){w(n)||(n=v({},n)),r!=null&&!E(r)&&(r=null);let i=vi(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:yi++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:no,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&w(e.install)?(a.add(e),e.install(c,...t)):w(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||U(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Qa(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(gn(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=xi;xi=c;try{return e()}finally{xi=t}}};return c}}var xi=null,Si=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${de(t)}Modifiers`]||e[`${pe(t)}Modifiers`];function Ci(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||f,i=n,a=t.startsWith(`update:`),o=a&&Si(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(ye)));let s,c=r[s=he(t)]||r[s=he(de(t))];!c&&a&&(c=r[s=he(pe(t))]),c&&gn(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,gn(l,e,6,i)}}var wi=new WeakMap;function Ti(e,t,n=!1){let r=n?wi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=Ti(e,t,!0);n&&(s=!0,v(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(E(e)&&r.set(e,null),null):(S(a)?a.forEach(e=>o[e]=null):v(o,a),E(e)&&r.set(e,o),o)}function Ei(e,t){return!e||!g(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),x(e,t[0].toLowerCase()+t.slice(1))||x(e,pe(t))||x(e,t))}function Di(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Ln(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Oa(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=Oa(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:Oi(s)}}catch(t){ma.length=0,_n(t,e,1),v=U(fa)}let b=v;if(y&&h!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(_)&&(y=ki(y,a)),b=Ea(b,y,!1,!0))}return n.dirs&&(b=Ea(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&br(b,n.transition),v=b,Ln(g),v}var Oi=e=>{let t;for(let n in e)(n===`class`||n===`style`||g(n))&&((t||={})[n]=e[n]);return t},ki=(e,t)=>{let n={};for(let r in e)(!_(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Ai(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?ji(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Mi(o,r,n)&&!Ei(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||ji(r,o,l):!!o;return!1}function ji(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(Mi(t,e,a)&&!Ei(n,a))return!0}return!1}function Mi(e,t,n){let r=e[n],i=t[n];return n===`style`&&E(r)&&E(i)?!je(r,i):r!==i}function Ni({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Pi={},Fi=()=>Object.create(Pi),Ii=e=>Object.getPrototypeOf(e)===Pi;function Li(e,t,n,r=!1){let i={},a=Fi();e.propsDefaults=Object.create(null),zi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Kt(i):e.type.props?i:a,e.attrs=a}function Ri(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=N(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Ei(e.emitsOptions,o))continue;let u=t[o];if(c)if(x(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=de(o);i[t]=Bi(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{zi(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!x(t,a)&&((r=pe(a))===a||!x(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Bi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!x(t,e))&&(delete a[e],l=!0)}l&&ft(e.attrs,`set`,``)}function zi(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(ce(c))continue;let l=t[c],u;i&&x(i,u=de(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:Ei(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=N(n),r=s||f;for(let o=0;o<a.length;o++){let s=a[o];n[s]=Bi(i,t,s,r[s],e,!x(r,s))}}return o}function Bi(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=x(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&w(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Ba(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===pe(n))&&(r=!0))}return r}var Vi=new WeakMap;function Hi(e,t,n=!1){let r=n?Vi:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!w(e)){let r=e=>{c=!0;let[n,r]=Hi(e,t,!0);v(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return E(e)&&r.set(e,p),p;if(S(a))for(let e=0;e<a.length;e++){let t=de(a[e]);Ui(t)&&(o[t]=f)}else if(a)for(let e in a){let t=de(e);if(Ui(t)){let n=a[e],r=o[t]=S(n)||w(n)?{type:n}:v({},n),i=r.type,c=!1,l=!0;if(S(i))for(let e=0;e<i.length;++e){let t=i[e],n=w(t)&&t.name;if(n===`Boolean`){c=!0;break}n===`String`&&(l=!1)}else c=w(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||x(r,`default`))&&s.push(t)}}let l=[o,s];return E(e)&&r.set(e,l),l}function Ui(e){return e[0]!==`$`&&!ce(e)}var Wi=e=>e===`_`||e===`_ctx`||e===`$stable`,Gi=e=>S(e)?e.map(Oa):[Oa(e)],Ki=(e,t,n)=>{if(t._n)return t;let r=P((...e)=>Gi(t(...e)),n);return r._c=!1,r},qi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Wi(n))continue;let i=e[n];if(w(i))t[n]=Ki(n,i,r);else if(i!=null){let e=Gi(i);t[n]=()=>e}}},Ji=(e,t)=>{let n=Gi(t);e.slots.default=()=>n},Yi=(e,t,n)=>{for(let r in t)(n||!Wi(r))&&(e[r]=t[r])},Xi=(e,t,n)=>{let r=e.slots=Fi();if(e.vnode.shapeFlag&32){let e=t._;e?(Yi(r,t,n),n&&ve(r,`_`,e,!0)):qi(t,r)}else t&&Ji(e,t)},Zi=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=f;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Yi(i,t,n):(a=!t.$stable,qi(t,i)),o=t}else t&&(Ji(e,t),o={default:1});if(a)for(let e in i)!Wi(e)&&o[e]==null&&delete i[e]},Qi=ua;function $i(e){return ea(e)}function ea(e,t){let n=Se();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:h,setScopeId:g=m,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!xa(e,t)&&(r=be(e),me(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case da:y(e,t,n,r);break;case fa:b(e,t,n,r);break;case pa:e??x(t,n,r,o);break;case R:ie(e,t,n,r,i,a,o,s,c);break;default:d&1?ee(e,t,n,r,i,a,o,s,c):d&6?ae(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,Ce)}u!=null&&i?Tr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Tr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},ee=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ne(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&T(e.children,f,null,i,s,ta(e,c),l,d),_&&Rn(e,null,i,`created`),w(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ce(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Ma(p,i,e)}_&&Rn(e,null,i,`beforeMount`);let v=ra(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Qi(()=>{try{p&&Ma(p,i,e),v&&g.enter(f),_&&Rn(e,null,i,`mounted`)}finally{}},s)},w=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||la(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;w(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},T=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?ka(e[l]):Oa(e[l]);v(null,c,t,n,r,i,a,o,s)}},ne=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:p}=t;l|=e.patchFlag&16;let m=e.props||f,h=t.props||f,g;if(n&&na(n,!1),(g=h.onVnodeBeforeUpdate)&&Ma(g,n,t,e),p&&Rn(t,e,n,`beforeUpdate`),n&&na(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,ta(t,i),o):s||ue(e,t,c,null,n,r,ta(t,i),o,!1),l>0){if(l&16)re(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=m[r],s=h[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else!s&&d==null&&re(c,m,h,n,i);((g=h.onVnodeUpdated)||p)&&Qi(()=>{g&&Ma(g,n,t,e),p&&Rn(t,e,n,`updated`)},r)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el&&(c.type===R||!xa(c,l)||c.shapeFlag&198)?d(c.el):n;v(c,l,u,null,r,i,a,o,!0)}},re=(e,t,n,r,i)=>{if(t!==n){if(t!==f)for(let o in t)!ce(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ce(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ie=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),T(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&ia(e,t,!0)):ue(e,t,n,f,a,o,c,l,u)},ae=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):oe(t,n,r,i,a,o,c):se(e,t,c)},oe=(e,t,n,r,i,a,o)=>{let s=e.component=Fa(e,r,i);if(Or(e)&&(s.ctx.renderer=Ce),Wa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,D,o),!e.el){let r=s.subTree=U(fa);b(null,r,t,n),e.placeholder=r.el}}else D(s,e,t,n,i,a,o)},se=(e,t,n)=>{let r=t.component=e.component;if(Ai(e,t,n))if(r.asyncDep&&!r.asyncResolved){le(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},D=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=oa(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{Qi(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;na(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&_e(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&Ma(f,s,t,c),na(e,!0);let p=Di(e),m=e.subTree;e.subTree=p,v(m,p,d(m.el),be(m),e,i,a),t.el=p.el,u===null&&Ni(e,p.el),r&&Qi(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Qi(()=>Ma(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Dr(t);if(na(e,!1),l&&_e(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Ma(o,d,t),na(e,!0),s&&Te){let t=()=>{e.subTree=Di(e),Te(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Di(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Qi(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Qi(()=>Ma(o,d,e),i)}(t.shapeFlag&256||d&&Dr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Qi(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ze(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),na(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ri(e,t.props,r,n),Zi(e,t.children,n),et(),jn(e),tt()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){fe(l,f,n,r,i,a,o,s,c);return}if(p&256){de(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&ye(l,i,a),f!==l&&u(n,f)):d&16?m&16?fe(l,f,n,r,i,a,o,s,c):ye(l,i,a,!0):(d&8&&u(n,``),m&16&&T(f,n,r,i,a,o,s,c))},de=(e,t,n,r,i,a,o,s,c)=>{e||=p,t||=p;let l=e.length,u=t.length,d=Math.min(l,u),f;for(f=0;f<d;f++){let r=t[f]=c?ka(t[f]):Oa(t[f]);v(e[f],r,n,null,i,a,o,s,c)}l>u?ye(e,i,a,!0,!1,d):T(t,n,r,i,a,o,s,c,d)},fe=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?ka(t[l]):Oa(t[l]);if(xa(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?ka(t[f]):Oa(t[f]);if(xa(r,l))v(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)v(null,t[l]=c?ka(t[l]):Oa(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)me(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=f;l++){let e=t[l]=c?ka(t[l]):Oa(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=f-h+1,x=!1,S=0,C=Array(b);for(l=0;l<b;l++)C[l]=0;for(l=m;l<=d;l++){let r=e[l];if(y>=b){me(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=f;_++)if(C[_-h]===0&&xa(r,t[_])){u=_;break}u===void 0?me(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let ee=x?aa(C):p;for(_=ee.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1<u?f.el||ca(f):r;C[l]===0?v(null,d,n,p,i,a,o,s,c):x&&(_<0||l!==ee[_]?pe(d,n,p,2):_--)}}},pe=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){pe(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,Ce);return}if(c===R){r(s,t,n);for(let e=0;e<u.length;e++)pe(u[e],t,n,a);r(e.anchor,t,n);return}if(c===pa){S(e,t,n);return}if(a!==2&&d&1&&l)if(a===0)l.persisted&&!s[sr]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),Qi(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[sr];s._isLeaving&&s[sr](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},me=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(et(),Tr(s,null,n,e,!0),tt()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Dr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Ma(_,t,e),u&6)ve(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Rn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Ce,r):l&&!l.hasOnce&&(a!==R||d>0&&d&64)?ye(l,t,n,!1,!0):(a===R&&d&384||!i&&u&16)&&ye(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Qi(()=>{_&&Ma(_,t,e),h&&Rn(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===R){ge(n,r);return}if(t===pa){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},ge=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},ve=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;sa(c),sa(l),r&&_e(r),i.stop(),a&&(a.flags|=8,me(o,e,t,n)),s&&Qi(s,t),Qi(()=>{e.isUnmounted=!0},t)},ye=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)me(e[o],t,n,r,i)},be=e=>{if(e.shapeFlag&6)return be(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Jn];return n?h(n):t},xe=!1,O=(e,t,n)=>{let r;e==null?t._vnode&&(me(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,xe||=(xe=!0,jn(r),Mn(),!1)},Ce={p:v,um:me,m:pe,r:he,mt:oe,mc:T,pc:ue,pbc:E,n:be,o:e},we,Te;return t&&([we,Te]=t(Ce)),{render:O,hydrate:we,createApp:bi(O,we)}}function ta({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function na({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ra(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ia(e,t,n=!1){let r=e.children,i=t.children;if(S(r)&&S(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=ka(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ia(t,a)),a.type===da&&(a.patchFlag===-1&&(a=i[e]=ka(a)),a.el=t.el),a.type===fa&&!a.el&&(a.el=t.el)}}function aa(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function oa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:oa(t)}function sa(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ca(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?ca(t.subTree):null}var la=e=>e.__isSuspense;function ua(e,t){t&&t.pendingBranch?S(e)?t.effects.push(...e):t.effects.push(e):An(e)}var R=Symbol.for(`v-fgt`),da=Symbol.for(`v-txt`),fa=Symbol.for(`v-cmt`),pa=Symbol.for(`v-stc`),ma=[],ha=null;function z(e=!1){ma.push(ha=e?null:[])}function ga(){ma.pop(),ha=ma[ma.length-1]||null}var _a=1;function va(e,t=!1){_a+=e,e<0&&ha&&t&&(ha.hasOnce=!0)}function ya(e){return e.dynamicChildren=_a>0?ha||p:null,ga(),_a>0&&ha&&ha.push(e),e}function B(e,t,n,r,i,a){return ya(H(e,t,n,r,i,a,!0))}function V(e,t,n,r,i){return ya(U(e,t,n,r,i,!0))}function ba(e){return e?e.__v_isVNode===!0:!1}function xa(e,t){return e.type===t.type&&e.key===t.key}var Sa=({key:e})=>e??null,Ca=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||nn(e)||w(e)?{i:Fn,r:e,k:t,f:!!n}:e);function H(e,t=null,n=null,r=0,i=null,a=e===R?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Sa(t),ref:t&&Ca(t),scopeId:In,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Fn};return s?(Aa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),_a>0&&!o&&ha&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&ha.push(c),c}var U=wa;function wa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Kr)&&(e=fa),ba(e)){let r=Ea(e,t,!0);return n&&Aa(r,n),_a>0&&!a&&ha&&(r.shapeFlag&6?ha[ha.indexOf(e)]=r:ha.push(r)),r.patchFlag=-2,r}if(eo(e)&&(e=e.__vccOpts),t){t=Ta(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=k(e)),E(n)&&(Qt(n)&&!S(n)&&(n=v({},n)),t.style=O(n))}let o=T(e)?1:la(e)?128:Yn(e)?64:E(e)?4:w(e)?2:0;return H(e,t,n,r,i,o,a,!0)}function Ta(e){return e?Qt(e)||Ii(e)?v({},e):e:null}function Ea(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ja(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Sa(l),ref:t&&t.ref?n&&a?S(a)?a.concat(Ca(t)):[a,Ca(t)]:Ca(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==R?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ea(e.ssContent),ssFallback:e.ssFallback&&Ea(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&br(u,c.clone(u)),u}function W(e=` `,t=0){return U(da,null,e,t)}function Da(e,t){let n=U(pa,null,e);return n.staticCount=t,n}function G(e=``,t=!1){return t?(z(),V(fa,null,e)):U(fa,null,e)}function Oa(e){return e==null||typeof e==`boolean`?U(fa):S(e)?U(R,null,e.slice()):ba(e)?ka(e):U(da,null,String(e))}function ka(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ea(e)}function Aa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(S(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Aa(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Ii(t)?t._ctx=Fn:r===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(w(t)){if(r&65){Aa(e,{default:t});return}t={default:t,_ctx:Fn},n=32}else t=String(t),r&64?(n=16,t=[W(t)]):n=8;e.children=t,e.shapeFlag|=n}function ja(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=k([t.class,r.class]));else if(e===`style`)t.style=O([t.style,r.style]);else if(g(e)){let n=t[e],i=r[e];i&&n!==i&&!(S(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!_(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Ma(e,t,n,r=null){gn(e,t,7,[n,r])}var Na=vi(),Pa=0;function Fa(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||Na,a={uid:Pa++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ie(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Hi(r,i),emitsOptions:Ti(r,i),emit:null,emitted:null,propsDefaults:f,inheritAttrs:r.inheritAttrs,ctx:f,data:f,props:f,attrs:f,slots:f,refs:f,setupState:f,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Ci.bind(null,a),e.ce&&e.ce(a),a}var Ia=null,La=()=>Ia||Fn,Ra,za;{let e=Se(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ra=t(`__VUE_INSTANCE_SETTERS__`,e=>Ia=e),za=t(`__VUE_SSR_SETTERS__`,e=>Ua=e)}var Ba=e=>{let t=Ia;return Ra(e),e.scope.on(),()=>{e.scope.off(),Ra(t)}},Va=()=>{Ia&&Ia.scope.off(),Ra(null)};function Ha(e){return e.vnode.shapeFlag&4}var Ua=!1;function Wa(e,t=!1,n=!1){t&&za(t);let{props:r,children:i}=e.vnode,a=Ha(e);Li(e,r,a,t),Xi(e,i,n||t);let o=a?Ga(e,t):void 0;return t&&za(!1),o}function Ga(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ti);let{setup:r}=n;if(r){et();let n=e.setupContext=r.length>1?Za(e):null,i=Ba(e),a=hn(r,e,0,[e.props,n]),o=re(a);if(tt(),i(),(o||e.sp)&&!Dr(e)&&Sr(e),o){if(a.then(Va,Va),t)return a.then(n=>{Ka(e,n,t)}).catch(t=>{_n(t,e,0)});e.asyncDep=a}else Ka(e,a,t)}else Ya(e,t)}function Ka(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:E(t)&&(e.setupState=on(t)),Ya(e,n)}var qa,Ja;function Ya(e,t,n){let r=e.type;if(!e.render){if(!t&&qa&&!r.render){let t=r.template||ci(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=qa(t,v(v({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||m,Ja&&Ja(e)}{let t=Ba(e);et();try{ii(e)}finally{tt(),t()}}}var Xa={get(e,t){return dt(e,`get`,``),e[t]}};function Za(e){return{attrs:new Proxy(e.attrs,Xa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Qa(e){return e.exposed?e.exposeProxy||=new Proxy(on($t(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $r)return $r[n](e)},has(e,t){return t in e||t in $r}}):e.proxy}function $a(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function eo(e){return w(e)&&`__vccOpts`in e}var to=(e,t)=>cn(e,t,Ua);function K(e,t,n){try{va(-1);let r=arguments.length;return r===2?E(t)&&!S(t)?ba(t)?U(e,null,[t]):U(e,t):U(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ba(n)&&(n=[n]),U(e,t,n))}finally{va(1)}}var no=`3.5.40`,ro=void 0,io=typeof window<`u`&&window.trustedTypes;if(io)try{ro=io.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ao=ro?e=>ro.createHTML(e):e=>e,oo=`http://www.w3.org/2000/svg`,so=`http://www.w3.org/1998/Math/MathML`,co=typeof document<`u`?document:null,lo=co&&co.createElement(`template`),uo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?co.createElementNS(oo,e):t===`mathml`?co.createElementNS(so,e):n?co.createElement(e,{is:n}):co.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>co.createTextNode(e),createComment:e=>co.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>co.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{lo.innerHTML=ao(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=lo.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},fo=`transition`,po=`animation`,mo=Symbol(`_vtc`),ho={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},go=v({},dr,ho),_o=(e=>(e.displayName=`Transition`,e.props=go,e))((e,{slots:t})=>K(hr,bo(e),t)),vo=(e,t=[])=>{S(e)?e.forEach(e=>e(...t)):e&&e(...t)},yo=e=>e?S(e)?e.some(e=>e.length>1):e.length>1:!1;function bo(e){let t={};for(let n in e)n in ho||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=xo(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=_,onAppear:ee=y,onAppearCancelled:te=b}=t,w=(e,t,n,r)=>{e._enterCancelled=r,wo(e,t?u:s),wo(e,t?l:o),n&&n()},T=(e,t)=>{e._isLeaving=!1,wo(e,d),wo(e,p),wo(e,f),t&&t()},ne=e=>(t,n)=>{let i=e?ee:y,o=()=>w(t,e,n);vo(i,[t,o]),To(()=>{wo(t,e?c:a),Co(t,e?u:s),yo(i)||Do(t,r,h,o)})};return v(t,{onBeforeEnter(e){vo(_,[e]),Co(e,a),Co(e,o)},onBeforeAppear(e){vo(C,[e]),Co(e,c),Co(e,l)},onEnter:ne(!1),onAppear:ne(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>T(e,t);Co(e,d),e._enterCancelled?(Co(e,f),jo(e)):(jo(e),Co(e,f)),To(()=>{e._isLeaving&&(wo(e,d),Co(e,p),yo(x)||Do(e,r,g,n))}),vo(x,[e,n])},onEnterCancelled(e){w(e,!1,void 0,!0),vo(b,[e])},onAppearCancelled(e){w(e,!0,void 0,!0),vo(te,[e])},onLeaveCancelled(e){T(e),vo(S,[e])}})}function xo(e){if(e==null)return null;if(E(e))return[So(e.enter),So(e.leave)];{let t=So(e);return[t,t]}}function So(e){return be(e)}function Co(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[mo]||(e[mo]=new Set)).add(t)}function wo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[mo];n&&(n.delete(t),n.size||(e[mo]=void 0))}function To(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Eo=0;function Do(e,t,n,r){let i=e._endId=++Eo,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Oo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function Oo(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${fo}Delay`),a=r(`${fo}Duration`),o=ko(i,a),s=r(`${po}Delay`),c=r(`${po}Duration`),l=ko(s,c),u=null,d=0,f=0;t===fo?o>0&&(u=fo,d=o,f=a.length):t===po?l>0&&(u=po,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?fo:po:null,f=u?u===fo?a.length:c.length:0);let p=u===fo&&/\b(?:transform|all)(?:,|$)/.test(r(`${fo}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function ko(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Ao(t)+Ao(e[n])))}function Ao(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function jo(e){return(e?e.ownerDocument:document).body.offsetHeight}function Mo(e,t,n){let r=e[mo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var No=Symbol(`_vod`),Po=Symbol(`_vsh`),Fo={name:`show`,beforeMount(e,{value:t},{transition:n}){e[No]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Io(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Io(e,!0),r.enter(e)):r.leave(e,()=>{Io(e,!1)}):Io(e,t))},beforeUnmount(e,{value:t}){Io(e,t)}};function Io(e,t){e.style.display=t?e[No]:`none`,e[Po]=!t}var Lo=Symbol(``),Ro=/(?:^|;)\s*display\s*:/;function zo(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Vo(r,t,``)}else for(let e in t)n[e]??Vo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Vo(r,i,``):Go(e,i,!T(t)&&t?t[i]:void 0,o)||Vo(r,i,o)}}else if(i){if(t!==n){let e=r[Lo];e&&(n+=`;`+e),r.cssText=n,a=Ro.test(n)}}else t&&e.removeAttribute(`style`);No in e&&(e[No]=a?r.display:``,e[Po]&&(r.display=`none`))}var Bo=/\s*!important$/;function Vo(e,t,n){if(S(n))n.forEach(n=>Vo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Wo(e,t);Bo.test(n)?e.setProperty(pe(r),n.replace(Bo,``),`important`):e[r]=n}}var Ho=[`Webkit`,`Moz`,`ms`],Uo={};function Wo(e,t){let n=Uo[t];if(n)return n;let r=de(t);if(r!==`filter`&&r in e)return Uo[t]=r;r=me(r);for(let n=0;n<Ho.length;n++){let i=Ho[n]+r;if(i in e)return Uo[t]=i}return t}function Go(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&T(r)&&n===r}var Ko=`http://www.w3.org/1999/xlink`;function qo(e,t,n,r,i,a=Oe(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ko,t.slice(6,t.length)):e.setAttributeNS(Ko,t,n):n==null||a&&!ke(n)?e.removeAttribute(t):e.setAttribute(t,a?``:ne(n)?String(n):n)}function Jo(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ao(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ke(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Yo(e,t,n,r){e.addEventListener(t,n,r)}function Xo(e,t,n,r){e.removeEventListener(t,n,r)}var Zo=Symbol(`_vei`);function Qo(e,t,n,r,i=null){let a=e[Zo]||(e[Zo]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=ts(t);r?Yo(e,n,a[t]=as(r,i),s):o&&(Xo(e,n,o,s),a[t]=void 0)}}var $o=/(Once|Passive|Capture)$/,es=/^on:?(?:Once|Passive|Capture)$/;function ts(e){let t,n;for(;(n=e.match($o))&&!es.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):pe(e.slice(2)),t]}var ns=0,rs=Promise.resolve(),is=()=>ns||=(rs.then(()=>ns=0),Date.now());function as(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(S(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&gn(e,t,5,a)}}else gn(r,t,5,[e])};return n.value=e,n.attached=is(),n}var os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ss=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Mo(e,r,o):t===`style`?zo(e,n,r):g(t)?_(t)||Qo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):cs(e,t,r,o))?(Jo(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&qo(e,t,r,o,a,t!==`value`)):e._isVueCE&&(ls(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?Jo(e,de(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),qo(e,t,r,o))};function cs(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&os(t)&&w(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return os(t)&&T(n)?!1:t in e}function ls(e,t){let n=e._def.props;if(!n)return!1;let r=de(t);return Array.isArray(n)?n.some(e=>de(e)===r):Object.keys(n).some(e=>de(e)===r)}var us=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return S(t)?e=>_e(t,e):t};function ds(e){e.target.composing=!0}function fs(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var ps=Symbol(`_assign`);function ms(e,t,n){return t&&(e=e.trim()),n&&(e=ye(e)),e}var hs={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[ps]=us(i);let a=r||i.props&&i.props.type===`number`;Yo(e,t?`change`:`input`,t=>{t.target.composing||e[ps](ms(e.value,n,a))}),(n||a)&&Yo(e,`change`,()=>{e.value=ms(e.value,n,a)}),t||(Yo(e,`compositionstart`,ds),Yo(e,`compositionend`,fs),Yo(e,`change`,fs))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[ps]=us(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ye(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},gs=[`ctrl`,`shift`,`alt`,`meta`],_s={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>gs.some(n=>e[`${n}Key`]&&!t.includes(n))},q=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=_s[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},vs={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},ys=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=pe(n.key);if(t.some(e=>e===r||vs[e]===r))return e(n)}))},bs=v({patchProp:ss},uo),xs;function Ss(){return xs||=$i(bs)}var Cs=((...e)=>{let t=Ss().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Ts(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,ws(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function ws(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Ts(e){return T(e)?document.querySelector(e):e}var Es=`cardbuddy:dev-service`,Ds=typeof window<`u`&&(window.__CARD_DEV_PREVIEW_BASE__||window.__CARD_DEV_OFFLINE_BASE__)||``,Os={enabled:!1,baseUrl:`http://127.0.0.1:8787`,token:``};function ks(){try{let e=localStorage.getItem(Es);if(e)return{...Os,...JSON.parse(e)}}catch{}return Ds?{...Os,enabled:!0,baseUrl:Ds,token:``}:{...Os}}function As(e){try{localStorage.setItem(Es,JSON.stringify(e))}catch{}}function js(){if(Ds)return Ds.replace(/\/+$/,``);let e=ks();return e.enabled&&e.baseUrl?e.baseUrl.replace(/\/+$/,``):null}function Ms(){let e=ks();return e.enabled&&e.token||``}async function J(e,t={}){let n=(js()||``)+e,r={...t.headers||{}},i=Ms();return i&&(r[`x-dev-token`]=i),fetch(n,{...t,headers:r})}var Ns=new Map;function Ps(e){let t=Ns.get(e);if(!t){let n=Ms(),r=new EventSource(e+`/__events`+(n?`?token=`+encodeURIComponent(n):``));t={es:r,states:new Set,refs:0},Ns.set(e,t),r.onopen=()=>{for(let e of t.states)e(`open`)},r.onerror=()=>{let e=r.readyState===2?`closed`:`connecting`;for(let n of t.states)n(e)}}return t.refs++,t}function Fs(e,t){if(t.refs=Math.max(0,t.refs-1),t.refs===0&&Ns.get(e)===t){Ns.delete(e);try{t.es.close()}catch{}}}function Is(e,{hmrEvents:t=[]}={}){return function(t,n){let r=js(),i=e=>{typeof n==`function`&&n(e)};if(r!==null){let n=Ps(r),a=e=>{try{t(e.data?JSON.parse(e.data):{})}catch{t({})}};for(let t of e)n.es.addEventListener(t,a);return n.states.add(i),i(n.es.readyState===1?`open`:n.es.readyState===2?`closed`:`connecting`),()=>{for(let t of e)n.es.removeEventListener(t,a);n.states.delete(i),Fs(r,n)}}return()=>{}}}var Ls=Is([`cards-changed`],{hmrEvents:[`cards-changed`]}),Rs=Is([`code-bridge-changed`,`code-bridge-closed`]),zs=Is([`service-log`]);async function Bs({limit:e=300,since:t=0}={}){let n=new URLSearchParams({limit:String(e)});t&&n.set(`since`,String(t));let r=await J(`/__logs?`+n.toString());if(!r.ok)throw Error(`HTTP `+r.status);return r.json()}async function Vs(e,t=``){let n=await J(`/__code-bridge`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:e,label:t})});if(!n.ok)throw Error(`code-bridge open failed: ${n.status}`);return n.json()}async function Hs(e){let t=await J(`/__code-bridge/${e}`);if(!t.ok)throw Error(`code-bridge fetch failed: ${t.status}`);return t.json()}async function Us(e){return(await J(`/__code-bridge/${e}/heartbeat`,{method:`POST`})).ok}async function Ws(e){return(await J(`/__code-bridge/${e}`,{method:`DELETE`})).ok}var Gs={"@staticfile/":`/fastdfs/`,"@filestore/":`/minio/`,"@minio/":`/minio/`,"@floorstatic/":`/floorstatic/`,"@flamestore/":`/`},Ks=`https://uat-pkg.finmall.com`,qs=Ks.replace(/^https?:/,``),Js=[...new Set([Ks,Ks.replace(/^https:/,`http:`),qs])];function Ys(e){if(typeof e!=`string`||!e)return e;for(let t of Js)if(e.startsWith(t))return e.slice(t.length)||`/`;return e}var Xs=class{constructor(e={}){this.options={availableWidth:0,applyUnit:`px`,applyUnitRatio:1,fontRatio:1,styleWidth:375,apiBase:void 0,...e}}getSystemInfo(){let e=this.options;return{screenWidth:typeof window<`u`?window.innerWidth:e.styleWidth,availableWidth:e.availableWidth,applyUnit:e.applyUnit,applyUnitRatio:e.applyUnitRatio,fontRatio:e.fontRatio}}getDesignInfo(){return{styleWidth:this.options.styleWidth}}doReplaceUrl(e){if(typeof e!=`string`||/^https?:\/\//i.test(e))return e;let t=e;try{for(let e of Object.keys(Gs))t=t.replace(new RegExp(e,`g`),Gs[e])}catch{}let n=Ys(t),r=this.options.apiBase===void 0?js():this.options.apiBase;return r&&typeof n==`string`&&n.startsWith(`/`)?r+n:n}doSize(e,t){if(!e&&e!==0)return``;if(e===`auto`||String(e).indexOf(`%`)>-1)return e;let n=this.getSystemInfo()||{},r=this.getDesignInfo()||{},i=String(e).replace(/[^0-9\-.]/g,``),a=1;if(n.availableWidth){t===`font`&&(a=Number(n.fontRatio||1));let e=parseFloat(n.availableWidth)/parseFloat(r.styleWidth);return parseFloat(i)*e*a+n.applyUnit}return i+n.applyUnit}doColor(e=``){let t=String(e);if(/^#[a-fA-F0-9]{8}$/.test(t)){let[e,n,r,i]=t.substring(1).match(/[a-fA-F0-9]{2}/g);return`rgba(${parseInt(n,16)}, ${parseInt(r,16)}, ${parseInt(i,16)}, ${parseInt(e,16)/100})`}return t}doRemoveUnit(e=``){return String(e).replace(/[^0-9.]/g,``)}doApplyUnit(e){return e+(this.getSystemInfo()||{}).applyUnit}doI18n(e){return e}async doRpc(){return{}}};function Zs(e){if(Array.isArray(e))return e.map(Zs);if(e&&typeof e==`object`){let t={};for(let n of Object.keys(e))t[n]=Zs(e[n]);return t}return e}function Qs(e){return Zs(e||{})}function $s(e){if(e===null)return`null`;if(e===void 0)return`undefined`;let t=typeof e;if(t===`string`)return e;if(t===`number`||t===`boolean`||t===`bigint`)return String(e);if(t===`function`)return`[Function `+(e.name||`anonymous`)+`]`;try{return JSON.stringify(e)}catch{return String(e)}}var ec=[`customAction`,`listener`,`syncRemote`,`saveCard`,`refresh`];function tc(e,t){let n=M(e||{}),r=M(Qs(e)),i=M({value:0}),a=M({value:0}),o=!1,s=M({value:0}),c=M({value:0}),l=[],u={adapter:t,get rootScope(){return n},get state(){return r},setRootScope(e){let t=e||{};for(let e of Object.keys(n))delete n[e];Object.assign(n,t);let i=Qs(t);for(let e of Object.keys(r))delete r[e];Object.assign(r,i),this.markDirty()},reseedState(){let e=Qs(n);for(let e of Object.keys(r))delete r[e];Object.assign(r,e),this.markDirty()},get revision(){return i.value},get errorRev(){return a.value},get apiRev(){return s.value},get logRev(){return c.value},errors:[],eventErrors:[],eventLogs:[],apiCalls:[],listeners:{},markDirty(){i.value++},clearErrors(){this.errors.length=0,this.eventErrors.length=0,this.eventLogs.length=0,c.value++,this.scheduleErrorBump()},clearBindingErrors(){this.errors.length=0,this.scheduleErrorBump()},clearApiCalls(){this.apiCalls.length=0,s.value++},pushLog(e,t){let n=t||[],r=n.map(e=>$s(e)).join(` `);this.eventLogs.push({level:e,text:r,args:n,t:Date.now()}),this.eventLogs.length>500&&this.eventLogs.shift(),c.value++},clearEventLogs(){this.eventLogs.length=0,c.value++},pushError(e,t){let n=ec.includes(e)?this.eventErrors:this.errors;n.push({kind:e,msg:t,t:Date.now()}),n.length>500&&n.shift(),this.scheduleErrorBump()},scheduleErrorBump(){o||(o=!0,En(()=>{o=!1,a.value++}))},getBindingBuffer(){return l},startBindingPass(){l=[]},commitBindingPass(){let e=new Set,t=[];for(let n of l)e.has(n.msg)||(e.add(n.msg),t.push(n));this.errors.length=0;for(let e of t)this.errors.push(e);this.scheduleErrorBump()},pushApiCall(e,t){this.apiCalls.push({api:e,payload:t,t:Date.now()}),this.apiCalls.length>500&&this.apiCalls.shift(),s.value++},addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},postMessage(e,t){let n=this.listeners[e]||[],r={data:t,type:e};n.forEach(t=>{try{t(r)}catch(t){this.pushError(`listener`,`${e}: ${t&&t.message}`)}}),this.pushApiCall(`postMessage:`+e,t)}};return Un(()=>n,()=>u.reseedState(),{deep:!0}),u}var nc=0,rc=e=>`${e}_${(++nc).toString(36)}`,ic={const:`0`,var:`1`,image:`2`},ac={Delete:`1`,Append:`2`},oc=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),sc=class e{constructor(t=[],n={}){this.id=rc(`propgroup`),this.properties=(t||[]).map(e=>new Y(e)),e.setPropertyValue(this.properties,n)}static setPropertyValue(e=[],t={}){t&&e.forEach(e=>{e.itemVisible&&e.itemKey&&t[e.itemKey]!==void 0&&e.itemValueFrom===`0`&&(e.itemValue=t[e.itemKey])})}onRestore(e={},t,n,r){Y.restoreProperty(e.properties||[],this.properties,t,n,r)}onPreview(e){return this.properties.reduce((t,n)=>{let r=n.onPreview(e);return r&&Object.assign(t,r),t},{})}onExport(e){return{properties:this.properties.reduce((t,n)=>{if(!e||e.itemId===n.itemId){let r=n.onExport(e&&e.child);r&&t.push(r)}return t},[])}}},Y=class e{constructor(e={}){this.id=rc(`prop`);let t=oc(e)||{};this.itemId=t.itemId,this.itemName=t.itemName,this.itemType=t.itemType,this.itemKey=t.itemKey,this.itemOption=t.itemOption||{},this.itemParam=t.itemParam||{},this.itemDefaultValue=t.itemDefaultValue===void 0?null:t.itemDefaultValue,this.itemDesc=t.itemDesc,this.itemCondition=t.itemCondition,this.itemWatch=t.itemWatch||{},this.itemTypeRange=t.itemTypeRange||`const,var`,this.itemDirection=t.itemDirection,this.itemVisible=!0,this.itemUpdated=!1,this.itemValueFrom=ic[String(this.itemTypeRange).split(/,/)[0]],this._itemValueFrom=this.itemValueFrom;let n=oc(this.itemDefaultValue);this.itemChildren=new sc(t.itemChildren||[],n),this.itemTemplate=t.itemTemplate||t.itemList||[],this.itemList=[],!this.itemChildren.properties.length&&Object.keys(this.itemTemplate).length&&this.initItemList(n),this.initItemValue(n),this._valuesByFrom={0:void 0,1:void 0,2:void 0},this._valuesByFrom[this.itemValueFrom]=this.itemValue}initItemValue(e,t=!1){this.itemValue=this.itemValueFrom===`1`||this.itemValueFrom===`2`?t?e:``:this.itemChildren.properties.length?{}:Object.keys(this.itemTemplate).length?[]:e}initItemList(e){let t=e||[];Array.isArray(t)&&t.forEach(e=>this.addItems(e))}addItems(e,t){let n=this.itemOption?.templateField||``;if(this.itemChildren.properties.length)return;let r=e?e[n]:``,i=new sc(n?this.itemTemplate[r]||[]:this.itemTemplate||[],e||{});return t&&t(i),this.itemList.push(i),i}removeAt(e){this.itemChildren.properties.length||e>=0&&e<this.itemList.length&&this.itemList.splice(e,1)}moveItem(e,t){if(this.itemChildren.properties.length||e<0||e>=this.itemList.length||(t=Math.max(0,Math.min(this.itemList.length-1,t)),e===t))return;let[n]=this.itemList.splice(e,1);this.itemList.splice(t,0,n)}onRestore(e={},t,n={},r=[]){if(!Object.keys(e).length)return;let i=[].concat(r);i.push(this.itemId),e.itemValueFrom!==void 0&&(this.itemValueFrom=e.itemValueFrom),this.initItemValue(e.itemValue,!0),this._valuesByFrom={0:void 0,1:void 0,2:void 0},this._valuesByFrom[this.itemValueFrom]=this.itemValue,this.itemChildren.onRestore(e.itemChildren||{},t,n,i),this.itemList=[];let a=Array.isArray(e.itemValue)?e.itemValue:[];a.length||!e.itemList?a.forEach(e=>this.addItems(e||{})):Array.isArray(e.itemList)&&e.itemList.forEach(e=>{let r=this.addItems({});r&&r.onRestore(e,t,n,i)})}onPreview(e){let t={},n=e?e.paths:[],r=!!(n&&n.length),i=r?e.vars:{},a=[].concat(n||[]);return this.itemVisible&&this.itemKey&&(this.itemValueFrom===`0`?this.itemChildren.properties.length>0?(a.push(this.itemKey),t[this.itemKey]=this.itemChildren.onPreview({paths:a,vars:i})):this.itemList.length>0?(a.push(this.itemKey),t[this.itemKey]=this.itemList.map((e,t)=>{let n=[].concat(a);return n.push(t),e.onPreview({paths:n,vars:i})})):t[this.itemKey]=this.itemValue:this.itemValueFrom===`1`?(t[this.itemKey]=this.itemDefaultValue,this.itemValue&&(a.push(this.itemKey),i[a.join(`.`)]=this.itemValue)):this.itemValueFrom===`2`&&(t[this.itemKey]=this.itemValue)),r||(t.__vars__=i),t}onExport(e){if(!this.itemVisible||this.itemKey===void 0||this.itemKey===null)return;let t=this.itemChildren.onExport(e),n=this.itemList.map(t=>t.onExport(e)),r={};return this.itemValueFrom===`1`&&(r.itemDefaultValue=this.itemDefaultValue),t&&t.properties.length?r.itemChildren=t:n.length&&(r.itemList=n),{itemId:this.itemId,itemKey:this.itemKey,itemValueFrom:this.itemValueFrom,itemValue:this.itemValue,...r}}static mergePreview(e={},t={}){let n=e.__vars__,r=t.__vars__;return r?Object.assign(e,t,{__vars__:Object.assign({},n,r)}):Object.assign(e,r)}static restoreProperty(e=[],t=[],n,r={},i){if(r||={},!e.length||!t.length)return;let a={},o=(e||[]).reduce((e,t)=>{let n=t.itemId||t.itemKey;return n&&(e[n]=t,a[n]=t),e},{});for(let e=0;e<t.length;e++){let s=t[e],c=o[s.itemId]||o[s.itemKey];c?(delete a[s.itemId],delete a[s.itemKey],s.onRestore(c,n,{},i),s.itemUpdated=!0,r.restore&&r.restore(s)):n===ac.Delete&&(t.splice(e--,1),r.delete&&r.delete(s))}if(n===ac.Append)for(let e in a)r.append&&r.append(a[e],t,[].concat(i||[]))}static updatePropertyVisible(t=[]){let n=t||[],r=e._conditionData(n);n.forEach(t=>{t.itemVisible=!/\./.test(t.itemCondition)||e._conditionResult(t.itemCondition,r),e.updatePropertyVisible(t.itemChildren.properties),t.itemList.forEach(t=>e.updatePropertyVisible(t.properties))})}static _conditionData(e){return e.reduce((e,t)=>{let n=`${t.itemCondition||``}`;return n&&n.split(`.`).length%2==1&&(e[n]=t.itemValue),e},{})}static _conditionResult(e=``,t={}){let n=!0,r=e.split(`.`);for(let e=0;e<r.length-1;e+=2){let i=r.slice(0,e+1).join(`.`),a=r[e+1],o=!1;/^!/.test(a)&&(o=!0,a=a.substring(1));let s=a.split(`|`);n=!1;for(let e=0;e<s.length;e++)if(t[i]==s[e]){n=!0;break}if(o&&(n=!n),!n)break}return n}},cc={_source:`uat-pkg.finmall.com /ubomp-h5-sub/inner_card/js/6.5c0327ab.js module 931(组件分组清单)`,_note:`metaInfo 精简版:className / name / group / style.state / style.visible / style.meta / properties / slots / events。skeleton(SVG 缩略图) 已剔除。style.state 是组件的默认样式初始值,Style.onRestore 会先用它建组,再用 schema 的 style.properties 合并覆盖。`,groups:[`布局组件`,`基础组件`],components:JSON.parse('{"Row":{"className":"Row","name":"行","group":"布局组件","styleState":{"rect":{"width":"100%"},"flex":{"gap":"4","alignItems":"center"}},"styleVisible":{"rect":true,"background":true,"flex":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{"flex":{"justifyContent":{"itemName":"水平对齐"},"alignItems":{"itemName":"垂直对齐"}}},"properties":[],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[{"eventName":"点击事件","eventKey":"click"}]},"Column":{"className":"Column","name":"列","group":"布局组件","styleState":{"rect":{"width":"100%"},"flex":{"gap":"4","flexDirection":"column","justifyContent":"center"}},"styleVisible":{"rect":true,"background":true,"flex":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[{"eventName":"点击事件","eventKey":"click"}]},"MultiColumn":{"className":"MultiColumn","name":"多列布局","group":"布局组件","styleState":{"rect":{"width":"100%"},"flex":{"gap":"12"}},"styleVisible":{"rect":true,"background":true,"flex":{"gap":true,"flexShrink":true},"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[{"eventName":"点击事件","eventKey":"click"}]},"ListLayout":{"className":"ListLayout","name":"列表布局","group":"布局组件","styleState":{"rect":{"width":"100%","height":"auto"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"数据源","itemKey":"value","itemTypeRange":"var","itemOption":{},"itemDefaultValue":[{},{},{},{}]},{"itemId":"006","itemName":"方向","itemKey":"direction","itemTypeRange":"const","itemType":"TabSelect","itemOption":{"iParamList":[{"key":"vertical","value":"纵向"},{"key":"horizontal","value":"横向"}]},"itemDefaultValue":"vertical"},{"itemId":"003","itemName":"元素间距","itemKey":"row-spacing","itemTypeRange":"const","itemType":"InputNumber","itemOption":{},"itemDefaultValue":12},{"itemId":"005","itemName":"内边距","itemKey":"edge-insets","itemTypeRange":"const","itemType":"PaddingStyle","itemOption":{},"itemDefaultValue":"{2,2,2,2}"}],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotScope":true,"slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[{"eventName":"点击事件","eventKey":"click"}]},"GridLayout":{"className":"GridLayout","name":"网格布局","group":"布局组件","styleState":{"rect":{"width":"100%","height":"auto"}},"styleVisible":{"rect":true,"background":true,"flex":{"flexShrink":true},"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"数据源","itemKey":"value","itemTypeRange":"var","itemOption":{},"itemDefaultValue":[{},{},{},{}]},{"itemId":"002","itemName":"列数目","itemKey":"column","itemTypeRange":"const","itemType":"InputNumber","itemOption":{},"itemDefaultValue":2},{"itemId":"003","itemName":"行间距","itemKey":"row-spacing","itemTypeRange":"const","itemType":"InputNumber","itemOption":{},"itemDefaultValue":12},{"itemId":"004","itemName":"列间距","itemKey":"item-spacing","itemTypeRange":"const","itemType":"InputNumber","itemOption":{},"itemDefaultValue":4},{"itemId":"005","itemName":"内边距","itemKey":"edge-insets","itemTypeRange":"const","itemType":"PaddingStyle","itemOption":{},"itemDefaultValue":"{2,2,2,2}"}],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotScope":true,"slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[{"eventName":"点击事件","eventKey":"click"}]},"AbsoluteLayout":{"className":"AbsoluteLayout","name":"绝对布局","group":"布局组件","styleState":{"rect":{"width":"100%","height":"100"}},"styleVisible":{"flex":{"flexShrink":true},"rect":true,"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"对齐方式","itemKey":"align","itemTypeRange":"const","itemType":"PositionStyle","itemOption":{},"itemDefaultValue":""}],"slots":[{"slotKey":"default","slotName":"容器组件插槽","slotWidth":"100%","slotHeight":"100%","slotSwitch":"1"}],"events":[]},"Text":{"className":"Text","name":"文本","group":"基础组件","styleState":{},"styleVisible":{"font":true,"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{"rect":{"width":{"itemOption":{"iTypeList":[{"key":"percent","value":"%"},{"key":"number","value":"px"}]}}}},"properties":[{"itemId":"001","itemName":"内容","itemKey":"value","itemType":"Textarea","itemDefaultValue":"这是一个文本"},{"itemId":"002","itemName":"常用样式","itemTypeRange":"const","itemType":"CustomSelect","itemOption":{"list":[{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"黑色","style":{"fontSize":"14px","color":"#333333"}}],"sync":{"style.font.color":"#333333","style.font.fontWeight":"400","style.font.fontSize":"14","style.background.backgroundType":"00","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"","style.padding.paddingType":""}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"灰色","style":{"fontSize":"14px","color":"#555555"}}],"sync":{"style.font.color":"#555555","style.font.fontWeight":"400","style.font.fontSize":"14","style.background.backgroundType":"00","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"","style.padding.paddingType":""}},{"type":"div","innerText":"淡灰色","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"淡灰色","style":{"fontSize":"14px","color":"#999999"}}],"sync":{"style.font.color":"#999999","style.font.fontWeight":"400","style.font.fontSize":"14","style.background.backgroundType":"00","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"","style.padding.paddingType":""}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"热门","style":{"fontSize":"10px","backgroundColor":"#ff0000","borderRadius":"4px","padding":"1px 5px","color":"#ffffff"}}],"sync":{"style.font.color":"#ffffff","style.font.fontWeight":"400","style.font.fontSize":"10","style.background.backgroundType":"01","style.background.backgroundColor":"#ff0000","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"4","style.padding.paddingType":"1","style.padding.paddingLeft":"5","style.padding.paddingTop":"1","style.padding.paddingRight":"5","style.padding.paddingBottom":"1"}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"热销","style":{"fontSize":"10px","backgroundColor":"#ff0000","borderRadius":"100px","padding":"1px 5px","color":"#ffffff"}}],"sync":{"style.font.color":"#ffffff","style.font.fontWeight":"400","style.font.fontSize":"10","style.background.backgroundType":"01","style.background.backgroundColor":"#ff0000","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100","style.padding.paddingType":"1","style.padding.paddingLeft":"5","style.padding.paddingTop":"1","style.padding.paddingRight":"5","style.padding.paddingBottom":"1"}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"理财","style":{"fontSize":"12px","backgroundColor":"#F1F4FE","borderRadius":"4px","padding":"2px 8px","color":"#90969E"}}],"sync":{"style.font.color":"#90969E","style.font.fontWeight":"400","style.font.fontSize":"12","style.background.backgroundType":"01","style.background.backgroundColor":"#F1F4FE","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"4","style.padding.paddingType":"1","style.padding.paddingLeft":"8","style.padding.paddingTop":"2","style.padding.paddingRight":"8","style.padding.paddingBottom":"2"}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"存款","style":{"fontSize":"14px","border":"1px solid #8A8A8A","borderRadius":"4px","padding":"1px 4px","color":"#545356"}}],"sync":{"style.font.color":"#545356","style.font.fontWeight":"400","style.font.fontSize":"14","style.background.backgroundType":"00","style.border.isBorder":"1","style.border.borderWidth":"1","style.border.borderColor":"#8A8A8A","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"4","style.padding.paddingType":"1","style.padding.paddingLeft":"4","style.padding.paddingTop":"1","style.padding.paddingRight":"4","style.padding.paddingBottom":"1"}},{"type":"div","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","marginRight":"8px","cursor":"pointer"},"list":[{"type":"span","innerText":"240","style":{"fontSize":"22px","color":"#ff0000","fontWeight":"600"}}],"sync":{"style.font.color":"#ff0000","style.font.fontWeight":"600","style.font.fontSize":"22","style.background.backgroundType":"00","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"","style.padding.paddingType":""}}]}}],"slots":[],"events":[{"eventName":"点击事件","eventKey":"click"}]},"Button":{"className":"Button","name":"按钮","group":"基础组件","styleState":{"font":{"color":"#ffffff","fontSize":"16"},"background":{"backgroundType":"01","backgroundColor":"#0079f2"},"borderRadius":{"borderRadiusType":"0","borderRadius":"100"},"rect":{"width":"120","height":"40"}},"styleVisible":{"font":{"color":true,"fontSize":true,"fontWeight":true},"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"按钮文字","itemKey":"value","itemType":"Input","itemDefaultValue":"确定"},{"itemId":"002","itemName":"常用样式","itemTypeRange":"const","itemType":"CustomSelect","itemOption":{"list":[{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#fff","backgroundColor":"#0079f2"},"sync":{"style.font.color":"#ffffff","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#0079f2","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#fff","backgroundColor":"#f3464a"},"sync":{"style.font.color":"#ffffff","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#f3464a","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#0079f2","backgroundColor":"#ffffff","border":"1px solid #0079f2"},"sync":{"style.font.color":"#0079f2","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#ffffff","style.border.isBorder":"1","style.border.borderWidth":"1","style.border.borderStyle":"solid","style.border.borderColor":"#0079f2","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#555","backgroundColor":"#f0ead2"},"sync":{"style.font.color":"#555555","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#f0ead2","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#f3474b","backgroundColor":"#fff0f1"},"sync":{"style.font.color":"#f3474b","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#fff0f1","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","borderRadius":"20px","fontSize":"12px","marginRight":"8px","cursor":"pointer","color":"#9a9a9a","backgroundColor":"#e6e6e6"},"sync":{"style.font.color":"#9a9a9a","style.font.fontSize":"16","style.background.backgroundType":"01","style.background.backgroundColor":"#e6e6e6","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"0","style.borderRadius.borderRadius":"100"}},{"type":"div","innerText":"确定","style":{"width":"59px","height":"24px","lineHeight":"24px","textAlign":"center","fontSize":"15px","marginRight":"8px","cursor":"pointer","color":"#0079F2"},"sync":{"style.font.color":"#0079F2","style.font.fontSize":"15","style.background.backgroundType":"00","style.border.isBorder":"0","style.borderRadius.borderRadiusType":"","style.rect.width":"100%","style.rect.height":"40"}}]}},{"itemId":"003","itemName":"禁用按钮","itemKey":"disabled","itemTypeRange":"const,var","itemType":"BooleanForm","itemOption":{"activeText":"启用","inactiveText":"禁用"},"itemDefaultValue":false}],"slots":[],"events":[{"eventName":"点击事件","eventKey":"click"}]},"Image":{"className":"Image","name":"图片","group":"基础组件","styleState":{"rect":{"width":"72","height":"72"}},"styleVisible":{"image":true,"flex":{"flexShrink":true},"rect":true,"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{"rect":{"width":{"itemOption":{"iTypeList":[{"key":"percent","value":"%"},{"key":"number","value":"px"}]}}}},"properties":[{"itemId":"001","itemName":"图片地址","itemKey":"value","itemTypeRange":"image,var","itemDefaultValue":""}],"slots":[],"events":[{"eventName":"点击事件","eventKey":"click"}]},"Icon":{"className":"Icon","name":"图标","group":"基础组件","styleState":{"rect":{"width":"32","height":"32"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{"rect":{"width":{"itemOption":{"iTypeList":[{"key":"number","value":"px"},{"key":"percent","value":"%"}]}},"height":{"itemOption":{"iTypeList":[{"key":"number","value":"px"}]}}}},"properties":[{"itemId":"001","itemName":"图标","itemKey":"icon","itemTypeRange":"const,var","itemType":"IconSelect","itemOption":{"type":"svg","width":"16","height":"16","image":"/ubomp-h5-sub/inner_card/svg/svg-symbols.9f0f35b.svg","iIconList":[{"key":"sousuo","value":"sousuo","name":"sousuo"},{"key":"gengduo","value":"gengduo","name":"gengduo"},{"key":"saoyisao","value":"saoyisao","name":"saoyisao"},{"key":"shanchu","value":"shanchu","name":"shanchu"},{"key":"shaixuan","value":"shaixuan","name":"shaixuan"},{"key":"shezhi","value":"shezhi","name":"shezhi"},{"key":"shengyin","value":"shengyin","name":"shengyin"},{"key":"shengyinguanbi","value":"shengyinguanbi","name":"shengyinguanbi"},{"key":"aixin","value":"aixin","name":"aixin"},{"key":"aixin_1","value":"aixin_1","name":"aixin_1"},{"key":"shoucang","value":"shoucang","name":"shoucang"},{"key":"shoucang_1","value":"shoucang_1","name":"shoucang_1"},{"key":"dianzan","value":"dianzan","name":"dianzan"},{"key":"dianzan_1","value":"dianzan_1","name":"dianzan_1"},{"key":"yanjing","value":"yanjing","name":"yanjing"},{"key":"yanjing_1","value":"yanjing_1","name":"yanjing_1"},{"key":"yanjing_hide","value":"yanjing_hide","name":"yanjing_hide"},{"key":"zengjia","value":"zengjia","name":"zengjia"},{"key":"zengjia_1","value":"zengjia_1","name":"zengjia_1"},{"key":"xiangji","value":"xiangji","name":"xiangji"},{"key":"xiangji_1","value":"xiangji_1","name":"xiangji_1"},{"key":"chenggong","value":"chenggong","name":"chenggong"},{"key":"chenggong_1","value":"chenggong_1","name":"chenggong_1"},{"key":"shibai","value":"shibai","name":"shibai"},{"key":"shibai_1","value":"shibai_1","name":"shibai_1"},{"key":"shijian","value":"shijian","name":"shijian"},{"key":"shijian_1","value":"shijian_1","name":"shijian_1"},{"key":"dianhua","value":"dianhua","name":"dianhua"},{"key":"dianhua_1","value":"dianhua_1","name":"dianhua_1"},{"key":"angle_left","value":"angle_left","name":"angle_left"},{"key":"angle_right","value":"angle_right","name":"angle_right"},{"key":"angle_up","value":"angle_up","name":"angle_up"},{"key":"angle_down","value":"angle_down","name":"angle_down"},{"key":"arrow_left","value":"arrow_left","name":"arrow_left"},{"key":"arrow_right","value":"arrow_right","name":"arrow_right"},{"key":"long_arrow_up","value":"long_arrow_up","name":"long_arrow_up"},{"key":"long_arrow_down","value":"long_arrow_down","name":"long_arrow_down"},{"key":"caret_left","value":"caret_left","name":"caret_left"},{"key":"caret_right","value":"caret_right","name":"caret_right"},{"key":"sort_up","value":"sort_up","name":"sort_up"},{"key":"sort_down","value":"sort_down","name":"sort_down"},{"key":"ditu","value":"ditu","name":"ditu"},{"key":"fuzhi","value":"fuzhi","name":"fuzhi"},{"key":"check","value":"check","name":"check"},{"key":"times","value":"times","name":"times"},{"key":"weixuanzhong","value":"weixuanzhong","name":"weixuanzhong"},{"key":"switch","value":"switch","name":"switch"},{"key":"tanhao","value":"tanhao","name":"tanhao"},{"key":"tanhao_1","value":"tanhao_1","name":"tanhao_1"},{"key":"jianshao","value":"jianshao","name":"jianshao"},{"key":"jianshao_1","value":"jianshao_1","name":"jianshao_1"},{"key":"pinglun","value":"pinglun","name":"pinglun"},{"key":"pinglun_1","value":"pinglun_1","name":"pinglun_1"},{"key":"shandian","value":"shandian","name":"shandian"},{"key":"shandian_1","value":"shandian_1","name":"shandian_1"},{"key":"shequ","value":"shequ","name":"shequ"},{"key":"shequ_1","value":"shequ_1","name":"shequ_1"},{"key":"shouji","value":"shouji","name":"shouji"},{"key":"shouji_1","value":"shouji_1","name":"shouji_1"},{"key":"shouye","value":"shouye","name":"shouye"},{"key":"shouye_1","value":"shouye_1","name":"shouye_1"},{"key":"shuju","value":"shuju","name":"shuju"},{"key":"shuju_1","value":"shuju_1","name":"shuju_1"},{"key":"wode","value":"wode","name":"wode"},{"key":"wode_1","value":"wode_1","name":"wode_1"},{"key":"yingchengka","value":"yingchengka","name":"yingchengka"},{"key":"yingchengka_1","value":"yingchengka_1","name":"yingchengka_1"},{"key":"yinhangka","value":"yinhangka","name":"yinhangka"},{"key":"yinhangyouhui","value":"yinhangyouhui","name":"yinhangyouhui"},{"key":"youhuiquan","value":"youhuiquan","name":"youhuiquan"},{"key":"youhuiquan_1","value":"youhuiquan_1","name":"youhuiquan_1"},{"key":"tuipiao","value":"tuipiao","name":"tuipiao"},{"key":"yulebao","value":"yulebao","name":"yulebao"},{"key":"anquan","value":"anquan","name":"anquan"},{"key":"bangzhu","value":"bangzhu","name":"bangzhu"},{"key":"bianji","value":"bianji","name":"bianji"},{"key":"bofangjilu","value":"bofangjilu","name":"bofangjilu"},{"key":"buganxingqu","value":"buganxingqu","name":"buganxingqu"},{"key":"chuangzuo","value":"chuangzuo","name":"chuangzuo"},{"key":"diantong_guan","value":"diantong_guan","name":"diantong_guan"},{"key":"dianying","value":"dianying","name":"dianying"},{"key":"dianyingpiao","value":"dianyingpiao","name":"dianyingpiao"},{"key":"dingdan","value":"dingdan","name":"dingdan"},{"key":"dingwei","value":"dingwei","name":"dingwei"},{"key":"faxian","value":"faxian","name":"faxian"},{"key":"fenxiang","value":"fenxiang","name":"fenxiang"},{"key":"gonggao","value":"gonggao","name":"gonggao"},{"key":"huati","value":"huati","name":"huati"},{"key":"huiyuan","value":"huiyuan","name":"huiyuan"},{"key":"lihe","value":"lihe","name":"lihe"},{"key":"mima","value":"mima","name":"mima"},{"key":"nan","value":"nan","name":"nan"},{"key":"nv","value":"nv","name":"nv"},{"key":"paihangbang","value":"paihangbang","name":"paihangbang"},{"key":"pengyouquan","value":"pengyouquan","name":"pengyouquan"},{"key":"remen","value":"remen","name":"remen"},{"key":"rili","value":"rili","name":"rili"},{"key":"search_minus","value":"search_minus","name":"search_minus"},{"key":"search_plus","value":"search_plus","name":"search_plus"},{"key":"shangchuan","value":"shangchuan","name":"shangchuan"},{"key":"shuaxin","value":"shuaxin","name":"shuaxin"},{"key":"taolunqu","value":"taolunqu","name":"taolunqu"},{"key":"tishi","value":"tishi","name":"tishi"},{"key":"tupian","value":"tupian","name":"tupian"},{"key":"weixin","value":"weixin","name":"weixin"},{"key":"wenda","value":"wenda","name":"wenda"},{"key":"wenjuan","value":"wenjuan","name":"wenjuan"},{"key":"wifi","value":"wifi","name":"wifi"},{"key":"wodeguanzhu","value":"wodeguanzhu","name":"wodeguanzhu"},{"key":"xiangkan","value":"xiangkan","name":"xiangkan"},{"key":"xiaoxi","value":"xiaoxi","name":"xiaoxi"},{"key":"xiaoxizhongxin","value":"xiaoxizhongxin","name":"xiaoxizhongxin"},{"key":"xiazai","value":"xiazai","name":"xiazai"},{"key":"yixiangkan","value":"yixiangkan","name":"yixiangkan"},{"key":"zhibo","value":"zhibo","name":"zhibo"},{"key":"zhiwen","value":"zhiwen","name":"zhiwen"}]},"itemDefaultValue":"angle_right"},{"itemId":"002","itemName":"图标颜色","itemKey":"color","itemTypeRange":"const,var","itemType":"Color","itemDefaultValue":"#a5afbc"},{"itemId":"003","itemName":"自定义图标","itemKey":"content","itemTypeRange":"const,var","itemType":"Textarea","itemOption":{"placeholder":"请输入svg文件内容","autosize":{"minRows":1,"maxRows":4}},"itemDefaultValue":""}],"slots":[],"events":[{"eventName":"点击事件","eventKey":"click"}]},"MultiText":{"className":"MultiText","name":"多文本","group":"基础组件","styleState":{},"styleVisible":{"font":{"lineHeight":true,"textAlign":true},"rect":true,"flex":{"justifyContent":true,"alignItems":true,"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"文本列表","itemKey":"textList","itemTypeRange":"const","itemType":"List","itemOption":{"type":"editor","iFieldList":[{"key":"value","value":"内容"},{"key":"color","value":"颜色"},{"key":"fontSize","value":"大小"}],"btnText":"添加文本"},"itemDefaultValue":[{"value":"这是一个文本"}],"itemList":[{"itemId":"001","itemName":"文本内容","itemKey":"value","itemTypeRange":"const,var","itemType":"Input","itemDefaultValue":"这是一个文本"},{"itemId":"002","itemName":"字体颜色","itemKey":"color","itemTypeRange":"const","itemType":"Color","itemDefaultValue":"#000000"},{"itemId":"003","itemName":"字体大小","itemKey":"fontSize","itemTypeRange":"const","itemType":"InputNumber","itemOption":{"mode-mini":{"style":{"width":"50px"}}},"itemDefaultValue":"14"},{"itemId":"004","itemName":"字体权重","itemKey":"fontWeight","itemTypeRange":"const","itemType":"TabSelect","itemOption":{"size":"mini","iParamList":[{"key":"400","value":"常规"},{"key":"500","value":"中等"},{"key":"600","value":"加粗"}]},"itemDefaultValue":"400"},{"itemId":"005","itemName":"字体样式","itemKey":"fontStyle","itemTypeRange":"const","itemType":"FontStyle","itemOption":{},"itemDefaultValue":"normal"},{"itemId":"006","itemName":"字体样式","itemKey":"textDecoration","itemTypeRange":"const","itemType":"TextDecorationStyle","itemOption":{},"itemDefaultValue":"none"},{"itemId":"007","itemName":"字体背景色","itemKey":"backgroundColor","itemTypeRange":"const","itemType":"Color","itemOption":{},"itemDefaultValue":""},{"itemId":"008","itemName":"事件标识码","itemKey":"tag","itemTypeRange":"const","itemType":"Input","itemOption":{"placeholder":"用于点击事件中区分不同文本"},"itemDefaultValue":""}]}],"slots":[],"events":[{"eventName":"点击事件","eventKey":"click"}]},"Canvas":{"className":"Canvas","name":"画布","group":"基础组件","styleState":{"rect":{"width":"100%"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[],"slots":[],"events":[{"eventName":"初始化渲染","eventKey":"onMeasured","includes":["customAction"]}]},"Input":{"className":"Input","name":"输入框","group":"基础组件","styleState":{"rect":{"width":"100%","height":"35"},"background":{"backgroundType":"01","backgroundColor":"#FFFFFF"}},"styleVisible":{"font":{"textAlign":true,"fontSize":true,"fontWeight":true,"color":true},"flex":{"flexShrink":true},"rect":true,"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"绑定变量","itemKey":"value","itemTypeRange":"var","itemDefaultValue":""},{"itemId":"002","itemName":"占位符","itemKey":"placeholder","itemTypeRange":"const,var","itemType":"Input","itemDefaultValue":"请输入"},{"itemId":"003","itemName":"类型","itemKey":"inputType","itemTypeRange":"const,var","itemType":"Select","itemOption":{"iParamList":[{"key":"text","value":"普通文本"},{"key":"number","value":"数字"},{"key":"email","value":"邮箱"},{"key":"password","value":"密码"},{"key":"phone","value":"手机号"}]},"itemDefaultValue":"text"},{"itemId":"004","itemName":"最大长度","itemKey":"maxLength","itemTypeRange":"const,var","itemType":"InputNumber","itemOption":{"type":"+integer"},"itemDefaultValue":""}],"slots":[],"events":[]},"CheckGroup":{"className":"CheckGroup","name":"复选框","group":"基础组件","styleState":{},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"绑定变量","itemKey":"value","itemTypeRange":"var","itemDefaultValue":""},{"itemId":"002","itemName":"选项列表","itemKey":"dataList","itemTypeRange":"const,var","itemType":"List","itemOption":{"type":"text","showHeader":false,"iFieldList":[{"value":"选项名称","key":"desc"}],"replace":{"101":"${index}","102":"选项${index}"}},"itemList":[{"itemId":"101","itemName":"选项键","itemKey":"key","itemTypeRange":"const","itemType":"Input","itemDefaultValue":"1"},{"itemId":"102","itemName":"选项值","itemKey":"desc","itemTypeRange":"const","itemType":"Input","itemDefaultValue":"选项"}],"itemDefaultValue":[{"key":"1","desc":"选项1"},{"key":"2","desc":"选项2"}]},{"itemId":"003","itemName":"选中颜色","itemKey":"selectColor","itemTypeRange":"const","itemType":"Color","itemDefaultValue":"#0082ff"},{"itemId":"004","itemName":"未选中颜色","itemKey":"unSelectColor","itemTypeRange":"const","itemType":"Color","itemDefaultValue":"#333333"},{"itemId":"005","itemName":"样式类型","itemKey":"buttonStyle","itemTypeRange":"const","itemType":"Select","itemOption":{"iParamList":[{"key":"Circle","value":"圆形"},{"key":"Square","value":"实心正方形"},{"key":"SquareEmpty","value":"空心正方形"},{"key":"Text","value":"纯文本"}]},"itemDefaultValue":"Circle"},{"itemId":"006","itemName":"选中数量限制","itemKey":"maxSelectCount","itemTypeRange":"const","itemType":"Select","itemOption":{"iParamList":[{"key":"0","value":"不限制"},{"key":"1","value":"1个"},{"key":"2","value":"2个"},{"key":"3","value":"3个"}]},"itemDefaultValue":"0"},{"itemId":"007","itemName":"排列方向","itemKey":"direction","itemTypeRange":"const","itemType":"Select","itemOption":{"iParamList":[{"key":"horizontal","value":"水平"},{"key":"vertical","value":"垂直"}]},"itemDefaultValue":"horizontal"},{"itemId":"008","itemName":"选项内边距","itemKey":"itemPadding","itemTypeRange":"const","itemType":"PaddingStyle","itemOption":{"normal":true,"seperator":" ","brackets":[]},"itemDefaultValue":"4 10 4 10"},{"itemId":"009","itemName":"选项间距","itemKey":"itemSpacing","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"4"},{"itemId":"010","itemName":"文字图标间距","itemKey":"textSpacing","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"3"},{"itemId":"011","itemName":"字体大小","itemKey":"fontSize","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"13"},{"itemId":"012","itemName":"icon大小","itemKey":"iconSize","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"14"}],"slots":[],"events":[{"eventKey":"selectChange","eventName":"选项发生改变"}]},"RadioButton":{"className":"RadioButton","name":"单选框","group":"基础组件","styleState":{},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"绑定变量","itemKey":"value","itemTypeRange":"var","itemDefaultValue":""},{"itemId":"002","itemName":"选中颜色","itemKey":"selectColor","itemTypeRange":"const","itemType":"Color","itemDefaultValue":"#0082ff"},{"itemId":"003","itemName":"未选中颜色","itemKey":"unSelectColor","itemTypeRange":"const","itemType":"Color","itemDefaultValue":"#333333"},{"itemId":"004","itemName":"样式类型","itemKey":"buttonStyle","itemTypeRange":"const","itemType":"Select","itemOption":{"iParamList":[{"key":"Circle","value":"圆形"},{"key":"CircleEmpty","value":"空心圆形"}]},"itemDefaultValue":"Circle"},{"itemId":"005","itemName":"文字图标间距","itemKey":"textSpacing","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"3"},{"itemId":"006","itemName":"字体大小","itemKey":"fontSize","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"14"},{"itemId":"007","itemName":"icon大小","itemKey":"iconSize","itemTypeRange":"const","itemType":"InputNumber","itemDefaultValue":"14"},{"itemId":"008","itemName":"显示文字","itemKey":"showText","itemTypeRange":"const","itemType":"Switcher","itemDefaultValue":"1","itemCondition":"showText"},{"itemId":"009","itemName":"文字内容","itemKey":"text","itemTypeRange":"const,var","itemType":"Input","itemDefaultValue":"选项","itemCondition":"showText.1"}],"slots":[],"events":[{"eventKey":"selectChange","eventName":"选项发生改变"}]},"ProgressSlider":{"className":"ProgressSlider","name":"滑块","group":"基础组件","styleState":{"rect":{"width":"100%"},"other":{"overflow":"visible"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"other":true,"margin":true,"transform":true},"styleMeta":{"other":{"overflow":{"itemOption":{"iParamList":[{"key":"visible","value":"可见"}]}}}},"properties":[{"itemId":"001","itemName":"绑定变量","itemKey":"value","itemTypeRange":"var","itemDefaultValue":""},{"itemId":"002","itemName":"最小值","itemTypeRange":"const,var","itemKey":"minProgress","itemType":"InputNumber","itemDefaultValue":"0"},{"itemId":"003","itemName":"最大值","itemTypeRange":"const,var","itemKey":"maxProgress","itemType":"InputNumber","itemDefaultValue":"100"},{"itemId":"004","itemName":"步长","itemTypeRange":"const,var","itemKey":"step","itemType":"InputNumber","itemDefaultValue":"1"},{"itemId":"005","itemName":"背景色","itemTypeRange":"const,var","itemKey":"backgroundColor","itemType":"Color","itemDefaultValue":"#e6e6e6"},{"itemId":"006","itemName":"前景色","itemTypeRange":"const,var","itemKey":"foregroundColor","itemType":"Color","itemDefaultValue":"#0a59f5"},{"itemId":"007","itemName":"高度","itemTypeRange":"const,var","itemKey":"processHeight","itemType":"InputNumber","itemDefaultValue":"5"},{"itemId":"008","itemName":"滑块样式","itemTypeRange":"const,var","itemKey":"blockStyle","itemType":"Select","itemOption":{"iParamList":[{"key":"circle","value":"纯色圆"},{"key":"image","value":"图片"}]},"itemDefaultValue":"circle","itemCondition":"blockStyle"},{"itemId":"009","itemName":"滑块颜色","itemTypeRange":"const,var","itemKey":"blockColor","itemType":"Color","itemDefaultValue":"#ffffff","itemCondition":"blockStyle.circle"},{"itemId":"010","itemName":"滑块背景图","itemTypeRange":"image,var","itemKey":"blockImage","itemDefaultValue":"","itemCondition":"blockStyle.image"},{"itemId":"011","itemName":"滑块宽","itemTypeRange":"const,var","itemKey":"blockWidth","itemType":"InputNumber","itemDefaultValue":"15"},{"itemId":"012","itemName":"滑块高","itemTypeRange":"const,var","itemKey":"blockHeight","itemType":"InputNumber","itemDefaultValue":"15"}],"slots":[],"events":[{"eventName":"值改变事件","eventKey":"change"}]},"Video":{"className":"Video","name":"视频","group":"基础组件","styleState":{},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"padding":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"视频地址","itemKey":"url","itemTypeRange":"image,var","itemDefaultValue":""},{"itemId":"002","itemName":"视频封面","itemKey":"previewUrl","itemTypeRange":"image,var","itemDefaultValue":""}],"slots":[],"events":[]},"Map":{"className":"Map","name":"地图","group":"基础组件","styleState":{"rect":{"width":"100%","height":"100"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"borderRadius":true,"border":true,"shadow":true,"margin":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"中心经度Lat","itemKey":"centerLat","itemType":"InputNumber","itemDefaultValue":""},{"itemId":"002","itemName":"中心纬度Lng","itemKey":"centerLng","itemType":"InputNumber","itemDefaultValue":""},{"itemId":"003","itemName":"缩放比","itemKey":"zoom","itemType":"InputNumber","itemOption":{"type":"+integer"},"itemDefaultValue":""},{"itemId":"004","itemName":"标记点经度Lat","itemKey":"markerLat","itemType":"InputNumber","itemDefaultValue":""},{"itemId":"005","itemName":"标记点纬度Lng","itemKey":"markerLng","itemType":"InputNumber","itemDefaultValue":""},{"itemId":"006","itemName":"标记点名称","itemKey":"markerName","itemTypeRange":"const,var","itemType":"Input","itemOption":{"placeholder":"请输入标记点名称"},"itemDefaultValue":""}],"slots":[],"events":[]},"Divider":{"className":"Divider","name":"分割线","group":"基础组件","styleState":{"rect":{"width":"100%","height":"1"},"background":{"backgroundType":"01","backgroundColor":"#f1f1f1"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"margin":true},"styleMeta":{},"properties":[],"slots":[],"events":[]},"ViewContainer":{"className":"ViewContainer","name":"自定义","group":"基础组件","styleState":{"rect":{"width":"100%","height":"auto"}},"styleVisible":{"rect":true,"flex":{"flexShrink":true},"background":true,"borderRadius":true,"border":true,"shadow":true,"other":true,"margin":true,"padding":true,"transform":true},"styleMeta":{},"properties":[{"itemId":"001","itemName":"自定义类","itemKey":"customClass","itemTypeRange":"const","itemType":"Input","itemDefaultValue":""},{"itemId":"002","itemName":"自定义属性","itemKey":"customProps","itemTypeRange":"var","itemDefaultValue":{}},{"itemId":"003","itemName":"占位图","itemKey":"customRemarkImg","itemTypeRange":"image","itemDefaultValue":{}}],"slots":[],"events":[{"eventName":"动作事件","eventKey":"action"}]}}')},lc={properties:[{itemId:`1100`,itemName:`字体`,itemKey:`font`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`字体颜色`,itemKey:`color`,itemTypeRange:`const,var`,itemType:`Color`,itemDefaultValue:``},{itemId:`002`,itemName:`字体大小`,itemKey:`fontSize`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{type:`+integer`,iParamList:[{key:`12`,value:`12px`},{key:`14`,value:`14px`},{key:`16`,value:`16px`},{key:`18`,value:`18px`},{key:`20`,value:`20px`},{key:`22`,value:`22px`},{key:`24`,value:`24px`}]},itemDefaultValue:`14`},{itemId:`007`,itemName:`行高`,itemKey:`lineHeight`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``},{itemId:`003`,itemName:`对齐`,itemKey:`textAlign`,itemTypeRange:`const,var`,itemType:`TabSelect`,itemOption:{iParamList:[{key:`left`,value:`左`},{key:`center`,value:`中`},{key:`right`,value:`右`}]},itemDefaultValue:`left`},{itemId:`004`,itemName:`字体权重`,itemKey:`fontWeight`,itemTypeRange:`const,var`,itemType:`TabSelect`,itemOption:{iParamList:[{key:`400`,value:`常规`},{key:`500`,value:`中等`},{key:`600`,value:`加粗`}]},itemDefaultValue:`400`},{itemId:`008`,itemName:`字体样式`,itemKey:`fontStyle`,itemTypeRange:`const`,itemType:`FontStyle`,itemOption:{},itemDefaultValue:`normal`},{itemId:`009`,itemName:`字体修饰`,itemKey:`textDecoration`,itemTypeRange:`const`,itemType:`TextDecorationStyle`,itemOption:{},itemDefaultValue:`none`},{itemId:`005`,itemName:`最大行数`,itemKey:`isMaxLine`,itemTypeRange:`const`,itemType:`Switcher`,itemOption:{},itemDefaultValue:`0`,itemCondition:`isMaxLine`},{itemId:`006`,itemName:`最大行数`,itemKey:`maxLine`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:`1`,itemCondition:`isMaxLine.1`}]},{itemId:`1200`,itemName:`图片`,itemKey:`image`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`裁剪模式`,itemKey:`cropMode`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:`00`,value:`铺满缩放`},{key:`01`,value:`填充缩放`}]},itemDefaultValue:`00`}]},{itemId:`1300`,itemName:`定位`,itemKey:`position`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`左偏移`,itemKey:`left`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``},{itemId:`002`,itemName:`上偏移`,itemKey:`top`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``},{itemId:`003`,itemName:`右偏移`,itemKey:`right`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``},{itemId:`004`,itemName:`下偏移`,itemKey:`bottom`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``}]},{itemId:`100`,itemName:`布局`,itemKey:`flex`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`006`,itemName:`排列方向`,itemKey:`flexDirection`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:`row`,value:`横向`},{key:`column`,value:`竖向`}]},itemDefaultValue:`row`},{itemId:`001`,itemName:`水平对齐`,itemKey:`justifyContent`,itemTypeRange:`const`,itemType:`JustifyContentStyle`,itemOption:{rowName:`水平对齐`,columnName:`垂直对齐`},itemDefaultValue:`flex-start`,itemWatch:{flexDirection:`flexDirection`}},{itemId:`002`,itemName:`垂直对齐`,itemKey:`alignItems`,itemTypeRange:`const`,itemType:`AlignItemsStyle`,itemOption:{rowName:`垂直对齐`,columnName:`水平对齐`},itemDefaultValue:`stretch`,itemWatch:{flexDirection:`flexDirection`}},{itemId:`003`,itemName:`元素间距`,itemKey:`gap`,itemTypeRange:`const`,itemType:`Select`,itemOption:{iParamList:[{key:`0`,value:`0px`},{key:`4`,value:`4px`},{key:`8`,value:`8px`},{key:`12`,value:`12px`},{key:`16`,value:`16px`},{key:`20`,value:`20px`},{key:`24`,value:`24px`},{key:`28`,value:`28px`}]},itemDefaultValue:``},{itemId:`005`,itemName:`空间不足时压缩节点`,itemKey:`flexShrink`,itemTypeRange:`const`,itemType:`Switcher`,itemOption:{},itemDefaultValue:`1`}]},{itemId:`200`,itemName:`矩形`,itemKey:`rect`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`003`,itemName:`宽度`,itemKey:`width`,itemTypeRange:`const,var`,itemType:`NumberStyle`,itemOption:{},itemDefaultValue:``},{itemId:`004`,itemName:`高度`,itemKey:`height`,itemTypeRange:`const,var`,itemType:`NumberStyle`,itemOption:{iTypeList:[{key:`number`,value:`px`},{key:`auto`,value:`@`}]},itemDefaultValue:`auto`}]},{itemId:`300`,itemName:`背景`,itemKey:`background`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`背景`,itemKey:`backgroundType`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:`00`,value:`透明`},{key:`01`,value:`颜色`},{key:`02`,value:`图片`},{key:`03`,value:`渐变色`}]},itemDefaultValue:`00`,itemCondition:`backgroundType`},{itemId:`002`,itemName:`背景颜色`,itemKey:`backgroundColor`,itemTypeRange:`const,var`,itemType:`Color`,itemDefaultValue:``,itemCondition:`backgroundType.01`},{itemId:`003`,itemName:`背景图片`,itemKey:`backgroundImage`,itemTypeRange:`image,var`,itemOption:{},itemDefaultValue:``,itemCondition:`backgroundType.02`},{itemId:`004`,itemName:`背景图位置`,itemKey:`backgroundPosition`,itemTypeRange:`const,var`,itemType:`BackgroundPositionStyle`,itemOption:{},itemDefaultValue:`50% 50%`,itemCondition:`backgroundType.02`},{itemId:`005`,itemName:`背景图大小`,itemKey:`backgroundSize`,itemTypeRange:`const,var`,itemType:`BackgroundSizeStyle`,itemOption:{},itemDefaultValue:`cover`,itemCondition:`backgroundType.02`},{itemId:`006`,itemName:`背景图重复`,itemKey:`backgroundRepeat`,itemTypeRange:`const,var`,itemType:`Select`,itemOption:{iParamList:[{key:`no-repeat`,value:`不重复`},{key:`repeat`,value:`重复图片`},{key:`repeat-x`,value:`水平重复`},{key:`repeat-y`,value:`垂直重复`}]},itemDefaultValue:`no-repeat`,itemCondition:`backgroundType.02`},{itemId:`007`,itemName:`背景渐变`,itemKey:`backgroundGradient`,itemTypeRange:`const,var`,itemType:`GradientStyle`,itemOption:{},itemDefaultValue:``,itemCondition:`backgroundType.03`}]},{itemId:`400`,itemName:`内边距`,itemKey:`padding`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`内边距`,itemKey:`paddingType`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:``,value:`无`},{key:`0`,value:`全边`},{key:`1`,value:`自定义`}]},itemDefaultValue:``,itemCondition:`paddingType`},{itemId:`002`,itemName:`内边距`,itemKey:`padding`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{iParamList:[{key:`0`,value:`0px`},{key:`2`,value:`2px`},{key:`4`,value:`4px`},{key:`8`,value:`8px`},{key:`12`,value:`12px`},{key:`16`,value:`16px`},{key:`20`,value:`20px`},{key:`24`,value:`24px`},{key:`28`,value:`28px`}]},itemDefaultValue:``,itemCondition:`paddingType.0`},{itemId:`003`,itemName:`内左边距`,itemKey:`paddingLeft`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`paddingType.1`},{itemId:`004`,itemName:`内上边距`,itemKey:`paddingTop`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`paddingType.1`},{itemId:`005`,itemName:`内右边距`,itemKey:`paddingRight`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`paddingType.1`},{itemId:`006`,itemName:`内下边距`,itemKey:`paddingBottom`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`paddingType.1`}]},{itemId:`500`,itemName:`外边距`,itemKey:`margin`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`外边距`,itemKey:`marginType`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:``,value:`无`},{key:`0`,value:`全边`},{key:`1`,value:`自定义`}]},itemDefaultValue:``,itemCondition:`marginType`},{itemId:`002`,itemName:`外边距`,itemKey:`margin`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{iParamList:[{key:`0`,value:`0px`},{key:`2`,value:`2px`},{key:`4`,value:`4px`},{key:`8`,value:`8px`},{key:`12`,value:`12px`},{key:`16`,value:`16px`},{key:`20`,value:`20px`},{key:`24`,value:`24px`},{key:`28`,value:`28px`}]},itemDefaultValue:``,itemCondition:`marginType.0`},{itemId:`003`,itemName:`外左边距`,itemKey:`marginLeft`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`marginType.1`},{itemId:`004`,itemName:`外上边距`,itemKey:`marginTop`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`marginType.1`},{itemId:`005`,itemName:`外右边距`,itemKey:`marginRight`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`marginType.1`},{itemId:`006`,itemName:`外下边距`,itemKey:`marginBottom`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`marginType.1`}]},{itemId:`600`,itemName:`圆角`,itemKey:`borderRadius`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`圆角`,itemKey:`borderRadiusType`,itemTypeRange:`const`,itemType:`TabSelect`,itemOption:{iParamList:[{key:``,value:`无`},{key:`0`,value:`全角`},{key:`1`,value:`自定义`}]},itemDefaultValue:``,itemCondition:`borderRadiusType`},{itemId:`002`,itemName:`圆角`,itemKey:`borderRadius`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{type:`+integer`,iParamList:[{key:`0`,value:`0px`},{key:`4`,value:`4px`},{key:`6`,value:`6px`},{key:`8`,value:`8px`},{key:`10`,value:`10px`},{key:`12`,value:`12px`},{key:`16`,value:`16px`}]},itemDefaultValue:``,itemCondition:`borderRadiusType.0`},{itemId:`003`,itemName:`圆角上左`,itemKey:`borderTopLeftRadius`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`borderRadiusType.1`},{itemId:`004`,itemName:`圆角上右`,itemKey:`borderTopRightRadius`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`borderRadiusType.1`},{itemId:`005`,itemName:`圆角下右`,itemKey:`borderBottomRightRadius`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`borderRadiusType.1`},{itemId:`006`,itemName:`圆角下左`,itemKey:`borderBottomLeftRadius`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:``,itemCondition:`borderRadiusType.1`}]},{itemId:`700`,itemName:`边框`,itemKey:`border`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`边框`,itemKey:`isBorder`,itemTypeRange:`const`,itemType:`Switcher`,itemOption:{},itemDefaultValue:`0`,itemCondition:`isBorder`},{itemId:`002`,itemName:`边框宽度`,itemKey:`borderWidth`,itemTypeRange:`const,var`,itemType:`InputNumber`,itemOption:{},itemDefaultValue:`1`,itemCondition:`isBorder.1`},{itemId:`003`,itemName:`边框样式`,itemKey:`borderStyle`,itemTypeRange:`const,var`,itemType:`Select`,itemOption:{iParamList:[{key:`solid`,value:`solid`},{key:`dashed`,value:`dashed`},{key:`dotted`,value:`dotted`}]},itemDefaultValue:`solid`,itemCondition:`isBorder.1`},{itemId:`004`,itemName:`边框颜色`,itemKey:`borderColor`,itemTypeRange:`const,var`,itemType:`Color`,itemOption:{},itemDefaultValue:`#e7e7ee`,itemCondition:`isBorder.1`}]},{itemId:`800`,itemName:`阴影`,itemKey:`shadow`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`阴影`,itemKey:`isShadow`,itemTypeRange:`const`,itemType:`Switcher`,itemDefaultValue:`0`,itemCondition:`isShadow`},{itemId:`002`,itemName:`阴影颜色`,itemKey:`shadowColor`,itemTypeRange:`const`,itemType:`Color`,itemDefaultValue:`#e7e7ee`,itemCondition:`isShadow.1`},{itemId:`003`,itemName:`x偏移`,itemKey:`shadowX`,itemTypeRange:`const`,itemType:`InputNumber`,itemDefaultValue:`0`,itemCondition:`isShadow.1`},{itemId:`004`,itemName:`y偏移`,itemKey:`shadowY`,itemTypeRange:`const`,itemType:`InputNumber`,itemDefaultValue:`0`,itemCondition:`isShadow.1`},{itemId:`005`,itemName:`阴影模糊`,itemKey:`shadowBlur`,itemTypeRange:`const`,itemType:`InputNumber`,itemDefaultValue:``,itemCondition:`isShadow.1`},{itemId:`006`,itemName:`阴影拓展`,itemKey:`shadowSpread`,itemType:`InputNumber`,itemTypeRange:`const`,itemDefaultValue:``,itemCondition:`isShadow.1`}]},{itemId:`900`,itemName:`转换`,itemKey:`transform`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`旋转`,itemKey:`rotate`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{symbol:`deg`,type:`integer`},itemDefaultValue:``}]},{itemId:`1000`,itemName:`高级`,itemKey:`other`,itemTypeRange:`const`,itemType:`group`,itemOption:{mode:`free`},itemChildren:[{itemId:`002`,itemName:`溢出`,itemKey:`overflow`,itemTypeRange:`const`,itemType:`Select`,itemOption:{iParamList:[{key:`hidden`,value:`隐藏`},{key:`visible`,value:`可见`}]},itemDefaultValue:`hidden`},{itemId:`001`,itemName:`不透明度`,itemKey:`opacity`,itemTypeRange:`const`,itemType:`InputNumber`,itemOption:{symbol:`%`,type:`+integer`},itemDefaultValue:``}]}]},uc={_source:`c9.6a9947d5.js module (directives meta)`,properties:[{itemId:`001`,itemName:`显示条件`,itemDesc:``,itemTypeRange:`const`,itemType:`Group`,itemKey:`v-show`,itemOption:{mode:`free`},itemChildren:[{itemId:`001`,itemName:`显隐设置`,itemType:`Select`,itemKey:`showType`,itemOption:{iParamList:[{key:`00`,value:`始终显示`},{key:`01`,value:`满足条件显示`},{key:`02`,value:`满足条件隐藏`}]},itemDefaultValue:`00`,itemCondition:`showType`},{itemId:`002`,itemName:`具体条件`,itemType:`IfForm`,itemKey:`condition`,itemOption:{},itemDefaultValue:{},itemCondition:`showType.01|02`}]}]},dc=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),fc=0,pc=e=>`${e}_${(++fc).toString(36)}`,mc=cc.components||{},hc=lc.properties||[],gc={};(function e(t,n=[],r=[]){t.forEach(t=>{let i=n.concat(t.itemId),a=r.concat(t.itemKey);gc[i.join(`|`)]=t,gc[a.join(`.`)]=t,t.itemChildren&&e(t.itemChildren,i,a)})})(hc);var _c=uc.properties||[],vc=class{constructor(e={}){this.id=pc(`style`),this.state=Object.assign({},e.state||{}),this.visible=e.visible||{},this.meta=e.meta||{},this.properties=[],this.parseStateProperties(this.state,this.properties)}parseStateProperties(e,t=[]){let n=dc(e)||{};for(let e in n){let r=gc[e];if(!r)continue;let i=new Y(r);t.push(i);let a=Object.keys(n[e]||{}),o=i.itemChildren?.properties||[],s=this.visible&&this.visible.flex;e===`flex`&&s&&typeof s==`object`&&s.flexShrink&&a.push(`flexShrink`);for(let e=0;e<o.length;e++)a.includes(o[e].itemKey)||o.splice(e--,1);sc.setPropertyValue(o,n[e]),i.itemValueFrom=`0`,i.itemUpdated=!0}}onRestore(e={}){this.properties.length=0,this.parseStateProperties(this.state,this.properties);let t=this.properties.reduce((e,t)=>(e[t.itemId]=t,e),{}),n={append(e,t,n=[]){let r=[].concat(n);r.push(e.itemId);let i=gc[r.join(`|`)],a=new Y(i||{});t.push(a),a.onRestore(dc(e),ac.Delete)}};(e.properties||[]).forEach(e=>{let r=gc[e.itemId];if(!r){let n=new Y(e);this.properties.push(n),t[e.itemId]=n,n.onRestore(e,ac.Delete);return}let i=t[e.itemId];if(i)i.onRestore(e,ac.Append,n);else{let n=new Y(r);this.properties.push(n),t[e.itemId]=n,n.onRestore(e,ac.Delete)}}),Y.updatePropertyVisible(this.properties)}onPreview(){let e=this.properties.reduce((e,t)=>{let n=t.onPreview();return n&&Y.mergePreview(e,n),e},{});return{id:this.id,properties:e}}onExport(){return{properties:this.properties.reduce((e,t)=>{let n=t.onExport();return n&&e.push(n),e},[])}}applyChange(e,t){let n=e.onExport(t);if(!n)return;let r=e.itemId,i=this.properties.filter(e=>e.itemId===r)[0];if(!i){i=new Y(gc[r]||{}),this.properties.push(i),i.onRestore(dc(n),ac.Delete);return}let a=[r];for(let e=t;e;e=e.child)a.push(e.itemId);i.onRestore(dc(n),ac.Append,{append(e,t){let n=gc[a.join(`|`)],r=new Y(n||{});t.push(r),r.onRestore(dc(e),ac.Delete)}})}},yc=class{constructor(e={}){this.id=pc(`slot`),this.slotKey=e.slotKey,this.slotName=e.slotName,this.slotDesc=e.slotDesc||``,this.slotScope=e.slotScope===!0||e.slotScope===`true`,this.slotWidth=e.slotWidth||``,this.slotHeight=e.slotHeight||``,this.slotSwitch=e.slotSwitch===void 0?`1`:e.slotSwitch,this.components=[]}onRestore(e={}){e.slotSwitch!==void 0&&(this.slotSwitch=e.slotSwitch),this.components=(e.components||[]).map(e=>Cc(e))}onPreview(){return{id:this.id,slotKey:this.slotKey,slotScope:this.slotScope,slotDesc:this.slotDesc,slotSwitch:this.slotSwitch,slotWidth:this.slotWidth,slotHeight:this.slotHeight,components:this.components.reduce((e,t)=>{let n=t.onPreview();return n&&e.push(n),e},[])}}onExport(){return{slotKey:this.slotKey,slotScope:this.slotScope,slotSwitch:this.slotSwitch,components:(this.components||[]).map(e=>e&&typeof e.onExport==`function`?e.onExport():e)}}};function bc(e=[],t=[],n={}){let r={},i=t.length>0;return(e||[]).forEach(e=>{if(!e||!e.itemKey)return;let i=t.concat(e.itemKey);e.itemValueFrom===`1`?(r[e.itemKey]=e.itemDefaultValue,e.itemValue&&(n[i.join(`.`)]=e.itemValue)):e.itemValueFrom===`2`?r[e.itemKey]=e.itemValue:e.itemChildren&&e.itemChildren.properties?r[e.itemKey]=bc(e.itemChildren.properties,i,n):e.itemList?r[e.itemKey]=e.itemList.map((e,t)=>bc(e&&e.properties||[],i.concat(String(t)),n)):r[e.itemKey]=e.itemValue}),i||(r.__vars__=n),r}function xc(e={},t=[]){let n=e.event||{},r=(t||[]).filter(e=>e.eventKey===n.eventKey)[0]||{},i=e.action||{};return{event:{eventName:r.eventName,eventKey:r.eventKey},action:{actionType:i.actionType,properties:bc(i.properties||[])},schemaIndex:-1}}var Sc=class{constructor(e={}){let t=e.className,n=mc[t]||{};this.id=e.id||pc(`comp`),this.componentId=e.componentId||pc(String(t).toLowerCase()),this.name=e.name||n.name||t,this.className=t,this.version=e.version||n.version,this.visible=!0,this.metaMissing=!mc[t],this.style=new vc({state:n.styleState,visible:n.styleVisible}),this.directives=_c.map(e=>new Y(e)),this.properties=(n.properties||[]).map(e=>new Y(e)),this.events=n.events||[],this.eventactions=[],this.slots=(n.slots||[]).map(e=>new yc(e)),this._schemaNode=e,this.onRestore(e)}onRestore(e={}){this.style.onRestore(e.style||{}),Y.restoreProperty(e.directives||[],this.directives),Y.updatePropertyVisible(this.directives),Y.restoreProperty(e.properties||[],this.properties),Y.updatePropertyVisible(this.properties),this.eventactions=(e.eventactions||[]).map((e,t)=>{let n=xc(e,this.events);return n.schemaIndex=t,n});let t=(e.slots||[]).reduce((e,t)=>(e[t.slotKey]=t,e),{});this.slots.forEach(e=>{t[e.slotKey]&&e.onRestore(t[e.slotKey])}),this.metaMissing&&!this.slots.length&&(e.slots||[]).length&&(e.slots||[]).forEach(e=>{let t=new yc({slotKey:e.slotKey,slotScope:e.slotScope});t.onRestore(e),this.slots.push(t)})}onPreview(){let e=this.directives.reduce((e,t)=>{let n=t.onPreview();return n&&Y.mergePreview(e,n),e},{}),t=this.properties.reduce((e,t)=>{let n=t.onPreview();return n&&Y.mergePreview(e,n),e},{}),n={id:this.id,componentId:this.componentId,name:this.name,className:this.className,version:this.version,directives:e,style:this.style.onPreview(),properties:t,eventactions:this.eventactions,slots:this.slots.map(e=>e.onPreview()),visible:this.visible,metaMissing:this.metaMissing||void 0,_schemaNode:this._schemaNode};return Nc(n,{className:this.className,properties:this.properties,style:this.style.properties,directives:this.directives,events:this.events}),n}};function Cc(e){return new Sc(e)}var wc=class{constructor(e={}){this.id=pc(`view`),this.width=e.width||`375`,this.className=e.className||`Root`,this.style=new vc({state:{}}),this.properties=[],this.eventactions=[],this.components=[],this._schemaNode=e,this.onRestore(e)}onRestore(e={}){this.style.onRestore(e.style||{}),Y.restoreProperty(e.properties||[],this.properties),Y.updatePropertyVisible(this.properties),this.eventactions=(e.eventactions||[]).map((e,t)=>{let n=xc(e,[]);return n.schemaIndex=t,n}),this.components=(e.components||[]).map(e=>Cc(e))}onPreview(){let e=this.properties.reduce((e,t)=>{let n=t.onPreview();return n&&Y.mergePreview(e,n),e},{}),t={id:this.id,componentId:this.id,width:this.width,className:this.className,style:this.style.onPreview(),properties:e,eventactions:this.eventactions,components:this.components.map(e=>e.onPreview()),_schemaNode:this._schemaNode};return Nc(t,{className:this.className,properties:this.properties,style:this.style.properties,directives:[],events:[]}),t}};function Tc(e){if(!e)return;let t=e=>(e||[]).reduce((e,t)=>(e[t.key]=t.defaultValue,e),{});return{dictionaryList:t(e.dictionaryList),inputParams:t(e.inputParams),mocks:e.mocks||{}}}function Ec(e){return pc(String(e||`comp`).toLowerCase())}function Dc(e){let t=mc[e];return!!(t&&t.slots&&t.slots.length)}function Oc(e){let t=mc[e];return t&&t.slots&&t.slots.length?t.slots[0].slotKey:`default`}function kc(e){if(!mc[e])throw Error(`未知组件类型:`+e);let t=new Sc({className:e,componentId:Ec(e)}),n=e=>(e||[]).map(e=>e.onExport()).filter(e=>e!==void 0);return{componentId:t.componentId,className:t.className,directives:n(t.directives),style:t.style.onExport(),properties:n(t.properties),eventactions:[],slots:t.slots.map(e=>e.onExport())}}function Ac(e={}){let t=new wc(e.view||e),n=Tc(e.dictionary);return{id:e.id,version:e.version,pageId:e.pageId,name:e.name,desc:e.desc,platform:e.platform,...n?{dictionary:n}:{},view:t.onPreview()}}function jc(e={}){let t={};return e.iParamList&&(t.iParamList=e.iParamList),e.iTypeList&&(t.iTypeList=e.iTypeList),e.codeKey&&(t.codeKey=e.codeKey),e.language&&(t.language=e.language),e.max!==void 0&&(t.max=e.max),e.min!==void 0&&(t.min=e.min),e.step!==void 0&&(t.step=e.step),t}function Mc(e){if(!e||!e.itemKey)return null;let t={itemId:e.itemId,itemKey:e.itemKey,itemName:e.itemName,itemType:e.itemType,itemValue:e.itemValue,itemValueFrom:e.itemValueFrom,itemTypeRange:e.itemTypeRange,itemVisible:e.itemVisible,itemRequired:!!e.itemRequired,itemDesc:e.itemDesc,options:jc(e.itemOption)};return e.itemChildren&&e.itemChildren.properties&&e.itemChildren.properties.length&&(t.children=e.itemChildren.properties.map(Mc).filter(Boolean)),e.itemList&&e.itemList.length&&(t.itemList=e.itemList.map(e=>(e.properties||[]).map(Mc).filter(Boolean))),t}function Nc(e,t){Object.defineProperty(e,"_model",{value:t,enumerable:!1,configurable:!0,writable:!1})}function Pc(e){let t=[];if(e.components&&t.push(...e.components),e.slots)for(let n of e.slots)n.components&&t.push(...n.components);return t}function Fc(e){if(!e)return null;let t=e._model||{},n={id:e.id,componentId:e.componentId,className:e.className,name:e.name,properties:(t.properties||[]).map(Mc).filter(Boolean),style:(t.style||[]).map(Mc).filter(Boolean),directives:(t.directives||[]).map(Mc).filter(Boolean),eventactions:e.eventactions||[]},r=Pc(e);return r.length&&(n.components=r.map(Fc).filter(Boolean)),n}function Ic(e={}){let t=Fc(Ac(e).view);return t&&(t.id=e.id,t.version=e.version),t}var Lc=M({node:null,sourceCardId:null});function Rc(){return Lc.node}function zc(){return Lc.sourceCardId}function Bc(e,t=null){if(!e){Lc.node=null,Lc.sourceCardId=null;return}Lc.node=JSON.parse(JSON.stringify(e,(e,t)=>e===`_schemaNode`?void 0:t)),Lc.sourceCardId=t||null}function Vc(e,t=new Set){if(!e||typeof e!=`object`)return[...t];if(typeof e.className==`string`&&e.className&&t.add(e.className),Array.isArray(e.slots)){for(let n of e.slots)if(n&&Array.isArray(n.components))for(let e of n.components)Vc(e,t)}return[...t]}function Hc(e){if(!(!e||typeof e!=`object`)&&(e.componentId!=null&&e.className!=null&&(e.componentId=Ec(e.className)),Array.isArray(e.slots))){for(let t of e.slots)if(t&&Array.isArray(t.components))for(let e of t.components)Hc(e)}}var Uc=class{constructor(e,t){this.vm=e,this.styleProps=t||{}}get adapter(){return this.vm&&this.vm.adapter?this.vm.adapter:this.vm}parse(){let e=this.styleProps,t={};return this.parseRect(e.rect||{},t),this.parseFlex(e.flex||{},t),this.parseBackground(e.background||{},t),this.parsePadding(e.padding||{},t),this.parseMargin(e.margin||{},t),this.parseBorderRadius(e.borderRadius||{},t),this.parseBorder(e.border||{},t),this.parseShadow(e.shadow||{},t),this.parseTransform(e.transform||{},t),this.parseOther(e.other||{},t),t.boxSizing=`border-box`,t}parseFont(e={},t={}){return e.color&&(t.color=this.adapter.doColor(e.color)),e.fontSize&&(t.fontSize=this.adapter.doSize(e.fontSize,`font`)),e.lineHeight&&(t.lineHeight=this.adapter.doSize(e.lineHeight)),e.textAlign&&(t.textAlign=e.textAlign),e.fontWeight&&(t.fontWeight=e.fontWeight),e.fontStyle&&(t.fontStyle=e.fontStyle),e.textDecoration&&(t.textDecoration=e.textDecoration),e.isMaxLine==`1`&&(t.lineClamp=e.maxLine||`1`,t[`-webkit-line-clamp`]=e.maxLine||`1`),t}parseImage(e={},t={}){return e.cropMode==`01`?(t.backgroundSize=`contain`,t.aspectRatio=`1/1`):(t.backgroundSize=`cover`,t.aspectRatio=`16/9`),t}parseRect(e,t){t.width=this.adapter.doSize(e.width),t.height=this.adapter.doSize(e.height),t.maxWidth=this.adapter.doSize(e.maxWidth),t.maxHeight=this.adapter.doSize(e.maxHeight),t.minWidth=this.adapter.doSize(e.minWidth),t.minHeight=this.adapter.doSize(e.minHeight)}parseFlex(e,t){e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.flexShrink&&(t.flexShrink=e.flexShrink),e.gap&&(t.gap=this.adapter.doSize(e.gap))}parseBackground(e,t){if(e.backgroundType==`01`&&e.backgroundColor)t.backgroundColor=this.adapter.doColor(e.backgroundColor);else if(e.backgroundType==`02`&&e.backgroundImage){if(t.backgroundImage=`url("${this.adapter.doReplaceUrl(this.adapter.doI18n(e.backgroundImage))}")`,e.backgroundPosition){let n=e.backgroundPosition.split(/[ ]+/);t.backgroundPosition=`${this.adapter.doSize(n[0]||``)} ${this.adapter.doSize(n[1]||``)}`}else t.backgroundPosition=`50% 50%`;if(e.backgroundSize){let n=e.backgroundSize.split(/[ ]+/);t.backgroundSize=n.length>=2?`${this.adapter.doSize(n[0]||``)} ${this.adapter.doSize(n[1]||``)}`:e.backgroundSize}else t.backgroundSize=`cover`;t.backgroundRepeat=e.backgroundRepeat||`no-repeat`}else e.backgroundType==`03`&&e.backgroundGradient&&(t.backgroundImage=e.backgroundGradient)}parsePadding(e,t){e.paddingType==`0`?t.padding=this.adapter.doSize(e.padding):e.paddingType==`1`&&(t.paddingLeft=this.adapter.doSize(e.paddingLeft),t.paddingTop=this.adapter.doSize(e.paddingTop),t.paddingRight=this.adapter.doSize(e.paddingRight),t.paddingBottom=this.adapter.doSize(e.paddingBottom))}parseMargin(e,t){e.marginType==`0`?t.margin=this.adapter.doSize(e.margin):e.marginType==`1`&&(t.marginLeft=this.adapter.doSize(e.marginLeft),t.marginTop=this.adapter.doSize(e.marginTop),t.marginRight=this.adapter.doSize(e.marginRight),t.marginBottom=this.adapter.doSize(e.marginBottom))}parseBorderRadius(e,t){e.borderRadiusType==`0`?t.borderRadius=this.adapter.doSize(e.borderRadius):e.borderRadiusType==`1`&&(t.borderTopLeftRadius=this.adapter.doSize(e.borderTopLeftRadius),t.borderTopRightRadius=this.adapter.doSize(e.borderTopRightRadius),t.borderBottomRightRadius=this.adapter.doSize(e.borderBottomRightRadius),t.borderBottomLeftRadius=this.adapter.doSize(e.borderBottomLeftRadius))}parseBorder(e,t){e.isBorder==`1`&&(t.borderWidth=this.adapter.doSize(e.borderWidth||`1`),t.borderStyle=e.borderStyle||`solid`,t.borderColor=this.adapter.doColor(e.borderColor||`#e7e7ee`))}parseShadow(e,t){if(e.isShadow==`1`){let n=[];n.push(this.adapter.doSize(e.shadowX||`0`)),n.push(this.adapter.doSize(e.shadowY||`0`)),e.shadowBlur&&n.push(this.adapter.doSize(e.shadowBlur)),e.shadowSpread&&n.push(this.adapter.doSize(e.shadowSpread)),n.push(this.adapter.doColor(e.shadowColor||`#e7e7ee`)),t.boxShadow=n.join(` `)}}parseTransform(e,t){let n=[];e.rotate&&n.push(`rotate(${e.rotate}deg)`),n.length&&(t.transform=n.join(` `))}parseOther(e,t){t.overflow=e.overflow?e.overflow:`hidden`,e.opacity&&(t.opacity=`${Number(e.opacity)/100}`)}},X={inject:[`adapter`],methods:{doI18n(e){return this.adapter.doI18n(e)}}},Z=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Wc={name:`CeRoot`,emits:[`onReady`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})}},computed:{styleObj(){let e=new Uc(this,this.styleProps).parse();return Object.assign({fontSize:this.adapter.doSize(14,`font`)},e)}},mounted(){this.$emit(`onReady`,{})}};function Gc(e,t,n,r,i,a){return z(),B(`div`,{ref:`root`,class:`ce_root`,style:O(a.styleObj)},[Xr(e.$slots,`default`)],4)}var Kc=Z(Wc,[[`render`,Gc]]),qc={name:`CeRow`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()}}};function Jc(e,t,n,r,i,a){return z(),B(`div`,{ref:`row`,class:`ce_row`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[Xr(e.$slots,`default`)],4)}var Yc=Z(qc,[[`render`,Jc]]),Xc={name:`CeColumn`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()}}};function Zc(e,t,n,r,i,a){return z(),B(`div`,{ref:`column`,class:`ce_column`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[Xr(e.$slots,`default`)],4)}var Qc=Z(Xc,[[`render`,Zc]]),$c={name:`CeText`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:``}},computed:{styleObj(){let e=new Uc(this,this.styleProps),t=e.parse();return e.parseFont(this.styleProps.font||{},t),t}}};function el(e,t,n,r,i,a){return z(),B(`span`,{class:`ce_text`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},A(e.doI18n(n.value)),5)}var tl=Z($c,[[`render`,el]]),nl={name:`CeButton`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:``},disabled:{type:[Boolean,String,Number],default:!1}},computed:{styleObj(){let e=new Uc(this,this.styleProps),t=e.parse();return e.parseFont(this.styleProps.font||{},t),t}}};function rl(e,t,n,r,i,a){return z(),B(`button`,{class:k([`ce_button`,{ce_button_disabled:n.disabled}]),style:O(a.styleObj),onClick:t[0]||=t=>!n.disabled&&e.$emit(`click`,t)},A(e.doI18n(n.value)),7)}var il=Z(nl,[[`render`,rl]]),al={name:`CeDivider`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()}}};function ol(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_divider`,style:O(a.styleObj)},null,4)}var sl=Z(al,[[`render`,ol]]),cl=`/assets/svg-symbols-B2exBrAr.svg`,ll=`/assets/default-image-wzZYQ86K.png`,ul=cl,dl=ll,fl={name:`SvgSymbols`,props:{icon:{type:String,default:``},color:{type:String,default:``}},data(){return{symbols:ul}},computed:{href(){return`${this.symbols}#${this.icon}`}}},pl=[`fill`],ml=[`xlink:href`,`fill`];function hl(e,t,n,r,i,a){return z(),B(`svg`,{class:`ce_svgsymbols`,fill:n.color},[H(`use`,{"xlink:href":a.href,fill:n.color},null,8,ml)],8,pl)}var gl=Z(fl,[[`render`,hl]]),_l={name:`SvgCode`,props:{content:{type:String,default:``},color:{type:String,default:``}},computed:{svgStyle(){return{fill:this.color}}}},vl=[`innerHTML`];function yl(e,t,n,r,i,a){return z(),B(`span`,{class:`ce_svgcode`,style:O(a.svgStyle),innerHTML:n.content},null,12,vl)}var bl={name:`CeIcon`,emits:[`click`],mixins:[X],components:{SvgSymbols:gl,SvgCode:Z(_l,[[`render`,yl]])},props:{styleProps:{type:Object,default:()=>({})},icon:{type:String,default:``},color:{type:String,default:``},content:{type:String,default:``}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()}}};function xl(e,t,n,r,i,a){let o=I(`svg-code`),s=I(`svg-symbols`);return z(),B(`span`,{class:`ce_icon`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[n.content&&n.content.trim()?(z(),V(o,{key:0,color:n.color,content:n.content},null,8,[`color`,`content`])):(z(),V(s,{key:1,color:n.color,icon:n.icon},null,8,[`color`,`icon`]))],4)}var Sl=Z(bl,[[`render`,xl]]),Cl={name:`CeImage`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:``}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()},fillStyleObj(){let e={};return new Uc(this,this.styleProps).parseImage(this.styleProps.image||{},e),e.backgroundImage=`url(${this.adapter.doReplaceUrl(this.doI18n(this.value||dl))})`,e}}};function wl(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_image`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[H(`div`,{class:`ce_image_fill`,style:O(a.fillStyleObj)},null,4)],4)}var Tl=Z(Cl,[[`render`,wl]]),El={name:`CeMultiText`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},textList:{type:Array,default:()=>[]}},computed:{styleObj(){let e=new Uc(this,this.styleProps),t=e.parse();return e.parseFont(this.styleProps.font||{},t),t}},methods:{doClick(e,t,n){e.__do__||(e.__do__=!0,this.$emit(`click`,{data:{index:n,tag:t?t.tag:``,text:t?t.value:``}}))},parseFont(e){let t={};return new Uc(this,{}).parseFont(e||{},t),e&&e.backgroundColor&&(t.backgroundColor=this.adapter.doColor(e.backgroundColor)),t}}},Dl={class:`ce_multitext_item`},Ol=[`onClick`];function kl(e,t,n,r,i,a){return z(),B(`span`,{class:`ce_multitext`,style:O(a.styleObj),onClick:t[0]||=e=>a.doClick(e)},[H(`span`,Dl,[(z(!0),B(R,null,L(n.textList,(t,n)=>(z(),B(`span`,{key:n,style:O(a.parseFont(t)),onClick:e=>a.doClick(e,t,n)},A(e.doI18n(t.value)),13,Ol))),128))])],4)}var Al=Z(El,[[`render`,kl]]),jl={name:`CeListLayout`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:Array,default:()=>[]},direction:{type:String,default:`vertical`},rowSpacing:{type:[String,Number],default:``},edgeInsets:{type:String,default:``}},computed:{itemStyleObj(){let e=this.direction===`horizontal`;return{marginLeft:e?this.adapter.doSize(this.rowSpacing):0,marginTop:e?0:this.adapter.doSize(this.rowSpacing)}},conClasses(){return{ce_listlayout_horizontal:this.direction===`horizontal`}},conStyleObj(){let e={};if(this.edgeInsets){let t=this.parsePadding(this.edgeInsets);e.paddingLeft=this.adapter.doSize(t[1]),e.paddingTop=this.adapter.doSize(t[0]),e.paddingRight=this.adapter.doSize(t[3]),e.paddingBottom=this.adapter.doSize(t[2])}return e},rootStyle(){return new Uc(this,this.styleProps).parse()}},methods:{parsePadding(e){return String(e).replace(/[{}]/g,``).split(`,`)}}};function Ml(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_listlayout`,style:O(a.rootStyle),onClick:t[0]||=t=>e.$emit(`click`,t)},[H(`div`,{class:k([`ce_listlayout_con`,a.conClasses]),style:O(a.conStyleObj)},[(z(!0),B(R,null,L(n.value||[],(t,n)=>(z(),B(`div`,{key:n,class:`ce_listlayout_item`,style:O(n===0?{}:a.itemStyleObj)},[Xr(e.$slots,`default`,{item:t,index:n})],4))),128))],6)],4)}var Nl=Z(jl,[[`render`,Ml]]),Pl={name:`CeGridLayout`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:Array,default:()=>[]},column:{type:[Number,String],default:2},rowSpacing:{type:[String,Number],default:``},itemSpacing:{type:[String,Number],default:``},edgeInsets:{type:String,default:``}},computed:{styleObj(){let e=new Uc(this,this.styleProps).parse();if(this.rowSpacing&&(e.rowGap=this.adapter.doSize(this.rowSpacing)),this.edgeInsets){let t=this.parsePadding(this.edgeInsets);e.paddingLeft=this.adapter.doSize(t[1]),e.paddingTop=this.adapter.doSize(t[0]),e.paddingRight=this.adapter.doSize(t[3]),e.paddingBottom=this.adapter.doSize(t[2])}return e}},methods:{getItemStyle(e){let t=Number(this.column),n=100/t+`%`,r=0,i=0;return t>1&&(this.itemSpacing&&(i=this.adapter.doSize(this.itemSpacing),r=this.adapter.doSize((t-1)*Number(this.itemSpacing)/t)),n=`calc(${n} - ${r})`,e%t===t-1&&(i=0)),{width:n,marginRight:i}},parsePadding(e){return String(e).replace(/[{}]/g,``).split(`,`)}}};function Fl(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_gridlayout`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[(z(!0),B(R,null,L(n.value||[],(t,n)=>(z(),B(`div`,{key:n,class:`ce_gridlayout_item`,style:O(a.getItemStyle(n))},[Xr(e.$slots,`default`,{item:t,index:n})],4))),128))],4)}var Il=Z(Pl,[[`render`,Fl]]);function Ll(e){return t=>({get:()=>t[e],set:n=>{t[e]=n}})}function Rl(e){return t=>({get:()=>t[e].bind(t)})}function zl(e,t=[]){return(n,r)=>({get:()=>(...i)=>(t.forEach(e=>{i[e]=Number(i[e])*r}),n[e](...i))})}var Bl={textAlign:Ll(`textAlign`),textBaseline:Ll(`textBaseline`),fillStyle:Ll(`fillStyle`),strokeStyle:Ll(`strokeStyle`),lineCap:Ll(`lineCap`),imageSmoothingEnabled:Ll(`imageSmoothingEnabled`),imageSmoothingQuality:Ll(`imageSmoothingQuality`),lineWidth:(e,t)=>({get:()=>e.lineWidth,set:n=>{e.lineWidth=n*t}}),font:(e,t,n)=>({get:()=>e.font,set:r=>{e.font=String(r).replace(/([0-9.]+)px/,(e,r)=>Number(r)*t*Number(n||1)+`px`)}}),fillText:(e,t,n,r)=>({get:()=>(...n)=>(n[0]=n[0]?r.adapter.doI18n(n[0]):n[0],[1,2].forEach(e=>{n[e]=Number(n[e])*t}),e.fillText(...n))}),fillRect:zl(`fillRect`,[0,1,2,3]),moveTo:zl(`moveTo`,[0,1]),lineTo:zl(`lineTo`,[0,1]),arc:zl(`arc`,[0,1,2]),clearRect:zl(`clearRect`,[0,1,2,3]),createLinearGradient:zl(`createLinearGradient`,[0,1,2,3]),createRadialGradient:zl(`createRadialGradient`,[0,1,2,3,4,5]),beginPath:Rl(`beginPath`),closePath:Rl(`closePath`),fill:Rl(`fill`),stroke:Rl(`stroke`),measureText:(e,t)=>({get:()=>(...n)=>{let r=e.font;e.font=r.replace(/([0-9.]+)px/,(e,n)=>Number(n)/t+`px`);let i=e.measureText(...n);return e.font=r,i}}),setLineDash:e=>({get:()=>e.setLineDash.bind(e),set:t=>e.setLineDash(t)})};function Vl(e,t){function n(n,r){Object.keys(Bl).forEach(i=>{Object.defineProperty(this,i,Bl[i](e,n,r,t))})}return n.prototype=e,n}function Hl(e,t){return function(n,r,i){this.width=n.width/r,this.height=n.height/r,this.style=e.style,this.getContext=function(...n){return new(Vl(e.getContext(...n),t))(r,i)}}}var Ul={name:`CeCanvas`,emits:[`onMeasured`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})}},computed:{styleObj(){return new Uc(this,this.styleProps).parse()}},created(){this.resizeEvt=typeof window<`u`&&`orientationchange`in window?`orientationchange`:`resize`},mounted(){this.$nextTick(()=>this.doPaint()),typeof window<`u`&&window.addEventListener(this.resizeEvt,this.doRepaint,!1)},unmounted(){typeof window<`u`&&window.removeEventListener(this.resizeEvt,this.doRepaint,!1)},methods:{doPaint(){let e=this.$refs.canvas;if(!e)return;let t=e.getBoundingClientRect(),{availableWidth:n,applyUnitRatio:r,fontRatio:i=1}=this.adapter.getSystemInfo(),a=n*r/this.adapter.getDesignInfo().styleWidth||1,o=e.getContext(`2d`),s=(typeof window<`u`?window.devicePixelRatio:1)||1;e.width=t.width*s,e.height=t.height*s,o.scale(s,s);let c=new(Hl(e,this))(t,a,i);this.$emit(`onMeasured`,{canvas:c,width:c.width,height:c.height})},doRepaint(){let e=this.$refs.canvas;e&&(e.getContext(`2d`).clearRect(0,0,e.width,e.height),this.doPaint())}}};function Wl(e,t,n,r,i,a){return z(),B(`canvas`,{ref:`canvas`,class:`ce_canvas`,style:O(a.styleObj)},null,4)}var Gl=Z(Ul,[[`render`,Wl]]),Kl={name:`CeInput`,emits:[`input`,`change`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:``},placeholder:{type:[String,Number],default:``},inputType:{type:String,default:``},maxLength:{type:[String,Number],default:``}},data(){return{typeMap:{text:`text`,number:`text`,email:`text`,password:`password`,phone:`text`},regexpMap:{number:/^-?([0-9]*|(0|[1-9][0-9]*)\.[0-9]{0,})?$/i,email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,phone:/^[0-9]{11}$/},inputValue:``,oldValue:``}},created(){this.inputValue=this.value,this.oldValue=this.inputValue},computed:{type(){return this.typeMap[this.inputType]},styleObj(){let e=new Uc(this,this.styleProps),t=e.parse();return e.parseFont(this.styleProps.font||{},t),Object.assign({padding:`${this.adapter.doSize(4)} ${this.adapter.doSize(8)}`},t)}},watch:{value(){this.inputValue=this.value,this.oldValue=this.inputValue}},methods:{doInput(e){let t=this.regexpMap[this.inputType];!t||t.test(e)?(this.$emit(`input`,e),this.inputValue=e):this.inputValue=this.oldValue}}},ql=[`type`,`placeholder`,`maxlength`,`value`];function Jl(e,t,n,r,i,a){return z(),B(`input`,{class:`ce_input`,style:O(a.styleObj),type:a.type,placeholder:e.doI18n(n.placeholder),maxlength:n.maxLength,value:i.inputValue,onInput:t[0]||=t=>e.$emit(`input`,t.target.value),onChange:t[1]||=t=>e.$emit(`change`)},null,44,ql)}var Yl=Z(Kl,[[`render`,Jl]]),Xl={name:`CeViewContainer`,emits:[`action`],mixins:[X],inject:[`adapter`,`customComponents`],props:{styleProps:{type:Object,default:()=>({})},customClass:{type:String,default:``},customProps:{type:Object,default:()=>({})},customRemarkImg:{type:String,default:``}},computed:{componentClass(){let e=this.customComponents;return e?this.customClass?e[this.customClass]||e.Placeholder||``:e.Placeholder||``:``},componentProps(){return this.customProps||{}},componentIcon(){return this.customRemarkImg||``},styleObj(){return new Uc(this,this.styleProps).parse()}}};function Zl(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_viewcontainer`,style:O(a.styleObj)},[a.componentClass?(z(),V(qr(a.componentClass),{key:0,icon:a.componentIcon,props:a.componentProps,"custom-class":n.customClass,onAction:t[0]||=t=>e.$emit(`action`,t)},null,40,[`icon`,`props`,`custom-class`])):G(``,!0)],4)}var Ql=Z(Xl,[[`render`,Zl]]),$l={TopLeft:{justifyContent:`flex-start`,alignItems:`flex-start`},TopCenter:{justifyContent:`flex-start`,alignItems:`center`},TopRight:{justifyContent:`flex-start`,alignItems:`flex-end`},CenterLeft:{justifyContent:`center`,alignItems:`flex-start`},Center:{justifyContent:`center`,alignItems:`center`},CenterRight:{justifyContent:`center`,alignItems:`flex-end`},BottomLeft:{justifyContent:`flex-end`,alignItems:`flex-start`},BottomCenter:{justifyContent:`flex-end`,alignItems:`center`},BottomRight:{justifyContent:`flex-end`,alignItems:`flex-end`}},eu={name:`CeAbsoluteLayout`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},align:{type:String,default:``}},computed:{styleObj(){let e=new Uc(this,this.styleProps).parse();return Object.assign(e,$l[this.align]||{})}}};function tu(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_absolutelayout`,style:O(a.styleObj)},[Xr(e.$slots,`default`)],4)}var nu=Z(eu,[[`render`,tu]]),ru={CheckGroupCircle:[`M512 65.983389c-245.919634 0-446.016611 200.095256-446.016611 446.016611 0 245.952318 200.064292 446.016611 446.016611 446.016611S958.016611 757.952318 958.016611 512C958.016611 266.080366 757.952318 65.983389 512 65.983389zM512 894.016611c-210.655557 0-382.016611-171.392017-382.016611-382.016611 0-210.655557 171.359333-382.016611 382.016611-382.016611 210.624593 0 382.016611 171.359333 382.016611 382.016611C894.016611 722.624593 722.624593 894.016611 512 894.016611z`,`M512 352.00086c-88.223841 0-160.00086 71.775299-160.00086 159.99914s71.775299 160.00086 160.00086 160.00086 160.00086-71.775299 160.00086-160.00086S600.223841 352.00086 512 352.00086z`],CheckGroupSquareEmpty:[`M833.008 928h-640c-52.944 0-96-43.072-96-96V192c0-52.928 43.056-96 96-96h640c52.912 0 96 43.072 96 96v640c0 52.928-43.072 96-96 96z m-640-768c-17.648 0-32 14.368-32 32v640c0 17.664 14.352 32 32 32h640a32 32 0 0 0 32-32V192c0-17.632-14.352-32-32-32h-640z`],CheckGroupSquareEmptyCheck:[`M727.984 393.184a31.968 31.968 0 0 0-45.248 0.256L449.44 629.248l-103.28-106.112a32 32 0 1 0-45.888 44.608l126.032 129.504c0.048 0.096 0.192 0.096 0.256 0.192 0.064 0.064 0.096 0.192 0.16 0.256 2.016 1.984 4.512 3.2 6.88 4.544 1.248 0.672 2.24 1.792 3.52 2.304a31.728 31.728 0 0 0 24.064 0.064c1.232-0.512 2.208-1.536 3.392-2.176 2.4-1.344 4.896-2.528 6.944-4.544 0.064-0.064 0.096-0.192 0.192-0.256 0.064-0.096 0.16-0.128 0.256-0.192l256.224-259.008a32 32 0 0 0-0.224-45.248zM832.992 928h-640c-52.928 0-96-43.072-96-96V192c0-52.928 43.072-96 96-96h640c52.928 0 96 43.072 96 96v640c0 52.928-43.056 96-96 96z m-640-768c-17.632 0-32 14.368-32 32v640c0 17.664 14.368 32 32 32h640a32 32 0 0 0 32-32V192c0-17.632-14.336-32-32-32h-640z`],CheckGroupSquare:[`M186 123c-33.137 0-60 26.863-60 60v655c0 33.137 26.863 60 60 60h655c33.137 0 60-26.863 60-60V183c0-33.137-26.863-60-60-60H186z m0-60h655c66.274 0 120 53.726 120 120v655c0 66.274-53.726 120-120 120H186c-66.274 0-120-53.726-120-120V183c0-66.274 53.726-120 120-120z`],CheckGroupSquareCheck:[`M840.6 97H185.4C137.1 97 98 136.1 98 184.4v655.3c0 48.3 39.1 87.4 87.4 87.4h655.3c48.3 0 87.4-39.1 87.4-87.4V184.4C928 136.1 888.9 97 840.6 97zM791 380.7L466.7 705.1c-17.1 17.1-44.7 17.1-61.8 0L235 535.2c-17.1-17.1-17.1-44.7 0-61.8 17.1-17.1 44.7-17.1 61.8 0l139 139L729.2 319c17.1-17.1 44.7-17.1 61.8 0 17.1 17 17.1 44.7 0 61.7z`]},iu={RadioButtonCircle:[`M512 65.983389c-245.919634 0-446.016611 200.095256-446.016611 446.016611 0 245.952318 200.064292 446.016611 446.016611 446.016611S958.016611 757.952318 958.016611 512C958.016611 266.080366 757.952318 65.983389 512 65.983389zM512 894.016611c-210.655557 0-382.016611-171.392017-382.016611-382.016611 0-210.655557 171.359333-382.016611 382.016611-382.016611 210.624593 0 382.016611 171.359333 382.016611 382.016611C894.016611 722.624593 722.624593 894.016611 512 894.016611z`,`M512 352.00086c-88.223841 0-160.00086 71.775299-160.00086 159.99914s71.775299 160.00086 160.00086 160.00086 160.00086-71.775299 160.00086-160.00086S600.223841 352.00086 512 352.00086z`],RadioButtonCircleEmpty:[`M512 938.666667C276.362667 938.666667 85.333333 747.637333 85.333333 512S276.362667 85.333333 512 85.333333s426.666667 191.029333 426.666667 426.666667-191.029333 426.666667-426.666667 426.666667z m0-64c200.298667 0 362.666667-162.368 362.666667-362.666667S712.298667 149.333333 512 149.333333 149.333333 311.701333 149.333333 512s162.368 362.666667 362.666667 362.666667z`],RadioButtonCircleEmptyCheck:[`M512 85.333333c235.637333 0 426.666667 191.029333 426.666667 426.666667S747.637333 938.666667 512 938.666667 85.333333 747.637333 85.333333 512 276.362667 85.333333 512 85.333333z m182.613333 297.354667a32 32 0 0 0-45.258666 0.032L458.922667 573.44l-84.341334-83.989333a32 32 0 0 0-45.162666 45.344l106.986666 106.549333a32 32 0 0 0 45.226667-0.064l213.013333-213.333333a32 32 0 0 0-0.032-45.258667z`]},au={name:`CeCheckGroup`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[Array,String,Number],default:()=>[]},dataList:{type:Array,default:()=>[]},selectColor:{type:String,default:`#0082ff`},unSelectColor:{type:String,default:`#333333`},buttonStyle:{type:String,default:`Circle`},maxSelectCount:{type:[String,Number],default:`0`},direction:{type:String,default:`horizontal`},itemPadding:{type:[String,Number],default:`4 10 4 10`},itemSpacing:{type:[String,Number],default:`4`},textSpacing:{type:[String,Number],default:`3`},fontSize:{type:[String,Number],default:`13`},iconSize:{type:[String,Number],default:`14`}},emits:[`change`,`selectChange`],computed:{rootStyle(){return{overflow:`hidden`,boxSizing:`border-box`}},checkedSet(){let e=this.value;return Array.isArray(e)?new Set(e.map(String)):e===``||e==null?new Set:new Set([String(e)])},limit(){let e=Number(this.maxSelectCount);return Number.isFinite(e)&&e>0?e:1/0}},methods:{isChecked(e){return this.checkedSet.has(String(e.key))},checkPaths(e){let t=this.isChecked(e);switch(this.buttonStyle){case`SquareEmpty`:return ru[t?`CheckGroupSquareEmptyCheck`:`CheckGroupSquareEmpty`];case`Square`:return ru[t?`CheckGroupSquareCheck`:`CheckGroupSquare`];case`Text`:return[];default:return ru.CheckGroupCircle}},itemStyle(e){let t=String(this.itemPadding).split(/\s+/),n=Number(this.itemSpacing)||0,r=e===this.dataList.length-1?0:n,i=e===this.dataList.length-1?0:n,a=(e,t)=>this.adapter.doSize(e[t]===void 0?e[0]||0:e[t]),o=t.length>=4?`${a(t,0)} ${a(t,1)} ${a(t,2)} ${a(t,3)}`:this.adapter.doSize(this.itemPadding);return this.direction===`vertical`?{padding:o,marginBottom:i}:{padding:o,marginRight:r}},toggle(e){let t=String(e.key),n=new Set(this.checkedSet);n.has(t)?n.delete(t):(n.size>=this.limit&&n.clear(),n.add(t));let r=[...n];this.$emit(`change`,r),this.$emit(`selectChange`,{value:r,item:e})}}},ou=[`onClick`],su={class:`ce_svgcheckstyle`,viewBox:`0 0 1024 1024`},cu=[`d`,`fill`],lu=[`title`];function uu(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_check_group`,style:O(a.rootStyle)},[H(`div`,{class:`ce_check_list`,style:O({flexDirection:n.direction===`vertical`?`column`:`row`})},[(z(!0),B(R,null,L(n.dataList,(e,t)=>(z(),B(`div`,{key:e.key,class:`ce_check_item`,style:O(a.itemStyle(t)),onClick:t=>a.toggle(e)},[n.buttonStyle===`Text`?G(``,!0):(z(),B(`div`,{key:0,class:`ce_check_icon`,style:O({width:n.iconSize+`px`,height:n.iconSize+`px`,marginRight:n.textSpacing+`px`})},[(z(),B(`svg`,su,[(z(!0),B(R,null,L(a.checkPaths(e),(t,r)=>(z(),B(`path`,{key:r,d:t,fill:a.isChecked(e)?n.selectColor:n.unSelectColor},null,8,cu))),128))]))],4)),H(`span`,{class:`ce_check_text`,title:e.desc,style:O({color:a.isChecked(e)?n.selectColor:n.unSelectColor,fontSize:n.fontSize+`px`})},A(e.desc),13,lu)],12,ou))),128))],4)],4)}var du=Z(au,[[`render`,uu]]),fu={name:`CeRadioButton`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:``},selectColor:{type:String,default:`#0082ff`},unSelectColor:{type:String,default:`#333333`},buttonStyle:{type:String,default:`Circle`},textSpacing:{type:[String,Number],default:`3`},fontSize:{type:[String,Number],default:`14`},iconSize:{type:[String,Number],default:`14`},showText:{type:[String,Number],default:`1`},text:{type:[String,Number],default:``}},emits:[`change`,`selectChange`],computed:{rootStyle(){return{overflow:`hidden`,boxSizing:`border-box`}},selected(){let e=this.value;return e!==``&&e!=null&&e!==!1&&e!==`0`},color(){return this.selected?this.selectColor:this.unSelectColor},radioPaths(){return this.selected&&this.buttonStyle===`CircleEmpty`?iu.RadioButtonCircleEmptyCheck:this.buttonStyle===`CircleEmpty`?iu.RadioButtonCircleEmpty:iu.RadioButtonCircle}},methods:{toggle(){let e=this.selected?``:this.value||`1`;this.$emit(`change`,e),this.$emit(`selectChange`,!!e)}}},pu=[`d`];function mu(e,t,n,r,i,a){return z(),B(`span`,{class:`ce_radio_button`,style:O(a.rootStyle)},[H(`div`,{class:`ce_radio_item`,onClick:t[0]||=(...e)=>a.toggle&&a.toggle(...e)},[n.buttonStyle===`Text`?G(``,!0):(z(),B(`span`,{key:0,class:`ce_radio_icon`,style:O({width:n.iconSize+`px`,height:n.iconSize+`px`,marginRight:n.textSpacing+`px`})},[(z(),B(`svg`,{class:`ce_svgradiostyle`,viewBox:`0 0 1024 1024`,style:O({fill:a.color,stroke:a.color})},[(z(!0),B(R,null,L(a.radioPaths,(e,t)=>(z(),B(`path`,{key:t,d:e},null,8,pu))),128))],4))],4)),n.showText===`1`||n.showText===1?(z(),B(`span`,{key:1,style:O({color:a.color,fontSize:n.fontSize+`px`})},A(e.doI18n(n.text)),5)):G(``,!0)])],4)}var hu=Z(fu,[[`render`,mu]]),gu={name:`CeProgressSlider`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},value:{type:[String,Number],default:0},minProgress:{type:[String,Number],default:0},maxProgress:{type:[String,Number],default:100},step:{type:[String,Number],default:1},backgroundColor:{type:String,default:`#e6e6e6`},foregroundColor:{type:String,default:`#0a59f5`},processHeight:{type:[String,Number],default:5},blockStyle:{type:String,default:`circle`},blockColor:{type:String,default:`#ffffff`},blockImage:{type:String,default:``},blockWidth:{type:[String,Number],default:15},blockHeight:{type:[String,Number],default:15}},emits:[`change`,`selectChange`],data(){return{dragging:!1}},computed:{rootStyle(){return{height:`auto`,boxSizing:`border-box`}},min(){let e=Number(this.minProgress);return Number.isFinite(e)?e:0},max(){let e=Number(this.maxProgress);return Number.isFinite(e)?e:100},stepVal(){let e=Number(this.step);return e>0?e:1},numValue(){let e=Number(this.value);return Number.isFinite(e)?e:this.min},percent(){let e=this.max-this.min||1,t=(this.numValue-this.min)/e*100;return Math.max(0,Math.min(100,t))},conLeft(){let e=Number(this.blockWidth)||15;return`calc(${e/2}px + (100% - ${e}px) * ${this.percent} / 100)`},rectStyle(){let e=Number(this.processHeight)||5;return{backgroundColor:this.adapter.doColor(this.backgroundColor),height:this.adapter.doSize(e),borderRadius:this.adapter.doSize(e),marginTop:this.adapter.doSize(8),marginBottom:this.adapter.doSize(8)}},barStyle(){let e=Number(this.processHeight)||5,t=Number(this.blockWidth)||15;return{backgroundColor:this.adapter.doColor(this.foregroundColor),left:this.adapter.doSize(t/2),width:`calc((100% - ${t}px) * ${this.percent} / 100)`,borderTopLeftRadius:this.adapter.doSize(e),borderBottomLeftRadius:this.adapter.doSize(e)}},blockStyleObj(){let e=Number(this.blockWidth)||15,t=Number(this.blockHeight)||15,n={width:this.adapter.doSize(e),height:this.adapter.doSize(t),boxShadow:`rgba(0,0,0,0.3) 0 0 3px 0`};return this.blockStyle===`image`&&this.blockImage?(n.backgroundImage=`url(${this.adapter.doReplaceUrl(this.doI18n(this.blockImage))})`,n.borderRadius=`0`):this.blockStyle===`circle`?(n.backgroundColor=this.adapter.doColor(this.blockColor),n.borderRadius=this.adapter.doSize(Math.min(e,t)/2)):(n.backgroundColor=this.adapter.doColor(this.blockColor),n.borderRadius=this.adapter.doSize(2)),n}},methods:{clampStep(e){let t=Math.max(this.min,Math.min(this.max,e)),n=Math.round((t-this.min)/this.stepVal)*this.stepVal+this.min;return Math.max(this.min,Math.min(this.max,n))},valueFromEvent(e){let t=this.$refs.rect;if(!t)return this.numValue;let n=t.getBoundingClientRect(),r=(e.clientX-n.left)/n.width;return this.clampStep(this.min+r*(this.max-this.min))},onDown(e){this.dragging=!0,this.setValue(this.valueFromEvent(e)),window.addEventListener(`pointermove`,this.onMove),window.addEventListener(`pointerup`,this.onUp)},onMove(e){this.dragging&&this.setValue(this.valueFromEvent(e))},onUp(){this.dragging=!1,window.removeEventListener(`pointermove`,this.onMove),window.removeEventListener(`pointerup`,this.onUp)},setValue(e){this.$emit(`change`,e),this.$emit(`selectChange`,e)}},beforeUnmount(){this.onUp()}};function _u(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_slider`,style:O(a.rootStyle)},[H(`div`,{ref:`rect`,class:`ce_slider_rect`,style:O(a.rectStyle),onPointerdown:t[0]||=(...e)=>a.onDown&&a.onDown(...e)},[H(`div`,{class:`ce_slider_bar`,style:O(a.barStyle)},null,4),H(`div`,{class:`ce_slider_con`,style:O({left:a.conLeft})},[H(`div`,{class:k([`ce_slider_block`,{ce_dragging:i.dragging}]),style:O(a.blockStyleObj)},null,6)],4)],36)],4)}var vu=Z(gu,[[`render`,_u]]),yu={name:`CeVideo`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},url:{type:String,default:``},previewUrl:{type:String,default:``}},emits:[`click`],data(){return{showPoster:!0}},computed:{rootStyle(){let e=new Uc(this,this.styleProps).parse();return Object.assign(e,{overflow:`hidden`,boxSizing:`border-box`})},src(){return this.adapter.doReplaceUrl(this.doI18n(this.url||``))},poster(){return this.adapter.doReplaceUrl(this.doI18n(this.previewUrl||``))}},methods:{play(){this.showPoster=!1;let e=this.$refs.video;if(e)try{e.play()}catch{}this.$emit(`click`)}}},bu=[`src`,`poster`];function xu(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_video`,style:O(a.rootStyle)},[H(`video`,{ref:`video`,class:`ce_video_elem ce_npc`,src:a.src,poster:a.poster,controls:``,playsinline:``,"webkit-playsinline":``},null,8,bu),a.poster&&i.showPoster?(z(),B(`div`,{key:0,class:`ce_video_poster ce_npc`,style:O({backgroundImage:`url(${a.poster})`,backgroundSize:`cover`,backgroundPosition:`center`}),onClick:t[0]||=(...e)=>a.play&&a.play(...e)},null,4)):G(``,!0)],4)}var Su=Z(yu,[[`render`,xu]]),Cu={name:`CeMap`,mixins:[X],props:{styleProps:{type:Object,default:()=>({})},centerLat:{type:[String,Number],default:``},centerLng:{type:[String,Number],default:``},zoom:{type:[String,Number],default:``},markerLat:{type:[String,Number],default:``},markerLng:{type:[String,Number],default:``},markerName:{type:String,default:``}},emits:[`click`],computed:{rootStyle(){let e=new Uc(this,this.styleProps).parse();return e.overflow=`hidden`,e}}},wu={class:`ce_map_view`},Tu={class:`ce_map_center`},Eu={key:0,class:`ce_map_markname`};function Du(e,t,n,r,i,a){return z(),B(`div`,{class:`ce_map`,style:O(a.rootStyle)},[H(`div`,wu,[t[1]||=Da(`<svg class="ce_map_grid" viewBox="0 0 100 100" preserveAspectRatio="none" data-v-b297e8af><defs data-v-b297e8af><pattern id="ceMapGrid" width="10" height="10" patternUnits="userSpaceOnUse" data-v-b297e8af><path d="M10 0 L0 0 0 10" fill="none" stroke="#dfe3ea" stroke-width="0.4" data-v-b297e8af></path></pattern></defs><rect width="100" height="100" fill="#eef1f6" data-v-b297e8af></rect><rect width="100" height="100" fill="url(#ceMapGrid)" data-v-b297e8af></rect><path d="M0 60 Q40 50 100 65" fill="none" stroke="#cdd4df" stroke-width="2.2" data-v-b297e8af></path><path d="M30 0 L45 100" fill="none" stroke="#cdd4df" stroke-width="2.2" data-v-b297e8af></path></svg>`,1),H(`div`,Tu,[t[0]||=H(`div`,{class:`ce_map_pin`},[H(`svg`,{viewBox:`0 0 24 24`,width:`26`,height:`26`},[H(`path`,{d:`M12 2C7.6 2 4 5.6 4 10c0 5.4 7.1 11.6 7.4 11.9.6.6 1.6.6 2.2 0C13.9 21.6 21 15.4 21 10c0-4.4-3.6-8-9-8z`,fill:`#ff4d4f`}),H(`circle`,{cx:`12`,cy:`10`,r:`3`,fill:`#fff`})])],-1),n.markerName?(z(),B(`div`,Eu,A(e.doI18n(n.markerName)),1)):G(``,!0)])]),t[2]||=H(`div`,{class:`ce_map_placeholder`},null,-1)],4)}var Ou=Z(Cu,[[`render`,Du],[`__scopeId`,`data-v-b297e8af`]]),ku={name:`CeMultiColumn`,emits:[`click`],mixins:[X],props:{styleProps:{type:Object,default:()=>({})},column:{type:[Number,String],default:2}},computed:{styleObj(){let e=new Uc(this,this.styleProps).parse(),t=parseInt(this.column,10);return t&&t>1&&(e.display=`grid`,e.gridTemplateColumns=`repeat(${t}, 1fr)`),e}}};function Au(e,t,n,r,i,a){return z(),B(`div`,{ref:`mc`,class:`ce_multicolumn`,style:O(a.styleObj),onClick:t[0]||=t=>e.$emit(`click`,t)},[Xr(e.$slots,`default`,{},void 0,!0)],4)}var ju={Root:Kc,Row:Yc,Column:Qc,Text:tl,Button:il,Divider:sl,Icon:Sl,Image:Tl,MultiText:Al,ListLayout:Nl,GridLayout:Il,Canvas:Gl,Input:Yl,ViewContainer:Ql,AbsoluteLayout:nu,CheckGroup:du,RadioButton:hu,ProgressSlider:vu,Video:Su,Map:Ou,MultiColumn:Z(ku,[[`render`,Au],[`__scopeId`,`data-v-cc3a8cee`]])},Mu=new Set([`ListLayout`,`GridLayout`]);function Nu(e){return ju[e]||null}function Pu(e){let t={},n=e||{};for(let e in n)e===`$$`?t[e]=n[e]:t[`$`+e]=n[e];return t}function Fu(e,t){let n=Pu(t),r=new Proxy(n,{has(e,t){return typeof t==`string`&&(t[0]===`$`||t===`$$`)||t in e},get(e,t){if(t in e||typeof t!=`string`||t[0]!==`$`&&t!==`$$`)return e[t]}});return Function(`vars`,`\n\t\twith(vars){\n\t\t\treturn (${e})\n\t\t}\n\t`)(r)}function Iu(e,t,n){let r=String(t).split(`.`),i=r.pop(),a=e;for(let e=0;e<r.length;e++)a=a[r[e]];a[i]=n}function Lu(e={},t={},n){let r=JSON.parse(JSON.stringify(e||{})),i=e&&e.__vars__;if(i)for(let e in i)try{Iu(r,e,Fu(i[e],t))}catch(t){n&&n.push({kind:`bind`,msg:`${e} <- ${i[e]}: ${t&&t.message}`,path:e,expr:i[e]})}return delete r.__vars__,r}function Ru(e,t,n){return Object.assign({},e,typeof t==`object`&&t||{},{$$:t,_index:n})}function zu(e,t){return new Proxy({},{get(n,r){return r in t?t[r]:e[r]},has(n,r){return r in t||r in e},ownKeys(){let n=new Set;for(let e of Object.keys(t))n.add(e);for(let t of Object.keys(e))n.add(t);return[...n]},getOwnPropertyDescriptor(n,r){if(r in t)return{enumerable:!0,configurable:!0,value:t[r]};if(r in e)return{enumerable:!0,configurable:!0,value:e[r]}}})}var Bu={name:`CustomPlaceholder`,props:{icon:{type:String,default:``},props:{type:Object,default:()=>({})},customClass:{type:String,default:``},title:{type:String,default:``}},computed:{tagText(){return this.title||`自定义组件`},label(){if(this.customClass)return this.customClass;let e=Object.keys(this.props||{});return e.length?e.join(`, `):`未指定 customClass`}}},Vu={class:`ce_custom_placeholder`},Hu={class:`ce_custom_placeholder_tag`},Uu={class:`ce_custom_placeholder_name`};function Wu(e,t,n,r,i,a){return z(),B(`div`,Vu,[H(`span`,Hu,A(a.tagText),1),H(`span`,Uu,A(a.label),1),Xr(e.$slots,`default`)])}var Gu=Z(Bu,[[`render`,Wu]]),Ku=M({el:null,id:null,visible:!1,top:0,left:0,width:0,height:0});function qu(e,t){Ku.id!==t&&(Ku.el=e,Ku.id=t,Ku.visible=!0)}function Ju(e){Ku.id===e&&(Ku.el=null,Ku.id=null,Ku.visible=!1)}var Yu=new Set([``,`onReady`,`onLoad`,`onCreate`]);function Xu(e){return Yu.has(e||``)}function Zu(e){let t=String(e).replace(/-(\w)/g,(e,t)=>t.toUpperCase());return`on`+t.charAt(0).toUpperCase()+t.slice(1)}function Qu(e){return typeof window<`u`&&window.CSS&&CSS.escape?CSS.escape(String(e)):String(e).replace(/["\\\]]/g,`\\$&`)}var $u={name:`RenderTree`,inject:[`adapter`,`cardRuntime`],props:{node:{type:Object,required:!0},scope:{type:Object,default:()=>({})},selectedNodeId:{type:String,default:``}},methods:{getChildNodes(e){let t=e.slots||[];return t.length&&t[0].components&&t[0].components.length?t[0].components:e.components||[]},actionCode(e){let t=e.action&&e.action.properties&&e.action.properties.function||{};return t.code||t.compiled||``},isVisible(e,t){let n=this.cardRuntime,r=e.directives&&e.directives[`v-show`];if(!r)return!0;let i=r.showType||`00`;if(i===`00`)return!0;let a=(r.condition||{}).expression;if(!a)return i===`01`;try{let e=Fu(a,t);return i===`01`?!!e:!e}catch(t){return n.pushError(`vshow`,`${e.className}: [${a}] -> ${t.message}`),i===`01`}},buildHandlers(e,t){this.cardRuntime;let n={};return(e.eventactions||[]).forEach(r=>{let i=(r.event||{}).eventKey||``;if(Xu(i))return;let a=r.action||{},o=a.actionType;if(o===`customAction`){let a=this.actionCode(r);n[i]=n=>this.runCustomAction(a,t,n,e)}else n[i]=n=>this.runSystemAction(o,a.properties,t,n,e)}),n},runCustomAction(e,t,n,r){let i=this.cardRuntime,a={state:new Proxy(t,{set(e,t,n){return i.state[t]=n,!0}}),data:i.state,setData(e){e&&typeof e==`object`&&Object.assign(i.state,e),i.markDirty()},setRootData(e){e&&typeof e==`object`&&Object.assign(i.rootScope,e),i.markDirty()},addEventListener(e,t){i.addEventListener(e,t)},postMessage(e,t){i.postMessage(e,t)}},o={log:(...e)=>{console.log(...e),i.pushLog(`log`,e)},info:(...e)=>{console.info(...e),i.pushLog(`info`,e)},warn:(...e)=>{console.warn(...e),i.pushLog(`warn`,e)},error:(...e)=>{console.error(...e),i.pushLog(`error`,e)},debug:(...e)=>{console.debug(...e),i.pushLog(`debug`,e)}};try{Function(`event`,`console`,e||``).apply(a,[n,o])}catch(e){let t=r&&r.id?`${r.className}(${r.id})`:r.className;i.pushError(`customAction`,`${t}: ${e.message}`),console.error(`[customAction error]`,t,e)}},runSystemAction(e,t,n,r,i){let a=this.cardRuntime,o=typeof window<`u`?window.ynet:null;!o&&typeof window<`u`&&(o=window.ynet={callJSAPI(e,t,n){if(a.pushApiCall(e,t),typeof n==`function`)try{n({})}catch{}}});let s=t||{};e===`closeAlertCard`?o.callJSAPI(`closeAlertCard`,s,s&&s.callback):e===`sendAiChatMessage`?o.callJSAPI(`sendAiChatMessage`,{message:s&&s.message||``},void 0):o.callJSAPI(e,s,void 0),a.pushApiCall(e,s)},runLoadActions(){let e=this.cardRuntime,t=this.node;t.__loadRan||(t.__loadRan=!0,(t.eventactions||[]).forEach(n=>{if(!Xu((n.event||{}).eventKey||``)||(n.action||{}).actionType!==`customAction`)return;let r=this.actionCode(n);r&&this.runCustomAction(r,zu(e.state,this.scope),void 0,t)}))},renderNode(e){if(e.visible===!1)return null;let t=this.cardRuntime,n=zu(t.state,this.scope);if(!this.isVisible(e,n))return null;let r=Nu(e.className);if(!r){let t=this.getChildNodes(e).map(e=>this.renderSub(e,n));return K(Gu,{customClass:e.className,title:`未知组件`},()=>t)}let i=Lu(e.properties||{},n,t.getBindingBuffer()),a=Lu(e.style&&e.style.properties||{},n,t.getBindingBuffer()),o=Object.assign({},i,{styleProps:a});o[`data-cid`]=e.componentId||e.id,o[`data-class`]=e.className,o[`data-id`]=e.id;let s=this.buildHandlers(e,n);for(let e in s)o[Zu(e)]=s[e];if(e.className===`Input`&&!o.onInput){let n=(e.properties&&e.properties.__vars__||{}).value,r=/^\s*\$([A-Za-z_$][\w$]*)\s*$/.exec(String(n||``));if(r){let e=r[1];o.onInput=n=>{t.state[e]=n}}}if((e.className===`RadioButton`||e.className===`CheckGroup`)&&!o.onChange){let n=(e.properties&&e.properties.__vars__||{}).value,r=/^\s*\$([A-Za-z_$][\w$]*)\s*$/.exec(String(n||``));if(r){let e=r[1];o.onChange=n=>{t.state[e]=n,t.markDirty()}}}if(e.className===`ProgressSlider`){let n=(e.properties&&e.properties.__vars__||{}).value,r=/^\s*\$([A-Za-z_$][\w$]*)\s*$/.exec(String(n||``));if(r){let e=r[1],n=n=>{t.state[e]=n,t.markDirty()},i=o.onChange,a=o.onSelectChange;o.onChange=e=>{try{i&&i(e)}finally{n(e)}},o.onSelectChange=e=>{try{a&&a(e)}finally{n(e)}}}}let c=this.getChildNodes(e);return Mu.has(e.className)?K(r,o,{default:e=>{let t=Ru(n,e.item,e.index);return c.map(e=>this.renderSub(e,t))}}):K(r,o,()=>c.map(e=>this.renderSub(e,n)))},renderSub(e,t){return K($u,{node:e,scope:t,selectedNodeId:this.selectedNodeId})},updateHighlight(){let e=this.$el;if(!e||e.nodeType!==1)return;let t=this.node.id;if(this.selectedNodeId&&t===this.selectedNodeId){let n=typeof document<`u`?document.querySelector(`.phone__screen`):null;qu((n?n.querySelector(`[data-id="`+Qu(String(t))+`"]`):null)||e,t)}else Ju(t)}},render(){return this.cardRuntime.revision,this.node.className===`Root`&&this.cardRuntime.startBindingPass(),this.renderNode(this.node)},created(){this.runLoadActions()},mounted(){this.runLoadActions(),this.$nextTick(()=>this.updateHighlight()),this.node.className===`Root`&&this.cardRuntime.commitBindingPass()},updated(){this.node.className===`Root`&&this.cardRuntime.commitBindingPass()},watch:{selectedNodeId(){this.updateHighlight()}}};async function ed(e){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var td=M({visible:!1,message:``,type:`ok`}),nd=null;function Q(e,t=`ok`,n=2400){td.message=e,td.type=t,td.visible=!0,nd&&clearTimeout(nd),nd=setTimeout(()=>{td.visible=!1,nd=null},n)}var rd={name:`ConfirmDialog`,props:{visible:{type:Boolean,default:!1},title:{type:String,default:``},message:{type:String,default:``},confirmText:{type:String,default:`继续`},cancelText:{type:String,default:`取消`},severity:{type:String,default:`primary`,validator:e=>[`primary`,`warn`,`danger`].includes(e)}},emits:[`confirm`,`cancel`],computed:{confirmBtnClass(){return this.severity===`danger`?`confirm-modal__btn--danger`:this.severity===`warn`?`confirm-modal__btn--warn`:`confirm-modal__btn--primary`}}},id=[`aria-label`],ad={key:0,class:`confirm-modal__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},od={key:1,class:`confirm-modal__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},sd={key:2,class:`confirm-modal__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},cd={class:`confirm-modal__desc`},ld={class:`confirm-modal__actions`};function ud(e,t,n,r,i,a){return z(),V(_o,{name:`modal`},{default:P(()=>[n.visible?(z(),B(`div`,{key:0,class:`confirm-mask`,onClick:t[2]||=q(t=>e.$emit(`cancel`),[`self`])},[H(`div`,{class:`confirm-modal modal-card`,role:`alertdialog`,"aria-modal":`true`,"aria-label":n.title},[H(`div`,{class:k([`confirm-modal__title`,{"is-danger":n.severity===`danger`,"is-warn":n.severity===`warn`}])},[n.severity===`danger`?(z(),B(`svg`,ad,[...t[3]||=[H(`use`,{href:`#icon-no-entry`},null,-1)]])):n.severity===`warn`?(z(),B(`svg`,od,[...t[4]||=[H(`use`,{href:`#icon-alert-triangle`},null,-1)]])):(z(),B(`svg`,sd,[...t[5]||=[H(`use`,{href:`#icon-gear`},null,-1)]])),W(` `+A(n.title),1)],2),H(`div`,cd,A(n.message),1),H(`div`,ld,[H(`button`,{class:`confirm-modal__btn confirm-modal__btn--ghost`,type:`button`,onClick:t[0]||=t=>e.$emit(`cancel`)},A(n.cancelText),1),H(`button`,{class:k([`confirm-modal__btn`,a.confirmBtnClass]),type:`button`,onClick:t[1]||=t=>e.$emit(`confirm`)},A(n.confirmText),3)])],8,id)])):G(``,!0)]),_:1})}var dd=Z(rd,[[`render`,ud]]),fd=M({openAll:null,selectedPath:null});function pd(e,t,n){let r=e;for(let e=0;e<t.length-1;e++)r=r[t[e]];r[t[t.length-1]]=n}function md(e,t){let n=e;for(let e=0;e<t.length-1;e++)n=n[t[e]];delete n[t[t.length-1]]}function hd(e,t,n,r){if(!r||r===n)return!1;let i=e;for(let e=0;e<t.length;e++)i=i[t[e]];if(r in i)return!1;let a=i[n];return delete i[n],i[r]=a,!0}function gd(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}var _d={name:`JsonTree`,components:{ConfirmDialog:dd},props:{data:{type:[Object,Array],default:()=>({})},depth:{type:Number,default:0},rt:{type:Object,default:null},path:{type:Array,default:()=>[]},editable:{type:Boolean,default:!1},schema:{type:Object,default:null}},data(){return{localOpen:{},editingKey:null,editingValue:null,editingComplex:null,jsonEditText:``,ctxMenu:{visible:!1,x:0,y:0,item:null},delConfirm:{show:!1,message:``,item:null}}},computed:{isRoot(){return this.depth===0},entries(){let e=this.data;return Array.isArray(e)?e.map((e,t)=>this.makeEntry(String(t),e,!0,t)):e&&typeof e==`object`?Object.keys(e).map(t=>this.makeEntry(t,e[t],!1,t)):[]}},watch:{data(){this.initOpen(),this.isRoot&&(fd.selectedPath=null)}},created(){this.isRoot&&(fd.openAll=null),this.initOpen()},methods:{makeEntry(e,t,n,r){let i=Array.isArray(t),a=i?t.length:Object.keys(t||{}).length;return{key:String(r),keyLabel:e,value:t,isArrayBranch:n,isArray:i,count:a,type:this.valueType(t),path:[...this.path,r]}},valueType(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e},isComplex(e){return typeof e==`object`&&!!e},initOpen(){let e={};this.entries.forEach(t=>{e[t.key]=this.depth<2}),this.localOpen=e},isOpen(e){return fd.openAll===null?!!this.localOpen[e]:fd.openAll},toggle(e){let t=!this.isOpen(e);this.localOpen[e]=t,fd.openAll=null},isSelected(e){let t=fd.selectedPath;return!t||t.length!==e.path.length?!1:t.every((t,n)=>String(t)===String(e.path[n]))},selectNode(e){fd.selectedPath=this.isSelected(e)?null:e.path.slice()},onBranchClick(e){this.toggle(e.key),fd.selectedPath=e.path.slice()},setOpen(e){fd.openAll=e},previewText(e){if(Array.isArray(e))return` … `+e.length+` 项`;let t=Object.keys(e);return` … `+t.slice(0,3).join(`, `)+(t.length>3?`, …`:``)+` `},formatPrimitive(e,t){return e===null?`null`:t===`string`?JSON.stringify(e):String(e)},formatForEdit(e,t){return e===null?`null`:t===`string`?e:String(e)},startEditKey(e){this.cancelEdit(),this.editingKey=e.key,this.$nextTick(()=>{let e=this.$refs.keyInput;if(e){let t=Array.isArray(e)?e[0]:e;t.focus(),t.select()}})},confirmEditKey(e,t){let n=t.target.value.trim();if(!n||n===e.keyLabel){this.cancelEdit();return}if(this.rt&&this.rt.rootScope){let t=e.path.slice(0,-1),r=e.path[e.path.length-1];if(!hd(this.rt.rootScope,t,r,n)){this.cancelEdit();return}this.rt.markDirty()}this.editingKey=null},startEditValue(e){this.cancelEdit(),this.editingValue=e.key,this.$nextTick(()=>{let e=this.$refs.valInput;if(e){let t=Array.isArray(e)?e[0]:e;t.focus(),t.select()}})},confirmEditValue(e,t){let n=t.target.value,r=n;if(e.type===`number`){let e=Number(n);isNaN(e)||(r=e)}else if(e.type===`boolean`)n===`true`?r=!0:n===`false`&&(r=!1);else if(e.type===`null`)r=n===`null`?null:n;else if(e.type===`string`)r=n;else try{r=JSON.parse(n)}catch{}this.rt&&this.rt.rootScope&&(pd(this.rt.rootScope,e.path,r),this.rt.markDirty()),this.editingValue=null},startEditComplex(e){this.cancelEdit(),this.editingComplex=e.key,this.jsonEditText=JSON.stringify(e.value,null,2),this.$nextTick(()=>{let e=this.$refs.jsonInput;if(e){let t=Array.isArray(e)?e[0]:e;t.focus(),t.select()}})},confirmEditComplex(e){try{let t=JSON.parse(this.jsonEditText);this.rt&&this.rt.rootScope&&(pd(this.rt.rootScope,e.path,t),this.rt.markDirty()),this.cancelEdit()}catch(e){alert(`JSON 解析失败: `+e.message)}},cancelEdit(){this.editingKey=null,this.editingValue=null,this.editingComplex=null,this.jsonEditText=``},deleteNode(e){this.rt&&this.rt.rootScope&&(md(this.rt.rootScope,e.path),this.rt.markDirty())},addChild(){if(!this.rt||!this.rt.rootScope)return;let e=this.rt.rootScope,t=fd.selectedPath;if(t&&t.length){let n=gd(this.rt.rootScope,t);typeof n==`object`&&n&&(e=n)}if(Array.isArray(e))e.push(``),this.rt.markDirty();else if(e&&typeof e==`object`){let t=`newKey`,n=1;for(;t in e;)t=`newKey`+(n>1?n:``),n++;e[t]=``,this.rt.markDirty()}},showContextMenu(e,t){this.ctxMenu.visible=!0,this.ctxMenu.x=t.clientX,this.ctxMenu.y=t.clientY,this.ctxMenu.item=e},hideContextMenu(){this.ctxMenu.visible=!1,this.ctxMenu.item=null},ctxCopyPath(){let e=this.ctxMenu.item;if(this.hideContextMenu(),!e)return;let t=this.formatKeyPath(e.path);ed(t).then(e=>{e?Q(`已复制路径:${t}`,`ok`):Q(`复制失败,请手动复制`,`err`)})},formatKeyPath(e){let t=``;for(let n of e)typeof n==`number`||/^\d+$/.test(String(n))?t+=`[${n}]`:t+=t?`.${n}`:`${n}`;return t},ctxDelete(){let e=this.ctxMenu.item;if(this.hideContextMenu(),e){if(this.isNodeReferenced(e.path)){let t=e.path.join(`.`);this.delConfirm.message=`节点 “${t}” 在 schema 中被引用,删除后可能导致渲染异常。\n\n确定要删除吗?`,this.delConfirm.item=e,this.delConfirm.show=!0;return}this.deleteNode(e)}},onDelConfirm(){let e=this.delConfirm.item;this.delConfirm.show=!1,this.delConfirm.item=null,e&&this.deleteNode(e)},onDelCancel(){this.delConfirm.show=!1,this.delConfirm.item=null},isNodeReferenced(e){if(!this.schema)return!1;let t=JSON.stringify(this.schema);for(let n=0;n<e.length;n++){let r=e.slice(0,n+1).join(`.`),i=e[n];if(t.includes(`$`+i)||t.includes(`$`+r)||t.includes(`state.`+i)||t.includes(`state.`+r)||RegExp(`\\b`+this.escapeRegex(i)+`\\b`).test(t))return!0}return!1},escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}}},vd={class:`jt`},yd={key:0,class:`jt__toolbar`},bd=[`onClick`,`onContextmenu`],xd=[`onDblclick`],Sd=[`value`,`onKeydown`,`onBlur`],Cd=[`onDblclick`],wd=[`onDblclick`],Td=[`value`,`onKeydown`],Ed={class:`jt__json-actions`},Dd=[`onClick`],Od={key:2,class:`jt__row jt__row--close`},kd={class:`jt__bracket`},Ad={class:`jt__count`},jd=[`onClick`,`onContextmenu`],Md=[`onDblclick`],Nd=[`value`,`onKeydown`,`onBlur`],Pd={key:1,class:`jt__key`},Fd={key:2,class:`jt__colon`},Id=[`onDblclick`],Ld=[`value`,`onKeydown`,`onBlur`],Rd=[`onClick`];function zd(e,t,n,r,i,a){let o=I(`JsonTree`,!0),s=I(`ConfirmDialog`);return z(),B(`div`,vd,[a.isRoot&&n.editable?(z(),B(`div`,yd,[H(`button`,{class:`jt__tool`,type:`button`,onClick:t[0]||=e=>a.setOpen(!0)},`全部展开`),H(`button`,{class:`jt__tool`,type:`button`,onClick:t[1]||=e=>a.setOpen(!1)},`全部折叠`),H(`button`,{class:`jt__tool jt__tool--add`,type:`button`,onClick:t[2]||=(...e)=>a.addChild&&a.addChild(...e),title:`添加子节点`},`+ 添加`)])):G(``,!0),H(`ul`,{class:k([`jt__list`,{"jt__list--root":a.isRoot}])},[(z(!0),B(R,null,L(a.entries,(e,r)=>(z(),B(`li`,{key:r,class:`jt__node`},[a.isComplex(e.value)?(z(),B(R,{key:0},[H(`div`,{class:k([`jt__row jt__row--branch`,{"jt__row--selected":a.isSelected(e)}]),onClick:t=>a.onBranchClick(e),onContextmenu:q(t=>a.showContextMenu(e,t),[`prevent`])},[H(`span`,{class:k([`jt__caret`,{"jt__caret--open":a.isOpen(e.key)}])},`▶`,2),e.isArrayBranch?G(``,!0):(z(),B(`span`,{key:0,class:`jt__key jt__editable`,onDblclick:q(t=>a.startEditKey(e),[`stop`])},[i.editingKey===e.key?(z(),B(`input`,{key:0,ref_for:!0,ref:`keyInput`,class:`jt__edit`,value:e.keyLabel,onKeydown:[ys(t=>a.confirmEditKey(e,t),[`enter`]),t[3]||=ys((...e)=>a.cancelEdit&&a.cancelEdit(...e),[`escape`])],onBlur:t=>a.confirmEditKey(e,t)},null,40,Sd)):(z(),B(R,{key:1},[W(A(e.keyLabel),1)],64))],40,xd)),H(`span`,{class:`jt__bracket jt__editable`,onDblclick:q(t=>n.editable&&a.startEditComplex(e),[`stop`])},A(e.isArrayBranch?`[`:`{`),41,Cd),a.isOpen(e.key)?G(``,!0):(z(),B(`span`,{key:1,class:`jt__preview jt__editable`,onDblclick:q(t=>n.editable&&a.startEditComplex(e),[`stop`])},A(a.previewText(e.value)),41,wd))],42,bd),i.editingComplex===e.key?(z(),B(`div`,{key:0,class:`jt__json-edit`,onClick:t[7]||=q(()=>{},[`stop`])},[H(`textarea`,{ref_for:!0,ref:`jsonInput`,class:`jt__json-textarea`,value:i.jsonEditText,onInput:t[4]||=e=>i.jsonEditText=e.target.value,onKeydown:[t[5]||=ys((...e)=>a.cancelEdit&&a.cancelEdit(...e),[`escape`]),ys(q(t=>a.confirmEditComplex(e),[`ctrl`]),[`enter`]),ys(q(t=>a.confirmEditComplex(e),[`meta`]),[`enter`])]},null,40,Td),H(`div`,Ed,[H(`button`,{type:`button`,class:`jt__json-btn`,onClick:t=>a.confirmEditComplex(e)},`确定`,8,Dd),H(`button`,{type:`button`,class:`jt__json-btn jt__json-btn--cancel`,onClick:t[6]||=(...e)=>a.cancelEdit&&a.cancelEdit(...e)},`取消`),t[15]||=H(`span`,{class:`jt__json-hint`},`Ctrl+Enter 确认 · Esc 取消`,-1)])])):G(``,!0),a.isOpen(e.key)?(z(),V(o,{key:1,class:`jt__child`,data:e.value,depth:n.depth+1,rt:n.rt,path:e.path,editable:n.editable},null,8,[`data`,`depth`,`rt`,`path`,`editable`])):G(``,!0),a.isOpen(e.key)?(z(),B(`div`,Od,[H(`span`,kd,A(e.isArrayBranch?`]`:`}`),1),H(`span`,Ad,A(e.count)+` `+A(e.isArrayBranch?`项`:`键`),1)])):G(``,!0)],64)):(z(),B(`div`,{key:1,class:k([`jt__row jt__row--leaf`,{"jt__row--selected":a.isSelected(e)}]),onClick:t=>a.selectNode(e),onContextmenu:q(t=>a.showContextMenu(e,t),[`prevent`])},[t[16]||=H(`span`,{class:`jt__caret jt__caret--leaf`},null,-1),e.keyLabel!==null&&n.editable?(z(),B(`span`,{key:0,class:`jt__key jt__editable`,onDblclick:q(t=>a.startEditKey(e),[`stop`])},[i.editingKey===e.key?(z(),B(`input`,{key:0,ref_for:!0,ref:`keyInput`,class:`jt__edit`,value:e.keyLabel,onKeydown:[ys(t=>a.confirmEditKey(e,t),[`enter`]),t[8]||=ys((...e)=>a.cancelEdit&&a.cancelEdit(...e),[`escape`])],onBlur:t=>a.confirmEditKey(e,t)},null,40,Nd)):(z(),B(R,{key:1},[W(A(e.keyLabel),1)],64))],40,Md)):G(``,!0),e.keyLabel!==null&&!n.editable?(z(),B(`span`,Pd,A(e.keyLabel),1)):G(``,!0),e.keyLabel===null?G(``,!0):(z(),B(`span`,Fd,`:`)),H(`span`,{class:k([`jt__val`,[`jt__val--`+e.type,{jt__editable:n.editable}]]),onDblclick:q(t=>n.editable&&a.startEditValue(e),[`stop`])},[i.editingValue===e.key?(z(),B(`input`,{key:0,ref_for:!0,ref:`valInput`,class:`jt__edit`,value:a.formatForEdit(e.value,e.type),onKeydown:[ys(t=>a.confirmEditValue(e,t),[`enter`]),t[9]||=ys((...e)=>a.cancelEdit&&a.cancelEdit(...e),[`escape`])],onBlur:t=>a.confirmEditValue(e,t)},null,40,Ld)):(z(),B(R,{key:1},[W(A(a.formatPrimitive(e.value,e.type)),1)],64))],42,Id),n.editable?(z(),B(`button`,{key:3,class:`jt__del`,type:`button`,onClick:q(t=>a.deleteNode(e),[`stop`]),title:`删除节点`},`×`,8,Rd)):G(``,!0)],42,jd))]))),128))],2),i.ctxMenu.visible?(z(),B(`div`,{key:1,class:`jt__ctxmenu`,style:O({left:i.ctxMenu.x+`px`,top:i.ctxMenu.y+`px`}),onClick:t[12]||=q(()=>{},[`stop`])},[H(`button`,{class:`jt__ctxmenu-item`,type:`button`,onClick:t[10]||=(...e)=>a.ctxCopyPath&&a.ctxCopyPath(...e)},`复制路径`),n.editable?(z(),B(`button`,{key:0,class:`jt__ctxmenu-item jt__ctxmenu-item--del`,type:`button`,onClick:t[11]||=(...e)=>a.ctxDelete&&a.ctxDelete(...e)},`删除节点`)):G(``,!0)],4)):G(``,!0),i.ctxMenu.visible?(z(),B(`div`,{key:2,class:`jt__ctxmenu-mask`,onClick:t[13]||=(...e)=>a.hideContextMenu&&a.hideContextMenu(...e),onContextmenu:t[14]||=q((...e)=>a.hideContextMenu&&a.hideContextMenu(...e),[`prevent`])},null,32)):G(``,!0),U(s,{visible:i.delConfirm.show,title:`删除被引用节点`,message:i.delConfirm.message,"confirm-text":`删除`,severity:`warn`,onConfirm:a.onDelConfirm,onCancel:a.onDelCancel},null,8,[`visible`,`message`,`onConfirm`,`onCancel`])])}var Bd=Z(_d,[[`render`,zd]]);function Vd(){return K(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[K(`circle`,{cx:`12`,cy:`12`,r:`3`}),K(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})])}function Hd(){let e=(e,t)=>K(`circle`,{cx:e,cy:t,r:`1.4`});return K(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`currentColor`},[e(3,2.5),e(9,2.5),e(3,6),e(9,6),e(3,9.5),e(9,9.5)])}var Ud={name:`TreeNode`,props:{comp:{type:Object,required:!0},openState:{type:Object,required:!0},compNames:{type:Object,required:!0},selectedNodeId:{type:String,default:``},draggingId:{type:String,default:``},dropTarget:{type:Object,default:()=>({compId:null,type:null})},query:{type:String,default:``}},methods:{hasChildren(e){return(e.slots||[]).some(e=>(e.components||[]).length>0)},nodeMatches(e,t){if(!t)return!1;let n=(this.compNames[e.className]||e.className).toLowerCase(),r=String(e.componentId==null?``:e.componentId).toLowerCase(),i=String(e.className||``).toLowerCase();return n.indexOf(t)!==-1||r.indexOf(t)!==-1||i.indexOf(t)!==-1},subtreeMatches(e,t){if(!t||this.nodeMatches(e,t))return!0;if(!e.slots)return!1;for(let n of e.slots)if(n.components){for(let e of n.components)if(this.subtreeMatches(e,t))return!0}return!1},isContainer(e){let t=mc[e];return!!(t&&t.slots&&t.slots.length)},onRowClick(e,t){e.stopPropagation(),this.$emit(`select-node`,t.id)},onRowDblclick(e,t){e.stopPropagation(),e.preventDefault(),this.$emit(`inspect`,t)},onRowHover(e){this.$emit(`hover-node`,{componentId:e&&e.componentId,id:e&&e.id})},onRowLeave(e){this.$emit(`hover-node`,{componentId:e&&e.componentId,id:e&&e.id,leave:!0})},onDragStart(e,t){e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,t.componentId)),this.$emit(`drag-start`,t.componentId)},onDragEnd(){this.$emit(`drag-end`)},onDragOver(e,t){if(!this.draggingId||this.draggingId===t.componentId){this.clearDrop();return}e.preventDefault();let n=e.currentTarget.getBoundingClientRect(),r=e.clientY-n.top,i=n.height,a=this.isContainer(t.className),o;o=a?r<i*.25?`before`:r>i*.75?`after`:`inside`:r<i/2?`before`:`after`,this.isDescendantOf(this.draggingId,t)&&(o=`blocked`),e.dataTransfer.dropEffect=o===`blocked`?`none`:`move`,o===`inside`&&this.openState[t.id]===!1&&!this._expandTimer&&(this._expandTimer=setTimeout(()=>{this.$emit(`toggle`,t.id),this._expandTimer=null},450)),this.$emit(`drag-over`,{compId:t.componentId,type:o})},onDragLeave(e){e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||this.clearDrop()},onDrop(e,t){e.preventDefault(),this._expandTimer&&=(clearTimeout(this._expandTimer),null);let n=e.dataTransfer&&e.dataTransfer.getData(`text/plain`);if(this.clearDrop(),!n||n===t.componentId)return;let r=e.currentTarget.getBoundingClientRect(),i=e.clientY-r.top,a=r.height,o=this.isContainer(t.className),s;s=o?i<a*.25?`before`:i>a*.75?`after`:`inside`:i<a/2?`before`:`after`,!this.isDescendantOf(n,t)&&this.$emit(`move-node`,{sourceCompId:n,targetCompId:t.componentId,position:s})},isDescendantOf(e,t){if(!t)return!1;let n=[];if(t.components&&n.push(...t.components),t.slots)for(let e of t.slots)e.components&&n.push(...e.components);for(let t of n)if(t.componentId===e||this.isDescendantOf(e,t))return!0;return!1},dropClass(e){let t=this.dropTarget;return!t||t.compId!==e?``:t.type===`blocked`?`st__row--drop-blocked`:t.type===`before`?`st__row--drop-before`:t.type===`after`?`st__row--drop-after`:t.type===`inside`?`st__row--drop-inside`:``},clearDrop(){this._expandTimer&&=(clearTimeout(this._expandTimer),null),this.$emit(`drag-over`,{compId:null,type:null})}},render(){let e=this.comp;if(this.query&&!this.subtreeMatches(e,this.query))return null;let t=this.hasChildren(e),n=!!this.query||this.openState[e.id]!==!1,r=this.compNames[e.className]||e.className,i=!!(this.query&&this.nodeMatches(e,this.query)),a=[],o=[];t?o.push(K(`span`,{class:[`st__caret`,{"st__caret--open":n}],onClick:t=>{t.stopPropagation(),this.$emit(`toggle`,e.id)}},`▸`)):o.push(K(`span`,{class:`st__caret st__caret--leaf`})),o.push(K(`span`,{class:[`st__label`,{"st__label--hl":i}]},r)),o.push(K(`span`,{class:`st__id`},`【`+e.componentId+`】`));{let t=!!(e.eventactions&&e.eventactions.length);o.push(K(`span`,{class:[`st__badge`,t?`st__badge--clickable`:`st__badge--muted`],onClick:t=>{t.stopPropagation(),this.$emit(`edit-event`,e)}},`事件`))}if(o.push(K(`button`,{class:`st__gear`,type:`button`,title:`编辑节点属性`,onClick:t=>{t.stopPropagation(),this.$emit(`inspect`,e)}},[Vd()])),o.unshift(K(`span`,{class:`st__handle`,title:`拖拽以调整位置或嵌套关系`},[Hd()])),a.push(K(`div`,{class:[`st__row`,{"st__row--selected":this.selectedNodeId===e.id,"st__row--dragging":this.draggingId===e.componentId},this.dropClass(e.componentId)],title:`单击选中节点;双击打开节点设置;拖拽调整位置/嵌套`,draggable:`true`,"data-comp-id":e.componentId,"data-is-container":this.isContainer(e.className)?`true`:`false`,onClick:t=>this.onRowClick(t,e),onDblclick:t=>this.onRowDblclick(t,e),onDragstart:t=>this.onDragStart(t,e),onDragend:e=>this.onDragEnd(e),onDragover:t=>this.onDragOver(t,e),onDragleave:e=>this.onDragLeave(e),onDrop:t=>this.onDrop(t,e),onMouseenter:()=>this.onRowHover(e),onMouseleave:()=>this.onRowLeave(e),onContextmenu:t=>{t.preventDefault(),t.stopPropagation(),this.$emit(`context-menu`,e,t)}},o)),t){let t=[];for(let n of e.slots||[])for(let e of n.components||[])this.query&&!this.subtreeMatches(e,this.query)||t.push(K(Ud,{key:e.id,comp:e,openState:this.openState,compNames:this.compNames,selectedNodeId:this.selectedNodeId,draggingId:this.draggingId,dropTarget:this.dropTarget,query:this.query,onToggle:e=>this.$emit(`toggle`,e),onSelectNode:e=>this.$emit(`select-node`,e),onEditEvent:e=>this.$emit(`edit-event`,e),onInspect:e=>this.$emit(`inspect`,e),onDragStart:e=>this.$emit(`drag-start`,e),onDragEnd:()=>this.$emit(`drag-end`),onDragOver:e=>this.$emit(`drag-over`,e),onMoveNode:e=>this.$emit(`move-node`,e),onHoverNode:e=>this.$emit(`hover-node`,e),onContextMenu:(e,t)=>this.$emit(`context-menu`,e,t)}));t.length&&a.push(K(`ul`,{class:`st__children`,style:n?``:`display: none;`},t))}return K(`li`,{class:`st__node`},a)}},Wd={name:`StructureTree`,components:{TreeNode:Ud},props:{preview:{type:Object,default:null},schema:{type:Object,default:null},cardCode:{type:String,default:``},selectedNodeId:{type:String,default:``},moveCollapseToken:{type:Number,default:0},canPaste:{type:Boolean,default:!1}},data(){return{openState:{},draggingId:``,dropTarget:{compId:null,type:null},query:``,locateEnabled:!1,contextMenu:{visible:!1,x:0,y:0,nodeId:``,node:null},helpOpen:!1,shortcuts:[{keys:[`⌘/Ctrl`,`C`],desc:`复制选中节点`},{keys:[`⌘/Ctrl`,`V`],desc:`粘贴节点`},{keys:[`⌘/Ctrl`,`D`],desc:`创建节点副本`},{keys:[`⌘/Ctrl`,`Z`],desc:`撤销`},{keys:[`⌘/Ctrl`,`⇧`,`Z`],desc:`重做`},{keys:[`Delete`],desc:`删除选中节点`},{keys:[`Esc`],desc:`取消选中`},{keys:[`⌘/Ctrl`,`点击`],desc:`点击画布元素,在本树中定位该节点`}]}},computed:{rootOpen(){return!!this.query||this.openState._root!==!1},view(){return this.preview&&this.preview.view},rootLabel(){return this.view&&(this.preview.name||this.view.className)||`卡片`},viewComponents(){return this.view&&this.view.components||[]},viewNode(){return this.view},viewEventCount(){return this.view&&this.view.eventactions&&this.view.eventactions.length},ctxTargetIsContainer(){return this.isContainerNode(this.contextMenu.node)},ctxTargetIsRoot(){return this.contextMenu.node===this.viewNode},compNames(){let e={};for(let t in mc)e[t]=mc[t].name||t;return e.Root=`根`,e}},watch:{selectedNodeId:{immediate:!0,handler(e){this.ensureVisible(e)}},preview:{handler(e){if(!e||!e.view){this.openState={};return}let t=new Set,n=e=>{if(!e)return;t.add(e.id);let r=[];if(e.components&&r.push(...e.components),e.slots)for(let t of e.slots)t.components&&r.push(...t.components);for(let e of r)n(e)};n(e.view);let r={};for(let e of Object.keys(this.openState))(e===`_root`||t.has(e))&&(r[e]=this.openState[e]);this.openState=r},immediate:!0},moveCollapseToken:{handler(){this.collapseOthersAndReveal(this.selectedNodeId)}}},methods:{toggle(e){let t=this.openState[e];this.openState[e]=t===!1},onRootClick(e){e.stopPropagation(),this.onSelect(`_root`)},onRowHover(e){this.locateEnabled&&this.$emit(`hover-node`,{componentId:e&&e.componentId,id:e&&e.id})},onRowLeave(e){this.locateEnabled&&this.$emit(`hover-node`,{componentId:e&&e.componentId,id:e&&e.id,leave:!0})},toggleLocate(){this.locateEnabled=!this.locateEnabled,this.locateEnabled||this.$emit(`hover-node`,null)},onChildHover(e){this.locateEnabled&&this.$emit(`hover-node`,e)},onRootDblclick(e){e.stopPropagation(),e.preventDefault(),this.onInspect(this.viewNode)},onSelect(e){this.$emit(`select-node`,this.selectedNodeId===e?``:e)},onNodeContextMenu(e,t){this.openContextMenu(e,t)},openContextMenu(e,t){let n=e===this.viewNode?`_root`:e.id;this.$emit(`select-node`,n),this.contextMenu={visible:!0,x:t.clientX,y:t.clientY,nodeId:n,node:e},this.$nextTick(()=>this.clampContextMenu())},clampContextMenu(){let e=this.$refs.ctxMenu;if(!e)return;let t=e.getBoundingClientRect(),n=this.contextMenu.x,r=this.contextMenu.y;n+t.width>window.innerWidth&&(n=Math.max(4,window.innerWidth-t.width-4)),r+t.height>window.innerHeight&&(r=Math.max(4,window.innerHeight-t.height-4)),this.contextMenu.x=n,this.contextMenu.y=r},closeContextMenu(){this.contextMenu.visible&&(this.contextMenu={visible:!1,x:0,y:0,nodeId:``,node:null})},onCtxCopy(){this.$emit(`copy-selected`),this.closeContextMenu()},onCtxPaste(){this.$emit(`paste`),this.closeContextMenu()},onCtxDuplicate(){this.$emit(`duplicate`),this.closeContextMenu()},onCtxDelete(){this.$emit(`delete-selected`),this.closeContextMenu()},onCtxAdd(e){let t=this.contextMenu.node;this.closeContextMenu(),this.$emit(`add-node`,{node:t||null,mode:e})},onCtxInspect(){this.$emit(`inspect`,this.contextMenu.node),this.closeContextMenu()},onCtxEditEvent(){this.$emit(`edit-event`,this.contextMenu.node),this.closeContextMenu()},async onCtxCopyId(){let e=this.contextMenu.node,t=e&&(e.componentId==null?e.id:e.componentId);if(t==null||t===``){Q(`该节点没有可复制的 ID`,`err`),this.closeContextMenu();return}await ed(String(t))?Q(`已复制节点ID:${t}`,`ok`):Q(`复制失败,请手动复制`,`err`),this.closeContextMenu()},async onCtxCopyCardId(){let e=this.cardCode;if(e==null||e===``){Q(`该卡片没有可复制的 code`,`err`),this.closeContextMenu();return}await ed(String(e))?Q(`已复制卡片code:${e}`,`ok`):Q(`复制失败,请手动复制`,`err`),this.closeContextMenu()},isContainerNode(e){if(!e)return!1;if(e.className===`Root`)return!0;let t=mc[e.className];return!!(t&&t.slots&&t.slots.length)},onDocClick(e){this.contextMenu.visible&&this.$refs.ctxMenu&&!this.$refs.ctxMenu.contains(e.target)&&this.closeContextMenu()},onDocKeydown(e){e.key===`Escape`&&this.closeContextMenu()},expandAll(){this.openState={}},collapseAll(){let e={_root:!1},t=n=>{for(let r of n){(r.slots||[]).some(e=>(e.components||[]).length>0)&&(e[r.id]=!1);for(let e of r.slots||[])t(e.components||[])}};t(this.viewComponents),this.openState=e},onEditEvent(e){this.$emit(`edit-event`,e)},onRootDragOver(e){if(!this.draggingId){this.dropTarget={compId:null,type:null};return}e.preventDefault(),e.dataTransfer.dropEffect=`move`,(this.dropTarget.compId!==`__root__`||this.dropTarget.type!==`inside`)&&(this.dropTarget={compId:`__root__`,type:`inside`})},onRootDragLeave(e){e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||(this.dropTarget={compId:null,type:null})},onRootDrop(e){e.preventDefault();let t=e.dataTransfer&&e.dataTransfer.getData(`text/plain`);this.dropTarget={compId:null,type:null},t&&this.$emit(`move-node`,{sourceCompId:t,targetCompId:`__root__`,position:`inside`})},dropClass(e){let t=this.dropTarget;return!t||t.compId!==e?``:t.type===`blocked`?`st__row--drop-blocked`:t.type===`before`?`st__row--drop-before`:t.type===`after`?`st__row--drop-after`:t.type===`inside`?`st__row--drop-inside`:``},clearDrag(){this.draggingId=``,this.dropTarget={compId:null,type:null}},onAddFromToolbar(){let e=this.selectedNodeId,t=null;e&&e!==`_root`&&(t=this.findViewNodeById(this.view,e)),this.$emit(`add-node`,{node:t,mode:`auto`})},findViewNodeById(e,t){if(!e)return null;if(e.id===t)return e;let n=[];if(e.components&&n.push(...e.components),e.slots)for(let t of e.slots)t.components&&n.push(...t.components);for(let e of n){let n=this.findViewNodeById(e,t);if(n)return n}return null},onInspect(e){this.$emit(`inspect`,e)},ensureVisible(e){if(!e)return;let t=this.collectAncestorIds(e);if(t.length){let e=Object.assign({},this.openState);for(let n of t)e[n]=!0;this.openState=e}this.$nextTick(()=>{let e=this.$el&&this.$el.querySelector?this.$el.querySelector(`.st__row--selected`):null;e&&e.scrollIntoView&&e.scrollIntoView({block:`nearest`})})},collectAncestorIds(e){let t=[],n=!1,r=(i,a)=>{for(let o of i){if(o.id===e)return n=!0,a!==void 0&&t.unshift(a),!0;let i=[];if(o.components&&i.push(...o.components),o.slots)for(let e of o.slots)e.components&&i.push(...e.components);if(r(i,o.id))return t.unshift(a),!0}return!1};return r(this.viewComponents,`_root`),n?t:[]},collapseOthersAndReveal(e){if(this.collapseAll(),e&&e!==`_root`){let t=this.collectAncestorIds(e);if(t.length){let e=Object.assign({},this.openState);for(let n of t)e[n]=!0;this.openState=e}}else e===`_root`&&(this.openState=Object.assign({},this.openState,{_root:!0}));this.$nextTick(()=>{let e=this.$el&&this.$el.querySelector?this.$el.querySelector(`.st__row--selected`):null;e&&e.scrollIntoView&&e.scrollIntoView({block:`nearest`})})}},mounted(){this._onDocClick=e=>this.onDocClick(e),this._onDocKeydown=e=>this.onDocKeydown(e),document.addEventListener(`click`,this._onDocClick,!0),document.addEventListener(`keydown`,this._onDocKeydown,!0)},beforeDestroy(){document.removeEventListener(`click`,this._onDocClick,!0),document.removeEventListener(`keydown`,this._onDocKeydown,!0)}},Gd={class:`st`},Kd={class:`st__toolbar st__toolbar--top`},qd=[`title`,`aria-pressed`],Jd={class:`st__node st__node--root`},Yd={class:`st__label`},Xd={class:`st__children`},Zd=[`disabled`],Qd=[`disabled`],$d=[`disabled`],ef={key:2,class:`st__ctx-sep`},tf=[`disabled`],nf={class:`st__help-wrap`},rf=[`aria-expanded`],af={class:`st__help-pop-head`},of={class:`st__help-pop-body st__keys`},sf={class:`st__keys-combo`},cf={class:`st__kbd`},lf={key:0,class:`st__kbd-plus`},uf={class:`st__keys-desc`};function df(e,t,n,r,i,a){let o=I(`tree-node`);return z(),B(`div`,Gd,[H(`div`,Kd,[H(`button`,{class:`jt__tool`,type:`button`,onClick:t[0]||=(...e)=>a.expandAll&&a.expandAll(...e)},`全部展开`),H(`button`,{class:`jt__tool`,type:`button`,onClick:t[1]||=(...e)=>a.collapseAll&&a.collapseAll(...e)},`全部折叠`),H(`button`,{class:k([`jt__tool st__locate`,{"st__locate--active":i.locateEnabled}]),type:`button`,title:i.locateEnabled?`定位:开(hover 节点显示画布参考线)`:`定位:关(hover 节点不显示参考线)`,"aria-pressed":i.locateEnabled,onClick:t[2]||=(...e)=>a.toggleLocate&&a.toggleLocate(...e)},[...t[36]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`use`,{href:`#icon-locate`})],-1)]],10,qd),F(H(`input`,{class:`st__search`,type:`text`,"onUpdate:modelValue":t[3]||=e=>i.query=e,placeholder:`搜索组件…`,title:`按组件名 / 类型 / 实例ID 过滤结构树`},null,512),[[hs,i.query]]),H(`button`,{class:`jt__tool jt__tool--add`,type:`button`,title:`添加组件:未选中节点→根下;容器→末尾子节点;非容器→其后兄弟`,onClick:t[4]||=(...e)=>a.onAddFromToolbar&&a.onAddFromToolbar(...e)},`+ 添加组件`)]),H(`ul`,{class:`st__list`,onContextmenu:t[19]||=q((...e)=>a.closeContextMenu&&a.closeContextMenu(...e),[`prevent`])},[H(`li`,Jd,[H(`div`,{class:k([`st__row`,[{"st__row--selected":n.selectedNodeId===`_root`},a.dropClass(`__root__`)]]),title:`单击选中节点;双击打开节点设置;可作为放置目标把节点放入顶层`,"data-comp-id":`__root__`,"data-is-container":`true`,onClick:t[8]||=e=>a.onRootClick(e),onDblclick:t[9]||=(...e)=>a.onRootDblclick&&a.onRootDblclick(...e),onDragover:t[10]||=(...e)=>a.onRootDragOver&&a.onRootDragOver(...e),onDragleave:t[11]||=(...e)=>a.onRootDragLeave&&a.onRootDragLeave(...e),onDrop:t[12]||=(...e)=>a.onRootDrop&&a.onRootDrop(...e),onMouseenter:t[13]||=e=>a.onRowHover(a.viewNode),onMouseleave:t[14]||=e=>a.onRowLeave(a.viewNode),onContextmenu:t[15]||=q(e=>a.openContextMenu(a.viewNode,e),[`prevent`,`stop`])},[H(`span`,{class:k([`st__caret`,{"st__caret--open":i.openState._root!==!1}]),onClick:t[5]||=q(e=>a.toggle(`_root`),[`stop`])},`▸`,2),H(`span`,Yd,A(a.rootLabel),1),H(`span`,{class:k([`st__badge`,a.viewEventCount?`st__badge--clickable`:`st__badge--muted`]),onClick:t[6]||=q(e=>a.onEditEvent(a.viewNode),[`stop`])},`事件`,2),H(`button`,{class:`st__gear`,type:`button`,title:`编辑节点属性`,onClick:t[7]||=q(e=>a.onInspect(a.viewNode),[`stop`])},[...t[37]||=[H(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`use`,{href:`#icon-gear`})],-1)]])],34),F(H(`ul`,Xd,[(z(!0),B(R,null,L(a.viewComponents,r=>(z(),V(o,{key:r.id,comp:r,"open-state":i.openState,"comp-names":a.compNames,"selected-node-id":n.selectedNodeId,"dragging-id":i.draggingId,"drop-target":i.dropTarget,query:i.query,onToggle:a.toggle,onSelectNode:a.onSelect,onEditEvent:a.onEditEvent,onInspect:a.onInspect,onDragStart:t[16]||=e=>i.draggingId=e,onDragEnd:a.clearDrag,onDragOver:t[17]||=e=>i.dropTarget=e,onMoveNode:t[18]||=t=>e.$emit(`move-node`,t),onContextMenu:a.onNodeContextMenu,onHoverNode:a.onChildHover},null,8,[`comp`,`open-state`,`comp-names`,`selected-node-id`,`dragging-id`,`drop-target`,`query`,`onToggle`,`onSelectNode`,`onEditEvent`,`onInspect`,`onDragEnd`,`onContextMenu`,`onHoverNode`]))),128))],512),[[Fo,a.rootOpen]])])],32),i.contextMenu.visible?(z(),B(`div`,{key:0,ref:`ctxMenu`,class:`st__ctx`,style:O({left:i.contextMenu.x+`px`,top:i.contextMenu.y+`px`}),onClick:t[31]||=q(()=>{},[`stop`]),onContextmenu:t[32]||=q(()=>{},[`prevent`])},[H(`button`,{class:`st__ctx-item`,type:`button`,disabled:!n.selectedNodeId||n.selectedNodeId===`_root`,onClick:t[20]||=(...e)=>a.onCtxCopy&&a.onCtxCopy(...e)},`复制`,8,Zd),H(`button`,{class:`st__ctx-item`,type:`button`,disabled:!n.canPaste||!n.selectedNodeId,onClick:t[21]||=(...e)=>a.onCtxPaste&&a.onCtxPaste(...e)},`粘贴`,8,Qd),H(`button`,{class:`st__ctx-item`,type:`button`,disabled:!n.selectedNodeId||n.selectedNodeId===`_root`,onClick:t[22]||=(...e)=>a.onCtxDuplicate&&a.onCtxDuplicate(...e)},`副本`,8,$d),t[38]||=H(`div`,{class:`st__ctx-sep`},null,-1),a.ctxTargetIsContainer?(z(),B(`button`,{key:0,class:`st__ctx-item`,type:`button`,onClick:t[23]||=e=>a.onCtxAdd(`child`)},`添加子节点`)):G(``,!0),a.ctxTargetIsRoot?G(``,!0):(z(),B(R,{key:1},[H(`button`,{class:`st__ctx-item`,type:`button`,onClick:t[24]||=e=>a.onCtxAdd(`before`)},`前面插入节点`),H(`button`,{class:`st__ctx-item`,type:`button`,onClick:t[25]||=e=>a.onCtxAdd(`after`)},`后面插入节点`)],64)),a.ctxTargetIsContainer||!a.ctxTargetIsRoot?(z(),B(`div`,ef)):G(``,!0),H(`button`,{class:`st__ctx-item`,type:`button`,onClick:t[26]||=(...e)=>a.onCtxInspect&&a.onCtxInspect(...e)},`属性设置`),H(`button`,{class:`st__ctx-item`,type:`button`,onClick:t[27]||=(...e)=>a.onCtxEditEvent&&a.onCtxEditEvent(...e)},`事件设置`),a.ctxTargetIsRoot?(z(),B(`button`,{key:3,class:`st__ctx-item`,type:`button`,onClick:t[28]||=(...e)=>a.onCtxCopyCardId&&a.onCtxCopyCardId(...e)},`复制卡片code`)):G(``,!0),a.ctxTargetIsRoot?G(``,!0):(z(),B(`button`,{key:4,class:`st__ctx-item`,type:`button`,onClick:t[29]||=(...e)=>a.onCtxCopyId&&a.onCtxCopyId(...e)},`复制节点ID`)),t[39]||=H(`div`,{class:`st__ctx-sep`},null,-1),H(`button`,{class:`st__ctx-item st__ctx-item--danger`,type:`button`,disabled:!n.selectedNodeId||n.selectedNodeId===`_root`,onClick:t[30]||=(...e)=>a.onCtxDelete&&a.onCtxDelete(...e)},`删除`,8,tf)],36)):G(``,!0),H(`div`,nf,[H(`button`,{class:k([`st__help`,{"st__help--open":i.helpOpen}]),type:`button`,title:`使用说明`,"aria-expanded":i.helpOpen,onClick:t[33]||=q(e=>i.helpOpen=!i.helpOpen,[`stop`])},[...t[40]||=[H(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`circle`,{cx:`12`,cy:`12`,r:`9.2`}),H(`path`,{d:`M9.4 9.2a2.6 2.6 0 0 1 5.1.7c0 1.7-2.5 2.2-2.5 3.7`}),H(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`17.01`})],-1)]],10,rf),U(_o,{name:`pop`},{default:P(()=>[i.helpOpen?(z(),B(`div`,{key:0,class:`st__help-pop`,onClick:t[35]||=q(()=>{},[`stop`])},[H(`div`,af,[t[41]||=H(`span`,{class:`st__help-pop-title`},`快捷键`,-1),H(`button`,{class:`st__help-pop-close`,type:`button`,title:`关闭`,onClick:t[34]||=e=>i.helpOpen=!1},`✕`)]),H(`ul`,of,[(z(!0),B(R,null,L(i.shortcuts,e=>(z(),B(`li`,{key:e.desc,class:`st__keys-row`},[H(`span`,sf,[(z(!0),B(R,null,L(e.keys,(t,n)=>(z(),B(R,{key:t},[H(`kbd`,cf,A(t),1),n<e.keys.length-1?(z(),B(`span`,lf,`+`)):G(``,!0)],64))),128))]),H(`span`,uf,A(e.desc),1)]))),128))])])):G(``,!0)]),_:1})])])}var ff=Z(Wd,[[`render`,df]]),pf=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),mf={className:`Root`,name:`根节点`,styleState:{},styleVisible:{rect:!0,flex:!0,background:!0,padding:!0,margin:!0,borderRadius:!0,border:!0,shadow:!0,transform:!0,other:!0},styleMeta:{},properties:[],slots:[],events:[{eventName:`初始化完成`,eventKey:`onReady`}]};function hf(e){return e===`Root`?mf:mc[e]||null}function gf(e={},t={},n={}){let r=[];return hc.forEach(i=>{let a=e[i.itemKey];if(!a)return;let o=new Y(i),s=o.itemChildren&&o.itemChildren.properties||[];if(a&&typeof a==`object`)for(let e=0;e<s.length;e++)a[s[e].itemKey]||s.splice(e--,1);if(!s.length)return;let c=t[i.itemKey]||{};s.forEach(e=>{let t=c[e.itemKey];t&&(t.itemName&&(e.itemName=t.itemName),t.itemOption&&(e.itemOption=Object.assign({},e.itemOption,t.itemOption)))}),n[i.itemKey]&&sc.setPropertyValue(s,n[i.itemKey]),o.itemValueFrom=`0`,r.push(o)}),r}var _f=class{constructor(e={}){this.schemaNode=e,this.className=e.className||`Root`,this.isRoot=this.className===`Root`;let t=hf(this.className);this.metaMissing=!t,this.meta=t||{properties:[],events:[],styleVisible:{},styleState:{},styleMeta:{}},this.name=this.meta.name||this.className,this.events=this.meta.events||[],this.properties=(this.meta.properties||[]).map(e=>new Y(e)),Y.restoreProperty(e.properties||[],this.properties),Y.updatePropertyVisible(this.properties),this.extraProperties=this._orphans(e.properties,this.properties),this.hasDirectives=!this.isRoot,this.directives=this.hasDirectives?_c.map(e=>new Y(e)):[],this.hasDirectives?(Y.restoreProperty(e.directives||[],this.directives),Y.updatePropertyVisible(this.directives),this.extraDirectives=this._orphans(e.directives,this.directives)):this.extraDirectives=[],this.style=new vc({state:this.meta.styleState,visible:this.meta.styleVisible,meta:this.meta.styleMeta}),this.style.onRestore(e.style||{}),this.styleForm=gf(this.meta.styleVisible||{},this.meta.styleMeta||{},this.meta.styleState||{}),Y.restoreProperty(this.style.onExport().properties,this.styleForm),Y.updatePropertyVisible(this.styleForm)}refreshVisible(){Y.updatePropertyVisible(this.properties),this.hasDirectives&&Y.updatePropertyVisible(this.directives),Y.updatePropertyVisible(this.styleForm)}applyStyleChange(e,t=[]){let n=null;for(let e=t.length-1;e>=0;e--)n={itemId:t[e].itemId,child:n};Y.updatePropertyVisible(this.styleForm),this.style.applyChange(e,n)}exportProperties(){return this.properties.reduce((e,t)=>{let n=t.onExport();return n&&e.push(n),e},[]).concat(this.extraProperties.map(e=>pf(e)))}exportDirectives(){return this.directives.reduce((e,t)=>{let n=t.onExport();return n&&e.push(n),e},[]).concat(this.extraDirectives.map(e=>pf(e)))}_orphans(e,t){let n=new Set;return(t||[]).forEach(e=>{e.itemId&&n.add(e.itemId),e.itemKey&&n.add(e.itemKey)}),(e||[]).filter(e=>e&&e.itemId&&!n.has(e.itemId)&&!(e.itemKey&&n.has(e.itemKey))).map(e=>pf(e))}exportStyle(){return this.style.onExport()}applyToSchema(){let e=this.schemaNode;e.properties=this.exportProperties(),e.style=this.exportStyle(),this.hasDirectives&&(e.directives=this.exportDirectives())}toSchemaFragment(){let e={properties:this.exportProperties(),style:this.exportStyle()};return this.hasDirectives&&(e.directives=this.exportDirectives()),pf(e)}},vf={name:`NodeInspector`,props:{comp:{type:Object,required:!0},compNames:{type:Object,default:()=>({})},rt:{type:Object,required:!0}},emits:[`apply`,`commit`,`close`],data(){return{model:null,secOpen:{basic:!0,props:!0,style:!0,directive:!0},_t:null,_snapshot:null,_dirty:!1,_written:!1}},computed:{schemaNode(){return this.comp&&this.comp._schemaNode||null},compName(){let e=this.schemaNode&&this.schemaNode.className;return e?this.compNames&&this.compNames[e]||e:`节点`},styleWatches(){let e={},t=n=>{(n||[]).forEach(n=>{n.itemKey!=null&&(e[n.itemKey]=n.itemValue),n.itemChildren&&n.itemChildren.properties&&t(n.itemChildren.properties)})};return this.model&&t(this.model.styleForm),e}},watch:{comp:{immediate:!0,handler(){this.buildModel()}}},methods:{buildModel(){let e=this.schemaNode;this.model=e?M(new _f(e)):null,this._snapshot=e?this.snapshotNode(e):null,this._dirty=!1,this._written=!1},snapshotNode(e){let t=t=>Object.prototype.hasOwnProperty.call(e,t),n=e=>e===void 0?void 0:JSON.parse(JSON.stringify(e));return{hasProperties:t(`properties`),properties:n(e.properties),hasStyle:t(`style`),style:n(e.style),hasDirectives:t(`directives`),directives:n(e.directives),hasComponentId:t(`componentId`),componentId:n(e.componentId),hasName:t(`name`),name:n(e.name)}},restoreSnapshot(){let e=this.schemaNode;if(!e||!this._snapshot)return;let t=this._snapshot,n=(t,n,r)=>{t?e[n]=JSON.parse(JSON.stringify(r)):delete e[n]};n(t.hasProperties,`properties`,t.properties),n(t.hasStyle,`style`,t.style),n(t.hasDirectives,`directives`,t.directives),n(t.hasComponentId,`componentId`,t.componentId),n(t.hasName,`name`,t.name)},toggleSec(e){this.secOpen[e]=!this.secOpen[e],this.secOpen=Object.assign({},this.secOpen)},hasField(e){return this.schemaNode&&Object.prototype.hasOwnProperty.call(this.schemaNode,e)},onMetaInput(e,t){this.schemaNode&&(this.schemaNode[e]=t,this._dirty=!0,this.scheduleApply())},onPropChange(){this.model.refreshVisible(),this._dirty=!0,this.scheduleApply()},onStyleChange(e){!e||!e.length||(this.model.applyStyleChange(e[0],e.slice(1)),this.model.refreshVisible(),this._dirty=!0,this.scheduleApply())},onStyleSync(e){if(e){for(let t in e){let n=String(t).split(`.`);if(n.length<3||n[0]!==`style`)continue;let r=n[1],i=n[2],a=this.model.styleForm.find(e=>e.itemKey===r);if(!a)continue;let o=a.itemChildren.properties.find(e=>e.itemKey===i);o&&(o.itemValue=e[t],this.model.applyStyleChange(a,[o]))}this.model.refreshVisible(),this.scheduleApply()}},scheduleApply(){this._t&&clearTimeout(this._t),this._t=setTimeout(()=>{this.applyAll(),this.$emit(`apply`)},250)},applyAll(){this.model&&this.model.applyToSchema()},onApplyWrite(){this._t&&=(clearTimeout(this._t),null),this.applyAll(),this._written=!0,this.$emit(`apply`),this.$emit(`commit`),this.$emit(`close`)},discardAndClose(){this._t&&=(clearTimeout(this._t),null),this._dirty&&!this._written&&(this.restoreSnapshot(),this.$emit(`apply`)),this.$emit(`close`)},onClose(){this.discardAndClose()},onCancel(){this.discardAndClose()}}},yf={class:`ni-overlay`},bf={class:`ni-panel modal-card`},xf={class:`ni-head`},Sf={class:`ni-title`},Cf={class:`ni-cls`},wf={key:0,class:`ni-body`},Tf={key:1,class:`ni-body`},Ef={class:`ni-scroll`},Df={class:`ni-sec`},Of={class:`ni-sec-body`},kf={class:`ni-field-row`},Af={class:`ni-static`},jf={key:0,class:`ni-field-row`},Mf=[`value`],Nf={key:1,class:`ni-field-row`},Pf=[`value`],Ff={class:`ni-sec`},If={class:`ni-sec-body`},Lf={class:`ni-sec`},Rf={class:`ni-sec-body`},zf={key:0,class:`ni-sec`},Bf={class:`ni-sec-body`},Vf={key:0,class:`ni-empty`},Hf={class:`ni-foot`},Uf={class:`ni-foot-btns`};function Wf(e,t,n,r,i,a){let o=I(`prop-tree`);return z(),B(`div`,yf,[H(`div`,bf,[H(`div`,xf,[H(`span`,Sf,[W(` 节点属性 · `+A(a.compName)+` `,1),H(`em`,Cf,A(a.schemaNode&&a.schemaNode.className),1)]),H(`button`,{class:`ni-close`,type:`button`,onClick:t[0]||=(...e)=>a.onClose&&a.onClose(...e)})]),i.model?(z(),B(`div`,Tf,[H(`div`,Ef,[H(`section`,Df,[H(`div`,{class:`ni-sec-head`,onClick:t[1]||=e=>a.toggleSec(`basic`)},[H(`span`,{class:k([`ni-caret`,{"is-open":i.secOpen.basic}])},`▸`,2),t[10]||=W(`基本信息 `,-1)]),F(H(`div`,Of,[H(`div`,kf,[t[11]||=H(`label`,{class:`ni-field-label`},`组件类型`,-1),H(`span`,Af,A(a.compName),1)]),a.hasField(`componentId`)?(z(),B(`div`,jf,[t[12]||=H(`label`,{class:`ni-field-label`},`实例 ID`,-1),H(`input`,{class:`ni-input`,value:a.schemaNode.componentId,onInput:t[2]||=e=>a.onMetaInput(`componentId`,e.target.value)},null,40,Mf)])):G(``,!0),a.hasField(`name`)?(z(),B(`div`,Nf,[t[13]||=H(`label`,{class:`ni-field-label`},`节点名`,-1),H(`input`,{class:`ni-input`,value:a.schemaNode.name,onInput:t[3]||=e=>a.onMetaInput(`name`,e.target.value)},null,40,Pf)])):G(``,!0)],512),[[Fo,i.secOpen.basic]])]),F(H(`section`,Ff,[H(`div`,{class:`ni-sec-head`,onClick:t[4]||=e=>a.toggleSec(`props`)},[H(`span`,{class:k([`ni-caret`,{"is-open":i.secOpen.props}])},`▸`,2),t[14]||=W(` 组件属性 `,-1)]),F(H(`div`,If,[U(o,{properties:i.model.properties,mode:`property`,plain:!0,onLeafChange:a.onPropChange,onLeafSync:a.onStyleSync},null,8,[`properties`,`onLeafChange`,`onLeafSync`])],512),[[Fo,i.secOpen.props]])],512),[[Fo,i.model.properties.length]]),H(`section`,Lf,[H(`div`,{class:`ni-sec-head`,onClick:t[5]||=e=>a.toggleSec(`style`)},[H(`span`,{class:k([`ni-caret`,{"is-open":i.secOpen.style}])},`▸`,2),t[15]||=W(` 样式 `,-1)]),F(H(`div`,Rf,[U(o,{properties:i.model.styleForm,mode:`style`,watches:a.styleWatches,plain:!0,onLeafChange:a.onStyleChange,onLeafSync:a.onStyleSync},null,8,[`properties`,`watches`,`onLeafChange`,`onLeafSync`])],512),[[Fo,i.secOpen.style]])]),i.model.hasDirectives?(z(),B(`section`,zf,[H(`div`,{class:`ni-sec-head`,onClick:t[6]||=e=>a.toggleSec(`directive`)},[H(`span`,{class:k([`ni-caret`,{"is-open":i.secOpen.directive}])},`▸`,2),t[16]||=W(` 指令 `,-1)]),F(H(`div`,Bf,[i.model.directives.length?(z(),V(o,{key:1,properties:i.model.directives,mode:`directive`,"b-exchange":!1,plain:!0,onLeafChange:a.onPropChange,onLeafSync:a.onStyleSync},null,8,[`properties`,`onLeafChange`,`onLeafSync`])):(z(),B(`p`,Vf,`无指令`))],512),[[Fo,i.secOpen.directive]])])):G(``,!0)])])):(z(),B(`div`,wf,[...t[9]||=[H(`p`,{class:`ni-empty`},`无法定位该节点的原始 schema(_schemaNode 缺失)`,-1)]])),H(`div`,Hf,[t[17]||=H(`span`,{class:`ni-tip`},`编辑即时预览(不记历史);「取消」丢弃改动并还原,「应用」写入历史并关闭,落盘由顶栏「保存到本地」负责`,-1),H(`div`,Uf,[H(`button`,{class:`ni-btn ni-btn--ghost`,type:`button`,onClick:t[7]||=(...e)=>a.onCancel&&a.onCancel(...e)},`取消`),H(`button`,{class:`ni-btn`,type:`button`,onClick:t[8]||=(...e)=>a.onApplyWrite&&a.onApplyWrite(...e)},`应用`)])])])])}var Gf=Z(vf,[[`render`,Wf]]),Kf={_source:`docs/动态卡片方案详细说明.md(JSAPI 章节)+ src/cards/*/schema.json 实测形态`,_note:`事件动作元数据。properties 采用与 component-meta / style-meta 完全一致的 Property meta 形态,可直接喂给 Property / PropTree / PropControl,无需任何专用渲染分支。itemRequired 的项在导出时总是写回 schema(对齐线上:customAction 永远带 function 项);非必填项只有在 schema 原本就有、或用户改过值时才写回,避免把默认值污染进 DSL 产品数据。`,lifecycleEvents:[{eventKey:`onReady`,eventName:`初始化完成`,eventDesc:`卡片渲染就绪时执行一次`}],actions:[{actionType:`customAction`,actionName:`自定义动作`,actionDesc:`执行一段 JavaScript。this 为卡片上下文:state / data / setData / setRootData / postMessage / addEventListener`,properties:[{itemId:`001`,itemKey:`function`,itemName:`脚本`,itemType:`Code`,itemTypeRange:`const`,itemRequired:!0,itemDefaultValue:{},itemOption:{language:`javascript`,codeKey:`code`},itemDesc:`事件回调函数体,形参为 event`}]},{actionType:`startRouter`,actionName:`路由跳转`,actionDesc:`ynet.callJSAPI('startRouter', { targetUrl, urlType, isLoginNeeded, extra })`,properties:[{itemId:`001`,itemKey:`targetUrl`,itemName:`跳转地址`,itemType:`Input`,itemTypeRange:`const,var`,itemRequired:!0,itemDefaultValue:``,itemDesc:`目标页面地址`},{itemId:`002`,itemKey:`urlType`,itemName:`地址类型`,itemType:`Select`,itemTypeRange:`const`,itemRequired:!0,itemDefaultValue:`3`,itemOption:{iParamList:[{key:`2`,value:`离线包`},{key:`3`,value:`在线页面`},{key:`4`,value:`原生页面`}]}},{itemId:`003`,itemKey:`isLoginNeeded`,itemName:`是否需要登录`,itemType:`Select`,itemTypeRange:`const`,itemRequired:!0,itemDefaultValue:`1`,itemOption:{iParamList:[{key:`1`,value:`需要登录`},{key:`0`,value:`不需要登录`}]}},{itemId:`004`,itemKey:`extra`,itemName:`备用参数`,itemType:`Textarea`,itemTypeRange:`const,var`,itemDefaultValue:``,itemDesc:`JSON 文本,透传给原生`}]},{actionType:`sendAiChatMessage`,actionName:`发送智能体消息`,actionDesc:`ynet.callJSAPI('sendAiChatMessage', { message })`,properties:[{itemId:`001`,itemKey:`message`,itemName:`消息内容`,itemType:`Input`,itemTypeRange:`const,var`,itemRequired:!0,itemDefaultValue:``,itemDesc:`发送给智能体的文本`}]},{actionType:`closeAlertCard`,actionName:`关闭弹窗卡片`,actionDesc:`ynet.callJSAPI('closeAlertCard', { cardCode, index, data });三项均可不填,默认关闭最上层弹窗`,properties:[{itemId:`001`,itemKey:`cardCode`,itemName:`卡片编码`,itemType:`Input`,itemTypeRange:`const,var`,itemDefaultValue:``,itemDesc:`按 cardCode 从堆栈自上而下关闭一个;不填则关最上层`},{itemId:`002`,itemKey:`index`,itemName:`关闭层数`,itemType:`InputNumber`,itemTypeRange:`const`,itemDefaultValue:``,itemOption:{max:0,min:-10,step:1},itemDesc:`-1 关一层,-2 关两层,以此类推;优先级高于卡片编码`},{itemId:`003`,itemKey:`data`,itemName:`回传数据`,itemType:`Textarea`,itemTypeRange:`const,var`,itemDefaultValue:``,itemDesc:`JSON 文本,作为 alertCard 的回调参数`}]}]},qf=0,Jf=e=>`${e}_${(++qf).toString(36)}`,Yf=e=>e===void 0?e:JSON.parse(JSON.stringify(e)),Xf=Kf.lifecycleEvents||[],Zf=Kf.actions||[],Qf=Zf.reduce((e,t)=>(e[t.actionType]=t,e),{});function $f(e,t){let n=new Set;return(t||[]).forEach(e=>{e.itemId&&n.add(e.itemId),e.itemKey&&n.add(e.itemKey)}),(e||[]).filter(e=>e&&e.itemId&&!n.has(e.itemId)&&!(e.itemKey&&n.has(e.itemKey))).map(e=>Yf(e))}function ep(e,t){let n={};return Object.keys(e||{}).forEach(r=>{t.indexOf(r)<0&&(n[r]=Yf(e[r]))}),n}var tp=class{constructor(e={}){let t=e.event||{},n=e.action||{};this.uid=Jf(`ea`),this.eventKey=t.eventKey||``,this.eventName=t.eventName||``,this.actionType=n.actionType||``,this._extraEvent=ep(t,[`eventKey`,`eventName`]),this._extraAction=ep(n,[`actionType`,`properties`]),this.properties=[],this.extraProperties=[],this.buildProps(n.properties||[])}buildProps(e=[]){let t=(Qf[this.actionType]||{}).properties||[];this.properties=t.map(e=>{let t=new Y(e);return t.itemRequired=!!e.itemRequired,t}),Y.restoreProperty(e,this.properties),Y.updatePropertyVisible(this.properties),this.extraProperties=$f(e,this.properties),this.formKey=Jf(`form`)}isPristine(e){let t=e.itemValue;if(t===``||t==null)return!0;try{return JSON.stringify(t)===JSON.stringify(e.itemDefaultValue)}catch{return t===e.itemDefaultValue}}get summary(){if(this.actionType===`customAction`){let e=this.properties.find(e=>e.itemKey===`function`),t=e&&e.itemValue&&typeof e.itemValue==`object`&&e.itemValue.code||``;if(!t)return`空脚本`;let n=String(t).split(`
|
|
61
|
+
`).find(e=>e.trim())||``;return n.trim().slice(0,46)+(n.trim().length>46?`…`:``)}let e=this.properties.filter(e=>!this.isPristine(e));return e.length?e.map(e=>`${e.itemName}=${String(e.itemValue).slice(0,20)}`).join(`,`):`未配置参数`}exportProps(){let e=[];return this.properties.forEach(t=>{if(!(t.itemRequired||t.itemUpdated||!this.isPristine(t)))return;let n=t.onExport();n&&e.push(n)}),e.concat(this.extraProperties.map(e=>Yf(e)))}},np=class{constructor(e={}){this.schemaNode=e,this.className=e.className||`Root`;let t=hf(this.className)||{};this.metaEvents=(t.events||[]).map(e=>Yf(e)),this.hadKey=Object.prototype.hasOwnProperty.call(e,`eventactions`),this.rows=(e.eventactions||[]).map(e=>new tp(e))}get count(){return this.rows.length}get eventOptions(){let e=new Set,t=[];return(this.className===`Root`?this.metaEvents.concat(Xf):this.metaEvents).forEach(n=>{!n||!n.eventKey||e.has(n.eventKey)||(e.add(n.eventKey),t.push(n))}),t}eventOptionsFor(e){let t=this.eventOptions;return e.eventKey&&!t.some(t=>t.eventKey===e.eventKey)?t.concat([{eventKey:e.eventKey,eventName:e.eventName||e.eventKey,_unknown:!0}]):t}actionOptionsFor(e){let t=this.eventOptions.find(t=>t.eventKey===e.eventKey),n=t&&t.includes,r=n&&n.length?Zf.filter(e=>n.indexOf(e.actionType)>=0):Zf;return e.actionType&&!r.some(t=>t.actionType===e.actionType)?r.concat([{actionType:e.actionType,actionName:e.actionType,_unknown:!0}]):r}eventNameOf(e){let t=this.eventOptions.find(t=>t.eventKey===e);return t?t.eventName:``}get eventactionMap(){let e={};return this.rows.forEach(t=>{t.eventKey&&(e[t.eventKey]=t)}),e}rowForEvent(e){return this.eventactionMap[e]||null}toggleEvent(e){let t=e&&e.eventKey;if(!t)return;let n=this.rowForEvent(t);if(n)this.removeRow(n);else{let n=this.actionOptionsForEvent(t,``),r=n.length?n[0].actionType:`customAction`,i=new tp({event:{eventKey:t,eventName:e.eventName||this.eventNameOf(t)},action:{actionType:r,properties:[]}});this.rows.push(i)}}actionOptionsForEvent(e,t){let n=this.eventOptions.find(t=>t.eventKey===e),r=n&&n.includes,i=r&&r.length?Zf.filter(e=>r.indexOf(e.actionType)>=0):Zf;return t&&!i.some(e=>e.actionType===t)?i.concat([{actionType:t,actionName:t,_unknown:!0}]):i}setEventKey(e,t){e.eventKey=t||``,e.eventName=this.eventNameOf(e.eventKey)||e.eventName;let n=this.actionOptionsFor(e);e.actionType&&!n.some(t=>t.actionType===e.actionType)&&n.length&&this.setActionType(e,n[0].actionType)}setActionType(e,t){if(t===e.actionType)return;let n={};e.properties.forEach(e=>{e.itemKey&&(n[e.itemKey]={itemValue:Yf(e.itemValue),itemValueFrom:e.itemValueFrom})}),e.actionType=t||``,e.buildProps([]),e.properties.forEach(e=>{let t=n[e.itemKey];!t||t.itemValue===``||t.itemValue==null||(e.itemValue=t.itemValue,e.itemValueFrom=t.itemValueFrom,e.itemUpdated=!0)}),Y.updatePropertyVisible(e.properties)}addRow(){let e=this.eventOptions[0],t=new tp({event:e?{eventKey:e.eventKey,eventName:e.eventName}:{},action:{actionType:`customAction`,properties:[]}});return this.rows.push(t),t}removeRow(e){let t=this.rows.indexOf(e);t>=0&&this.rows.splice(t,1)}moveRow(e,t){if(e<0||e>=this.rows.length)return;let n=Math.max(0,Math.min(this.rows.length-1,t));if(n===e)return;let[r]=this.rows.splice(e,1);this.rows.splice(n,0,r)}refreshVisible(){this.rows.forEach(e=>Y.updatePropertyVisible(e.properties))}export(){return this.rows.map(e=>{let t=e.eventKey?Object.assign({},e._extraEvent,{eventName:this.eventNameOf(e.eventKey)||e.eventName||void 0,eventKey:e.eventKey}):Object.assign({},e._extraEvent);return t.eventName===void 0&&delete t.eventName,{event:t,action:Object.assign({},e._extraAction,{actionType:e.actionType,properties:e.exportProps()})}})}applyToSchema(){!this.hadKey&&!this.rows.length||(this.schemaNode.eventactions=this.export(),this.hadKey=!0)}},rp={name:`EventEditor`,props:{comp:{type:Object,required:!0},compNames:{type:Object,default:()=>({})},rt:{type:Object,required:!0}},emits:[`apply`,`commit`,`close`],data(){return{eventModel:null,activeKey:``,helpOpen:!1,_t:null,_snapshot:null,_dirty:!1,_written:!1}},computed:{schemaNode(){return this.comp&&this.comp._schemaNode||null},compName(){let e=this.schemaNode&&this.schemaNode.className;return e?this.compNames&&this.compNames[e]||e:`节点`},activeRow(){return!this.eventModel||!this.activeKey?null:this.eventModel.rowForEvent(this.activeKey)||null},helpText(){return(this.activeRow?this.actionDesc(this.activeRow.actionType):``)||`先在上方开启事件,再选择动作类型并填写参数;编辑即时预览,「应用」写入历史。`}},watch:{comp:{immediate:!0,handler(){this.buildModel()}}},methods:{buildModel(){let e=this.schemaNode;this.eventModel=e?M(new np(e)):null,this.activeKey=``,this.helpOpen=!1,this._snapshot=e?this.snapshotEventActions(e):null,this._dirty=!1,this._written=!1,this.autoSelect()},snapshotEventActions(e){let t=Object.prototype.hasOwnProperty.call(e,`eventactions`);return{hadKey:t,eventactions:t?JSON.parse(JSON.stringify(e.eventactions||[])):[]}},restoreSnapshot(){let e=this.schemaNode;!e||!this._snapshot||(this._snapshot.hadKey?e.eventactions=JSON.parse(JSON.stringify(this._snapshot.eventactions||[])):delete e.eventactions)},autoSelect(){if(!this.eventModel){this.activeKey=``;return}let e=this.eventModel.eventOptions.find(e=>this.eventModel.rowForEvent(e.eventKey));this.activeKey=e?e.eventKey:``},isOn(e){return!!(this.eventModel&&this.eventModel.rowForEvent(e.eventKey))},onSelectEvent(e){this.activeKey=e.eventKey},onToggleEvent(e){let t=this.isOn(e);this.eventModel.toggleEvent(e),this._dirty=!0,t?this.activeKey===e.eventKey&&(this.activeKey=``):this.activeKey=e.eventKey,this.scheduleApply()},actionOptions(e){return(this.eventModel.actionOptionsForEvent(e.eventKey,e.actionType)||[]).map(e=>({key:e.actionType,value:e.actionName+(e._unknown?` · meta 未定义`:``)}))},actionDesc(e){return Qf[e]&&Qf[e].actionDesc||``},onActionType(e,t){this.eventModel.setActionType(e,t),this._dirty=!0,this.scheduleApply()},onEventLeaf(){this.eventModel.refreshVisible(),this._dirty=!0,this.scheduleApply()},scheduleApply(){this._t&&clearTimeout(this._t),this._t=setTimeout(()=>{this.applyAll(),this.$emit(`apply`)},250)},applyAll(){this.eventModel&&this.eventModel.applyToSchema()},onApplyWrite(){this._t&&=(clearTimeout(this._t),null),this.applyAll(),this._written=!0,this.$emit(`apply`),this.$emit(`commit`),this.$emit(`close`)},onCancel(){this.onClose()},onClose(){this._t&&=(clearTimeout(this._t),null),this._dirty&&!this._written&&(this.restoreSnapshot(),this.$emit(`apply`)),this.$emit(`close`)}}},ip={class:`ee-overlay`},ap={class:`ee-panel`},op={class:`ee-head`},sp={class:`ee-title`},cp={class:`ee-cls`},lp={class:`ee-body`},up={class:`ee-side`},dp={key:0,class:`ee-empty`},fp={key:1,class:`ee-evt-list`},pp=[`onClick`],mp=[`title`],hp=[`aria-checked`,`onClick`],gp=[`title`],_p={class:`ee-help__text`},vp={class:`ee-detail`},yp={class:`ee-detail-head`},bp={class:`ee-field-row`},xp={class:`ee-detail-body`},Sp={key:1,class:`ee-empty`},Cp={key:2,class:`ee-evt-orphan`},wp={key:1,class:`ee-empty ee-detail-empty`},Tp={class:`ee-foot`},Ep={class:`ee-foot-btns`};function Dp(e,t,n,r,i,a){let o=I(`Dropdown`),s=I(`prop-tree`);return z(),B(`div`,ip,[H(`div`,ap,[H(`div`,op,[H(`span`,sp,[W(` 事件配置 · `+A(a.compName)+` `,1),H(`em`,cp,A(a.schemaNode&&a.schemaNode.className),1)]),H(`button`,{class:`ee-close`,type:`button`,onClick:t[0]||=(...e)=>a.onClose&&a.onClose(...e)})]),H(`div`,lp,[H(`aside`,up,[!i.eventModel||!i.eventModel.eventOptions.length?(z(),B(`p`,dp,`该节点无可用事件`)):(z(),B(`div`,fp,[(z(!0),B(R,null,L(i.eventModel.eventOptions,e=>(z(),B(`div`,{key:e.eventKey,class:k([`ee-evt`,{"is-on":a.isOn(e),"is-sel":i.activeKey===e.eventKey}]),onClick:t=>a.onSelectEvent(e)},[H(`span`,{class:`ee-evt-name`,title:e.eventDesc||e.eventName||e.eventKey},A(e.eventName||e.eventKey),9,mp),H(`button`,{class:k([`ee-switch`,{"is-on":a.isOn(e)}]),type:`button`,role:`switch`,"aria-checked":a.isOn(e),onClick:q(t=>a.onToggleEvent(e),[`stop`])},[...t[7]||=[H(`span`,{class:`ee-switch__dot`},null,-1)]],10,hp)],10,pp))),128))])),H(`button`,{class:`ee-help`,type:`button`,title:i.helpOpen?`关闭使用说明`:`使用说明`,onClick:t[1]||=q(e=>i.helpOpen=!i.helpOpen,[`stop`])},[...t[8]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`circle`,{cx:`12`,cy:`12`,r:`10`}),H(`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}),H(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})],-1)]],8,gp),i.helpOpen?(z(),B(`div`,{key:2,class:`ee-help__mask`,onClick:t[2]||=e=>i.helpOpen=!1})):G(``,!0),U(_o,{name:`pop`},{default:P(()=>[i.helpOpen?(z(),B(`div`,{key:0,class:`ee-help__pop`,onClick:t[3]||=q(()=>{},[`stop`])},[H(`p`,_p,A(a.helpText),1)])):G(``,!0)]),_:1})]),H(`section`,vp,[a.activeRow?(z(),B(R,{key:0},[H(`div`,yp,[H(`div`,bp,[t[9]||=H(`label`,{class:`ee-field-label`},`动作类型`,-1),U(o,{value:a.activeRow.actionType,options:a.actionOptions(a.activeRow),size:`sm`,block:``,onChange:t[4]||=e=>a.onActionType(a.activeRow,e)},null,8,[`value`,`options`])])]),H(`div`,xp,[a.activeRow.properties.length?(z(),V(s,{key:a.activeRow.formKey,properties:a.activeRow.properties,mode:`event`,plain:!0,onLeafChange:a.onEventLeaf},null,8,[`properties`,`onLeafChange`])):(z(),B(`p`,Sp,`该动作无可配置参数`)),a.activeRow.extraProperties.length?(z(),B(`p`,Cp,` 另有 `+A(a.activeRow.extraProperties.length)+` 项 meta 未定义的参数,已原样保留 `,1)):G(``,!0)])],64)):(z(),B(`p`,wp,`请在左侧开启并选择一个事件`))])]),H(`div`,Tp,[t[10]||=H(`span`,{class:`ee-tip`},`编辑即时预览(不记历史);「应用」写入历史并关闭,落盘由顶栏「保存到本地」负责`,-1),H(`div`,Ep,[H(`button`,{class:`ee-btn ee-btn--ghost`,type:`button`,onClick:t[5]||=(...e)=>a.onCancel&&a.onCancel(...e)},`取消`),H(`button`,{class:`ee-btn`,type:`button`,onClick:t[6]||=(...e)=>a.onApplyWrite&&a.onApplyWrite(...e)},`应用`)])])])])}var Op=Z(rp,[[`render`,Dp]]),kp={name:`ApiPayloadTree`,props:{value:{default:()=>({})},depth:{type:Number,default:0},path:{type:Array,default:()=>[]},openState:{type:Object,default:null},rootKeyLabel:{type:[String,Number,null],default:null},maxDepth:{type:Number,default:100},rootCollapsed:{type:Boolean,default:!1}},data(){return{localOpenState:this.openState||M({}),rootOpen:!1}},computed:{isRoot(){return this.depth===0},isArrayRoot(){return Array.isArray(this.value)},rootCount(){return this.isArrayRoot?this.value.length:Object.keys(this.value||{}).length},state(){return this.openState||this.localOpenState},entries(){let e=this.value;return Array.isArray(e)?e.map((e,t)=>this.makeEntry(String(t),e,!0,t)):e&&typeof e==`object`?Object.keys(e).map(t=>this.makeEntry(t,e[t],!1,t)):[]}},methods:{typeOf(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e},isComplex(e){return typeof e==`object`&&!!e},makeEntry(e,t,n,r){let i=Array.isArray(t);return{keyLabel:e,value:t,isArray:i,count:i?t.length:t&&typeof t==`object`?Object.keys(t).length:0,type:this.typeOf(t),path:[...this.path,r]}},pathKey(e){return e.path.join(`/`)},isOpen(e){let t=this.state[this.pathKey(e)];return t!==void 0&&t},canExpand(e){return this.isComplex(e.value)&&this.depth<this.maxDepth},toggle(e){let t=this.pathKey(e);this.state[t]=!this.isOpen(e)},preview(e){if(Array.isArray(e))return` … `+e.length+` 项`;let t=Object.keys(e);return` … `+t.slice(0,3).join(`, `)+(t.length>3?`, …`:``)+` `},format(e){return e===null?`null`:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e)}}},Ap={key:0,class:`apt__leaf apt__leaf--root`},jp={key:0,class:`jt__key`},Mp={key:1,class:`jt__colon`},Np={class:`jt__bracket`},Pp={key:0,class:`jt__preview`},Fp={key:1,class:`jt__count`},Ip={key:2,class:`jt__bracket`},Lp=[`onClick`],Rp={key:0,class:`jt__key`},zp={class:`jt__bracket`},Bp={class:`jt__preview`},Vp={class:`jt__bracket`},Hp={key:1,class:`apt__leaf`},Up={key:0,class:`jt__key`},Wp={key:1,class:`jt__colon`},Gp={key:2,class:`apt__leaf`},Kp={key:0,class:`jt__key`},qp={key:1,class:`jt__colon`},Jp={key:3,class:`apt__children`},Yp={class:`apt__close`},Xp={class:`jt__bracket`},Zp={class:`jt__count`},Qp={key:1,class:`apt__close`},$p={class:`jt__bracket`},em={class:`jt__count`};function tm(e,t,n,r,i,a){let o=I(`ApiPayloadTree`,!0);return z(),B(`div`,{class:k([`apt`,{"apt--root":a.isRoot}])},[a.isComplex(n.value)?(z(),B(R,{key:1},[n.rootCollapsed&&a.isRoot?(z(),B(`div`,{key:0,class:`apt__branch apt__branch--root`,onClick:t[0]||=e=>i.rootOpen=!i.rootOpen},[H(`span`,{class:k([`apt__caret`,{"apt__caret--open":i.rootOpen}])},`▶`,2),H(`span`,Np,A(a.isArrayRoot?`[`:`{`),1),i.rootOpen?(z(),B(`span`,Fp,A(a.rootCount)+` `+A(a.isArrayRoot?`项`:`键`),1)):(z(),B(`span`,Pp,A(a.preview(n.value)),1)),i.rootOpen?G(``,!0):(z(),B(`span`,Ip,A(a.isArrayRoot?`]`:`}`),1))])):G(``,!0),F(H(`div`,{class:k([`apt__list`,{"apt__list--nested":n.rootCollapsed&&a.isRoot&&i.rootOpen}])},[(z(!0),B(R,null,L(a.entries,(e,r)=>(z(),B(`div`,{key:r,class:`apt__node`},[a.canExpand(e)?(z(),B(`div`,{key:0,class:`apt__branch`,onClick:t=>a.toggle(e)},[H(`span`,{class:k([`apt__caret`,{"apt__caret--open":a.isOpen(e)}])},`▶`,2),e.keyLabel===null?G(``,!0):(z(),B(`span`,Rp,A(e.keyLabel),1)),H(`span`,zp,A(e.isArray?`[`:`{`),1),a.isOpen(e)?G(``,!0):(z(),B(R,{key:1},[H(`span`,Bp,A(a.preview(e.value)),1),H(`span`,Vp,A(e.isArray?`]`:`}`),1)],64))],8,Lp)):a.isComplex(e.value)?(z(),B(`div`,Hp,[t[2]||=H(`span`,{class:`apt__caret apt__caret--leaf`},`▶`,-1),e.keyLabel===null?G(``,!0):(z(),B(`span`,Up,A(e.keyLabel),1)),e.keyLabel===null?G(``,!0):(z(),B(`span`,Wp,`:`)),H(`span`,{class:k([`jt__val`,`jt__val--`+(e.isArray?`array`:`object`)])},A(e.count)+` `+A(e.isArray?`项`:`键`)+`(已折叠)`,3)])):(z(),B(`div`,Gp,[t[3]||=H(`span`,{class:`apt__caret apt__caret--leaf`},`▶`,-1),e.keyLabel===null?G(``,!0):(z(),B(`span`,Kp,A(e.keyLabel),1)),e.keyLabel===null?G(``,!0):(z(),B(`span`,qp,`:`)),H(`span`,{class:k([`jt__val`,`jt__val--`+e.type])},A(a.format(e.value)),3)])),a.isComplex(e.value)&&a.isOpen(e)?(z(),B(`div`,Jp,[U(o,{value:e.value,depth:n.depth+1,path:e.path,"open-state":a.state,"max-depth":n.maxDepth},null,8,[`value`,`depth`,`path`,`open-state`,`max-depth`]),H(`div`,Yp,[H(`span`,Xp,A(e.isArray?`]`:`}`),1),H(`span`,Zp,A(e.count)+` `+A(e.isArray?`项`:`键`),1)])])):G(``,!0)]))),128))],2),[[Fo,!(n.rootCollapsed&&a.isRoot)||i.rootOpen]]),n.rootCollapsed&&a.isRoot&&i.rootOpen?(z(),B(`div`,Qp,[H(`span`,$p,A(a.isArrayRoot?`]`:`}`),1),H(`span`,em,A(a.rootCount)+` `+A(a.isArrayRoot?`项`:`键`),1)])):G(``,!0)],64)):(z(),B(`div`,Ap,[t[1]||=H(`span`,{class:`apt__caret apt__caret--leaf`},`▶`,-1),n.rootKeyLabel===null?G(``,!0):(z(),B(`span`,jp,A(n.rootKeyLabel),1)),n.rootKeyLabel===null?G(``,!0):(z(),B(`span`,Mp,`:`)),H(`span`,{class:k([`jt__val`,`jt__val--`+a.typeOf(n.value)])},A(a.format(n.value)),3)]))],2)}var nm=Z(kp,[[`render`,tm]]),rm={name:`LogValue`,components:{ApiPayloadTree:nm},props:{value:{default:null}},computed:{complex(){return this.value!==null&&typeof this.value==`object`},typeClass(){if(this.value===null||this.value===void 0)return`null`;if(Array.isArray(this.value))return`array`;let e=typeof this.value;return e===`string`||e===`number`||e===`boolean`?e:`null`},display(){let e=this.value;if(e===void 0)return`undefined`;if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`function`)return`[Function `+(e.name||`anonymous`)+`]`;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}}},im={key:1,class:`log__json`};function am(e,t,n,r,i,a){let o=I(`ApiPayloadTree`);return a.complex?(z(),B(`div`,im,[U(o,{value:n.value,"max-depth":14,"root-collapsed":``},null,8,[`value`])])):(z(),B(`span`,{key:0,class:k([`log__val`,`jt__val--`+a.typeClass])},A(a.display),3))}var om=Z(rm,[[`render`,am]]),sm=window;function cm(e,t,n={}){let r={tab:` `,indentOn:/[({\[]$/,moveToNewLine:/^[)}\]]/,spellcheck:!1,catchTab:!0,preserveIdent:!0,addClosing:!0,history:!0,window:sm,autoclose:{open:`([{'"`,close:`)]}'"`},...n},i=r.window,a=i.document,o=[],s=[],c=-1,l=!1,u=()=>void 0,d;e.setAttribute(`contenteditable`,`plaintext-only`),e.setAttribute(`spellcheck`,r.spellcheck?`true`:`false`),e.style.outline=`none`,e.style.overflowWrap=`break-word`,e.style.overflowY=`auto`,e.style.whiteSpace=`pre-wrap`;let f=(e,n)=>{t(e,n)},p=i.navigator.userAgent.match(/Firefox\/([0-9]+)\./),m=p?parseInt(p[1]):0,h=!1;(e.contentEditable!==`plaintext-only`||m>=136)&&(h=!0),h&&e.setAttribute(`contenteditable`,`true`);let g=pe(()=>{let t=x();f(e,t),S(t)},30),_=!1,v=e=>!ce(e)&&!le(e)&&e.key!==`Meta`&&e.key!==`Control`&&e.key!==`Alt`&&!e.key.startsWith(`Arrow`),y=pe(e=>{v(e)&&(ie(),_=!1)},300),b=(t,n)=>{o.push([t,n]),e.addEventListener(t,n)};b(`keydown`,e=>{e.defaultPrevented||(d=he(),r.preserveIdent?w(e):T(e),r.catchTab&&E(e),r.addClosing&&ne(e),r.history&&(re(e),v(e)&&!_&&(ie(),_=!0)),h&&!ue(e)&&S(x()))}),b(`keyup`,e=>{e.defaultPrevented||e.isComposing||(d!==he()&&g(),y(e),u(he()))}),b(`focus`,e=>{l=!0}),b(`blur`,e=>{l=!1}),b(`paste`,e=>{ie(),ae(e),ie(),u(he())}),b(`cut`,e=>{ie(),oe(e),ie(),u(he())});function x(){let t=_e(),n={start:0,end:0,dir:void 0},{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=t;if(!r||!o)throw`error1`;if(r===e&&o===e)return n.start=i>0&&e.textContent?e.textContent.length:0,n.end=s>0&&e.textContent?e.textContent.length:0,n.dir=s>=i?`->`:`<-`,n;if(r.nodeType===Node.ELEMENT_NODE){let e=a.createTextNode(``);r.insertBefore(e,r.childNodes[i]),r=e,i=0}if(o.nodeType===Node.ELEMENT_NODE){let e=a.createTextNode(``);o.insertBefore(e,o.childNodes[s]),o=e,s=0}return se(e,e=>{if(e===r&&e===o)return n.start+=i,n.end+=s,n.dir=i<=s?`->`:`<-`,`stop`;if(e===r)if(n.start+=i,!n.dir)n.dir=`->`;else return`stop`;else if(e===o)if(n.end+=s,!n.dir)n.dir=`<-`;else return`stop`;e.nodeType===Node.TEXT_NODE&&(n.dir!=`->`&&(n.start+=e.nodeValue.length),n.dir!=`<-`&&(n.end+=e.nodeValue.length))}),e.normalize(),n}function S(t){let n=_e(),r,i=0,o,s=0;if(t.dir||=`->`,t.start<0&&(t.start=0),t.end<0&&(t.end=0),t.dir==`<-`){let{start:e,end:n}=t;t.start=n,t.end=e}let c=0;se(e,e=>{if(e.nodeType!==Node.TEXT_NODE)return;let n=(e.nodeValue||``).length;if(c+n>t.start&&(r||(r=e,i=t.start-c),c+n>t.end))return o=e,s=t.end-c,`stop`;c+=n}),r||(r=e,i=e.childNodes.length),o||(o=e,s=e.childNodes.length),t.dir==`<-`&&([r,i,o,s]=[o,s,r,i]);{let e=C(r);if(e){let t=a.createTextNode(``);e.parentNode?.insertBefore(t,e),r=t,i=0}let t=C(o);if(t){let e=a.createTextNode(``);t.parentNode?.insertBefore(e,t),o=e,s=0}}n.setBaseAndExtent(r,i,o,s),e.normalize()}function C(t){for(;t&&t!==e;){if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(e.getAttribute(`contenteditable`)==`false`)return e}t=t.parentNode}}function ee(){let t=_e().getRangeAt(0),n=a.createRange();return n.selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset),n.toString()}function te(){let t=_e().getRangeAt(0),n=a.createRange();return n.selectNodeContents(e),n.setStart(t.endContainer,t.endOffset),n.toString()}function w(e){if(e.key===`Enter`){let t=ee(),n=te(),[i]=me(t),a=i;if(r.indentOn.test(t)&&(a+=r.tab),a.length>0?(ge(e),e.stopPropagation(),fe(`
|
|
62
|
+
`+a)):T(e),a!==i&&r.moveToNewLine.test(n)){let e=x();fe(`
|
|
63
|
+
`+i),S(e)}}}function T(e){if(h&&e.key===`Enter`)if(ge(e),e.stopPropagation(),te()==``){fe(`
|
|
64
|
+
`);let e=x();e.start=--e.end,S(e)}else fe(`
|
|
65
|
+
`)}function ne(e){let t=r.autoclose.open,n=r.autoclose.close;if(t.includes(e.key)){ge(e);let r=x(),i=r.start==r.end?``:_e().toString();fe(e.key+i+(n[t.indexOf(e.key)]??``)),r.start++,r.end++,S(r)}}function E(e){if(e.key===`Tab`)if(ge(e),e.shiftKey){let[e,t]=me(ee());if(e.length>0){let n=x(),i=Math.min(r.tab.length,e.length);S({start:t,end:t+i}),a.execCommand(`delete`),n.start-=i,n.end-=i,S(n)}}else fe(r.tab)}function re(t){if(ce(t)){ge(t),c--;let n=s[c];n&&(e.innerHTML=n.html,S(n.pos)),c<0&&(c=0)}if(le(t)){ge(t),c++;let n=s[c];n&&(e.innerHTML=n.html,S(n.pos)),c>=s.length&&c--}}function ie(){if(!l)return;let t=e.innerHTML,n=x(),r=s[c];r&&r.html===t&&r.pos.start===n.start&&r.pos.end===n.end||(c++,s[c]={html:t,pos:n},s.splice(c+1),c>300&&(c=300,s.splice(0,1)))}function ae(t){if(t.defaultPrevented)return;ge(t);let n=(t.originalEvent??t).clipboardData.getData(`text/plain`).replace(/\r\n?/g,`
|
|
66
|
+
`),r=x();fe(n),f(e),S({start:Math.min(r.start,r.end)+n.length,end:Math.min(r.start,r.end)+n.length,dir:`<-`})}function oe(t){let n=x(),r=_e();(t.originalEvent??t).clipboardData.setData(`text/plain`,r.toString()),a.execCommand(`delete`),f(e),S({start:Math.min(n.start,n.end),end:Math.min(n.start,n.end),dir:`<-`}),ge(t)}function se(e,t){let n=[];e.firstChild&&n.push(e.firstChild);let r=n.pop();for(;r&&t(r)!==`stop`;)r.nextSibling&&n.push(r.nextSibling),r.firstChild&&n.push(r.firstChild),r=n.pop()}function D(e){return e.metaKey||e.ctrlKey}function ce(e){return D(e)&&!e.shiftKey&&de(e)===`Z`}function le(e){return D(e)&&e.shiftKey&&de(e)===`Z`}function ue(e){return D(e)&&de(e)===`C`}function de(e){let t=e.key||e.keyCode||e.which;if(t)return(typeof t==`string`?t:String.fromCharCode(t)).toUpperCase()}function fe(e){e=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),a.execCommand(`insertHTML`,!1,e)}function pe(e,t){let n=0;return(...r)=>{clearTimeout(n),n=i.setTimeout(()=>e(...r),t)}}function me(e){let t=e.length-1;for(;t>=0&&e[t]!==`
|
|
67
|
+
`;)t--;t++;let n=t;for(;n<e.length&&/[ \t]/.test(e[n]);)n++;return[e.substring(t,n)||``,t,n]}function he(){return e.textContent||``}function ge(e){e.preventDefault()}function _e(){return e.getRootNode().getSelection()}return{updateOptions(e){Object.assign(r,e)},updateCode(t,n=!0){e.textContent=t,f(e),n&&u(t)},onUpdate(e){u=e},toString:he,save:x,restore:S,recordHistory:ie,destroy(){for(let[t,n]of o)e.removeEventListener(t,n)}}}var lm=c(o(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&`).replace(/</g,`<`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`"`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var ee=S.value;if(t.length>e.length)return;if(!(ee instanceof a)){var te=1,w;if(v){if(w=o(x,C,e,_),!w||w.index>=e.length)break;var T=w.index,ne=w.index+w[0].length,E=C;for(E+=S.value.length;T>=E;)S=S.next,E+=S.value.length;if(E-=S.value.length,C=E,S.value instanceof a)continue;for(var re=S;re!==t.tail&&(E<ne||typeof re.value==`string`);re=re.next)te++,E+=re.value.length;te--,ee=e.slice(C,E),w.index-=C}else if(w=o(x,0,ee,_),!w)continue;var T=w.index,ie=w[0],ae=ee.slice(0,T),oe=ee.slice(T+ie.length),se=C+ee.length;d&&se>d.reach&&(d.reach=se);var D=S.prev;ae&&(D=l(t,D,ae),C+=ae.length),u(t,D,te);var ce=new a(f,g?i.tokenize(ie,g):ie,y,ie);if(S=l(t,D,ce),oe&&l(t,S,oe),te>1){var le={cause:f+`,`+m,reach:se};s(e,t,n,S.prev,C,le),d&&le.reach>d.reach&&(d.reach=le.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
|
|
68
|
+
`),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))());Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},Prism.languages.webmanifest=Prism.languages.json;var um=/\x1b\[[0-9;:?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b[@-Z\\-_]/g;function dm(e){return String(e??``).replace(um,``)}var fm=[[0,0,0],[170,0,0],[0,170,0],[170,85,0],[0,0,170],[170,0,170],[0,170,170],[170,170,170]],pm=[[85,85,85],[255,85,85],[85,255,85],[255,255,85],[85,85,255],[255,85,255],[85,255,255],[255,255,255]];function mm(e){let t=Math.round(Number(e));return Number.isFinite(t)?t<0?0:t>255?255:t:0}function hm(e){let t=mm(e);if(t<8)return fm[t];if(t<16)return pm[t-8];if(t<232){let e=t-16,n=e=>e?e*40+55:0;return[n(Math.floor(e/36)),n(Math.floor(e%36/6)),n(e%6)]}let n=8+(t-232)*10;return[n,n,n]}function gm(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function _m(e){return`rgb(${e[0]},${e[1]},${e[2]})`}function vm(){return{fg:null,bg:null,bold:!1,dim:!1,italic:!1,underline:!1}}function ym(e){return!e.fg&&!e.bg&&!e.bold&&!e.dim&&!e.italic&&!e.underline}function bm(e){let t=[],n=e.fg;return n&&n.basic!=null&&(n={rgb:e.bold?pm[n.basic]:fm[n.basic]}),n&&t.push(`color:${_m(n.rgb)}`),e.bg&&t.push(`background-color:${_m(e.bg.rgb)}`),e.bold&&t.push(`font-weight:600`),e.dim&&t.push(`opacity:.72`),e.italic&&t.push(`font-style:italic`),e.underline&&t.push(`text-decoration:underline`),t.join(`;`)}function xm(e,t){let n=String(t||``),r=(n===``?`0`:n).split(/[;:]/).map(e=>e===``?0:Number(e));for(let t=0;t<r.length;t++){let n=r[t];if(Number.isFinite(n)){if(n===0)Object.assign(e,vm());else if(n===1)e.bold=!0;else if(n===2)e.dim=!0;else if(n===3)e.italic=!0;else if(n===4)e.underline=!0;else if(n===22)e.bold=!1,e.dim=!1;else if(n===23)e.italic=!1;else if(n===24)e.underline=!1;else if(n===39)e.fg=null;else if(n===49)e.bg=null;else if(n>=30&&n<=37)e.fg={basic:n-30};else if(n>=90&&n<=97)e.fg={rgb:pm[n-90]};else if(n>=40&&n<=47)e.bg={basic:n-40};else if(n>=100&&n<=107)e.bg={rgb:pm[n-100]};else if(n===38||n===48){let i=r[t+1],a=null,o=0;i===5?(a=hm(r[t+2]),o=2):i===2&&(a=[mm(r[t+2]),mm(r[t+3]),mm(r[t+4])],o=4),a&&(n===38?e.fg={rgb:a}:e.bg={rgb:a},t+=o)}}}}function Sm(e){let t=String(e??``);if(!t)return``;if(t.indexOf(`\x1B`)<0)return gm(t);let n=vm(),r=``,i=0,a;for(um.lastIndex=0;(a=um.exec(t))!==null;){a.index>i&&(r+=Cm(t.slice(i,a.index),n)),i=a.index+a[0].length;let e=a[0];e[1]===`[`&&/[m]$/.test(e)&&xm(n,e.slice(2,-1))}return i<t.length&&(r+=Cm(t.slice(i),n)),r}function Cm(e,t){if(!e)return``;let n=gm(e);if(ym(t))return n;let r=bm(t);return r?`<span style="${r}">${n}</span>`:n}var wm=800;function Tm(e){let t=/^\d{2}:\d{2}:\d{2}\.\d{3}\s+(INFO|OK\s|WARN|ERR)\b/.exec(e);if(t){let e=t[1].trim();return e===`ERR`?`error`:e===`WARN`?`warn`:e===`OK`?`ok`:`info`}return`info`}function Em(e){let t=String(e&&e.text!=null?e.text:``),n=dm(t);return{seq:Number(e&&e.seq)||0,t:Number(e&&e.t)||0,level:Tm(n),plain:n,html:Sm(t)}}function Dm(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Dm(e[r],t[r]))return!1;return!0}var Om={name:`DebugPanel`,components:{JsonTree:Bd,StructureTree:ff,NodeInspector:Gf,EventEditor:Op,LogValue:om},props:{rt:{type:Object,required:!0},preview:{type:Object,default:null},schema:{type:Object,default:null},cardId:{type:String,default:``},reloadToken:{type:Number,default:0},cardCount:{type:Number,default:0},selectedNodeId:{type:String,default:``},moveCollapseToken:{type:Number,default:0},activeTab:{type:String,default:`scope`},devSvcClass:{type:String,default:`app__btn--warn`},devSvcTitle:{type:String,default:``},devSvcLabel:{type:String,default:``},devSvcConn:{type:String,default:``},chromeOff:{type:Boolean,default:!1}},data(){return{copied:!1,copyTimer:null,errorPanel:``,eventTab:`log`,svcLogs:[],svcLogSeq:0,svcLogFloor:0,svcLogLive:!1,svcLogFollow:!0,svcLogDropped:0,svcLogLoading:!1,svcLogErr:``,svcCopied:!1,statePanelOpen:!1,panelH:this.loadPanelH(),panelDragging:!1,inspectingComp:null,inspectKey:0,editingEventComp:null,eventEditorKey:0,rawMode:!1,rawText:``,rawError:``,importMeta:null,tabs:[{key:`scope`,label:`绑定数据`},{key:`structure`,label:`组件结构`},{key:`meta`,label:`卡片来源`}]}},computed:{svcEmptyText(){return this.devSvcConn===`unconfigured`?`未配置本地开发服务`:this.devSvcConn===`open`?`暂无服务日志`:`本地服务未连接`},svcEmptyHint(){return this.svcLogErr?`取历史失败:`+this.svcLogErr+`(本地服务需升级到支持 /__logs 的 cardbuddy 版本)`:this.devSvcConn===`unconfigured`?`在顶栏「连接」中配置本地开发服务地址后,这里会实时镜像该服务终端的彩色输出`:this.devSvcConn===`open`?`cardbuddy 终端的输出(含配色)会实时镜像到这里;试试同步、保存、校验或截图`:`连接恢复后自动继续;服务端保留最近 800 行历史,重连不丢`},scopeText(){this.rt.revision;try{return JSON.stringify(this.rt.rootScope,null,2)}catch{return`(无法序列化)`}},bindingErrors(){return this.rt.errorRev,this.rt.errors.slice()},eventErrors(){return this.rt.errorRev,this.rt.eventErrors.slice()},logs(){return this.rt.logRev,this.rt.eventLogs.slice()},eventCount(){return this.eventErrors.length+this.logs.length},eventStatusClass(){return this.eventErrors.length?`is-error`:this.logs.length?`is-log`:`is-ok`},eventStatusTitle(){return this.eventErrors.length?`查看事件(含错误)`:this.logs.length?`查看事件(含日志)`:`无事件记录`},panelErrors(){return this.errorPanel===`event`?this.eventErrors:this.bindingErrors},compNames(){let e={};for(let t in mc)e[t]=mc[t].name||t;return e.Root=`根`,e},canPaste(){return!!Lc.node},stateDirty(){return this.rt.revision,!Dm(this.rt.state,this.rt.rootScope)}},watch:{errorPanel(e){e===`svclog`?this.startSvcLog():this.stopSvcLog()},cardId:{immediate:!0,handler(){this.rawMode=!1,this.rawError=``,this.destroyJar(),this.inspectingComp=null,this.editingEventComp=null,this.importMeta=null,this.maybeFetchMeta()}},reloadToken(){this.maybeFetchMeta()},activeTab(e){e===`meta`&&this.fetchImportMeta()},schema(){this.inspectingComp=null,this.editingEventComp=null}},mounted(){let e=this.panelH;this.$refs.statePanel&&(this.$refs.statePanel.style.height=e+`px`),this.$refs.errPanel&&(this.$refs.errPanel.style.height=e+`px`)},beforeUnmount(){this.destroyJar(),this.cancelResize(),this.stopSvcLog()},methods:{toggleStatePanel(){this.statePanelOpen=!this.statePanelOpen,this.statePanelOpen&&(this.errorPanel=``)},toggleErrorPanel(e){this.errorPanel=this.errorPanel===e?``:e,this.errorPanel&&(this.statePanelOpen=!1,e===`event`&&(this.eventTab=this.eventErrors.length?`err`:`log`))},startResize(e){if(e.target.closest(`button`))return;this.panelDragging=!0;let t=e.clientY,n=this.panelH,r=Math.max(120,Math.round(window.innerHeight*.6)),i=e=>{this.panelH=e,this.$refs.statePanel&&(this.$refs.statePanel.style.height=e+`px`),this.$refs.errPanel&&(this.$refs.errPanel.style.height=e+`px`)},a=e=>{let a=t-e.clientY;i(Math.min(r,Math.max(120,n+a)))},o=()=>{document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`mousemove`,a),document.removeEventListener(`mouseup`,o),this._resizeMove=this._resizeUp=null,this.panelDragging=!1,this.savePanelH()};this._resizeMove=a,this._resizeUp=o,document.body.style.cursor=`row-resize`,document.body.style.userSelect=`none`,document.addEventListener(`mousemove`,a),document.addEventListener(`mouseup`,o)},cancelResize(){this._resizeMove&&document.removeEventListener(`mousemove`,this._resizeMove),this._resizeUp&&document.removeEventListener(`mouseup`,this._resizeUp),this._resizeMove=this._resizeUp=null,this.panelDragging=!1,document.body.style.cursor=``,document.body.style.userSelect=``},loadPanelH(){try{let e=localStorage.getItem(`cardbuddy:debug-panel-height`);if(e!=null){let t=parseInt(e,10);if(!Number.isNaN(t)){let e=Math.max(120,Math.round(window.innerHeight*.6));return Math.min(e,Math.max(120,t))}}}catch{}return 240},savePanelH(){try{localStorage.setItem(`cardbuddy:debug-panel-height`,String(Math.round(this.panelH)))}catch{}},enterRaw(){this.rawError=``;try{this.rawText=JSON.stringify(this.rt.rootScope,(e,t)=>e===`_schemaNode`?void 0:t,2)}catch(e){this.rawText=``,this.rawError=`无法序列化当前数据:`+(e&&e.message)}this.rawMode=!0,this.$nextTick(()=>this.initJar())},initJar(){let e=this.$refs.rawEditor;if(!e)return;this.destroyJar();let t=e=>{e.innerHTML=lm.default.highlight(e.textContent,lm.default.languages.json,`json`)};this._jar=cm(e,t,{tab:` `,indentOn:/[({[]$/,addClosing:!0,history:!0}),this._jar.updateCode(this.rawText||``),this._jar.onUpdate(e=>{this.rawText=e,this.rawError&&=``}),this.$nextTick(()=>e.focus())},destroyJar(){this._jar&&this._jar.destroy&&this._jar.destroy(),this._jar=null},exitRaw(){this.rawMode=!1,this.rawError=``,this.destroyJar()},saveRaw(){let e=(this.rawText||``).trim();if(!e){this.rawError=`内容不能为空`;return}let t;try{t=JSON.parse(e)}catch(e){this.rawError=`JSON 格式错误:`+e.message;return}if(typeof t!=`object`||!t||Array.isArray(t)){this.rawError=`数据绑定必须是对象({ ... })`;return}this.rt.setRootScope(t),this.$nextTick(()=>this.onCommit()),this.destroyJar(),this.rawMode=!1,this.rawError=``},async copyScope(){let e=``;try{e=JSON.stringify(this.rt.rootScope,null,2)}catch{e=String(this.rt.rootScope)}await ed(e)&&(this.copied=!0,this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copied=!1},1500))},onEditEvent(e){this.editingEventComp=e,this.eventEditorKey++},onApply(){this.$emit(`schema-changed`)},onCommit(){this.$emit(`schema-commit`)},onInspect(e){this.inspectingComp=e,this.inspectKey++},onSelectNode(e){this.$emit(`select-node`,e)},onAddNode(e){this.$emit(`add-node`,e)},onMoveNode(e){this.$emit(`move-node`,e)},onHoverNode(e){this.$emit(`hover-node`,e)},clearEventLogs(){this.rt.clearEventLogs()},async startSvcLog(){this.svcLogFollow=!0,await this.pullSvcLogHistory(0),!this._svcUnsub&&(this._svcUnsub=zs(e=>this.appendSvcLogs(e&&e.lines),e=>{this.svcLogLive=e===`open`,e===`open`&&this.svcLogSeq&&this.pullSvcLogHistory(this.svcLogSeq)}))},stopSvcLog(){this._svcUnsub&&=(this._svcUnsub(),null),this.svcLogLive=!1},async pullSvcLogHistory(e){if(this.svcLogLoading)return;this.svcLogLoading=!0;let t=Math.max(Number(e)||0,this.svcLogFloor);try{let e=await Bs({limit:wm,since:t});if(this.svcLogErr=``,e&&e.enabled===!1)this.svcLogErr=`服务端已关闭日志流(CARDBUDDY_STREAM_LOGS=0)`;else{this.svcLogDropped=e&&e.dropped||0,e&&e.seq&&(this.svcLogSeq=Math.max(this.svcLogSeq,e.seq));let n=(e&&e.lines||[]).map(Em);t?this.appendSvcLogs(n):this.svcLogs=n,this.scrollSvcToBottom(!0)}}catch(e){this.svcLogErr=e&&e.message||String(e)}finally{this.svcLogLoading=!1}},appendSvcLogs(e){let t=Array.isArray(e)?e:[];if(!t.length)return;let n=[];for(let e of t){let t=e&&e.html!=null?e:Em(e),r=Number(t.seq)||0;r&&r<=this.svcLogSeq||(r&&(this.svcLogSeq=r),n.push(t))}if(!n.length)return;let r=this.svcLogs.concat(n);this.svcLogs=r.length>wm?r.slice(r.length-wm):r,this.svcLogFollow&&this.scrollSvcToBottom()},clearSvcLogs(){this.svcLogFloor=this.svcLogSeq,this.svcLogs=[],this.svcLogDropped=0},async copySvcLogs(){await ed(this.svcLogs.map(e=>e.plain).join(`
|
|
69
|
+
`))&&(this.svcCopied=!0,this._svcCopiedTimer&&clearTimeout(this._svcCopiedTimer),this._svcCopiedTimer=setTimeout(()=>{this.svcCopied=!1},1200))},toggleSvcFollow(){this.svcLogFollow=!this.svcLogFollow,this.svcLogFollow&&this.scrollSvcToBottom(!0)},scrollSvcToBottom(e){!e&&!this.svcLogFollow||this.$nextTick(()=>{let e=this.$refs.errBody;e&&(e.scrollTop=e.scrollHeight)})},onErrBodyScroll(){if(this.errorPanel!==`svclog`)return;let e=this.$refs.errBody;e&&(this.svcLogFollow=e.scrollHeight-e.scrollTop-e.clientHeight<24)},fmtTime(e){if(!e)return`--:--:--`;let t=new Date(e),n=e=>String(e).padStart(2,`0`);return n(t.getHours())+`:`+n(t.getMinutes())+`:`+n(t.getSeconds())},maybeFetchMeta(){this.activeTab===`meta`&&this.fetchImportMeta()},async fetchImportMeta(){let e=this.cardId;if(!e){this.importMeta=null;return}try{let t=await J(`/__import-meta/${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();this.importMeta=e.meta||null}else this.importMeta=null}catch{this.importMeta=null}},formatTime(e){if(!e)return`-`;try{return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}catch{return e}}}},km={class:`debug`},Am={class:`debug__tabs`},jm=[`onClick`],Mm={class:`debug__body`},Nm={class:`debug__scope-raw`},Pm={ref:`rawEditor`,class:`debug__raw-editor`,spellcheck:`false`},Fm={key:0,class:`debug__raw-err`},Im={class:`debug__scope-foot`},Lm={class:`debug__scope-tree`},Rm={class:`debug__scope-foot`},zm={key:0,class:`debug__copied`},Bm={key:2,class:`debug__meta`},Vm={key:0,class:`empty-state`},Hm={key:1,class:`debug__meta-list`},Um={class:`debug__meta-row`},Wm={class:`debug__meta-muted`},Gm={class:`debug__meta-row`},Km={class:`debug__meta-row`},qm={class:`debug__meta-row`},Jm={key:0,class:`debug__meta-row`},Ym={class:`debug__meta-row`},Xm={class:`debug__meta-row`},Zm={class:`debug__meta-row`},Qm={class:`debug__meta-row`},$m={key:0,class:`debug__tag debug__tag--warn`,title:`本地已编辑,偏离导入镜像`},eh={key:1,class:`debug__tag debug__tag--ok`},th={key:1,class:`debug__meta-row`},nh={key:0,class:`debug__tag debug__tag--ok`},rh={key:1,class:`debug__tag debug__tag--err`},ih={class:`debug__meta-muted`},ah={key:2,class:`debug__meta-err`},oh={class:`statepanel`,ref:`statePanel`},sh={class:`statepanel__head`},ch={class:`statepanel__tree`},lh={class:`statusbar`},uh=[`title`],dh=[`title`],fh={class:`statusbar__icon`},ph=[`title`],mh={class:`statusbar__icon`},hh=[`title`],gh={class:`statusbar__item statusbar__item--right`},_h={class:`statusbar__item statusbar__item--right`},vh={class:`errpanel`,ref:`errPanel`},yh={class:`errpanel__head`},bh={class:`errpanel__title`},xh={key:0,class:`svclog__meta`},Sh={key:0},Ch={key:1,class:`errpanel__tabs`},wh={class:`errpanel__tab-count`},Th={class:`errpanel__actions`},Eh=[`disabled`],Dh=[`disabled`,`title`],Oh=[`title`],kh=[`disabled`],Ah={key:0,class:`empty-state`},jh={class:`debug__empty`},Mh={class:`empty-state__hint`},Nh={key:1,class:`svclog`},Ph=[`innerHTML`],Fh={key:0,class:`empty-state`},Ih={key:1,class:`debug__list debug__list--log`},Lh={class:`log__time`},Rh={class:`log__content`},zh={key:1,class:`log__empty`},Bh={key:0,class:`empty-state`},Vh={key:1,class:`debug__list`},Hh={class:`err__time`},Uh={class:`debug__kind`},Wh={class:`err__msg`},Gh={key:0,class:`empty-state`},Kh={key:1,class:`debug__list`},qh={class:`err__time`},Jh={class:`debug__kind`},Yh={class:`err__msg`};function Xh(e,t,n,r,i,a){let o=I(`JsonTree`),s=I(`StructureTree`),c=I(`NodeInspector`),l=I(`EventEditor`),u=I(`LogValue`);return z(),B(`aside`,km,[H(`div`,Am,[(z(!0),B(R,null,L(i.tabs,t=>(z(),B(`button`,{key:t.key,class:k([`debug__tab`,{"debug__tab--active":n.activeTab===t.key}]),onClick:n=>e.$emit(`update:activeTab`,t.key)},A(t.label),11,jm))),128))]),H(`div`,Mm,[n.activeTab===`scope`?(z(),B(`div`,{key:0,class:k([`debug__scope-wrap`,{"debug__scope-wrap--raw":i.rawMode}])},[i.rawMode?(z(),B(R,{key:0},[H(`div`,Nm,[H(`div`,Pm,null,512),i.rawError?(z(),B(`p`,Fm,A(i.rawError),1)):G(``,!0)]),H(`div`,Im,[H(`button`,{class:`debug__copy debug__copy--primary`,type:`button`,onClick:t[0]||=(...e)=>a.saveRaw&&a.saveRaw(...e)},[...t[27]||=[H(`svg`,{class:`debug__copy-icn`,viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`use`,{href:`#icon-check`})],-1),W(`应用 `,-1)]]),H(`button`,{class:`debug__copy`,type:`button`,onClick:t[1]||=(...e)=>a.exitRaw&&a.exitRaw(...e)},`取消`)])],64)):(z(),B(R,{key:1},[H(`div`,Lm,[U(o,{data:n.rt.rootScope,rt:n.rt,editable:!0,schema:n.schema},null,8,[`data`,`rt`,`schema`])]),H(`div`,Rm,[i.copied?(z(),B(`span`,zm,`已复制 ✓`)):G(``,!0),H(`button`,{class:`debug__copy`,type:`button`,title:`切换为 Raw JSON 编辑`,onClick:t[2]||=(...e)=>a.enterRaw&&a.enterRaw(...e)},[...t[28]||=[H(`svg`,{class:`debug__copy-icn`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`polyline`,{points:`16 18 22 12 16 6`}),H(`polyline`,{points:`8 6 2 12 8 18`})],-1),W(`Raw `,-1)]]),H(`button`,{class:`debug__copy`,type:`button`,onClick:t[3]||=(...e)=>a.copyScope&&a.copyScope(...e)},[...t[29]||=[H(`svg`,{class:`debug__copy-icn`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-copy-sm`})],-1),W(`复制 `,-1)]]),t[32]||=H(`span`,{class:`debug__sep`},null,-1),H(`button`,{class:`debug__copy debug__copy--primary`,type:`button`,onClick:t[4]||=(...e)=>a.onCommit&&a.onCommit(...e)},[...t[30]||=[H(`svg`,{class:`debug__copy-icn`,viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`use`,{href:`#icon-check`})],-1),W(`应用 `,-1)]]),H(`button`,{class:`debug__copy debug__copy--warn`,type:`button`,onClick:t[5]||=t=>e.$emit(`reset-import`),title:`丢弃内存编辑,从磁盘重新载入(导入优先于编辑)`},[...t[31]||=[H(`svg`,{class:`debug__copy-icn`,viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`use`,{href:`#icon-reset`})],-1),W(`重置 `,-1)]])])],64))],2)):n.activeTab===`structure`?(z(),V(s,{key:1,preview:n.preview,schema:n.schema,"card-code":n.cardId,"selected-node-id":n.selectedNodeId,"move-collapse-token":n.moveCollapseToken,"can-paste":a.canPaste,onEditEvent:a.onEditEvent,onInspect:a.onInspect,onSelectNode:a.onSelectNode,onAddNode:a.onAddNode,onMoveNode:a.onMoveNode,onHoverNode:a.onHoverNode,onCopySelected:t[6]||=t=>e.$emit(`copy-selected`),onPaste:t[7]||=t=>e.$emit(`paste`),onDuplicate:t[8]||=t=>e.$emit(`duplicate`),onDeleteSelected:t[9]||=t=>e.$emit(`delete-selected`)},null,8,[`preview`,`schema`,`card-code`,`selected-node-id`,`move-collapse-token`,`can-paste`,`onEditEvent`,`onInspect`,`onSelectNode`,`onAddNode`,`onMoveNode`,`onHoverNode`])):n.activeTab===`meta`?(z(),B(`div`,Bm,[i.importMeta?(z(),B(`dl`,Hm,[H(`div`,Um,[t[35]||=H(`dt`,null,`导入接口`,-1),H(`dd`,null,[H(`code`,null,A(i.importMeta.interface),1),t[34]||=W(),H(`span`,Wm,`(`+A(i.importMeta.source)+`)`,1)])]),H(`div`,Gm,[t[36]||=H(`dt`,null,`远端基址`,-1),H(`dd`,null,[H(`code`,null,A(i.importMeta.baseUrl),1)])]),H(`div`,Km,[t[37]||=H(`dt`,null,`cardId`,-1),H(`dd`,null,[H(`code`,null,A(i.importMeta.cardId),1)])]),H(`div`,qm,[t[38]||=H(`dt`,null,`cardCode`,-1),H(`dd`,null,[H(`code`,null,A(i.importMeta.cardCode),1)])]),i.importMeta.cardName?(z(),B(`div`,Jm,[t[39]||=H(`dt`,null,`卡片标题`,-1),H(`dd`,null,A(i.importMeta.cardName),1)])):G(``,!0),H(`div`,Ym,[t[41]||=H(`dt`,null,`应用 / 空间`,-1),H(`dd`,null,[H(`code`,null,A(i.importMeta.appId),1),t[40]||=W(` / `,-1),H(`code`,null,A(i.importMeta.workspaceId),1)])]),H(`div`,Xm,[t[42]||=H(`dt`,null,`同步时间`,-1),H(`dd`,null,A(a.formatTime(i.importMeta.syncedAt)),1)]),H(`div`,Zm,[t[43]||=H(`dt`,null,`落库位置`,-1),H(`dd`,null,[H(`code`,null,`src/cards/`+A(i.importMeta.cardCode)+`/`,1)])]),H(`div`,Qm,[t[44]||=H(`dt`,null,`本地状态`,-1),H(`dd`,null,[i.importMeta.dirty?(z(),B(`span`,$m,`已编辑(偏离导入镜像)`)):(z(),B(`span`,eh,`与导入镜像一致`))])]),i.importMeta.lastExport?(z(),B(`div`,th,[t[45]||=H(`dt`,null,`最近导出`,-1),H(`dd`,null,[i.importMeta.lastExport.ok?(z(),B(`span`,nh,`读回校验通过 ✓`)):(z(),B(`span`,rh,`读回校验未通过 ✗`)),H(`span`,ih,`(`+A(a.formatTime(i.importMeta.lastExport.at))+`)`,1),i.importMeta.lastExport.readBackError?(z(),B(`span`,ah,` · `+A(i.importMeta.lastExport.readBackError),1)):G(``,!0)])])):G(``,!0)])):(z(),B(`div`,Vm,[...t[33]||=[Da(`<span class="empty-state__badge" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-cloud"></use></svg></span><p class="debug__empty">暂无卡片来源</p><p class="empty-state__hint">该卡尚未经「同步远程」导入,无导入来源元数据;本地新建卡 / 未同步卡均如此</p>`,3)]])),t[46]||=H(`p`,{class:`debug__meta-hint`},`导入优先于编辑:点「数据绑定」tab 的「重置为导入镜像」可丢弃内存编辑、从磁盘重新载入最新导入。`,-1)])):G(``,!0)]),U(_o,{name:`modal`},{default:P(()=>[i.inspectingComp?(z(),V(c,{key:i.inspectKey,comp:i.inspectingComp,"comp-names":a.compNames,rt:n.rt,onApply:a.onApply,onCommit:a.onCommit,onClose:t[10]||=e=>i.inspectingComp=null},null,8,[`comp`,`comp-names`,`rt`,`onApply`,`onCommit`])):G(``,!0)]),_:1}),U(_o,{name:`ee-drawer`},{default:P(()=>[i.editingEventComp?(z(),V(l,{key:`evt-`+i.eventEditorKey,comp:i.editingEventComp,"comp-names":a.compNames,rt:n.rt,onApply:a.onApply,onCommit:a.onCommit,onClose:t[11]||=e=>i.editingEventComp=null},null,8,[`comp`,`comp-names`,`rt`,`onApply`,`onCommit`])):G(``,!0)]),_:1}),(z(),V(ir,{defer:``,to:`#app-workside-panels`,disabled:n.chromeOff},[F(H(`section`,oh,[H(`div`,{class:k([`panelhead__edge`,{"is-dragging":i.panelDragging}]),title:`拖拽调整面板高度`,onMousedown:t[12]||=q((...e)=>a.startResize&&a.startResize(...e),[`prevent`])},null,34),H(`div`,sh,[t[48]||=H(`span`,{class:`statepanel__title`},[W(`运行态 `),H(`code`,null,`rt.state`)],-1),H(`button`,{class:`statepanel__close`,type:`button`,title:`收起`,onClick:t[13]||=e=>i.statePanelOpen=!1},[...t[47]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`line`,{x1:`5`,y1:`5`,x2:`19`,y2:`19`}),H(`line`,{x1:`19`,y1:`5`,x2:`5`,y2:`19`})],-1)]])]),H(`div`,ch,[U(o,{data:n.rt.state,rt:n.rt,editable:!1},null,8,[`data`,`rt`])])],512),[[Fo,i.statePanelOpen]])],8,[`disabled`])),(z(),V(ir,{defer:``,to:`#app-workside-bar`,disabled:n.chromeOff},[H(`section`,lh,[H(`button`,{class:k([`statusbar__item statusbar__item--prob`,{"is-open":i.statePanelOpen}]),type:`button`,onClick:t[14]||=(...e)=>a.toggleStatePanel&&a.toggleStatePanel(...e),title:i.statePanelOpen?`收起运行态面板`:`展开运行态面板(可拖拽调整高度)`},[H(`span`,{class:k([`statusbar__icon`,{"is-dirty":a.stateDirty}])},`◉`,2),t[49]||=H(`span`,null,`运行态`,-1)],10,uh),H(`button`,{class:k([`statusbar__item statusbar__item--prob`,{"is-error":a.bindingErrors.length,"is-ok":!a.bindingErrors.length}]),type:`button`,onClick:t[15]||=e=>a.toggleErrorPanel(`binding`),title:a.bindingErrors.length?`查看绑定错误`:`无绑定错误`},[H(`span`,fh,A(a.bindingErrors.length?`⚠`:`✓`),1),H(`span`,null,A(a.bindingErrors.length?a.bindingErrors.length+` 个绑定错误`:`无绑定错误`),1)],10,dh),H(`button`,{class:k([`statusbar__item statusbar__item--prob`,a.eventStatusClass]),type:`button`,onClick:t[16]||=e=>a.toggleErrorPanel(`event`),title:a.eventStatusTitle},[H(`span`,mh,A(a.eventCount?a.eventErrors.length?`⚠`:`☰`:`✓`),1),H(`span`,null,A(a.eventCount?a.eventCount+` 条事件记录`:`无事件记录`),1)],10,ph),H(`button`,{class:k([`statusbar__item statusbar__conn`,n.devSvcClass]),type:`button`,title:n.devSvcTitle+`(点击查看服务日志)`,onClick:t[17]||=e=>a.toggleErrorPanel(`svclog`)},[t[50]||=H(`svg`,{class:`statusbar__conn-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-link`})],-1),H(`span`,null,A(n.devSvcLabel),1)],10,hh),t[51]||=H(`span`,{class:`statusbar__spacer`},null,-1),H(`span`,gh,A(n.cardId),1),H(`span`,_h,A(n.cardCount)+` 张卡片`,1)])],8,[`disabled`])),(z(),V(ir,{defer:``,to:`#app-workside-panels`,disabled:n.chromeOff},[F(H(`section`,vh,[H(`div`,{class:k([`panelhead__edge`,{"is-dragging":i.panelDragging}]),title:`拖拽调整面板高度`,onMousedown:t[18]||=q((...e)=>a.startResize&&a.startResize(...e),[`prevent`])},null,34),H(`div`,yh,[H(`span`,bh,A(i.errorPanel===`svclog`?`服务日志`:i.errorPanel===`event`?`事件记录`:`绑定错误记录`),1),i.errorPanel===`svclog`?(z(),B(`span`,xh,[W(A(i.svcLogs.length)+` 行`,1),i.svcLogDropped?(z(),B(`span`,Sh,` · 已滚动淘汰 `+A(i.svcLogDropped),1)):G(``,!0),H(`i`,{class:k([`svclog__dot`,i.svcLogLive?`is-live`:`is-off`])},null,2),W(A(i.svcLogLive?`实时`:`未连接`),1)])):G(``,!0),i.errorPanel===`event`?(z(),B(`div`,Ch,[H(`button`,{type:`button`,class:k([`errpanel__tab`,{"errpanel__tab--active":i.eventTab===`log`}]),onClick:t[19]||=e=>i.eventTab=`log`},[t[52]||=W(` 日志`,-1),H(`span`,wh,A(a.logs.length),1)],2),H(`button`,{type:`button`,class:k([`errpanel__tab`,{"errpanel__tab--active":i.eventTab===`err`}]),onClick:t[20]||=e=>i.eventTab=`err`},[t[53]||=W(` 错误`,-1),H(`span`,{class:k([`errpanel__tab-count`,{"is-hit":a.eventErrors.length}])},A(a.eventErrors.length),3)],2)])):G(``,!0),H(`span`,Th,[i.errorPanel===`event`&&i.eventTab===`log`?(z(),B(`button`,{key:0,class:`errpanel__iconbtn errpanel__clear`,type:`button`,disabled:!a.logs.length,title:`清空日志(不影响错误)`,onClick:t[21]||=(...e)=>a.clearEventLogs&&a.clearEventLogs(...e)},[...t[54]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`use`,{href:`#icon-trash`})],-1)]],8,Eh)):G(``,!0),i.errorPanel===`svclog`?(z(),B(`button`,{key:1,class:k([`errpanel__iconbtn`,{"is-done":i.svcCopied}]),type:`button`,disabled:!i.svcLogs.length,title:i.svcCopied?`已复制`:`复制全部日志(纯文本,去 ANSI)`,onClick:t[22]||=(...e)=>a.copySvcLogs&&a.copySvcLogs(...e)},[...t[55]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),H(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})],-1)]],10,Dh)):G(``,!0),i.errorPanel===`svclog`?(z(),B(`button`,{key:2,class:k([`errpanel__iconbtn svclog__follow`,{"is-on":i.svcLogFollow}]),type:`button`,title:i.svcLogFollow?`跟随最新输出(点击暂停)`:`已暂停跟随(点击回到最新)`,onClick:t[23]||=(...e)=>a.toggleSvcFollow&&a.toggleSvcFollow(...e)},[...t[56]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),H(`polyline`,{points:`19 12 12 19 5 12`})],-1)]],10,Oh)):G(``,!0),i.errorPanel===`svclog`?(z(),B(`button`,{key:3,class:`errpanel__iconbtn errpanel__clear`,type:`button`,disabled:!i.svcLogs.length,title:`清空面板(不影响服务端缓冲)`,onClick:t[24]||=(...e)=>a.clearSvcLogs&&a.clearSvcLogs(...e)},[...t[57]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`use`,{href:`#icon-trash`})],-1)]],8,kh)):G(``,!0),H(`button`,{class:`errpanel__iconbtn errpanel__close`,type:`button`,title:`关闭`,onClick:t[25]||=e=>i.errorPanel=``},[...t[58]||=[H(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`line`,{x1:`5`,y1:`5`,x2:`19`,y2:`19`}),H(`line`,{x1:`19`,y1:`5`,x2:`5`,y2:`19`})],-1)]])])]),H(`div`,{class:k([`errpanel__body`,{"errpanel__body--term":i.errorPanel===`svclog`&&i.svcLogs.length}]),ref:`errBody`,onScrollPassive:t[26]||=(...e)=>a.onErrBodyScroll&&a.onErrBodyScroll(...e)},[i.errorPanel===`svclog`?(z(),B(R,{key:0},[i.svcLogs.length?(z(),B(`div`,Nh,[(z(!0),B(R,null,L(i.svcLogs,e=>(z(),B(`div`,{key:e.seq||e.t,class:k([`svclog__line`,`svclog__line--`+e.level])},[H(`span`,{class:`svclog__text`,innerHTML:e.html},null,8,Ph)],2))),128))])):(z(),B(`div`,Ah,[t[59]||=H(`span`,{class:`empty-state__badge`,"aria-hidden":`true`},[H(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`polyline`,{points:`4 17 10 11 4 5`}),H(`line`,{x1:`12`,y1:`19`,x2:`20`,y2:`19`})])],-1),H(`p`,jh,A(a.svcEmptyText),1),H(`p`,Mh,A(a.svcEmptyHint),1)]))],64)):i.errorPanel===`event`?(z(),B(R,{key:1},[i.eventTab===`log`?(z(),B(R,{key:0},[a.logs.length?(z(),B(`ul`,Ih,[(z(!0),B(R,null,L(a.logs,(e,t)=>(z(),B(`li`,{key:`l`+t,class:k([`log__item`,`log--`+e.level])},[H(`span`,Lh,A(a.fmtTime(e.t)),1),H(`span`,{class:k([`log__tag`,`log__tag--`+e.level])},A(e.level),3),H(`div`,Rh,[e.args&&e.args.length?(z(!0),B(R,{key:0},L(e.args,(e,t)=>(z(),V(u,{key:t,value:e},null,8,[`value`]))),128)):(z(),B(`span`,zh,`—`))])],2))),128))])):(z(),B(`div`,Fh,[...t[60]||=[H(`span`,{class:`empty-state__badge`,"aria-hidden":`true`},[H(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`line`,{x1:`21`,y1:`6`,x2:`3`,y2:`6`}),H(`line`,{x1:`21`,y1:`12`,x2:`3`,y2:`12`}),H(`line`,{x1:`21`,y1:`18`,x2:`3`,y2:`18`})])],-1),H(`p`,{class:`debug__empty`},`暂无日志`,-1),H(`p`,{class:`empty-state__hint`},`卡片事件内 console.* 主动打印的日志会实时显示在这里`,-1)]]))],64)):(z(),B(R,{key:1},[a.eventErrors.length?(z(),B(`ul`,Vh,[(z(!0),B(R,null,L(a.eventErrors,(e,t)=>(z(),B(`li`,{key:`e`+t,class:`debug__item debug__item--err`},[H(`span`,Hh,A(a.fmtTime(e.t)),1),H(`span`,Uh,A(e.kind),1),H(`span`,Wh,A(e.msg),1)]))),128))])):(z(),B(`div`,Bh,[...t[61]||=[H(`span`,{class:`empty-state__badge`,"aria-hidden":`true`},[H(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),H(`polyline`,{points:`22 4 12 14.01 9 11.01`})])],-1),H(`p`,{class:`debug__empty`},`无事件错误`,-1),H(`p`,{class:`empty-state__hint`},`事件动作(customAction / 监听器)执行报错时会记录在这里`,-1)]]))],64))],64)):(z(),B(R,{key:2},[a.panelErrors.length?(z(),B(`ul`,Kh,[(z(!0),B(R,null,L(a.panelErrors,(e,t)=>(z(),B(`li`,{key:t,class:`debug__item debug__item--err`},[H(`span`,qh,A(a.fmtTime(e.t)),1),H(`span`,Jh,A(e.kind),1),H(`span`,Yh,A(e.msg),1)]))),128))])):(z(),B(`div`,Gh,[...t[62]||=[H(`span`,{class:`empty-state__badge`,"aria-hidden":`true`},[H(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),H(`polyline`,{points:`22 4 12 14.01 9 11.01`})])],-1),H(`p`,{class:`debug__empty`},`无绑定错误`,-1),H(`p`,{class:`empty-state__hint`},`绑定 / 表达式(bind、vshow、render、refresh)求值失败时会记录在这里`,-1)]]))],64))],34)],512),[[Fo,i.errorPanel]])],8,[`disabled`]))])}var Zh=Z(Om,[[`render`,Xh]]),Qh={name:`ApiCallPanel`,components:{ApiPayloadTree:nm},props:{rt:{type:Object,required:!0}},emits:[`close`],data(){return{copiedIndex:null,apiCopyTimer:null}},computed:{apiCalls(){return this.rt.apiRev,this.rt.apiCalls.slice()}},methods:{clearApiLog(){this.rt.clearApiCalls()},async copyApiPayload(e,t){let n=``;try{n=JSON.stringify(e.payload,null,2)}catch{n=String(e.payload)}await ed(n)&&(this.copiedIndex=t,this.apiCopyTimer&&clearTimeout(this.apiCopyTimer),this.apiCopyTimer=setTimeout(()=>{this.copiedIndex===t&&(this.copiedIndex=null)},1500))}}},$h={class:`apipanel`},eg={class:`apipanel__head`},tg={class:`apipanel__title`},ng={key:0,class:`debug__count`},rg=[`disabled`],ig={class:`apipanel__body`},ag={key:0,class:`empty-state`},og={class:`debug__list`},sg={class:`debug__api-row`},cg={class:`debug__kind`},lg=[`title`,`onClick`],ug={key:0,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},dg={key:1,class:`debug__copy-ok`};function fg(e,t,n,r,i,a){let o=I(`ApiPayloadTree`);return z(),B(`aside`,$h,[H(`div`,eg,[H(`span`,tg,[t[2]||=W(` API调用 `,-1),a.apiCalls.length?(z(),B(`span`,ng,A(a.apiCalls.length),1)):G(``,!0)]),t[5]||=H(`span`,{class:`apipanel__spacer`},null,-1),H(`button`,{class:`apipanel__btn`,type:`button`,disabled:!a.apiCalls.length,title:`清空日志`,onClick:t[0]||=(...e)=>a.clearApiLog&&a.clearApiLog(...e)},[...t[3]||=[H(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`use`,{href:`#icon-trash`})],-1)]],8,rg),H(`button`,{class:`apipanel__btn`,type:`button`,title:`收起接口调用面板`,onClick:t[1]||=t=>e.$emit(`close`)},[...t[4]||=[H(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[H(`line`,{x1:`5`,y1:`5`,x2:`19`,y2:`19`}),H(`line`,{x1:`19`,y1:`5`,x2:`5`,y2:`19`})],-1)]])]),H(`div`,ig,[a.apiCalls.length?G(``,!0):(z(),B(`div`,ag,[...t[6]||=[Da(`<span class="empty-state__badge" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 7V3"></path><path d="M15 7V3"></path><path d="M6 7h12v4a6 6 0 0 1-12 0V7z"></path><path d="M12 17v4"></path></svg></span><p class="debug__empty">暂无API调用</p><p class="empty-state__hint">卡片事件触发 ynet.callJSAPI / postMessage 后,调用流水会实时显示在这里</p>`,3)]])),H(`ul`,og,[(z(!0),B(R,null,L(a.apiCalls,(e,n)=>(z(),B(`li`,{key:n,class:`debug__item debug__item--api`},[H(`div`,sg,[H(`span`,cg,A(e.api),1),H(`button`,{class:`debug__copy-ic`,type:`button`,title:i.copiedIndex===n?`已复制 ✓`:`复制数据(不含方法名)`,onClick:t=>a.copyApiPayload(e,n)},[i.copiedIndex===n?(z(),B(`span`,dg,`✓`)):(z(),B(`svg`,ug,[...t[7]||=[H(`use`,{href:`#icon-copy-sm`},null,-1)]]))],8,lg)]),U(o,{value:e.payload},null,8,[`value`])]))),128))])])])}var pg=Z(Qh,[[`render`,fg]]),mg={name:`CardSelect`,emits:[`input`,`change`],props:{value:{type:String,default:``},options:{type:Array,default:()=>[]}},data(){return{open:!1,query:``,highlighted:0,sortByTime:this.loadSortByTime()}},created(){this.saveSortByTime()},computed:{current(){return this.options.find(e=>e.id===this.value)||{id:this.value,name:this.value}},filtered(){let e=this.query.trim().toLowerCase(),t=this.options;return e&&(t=this.options.filter(t=>t.id.toLowerCase().includes(e)||String(t.name||``).toLowerCase().includes(e))),this.sortByTime?t.slice().sort((e,t)=>(t.mtime||0)-(e.mtime||0)):t.slice().sort((e,t)=>String(e.name||``).localeCompare(String(t.name||``)))}},watch:{open(e){e?(this.query=``,this.highlighted=Math.max(0,this.filtered.findIndex(e=>e.id===this.value)),this.$nextTick(()=>{this.$refs.search&&this.$refs.search.focus(),this.scrollToActive()}),document.addEventListener(`click`,this.onDocClick,!0)):document.removeEventListener(`click`,this.onDocClick,!0)},sortByTime(e){this.saveSortByTime()}},beforeUnmount(){document.removeEventListener(`click`,this.onDocClick,!0)},methods:{toggle(){this.open=!this.open},toggleSort(){this.sortByTime=!this.sortByTime,this.highlighted=Math.max(0,this.filtered.findIndex(e=>e.id===this.value))},loadSortByTime(){try{return localStorage.getItem(`cardbuddy:cardselect-sort-by-time`)===`1`}catch{return!1}},saveSortByTime(){try{localStorage.setItem(`cardbuddy:cardselect-sort-by-time`,this.sortByTime?`1`:`0`)}catch{}},close(){this.open=!1},onDocClick(e){this.$refs.root&&!this.$refs.root.contains(e.target)&&this.close()},move(e){if(!this.filtered.length)return;let t=this.filtered.length;this.highlighted=(this.highlighted+e+t)%t,this.$nextTick(this.scrollToActive)},scrollToActive(){let e=this.$refs.list;if(!e)return;let t=e.children[this.highlighted];t&&t.scrollIntoView&&t.scrollIntoView({block:`nearest`})},choose(e){e&&(this.close(),e.id!==this.value&&(this.$emit(`input`,e.id),this.$emit(`change`,e.id)))}}},hg={class:`csel__current`},gg={class:`csel__id`},_g={class:`csel__name`},vg={key:0,class:`csel__pop`},yg={class:`csel__search`},bg={ref:`list`,class:`csel__list`},xg=[`onMousemove`,`onClick`],Sg=[`title`],Cg={class:`csel__item-id`},wg={class:`csel__item-name`},Tg={key:0,class:`csel__check`,viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`},Eg={key:0,class:`csel__empty`},Dg={class:`csel__foot`},Og=[`title`,`aria-pressed`],kg={class:`csel__count`};function Ag(e,t,n,r,i,a){return z(),B(`div`,{ref:`root`,class:k([`csel`,{"csel--open":i.open}])},[H(`button`,{type:`button`,class:k([`csel__trigger`,{"csel__trigger--active":i.open}]),onClick:t[0]||=(...e)=>a.toggle&&a.toggle(...e)},[H(`span`,hg,[H(`span`,gg,A(a.current.id),1),H(`span`,_g,A(a.current.name),1)]),t[7]||=H(`svg`,{class:`csel__chev`,viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`},[H(`use`,{href:`#icon-chevron`})],-1)],2),U(_o,{name:`csel-fade`},{default:P(()=>[i.open?(z(),B(`div`,vg,[H(`div`,yg,[t[8]||=H(`svg`,{class:`csel__search-icon`,viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`},[H(`use`,{href:`#icon-search`})],-1),F(H(`input`,{ref:`search`,"onUpdate:modelValue":t[1]||=e=>i.query=e,class:`csel__input`,type:`text`,placeholder:`搜索卡片 ID / 名称…`,onKeydown:[t[2]||=ys(q(e=>a.move(1),[`prevent`]),[`down`]),t[3]||=ys(q(e=>a.move(-1),[`prevent`]),[`up`]),t[4]||=ys(q(e=>a.choose(a.filtered[i.highlighted]),[`prevent`]),[`enter`]),t[5]||=ys(q((...e)=>a.close&&a.close(...e),[`prevent`]),[`esc`])]},null,544),[[hs,i.query]])]),H(`ul`,bg,[(z(!0),B(R,null,L(a.filtered,(e,r)=>(z(),B(`li`,{key:e.id,class:k([`csel__item`,{"csel__item--active":r===i.highlighted,"csel__item--selected":e.id===n.value}]),onMousemove:e=>i.highlighted=r,onClick:t=>a.choose(e)},[H(`span`,{class:k([`csel__dot`,{"csel__dot--imported":e.imported}]),title:e.imported?`导入卡片(含 .import-meta.json 来源信息)`:`本地卡片(无导入来源信息)`,"aria-hidden":`true`},null,10,Sg),H(`span`,Cg,A(e.id),1),H(`span`,wg,A(e.name),1),e.id===n.value?(z(),B(`svg`,Tg,[...t[9]||=[H(`use`,{href:`#icon-check`},null,-1)]])):G(``,!0)],42,xg))),128)),a.filtered.length?G(``,!0):(z(),B(`li`,Eg,`无匹配卡片`))],512),H(`div`,Dg,[H(`button`,{class:k([`csel__sort`,{"csel__sort--active":i.sortByTime}]),type:`button`,title:i.sortByTime?`已按修改时间排序(新→旧),点击取消`:`按修改时间排序(新→旧)`,"aria-pressed":i.sortByTime,onClick:t[6]||=(...e)=>a.toggleSort&&a.toggleSort(...e)},`按修改时间排序`,10,Og),H(`span`,kg,A(a.filtered.length)+` / `+A(n.options.length)+` 张卡片`,1)])])):G(``,!0)]),_:1})],2)}var jg=Z(mg,[[`render`,Ag]]),Mg={name:`AlertCardInstance`,components:{RenderTree:$u},props:{entry:{type:Object,required:!0},mainRt:{type:Object,default:null}},data(){let e=new Xs,t=tc(this.entry.scope,e),n=this.mainRt;if(n&&n.pushError&&n.pushApiCall){let e=t.pushError.bind(t);t.pushError=(t,r)=>{e(t,r),n.pushError(t,r)};let r=t.pushApiCall.bind(t);t.pushApiCall=(e,t)=>{r(e,t),n.pushApiCall(e,t)}}return{adapter:e,cardRuntime:t}},provide(){return{adapter:this.adapter,cardRuntime:this.cardRuntime,customComponents:{}}},render(){return K($u,{node:this.entry.preview.view,scope:this.cardRuntime.rootScope,key:this.entry.id})}},Ng=M({stack:[]}),Pg=0;async function Fg(e,t){let n=e||{},r=n.cardCode,i=null;try{let e=await J(`/__card/${encodeURIComponent(r)}`);if(e.ok){let t=await e.json();t&&t.schema&&(i=t)}}catch{}if(!i||!i.schema){typeof t==`function`&&t({success:!1,error:`card_not_found`,errorMessage:`未找到卡片 `+r});return}let a=Ng.stack;a.length&&a.splice(0,a.length).forEach(e=>{if(typeof e.callback==`function`)try{e.callback({success:!0,data:{event:`hidden`}})}catch{}});let o=i.data&&typeof i.data==`object`?i.data:{},s=M(Object.assign({},o,n.data||{})),c=Ac(i.schema),l=`alert-`+ ++Pg;a.push({id:l,cardCode:r,preview:c,scope:s,gravity:n.gravity||`bottom`,width:typeof n.width==`number`?n.width:void 0,height:typeof n.height==`number`?n.height:void 0,offsetX:typeof n.offsetX==`number`?n.offsetX:0,offsetY:typeof n.offsetY==`number`?n.offsetY:0,clickOutsideCanHide:n.clickOutsideCanHide!==!1,callback:t})}function Ig(e,t){let n=e||{},r=Ng.stack,i=null;if(typeof n.index==`number`){let e=Math.abs(n.index);r.length>=e&&(i=r[r.length-e])}else if(n.cardCode){for(let e=r.length-1;e>=0;e--)if(r[e].cardCode===n.cardCode){i=r[e];break}}else i=r[r.length-1];if(!i){typeof t==`function`&&t({success:!1,error:`no_alert`,errorMessage:`没有可关闭的弹窗`});return}let a=r.indexOf(i);r.splice(a,1),typeof i.callback==`function`&&(n.data?i.callback({success:!0,data:Object.assign({event:`hidden`},n.data)}):i.callback({success:!0,data:{}})),typeof t==`function`&&t({success:!0})}function Lg(){let e=Ng.stack;e.length&&e.splice(0,e.length)}var Rg={name:`AlertCardLayer`,components:{AlertCardInstance:Mg},props:{mainRt:{type:Object,default:null}},computed:{top(){let e=Ng.stack;return e.length?e[e.length-1]:null}},methods:{onMaskClick(e){e.clickOutsideCanHide&&Ig({cardCode:e.cardCode})},panelStyle(e){let t={};e.width&&(t.width=e.width+`px`),e.height&&(t.height=e.height+`px`);let n=[];return e.offsetX&&n.push(`translateX(`+e.offsetX+`px)`),e.offsetY&&n.push(`translateY(`+e.offsetY+`px)`),n.length&&(t.transform=n.join(` `)),t}}},zg={key:0,class:`alert-layer`};function Bg(e,t,n,r,i,a){let o=I(`AlertCardInstance`);return a.top?(z(),B(`div`,zg,[H(`div`,{class:k([`alert-mask`,`alert-mask--`+a.top.gravity]),onClick:t[0]||=q(e=>a.onMaskClick(a.top),[`self`])},[H(`div`,{class:`alert-panel`,style:O(a.panelStyle(a.top))},[U(o,{entry:a.top,"main-rt":n.mainRt},null,8,[`entry`,`main-rt`])],4)],2)])):G(``,!0)}var Vg=Z(Rg,[[`render`,Bg]]),$=M({dialog:null,toast:null,picker:null,datePicker:null}),Hg=[],Ug=0,Wg=null,Gg=[],Kg=0,qg=[],Jg=0,Yg=2200;function Xg(e,t){if(typeof e==`function`)try{e(t)}catch{}}function Zg(){$.dialog=Hg.length?Hg.shift():null}function Qg(e,t){let n=e||{};Hg.push({id:++Ug,title:n.title||``,message:n.message==null?``:String(n.message),okButton:n.okButton||`确定`,cancelButton:n.cancelButton||``,clickBgToHide:n.clickBgToHide===!0,cancelGrayStyle:n.cancelGrayStyle===!0,callback:t}),$.dialog||Zg()}function $g(e){let t=$.dialog;t&&($.dialog=null,Xg(t.callback,{success:!0,data:{ok:!!e.ok,dismissByClickBg:!!e.dismissByClickBg}}),Zg())}function e_(e,t){let n=e||{},r=n.showIcon==null?``:String(n.showIcon),i=r===`1`?`ok`:r===`0`?`err`:``;Wg&&=(clearTimeout(Wg),null),$.toast={message:n.message==null?``:String(n.message),icon:i},Wg=setTimeout(()=>{$.toast=null,Wg=null},Yg),Xg(t,{success:!0,data:{}})}function t_(e,t){let n=e||{},r=Array.isArray(n.currentValue)?n.currentValue:[];r.length&&Array.isArray(r[0])&&(r=r[0]),Gg.push({id:++Kg,title:n.title||``,mode:n.mode===`multi`?`multi`:`single`,dataSource:Array.isArray(n.dataSource)?n.dataSource:[],currentValue:r.map(e=>String(e)),callback:t}),$.picker||n_()}function n_(){$.picker=Gg.length?Gg.shift():null}function r_(e,t){let n=$.picker;if(n){if($.picker=null,e){let e={success:!0,error:`0`,data:{result:t},result:t};Xg(n.callback,e)}else Xg(n.callback,{success:!0,data:{}});n_()}}function i_(e,t){let n=e||{},r=[`year_month_day`,`year_month`,`month_day`].includes(n.type)?n.type:`year_month_day`;qg.push({id:++Jg,title:n.title||``,type:r,startDate:n.startDate||`1970-1-1`,endDate:n.endDate||`2100-12-31`,selectDate:n.selectDate||``,callback:t}),$.datePicker||a_()}function a_(){$.datePicker=qg.length?qg.shift():null}function o_(e,t){let n=$.datePicker;if(n){if($.datePicker=null,e){let e={success:!0,error:`0`,currentDate:t.value,data:{year:t.year,month:t.month,day:t.day,value:t.value}};Xg(n.callback,e)}else Xg(n.callback,{success:!0,data:{}});a_()}}var s_={alertCard:(e,t)=>Fg(e,t),closeAlertCard:(e,t)=>Ig(e,t),alertDialog:Qg,showToast:e_,showPicker:t_,showDatePicker:i_};function c_(e){typeof window>`u`||(window.ynet={callJSAPI(t,n,r){e&&e.pushApiCall&&e.pushApiCall(t,n);let i=s_[t];if(i){i(n,r);return}Xg(r,{success:!0,data:{}})}})}function l_(){Hg.length=0,$.dialog=null,$.toast=null,Wg&&=(clearTimeout(Wg),null),Gg.length=0,$.picker=null,qg.length=0,$.datePicker=null}var u_={name:`DeviceOverlay`,computed:{dialog(){return $.dialog},toast(){return $.toast}},methods:{onOk(){$g({ok:!0,dismissByClickBg:!1})},onCancel(){$g({ok:!1,dismissByClickBg:!1})},onMaskClick(){this.dialog&&this.dialog.clickBgToHide&&$g({ok:!1,dismissByClickBg:!0})}}},d_={class:`device-ui`},f_={class:`dlg`},p_={key:0,class:`dlg__title`},m_={key:1,class:`dlg__msg`},h_={class:`dlg__btns`},g_={class:`dtoast__icon-svg`,viewBox:`0 0 24 24`,"aria-hidden":`true`},__={key:0,d:`M5 13l4 4L19 7`},v_={key:1,d:`M6 6l12 12M18 6L6 18`},y_={class:`dtoast__msg`};function b_(e,t,n,r,i,a){return z(),B(`div`,d_,[U(_o,{name:`dlg-fade`},{default:P(()=>[a.dialog?(z(),B(`div`,{key:0,class:`dlg-mask`,onClick:t[2]||=q((...e)=>a.onMaskClick&&a.onMaskClick(...e),[`self`])},[H(`div`,f_,[a.dialog.title?(z(),B(`div`,p_,A(a.dialog.title),1)):G(``,!0),a.dialog.message?(z(),B(`div`,m_,A(a.dialog.message),1)):G(``,!0),H(`div`,h_,[a.dialog.cancelButton?(z(),B(`button`,{key:0,type:`button`,class:k([`dlg__btn dlg__btn--cancel`,{"dlg__btn--gray":a.dialog.cancelGrayStyle}]),onClick:t[0]||=(...e)=>a.onCancel&&a.onCancel(...e)},A(a.dialog.cancelButton),3)):G(``,!0),H(`button`,{type:`button`,class:`dlg__btn dlg__btn--ok`,onClick:t[1]||=(...e)=>a.onOk&&a.onOk(...e)},A(a.dialog.okButton),1)])])])):G(``,!0)]),_:1}),U(_o,{name:`toast-fade`},{default:P(()=>[a.toast?(z(),B(`div`,{key:0,class:k([`dtoast`,{"dtoast--icon":a.toast.icon}])},[a.toast.icon?(z(),B(`span`,{key:0,class:k([`dtoast__icon`,`dtoast__icon--`+a.toast.icon])},[(z(),B(`svg`,g_,[a.toast.icon===`ok`?(z(),B(`path`,__)):(z(),B(`path`,v_))]))],2)):G(``,!0),H(`span`,y_,A(a.toast.message),1)],2)):G(``,!0)]),_:1})])}var x_=Z(u_,[[`render`,b_]]),S_={name:`PickerOverlay`,data(){return{sel:[]}},computed:{picker(){return $.picker},columns(){if(!this.picker)return[];let e=this.picker.dataSource||[];if(this.picker.mode===`multi`){let t=e.map(e=>({key:String(e.key),text:e.text})),n=this.sel[0]||0,r=(e[n]&&e[n].children||[]).map(e=>({key:String(e.key),text:e.text}));return[{items:t,level:0},{items:r,level:1}]}return[{items:e.map(e=>({key:String(e.key),text:e.text})),level:0}]}},watch:{picker:{immediate:!0,handler(e){if(!e){this.sel=[];return}let t=e.dataSource||[],n=e.currentValue||[];if(e.mode===`multi`){let e=t.findIndex(e=>String(e.key)===String(n[0])),r=e>=0?e:0,i=t[r]&&t[r].children||[],a=i.findIndex(e=>String(e.key)===String(n[1]));this.sel=[r,a>=0?a:i.length?0:-1]}else{let e=t.findIndex(e=>String(e.key)===String(n[0]));this.sel=[e>=0?e:0]}}}},methods:{select(e,t){let n=this.sel.slice();if(n[e]=t,e===0&&this.picker.mode===`multi`){let e=this.picker.dataSource||[];n[1]=(e[t]&&e[t].children||[]).length?0:-1}this.sel=n},buildResult(){let e=this.picker;if(!e)return[];let t=e.dataSource||[],n=e=>({key:String(e.key),text:e.text,value:e.text});if(e.mode===`multi`){let e=t[this.sel[0]]||t[0],r=e&&e.children||[],i=r[this.sel[1]]||r[0],a=[];return e&&a.push(n(e)),i&&a.push(n(i)),a}let r=t[this.sel[0]]||t[0];return r?[n(r)]:[]},onConfirm(){r_(!0,this.buildResult())},onCancel(){r_(!1)}}},C_={class:`device-ui`},w_={class:`pk-sheet`},T_={class:`pk-bar`},E_={key:0,class:`pk-bar__title`},D_={class:`pk-col__list`},O_=[`onClick`];function k_(e,t,n,r,i,a){return z(),B(`div`,C_,[U(_o,{name:`picker-fade`},{default:P(()=>[a.picker?(z(),B(`div`,{key:0,class:`pk-mask`,onClick:t[2]||=q((...e)=>a.onCancel&&a.onCancel(...e),[`self`])},[H(`div`,w_,[H(`div`,T_,[H(`button`,{type:`button`,class:`pk-bar__btn pk-bar__btn--cancel`,onClick:t[0]||=(...e)=>a.onCancel&&a.onCancel(...e)},`取消`),a.picker.title?(z(),B(`div`,E_,A(a.picker.title),1)):G(``,!0),H(`button`,{type:`button`,class:`pk-bar__btn pk-bar__btn--ok`,onClick:t[1]||=(...e)=>a.onConfirm&&a.onConfirm(...e)},`确定`)]),H(`div`,{class:k([`pk-cols`,`pk-cols--`+a.columns.length])},[(z(!0),B(R,null,L(a.columns,(e,n)=>(z(),B(`div`,{key:n,class:`pk-col`},[t[3]||=H(`div`,{class:`pk-col__band`},null,-1),H(`div`,D_,[(z(!0),B(R,null,L(e.items,(e,t)=>(z(),B(`div`,{key:e.key,class:k([`pk-item`,{"pk-item--on":i.sel[n]===t}]),onClick:e=>a.select(n,t)},A(e.text),11,O_))),128))])]))),128))],2)])])):G(``,!0)]),_:1})])}var A_=Z(S_,[[`render`,k_]]),j_=40;function M_(e){return String(e).padStart(2,`0`)}function N_(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function P_(e,t){return[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31][(t-1+12)%12]}function F_(e){if(!e)return null;let t=String(e).split(`-`).map(e=>parseInt(e,10));return t.some(e=>Number.isNaN(e))?null:t.length===3?{y:t[0],m:t[1],d:t[2]}:t.length===2?{m:t[0],d:t[1]}:null}var I_={name:`DatePickerOverlay`,data(){return{sel:[],dragging:!1,drag:null,suppressClick:!1,scrollTimers:[]}},computed:{datePicker(){return $.datePicker},yearRange(){let e=this.datePicker,t=F_(e&&e.startDate)||{y:1970},n=F_(e&&e.endDate)||{y:2100};return{minY:t.y||1970,maxY:n.y||2100}},columns(){let e=this.datePicker;if(!e)return[];let{minY:t}=this.yearRange;if(e.type===`month_day`)return[{key:`month`,items:N_(1,12).map(e=>({text:M_(e)}))},{key:`day`,items:N_(1,31).map(e=>({text:M_(e)}))}];if(e.type===`year_month`)return[{key:`year`,items:N_(t,this.yearRange.maxY).map(e=>({text:String(e)}))},{key:`month`,items:N_(1,12).map(e=>({text:M_(e)}))}];let n=P_(t+(this.sel[0]||0),(this.sel[1]||0)+1);return[{key:`year`,items:N_(t,this.yearRange.maxY).map(e=>({text:String(e)}))},{key:`month`,items:N_(1,12).map(e=>({text:M_(e)}))},{key:`day`,items:N_(1,n).map(e=>({text:M_(e)}))}]}},watch:{datePicker:{immediate:!0,handler(e){if(!e){this.sel=[],this.scrollTimers=[];return}let t=F_(e.selectDate)||this.todayConstrained(e),{minY:n}=this.yearRange;if(e.type===`month_day`)this.sel=[t.m-1,t.d-1];else if(e.type===`year_month`)this.sel=[t.y-n,t.m-1];else{let e=P_(t.y,t.m);this.sel=[t.y-n,t.m-1,Math.min(t.d,e)-1]}this.$nextTick(()=>this.syncScrollTops())}},sel:{deep:!0,handler(){let e=this.datePicker;if(!e)return;let t=this.sel.slice();if(e.type===`year_month_day`){let e=P_(this.yearRange.minY+(t[0]||0),(t[1]||0)+1);if(t[2]>e-1){t[2]=e-1,this.sel=t;return}}this.$nextTick(()=>this.syncScrollTops())}}},methods:{getList(e){let t=this.$refs.cols;return t&&t.querySelectorAll(`.pk-col__list`)[e]||null},scrollForIndex(e){return(e||0)*j_},syncScrollTops(){this.columns.forEach((e,t)=>{let n=this.getList(t);n&&(n.scrollTop=this.scrollForIndex(this.sel[t]||0))})},pointerY(e){return e.touches&&e.touches.length?e.touches[0].clientY:e.clientY},onDragStart(e,t){this.suppressClick=!1;let n=this.getList(e);this.drag={ci:e,startY:this.pointerY(t),startScrollTop:n?n.scrollTop:0,moved:!1},this.dragging=!0,clearTimeout(this.scrollTimers[e]),window.addEventListener(`mousemove`,this.onDragMove),window.addEventListener(`mouseup`,this.onDragEnd),window.addEventListener(`touchmove`,this.onDragMove,{passive:!1}),window.addEventListener(`touchend`,this.onDragEnd)},onDragMove(e){if(!this.drag)return;e.cancelable&&e.preventDefault();let t=this.pointerY(e)-this.drag.startY;Math.abs(t)>3&&(this.drag.moved=!0);let n=this.getList(this.drag.ci);n&&(n.scrollTop=this.drag.startScrollTop-t)},onDragEnd(){if(!this.drag)return;let e=this.drag.ci,t=this.getList(e),n=this.drag.moved;if(this.drag=null,this.dragging=!1,window.removeEventListener(`mousemove`,this.onDragMove),window.removeEventListener(`mouseup`,this.onDragEnd),window.removeEventListener(`touchmove`,this.onDragMove),window.removeEventListener(`touchend`,this.onDragEnd),t){let n=this.columns[e].items.length-1,r=Math.round(t.scrollTop/j_);if(r=Math.max(0,Math.min(n,r)),t.scrollTop=this.scrollForIndex(r),this.sel[e]!==r){let t=this.sel.slice();t[e]=r,this.sel=t}}n&&(this.suppressClick=!0,this.$nextTick(()=>{this.suppressClick=!1}))},onWheel(e,t){clearTimeout(this.scrollTimers[e]),this.scrollTimers[e]=setTimeout(()=>this.snapToNearest(e),120)},onScroll(e,t){this.dragging||(clearTimeout(this.scrollTimers[e]),this.scrollTimers[e]=setTimeout(()=>this.snapToNearest(e),120))},snapToNearest(e){let t=this.getList(e);if(!t)return;let n=this.columns[e]&&this.columns[e].items.length-1||0,r=Math.round(t.scrollTop/j_);if(r=Math.max(0,Math.min(n,r)),t.scrollTop=this.scrollForIndex(r),this.sel[e]!==r){let t=this.sel.slice();t[e]=r,this.sel=t}},onItemClick(e,t){if(this.suppressClick)return;let n=this.getList(e);n&&(n.scrollTop=this.scrollForIndex(t));let r=this.sel.slice();r[e]=t,this.sel=r},todayConstrained(e){let t=new Date,{minY:n,maxY:r}=this.yearRange,i=t.getFullYear();i=Math.max(n,Math.min(r,i));let a=t.getMonth()+1,o=P_(i,a),s=Math.min(t.getDate(),o);return{y:i,m:a,d:s}},buildResult(){let e=this.datePicker;if(!e)return null;let{minY:t}=this.yearRange,n=``,r=0,i=0;e.type===`month_day`?(r=(this.sel[0]||0)+1,i=(this.sel[1]||0)+1):e.type===`year_month`?(n=t+(this.sel[0]||0),r=(this.sel[1]||0)+1):(n=t+(this.sel[0]||0),r=(this.sel[1]||0)+1,i=(this.sel[2]||0)+1);let a=M_(r),o=M_(i),s;return s=e.type===`year_month_day`?`${n}-${a}-${o}`:e.type===`year_month`?`${n}-${a}`:`${a}-${o}`,{year:e.type===`month_day`?``:String(n),month:a,day:e.type===`year_month`?``:o,value:s}},onConfirm(){o_(!0,this.buildResult())},onCancel(){o_(!1)}},beforeUnmount(){window.removeEventListener(`mousemove`,this.onDragMove),window.removeEventListener(`mouseup`,this.onDragEnd),window.removeEventListener(`touchmove`,this.onDragMove),window.removeEventListener(`touchend`,this.onDragEnd),this.scrollTimers.forEach(e=>clearTimeout(e))}},L_={class:`device-ui`},R_={class:`pk-sheet`},z_={class:`pk-bar`},B_={key:0,class:`pk-bar__title`},V_=[`onMousedown`,`onTouchstart`,`onWheel`],H_=[`onScroll`],U_=[`onClick`];function W_(e,t,n,r,i,a){return z(),B(`div`,L_,[U(_o,{name:`picker-fade`},{default:P(()=>[a.datePicker?(z(),B(`div`,{key:0,class:`pk-mask`,onClick:t[2]||=q((...e)=>a.onCancel&&a.onCancel(...e),[`self`])},[H(`div`,R_,[H(`div`,z_,[H(`button`,{type:`button`,class:`pk-bar__btn pk-bar__btn--cancel`,onClick:t[0]||=(...e)=>a.onCancel&&a.onCancel(...e)},`取消`),a.datePicker.title?(z(),B(`div`,B_,A(a.datePicker.title),1)):G(``,!0),H(`button`,{type:`button`,class:`pk-bar__btn pk-bar__btn--ok`,onClick:t[1]||=(...e)=>a.onConfirm&&a.onConfirm(...e)},`确定`)]),H(`div`,{ref:`cols`,class:k([`pk-cols pk-cols--wheel`,[`pk-cols--`+a.columns.length,{"is-dragging":i.dragging}]])},[(z(!0),B(R,null,L(a.columns,(e,n)=>(z(),B(`div`,{key:e.key,class:`pk-col`,onMousedown:q(e=>a.onDragStart(n,e),[`prevent`]),onTouchstart:q(e=>a.onDragStart(n,e),[`prevent`]),onWheel:e=>a.onWheel(n,e)},[t[3]||=H(`div`,{class:`pk-col__band`},null,-1),H(`div`,{class:`pk-col__list`,onScroll:e=>a.onScroll(n,e)},[(z(!0),B(R,null,L(e.items,(t,r)=>(z(),B(`div`,{key:e.key+`-`+t.text,class:k([`pk-item`,{"pk-item--on":i.sel[n]===r}]),onClick:e=>a.onItemClick(n,r)},A(t.text),11,U_))),128))],40,H_)],40,V_))),128))],2)])])):G(``,!0)]),_:1})])}var G_=Z(I_,[[`render`,W_]]),K_={name:`SelectionOverlay`,props:{store:{type:Object,default:()=>Ku},boxClass:{type:String,default:`ce-sel-overlay`}},data(){return{boxStyle:{top:`0px`,left:`0px`,width:`0px`,height:`0px`},_ro:null,_onScroll:null,_onResize:null,_raf:0}},watch:{"store.el"(){this.bindTarget(),this.schedule()}},mounted(){this._onScroll=()=>this.schedule(),this._onResize=()=>this.schedule(),document.addEventListener(`scroll`,this._onScroll,{passive:!0,capture:!0}),window.addEventListener(`resize`,this._onResize),this.bindTarget(),this.schedule()},beforeUnmount(){document.removeEventListener(`scroll`,this._onScroll,{capture:!0}),window.removeEventListener(`resize`,this._onResize),this._ro&&=(this._ro.disconnect(),null),this._raf&&cancelAnimationFrame(this._raf)},methods:{bindTarget(){this._ro&&=(this._ro.disconnect(),null);let e=this.store.el;!e||typeof ResizeObserver>`u`||(this._ro=new ResizeObserver(()=>this.schedule()),this._ro.observe(e))},schedule(){this._raf||=requestAnimationFrame(()=>{this._raf=0,this.recompute()})},recompute(){let e=this.store.el;if(!e||!this.store.visible)return;let t=e.closest(`.phone__screen`);if(!t){this.store.visible=!1;return}let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top-n.top+t.scrollTop,a=r.left-n.left+t.scrollLeft;this.boxStyle={top:i+`px`,left:a+`px`,width:r.width+`px`,height:r.height+`px`}}}},q_={width:`100%`,height:`100%`,style:{display:`block`},xmlns:`http://www.w3.org/2000/svg`};function J_(e,t,n,r,i,a){return F((z(),B(`div`,{class:k(n.boxClass),style:O(i.boxStyle)},[(z(),B(`svg`,q_,[...t[0]||=[H(`rect`,{id:`controls_bounding_rect`,x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`transparent`,style:{stroke:`var(--accent)`},"stroke-width":`1`,"stroke-dasharray":`4`},null,-1)]]))],6)),[[Fo,n.store.visible]])}var Y_=Z(K_,[[`render`,J_]]),X_=M({el:null,visible:!1,nodeId:null});function Z_(e,t){X_.el=e,X_.nodeId=t,X_.visible=!0}function Q_(e){X_.el&&(e==null||X_.nodeId===e)&&(X_.el=null,X_.nodeId=null,X_.visible=!1)}var $_={name:`HoverGuides`,setup(){return{hoverGuide:X_}},data(){return{box:{left:0,top:0,right:0,bottom:0},containerStyle:{width:`0px`,height:`0px`},_ro:null,_onScroll:null,_onResize:null,_raf:0,_stopWatch:null}},created(){this._stopWatch=Un(()=>X_.el,()=>{this.bindTarget(),this.schedule()})},mounted(){this._onScroll=()=>this.schedule(),this._onResize=()=>this.schedule(),document.addEventListener(`scroll`,this._onScroll,{passive:!0,capture:!0}),window.addEventListener(`resize`,this._onResize),this.bindTarget(),this.schedule()},beforeUnmount(){document.removeEventListener(`scroll`,this._onScroll,{capture:!0}),window.removeEventListener(`resize`,this._onResize),this._stopWatch&&=(this._stopWatch(),null),this._ro&&=(this._ro.disconnect(),null),this._raf&&cancelAnimationFrame(this._raf)},methods:{bindTarget(){this._ro&&=(this._ro.disconnect(),null);let e=X_.el;!e||typeof ResizeObserver>`u`||(this._ro=new ResizeObserver(()=>this.schedule()),this._ro.observe(e))},schedule(){this._raf||=requestAnimationFrame(()=>{this._raf=0,this.recompute()})},recompute(){let e=X_.el;if(!e||!X_.visible)return;let t=e.closest(`.phone__screen`);if(!t){X_.visible=!1;return}let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.left-n.left+t.scrollLeft,a=r.top-n.top+t.scrollTop,o=r.width,s=r.height;this.box={left:i,top:a,right:i+o,bottom:a+s},this.containerStyle={width:t.clientWidth+`px`,height:t.scrollHeight+`px`}}}};function ev(e,t,n,r,i,a){return F((z(),B(`div`,{class:`ce-guides`,style:O(i.containerStyle)},[H(`div`,{class:`ce-guide ce-guide--v`,style:O({left:i.box.left+`px`})},null,4),H(`div`,{class:`ce-guide ce-guide--v`,style:O({left:i.box.right+`px`})},null,4),H(`div`,{class:`ce-guide ce-guide--h`,style:O({top:i.box.top+`px`})},null,4),H(`div`,{class:`ce-guide ce-guide--h`,style:O({top:i.box.bottom+`px`})},null,4)],4)),[[Fo,r.hoverGuide.visible]])}var tv=Z($_,[[`render`,ev]]),nv=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),rv=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),iv=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),av=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ov=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),sv=o((e=>{var t=rv().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),cv=o((e=>{var t=rv().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),lv=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),uv=o((e=>{var t=iv(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),dv=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),fv=o((e=>{var t=dv();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),pv=o(((e,t)=>{var n=fv();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),mv=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),hv=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
70
|
+
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),gv=o((e=>{var t=mv(),n=hv();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),_v=o((e=>{var t=rv(),n=uv(),r=iv(),i=gv(),a=mv(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),vv=o((e=>{var t=rv(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),yv=o(((e,t)=>{var n=gv();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),bv=o(((e,t)=>{var n=gv(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),xv=o(((e,t)=>{var n=gv();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),Sv=o(((e,t)=>{var n=gv(),r=rv();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
|
71
|
+
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Cv=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),wv=o((e=>{var t=gv(),n=yv(),r=bv(),i=xv(),a=Sv(),o=hv(),s=rv(),c=Cv();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
|
72
|
+
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Tv=o((e=>{var t=rv(),n=iv(),r=av(),i=ov(),a=sv(),o=cv(),s=lv(),c=uv(),l=pv(),u=_v(),d=vv(),f=gv(),p=wv();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
|
|
73
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
74
|
+
Minimum version required to store current data is: `+c+`.
|
|
75
|
+
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),Ev=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Dv=o((e=>{var t=Ev();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),Ov=o((e=>{var t=Ev();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
|
|
76
|
+
`;return typeof a==`function`&&a(null,p),p}})),kv=c(o((e=>{var t=nv(),n=Tv(),r=Dv(),i=Ov();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))()),Av={name:`RemotePreview`,props:{visible:{type:Boolean,default:!1},pageId:{type:[String,Number],default:``},schema:{type:Object,default:null},cardCode:{type:String,default:``}},data(){return{qrDataUrl:``,url:``,loading:!1,publishing:!1,copied:!1,copyTimer:null,warn:``,code:``}},watch:{visible(e){e&&this.open()},pageId(){this.visible&&this.open()}},beforeUnmount(){this.copyTimer&&clearTimeout(this.copyTimer)},methods:{buildSocket(e){return`${`https://uat-pkg.finmall.com`.replace(/^https?:/,`wss:`)}/pmb-web/websocket/card/${e}`},fullUrl(e,t){let n=this.buildSocket(e);return`app://previewCard?cardId=${encodeURIComponent(e)}&cardCode=${encodeURIComponent(t||``)}&cardVersion=00000000&socket=${encodeURIComponent(n)}`},async makeQr(e){return kv.toDataURL(e,{width:220,margin:1,errorCorrectionLevel:`H`,color:{dark:`#10131a`,light:`#ffffff`}})},async open(){this.qrDataUrl=``,this.url=``,this.loading=!0,this.publishing=!1,this.copied=!1,this.warn=``,this.code=this.cardCode||``;let e=String(this.pageId||``).trim();if(!e){this.warn=`当前卡片缺少 pageId(远端卡片 id),无法生成预览二维码`,this.loading=!1;return}this.url=`app://previewCard?cardId=${encodeURIComponent(e)}`;try{this.qrDataUrl=await this.makeQr(this.url)}catch(e){this.warn=`二维码生成失败:`+(e&&e.message)}this.publishing=!0;try{let t=await J(`/__preview`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({schema:this.schema||{pageId:e}})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.message||`preview failed`);n.cardCode!==void 0&&(this.code=n.cardCode),this.url=this.fullUrl(e,this.code),this.qrDataUrl=await this.makeQr(this.url)}catch(e){this.warn=`远端发布失败:`+(e&&e.message)}finally{this.publishing=!1,this.loading=!1}},async copyUrl(){if(this.url)try{if(navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(this.url);else{let e=document.createElement(`textarea`);e.value=this.url,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}this.copied=!0,this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copied=!1},1500)}catch(e){this.warn=`复制失败:`+(e&&e.message)}}}},jv={class:`rp-card modal-card`,role:`dialog`,"aria-label":`远端预览二维码`},Mv={class:`rp-head`},Nv={class:`rp-body`},Pv={class:`rp-qr-wrap`},Fv=[`src`],Iv={key:1,class:`rp-qr rp-qr--loading`},Lv={key:2,class:`rp-qr-loading`},Rv={class:`rp-url`},zv={class:`rp-url-text`},Bv=[`disabled`],Vv={key:0,class:`rp-warn`};function Hv(e,t,n,r,i,a){return z(),V(_o,{name:`modal`},{default:P(()=>[n.visible?(z(),B(`div`,{key:0,class:`rp-mask`,onClick:t[2]||=q(t=>e.$emit(`close`),[`self`])},[H(`div`,jv,[H(`div`,Mv,[t[3]||=H(`span`,{class:`rp-title`},`远端预览(真机扫码)`,-1),H(`button`,{class:`rp-x`,type:`button`,onClick:t[0]||=t=>e.$emit(`close`),"aria-label":`关闭`},`×`)]),H(`div`,Nv,[H(`div`,Pv,[i.qrDataUrl?(z(),B(`img`,{key:0,src:i.qrDataUrl,class:k([`rp-qr`,{"rp-qr--blurred":i.publishing}]),alt:`preview qr`},null,10,Fv)):(z(),B(`div`,Iv,A(i.loading?`准备中…`:`—`),1)),i.publishing?(z(),B(`div`,Lv,[...t[4]||=[H(`span`,{class:`rp-spinner`},null,-1),H(`span`,{class:`rp-loading-text`},`正在发布预览…`,-1)]])):G(``,!0)]),t[5]||=H(`p`,{class:`rp-tip`},`手机(FinMall App)扫一扫,真机查看当前卡片预览`,-1),H(`div`,Rv,[H(`code`,zv,A(i.url||`—`),1),H(`button`,{class:`rp-copy`,type:`button`,disabled:!i.url,onClick:t[1]||=(...e)=>a.copyUrl&&a.copyUrl(...e)},A(i.copied?`已复制 ✓`:`复制链接`),9,Bv)]),i.warn?(z(),B(`p`,Vv,A(i.warn),1)):G(``,!0)])])])):G(``,!0)]),_:1})}var Uv=Z(Av,[[`render`,Hv]]),Wv={name:`AppToast`,computed:{toast(){return td}}},Gv={class:`apptoast__icon`},Kv={class:`apptoast__icon-svg`,viewBox:`0 0 24 24`,"aria-hidden":`true`},qv={key:0,d:`M5 13l4 4L19 7`},Jv={key:1,d:`M6 6l12 12M18 6L6 18`},Yv={class:`apptoast__msg`};function Xv(e,t,n,r,i,a){return z(),V(_o,{name:`apptoast-fade`},{default:P(()=>[a.toast.visible?(z(),B(`div`,{key:0,class:k([`apptoast`,`apptoast--`+a.toast.type]),role:`status`,"aria-live":`polite`},[H(`span`,Gv,[(z(),B(`svg`,Kv,[a.toast.type===`ok`?(z(),B(`path`,qv)):(z(),B(`path`,Jv))]))]),H(`span`,Yv,A(a.toast.message),1)],2)):G(``,!0)]),_:1})}var Zv=Z(Wv,[[`render`,Xv]]),Qv={name:`CardGallery`,props:{visible:{type:Boolean,default:!1},cards:{type:Array,default:()=>[]},selectedId:{type:String,default:``}},emits:[`select`,`close`],data(){return{query:``,sortByTime:this.loadSortByTime(),visibleIds:new Set,failed:new Set,observer:null,base:``}},created(){this.saveSortByTime()},computed:{filtered(){let e=this.query.trim().toLowerCase(),t=this.cards;return e&&(t=t.filter(t=>t.id.toLowerCase().includes(e)||String(t.name||``).toLowerCase().includes(e))),this.sortByTime?t.slice().sort((e,t)=>(t.mtime||0)-(e.mtime||0)):t.slice().sort((e,t)=>String(e.name||``).localeCompare(String(t.name||``)))}},watch:{visible(e){e?(this.query=``,this.failed=new Set,this.$nextTick(()=>{this.setupObserver(),this.focusSearch()}),window.addEventListener(`keydown`,this.onKey)):(this.teardownObserver(),window.removeEventListener(`keydown`,this.onKey))},query(){this.visible&&this.$nextTick(this.setupObserver)},sortByTime(e){this.saveSortByTime()}},beforeUnmount(){this.teardownObserver(),window.removeEventListener(`keydown`,this.onKey)},methods:{thumbUrl(e){return(this.base||js()||``)+`/__card-image/`+encodeURIComponent(e)},setupObserver(){this.base=js()||``;let e=this.$refs.grid;e&&(this.teardownObserver(),this.observer=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let e=t.target.getAttribute(`data-id`);if(e&&!this.visibleIds.has(e)){let t=new Set(this.visibleIds);t.add(e),this.visibleIds=t}this.observer.unobserve(t.target)}},{root:e,rootMargin:`200px`}),e.querySelectorAll(`.cg-tile`).forEach(e=>this.observer.observe(e)))},teardownObserver(){this.observer&&=(this.observer.disconnect(),null)},onImgError(e){let t=new Set(this.failed);t.add(e),this.failed=t},loadSortByTime(){try{return localStorage.getItem(`cardbuddy:cardgallery-sort-by-time`)===`1`}catch{return!1}},saveSortByTime(){try{localStorage.setItem(`cardbuddy:cardgallery-sort-by-time`,this.sortByTime?`1`:`0`)}catch{}},toggleSort(){this.sortByTime=!this.sortByTime},onKey(e){e.key===`Escape`&&this.close()},focusSearch(){this.$refs.search&&this.$refs.search.focus()},choose(e){e&&(this.$emit(`select`,e.id),this.close())},close(){this.$emit(`close`)}}},$v={class:`cg-modal modal-card`,role:`dialog`,"aria-modal":`true`,"aria-label":`卡片网格预览`},ey={class:`cg-modal__head`},ty={class:`cg-modal__title`},ny={class:`cg-modal__count`},ry={class:`cg-modal__search`},iy=[`title`,`aria-pressed`],ay={ref:`grid`,class:`cg-grid`},oy=[`data-id`,`onClick`],sy={class:`cg-tile__thumb`},cy={key:0,class:`cg-tile__tag`,title:`导入卡片(含 .import-meta.json 来源信息)`},ly=[`src`,`alt`,`onError`],uy={key:2,class:`cg-tile__skeleton`},dy={key:3,class:`cg-tile__fallback`},fy={class:`cg-tile__meta`},py=[`title`],my=[`title`],hy={key:0,class:`cg-empty`};function gy(e,t,n,r,i,a){return z(),V(_o,{name:`modal`},{default:P(()=>[n.visible?(z(),B(`div`,{key:0,class:`cg-mask`,onClick:t[3]||=q((...e)=>a.close&&a.close(...e),[`self`])},[H(`div`,$v,[H(`header`,ey,[H(`div`,ty,[t[4]||=H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-grid`})],-1),t[5]||=H(`span`,null,`卡片网格预览`,-1),H(`span`,ny,A(n.cards.length)+` 张本地卡片`,1)]),H(`div`,ry,[t[6]||=H(`svg`,{class:`cg-modal__search-icon`,viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`},[H(`use`,{href:`#icon-search`})],-1),F(H(`input`,{ref:`search`,"onUpdate:modelValue":t[0]||=e=>i.query=e,class:`cg-modal__input`,type:`text`,placeholder:`搜索卡片 ID / 名称…`},null,512),[[hs,i.query]])]),H(`button`,{class:k([`cg-modal__sort`,{"cg-modal__sort--active":i.sortByTime}]),type:`button`,title:i.sortByTime?`已按修改时间排序(新→旧),点击取消`:`按修改时间排序(新→旧)`,"aria-pressed":i.sortByTime,onClick:t[1]||=(...e)=>a.toggleSort&&a.toggleSort(...e)},`按修改时间排序`,10,iy),H(`button`,{class:`cg-modal__close`,type:`button`,title:`关闭`,onClick:t[2]||=(...e)=>a.close&&a.close(...e),"aria-label":`关闭`},[...t[7]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}),H(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`})],-1)]])]),H(`div`,ay,[(z(!0),B(R,null,L(a.filtered,e=>(z(),B(`button`,{key:e.id,"data-id":e.id,type:`button`,class:k([`cg-tile`,{"cg-tile--active":e.id===n.selectedId,"cg-tile--failed":i.failed.has(e.id)}]),onClick:t=>a.choose(e)},[H(`div`,sy,[e.imported?(z(),B(`span`,cy,`导入`)):G(``,!0),i.visibleIds.has(e.id)&&!i.failed.has(e.id)?(z(),B(`img`,{key:1,class:`cg-tile__img`,src:a.thumbUrl(e.id),alt:e.name,loading:`lazy`,onError:t=>a.onImgError(e.id)},null,40,ly)):i.visibleIds.has(e.id)?(z(),B(`div`,dy,[...t[8]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.6`,"aria-hidden":`true`},[H(`use`,{href:`#icon-glyph-Image`})],-1),H(`span`,null,`预览不可用`,-1)]])):(z(),B(`div`,uy,`预览加载中…`))]),H(`div`,fy,[H(`span`,{class:`cg-tile__name`,title:e.name},A(e.name),9,py),H(`span`,{class:`cg-tile__id`,title:e.id},A(e.id),9,my)])],10,oy))),128)),a.filtered.length?G(``,!0):(z(),B(`p`,hy,`无匹配卡片`))],512)])])):G(``,!0)]),_:1})}var _y=Z(Qv,[[`render`,gy]]),vy=[`Row`,`Column`,`MultiColumn`,`ListLayout`,`GridLayout`,`AbsoluteLayout`,`ViewContainer`,`Text`,`Button`,`Image`,`Icon`,`MultiText`,`Canvas`,`Input`,`CheckGroup`,`RadioButton`,`ProgressSlider`,`Video`,`Map`,`Divider`];function yy(){let e=cc.groups&&cc.groups.length?cc.groups:[`布局组件`,`基础组件`],t={},n=cc.components||{};for(let e in n){let r=n[e],i=r.group||`基础组件`;t[i]||(t[i]=[]);let a=r.name||e;t[i].push({className:e,name:a,glyph:e})}return e.filter(e=>t[e]&&t[e].length).map(e=>({key:e,items:t[e]}))}var by={name:`ComponentPalette`,emits:[`pick`,`close`],data(){return{groups:yy(),query:``}},computed:{filteredGroups(){let e=(this.query||``).trim().toLowerCase();return e?this.groups.map(t=>({key:t.key,items:t.items.filter(t=>{let n=(t.name||``).toLowerCase(),r=(t.className||``).toLowerCase();return n.indexOf(e)!==-1||r.indexOf(e)!==-1})})).filter(e=>e.items.length):this.groups}},methods:{iconSvg(e){return vy.indexOf(e)===-1?`<span class="cp__avatar-text">`+String(e).slice(0,1)+`</span>`:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18"><use href="#icon-glyph-`+e+`"></use></svg>`}}},xy={class:`cp modal-card`,role:`dialog`,"aria-label":`选择组件类型`},Sy={class:`cp__head`},Cy={class:`cp__body`},wy={class:`cp__group-title`},Ty={class:`cp__grid`},Ey=[`title`,`onClick`],Dy=[`data-g`,`innerHTML`],Oy={class:`cp__item-name`},ky={class:`cp__item-class`},Ay={key:0,class:`cp__empty`};function jy(e,t,n,r,i,a){return z(),B(`div`,{class:`cp__mask`,onClick:t[2]||=q(t=>e.$emit(`close`),[`self`])},[H(`div`,xy,[H(`div`,Sy,[t[3]||=H(`span`,{class:`cp__title`},`添加组件`,-1),t[4]||=H(`span`,{class:`cp__hint`},`选择要插入的组件类型`,-1),H(`button`,{class:`cp__close`,type:`button`,title:`关闭`,onClick:t[0]||=t=>e.$emit(`close`)},`✕`)]),H(`div`,Cy,[F(H(`input`,{class:`cp__search`,type:`text`,"onUpdate:modelValue":t[1]||=e=>i.query=e,placeholder:`搜索组件…`,title:`按组件名 / 类型过滤`},null,512),[[hs,i.query]]),(z(!0),B(R,null,L(a.filteredGroups,t=>(z(),B(`section`,{key:t.key,class:`cp__group`},[H(`h4`,wy,A(t.key),1),H(`div`,Ty,[(z(!0),B(R,null,L(t.items,n=>(z(),B(`button`,{key:n.className,class:`cp__item`,type:`button`,title:n.className,onClick:t=>e.$emit(`pick`,n.className)},[H(`span`,{class:`cp__avatar`,"data-g":t.key===`布局组件`?`layout`:`basic`,innerHTML:a.iconSvg(n.glyph)},null,8,Dy),H(`span`,Oy,A(n.name),1),H(`span`,ky,A(n.className),1)],8,Ey))),128))])]))),128)),i.query&&!a.filteredGroups.length?(z(),B(`p`,Ay,`无匹配组件`)):G(``,!0)])])])}var My=Z(by,[[`render`,jy],[`__scopeId`,`data-v-8ec066bf`]]),Ny={name:`Switch`,props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],methods:{onClick(){this.disabled||this.$emit(`update:modelValue`,!this.modelValue)}}},Py=[`aria-checked`,`disabled`];function Fy(e,t,n,r,i,a){return z(),B(`button`,{type:`button`,class:k([`switch`,{"switch--on":n.modelValue,"switch--disabled":n.disabled}]),role:`switch`,"aria-checked":String(n.modelValue),disabled:n.disabled,onClick:t[0]||=(...e)=>a.onClick&&a.onClick(...e)},[...t[1]||=[H(`span`,{class:`switch__track`},[H(`span`,{class:`switch__thumb`})],-1)]],10,Py)}var Iy=Z(Ny,[[`render`,Fy]]),Ly=`/assets/site-icon-CFMif8z4.png`;function Ry(e){if(!e||typeof e!=`object`)return{};let t={};for(let n of e.dictionary?.inputParams||[]){let e=zy(n),r=n.defaultValue,i=r&&typeof r==`object`&&!Array.isArray(r)&&Object.keys(r).length===0;t[n.key]=By(e!==void 0&&(r===void 0||r===``||i)?e:r)}return t}function zy(e){if(!e.desc||typeof e.desc!=`string`)return;let t=e.desc.trim();if(t.startsWith(`{`))try{let n=JSON.parse(t);return Object.prototype.hasOwnProperty.call(n,e.key)?n[e.key]:void 0}catch{return}}function By(e){return e==null?e:JSON.parse(JSON.stringify(e))}var Vy=2500,Hy=new Xs,Uy=tc({},Hy),Wy={name:`App`,components:{RenderTree:$u,DebugPanel:Zh,ApiCallPanel:pg,CardSelect:jg,AlertCardLayer:Vg,DeviceOverlay:x_,PickerOverlay:A_,DatePickerOverlay:G_,SelectionOverlay:Y_,HoverGuides:tv,RemotePreview:Uv,AppToast:Zv,ConfirmDialog:dd,CardGallery:_y,ComponentPalette:My,Switch:Iy},provide(){return{adapter:Hy,cardRuntime:Uy,customComponents:{}}},data(){return{adapter:Hy,rt:Uy,logoUrl:Ly,appVersion:`0.8.1`,cardList:[],cardCount:0,galleryOpen:!1,selectedId:``,externalReloadNote:``,externalReloadTimer:null,selfSaveId:``,selfSaveAt:0,preview:null,chromeOff:!1,theme:`dark`,cardReady:!1,reloadToken:0,moveCollapseToken:0,refreshing:!1,loadingCard:!1,currentSchema:null,currentCard:null,cardImportMeta:null,localSchema:null,localData:null,selectedNodeId:``,activeTab:`scope`,apiPanelOpen:!0,addNodePanelOpen:!1,addNodeTarget:null,validateBadge:{state:`idle`,errors:0,warnings:0,renderOk:null,ts:0},validateTimer:null,copiedSchema:!1,copyTimer:null,savedCard:!1,savingCard:!1,saveTimer:null,savingRemote:!1,savedRemote:!1,verifiedRemote:null,saveRemoteTimer:null,syncingRemote:!1,syncedRemote:!1,remotePreviewOpen:!1,syncTarget:null,syncTimer:null,uploadingSlices:!1,loginModal:!1,loginName:``,loginPassword:``,loginSubmitting:!1,loginError:``,confirm:{show:!1,title:``,message:``,confirmText:`继续`,cancelText:`取消`,severity:`primary`,onConfirm:null},past:[],future:[],baseline:null,_commitTimer:null,viewportHeight:700,canvasBg:`gray`,refreshing:!1,bgOptions:[{key:`checker`,label:`棋盘`},{key:`white`,label:`白色`},{key:`gray`,label:`浅灰`}],_previewWidthPx:372,_apiPanelWidthPx:360,presetSizes:[{key:375,value:`375`},{key:430,value:`430`},{key:188,value:`188`}],stageWidth:typeof window<`u`?window.innerWidth:1280,stageHeight:typeof window<`u`?window.innerHeight-52:748,dragging:!1,apiDragging:!1,_stageObserver:null,_dragMove:null,_dragUp:null,devServiceOpen:!1,devServiceForm:ks(),apiBaseResolved:js(),devSvcLive:`unknown`,devSvcDown:!1,_unsubCardsChanged:null}},computed:{currentBg(){return this.bgOptions.find(e=>e.key===this.canvasBg)||this.bgOptions[0]},canUndo(){return this.past.length>0},canRedo(){return this.future.length>0},devSvcBlockReason(){let e=this.devServiceForm||{};return String(e.baseUrl||``).trim()?e.enabled?null:`disabled`:`empty`},canPaste(){return!!Rc()},hasCardSource(){return!!(this.cardImportMeta&&this.cardImportMeta.source)},historyDirty(){return!this.localSchema||!this.currentSchema?!1:!this.structuralEqual(this.currentSchema,this.localSchema)||!this.dataEqual(this.rt&&this.rt.rootScope,this.localData)},devSvcConn(){return this.apiBaseResolved===null?`unconfigured`:this.devSvcLive===`open`?`open`:this.devSvcDown?`closed`:`connecting`},devSvcTitle(){if(this.apiBaseResolved===null)return this.devSvcBlockReason===`disabled`?`已填地址但未开启用本地服务`:`未配置本地开发服务(部署态必填)`;let e=this.apiBaseResolved===``?`同源开发服务`:`本地开发服务`;return this.devSvcLive===`open`?e+`已连接`:this.devSvcDown?e+`已断开(连接失败或服务已停止,重连中…)`:e+`连接中 / 重连中…`},devSvcClass(){return this.apiBaseResolved===null?`app__btn--warn`:this.devSvcLive===`open`?`app__btn--connected`:this.devSvcDown?`app__btn--disconnected`:`app__btn--reconnecting`},devSvcLabel(){return this.apiBaseResolved===null?`未配置本地服务`:this.devSvcLive===`open`?`本地服务已连接`:this.devSvcDown?`本地服务已断开`:`本地服务连接中…`},badgeText(){return{idle:`待校验`,pending:`校验中…`,ok:`校验通过`,error:`校验未通过`,nopython:`未配置校验`,fail:`校验服务异常`}[this.validateBadge.state]||`待校验`},badgeTitle(){let e=this.validateBadge;if(e.state===`ok`)return`结构合法 + 渲染不抛错(不保证画得对,视觉正确性见截图)`;if(e.state===`error`){let t=[];return e.errors&&t.push(`契约错误 ${e.errors} 个`),e.renderOk===!1&&t.push(`渲染抛出异常`),`校验未通过:`+(t.join(`;`)||`详见 /__validate 与 /__render-status`)}return e.state===`nopython`?`未找到 python3/python,无法跑契约校验(请安装 Python 或设置 DSL_PYTHON)`:e.state===`fail`?`校验服务异常(dev server 未启动或端点不可用)`:``},previewWidth(){if(this.chromeOff)return this.stageWidth;let e=this.stageWidth||1,t=Math.max(188,Math.floor(e/2)),n=this._previewWidthPx||188;return Math.max(188,Math.min(t,n))},canvasW(){return Math.round(this.previewWidth||375)},apiPanelWidth(){let e=Math.floor((typeof window<`u`?window.innerWidth:1280)/3),t=Math.max(320,Math.floor((this.stageWidth||0)-this.previewWidth-e)),n=this._apiPanelWidthPx||360;return Math.max(320,Math.min(t,n))},frameStyle(){return{}}},watch:{activeTab(e){e!==`structure`&&(this.selectedNodeId=``,Q_())},theme(e){document.documentElement.dataset.theme=e},apiPanelOpen(e){try{localStorage.setItem(`cardbuddy:api-panel-open`,e?`1`:`0`)}catch{}}},beforeUnmount(){this.viewportObserver&&this.viewportObserver.disconnect(),this._stageObserver&&this._stageObserver.disconnect(),this._dragMove&&document.removeEventListener(`mousemove`,this._dragMove),this._dragUp&&document.removeEventListener(`mouseup`,this._dragUp),this.saveTimer&&clearTimeout(this.saveTimer),this.syncTimer&&clearTimeout(this.syncTimer),this.saveRemoteTimer&&clearTimeout(this.saveRemoteTimer),window.removeEventListener(`keydown`,this.onKeydown)},mounted(){this.viewportObserver=new ResizeObserver(e=>{for(let t of e)this.viewportHeight=Math.round(t.contentRect.height)}),this.$refs.phoneViewport&&this.viewportObserver.observe(this.$refs.phoneViewport),this.loadPreviewWidth(),this.loadApiPanelWidth(),this._stageObserver=new ResizeObserver(e=>{for(let t of e)this.stageWidth=Math.round(t.contentRect.width),this.stageHeight=Math.round(t.contentRect.height)}),this.$refs.stageEl&&this._stageObserver.observe(this.$refs.stageEl),window.addEventListener(`keydown`,this.onKeydown)},async created(){c_(Uy);let e=new URLSearchParams(location.search).get(`chrome`);this.chromeOff=e===`off`||e===``;try{let e=localStorage.getItem(`cardbuddy:theme`);(e===`light`||e===`dark`)&&(this.theme=e)}catch{}document.documentElement.dataset.theme=this.theme;try{localStorage.getItem(`cardbuddy:api-panel-open`)===`0`&&(this.apiPanelOpen=!1)}catch{}await this.fetchCardList();let t=new URLSearchParams(location.search).get(`card`),n=null;try{let e=localStorage.getItem(`cardbuddy:selected-card`);e&&this.cardList.some(t=>t.id===e)&&(n=e)}catch{}let r=t&&this.cardList.some(e=>e.id===t)?t:n||this.cardList[0]&&this.cardList[0].id;r&&(this.selectedId=r,await this.loadCard(this.selectedId)),this.$watch(()=>this.rt.rootScope,()=>{this.syncDataToSchema()},{deep:!0}),this.setupCardsChanged()},methods:{setupCardsChanged(){if(this._unsubCardsChanged){try{this._unsubCardsChanged()}catch{}this._unsubCardsChanged=null}this.devSvcLive=`connecting`,this._unsubCardsChanged=Ls(e=>this.onCardsChanged(e),e=>this.onDevServiceState(e))},onDevServiceState(e){let t=this.devSvcLive===`connecting`;this.devSvcLive=e,e===`open`?this.devSvcDown=!1:e===`closed`&&(this.devSvcDown=!0),e===`connecting`?!t&&!this._svcWatchdog&&(this._svcWatchdog=setTimeout(()=>{this.devSvcLive===`connecting`&&(this.devSvcLive=`closed`,this.devSvcDown=!0),this._svcWatchdog=null},8e3)):this._svcWatchdog&&=(clearTimeout(this._svcWatchdog),null)},saveDevService(){As(this.devServiceForm),this.apiBaseResolved=js(),this.setupCardsChanged(),this.devServiceOpen=!1,Q(`本地开发服务配置已保存`,`ok`),this.fetchCardList()},startDrag(){if(this.chromeOff)return;this.dragging=!0,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`;let e=this.$refs.stageEl;this._dragMove=t=>{let n=e.getBoundingClientRect(),r=Math.max(188,Math.floor(n.width/2)),i=t.clientX-n.left;i=Math.max(188,Math.min(r,i)),this._previewWidthPx=i},this._dragUp=()=>{this.dragging=!1,document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`mousemove`,this._dragMove),document.removeEventListener(`mouseup`,this._dragUp),this.savePreviewWidth()},document.addEventListener(`mousemove`,this._dragMove),document.addEventListener(`mouseup`,this._dragUp)},loadPreviewWidth(){try{let e=localStorage.getItem(`cardbuddy:preview-width`);if(e!=null){let t=parseInt(e,10);!Number.isNaN(t)&&t>=188&&(this._previewWidthPx=t)}}catch{}},savePreviewWidth(){try{localStorage.setItem(`cardbuddy:preview-width`,String(Math.round(this._previewWidthPx)))}catch{}},setPresetWidth(e){if(this.chromeOff)return;let t=this.stageWidth||1,n=Math.max(188,Math.floor(t/2));this._previewWidthPx=Math.max(188,Math.min(n,e)),this.savePreviewWidth()},startApiDrag(){if(this.chromeOff||!this.apiPanelOpen)return;this.apiDragging=!0,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`;let e=this.$refs.stageEl;this._apiDragMove=t=>{let n=e.getBoundingClientRect(),r=Math.floor(window.innerWidth/3),i=Math.max(320,Math.floor(n.width-this.previewWidth-r)),a=Math.max(320,Math.min(i,n.right-t.clientX));this._apiPanelWidthPx=a},this._apiDragUp=()=>{this.apiDragging=!1,document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`mousemove`,this._apiDragMove),document.removeEventListener(`mouseup`,this._apiDragUp),this.saveApiPanelWidth()},document.addEventListener(`mousemove`,this._apiDragMove),document.addEventListener(`mouseup`,this._apiDragUp)},loadApiPanelWidth(){try{let e=localStorage.getItem(`cardbuddy:api-panel-width`);if(e!=null){let t=parseInt(e,10);!Number.isNaN(t)&&t>=320&&(this._apiPanelWidthPx=t)}}catch{}},saveApiPanelWidth(){try{localStorage.setItem(`cardbuddy:api-panel-width`,String(Math.round(this.apiPanelWidth)))}catch{}},chooseBg(e){this.canvasBg=e},onSelect(e){this.loadingCard=!0,this.selectedId=e;try{localStorage.setItem(`cardbuddy:selected-card`,e)}catch{}this.loadCard(e,{clearAll:!0})},openGallery(){this.cardList.length&&(this.galleryOpen=!0)},closeGallery(){this.galleryOpen=!1},async openCardFolder(){if(this.selectedId)try{let e=await J(`/__open-folder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:this.selectedId})}),t=(e.headers.get(`content-type`)||``).includes(`application/json`)?await e.json().catch(()=>({})):{};!e.ok||!t.ok?Q(t.error||`打开文件夹失败`,`err`):Q(`已打开卡片文件夹`,`ok`)}catch{Q(`无法连接本地开发服务,请确认已启动`,`err`)}},async refreshCard(){if(!(!this.selectedId||this.refreshing)){this.refreshing=!0;try{await this.loadCard(this.selectedId)}finally{this.refreshing=!1}}},toggleTheme(){this.theme=this.theme===`light`?`dark`:`light`;try{localStorage.setItem(`cardbuddy:theme`,this.theme)}catch{}},toggleApiPanel(){this.apiPanelOpen=!this.apiPanelOpen},async refreshValidateBadge(){let e=this.selectedId;if(!(!e||!this.preview)&&(this.validateTimer&&clearTimeout(this.validateTimer),this.validateBadge={...this.validateBadge,state:`pending`},await new Promise(e=>{this.validateTimer=setTimeout(e,120)}),this.selectedId===e))try{let[t,n]=await Promise.all([J(`/__validate/${encodeURIComponent(e)}`),J(`/__render-status/${encodeURIComponent(e)}`)]);if(!t.ok){this.validateBadge={...this.validateBadge,state:t.status===503?`nopython`:`fail`};return}let r=await t.json().catch(()=>null),i=n.ok?await n.json().catch(()=>null):null;if(!r){this.validateBadge={...this.validateBadge,state:`fail`};return}let a=!!r.ok,o=!i||!!i.renderOk,s=a&&o;this.validateBadge={state:s?`ok`:`error`,errors:(r.errors||[]).length,warnings:(r.warnings||[]).length,renderOk:o,ts:Date.now()}}catch{this.validateBadge={...this.validateBadge,state:`fail`}}},async loadCard(e,t={}){if(e){this.loadingCard=!0;try{let n=await J(`/__card/${encodeURIComponent(e)}`);if(!n.ok){this.rt.pushError(`loadCard`,`HTTP `+n.status);return}let r=await n.json();if(!r.schema){this.rt.pushError(`loadCard`,`schema 读取失败`);return}t.clearAll?this.rt.clearErrors():this.rt.clearBindingErrors(),this.rt.clearApiCalls(),t.keepScope||this.rt.setRootScope(Ry(r.schema)),this.currentCard={schema:r.schema},this.currentSchema=r.schema,this.cardImportMeta=null,this.fetchImportMeta(e),this.localSchema=this.cloneSchema(r.schema),this.localData=this.cloneData(Ry(r.schema)),this.preview=Ac(r.schema),typeof window<`u`&&(window.__cardModel=Ic(r.schema)),this.cardReady=!1,this.$nextTick(()=>{this.cardReady=!0}),this.syncDataToSchema(),this.selectedNodeId=``,this.baseline={schema:this.cloneSchema(this.currentSchema)},this.reloadToken+=1,Lg(),l_(),this.refreshValidateBadge(),await this.loadHistory(e)}finally{this.loadingCard=!1}}},cloneSchema(e){return e?JSON.parse(JSON.stringify(e,(e,t)=>e===`_schemaNode`?void 0:t)):null},normalizeForCompare(e){let t=this.cloneSchema(e);if(t&&t.dictionary&&Array.isArray(t.dictionary.inputParams))for(let e of t.dictionary.inputParams)e&&typeof e==`object`&&(e.defaultValue=void 0);return t},structuralEqual(e,t){return!e||!t?e===t:JSON.stringify(this.normalizeForCompare(e))===JSON.stringify(this.normalizeForCompare(t))},cloneData(e){return e==null?e:JSON.parse(JSON.stringify(e,(e,t)=>e===`_schemaNode`?void 0:t))},dataEqual(e,t){return JSON.stringify(e)===JSON.stringify(t)},applySchemaSnapshot(e){if(!this.selectedId||!e)return;let t=e.schema||e,n=e.data==null?Ry(t):e.data;this.currentSchema=this.cloneSchema(t),this.rt.setRootScope(this.cloneData(n)),this.preview=Ac(this.currentSchema),typeof window<`u`&&(window.__cardModel=Ic(this.currentSchema)),this.syncDataToSchema(),this.selectedNodeId=``,this.reloadToken+=1,this.refreshValidateBadge()},commitHistory(){if(!this.currentSchema||!this.baseline)return;let e=this.structuralEqual(this.currentSchema,this.baseline.schema),t=this.dataEqual(this.rt.rootScope,Ry(this.baseline.schema));if(e&&t)return;let n={schema:this.baseline.schema};this.past.push(n),this.past.length>30&&this.past.shift(),this.future=[],this.baseline={schema:this.cloneSchema(this.currentSchema)},this.persistSnapshot(n)},scheduleCommit(){this._commitTimer&&clearTimeout(this._commitTimer),this._commitTimer=setTimeout(()=>{this._commitTimer=null,this.commitHistory()},500)},persistSnapshot(e){let t=this.selectedId;if(!t)return;let n=e.schema||e;J(`/__history/${encodeURIComponent(t)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({schema:n},(e,t)=>e===`_schemaNode`?void 0:t,2)}).catch(e=>console.warn(`[历史快照落盘失败]`,e))},async loadHistory(e){this.past=[],this.future=[];try{let t=await J(`/__history/${encodeURIComponent(e)}`);if(!t.ok)return;let n=await t.json().catch(()=>null),r=n&&n.snapshots||[];this.past=r.slice(-30).map(e=>({schema:e.schema,data:e.data==null?Ry(e.schema):e.data}))}catch(e){console.warn(`[加载编辑历史失败]`,e)}},undo(){if(!this.canUndo)return;let e=this.past.pop();this.future.push(this.baseline),this.future.length>30&&this.future.shift(),this.baseline=e,this.applySchemaSnapshot(e)},redo(){if(!this.canRedo)return;let e=this.future.pop();this.past.push(this.baseline),this.past.length>30&&this.past.shift(),this.baseline=e,this.applySchemaSnapshot(e)},async applyHistoryToLocal(){this.loadingCard||!this.historyDirty||!this.preview||!this.selectedId||await this.saveCard()&&Q(`已将该版本保存到本地`,`ok`)},onSchemaChanged(){!this.selectedId||!this.currentSchema||(this.reloadToken+=1,this.preview=Ac(this.currentSchema),typeof window<`u`&&(window.__cardModel=Ic(this.currentSchema)),this.syncDataToSchema(),this.selectedNodeId=``)},onSchemaCommit(){!this.selectedId||!this.currentSchema||(this.reloadToken+=1,this.preview=Ac(this.currentSchema),typeof window<`u`&&(window.__cardModel=Ic(this.currentSchema)),this.syncDataToSchema(),this.selectedNodeId=``,this.commitHistory())},syncDataToSchema(){let e=this.currentSchema;if(!e||!e.dictionary||!Array.isArray(e.dictionary.inputParams))return;let t=this.rt&&this.rt.rootScope;if(!t||typeof t!=`object`)return;let n=e.dictionary.inputParams;for(let e of Object.keys(t)){let r=n.find(t=>t&&(t.key===e||t.name===e));r&&(r.defaultValue=JSON.parse(JSON.stringify(t[e],(e,t)=>e===`_schemaNode`?void 0:t)))}},onSelectNode(e){this.selectedNodeId=e||``},findPreviewNodeById(e,t){if(!e||t==null)return null;let n=String(t),r=e=>{if(!e)return null;if(String(e.id)===n)return e;let t=[];if(e.components&&t.push(...e.components),e.slots)for(let n of e.slots)n.components&&t.push(...n.components);for(let e of t){let t=r(e);if(t)return t}return null};return r(e)},copySelectedNode(){let e=this.selectedNodeId;if(!e||e===`_root`||!this.currentSchema||!this.preview)return;let t=this.findPreviewNodeById(this.preview.view,e);if(!t)return;let n=this.findSchemaNodeByComponentId(this.currentSchema.view,t.componentId);n&&(Bc(n.node,this.selectedId),Q(`已复制节点(含子节点)`,`ok`))},pasteNode(){let e=Rc();if(!e||!this.currentSchema)return;let t=Vc(e),n=[...new Set(t.filter(e=>!mc[e]))];if(n.length){Q(`粘贴失败:含未知组件类型 `+n.join(`、`),`err`);return}let r=JSON.parse(JSON.stringify(e,(e,t)=>e===`_schemaNode`?void 0:t));Hc(r);let i=this.selectedNodeId&&this.selectedNodeId!==`_root`?this.findPreviewNodeById(this.preview.view,this.selectedNodeId):null,a=`root`;i&&(a=Dc(i.className)?`into`:`after`),this.insertClone(r,i,a);let o=zc();o&&o!==this.selectedId?Q(`已从卡片「${o}」跨卡片粘贴到「${this.selectedId}」`,`ok`):Q(`已粘贴节点(含子节点)`,`ok`)},duplicateNode(){let e=this.selectedNodeId;if(!e||e===`_root`||!this.currentSchema||!this.preview)return;let t=this.findPreviewNodeById(this.preview.view,e);if(!t)return;let n=this.findSchemaNodeByComponentId(this.currentSchema.view,t.componentId);if(!n)return;let r=JSON.parse(JSON.stringify(n.node,(e,t)=>e===`_schemaNode`?void 0:t));Hc(r),n.parentArr.splice(n.index+1,0,r),this.afterStructuralEdit(r.componentId)},insertClone(e,t,n){let r=this.currentSchema;if(n===`root`)r.view.components||(r.view.components=[]),r.view.components.push(e);else if(n===`into`){let n=t&&t._schemaNode;if(!n){r.view.components||(r.view.components=[]),r.view.components.push(e),this.afterStructuralEdit(e.componentId);return}let i=Oc(t.className),a=(n.slots||[]).find(e=>e.slotKey===i);a||(n.slots||=[],a={slotKey:i,slotScope:!1,slotSwitch:`1`,components:[]},n.slots.push(a)),a.components||(a.components=[]),a.components.push(e)}else{let n=this.findSchemaNodeByComponentId(r.view,t.componentId);n?n.parentArr.splice(n.index+1,0,e):(r.view.components||(r.view.components=[]),r.view.components.push(e))}this.afterStructuralEdit(e.componentId)},afterStructuralEdit(e){let t=this.currentSchema;this.reloadToken+=1,this.preview=Ac(t),typeof window<`u`&&(window.__cardModel=Ic(t)),this.syncDataToSchema(),this.selectedNodeId=e&&this.findViewIdByComponentId(this.preview.view,e)||``,this.scheduleCommit()},deleteSelectedNode(){let e=this.selectedNodeId;if(!e||e===`_root`||!this.currentSchema||!this.preview)return;let t=this.findPreviewNodeById(this.preview.view,e);if(!t)return;let n=this.findSchemaNodeByComponentId(this.currentSchema.view,t.componentId);n&&(n.parentArr.splice(n.index,1),this.reloadToken+=1,this.preview=Ac(this.currentSchema),typeof window<`u`&&(window.__cardModel=Ic(this.currentSchema)),this.syncDataToSchema(),this.selectedNodeId=``,Q_(),this.scheduleCommit())},isEditableTarget(e){let t=e.target;if(!t)return!1;let n=t.tagName;return!!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t.isContentEditable)},onKeydown(e){if(this.chromeOff||!this.preview)return;let t=this.isEditableTarget(e),n=e.ctrlKey||e.metaKey,r=e.key;if(n&&(r===`c`||r===`C`)){if(t)return;this.copySelectedNode(),e.preventDefault();return}if(n&&(r===`v`||r===`V`)){if(t)return;this.pasteNode(),e.preventDefault();return}if(n&&(r===`d`||r===`D`)){if(t)return;this.duplicateNode(),e.preventDefault();return}if(n&&(r===`z`||r===`Z`)){if(t)return;e.preventDefault(),e.shiftKey?this.redo():this.undo();return}if(n&&(r===`y`||r===`Y`)){if(t)return;e.preventDefault(),this.redo();return}if(r===`Delete`||r===`Backspace`){if(t||!this.selectedNodeId||this.selectedNodeId===`_root`)return;e.preventDefault(),this.deleteSelectedNode();return}if(r===`Escape`){this.selectedNodeId&&(this.selectedNodeId=``,e.preventDefault());return}},onHoverNode(e){if(!e){Q_();return}if(e.leave){Q_(e.id);return}let t=typeof document<`u`?document.querySelector(`.phone__screen`):null;if(!t){Q_(e.id);return}let n=e=>window.CSS&&CSS.escape?CSS.escape(String(e)):String(e).replace(/["\\\]]/g,`\\$&`),r=null;e.componentId!=null&&(r=t.querySelector(`[data-cid="`+n(e.componentId)+`"]`)),!r&&e.id!=null&&(r=t.querySelector(`[data-cid="`+n(e.id)+`"]`)),r?Z_(r,e.id):Q_(e.id)},onCanvasClick(e){if(!e.ctrlKey&&!e.metaKey||this.chromeOff)return;let t=e.target&&e.target.closest?e.target.closest(`[data-cid]`):null;if(!t)return;let n=t.getAttribute(`data-cid`);if(!n)return;let r=this.findPreviewNodeByCid(n);r&&(this.activeTab=`structure`,this.selectedNodeId=r.id)},findPreviewNodeByCid(e){let t=this.preview&&this.preview.view;if(!t)return null;let n=String(e),r=e=>{if(!e)return null;if(String(e.componentId==null?e.id:e.componentId)===n)return e;let t=[];if(e.components&&t.push(...e.components),e.slots)for(let n of e.slots)n.components&&t.push(...n.components);for(let e of t){let t=r(e);if(t)return t}return null};return r(t)},onAddNode(e){this.currentSchema&&(this.addNodeTarget=e||null,this.addNodePanelOpen=!0)},cancelAddNode(){this.addNodePanelOpen=!1,this.addNodeTarget=null},findSchemaLocation(e,t){let n=e=>{for(let r=0;r<e.length;r++){let i=e[r];if(i===t)return{containerArr:e,index:r};let a=i.slots||[];for(let e of a){let t=n(e.components||[]);if(t)return t}}return null};return n(e&&e.components||[])},findViewIdByComponentId(e,t){if(!e)return null;if(e.componentId===t)return e.id;let n=[];if(e.components&&n.push(...e.components),e.slots)for(let t of e.slots)t.components&&n.push(...t.components);for(let e of n){let n=this.findViewIdByComponentId(e,t);if(n)return n}return null},findSchemaNodeByComponentId(e,t){let n=(e,r)=>{for(let i=0;i<e.length;i++){let a=e[i];if(a.componentId===t)return{node:a,parentArr:e,index:i,owner:r};let o=a.slots||[];for(let e of o){let t=n(e.components||[],a);if(t)return t}}return null};return n(e&&e.components||[],`root`)},isDescendantCompId(e,t){if(!t||!t.componentId)return!1;if(t.componentId===e)return!0;let n=[];if(t.components&&n.push(...t.components),t.slots)for(let e of t.slots)e.components&&n.push(...e.components);for(let t of n)if(this.isDescendantCompId(e,t))return!0;return!1},moveNode(e,t,n){let r=this.currentSchema;if(!r||!r.view||e===t)return!1;let i=this.findSchemaNodeByComponentId(r.view,e);if(!i)return!1;let a=i.node;if(this.isDescendantCompId(t,a))return!1;let o,s;if(t===`__root__`)r.view.components||(r.view.components=[]),o=r.view.components,s=o.length;else{let e=this.findSchemaNodeByComponentId(r.view,t);if(!e)return!1;let i=e.node;if(n===`inside`){if(!Dc(i.className))return!1;let e=Oc(i.className),t=(i.slots||[]).find(t=>t.slotKey===e);t||(i.slots||=[],t={slotKey:e,slotScope:!1,slotSwitch:`1`,components:[]},i.slots.push(t)),t.components||(t.components=[]),o=t.components,s=o.length}else o=e.parentArr,s=n===`before`?e.index:e.index+1}let c=o===i.parentArr&&i.index<s;return i.parentArr.splice(i.index,1),c&&--s,o.splice(s,0,a),a},onMoveNode({sourceCompId:e,targetCompId:t,position:n}){if(!this.currentSchema||!this.moveNode(e,t,n))return;this.reloadToken+=1,this.preview=Ac(this.currentSchema),typeof window<`u`&&(window.__cardModel=Ic(this.currentSchema)),this.syncDataToSchema();let r=this.findViewIdByComponentId(this.preview.view,e);this.selectedNodeId=r||``,r&&(this.moveCollapseToken+=1)},onPickComponent(e){let t=this.addNodeTarget||{},n=t.node||null,r=t.mode||`auto`,i=this.currentSchema;if(!i){this.cancelAddNode();return}let a;try{a=kc(e)}catch(e){console.error(`[创建组件节点失败]`,e),this.rt.pushError(`addNode`,String(e&&e.message)),this.cancelAddNode();return}let o=!n||n.className===`Root`;if((r===`before`||r===`after`)&&!o){let e=n._schemaNode,t=e?this.findSchemaLocation(i.view,e):null;if(!t)i.view.components||(i.view.components=[]),i.view.components.push(a);else{let e=r===`before`?t.index:t.index+1;t.containerArr.splice(e,0,a)}}else if(o)i.view.components||(i.view.components=[]),i.view.components.push(a);else{let e=n._schemaNode;if(!e){this.cancelAddNode();return}if(Dc(n.className)){let t=Oc(n.className),r=(e.slots||[]).find(e=>e.slotKey===t);r||(e.slots||=[],r={slotKey:t,slotScope:!1,slotSwitch:`1`,components:[]},e.slots.push(r)),r.components||(r.components=[]),r.components.push(a)}else{let t=this.findSchemaLocation(i.view,e);t?t.containerArr.splice(t.index+1,0,a):(i.view.components||(i.view.components=[]),i.view.components.push(a))}}this.cancelAddNode(),this.reloadToken+=1,this.preview=Ac(i),typeof window<`u`&&(window.__cardModel=Ic(i)),this.syncDataToSchema();let s=this.findViewIdByComponentId(this.preview.view,a.componentId);this.selectedNodeId=s||``,this.scheduleCommit()},async copySchema(){if(!this.currentSchema)return;this.syncDataToSchema();let e=``;try{let t={...this.currentSchema};this.rt&&this.rt.rootScope&&(t.data=this.rt.rootScope),e=JSON.stringify(t,(e,t)=>{if(e!==`_schemaNode`)return t},2)}catch{e=`(无法序列化)`}await this.doCopy(e)&&(this.copiedSchema=!0,this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copiedSchema=!1},1500))},async doCopy(e){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}},async runSync(e){if(!this.syncingRemote&&!(e&&!this.selectedId)){this.syncingRemote=!0,this.syncedRemote=!1,this.syncTarget=e?`selected`:`full`;try{let t=await J(`/__sync`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?{cardCode:e}:{})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.message||e.error||`HTTP `+t.status)}let n=await t.json();if(n.needCredentials){this.openLoginModal();return}if(!n.success){let e=(n.failed||[]).map(e=>`${e.id}: ${e.error}`).join(`; `);throw Error(e||`同步失败`)}this.syncedRemote=!0,this.syncTimer&&clearTimeout(this.syncTimer),this.syncTimer=setTimeout(()=>{this.syncedRemote=!1,this.syncTarget=null},1800),await this.onRefresh(),Q(this.syncTarget===`selected`?`已同步当前卡片到本地`:`全量同步完成`,`ok`)}catch(e){console.error(`[同步远程数据失败]`,e),Q(`同步失败:`+(e&&e.message),`err`)}finally{this.syncingRemote=!1}}},syncRemote(){return this.runSync()},syncSelected(){return this.runSync(this.selectedId)},openLoginModal(){this.loginModal=!0,this.loginName=``,this.loginPassword=``,this.loginError=``},closeLoginModal(){this.loginSubmitting||(this.loginModal=!1,this.loginPassword=``,this.loginError=``)},async submitLogin(){if(this.loginSubmitting)return;let e=this.loginName.trim(),t=this.loginPassword;if(!e||!t){this.loginError=`账号与密码均不能为空`;return}this.loginSubmitting=!0,this.loginError=``;try{let n=await J(`/__login-credentials`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({loginName:e,loginPassword:t})}),r=await n.json().catch(()=>({}));if(!n.ok||!r.ok)throw Error(r.message||r.error||`HTTP `+n.status);this.loginModal=!1,this.loginPassword=``,Q(`凭据已保存,正在重试同步…`,`ok`),await this.runSync(this.syncTarget===`selected`?this.selectedId:void 0)}catch(e){this.loginError=`保存失败:`+(e&&e.message)}finally{this.loginSubmitting=!1}},chooseSync(e){if(e===`full`){if(this.syncingRemote)return;this.requestConfirm({title:`全量同步`,message:`即将从远端 FinMall 拉取完整卡片列表,并逐张覆盖本地同名卡片。本地独有卡片会保留,但被覆盖卡片的未保存改动将丢失,且无法撤销。是否继续?`,confirmText:`继续同步`,severity:`warn`,onConfirm:()=>this.syncRemote()});return}!this.preview||!this.selectedId||this.syncingRemote||this.requestConfirm({title:`当前同步`,message:`即将从远端 FinMall 拉取当前卡片「${this.selectedId}」的最新版本并覆盖本地。本地未保存的改动将丢失,且无法撤销。是否继续?`,confirmText:`继续同步`,onConfirm:()=>this.syncSelected()})},chooseRsave(e){if(e===`save`){if(!this.preview||!this.selectedId||this.savingRemote||!this.hasCardSource)return;this.requestConfirm({title:`版本推送`,message:`即将把本地卡片「${this.selectedId}」的当前版本推送并覆盖到远端 FinMall。线上版本会被立即更新,且该操作不可撤销。是否继续?`,confirmText:`继续推送`,severity:`warn`,onConfirm:()=>this.saveToRemote()});return}if(e===`slices`){if(!this.preview||!this.selectedId||this.uploadingSlices)return;this.requestConfirm({title:`切图上传`,message:`即将把当前卡片「${this.selectedId}」引用的本地切图(src/slices/)上传到 FinMall 图片库,并把卡片里的 /slices/ 引用替换为线上地址(@filestore/…)。本地切图文件保留不动;内容未变的切图会直接复用已有线上地址,不重复上传。`+(this.historyDirty?`
|
|
77
|
+
当前卡片有未保存的改动,会先保存到本地再执行,避免被随后的重载丢弃。`:``)+`
|
|
78
|
+
是否继续?`,confirmText:`继续上传`,onConfirm:()=>this.uploadCardSlices()});return}!this.preview||!this.selectedId||!this.hasCardSource||(this.remotePreviewOpen=!0)},requestConfirm({title:e,message:t,confirmText:n,cancelText:r,severity:i,onConfirm:a}){this.confirm={show:!0,title:e,message:t,confirmText:n||`继续`,cancelText:r||`取消`,severity:[`primary`,`warn`,`danger`].includes(i)?i:`primary`,onConfirm:a}},onConfirmDialog(){let e=this.confirm.onConfirm;this.confirm.show=!1,this.confirm.onConfirm=null,typeof e==`function`&&e()},onCancelDialog(){this.confirm.show=!1,this.confirm.onConfirm=null},async saveCard(){if(!this.preview||!this.selectedId)return;this.savingCard=!0;let e=this.selectedId;this.selfSaveId=e,this.selfSaveAt=Date.now();try{try{let e=await this.fetchDiskCard(this.selectedId);if(e&&e.schema){let t=e.schema,n=this.currentSchema;n&&(t.pageId&&(n.pageId=t.pageId),t.name&&(n.name=t.name),t.desc!==void 0&&(n.desc=t.desc))}}catch{}this.syncDataToSchema();let e={schema:this.currentSchema},t=JSON.stringify(e,(e,t)=>e===`_schemaNode`?void 0:t,2),n=await J(`/__card/${encodeURIComponent(this.selectedId)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:t});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.message||`HTTP `+n.status)}return this.currentCard={schema:e.schema},this.localSchema=this.cloneSchema(this.currentSchema),this.localData=this.cloneData(Ry(this.currentSchema)),this.savedCard=!0,this.refreshValidateBadge(),this.saveTimer&&clearTimeout(this.saveTimer),this.saveTimer=setTimeout(()=>{this.savedCard=!1},1800),!0}catch(e){return console.error(`[本地保存失败]`,e),this.rt.pushError(`saveCard`,String(e&&e.message)),this.selfSaveId=``,this.selfSaveAt=0,!1}finally{this.savingCard=!1}},async fetchDiskCard(e){let t=await J(`/__card/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`HTTP `+t.status);return t.json()},async fetchImportMeta(e){if(!e){this.cardImportMeta=null;return}try{let t=await J(`/__import-meta/${encodeURIComponent(e)}`);if(!t.ok){this.cardImportMeta=null;return}let n=await t.json().catch(()=>({}));this.cardImportMeta=n&&n.meta||null}catch{this.cardImportMeta=null}},async saveToRemote(){if(!(!this.preview||!this.selectedId||this.savingRemote)){this.savingRemote=!0,this.savedRemote=!1,this.verifiedRemote=null;try{try{let e=await this.fetchDiskCard(this.selectedId);e&&e.schema&&e.schema.pageId&&this.currentSchema&&(this.currentSchema.pageId=e.schema.pageId)}catch{}this.syncDataToSchema(),this.selfSaveId=this.selectedId,this.selfSaveAt=Date.now();let e=await J(`/__save`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:this.selectedId,schema:this.currentSchema},(e,t)=>e===`_schemaNode`?void 0:t,2)});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.message||t.error||`HTTP `+e.status)}let t=await e.json();if(!t.ok)throw Error(t.error||`远端保存失败`);if(this.verifiedRemote=t.verified?!!t.verified.ok:null,this.savedRemote=!0,this.verifiedRemote===!1){let e=t.verified||{};e.diff&&e.diff.length?``+e.diff.join(`;`):e.readBackError,console.warn(`[保存校验不符]`,e),Q(`已保存至远端,但读回校验未通过`,`err`)}else Q(`已保存至远端`,`ok`);this.saveRemoteTimer&&clearTimeout(this.saveRemoteTimer),this.saveRemoteTimer=setTimeout(()=>{this.savedRemote=!1,this.verifiedRemote=null},2500)}catch(e){console.error(`[保存至远端失败]`,e),Q(`保存至远端失败:`+(e&&e.message),`err`),this.selfSaveId=``,this.selfSaveAt=0}finally{this.savingRemote=!1}}},async uploadCardSlices(){if(!this.preview||!this.selectedId||this.uploadingSlices)return;let e=this.selectedId;this.uploadingSlices=!0;try{if(this.historyDirty&&!await this.saveCard())throw Error(`本地保存失败,已中止切图上传`);this.selfSaveId=e,this.selfSaveAt=Date.now();let t=await J(`/__slice-upload`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cardId:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.message||e.error||`HTTP `+t.status)}let n=await t.json();if(n.needCredentials){this.openLoginModal();return}if(this.selfSaveAt=Date.now(),!n.success){let e=(n.failed||[]).map(e=>`${e.name}: ${e.error}`).join(`; `);throw Error(e||`切图上传失败`)}await this.onRefresh();let r=(n.rewritten||[]).reduce((e,t)=>e+t.count,0);n.referenced?Q(`切图上传完成:新上传 ${n.uploaded.length} 张、复用 ${n.skipped.length} 张,替换引用 ${r} 处`,`ok`):Q(`当前卡片没有引用本地切图,无需上传`,`ok`),n.dangling&&n.dangling.length&&Q(`有 ${n.dangling.length} 处引用的切图在 src/slices 下不存在:${n.dangling.join(`、`)}`,`err`)}catch(e){console.error(`[切图上传失败]`,e),Q(`切图上传失败:`+(e&&e.message),`err`),this.selfSaveId=``,this.selfSaveAt=0}finally{this.uploadingSlices=!1}},async fetchCardList(){try{let e=await J(`/__cards`);if(!e.ok)return;let t=await e.json(),n=t&&t.cards||[];this.cardList=n,this.cardCount=n.length}catch(e){console.error(`[加载卡片列表失败]`,e)}},async onRefresh(){let e=this.selectedId;if(!(!e||this.refreshing)){this.refreshing=!0;try{await this.loadCard(e),await this.fetchCardList();let t=this.cardList.find(t=>t.id===e);t&&this.currentSchema&&this.currentSchema.name&&(t.name=this.currentSchema.name)}catch(e){console.error(`[刷新卡片失败]`,e),this.rt.pushError(`refresh`,String(e&&e.message))}finally{this.refreshing=!1}}},onCardsChanged(e){let t=e&&e.file||``;if(/\.history[\\/]/.test(t)||/data\.json$/i.test(t))return;let n=t.match(/src[\\/]cards[\\/]([^\\/]+)[\\/]/),r=n?n[1]:null;this._cardsChangedTimer||=setTimeout(()=>{if(this._cardsChangedTimer=null,this.fetchCardList(),r&&r===this.selectedId){if(this.selfSaveId===r&&Date.now()-this.selfSaveAt<Vy){this.selfSaveId=``,this.selfSaveAt=0;return}if(this.historyDirty)this.promptExternalReload(r);else{let e=this.currentSchema&&this.currentSchema.name||r;this.showExternalReloadNote(`卡片「${e}」已在编辑器外被修改,已自动重新载入预览`),this.loadCard(this.selectedId)}}},120)},promptExternalReload(e){if(this.confirm.show)return;let t=this.currentSchema&&this.currentSchema.name||e;this.requestConfirm({title:`卡片已在编辑器外被修改`,message:`卡片「${t}」的 schema / data 在编辑器外发生了变更(例如 IDE 或其他工具覆盖了文件)。\n当前编辑器存在未保存的改动,是否放弃本地未保存改动并重新载入磁盘版本?`,confirmText:`重新载入`,cancelText:`保留我的改动`,onConfirm:()=>this.loadCard(e)})},showExternalReloadNote(e){this.externalReloadNote=e,this.externalReloadTimer&&clearTimeout(this.externalReloadTimer),this.externalReloadTimer=setTimeout(()=>{this.externalReloadNote=``,this.externalReloadTimer=null},3500)}}},Gy={class:`app__bar`},Ky={class:`app__logo`},qy=[`src`],Jy={class:`app__logo-version`},Yy={class:`csel-combo`},Xy=[`disabled`],Zy=[`disabled`],Qy=[`title`],$y={class:`app__badge-text`},eb={class:`app__bar-actions`},tb={class:`app__op-group`,role:`group`,"aria-label":`编辑历史与本地操作`},nb=[`disabled`],rb=[`disabled`],ib=[`disabled`,`title`],ab=[`disabled`],ob=[`disabled`],sb={key:0,class:`app__icon app__icon--spin`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},cb={key:1,class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},lb={key:2,class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},ub={key:3,class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},db={class:`app__remote-pop dd__menu`,role:`menu`},fb=[`title`,`onClick`],pb=[`title`,`onClick`],mb=[`onClick`],hb=[`onClick`],gb=[`title`,`onClick`],_b=[`title`,`aria-pressed`],vb=[`aria-checked`,`title`],yb={class:`theme-toggle__track`},bb={class:`theme-toggle__thumb`},xb={key:0,class:`theme-toggle__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Sb={key:1,class:`theme-toggle__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Cb={class:`app__dev-svc`},wb=[`title`],Tb={class:`app__dev-svc-row`},Eb={class:`app__dev-svc-row app__dev-svc-row--col`},Db={class:`app__dev-svc-row app__dev-svc-row--col`},Ob={class:`app__dev-svc-actions`},kb={key:0,class:`app__dev-svc-hint`},Ab={style:{display:`none`}},jb={key:0,class:`app__nosvc-banner`},Mb={key:1,class:`app__nosvc-banner app__nosvc-banner--disconnected`},Nb={key:2,class:`app__nosvc-banner app__extreload-banner`},Pb={class:`app__stage`,ref:`stageEl`},Fb={class:`phone__scaler`},Ib=[`title`],Lb={class:`canvas-bar__txt`},Rb={class:`canvas-bar__chip`,title:`画布宽度预设(高度随列高自适应)`},zb={class:`canvas-bar__txt`},Bb={class:`canvas-bar__size`,title:`画布实际尺寸(宽 × 高,高度随窗口自适应)`},Vb=[`disabled`],Hb=[`data-card-ready`],Ub={class:`workside`},Wb={class:`workside__cols`},Gb={class:`login-modal modal-card`,role:`dialog`,"aria-modal":`true`},Kb={class:`login-modal__row`},qb=[`disabled`],Jb={class:`login-modal__row`},Yb=[`disabled`],Xb={key:0,class:`login-modal__error`},Zb={class:`login-modal__actions`},Qb=[`disabled`],$b=[`disabled`];function ex(e,t,n,r,i,a){let o=I(`CardSelect`),s=I(`Dropdown`),c=I(`Switch`),l=I(`RenderTree`),u=I(`SelectionOverlay`),d=I(`HoverGuides`),f=I(`AlertCardLayer`),p=I(`DeviceOverlay`),m=I(`PickerOverlay`),h=I(`DatePickerOverlay`),g=I(`DebugPanel`),_=I(`ApiCallPanel`),v=I(`RemotePreview`),y=I(`ComponentPalette`),b=I(`ConfirmDialog`),x=I(`CardGallery`),S=I(`AppToast`);return z(),B(`div`,{class:k([`app`,{"app--chrome-off":i.chromeOff}]),style:O({"--preview-width":a.previewWidth+`px`,"--api-panel-width":a.apiPanelWidth+`px`})},[F(H(`header`,Gy,[H(`strong`,Ky,[H(`img`,{class:`app__logo-icon`,src:i.logoUrl,alt:``},null,8,qy),t[29]||=W(` CardBuddy `,-1),H(`span`,Jy,`v`+A(i.appVersion),1)]),H(`div`,Yy,[U(o,{class:`csel--combo`,value:i.selectedId,options:i.cardList,onChange:a.onSelect},null,8,[`value`,`options`,`onChange`]),H(`button`,{class:`csel-combo__btn`,type:`button`,disabled:!i.selectedId,onClick:t[0]||=(...e)=>a.openCardFolder&&a.openCardFolder(...e),title:`在文件管理器中打开当前卡片所在文件夹`},[...t[30]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z`}),H(`path`,{d:`M3 9h18`})],-1)]],8,Xy)]),H(`button`,{class:`app__btn app__btn--icon`,type:`button`,disabled:!i.cardList.length,onClick:t[1]||=(...e)=>a.openGallery&&a.openGallery(...e),title:`卡片网格预览`},[...t[31]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-grid`})],-1)]],8,Zy),F(H(`div`,{class:k([`app__badge`,`app__badge--`+i.validateBadge.state]),title:a.badgeTitle},[t[32]||=H(`span`,{class:`app__badge-dot`},null,-1),H(`span`,$y,A(a.badgeText),1)],10,Qy),[[Fo,!i.chromeOff]]),H(`div`,eb,[H(`div`,tb,[H(`button`,{class:`app__btn app__btn--hist`,type:`button`,disabled:!i.preview||!a.canUndo,onClick:t[2]||=(...e)=>a.undo&&a.undo(...e),title:`后退一步(撤销)`},[...t[33]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-undo`})],-1),H(`span`,null,`撤销`,-1)]],8,nb),H(`button`,{class:`app__btn app__btn--hist`,type:`button`,disabled:!i.preview||!a.canRedo,onClick:t[3]||=(...e)=>a.redo&&a.redo(...e),title:`前进一步(重做)`},[...t[34]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-redo`})],-1),H(`span`,null,`重做`,-1)]],8,rb),H(`button`,{class:k([`app__btn app__btn--history-save`,{"is-dirty":a.historyDirty}]),type:`button`,disabled:!i.preview||!a.historyDirty||i.savingCard||i.loadingCard,onClick:t[4]||=(...e)=>a.applyHistoryToLocal&&a.applyHistoryToLocal(...e),title:a.historyDirty?`当前版本与本地不一致,点击将该版本保存到本地`:`当前版本已与本地一致`},[...t[35]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-save`})],-1),H(`span`,null,`保存`,-1)]],10,ib),H(`button`,{class:`app__btn app__btn--op`,disabled:!i.preview,onClick:t[5]||=(...e)=>a.copySchema&&a.copySchema(...e),title:`复制 schema(含数据绑定编辑后的数据)`},[t[36]||=H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-copy`})],-1),H(`span`,null,A(i.copiedSchema?`已复制 ✓`:`复制`),1)],8,ab)]),U(s,{class:`app__remote-menu`,size:`md`,placement:`bottom-end`,disabled:i.savingRemote||i.syncingRemote||i.uploadingSlices,title:i.savingRemote?`正在保存至远端…`:i.syncingRemote?`同步中…`:i.uploadingSlices?`正在上传切图…`:`远端操作:保存到 FinMall / 真机预览 / 切图上传 / 全量或选中卡片同步`,"data-testid":`remote-group`},{trigger:P(({open:e})=>[H(`button`,{type:`button`,class:k([`app__btn app__btn--remote`,{"app__btn--warn":i.savedRemote&&i.verifiedRemote===!1,"app__remote-trigger--active":e,"is-processing":i.savingRemote||i.syncingRemote||i.uploadingSlices}]),disabled:i.savingRemote||i.syncingRemote||i.uploadingSlices},[i.savingRemote||i.syncingRemote||i.uploadingSlices?(z(),B(`svg`,sb,[...t[37]||=[H(`use`,{href:`#icon-loading`},null,-1)]])):i.savedRemote&&i.verifiedRemote!==!1?(z(),B(`svg`,cb,[...t[38]||=[H(`use`,{href:`#icon-cloud-check`},null,-1)]])):i.savedRemote&&i.verifiedRemote===!1?(z(),B(`svg`,lb,[...t[39]||=[H(`use`,{href:`#icon-cloud-alert`},null,-1)]])):(z(),B(`svg`,ub,[...t[40]||=[H(`use`,{href:`#icon-cloud`},null,-1)]])),t[42]||=H(`span`,null,`远端`,-1),(z(),B(`svg`,{class:k([`app__icon app__icon--chev`,{"app__icon--chev--open":e}]),viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`},[...t[41]||=[H(`use`,{href:`#icon-chevron`},null,-1)]],2))],10,ob)]),default:P(({close:e})=>[H(`ul`,db,[H(`li`,{class:k([`app__remote-item app__remote-item--save`,{"is-disabled":!i.preview||!i.selectedId||i.savingRemote||!a.hasCardSource}]),title:a.hasCardSource?`版本推送:把本地卡片版本覆盖到远端 FinMall`:`该卡未经「同步远程」导入,无远端来源信息,无法推送版本`,"data-testid":`save-remote`,role:`menuitem`,onClick:t=>{a.chooseRsave(`save`),e()}},[...t[43]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-upload-cloud`})],-1),H(`span`,null,`版本推送`,-1)]],10,fb),H(`li`,{class:k([`app__remote-item`,{"is-disabled":!i.preview||!i.selectedId||!a.hasCardSource}]),title:a.hasCardSource?`在线预览:生成真机预览二维码(FinMall App 扫码)`:`该卡未经「同步远程」导入,无远端来源信息,无法生成真机预览二维码`,"data-testid":`remote-preview`,role:`menuitem`,onClick:t=>{a.chooseRsave(`preview`),e()}},[...t[44]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-grid`})],-1),H(`span`,null,`在线预览`,-1)]],10,pb),H(`li`,{class:k([`app__remote-item app__remote-item--sync`,{"is-disabled":!i.preview||!i.selectedId||i.syncingRemote}]),"data-testid":`sync-selected`,role:`menuitem`,onClick:t=>{a.chooseSync(`selected`),e()}},[...t[45]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-sync-box`})],-1),H(`span`,null,`当前同步`,-1)]],10,mb),H(`li`,{class:k([`app__remote-item app__remote-item--sync`,{"is-disabled":i.syncingRemote}]),"data-testid":`sync-full`,role:`menuitem`,onClick:t=>{a.chooseSync(`full`),e()}},[...t[46]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-refresh`})],-1),H(`span`,null,`全量同步`,-1)]],10,hb),H(`li`,{class:k([`app__remote-item app__remote-item--upload`,{"is-disabled":!i.preview||!i.selectedId||i.uploadingSlices}]),title:i.uploadingSlices?`正在上传切图…`:`切图上传:把当前卡片引用的本地切图(src/slices)上传到 FinMall 图片库,并把卡片里的 /slices/ 引用替换为线上地址(@filestore/…);本地切图文件保留`,"data-testid":`slice-upload`,role:`menuitem`,onClick:t=>{a.chooseRsave(`slices`),e()}},[...t[47]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-image-upload`})],-1),H(`span`,null,`切图上传`,-1)]],10,gb)])]),_:1},8,[`disabled`,`title`]),H(`button`,{class:k([`app__btn app__btn--icon`,{"app__btn--active":i.apiPanelOpen}]),type:`button`,title:i.apiPanelOpen?`收起接口调用面板`:`打开接口调用面板`,"aria-pressed":i.apiPanelOpen,onClick:t[6]||=(...e)=>a.toggleApiPanel&&a.toggleApiPanel(...e)},[...t[48]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),H(`line`,{x1:`15`,y1:`4`,x2:`15`,y2:`20`})],-1)]],10,_b),H(`button`,{class:`theme-toggle`,type:`button`,role:`switch`,"aria-checked":i.theme===`light`,title:i.theme===`light`?`切换到深色主题`:`切换到浅色主题`,onClick:t[7]||=(...e)=>a.toggleTheme&&a.toggleTheme(...e)},[H(`span`,yb,[H(`span`,bb,[i.theme===`light`?(z(),B(`svg`,xb,[...t[49]||=[Da(`<circle cx="12" cy="12" r="4.2"></circle><line x1="12" y1="2.5" x2="12" y2="5"></line><line x1="12" y1="19" x2="12" y2="21.5"></line><line x1="2.5" y1="12" x2="5" y2="12"></line><line x1="19" y1="12" x2="21.5" y2="12"></line><line x1="4.9" y1="4.9" x2="6.8" y2="6.8"></line><line x1="17.2" y1="17.2" x2="19.1" y2="19.1"></line><line x1="4.9" y1="19.1" x2="6.8" y2="17.2"></line><line x1="17.2" y1="6.8" x2="19.1" y2="4.9"></line>`,9)]])):(z(),B(`svg`,Sb,[...t[50]||=[H(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`},null,-1)]]))])])],8,vb),H(`div`,Cb,[H(`button`,{class:k([`app__btn app__btn--icon`,a.devSvcClass]),type:`button`,title:a.devSvcTitle,onClick:t[8]||=e=>i.devServiceOpen=!i.devServiceOpen},[...t[51]||=[H(`svg`,{class:`app__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`use`,{href:`#icon-link`})],-1)]],10,wb),i.devServiceOpen?(z(),B(`div`,{key:0,class:`app__dev-svc-panel`,onClick:t[14]||=q(()=>{},[`stop`])},[t[55]||=H(`div`,{class:`app__dev-svc-title`},`本地开发服务`,-1),H(`label`,Tb,[t[52]||=H(`span`,null,`启用`,-1),U(c,{modelValue:i.devServiceForm.enabled,"onUpdate:modelValue":t[9]||=e=>i.devServiceForm.enabled=e},null,8,[`modelValue`])]),H(`label`,Eb,[t[53]||=H(`span`,null,`服务地址`,-1),F(H(`input`,{type:`text`,"onUpdate:modelValue":t[10]||=e=>i.devServiceForm.baseUrl=e,placeholder:`http://127.0.0.1:8787`},null,512),[[hs,i.devServiceForm.baseUrl]])]),H(`label`,Db,[t[54]||=H(`span`,null,`访问令牌(可选)`,-1),F(H(`input`,{type:`text`,"onUpdate:modelValue":t[11]||=e=>i.devServiceForm.token=e,placeholder:`留空则不校验`},null,512),[[hs,i.devServiceForm.token]])]),H(`div`,Ob,[H(`button`,{class:`ni-btn ni-btn--ghost`,type:`button`,onClick:t[12]||=e=>i.devServiceOpen=!1},`关闭`),H(`button`,{class:`ni-btn`,type:`button`,onClick:t[13]||=(...e)=>a.saveDevService&&a.saveDevService(...e)},`保存`)]),i.apiBaseResolved===null?(z(),B(`p`,kb,[a.devSvcBlockReason===`disabled`?(z(),B(R,{key:0},[W(`已填写服务地址,但「启用」开关未打开。请开启「启用」开关并点击保存,本地开发服务才会生效。`)],64)):(z(),B(R,{key:1},[W(`请填写本机 cardbuddy 服务地址(默认 http://127.0.0.1:8787),打开「启用」开关并保存后,编辑功能才会生效。`)],64))])):G(``,!0)])):G(``,!0)])]),H(`span`,Ab,A(i.rt.revision),1)],512),[[Fo,!i.chromeOff]]),i.apiBaseResolved===null&&!i.chromeOff?(z(),B(`div`,jb,[a.devSvcBlockReason===`disabled`?(z(),B(R,{key:0},[W(` ⚠ 本地开发服务未生效:已填写地址,但未打开「启用」开关。请点击右上角 「连接」图标打开「本地开发服务」设置,开启「启用」开关并保存后,编辑功能才会生效。 `)],64)):(z(),B(R,{key:1},[W(` ⚠ 未配置本地开发服务:当前为部署态,编辑功能不可用。请点击右上角 「连接」图标打开「本地开发服务」设置,填写本机 cardbuddy 地址、打开「启用」开关并保存后,才能编辑卡片。 `)],64))])):G(``,!0),i.apiBaseResolved!==null&&i.devSvcDown&&!i.chromeOff?(z(),B(`div`,Mb,` ⚠ 本地开发服务已断开:连接失败或服务已停止,编辑 / 同步功能暂不可用。请确认本地 cardbuddy 是否运行,或点击右上角「连接」图标重新保存配置。 `)):G(``,!0),i.externalReloadNote&&!i.chromeOff?(z(),B(`div`,Nb,` ↻ `+A(i.externalReloadNote),1)):G(``,!0),H(`main`,Pb,[H(`div`,{class:k([`phone`,{"phone--dragging":i.dragging}]),style:O({width:a.previewWidth+`px`})},[H(`div`,{class:`phone__frame`,style:O(a.frameStyle)},[H(`div`,Fb,[F(H(`div`,{class:k([`canvas-bar`,{"canvas-bar--tight":a.previewWidth<300}])},[U(s,{borderless:``,size:`xs`,placement:`bottom-start`,value:i.canvasBg,options:i.bgOptions.map(e=>({key:e.key,value:e.label+`背景`})),onChange:a.chooseBg},{trigger:P(()=>[H(`span`,{class:`canvas-bar__chip`,title:`画布背景:`+a.currentBg.label},[H(`i`,{class:k([`canvas-bar__swatch`,`canvas-bar__swatch--`+i.canvasBg])},null,2),H(`span`,Lb,A(a.currentBg.label)+`背景`,1),t[56]||=H(`svg`,{class:`canvas-bar__chev`,viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`use`,{href:`#icon-chevron`})],-1)],8,Ib)]),_:1},8,[`value`,`options`,`onChange`]),U(s,{borderless:``,size:`xs`,placement:`bottom-start`,value:a.canvasW,options:i.presetSizes,onChange:a.setPresetWidth},{trigger:P(()=>[H(`span`,Rb,[t[57]||=H(`svg`,{class:`canvas-bar__icn`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`polyline`,{points:`8 7 4 12 8 17`}),H(`polyline`,{points:`16 7 20 12 16 17`}),H(`line`,{x1:`4`,y1:`12`,x2:`20`,y2:`12`})],-1),H(`span`,zb,A(a.canvasW)+` px`,1),t[58]||=H(`svg`,{class:`canvas-bar__chev`,viewBox:`0 0 16 16`,"aria-hidden":`true`},[H(`use`,{href:`#icon-chevron`})],-1)])]),_:1},8,[`value`,`options`,`onChange`]),t[60]||=H(`span`,{class:`canvas-bar__spacer`},null,-1),H(`span`,Bb,A(a.canvasW)+` × `+A(i.viewportHeight),1),H(`button`,{class:k([`canvas-bar__iconbtn`,{"is-loading":i.refreshing}]),type:`button`,disabled:!i.selectedId||i.refreshing,title:`刷新卡片,重新加载`,onClick:t[15]||=(...e)=>a.refreshCard&&a.refreshCard(...e)},[...t[59]||=[H(`svg`,{class:`canvas-bar__icn`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[H(`path`,{d:`M21 12a9 9 0 1 1-2.64-6.36`}),H(`path`,{d:`M21 3v6h-6`})],-1)]],10,Vb)],2),[[Fo,!i.chromeOff]]),H(`div`,{ref:`phoneViewport`,class:`phone-viewport`,onClick:t[16]||=(...e)=>a.onCanvasClick&&a.onCanvasClick(...e)},[H(`div`,{class:k([`phone__screen`,`phone__screen--bg-`+(i.chromeOff?`white`:i.canvasBg)]),style:O(i.chromeOff&&i.preview?{width:(i.preview.view.width||375)+`px`}:null),"data-card-ready":i.cardReady?`1`:null},[i.preview?(z(),V(l,{key:i.selectedId+`:`+i.reloadToken,node:i.preview.view,scope:i.rt.state,"selected-node-id":i.selectedNodeId},null,8,[`node`,`scope`,`selected-node-id`])):G(``,!0),U(u),U(d)],14,Hb),U(f,{"main-rt":i.rt},null,8,[`main-rt`]),U(p),U(m),U(h)],512)])],4)],6),F(H(`div`,{class:k([`splitter`,{"is-dragging":i.dragging}]),onMousedown:t[17]||=q((...e)=>a.startDrag&&a.startDrag(...e),[`prevent`]),title:`拖拽调整预览区域宽度`},null,34),[[Fo,!i.chromeOff]]),F(H(`div`,Ub,[t[61]||=H(`div`,{id:`app-workside-bar`,class:`workside__bar`},null,-1),t[62]||=H(`div`,{id:`app-workside-panels`,class:`workside__panels`},null,-1),H(`div`,Wb,[F(H(`div`,{class:k([`splitter splitter--api`,{"is-dragging":i.apiDragging}]),onMousedown:t[18]||=q((...e)=>a.startApiDrag&&a.startApiDrag(...e),[`prevent`]),title:`拖拽调整接口调用面板宽度`},null,34),[[Fo,!i.chromeOff&&i.apiPanelOpen]]),U(g,{"chrome-off":i.chromeOff,rt:i.rt,preview:i.preview,schema:i.currentSchema,"card-id":i.selectedId,"reload-token":i.reloadToken,"card-count":i.cardCount,"selected-node-id":i.selectedNodeId,"move-collapse-token":i.moveCollapseToken,"active-tab":i.activeTab,onSchemaChanged:a.onSchemaChanged,onSchemaCommit:a.onSchemaCommit,onSelectNode:a.onSelectNode,"onUpdate:activeTab":t[19]||=e=>i.activeTab=e,onAddNode:a.onAddNode,onMoveNode:a.onMoveNode,onHoverNode:a.onHoverNode,onCopySelected:a.copySelectedNode,onPaste:a.pasteNode,onDuplicate:a.duplicateNode,onDeleteSelected:a.deleteSelectedNode,onResetImport:a.onRefresh,"dev-svc-class":a.devSvcClass,"dev-svc-title":a.devSvcTitle,"dev-svc-label":a.devSvcLabel,"dev-svc-conn":a.devSvcConn},null,8,[`chrome-off`,`rt`,`preview`,`schema`,`card-id`,`reload-token`,`card-count`,`selected-node-id`,`move-collapse-token`,`active-tab`,`onSchemaChanged`,`onSchemaCommit`,`onSelectNode`,`onAddNode`,`onMoveNode`,`onHoverNode`,`onCopySelected`,`onPaste`,`onDuplicate`,`onDeleteSelected`,`onResetImport`,`dev-svc-class`,`dev-svc-title`,`dev-svc-label`,`dev-svc-conn`]),i.apiPanelOpen?(z(),V(_,{key:0,rt:i.rt,onClose:t[20]||=e=>i.apiPanelOpen=!1},null,8,[`rt`])):G(``,!0)])],512),[[Fo,!i.chromeOff]])],512),U(v,{visible:i.remotePreviewOpen,"page-id":i.currentSchema?i.currentSchema.pageId:``,schema:i.currentSchema,onClose:t[21]||=e=>i.remotePreviewOpen=!1},null,8,[`visible`,`page-id`,`schema`]),U(_o,{name:`modal`},{default:P(()=>[i.loginModal?(z(),B(`div`,{key:0,class:`login-mask`,onClick:t[28]||=q((...e)=>a.closeLoginModal&&a.closeLoginModal(...e),[`self`])},[H(`div`,Gb,[t[65]||=H(`div`,{class:`login-modal__title`},`FinMall 登录凭据`,-1),t[66]||=H(`div`,{class:`login-modal__desc`},` 本地登录凭据缺失,请填写账号与密码。密码仅做 MD5 后保存,不落明文。 `,-1),H(`label`,Kb,[t[63]||=H(`span`,{class:`login-modal__label`},`账号`,-1),F(H(`input`,{class:`login-modal__input`,type:`text`,"onUpdate:modelValue":t[22]||=e=>i.loginName=e,placeholder:`FinMall 登录账号`,disabled:i.loginSubmitting,onKeyup:t[23]||=ys((...e)=>a.submitLogin&&a.submitLogin(...e),[`enter`])},null,40,qb),[[hs,i.loginName]])]),H(`label`,Jb,[t[64]||=H(`span`,{class:`login-modal__label`},`密码`,-1),F(H(`input`,{class:`login-modal__input`,type:`password`,"onUpdate:modelValue":t[24]||=e=>i.loginPassword=e,placeholder:`FinMall 登录密码`,disabled:i.loginSubmitting,onKeyup:t[25]||=ys((...e)=>a.submitLogin&&a.submitLogin(...e),[`enter`])},null,40,Yb),[[hs,i.loginPassword]])]),i.loginError?(z(),B(`div`,Xb,A(i.loginError),1)):G(``,!0),H(`div`,Zb,[H(`button`,{class:`login-modal__btn login-modal__btn--ghost`,type:`button`,disabled:i.loginSubmitting,onClick:t[26]||=(...e)=>a.closeLoginModal&&a.closeLoginModal(...e)},` 取消 `,8,Qb),H(`button`,{class:`login-modal__btn login-modal__btn--primary`,type:`button`,disabled:i.loginSubmitting,onClick:t[27]||=(...e)=>a.submitLogin&&a.submitLogin(...e)},A(i.loginSubmitting?`保存中…`:`保存并同步`),9,$b)])])])):G(``,!0)]),_:1}),U(_o,{name:`modal`},{default:P(()=>[i.addNodePanelOpen?(z(),V(y,{key:0,onPick:a.onPickComponent,onClose:a.cancelAddNode},null,8,[`onPick`,`onClose`])):G(``,!0)]),_:1}),U(b,{visible:i.confirm.show,title:i.confirm.title,message:i.confirm.message,"confirm-text":i.confirm.confirmText,"cancel-text":i.confirm.cancelText,severity:i.confirm.severity,onConfirm:a.onConfirmDialog,onCancel:a.onCancelDialog},null,8,[`visible`,`title`,`message`,`confirm-text`,`cancel-text`,`severity`,`onConfirm`,`onCancel`]),U(x,{visible:i.galleryOpen,cards:i.cardList,"selected-id":i.selectedId,onSelect:a.onSelect,onClose:a.closeGallery},null,8,[`visible`,`cards`,`selected-id`,`onSelect`,`onClose`]),U(S)],6)}var tx=Z(Wy,[[`render`,ex]]),nx={value:{default:``},options:{type:Object,default:()=>({})},watches:{type:Object,default:()=>({})},itemInfo:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},rx=[`input`,`change`],ix={name:`SetText`,props:{...nx,multiline:{type:Boolean,default:!1}},emits:rx,computed:{text(){return this.value===void 0||this.value===null?``:String(this.value)},rows(){let e=this.options.autosize;return e&&typeof e==`object`&&e.minRows?e.minRows:4}},methods:{onInput(e){this.$emit(`input`,e)}}},ax=[`rows`,`placeholder`,`disabled`,`value`],ox=[`placeholder`,`disabled`,`value`];function sx(e,t,n,r,i,a){return n.multiline?(z(),B(`textarea`,{key:0,class:`st-textarea`,rows:a.rows,placeholder:e.options.placeholder||``,disabled:e.disabled,value:a.text,onInput:t[0]||=e=>a.onInput(e.target.value),onChange:t[1]||=t=>e.$emit(`change`)},null,40,ax)):(z(),B(`input`,{key:1,class:`ni-input`,type:`text`,placeholder:e.options.placeholder||``,disabled:e.disabled,value:a.text,onInput:t[2]||=e=>a.onInput(e.target.value),onChange:t[3]||=t=>e.$emit(`change`)},null,40,ox))}var cx=Z(ix,[[`render`,sx]]),lx={integer:/^-?(0|[1-9][0-9]*)?$/,"+integer":/^(0|[1-9][0-9]*)?$/,"-integer":/^(0|-[1-9]?[0-9]*)?$/,float:/^-?([0-9]*|(0|[1-9][0-9]*)\.[0-9]*)?$/,"+float":/^([0-9]*|(0|[1-9][0-9]*)\.[0-9]*)?$/,"-float":/^(0|-[0-9]*|-(0|[1-9][0-9]*)\.[0-9]*)?$/},ux={name:`SetNumber`,props:nx,emits:rx,data(){return{inputValue:``,sugOpen:!1}},computed:{suggestions(){return this.options.iParamList||[]},pattern(){return lx[this.options.type]||lx.integer}},watch:{value:{immediate:!0,handler(e){this.inputValue=e==null?``:String(e)}}},methods:{onInput(e){if(!this.pattern.test(e)){this.$refs.field.value=this.inputValue;return}this.inputValue=e,this.$emit(`input`,e)},step(e){let t=parseFloat(this.inputValue),n=String((Number.isNaN(t)?0:t)+e);this.pattern.test(n)&&(this.inputValue=n,this.$emit(`input`,n),this.emitChange())},pick(e){this.sugOpen=!1,this.inputValue=String(e.key),this.$emit(`input`,this.inputValue),this.emitChange()},closeSug(){setTimeout(()=>this.sugOpen=!1,0)},emitChange(){this.$emit(`change`)}}},dx={class:`st-number-wrap`},fx={class:`st-number`},px=[`placeholder`,`disabled`,`value`],mx={key:0,class:`st-number__symbol st-number__symbol--btn`},hx={key:1,class:`st-number__symbol`},gx={key:0,class:`st-pop st-pop--sug`},_x=[`onMousedown`];function vx(e,t,n,r,i,a){return z(),B(`div`,dx,[H(`div`,fx,[H(`input`,{ref:`field`,class:`st-number__field`,type:`text`,placeholder:e.options.placeholder||`请输入`,disabled:e.disabled,value:i.inputValue,onInput:t[0]||=e=>a.onInput(e.target.value),onChange:t[1]||=e=>a.emitChange(),onKeydown:[t[2]||=ys(q(e=>a.step(1),[`prevent`]),[`up`]),t[3]||=ys(q(e=>a.step(-1),[`prevent`]),[`down`])],onBlur:t[4]||=e=>a.closeSug()},null,40,px),e.$slots.symbol?(z(),B(`span`,mx,[Xr(e.$slots,`symbol`)])):e.options.symbol&&e.options.symbol!==!0?(z(),B(`span`,hx,A(e.options.symbol),1)):G(``,!0),a.suggestions.length?(z(),B(`span`,{key:2,class:`st-number__caret`,title:`预设值`,onMousedown:t[5]||=q(e=>i.sugOpen=!i.sugOpen,[`prevent`])},`▾`,32)):G(``,!0)]),i.sugOpen&&a.suggestions.length?(z(),B(`div`,gx,[(z(!0),B(R,null,L(a.suggestions,e=>(z(),B(`div`,{key:e.key,class:k([`st-pop__item`,{"st-pop__item--on":String(e.key)===String(i.inputValue)}]),onMousedown:q(t=>a.pick(e),[`prevent`])},A(e.value),43,_x))),128))])):G(``,!0)])}var yx=Z(ux,[[`render`,vx]]),bx={name:`SetSelect`,props:nx,emits:rx,computed:{list(){return this.options.iParamList||this.options.iTypeList||[]},placeholder(){return this.options.placeholder||`请选择`},optionList(){return this.list.map(e=>({key:String(e.key),value:e.value}))},current(){return this.value===void 0||this.value===null?``:String(this.value)}},methods:{onChange(e){this.$emit(`input`,e),this.$emit(`change`)}}};function xx(e,t,n,r,i,a){let o=I(`Dropdown`);return z(),V(o,{value:a.current,options:a.optionList,placeholder:a.placeholder,clearable:``,size:`sm`,block:``,disabled:e.disabled,onInput:a.onChange},null,8,[`value`,`options`,`placeholder`,`disabled`,`onInput`])}var Sx=Z(bx,[[`render`,xx]]),Cx=[{key:`flex-start`,name:`起始对齐`,bars:[2.6,6.2]},{key:`center`,name:`居中`,bars:[4.6,8.2]},{key:`flex-end`,name:`末端对齐`,bars:[6.6,10.2]},{key:`space-between`,name:`两端对齐`,bars:[2.6,10.2]},{key:`space-around`,name:`等距间隔`,bars:[3.6,9.2]}],wx=[{key:`flex-start`,name:`起始对齐`,a:[3.6,6.4],b:[3.6,4.4]},{key:`center`,name:`居中`,a:[4.8,6.4],b:[5.8,4.4]},{key:`flex-end`,name:`末端对齐`,a:[6,6.4],b:[8,4.4]},{key:`baseline`,name:`基线对齐`,a:[4,5.6],b:[6,3.6],baseline:9.6},{key:`stretch`,name:`拉伸`,a:[3.6,9.4],b:[3.6,9.4]}],Tx=[{key:`normal`,value:`正体`,title:`font-style: normal`,icon:{text:`A`}},{key:`italic`,value:`斜体`,title:`font-style: italic`,icon:{text:`A`,italic:!0}}],Ex=[{key:`none`,value:`无`,title:`text-decoration: none`,icon:{text:`A`}},{key:`underline`,value:`下划线`,title:`text-decoration: underline`,icon:{text:`A`,lines:[[3.5,14,12.5,14]]}},{key:`line-through`,value:`删除线`,title:`text-decoration: line-through`,icon:{text:`A`,lines:[[3,8.6,13,8.6]]}}],Dx={name:`SetSegment`,props:{...nx,kind:{type:String,default:`TabSelect`}},emits:rx,computed:{current(){return this.value===void 0||this.value===null?``:this.value},flexDirection(){return this.options.flexDirection||this.watches.flexDirection||`row`},rotate(){return(this.kind===`JustifyContentStyle`||this.kind===`AlignItemsStyle`)&&this.flexDirection===`column`},items(){return this.kind===`JustifyContentStyle`?Cx.map(e=>({key:e.key,value:e.name,title:`justify-content: ${e.key}`,icon:{frame:!0,rects:e.bars.map(e=>[e,4.8,3.2,6.4])}})):this.kind===`AlignItemsStyle`?wx.map(e=>({key:e.key,value:e.name,title:`align-items: ${e.key}`,icon:{frame:!0,rects:[[4.2,e.a[0],3.2,e.a[1]],[8.6,e.b[0],3.2,e.b[1]]],lines:e.baseline?[[1.6,e.baseline,14.4,e.baseline]]:void 0}})):this.kind===`FontStyle`?Tx:this.kind===`TextDecorationStyle`?Ex:this.options.iParamList||[]}},methods:{pick(e){this.disabled||(this.$emit(`input`,e.key),this.$emit(`change`))}}},Ox={class:`st-seg`},kx=[`title`,`onClick`],Ax={key:0,x:`1`,y:`2.6`,width:`14`,height:`10.8`,rx:`1.4`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,opacity:`0.35`},jx=[`x`,`y`,`width`,`height`],Mx=[`x1`,`y1`,`x2`,`y2`],Nx=[`font-style`],Px={key:1};function Fx(e,t,n,r,i,a){return z(),B(`div`,Ox,[(z(!0),B(R,null,L(a.items,(e,t)=>(z(),B(`div`,{key:e.key+`_`+t,class:k([`st-seg__item`,{"st-seg__item--on":String(e.key)===String(a.current)}]),title:e.title||e.value,onClick:t=>a.pick(e)},[e.icon?(z(),B(`svg`,{key:0,class:`st-seg__icon`,viewBox:`0 0 16 16`,style:O(a.rotate?`transform:rotate(90deg)`:``)},[e.icon.frame?(z(),B(`rect`,Ax)):G(``,!0),(z(!0),B(R,null,L(e.icon.rects||[],(e,t)=>(z(),B(`rect`,{key:`r`+t,x:e[0],y:e[1],width:e[2],height:e[3],rx:`0.6`,fill:`currentColor`,stroke:`none`},null,8,jx))),128)),(z(!0),B(R,null,L(e.icon.lines||[],(e,t)=>(z(),B(`line`,{key:`l`+t,x1:e[0],y1:e[1],x2:e[2],y2:e[3],stroke:`currentColor`,"stroke-width":`1.1`},null,8,Mx))),128)),e.icon.text?(z(),B(`text`,{key:1,x:`8`,y:`12`,"text-anchor":`middle`,"font-size":`11`,"font-weight":`600`,fill:`currentColor`,stroke:`none`,"font-style":e.icon.italic?`italic`:`normal`},A(e.icon.text),9,Nx)):G(``,!0)],4)):(z(),B(`span`,Px,A(e.value),1))],10,kx))),128))])}var Ix=Z(Dx,[[`render`,Fx]]),Lx={name:`SetSwitch`,props:{...nx,boolean:{type:Boolean,default:!1}},emits:rx,computed:{activeValue(){return this.options.activeValue===void 0?this.boolean?!0:`1`:this.options.activeValue},inactiveValue(){return this.options.inactiveValue===void 0?!this.boolean&&`0`:this.options.inactiveValue},on(){return this.value===this.activeValue},activeText(){return this.options.activeText||`开`},inactiveText(){return this.options.inactiveText||`关`}},methods:{toggle(){this.disabled||(this.$emit(`input`,this.on?this.inactiveValue:this.activeValue),this.$emit(`change`))}}},Rx={class:`st-switch__text`};function zx(e,t,n,r,i,a){return z(),B(`div`,{class:k([`st-switch`,{"st-switch--on":a.on}]),onClick:t[0]||=(...e)=>a.toggle&&a.toggle(...e)},[t[1]||=H(`span`,{class:`st-switch__track`},[H(`span`,{class:`st-switch__knob`})],-1),H(`span`,Rx,A(a.on?a.activeText:a.inactiveText),1)],2)}var Bx=Z(Lx,[[`render`,zx]]);function Vx(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>`u`)){var r=document.head||document.getElementsByTagName(`head`)[0],i=document.createElement(`style`);i.type=`text/css`,n===`top`&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Hx=function(e,t){let{componentPrefix:n=``}=t||{};e.component(`${n}${this.name}`,this)},Ux={},Wx={name:`Checkboard`,props:{size:{type:[Number,String],default:8},white:{type:String,default:`#fff`},grey:{type:String,default:`#e6e6e6`}},computed:{bgStyle(){return{"background-image":`url(${Kx(this.white,this.grey,this.size)})`}}}};function Gx(e,t,n){if(typeof document>`u`)return null;let r=document.createElement(`canvas`);r.width=r.height=n*2;let i=r.getContext(`2d`);return i?(i.fillStyle=e,i.fillRect(0,0,r.width,r.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),r.toDataURL()):null}function Kx(e,t,n){let r=`${e},${t},${n}`;if(Ux[r])return Ux[r];let i=Gx(e,t,n);return Ux[r]=i,i}function qx(e,t,n,r,i,a){return z(),B(`div`,{class:`vc-checkerboard`,style:O(a.bgStyle)},null,4)}Vx(`.vc-checkerboard{background-size:contain;bottom:0;left:0;position:absolute;right:0;top:0}`),Wx.render=qx,Wx.__file=`src/components/checkboard/checkboard.vue`,Wx.install=Hx;var Jx={name:`Alpha`,components:{Checkboard:Wx},props:{value:Object,onChange:Function},computed:{colors(){return this.value},gradientColor(){let{rgba:e}=this.colors,t=[e.r,e.g,e.b].join(`,`);return`linear-gradient(to right, rgba(${t}, 0) 0%, rgba(${t}, 1) 100%)`}},methods:{handleChange(e,t){!t&&e.preventDefault();let{container:n}=this.$refs;if(!n)return;let r=n.clientWidth,i=n.getBoundingClientRect().left+window.pageXOffset,a=(e.pageX||(e.touches?e.touches[0].pageX:0))-i,o;o=a<0?0:a>r?1:Math.round(a*100/r)/100,this.colors.a!==o&&this.$emit(`change`,{h:this.colors.hsl.h,s:this.colors.hsl.s,l:this.colors.hsl.l,a:o,source:`rgba`})},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener(`mousemove`,this.handleChange),window.addEventListener(`mouseup`,this.handleMouseUp)},handleMouseUp(){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener(`mousemove`,this.handleChange),window.removeEventListener(`mouseup`,this.handleMouseUp)}}},Yx={class:`vc-alpha`},Xx={class:`vc-alpha-checkboard-wrap`},Zx=[H(`div`,{class:`vc-alpha-picker`},null,-1)];function Qx(e,t,n,r,i,a){let o=I(`Checkboard`);return z(),B(`div`,Yx,[H(`div`,Xx,[U(o)]),H(`div`,{class:`vc-alpha-gradient`,style:O({background:a.gradientColor})},null,4),H(`div`,{ref:`container`,class:`vc-alpha-container`,onMousedown:t[0]||=(...e)=>a.handleMouseDown&&a.handleMouseDown(...e),onTouchmove:t[1]||=(...e)=>a.handleChange&&a.handleChange(...e),onTouchstart:t[2]||=(...e)=>a.handleChange&&a.handleChange(...e)},[H(`div`,{class:`vc-alpha-pointer`,style:O({left:`${a.colors.a*100}%`})},Zx,4)],544)])}Vx(`.vc-alpha,.vc-alpha-checkboard-wrap{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-checkboard-wrap{overflow:hidden}.vc-alpha-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.vc-alpha-container{cursor:pointer;height:100%;margin:0 3px;position:relative;z-index:2}.vc-alpha-pointer{position:absolute;z-index:2}.vc-alpha-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}`),Jx.render=Qx,Jx.__file=`src/components/alpha/alpha.vue`,Jx.install=Hx;function $x(e,t){tS(e)&&(e=`100%`);var n=nS(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function eS(e){return Math.min(1,Math.max(0,e))}function tS(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function nS(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function rS(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function iS(e){return e<=1?`${Number(e)*100}%`:e}function aS(e){return e.length===1?`0`+e:String(e)}function oS(e,t,n){return{r:$x(e,255)*255,g:$x(t,255)*255,b:$x(n,255)*255}}function sS(e,t,n){e=$x(e,255),t=$x(t,255),n=$x(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=0,s=(r+i)/2;if(r===i)o=0,a=0;else{var c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:o,l:s}}function cS(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function lS(e,t,n){var r,i,a;if(e=$x(e,360),t=$x(t,100),n=$x(n,100),t===0)i=n,a=n,r=n;else{var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=cS(s,o,e+1/3),i=cS(s,o,e),a=cS(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function uS(e,t,n){e=$x(e,255),t=$x(t,255),n=$x(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}a/=6}return{h:a,s:c,v:o}}function dS(e,t,n){e=$x(e,360)*6,t=$x(t,100),n=$x(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,o,a,a,s,n][c],u=[s,n,n,o,a,a][c],d=[a,a,s,n,n,o][c];return{r:l*255,g:u*255,b:d*255}}function fS(e,t,n,r){var i=[aS(Math.round(e).toString(16)),aS(Math.round(t).toString(16)),aS(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function pS(e,t,n,r,i){var a=[aS(Math.round(e).toString(16)),aS(Math.round(t).toString(16)),aS(Math.round(n).toString(16)),aS(mS(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(``)}function mS(e){return Math.round(parseFloat(e)*255).toString(16)}function hS(e){return gS(e)/255}function gS(e){return parseInt(e,16)}function _S(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var vS={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function yS(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e==`string`&&(e=wS(e)),typeof e==`object`&&(TS(e.r)&&TS(e.g)&&TS(e.b)?(t=oS(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):TS(e.h)&&TS(e.s)&&TS(e.v)?(r=iS(e.s),i=iS(e.v),t=dS(e.h,r,i),o=!0,s=`hsv`):TS(e.h)&&TS(e.s)&&TS(e.l)&&(r=iS(e.s),a=iS(e.l),t=lS(e.h,r,a),o=!0,s=`hsl`),Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)),n=rS(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var bS=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,xS=`[\\s|\\(]+(${bS})[,|\\s]+(${bS})[,|\\s]+(${bS})\\s*\\)?`,SS=`[\\s|\\(]+(${bS})[,|\\s]+(${bS})[,|\\s]+(${bS})[,|\\s]+(${bS})\\s*\\)?`,CS={CSS_UNIT:new RegExp(bS),rgb:RegExp(`rgb`+xS),rgba:RegExp(`rgba`+SS),hsl:RegExp(`hsl`+xS),hsla:RegExp(`hsla`+SS),hsv:RegExp(`hsv`+xS),hsva:RegExp(`hsva`+SS),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function wS(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(vS[e])e=vS[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var n=CS.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=CS.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=CS.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=CS.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=CS.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=CS.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=CS.hex8.exec(e),n?{r:gS(n[1]),g:gS(n[2]),b:gS(n[3]),a:hS(n[4]),format:t?`name`:`hex8`}:(n=CS.hex6.exec(e),n?{r:gS(n[1]),g:gS(n[2]),b:gS(n[3]),format:t?`name`:`hex`}:(n=CS.hex4.exec(e),n?{r:gS(n[1]+n[1]),g:gS(n[2]+n[2]),b:gS(n[3]+n[3]),a:hS(n[4]+n[4]),format:t?`name`:`hex8`}:(n=CS.hex3.exec(e),n?{r:gS(n[1]+n[1]),g:gS(n[2]+n[2]),b:gS(n[3]+n[3]),format:t?`name`:`hex`}:!1)))))))))}function TS(e){return!!CS.CSS_UNIT.exec(String(e))}var ES=function(){function e(t,n){if(t===void 0&&(t=``),n===void 0&&(n={}),t instanceof e)return t;typeof t==`number`&&(t=_S(t)),this.originalInput=t;var r=yS(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=rS(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return this.toHsl().s===0},e.prototype.toHsv=function(){var e=uS(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=uS(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`},e.prototype.toHsl=function(){var e=sS(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=sS(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`},e.prototype.toHex=function(e){return e===void 0&&(e=!1),fS(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return e===void 0&&(e=!1),`#`+this.toHex(e)},e.prototype.toHex8=function(e){return e===void 0&&(e=!1),pS(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return e===void 0&&(e=!1),`#`+this.toHex8(e)},e.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`},e.prototype.toPercentageRgb=function(){var e=function(e){return`${Math.round($x(e,255)*100)}%`};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round($x(e,255)*100)};return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`},e.prototype.toName=function(){if(this.a===0)return`transparent`;if(this.a<1)return!1;for(var e=`#`+fS(this.r,this.g,this.b,!1),t=0,n=Object.entries(vS);t<n.length;t++){var r=n[t],i=r[0];if(e===r[1])return i}return!1},e.prototype.toString=function(e){var t=!!e;e??=this.format;var n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=eS(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=eS(n.l),new e(n)},e.prototype.tint=function(e){return e===void 0&&(e=10),this.mix(`white`,e)},e.prototype.shade=function(e){return e===void 0&&(e=10),this.mix(`black`,e)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=eS(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=eS(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),a=n/100;return new e({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],a=360/t,o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function DS(...e){return new ES(...e)}function OS(e,t){let n=e&&e.a,r;r=e&&e.hsl?DS(e.hsl):e&&e.hex&&e.hex.length>0?DS(e.hex):e&&e.hsv?DS(e.hsv):e&&e.rgba?DS(e.rgba):e&&e.rgb?DS(e.rgb):DS(e),r&&(r._a===void 0||r._a===null)&&r.setAlpha(n||r.getAlpha());let i=r.toHsl(),a=r.toHsv();return i.s===0&&(a.h=i.h=e.h||e.hsl&&e.hsl.h||t||0),a.v<.0164&&(a.h=e.h||e.hsv&&e.hsv.h||0,a.s=e.s||e.hsv&&e.hsv.s||0),i.l<.01&&(i.h=e.h||e.hsl&&e.hsl.h||0,i.s=e.s||e.hsl&&e.hsl.s||0),{hsl:i,hex:r.toHexString().toUpperCase(),hex8:r.toHex8String().toUpperCase(),rgba:r.toRgb(),hsv:a,oldHue:e.h||t||i.h,source:e.source,a:r.getAlpha()}}var kS={model:{prop:`modelValue`,event:`update:modelValue`},props:[`modelValue`],data(){return{val:OS(this.modelValue)}},computed:{colors:{get(){return this.val},set(e){this.val=e,this.$emit(`update:modelValue`,e)}}},watch:{modelValue(e){this.val=OS(e)}},methods:{colorChange(e,t){this.oldHue=this.colors.hsl.h,this.colors=OS(e,t||this.oldHue)},isValidHex(e){return DS(e).isValid},simpleCheckForValidColor(e){let t=[`r`,`g`,`b`,`a`,`h`,`s`,`l`,`v`],n=0,r=0;for(let i=0;i<t.length;i++){let a=t[i];e[a]&&(n++,isNaN(e[a])||r++)}if(n===r)return e},paletteUpperCase(e){return e.map(e=>e.toUpperCase())},isTransparent(e){return DS(e).getAlpha()===0}}},AS={name:`EditableInput`,props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get(){return this.value},set(e){if(this.max!==void 0&&+e>this.max)this.$refs.input.value=this.max;else return e}},labelId(){return`input__label__${this.label}__${Math.random().toString().slice(2,5)}`},labelSpanText(){return this.labelText||this.label}},methods:{update(e){this.handleChange(e.target.value)},handleChange(e){let t={};t[this.label]=e,(t.hex===void 0&&t[`#`]===void 0||e.length>5)&&this.$emit(`change`,t)},handleKeyDown(e){let{val:t}=this,n=Number(t);if(n){let r=this.arrowOffset||1;e.keyCode===38&&(t=n+r,this.handleChange(t),e.preventDefault()),e.keyCode===40&&(t=n-r,this.handleChange(t),e.preventDefault())}}}},jS={class:`vc-editable-input`},MS=[`aria-labelledby`],NS=[`id`,`for`],PS={class:`vc-input__desc`};function FS(e,t,n,r,i,a){return z(),B(`div`,jS,[F(H(`input`,{ref:`input`,"onUpdate:modelValue":t[0]||=e=>a.val=e,"aria-labelledby":a.labelId,class:`vc-input__input`,onKeydown:t[1]||=(...e)=>a.handleKeyDown&&a.handleKeyDown(...e),onInput:t[2]||=(...e)=>a.update&&a.update(...e)},null,40,MS),[[hs,a.val]]),H(`span`,{id:a.labelId,for:n.label,class:`vc-input__label`},A(a.labelSpanText),9,NS),H(`span`,PS,A(n.desc),1)])}Vx(`.vc-editable-input{position:relative}.vc-input__input{border:0;outline:none;padding:0}.vc-input__label{text-transform:capitalize}`),AS.render=FS,AS.__file=`src/components/editable-input/editable-input.vue`,AS.install=Hx;function IS(e,t,n){return t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e}var LS={name:`Saturation`,props:{value:Object},computed:{colors(){return this.value},bgColor(){return`hsl(${this.colors.hsv.h}, 100%, 50%)`},pointerTop(){return`${-(this.colors.hsv.v*100)+1+100}%`},pointerLeft(){return`${this.colors.hsv.s*100}%`}},methods:{handleChange(e,t){!t&&e.preventDefault();let{container:n}=this.$refs;if(!n)return;let r=n.clientWidth,i=n.clientHeight,a=n.getBoundingClientRect().left+window.pageXOffset,o=n.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),c=e.pageY||(e.touches?e.touches[0].pageY:0),l=IS(s-a,0,r),u=IS(c-o,0,i),d=l/r,f=IS(-(u/i)+1,0,1);this.onChange({h:this.colors.hsv.h,s:d,v:f,a:this.colors.hsv.a,source:`hsva`})},onChange(e){this.$emit(`change`,e)},handleMouseDown(e){window.addEventListener(`mousemove`,this.handleChange),window.addEventListener(`mouseup`,this.handleChange),window.addEventListener(`mouseup`,this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener(`mousemove`,this.handleChange),window.removeEventListener(`mouseup`,this.handleChange),window.removeEventListener(`mouseup`,this.handleMouseUp)}}},RS=H(`div`,{class:`vc-saturation--white`},null,-1),zS=H(`div`,{class:`vc-saturation--black`},null,-1),BS=[H(`div`,{class:`vc-saturation-circle`},null,-1)];function VS(e,t,n,r,i,a){return z(),B(`div`,{ref:`container`,class:`vc-saturation`,style:O({background:a.bgColor}),onMousedown:t[0]||=(...e)=>a.handleMouseDown&&a.handleMouseDown(...e),onTouchmove:t[1]||=(...e)=>a.handleChange&&a.handleChange(...e),onTouchstart:t[2]||=(...e)=>a.handleChange&&a.handleChange(...e)},[RS,zS,H(`div`,{class:`vc-saturation-pointer`,style:O({top:a.pointerTop,left:a.pointerLeft})},BS,4)],36)}Vx(`.vc-saturation,.vc-saturation--black,.vc-saturation--white{bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0}.vc-saturation--white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.vc-saturation--black{background:linear-gradient(0deg,#000,transparent)}.vc-saturation-pointer{cursor:pointer;position:absolute}.vc-saturation-circle{border-radius:50%;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);cursor:head;height:4px;transform:translate(-2px,-2px);width:4px}`),LS.render=VS,LS.__file=`src/components/saturation/saturation.vue`,LS.install=Hx;var HS={name:`Hue`,props:{value:Object,direction:{type:String,default:`horizontal`}},data(){return{oldHue:0,pullDirection:``}},computed:{colors(){return this.value},directionClass(){return{"vc-hue--horizontal":this.direction===`horizontal`,"vc-hue--vertical":this.direction===`vertical`}},pointerTop(){return this.direction===`vertical`?this.colors.hsl.h===0&&this.pullDirection===`right`?0:`${-(this.colors.hsl.h*100/360)+100}%`:0},pointerLeft(){return this.direction===`vertical`?0:this.colors.hsl.h===0&&this.pullDirection===`right`?`100%`:`${this.colors.hsl.h*100/360}%`}},watch:{value:{handler(e,t){let{h:n}=e.hsl;n!==0&&n-this.oldHue>0&&(this.pullDirection=`right`),n!==0&&n-this.oldHue<0&&(this.pullDirection=`left`),this.oldHue=n},deep:!0,immediate:!0}},methods:{handleChange(e,t){!t&&e.preventDefault();let{container:n}=this.$refs;if(!n)return;let r=n.clientWidth,i=n.clientHeight,a=n.getBoundingClientRect().left+window.pageXOffset,o=n.getBoundingClientRect().top+window.pageYOffset,s=e.pageX||(e.touches?e.touches[0].pageX:0),c=e.pageY||(e.touches?e.touches[0].pageY:0),l=s-a,u=c-o,d,f;this.direction===`vertical`?(u<0?d=360:u>i?d=0:(f=-(u*100/i)+100,d=360*f/100),this.colors.hsl.h!==d&&this.$emit(`change`,{h:d,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:`hsl`})):(l<0?d=0:l>r?d=360:(f=l*100/r,d=360*f/100),this.colors.hsl.h!==d&&this.$emit(`change`,{h:d,s:this.colors.hsl.s,l:this.colors.hsl.l,a:this.colors.hsl.a,source:`hsl`}))},handleMouseDown(e){this.handleChange(e,!0),window.addEventListener(`mousemove`,this.handleChange),window.addEventListener(`mouseup`,this.handleChange),window.addEventListener(`mouseup`,this.handleMouseUp)},handleMouseUp(e){this.unbindEventListeners()},unbindEventListeners(){window.removeEventListener(`mousemove`,this.handleChange),window.removeEventListener(`mouseup`,this.handleChange),window.removeEventListener(`mouseup`,this.handleMouseUp)}}},US=[`aria-valuenow`],WS=[H(`div`,{class:`vc-hue-picker`},null,-1)];function GS(e,t,n,r,i,a){return z(),B(`div`,{class:k([`vc-hue`,[a.directionClass]])},[H(`div`,{ref:`container`,class:`vc-hue-container`,role:`slider`,"aria-valuenow":a.colors.hsl.h,"aria-valuemin":`0`,"aria-valuemax":`360`,onMousedown:t[0]||=(...e)=>a.handleMouseDown&&a.handleMouseDown(...e),onTouchmove:t[1]||=(...e)=>a.handleChange&&a.handleChange(...e),onTouchstart:t[2]||=(...e)=>a.handleChange&&a.handleChange(...e)},[H(`div`,{class:`vc-hue-pointer`,style:O({top:a.pointerTop,left:a.pointerLeft}),role:`presentation`},WS,4)],40,US)],2)}Vx(`.vc-hue{border-radius:2px;bottom:0;left:0;position:absolute;right:0;top:0}.vc-hue--horizontal{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue--vertical{background:linear-gradient(0deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.vc-hue-container{cursor:pointer;height:100%;margin:0 2px;position:relative}.vc-hue-pointer{position:absolute;z-index:2}.vc-hue-picker{background:#fff;border-radius:1px;box-shadow:0 0 2px rgba(0,0,0,.6);cursor:pointer;height:8px;margin-top:1px;transform:translateX(-2px);width:4px}`),HS.render=GS,HS.__file=`src/components/hue/hue.vue`,HS.install=Hx;var KS=[`#D0021B`,`#F5A623`,`#F8E71C`,`#8B572A`,`#7ED321`,`#417505`,`#BD10E0`,`#9013FE`,`#4A90E2`,`#50E3C2`,`#B8E986`,`#000000`,`#4A4A4A`,`#9B9B9B`,`#FFFFFF`,`rgba(0,0,0,0)`],qS={name:`Sketch`,components:{Saturation:LS,Hue:HS,Alpha:Jx,EdIn:AS,Checkboard:Wx},mixins:[kS],props:{presetColors:{type:Array,default(){return KS}},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1}},computed:{hex(){let e;return e=this.colors.a<1?this.colors.hex8:this.colors.hex,e.replace(`#`,``)},activeColor(){let{rgba:e}=this.colors;return`rgba(${[e.r,e.g,e.b,e.a].join(`,`)})`}},methods:{handlePreset(e){this.colorChange(e)},childChange(e){this.colorChange(e)},inputChange(e){e&&(e.hex?this.isValidHex(e.hex)&&this.colorChange({hex:e.hex,source:`hex`}):(e.r||e.g||e.b||e.a)&&this.colorChange({r:e.r||this.colors.rgba.r,g:e.g||this.colors.rgba.g,b:e.b||this.colors.rgba.b,a:e.a||this.colors.rgba.a,source:`rgba`}))}}},JS={class:`vc-sketch-saturation-wrap`},YS={class:`vc-sketch-controls`},XS={class:`vc-sketch-sliders`},ZS={class:`vc-sketch-hue-wrap`},QS={key:0,class:`vc-sketch-alpha-wrap`},$S={class:`vc-sketch-color-wrap`},eC=[`aria-label`],tC={key:0,class:`vc-sketch-field`},nC={class:`vc-sketch-field--double`},rC={class:`vc-sketch-field--single`},iC={class:`vc-sketch-field--single`},aC={class:`vc-sketch-field--single`},oC={key:0,class:`vc-sketch-field--single`},sC={class:`vc-sketch-presets`,role:`group`,"aria-label":`A color preset, pick one to set as current color`},cC=[`aria-label`,`onClick`],lC=[`aria-label`,`onClick`];function uC(e,t,n,r,i,a){let o=I(`Saturation`),s=I(`Hue`),c=I(`Alpha`),l=I(`Checkboard`),u=I(`EdIn`);return z(),B(`div`,{role:`application`,"aria-label":`Sketch color picker`,class:k([`vc-sketch`,[n.disableAlpha?`vc-sketch__disable-alpha`:``]])},[H(`div`,JS,[U(o,{value:e.colors,onChange:a.childChange},null,8,[`value`,`onChange`])]),H(`div`,YS,[H(`div`,XS,[H(`div`,ZS,[U(s,{value:e.colors,onChange:a.childChange},null,8,[`value`,`onChange`])]),n.disableAlpha?G(`v-if`,!0):(z(),B(`div`,QS,[U(c,{value:e.colors,onChange:a.childChange},null,8,[`value`,`onChange`])]))]),H(`div`,$S,[H(`div`,{"aria-label":`Current color is ${a.activeColor}`,class:`vc-sketch-active-color`,style:O({background:a.activeColor})},null,12,eC),U(l)])]),n.disableFields?G(`v-if`,!0):(z(),B(`div`,tC,[G(` rgba `),H(`div`,nC,[U(u,{label:`hex`,value:a.hex,onChange:a.inputChange},null,8,[`value`,`onChange`])]),H(`div`,rC,[U(u,{label:`r`,value:e.colors.rgba.r,onChange:a.inputChange},null,8,[`value`,`onChange`])]),H(`div`,iC,[U(u,{label:`g`,value:e.colors.rgba.g,onChange:a.inputChange},null,8,[`value`,`onChange`])]),H(`div`,aC,[U(u,{label:`b`,value:e.colors.rgba.b,onChange:a.inputChange},null,8,[`value`,`onChange`])]),n.disableAlpha?G(`v-if`,!0):(z(),B(`div`,oC,[U(u,{label:`a`,value:e.colors.a,"arrow-offset":.01,max:1,onChange:a.inputChange},null,8,[`value`,`arrow-offset`,`onChange`])]))])),H(`div`,sC,[(z(!0),B(R,null,L(n.presetColors,t=>(z(),B(R,null,[e.isTransparent(t)?(z(),B(`div`,{key:t,"aria-label":`Color:${t}`,class:`vc-sketch-presets-color`,onClick:e=>a.handlePreset(t)},[U(l)],8,lC)):(z(),B(`div`,{key:`!${t}`,class:`vc-sketch-presets-color`,"aria-label":`Color:${t}`,style:O({background:t}),onClick:e=>a.handlePreset(t)},null,12,cC))],64))),256))])],2)}Vx(`.vc-sketch{background:#fff;border-radius:4px;box-shadow:0 0 0 1px rgba(0,0,0,.15),0 8px 16px rgba(0,0,0,.15);box-sizing:initial;padding:10px 10px 0;position:relative;width:200px}.vc-sketch-saturation-wrap{overflow:hidden;padding-bottom:75%;position:relative;width:100%}.vc-sketch-controls{display:flex}.vc-sketch-sliders{flex:1;padding:4px 0}.vc-sketch-sliders .vc-alpha-gradient,.vc-sketch-sliders .vc-hue{border-radius:2px}.vc-sketch-alpha-wrap,.vc-sketch-hue-wrap{height:10px;position:relative}.vc-sketch-alpha-wrap{margin-top:4px;overflow:hidden}.vc-sketch-color-wrap{border-radius:3px;height:24px;margin-left:4px;margin-top:4px;position:relative;width:24px}.vc-sketch-active-color{border-radius:2px;bottom:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15),inset 0 0 4px rgba(0,0,0,.25);left:0;position:absolute;right:0;top:0;z-index:2}.vc-sketch-color-wrap .vc-checkerboard{background-size:auto}.vc-sketch-field{display:flex;padding-top:4px}.vc-sketch-field .vc-input__input{border:none;box-shadow:inset 0 0 0 1px #ccc;font-size:10px;padding:4px 0 3px 10%;width:90%}.vc-sketch-field .vc-input__label{color:#222;display:block;font-size:11px;padding-bottom:4px;padding-top:3px;text-align:center;text-transform:capitalize}.vc-sketch-field--single{flex:1;padding-left:6px}.vc-sketch-field--double{flex:2}.vc-sketch-presets{border-top:1px solid #eee;margin-left:-10px;margin-right:-10px;padding-left:10px;padding-top:10px}.vc-sketch-presets-color{cursor:pointer;display:inline-block;height:16px;margin:0 10px 10px 0;overflow:hidden;position:relative;vertical-align:top;width:16px}.vc-sketch-presets-color,.vc-sketch-presets-color .vc-checkerboard{border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}.vc-sketch__disable-alpha .vc-sketch-color-wrap{height:10px}`),qS.render=uC,qS.__file=`src/components/sketch/sketch.vue`,qS.install=Hx;function dC(e){let t=String(e||``).trim();if(!t)return null;let n=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);if(n)return{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16),a:1};if(n=t.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i),n){let e=e=>parseInt(e+e,16);return{r:e(n[1]),g:e(n[2]),b:e(n[3]),a:1}}if(n=t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i),n)return{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16),a:parseInt(n[4],16)/255};if(n=t.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/i),n){let e=n[4]===void 0?1:parseFloat(n[4]);return{r:Math.round(parseFloat(n[1])),g:Math.round(parseFloat(n[2])),b:Math.round(parseFloat(n[3])),a:e}}return null}function fC(e){if(!e)return`#000000`;let t=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`);return`#`+t(e.r)+t(e.g)+t(e.b)}function pC(e){return e?e.a>=1?fC(e):`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${+e.a.toFixed(2)})`:``}var mC={name:`SetColor`,components:{Sketch:qS},props:nx,emits:rx,data(){return{_rgb:null,popOpen:!1,popW:240,popStyle:{position:`fixed`,left:`0px`,top:`0px`}}},computed:{text(){return this.value===void 0||this.value===null?``:String(this.value)},parsed(){return dC(this.text)||{r:0,g:0,b:0,a:1}},pickerValue(){return this.text||`#000000`},alpha(){return this.parsed.a},displayColor(){return pC(this.parsed)}},watch:{text(){this._rgb=dC(this.text)}},beforeUnmount(){this.removeDocListener()},methods:{onTextInput(e){this._rgb=dC(e),this.$emit(`input`,e)},onAlphaChange(e){let t=Math.max(0,Math.min(1,parseInt(e,10)/100)),n={...this._rgb||this.parsed,a:t};this._rgb=n,this.$emit(`input`,pC(n)),this.$emit(`change`)},onPicker(e){let t=e&&e.rgba,n,r,i,a;if(Array.isArray(t))[n,r,i,a]=t;else if(t)n=t.r,r=t.g,i=t.b,a=t.a;else{let t=dC(e.hex)||{r:0,g:0,b:0,a:1};n=t.r,r=t.g,i=t.b,a=t.a}a??=1;let o=e.hex||fC({r:n,g:r,b:i,a:1});this._rgb={r:n,g:r,b:i,a},this.$emit(`input`,a>=1?o:`rgba(${Math.round(n)}, ${Math.round(r)}, ${Math.round(i)}, ${+a.toFixed(2)})`),this.$emit(`change`)},clear(){this.disabled||(this._rgb=null,this.closePop(),this.$emit(`input`,``),this.$emit(`change`))},togglePop(){this.disabled||(this.popOpen?this.closePop():this.openPop())},openPop(){let e=this.$refs.swatch;if(!e)return;let t=e.getBoundingClientRect(),n=this.$refs.top&&this.$refs.top.getBoundingClientRect()||t,r=Math.max(220,Math.min(Math.round(n.width),400)),i=window.innerWidth,a=window.innerHeight,o=n.left,s=t.bottom+6;o+r>i-8&&(o=Math.max(8,i-r-8)),s+320>a-8&&(s=Math.max(8,t.top-320-6)),this.popW=r,this.popStyle={position:`fixed`,left:o+`px`,top:s+`px`,width:r+`px`,zIndex:4e3},this.popOpen=!0,this.$nextTick(()=>{document.addEventListener(`mousedown`,this.onDocClick,!0)})},closePop(){this.popOpen&&(this.popOpen=!1,this.removeDocListener())},removeDocListener(){document.removeEventListener(`mousedown`,this.onDocClick,!0)},onDocClick(e){let t=this.$refs.pop,n=this.$refs.swatch;t&&t.contains(e.target)||n&&n.contains(e.target)||this.closePop()}}},hC={class:`st-color`},gC={class:`st-color__top`,ref:`top`},_C=[`title`,`disabled`],vC=[`disabled`,`value`],yC=[`disabled`],bC={key:0,class:`st-color__alpha-row`},xC=[`disabled`,`value`],SC={class:`st-color__alpha-val`};function CC(e,t,n,r,i,a){let o=I(`Sketch`);return z(),B(`div`,hC,[H(`div`,gC,[H(`button`,{ref:`swatch`,class:`st-color__swatch`,type:`button`,title:a.text||`未设置`,disabled:e.disabled,onClick:t[0]||=(...e)=>a.togglePop&&a.togglePop(...e)},[t[7]||=H(`span`,{class:`st-color__checker`},null,-1),H(`span`,{class:`st-color__fill`,style:O({background:a.displayColor||`transparent`})},null,4)],8,_C),H(`input`,{class:`ni-input st-color__text`,type:`text`,placeholder:`如 #333333 / rgba(0,0,0,.5)`,disabled:e.disabled,value:a.text,onInput:t[1]||=e=>a.onTextInput(e.target.value),onChange:t[2]||=t=>e.$emit(`change`)},null,40,vC),H(`button`,{class:`st-color__clear`,type:`button`,title:`重置(清空颜色)`,disabled:e.disabled,onClick:t[3]||=(...e)=>a.clear&&a.clear(...e)},[...t[8]||=[H(`svg`,{viewBox:`0 0 16 16`,class:`st-ic`,"aria-hidden":`true`},[H(`use`,{href:`#icon-reset`})],-1)]],8,yC)],512),a.text?(z(),B(`div`,bC,[t[9]||=H(`span`,{class:`st-color__alpha-label`},`透明度`,-1),H(`input`,{class:`st-color__alpha-slider`,type:`range`,min:`0`,max:`100`,disabled:e.disabled,value:Math.round(a.alpha*100),onInput:t[4]||=e=>a.onAlphaChange(e.target.value),onChange:t[5]||=t=>e.$emit(`change`)},null,40,xC),H(`span`,SC,A(Math.round(a.alpha*100))+`%`,1)])):G(``,!0),(z(),V(ir,{to:`body`},[i.popOpen?(z(),B(`div`,{key:0,ref:`pop`,class:`st-color__pop`,style:O(i.popStyle),onMousedown:t[6]||=q(()=>{},[`stop`])},[U(o,{"model-value":a.pickerValue,"disable-alpha":!1,"onUpdate:modelValue":a.onPicker},null,8,[`model-value`,`onUpdate:modelValue`])],36)):G(``,!0)]))])}var wC=Z(mC,[[`render`,CC]]),TC={name:`SetIconSelect`,components:{SvgSymbols:gl},props:nx,emits:rx,data(){return{open:!1}},computed:{list(){return this.options.iIconList||[]}},methods:{pick(e){this.disabled||(this.open=!1,this.$emit(`input`,e.key),this.$emit(`change`))}}},EC={class:`st-iconsel-wrap`},DC={class:`st-iconsel`},OC={class:`st-iconsel__preview`},kC={key:1,style:{"font-size":`11px`,color:`var(--text-faint)`}},AC=[`disabled`,`value`],jC={key:0,class:`st-iconsel__grid`},MC=[`title`,`onClick`],NC={key:0,class:`st-list__empty`};function PC(e,t,n,r,i,a){let o=I(`SvgSymbols`);return z(),B(`div`,EC,[H(`div`,DC,[H(`span`,OC,[e.value?(z(),V(o,{key:0,icon:String(e.value),color:`currentColor`},null,8,[`icon`])):(z(),B(`span`,kC,`无`))]),H(`input`,{class:`ni-input`,type:`text`,placeholder:`图标 key`,disabled:e.disabled,value:e.value||``,onInput:t[0]||=t=>e.$emit(`input`,t.target.value),onChange:t[1]||=t=>e.$emit(`change`)},null,40,AC),H(`button`,{class:`st-minibtn`,type:`button`,onClick:t[2]||=e=>i.open=!i.open},A(i.open?`收起`:`选择`),1)]),i.open?(z(),B(`div`,jC,[(z(!0),B(R,null,L(a.list,t=>(z(),B(`span`,{key:t.key,class:k([`st-iconsel__cell`,{"st-iconsel__cell--on":t.key===e.value}]),title:t.name||t.value||t.key,onClick:e=>a.pick(t)},[U(o,{icon:t.key,color:`currentColor`},null,8,[`icon`])],10,MC))),128)),a.list.length?G(``,!0):(z(),B(`p`,NC,`该组件未提供图标列表`))])):G(``,!0)])}var FC=Z(TC,[[`render`,PC]]);Prism.languages.javascript=Prism.languages.extend(`clike`,{"class-name":[Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined(`script`,`javascript`),Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),Prism.languages.js=Prism.languages.javascript,lm.default.languages.javascript&&!lm.default.languages.javascript[`binding-var`]&&lm.default.languages.insertBefore(`javascript`,`keyword`,{"binding-var":/\$[A-Za-z_$][\w$]*/});var IC={name:`SetExpr`,props:{...nx,placeholder:{type:String,default:``}},emits:rx,data(){return{code:``}},computed:{lines(){return this.code?this.code.split(`
|
|
79
|
+
`).length:0},chars(){return this.code.length}},watch:{value(e){this.syncFromValue(e)}},mounted(){this.code=this.readValue(this.value),this.$nextTick(()=>this.initJar())},beforeUnmount(){this._t&&clearTimeout(this._t),this._jar&&this._jar.destroy&&this._jar.destroy()},methods:{readValue(e){return e==null?``:typeof e==`string`?e:String(e)},syncFromValue(e){let t=this.readValue(e);if(t===this.code)return;let n=this.$refs.editor;n&&document.activeElement===n||(this.code=t,this._jar&&this._jar.updateCode(t))},initJar(){let e=this.$refs.editor;if(!e)return;let t=e=>{e.innerHTML=lm.default.highlight(e.textContent,lm.default.languages.javascript,`javascript`)};this._jar=cm(e,t,{tab:` `,indentOn:/[({[]$/,addClosing:!0,history:!0}),this._jar.updateCode(this.code),this._jar.onUpdate(e=>this.onCode(e))},onCode(e){this.disabled||(this.code=e,this.$emit(`input`,e),this._t&&clearTimeout(this._t),this._t=setTimeout(()=>this.$emit(`change`),400))}}},LC={key:0,class:`st-expr__ph`},RC={class:`st-expr__foot`},zC={class:`st-expr__hint`};function BC(e,t,n,r,i,a){return z(),B(`div`,{class:k([`st-expr`,{"st-expr--disabled":e.disabled}])},[H(`div`,{ref:`editor`,class:k([`st-expr__editor`,{"is-disabled":e.disabled}])},null,2),n.placeholder&&!i.code?(z(),B(`span`,LC,A(n.placeholder),1)):G(``,!0),H(`div`,RC,[H(`span`,zC,A(a.lines)+` 行 · `+A(a.chars)+` 字符`,1)])],2)}var VC=Z(IC,[[`render`,BC]]),HC={name:`SetIfForm`,components:{SetExpr:VC},props:nx,emits:rx,computed:{obj(){return this.value&&typeof this.value==`object`?this.value:{}},expression(){return this.obj.expression||``},name(){return this.obj.name||``}},methods:{setExpression(e){let t=!this.name||this.name===this.expression;this.$emit(`input`,{name:t?e:this.name,expression:e})},setName(e){this.$emit(`input`,{name:e,expression:this.expression})}}},UC={class:`st-ifform`},WC=[`disabled`,`value`];function GC(e,t,n,r,i,a){let o=I(`SetExpr`);return z(),B(`div`,UC,[U(o,{value:a.expression,disabled:e.disabled,placeholder:`表达式,如 $singleMode 或 $data.count > 0`,onInput:a.setExpression,onChange:t[0]||=t=>e.$emit(`change`)},null,8,[`value`,`disabled`,`onInput`]),H(`input`,{class:`ni-input`,type:`text`,placeholder:`显示名(留空跟随表达式)`,disabled:e.disabled,value:a.name,onInput:t[1]||=e=>a.setName(e.target.value),onChange:t[2]||=t=>e.$emit(`change`)},null,40,WC)])}var KC=Z(HC,[[`render`,GC]]),qC=[{key:`number`,value:`px`},{key:`percent`,value:`%`},{key:`auto`,value:`@`}],JC={name:`SetNumberStyle`,components:{SetNumber:yx},props:nx,emits:rx,data(){return{unit:`number`,numValue:``,menuOpen:!1}},computed:{unitList(){return this.options.iTypeList||qC},unitLabel(){let e=this.unitList.filter(e=>e.key===this.unit)[0];return e?e.value:`px`},isAuto(){return this.unit===`auto`},numberOptions(){return{...this.options,type:this.unit===`percent`?`integer`:`float`,placeholder:this.options.placeholder||``,symbol:!0}}},watch:{value:{immediate:!0,handler(){this.parse()}}},methods:{parse(){let e=this.value;/%$/.test(String(e))?(this.unit=`percent`,this.numValue=String(e).replace(/%/g,``)):e===`auto`?(this.unit=`auto`,this.numValue=`auto`):(this.unit=`number`,this.numValue=e===0?`0`:e==null?``:String(e))},onNum(e){this.numValue=e,this.emit()},pickUnit(e){this.menuOpen=!1,this.unit=e,this.numValue=e===`percent`?`100`:e===`auto`?`auto`:``,this.emit(),this.$emit(`change`)},emit(){this.unit===`percent`&&this.numValue?this.$emit(`input`,this.numValue+`%`):this.$emit(`input`,this.numValue)}}},YC={class:`st-numberstyle`},XC={key:1,class:`st-pop st-pop--unit`},ZC=[`onMousedown`];function QC(e,t,n,r,i,a){let o=I(`SetNumber`);return z(),B(`div`,YC,[U(o,{value:i.numValue,options:a.numberOptions,disabled:e.disabled||a.isAuto,onInput:a.onNum,onChange:t[1]||=t=>e.$emit(`change`)},{symbol:P(()=>[H(`span`,{class:`st-unit`,onMousedown:t[0]||=q(e=>i.menuOpen=!i.menuOpen,[`prevent`])},A(a.unitLabel),33)]),_:1},8,[`value`,`options`,`disabled`,`onInput`]),i.menuOpen?(z(),B(`div`,{key:0,class:`st-pop-mask`,onMousedown:t[2]||=q(e=>i.menuOpen=!1,[`prevent`])},null,32)):G(``,!0),i.menuOpen?(z(),B(`div`,XC,[(z(!0),B(R,null,L(a.unitList,e=>(z(),B(`div`,{key:e.key,class:k([`st-pop__item`,{"st-pop__item--on":e.key===i.unit}]),onMousedown:q(t=>a.pickUnit(e.key),[`prevent`])},A(e.value),43,ZC))),128))])):G(``,!0)])}var $C=Z(JC,[[`render`,QC]]),ew={name:`SetPadding`,components:{SetNumber:yx},props:nx,emits:rx,data(){return{form:{top:``,right:``,bottom:``,left:``}}},computed:{brackets(){return this.options.brackets||[`{`,`}`]},seperator(){return this.options.seperator||`,`}},watch:{value:{immediate:!0,handler(){this.parse()}}},methods:{parse(){let e=String(this.value||``);this.brackets.length&&(e=e.replace(RegExp(`[${this.brackets.join(``)}]`,`g`),``));let t=e.split(this.seperator);this.form=this.options.normal?{top:t[0]||``,right:t[1]||``,bottom:t[2]||``,left:t[3]||``}:{top:t[0]||``,left:t[1]||``,bottom:t[2]||``,right:t[3]||``}},opt(e){return{type:`integer`,symbol:e,placeholder:`0`}},set(e,t){this.form[e]=t,this.emitValue()},emitValue(){let e=this.form,t=(this.options.normal?[e.top,e.right,e.bottom,e.left]:[e.top,e.left,e.bottom,e.right]).map(e=>e===``||e===void 0?`0`:e).join(this.seperator),[n,r]=this.brackets.length?this.brackets:[``,``];this.$emit(`input`,`${n||``}${t}${r||``}`)},emitOut(){this.$emit(`change`)}}},tw={class:`st-pad`};function nw(e,t,n,r,i,a){let o=I(`SetNumber`);return z(),B(`div`,tw,[U(o,{value:i.form.top,options:a.opt(`上`),disabled:e.disabled,onInput:t[0]||=e=>a.set(`top`,e),onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onChange`]),U(o,{value:i.form.right,options:a.opt(`右`),disabled:e.disabled,onInput:t[1]||=e=>a.set(`right`,e),onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onChange`]),U(o,{value:i.form.bottom,options:a.opt(`下`),disabled:e.disabled,onInput:t[2]||=e=>a.set(`bottom`,e),onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onChange`]),U(o,{value:i.form.left,options:a.opt(`左`),disabled:e.disabled,onInput:t[3]||=e=>a.set(`left`,e),onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onChange`])])}var rw=Z(ew,[[`render`,nw]]),iw=[{key:`TopLeft`,value:`上左`},{key:`TopCenter`,value:`上中`},{key:`TopRight`,value:`上右`},{key:`CenterLeft`,value:`中左`},{key:`Center`,value:`中间`},{key:`CenterRight`,value:`中右`},{key:`BottomLeft`,value:`下左`},{key:`BottomCenter`,value:`下中`},{key:`BottomRight`,value:`下右`}],aw=[{key:`0% 0%`,value:`左上对齐`},{key:`50% 0%`,value:`中上对齐`},{key:`100% 0%`,value:`右上对齐`},{key:`0% 50%`,value:`左中对齐`},{key:`50% 50%`,value:`居中对齐`},{key:`100% 50%`,value:`右中对齐`},{key:`0% 100%`,value:`左下对齐`},{key:`50% 100%`,value:`中下对齐`},{key:`100% 100%`,value:`右下对齐`}],ow={name:`SetGrid9`,props:{...nx,kind:{type:String,default:`PositionStyle`}},emits:rx,computed:{cells(){return this.kind===`BackgroundPositionStyle`?aw:iw}},methods:{pick(e){this.disabled||(this.$emit(`input`,e.key),this.$emit(`change`))}}},sw={class:`st-grid9`},cw=[`title`,`onClick`];function lw(e,t,n,r,i,a){return z(),B(`div`,sw,[(z(!0),B(R,null,L(a.cells,n=>(z(),B(`div`,{key:n.key,class:k([`st-grid9__cell`,{"st-grid9__cell--on":String(n.key)===String(e.value)}]),title:n.value,onClick:e=>a.pick(n)},[...t[0]||=[H(`span`,{class:`st-grid9__dot`},null,-1)]],10,cw))),128))])}var uw=Z(ow,[[`render`,lw]]),dw=[{key:`number`,value:`px`},{key:`percent`,value:`%`}],fw={name:`SetBgPosition`,components:{SetGrid9:uw,SetNumberStyle:$C},props:nx,emits:rx,data(){return{x:``,y:``}},watch:{value:{immediate:!0,handler(){this.parse()}}},methods:{parse(){let e=String(this.value||``).split(/\s+/);this.x=e[0]||``,this.y=e[1]||``},numOptions(e){return{placeholder:e,iTypeList:dw}},pickGrid(e){this.$emit(`input`,e)},setX(e){this.x=e,this.emitValue()},setY(e){this.y=e,this.emitValue()},emitValue(){this.$emit(`input`,`${this.x||`0`} ${this.y||`0`}`)},emitOut(){this.$emit(`change`)}}},pw={class:`st-bgpos`},mw={class:`st-bgpos__xy`};function hw(e,t,n,r,i,a){let o=I(`SetGrid9`),s=I(`SetNumberStyle`);return z(),B(`div`,pw,[U(o,{kind:`BackgroundPositionStyle`,value:e.value,disabled:e.disabled,onInput:a.pickGrid,onChange:t[0]||=t=>e.$emit(`change`)},null,8,[`value`,`disabled`,`onInput`]),H(`div`,mw,[U(s,{value:i.x,options:a.numOptions(`X`),disabled:e.disabled,onInput:a.setX,onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onInput`,`onChange`]),U(s,{value:i.y,options:a.numOptions(`Y`),disabled:e.disabled,onInput:a.setY,onChange:a.emitOut},null,8,[`value`,`options`,`disabled`,`onInput`,`onChange`])])])}var gw=Z(fw,[[`render`,hw]]),_w={name:`Dropdown`,emits:[`input`,`change`],props:{value:{type:[String,Number,null],default:``},options:{type:Array,default:()=>[]},placeholder:{type:String,default:`请选择`},size:{type:String,default:`sm`},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placement:{type:String,default:`bottom-start`},width:{type:[String,Number],default:null},borderless:{type:Boolean,default:!1},label:{type:String,default:null},clearable:{type:Boolean,default:!1}},data(){return{open:!1,dropUp:!1}},computed:{hasTriggerSlot(){return!!this.$slots.trigger},current(){return this.options.find(e=>e.key===this.value)||null},hasValue(){return this.value!==``&&this.value!==null&&this.value!==void 0},displayText(){return this.label==null?this.current?this.current.value||String(this.current.key):this.placeholder||`请选择`:this.label},chevSize(){return this.size===`xs`?11:this.size===`md`||this.size===`lg`?13:12},checkSize(){return this.size===`xs`?11:12},rootStyle(){return this.width==null?null:{width:typeof this.width==`number`?this.width+`px`:this.width}}},watch:{open(e){e?document.addEventListener(`click`,this.onDocClick,!0):document.removeEventListener(`click`,this.onDocClick,!0)}},beforeUnmount(){document.removeEventListener(`click`,this.onDocClick,!0)},methods:{toggle(){this.disabled||(this.open?this.open=!1:this.openMenu())},openMenu(){let e=this.$refs.root;if(e){let t=Math.min(this.options.length*31+12,290);this.dropUp=this.shouldDropUp(e,t)}this.open=!0,this.$nextTick(()=>{let e=this.$refs.pop,t=this.$refs.root;if(!e||!t)return;let n=this.shouldDropUp(t,e.offsetHeight);n!==this.dropUp&&(this.dropUp=n)})},shouldDropUp(e,t){let n=e.getBoundingClientRect(),r=this.getClipRect(e),i=r.bottom-n.bottom,a=n.top-r.top;return i<t&&a>=t},getClipRect(e){let t=e.parentElement;for(;t&&t!==document.body;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`||e===`hidden`)return t.getBoundingClientRect();t=t.parentElement}return document.documentElement.getBoundingClientRect()},close(){this.open=!1,this.dropUp=!1},clear(){this.disabled||(this.close(),this.$emit(`input`,``),this.$emit(`change`,``))},onDocClick(e){this.$refs.root&&!this.$refs.root.contains(e.target)&&this.close()},onHover(){},onItemClick(e){e.disabled||this.choose(e.key)},choose(e){this.close(),e===this.value||this.$emit(`input`,e),this.$emit(`change`,e)}}},vw=[`disabled`],yw=[`title`],bw=[`width`,`height`],xw={class:`dd__list`},Sw=[`onMousemove`,`onClick`],Cw={class:`dd__item-text`},ww=[`width`,`height`],Tw={key:0,class:`dd__empty`};function Ew(e,t,n,r,i,a){return z(),B(`div`,{ref:`root`,class:k([`dd`,[`dd--`+n.size,{"dd--open":i.open,"dd--block":n.block,"dd--disabled":n.disabled,"dd--borderless":n.borderless,"dd--dropup":i.dropUp}]]),style:O(a.rootStyle)},[a.hasTriggerSlot?(z(),B(`div`,{key:1,class:`dd__trigger dd__trigger--slot`,onClick:t[2]||=(...e)=>a.toggle&&a.toggle(...e)},[Xr(e.$slots,`trigger`,{open:i.open,toggle:a.toggle})])):(z(),B(`button`,{key:0,type:`button`,class:k([`dd__trigger`,{"dd__trigger--active":i.open}]),disabled:n.disabled,onClick:t[1]||=(...e)=>a.toggle&&a.toggle(...e)},[H(`span`,{class:`dd__label`,title:a.displayText},A(a.displayText),9,yw),n.clearable&&a.hasValue?(z(),B(`span`,{key:0,class:`dd__clear`,role:`button`,tabindex:`-1`,title:`清空`,onClick:t[0]||=q((...e)=>a.clear&&a.clear(...e),[`stop`])},`✕`)):G(``,!0),(z(),B(`svg`,{class:`dd__chev`,viewBox:`0 0 16 16`,width:a.chevSize,height:a.chevSize,"aria-hidden":`true`},[...t[3]||=[H(`use`,{href:`#icon-chevron`},null,-1)]],8,bw))],10,vw)),U(_o,{name:`dd-fade`},{default:P(()=>[i.open?(z(),B(`div`,{key:0,ref:`pop`,class:k([`dd__pop`,[`dd__pop--`+n.placement]])},[Xr(e.$slots,`default`,{close:a.close,choose:a.choose},()=>[H(`ul`,xw,[(z(!0),B(R,null,L(n.options,e=>(z(),B(`li`,{key:e.key,class:k([`dd__item`,{"dd__item--selected":e.key===n.value,"dd__item--disabled":e.disabled}]),onMousemove:t=>a.onHover(e),onClick:t=>a.onItemClick(e)},[H(`span`,Cw,A(e.value),1),e.key===n.value?(z(),B(`svg`,{key:0,class:`dd__check`,viewBox:`0 0 16 16`,width:a.checkSize,height:a.checkSize,"aria-hidden":`true`},[...t[4]||=[H(`use`,{href:`#icon-check`},null,-1)]],8,ww)):G(``,!0)],42,Sw))),128)),n.options.length?G(``,!0):(z(),B(`li`,Tw,A(n.placeholder||`无选项`),1))])])],2)):G(``,!0)]),_:3})],6)}var Dw=Z(_w,[[`render`,Ew]]),Ow=[{key:`cover`,desc:`cover:保持纵横比,缩放到完全覆盖背景定位区域的最小尺寸`},{key:`contain`,desc:`contain:保持纵横比,缩放到能放进背景定位区域的最大尺寸`}],kw={name:`SetBgSize`,components:{SetNumberStyle:$C,Dropdown:Dw},computed:{bgOptions(){return[{key:``,value:`自定义`}].concat(this.TYPES.map(e=>({key:e.key,value:e.key})))}},props:nx,emits:rx,data(){return{TYPES:Ow,preset:``,x:``,y:``}},watch:{value:{immediate:!0,handler(){this.parse()}}},methods:{parse(){let e=String(this.value||``),t=Ow.map(e=>e.key);this.preset=t.includes(e)?e:``;let n=e.split(/\s+/);n.length>=2?(this.x=n[0]||``,this.y=n[1]||``):(this.x=``,this.y=``)},pickPreset(e){this.preset=e,e||(this.x=`auto`,this.y=`auto`),this.emitValue(),this.$emit(`change`)},setX(e){this.x=e,this.emitValue()},setY(e){this.y=e,this.emitValue()},emitValue(){let e=this.preset?this.preset:`${this.x||`auto`} ${this.y||`auto`}`;this.$emit(`input`,e)},emitOut(){this.$emit(`change`)}}},Aw={class:`st-bgsize`},jw={key:0,class:`st-bgsize__xy`};function Mw(e,t,n,r,i,a){let o=I(`Dropdown`),s=I(`SetNumberStyle`);return z(),B(`div`,Aw,[U(o,{value:i.preset,options:a.bgOptions,size:`sm`,block:``,disabled:e.disabled,onInput:t[0]||=e=>a.pickPreset(e)},null,8,[`value`,`options`,`disabled`]),i.preset?G(``,!0):(z(),B(`div`,jw,[U(s,{value:i.x,options:{placeholder:`宽`},disabled:e.disabled,onInput:a.setX,onChange:a.emitOut},null,8,[`value`,`disabled`,`onInput`,`onChange`]),U(s,{value:i.y,options:{placeholder:`高`},disabled:e.disabled,onInput:a.setY,onChange:a.emitOut},null,8,[`value`,`disabled`,`onInput`,`onChange`])]))])}var Nw=Z(kw,[[`render`,Mw]]),Pw=[{key:`to bottom`,desc:`从上到下`},{key:`to top`,desc:`从下到上`},{key:`to left`,desc:`从右到左`},{key:`to right`,desc:`从左到右`},{key:`to bottom right`,desc:`从左上到右下`},{key:`to bottom left`,desc:`从右上到左下`},{key:`to top left`,desc:`从右下到左上`},{key:`to top right`,desc:`从左下到右上`}];function Fw(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i];a===`(`?n++:a===`)`?n--:a===`,`&&n===0&&(t.push(e.slice(r,i).trim()),r=i+1)}return t.push(e.slice(r).trim()),t.filter(e=>e!==``)}var Iw={name:`SetGradient`,components:{SetColor:wC,Dropdown:Dw},props:nx,emits:rx,data(){return{DIRECTIONS:Pw,direction:`to bottom`,stops:[]}},computed:{preview(){if(!this.stops.length)return`transparent`;let e=this.stops.map(e=>e.color).filter(Boolean);return e.length<2?e[0]||`transparent`:`linear-gradient(${this.direction}, ${e.join(`, `)})`}},watch:{value:{immediate:!0,handler(){this.parse()}}},methods:{parse(){let e=String(this.value||``).trim().match(/linear-gradient\((.+)\)$/);if(!e){this.direction=this.options.defaultDirection||Pw[0].key,this.stops=[];return}let t=Fw(e[1]);this.direction=(t[0]||``).toLowerCase()||Pw[0].key,this.stops=t.slice(1).map(e=>({color:e}))},setDirection(e){this.direction=e,this.emitValue(),this.$emit(`change`)},setStop(e,t){this.stops[e].color=t,this.emitValue()},addStop(){this.disabled||(this.stops.push({color:`#ffffff`}),this.emitValue(),this.$emit(`change`))},removeStop(e){this.disabled||(this.stops.splice(e,1),this.emitValue(),this.$emit(`change`))},emitValue(){let e=this.stops.map(e=>e.color).filter(e=>e!==``&&e!==void 0);this.$emit(`input`,e.length?`linear-gradient(${this.direction}, ${e.join(`, `)})`:``)},emitOut(){this.$emit(`change`)}}},Lw={class:`st-gradient`},Rw=[`onClick`],zw=[`disabled`];function Bw(e,t,n,r,i,a){let o=I(`Dropdown`),s=I(`SetColor`);return z(),B(`div`,Lw,[H(`div`,{class:`st-gradient__preview`,style:O({background:a.preview})},null,4),U(o,{value:i.direction,options:i.DIRECTIONS.map(e=>({key:e.key,value:e.desc})),size:`sm`,block:``,disabled:e.disabled,onInput:t[0]||=e=>a.setDirection(e)},null,8,[`value`,`options`,`disabled`]),(z(!0),B(R,null,L(i.stops,(t,n)=>(z(),B(`div`,{key:`stop`+n,class:`st-gradient__stop`},[U(s,{value:t.color,disabled:e.disabled,onInput:e=>a.setStop(n,e),onChange:a.emitOut},null,8,[`value`,`disabled`,`onInput`,`onChange`]),H(`button`,{class:`st-gradient__del`,type:`button`,title:`删除该渐变色`,onClick:e=>a.removeStop(n)},`✕`,8,Rw)]))),128)),H(`button`,{class:`st-minibtn`,type:`button`,disabled:e.disabled,onClick:t[1]||=(...e)=>a.addStop&&a.addStop(...e)},`+ 新增渐变色`,8,zw)])}var Vw=Z(Iw,[[`render`,Bw]]),Hw=new Set([`width`,`height`,`lineHeight`,`marginRight`,`cursor`,`textAlign`]),Uw={name:`SetCustomSelect`,props:nx,emits:[...rx,`sync`],computed:{list(){return this.options.list||[]}},methods:{normalizeStyle(e){if(!e||typeof e!=`object`)return{};let t={};for(let n in e)Hw.has(n)||(t[n]=e[n]);return t},apply(e){if(this.disabled)return;let t=e.sync||{};Object.keys(t).length&&this.$emit(`sync`,t)}}},Ww={class:`st-customsel`},Gw=[`title`,`onClick`],Kw={key:0},qw={key:0,class:`st-list__empty`};function Jw(e,t,n,r,i,a){return z(),B(`div`,Ww,[(z(!0),B(R,null,L(a.list,(e,t)=>(z(),B(`div`,{key:t,class:`st-customsel__item`,style:O(a.normalizeStyle(e.style)),title:`应用:`+Object.keys(e.sync||{}).join(`、`),onClick:t=>a.apply(e)},[(z(!0),B(R,null,L(e.list||[],(e,t)=>(z(),B(`span`,{key:t,style:O(a.normalizeStyle(e.style))},A(e.innerText),5))),128)),(e.list||[]).length?G(``,!0):(z(),B(`span`,Kw,A(e.innerText||`样式`+(t+1)),1))],12,Gw))),128)),a.list.length?G(``,!0):(z(),B(`p`,qw,`未配置常用样式`))])}var Yw=Z(Uw,[[`render`,Jw]]),Xw={name:`SetList`,props:nx,emits:rx,computed:{list(){let e=this.itemInfo;return e&&e.itemList||[]},addText(){return this.options&&this.options.btnText||`添加项`}},methods:{displayName(e){let t=e.itemName||e.itemKey||``;return{fontStyle:`字体风格`,textDecoration:`文字装饰`}[e.itemKey]||t},add(){if(this.disabled)return;let e=this.itemInfo,t=this.list[0],n;n=t?new sc(t.properties.map(e=>({itemId:e.itemId,itemKey:e.itemKey,itemName:e.itemName,itemType:e.itemType,itemOption:e.itemOption,itemParam:e.itemParam,itemDefaultValue:e.itemDefaultValue,itemDesc:e.itemDesc,itemTypeRange:e.itemTypeRange,itemValueFrom:`0`,itemValue:``})),{}):new sc((this.options&&this.options.iFieldList||[]).map(e=>({itemId:e.key,itemKey:e.key,itemName:e.value||e.key,itemType:`Input`,itemValueFrom:`0`,itemValue:``})),{}),e.itemList.push(n),this.$emit(`change`)},remove(e){this.disabled||(this.itemInfo.removeAt(e),this.$emit(`change`))},move(e,t){this.disabled||(this.itemInfo.moveItem(e,e+t),this.$emit(`change`))}}},Zw={class:`st-list`},Qw={class:`st-list__head`},$w={class:`st-list__idx`},eT=[`disabled`,`onClick`],tT=[`disabled`,`onClick`],nT=[`disabled`,`onClick`],rT={class:`st-list__body`},iT=[`title`],aT={class:`st-list__control`},oT={key:0,class:`st-list__empty`},sT={key:0,class:`st-list__empty`},cT=[`disabled`];function lT(e,t,n,r,i,a){let o=I(`prop-control`);return z(),B(`div`,Zw,[(z(!0),B(R,null,L(a.list,(n,r)=>(z(),B(`div`,{key:n.id,class:`st-list__item`},[H(`div`,Qw,[H(`span`,$w,`#`+A(r+1),1),t[4]||=H(`span`,{class:`st-list__head-spacer`},null,-1),H(`button`,{class:`st-list__op`,type:`button`,title:`上移`,disabled:e.disabled||r===0,onClick:e=>a.move(r,-1)},`↑`,8,eT),H(`button`,{class:`st-list__op`,type:`button`,title:`下移`,disabled:e.disabled||r===a.list.length-1,onClick:e=>a.move(r,1)},`↓`,8,tT),H(`button`,{class:`st-list__op st-list__op--del`,type:`button`,title:`删除`,disabled:e.disabled,onClick:e=>a.remove(r)},[...t[3]||=[H(`svg`,{viewBox:`0 0 16 16`,class:`st-ic`,"aria-hidden":`true`},[H(`use`,{href:`#icon-delete`})],-1)]],8,nT)]),H(`div`,rT,[(z(!0),B(R,null,L(n.properties,n=>F((z(),B(`div`,{key:n.itemId,class:`st-list__row`},[H(`label`,{class:`st-list__label`,title:n.itemDesc||a.displayName(n)},A(a.displayName(n)),9,iT),H(`div`,aT,[U(o,{property:n,disabled:e.disabled,onChange:t[0]||=t=>e.$emit(`change`),onSync:t[1]||=t=>e.$emit(`sync`,t)},null,8,[`property`,`disabled`])])])),[[Fo,n.itemVisible]])),128)),n.properties.length?G(``,!0):(z(),B(`p`,oT,`该项无字段`))])]))),128)),a.list.length?G(``,!0):(z(),B(`p`,sT,`暂无项`)),H(`button`,{class:`st-minibtn st-list__add`,type:`button`,disabled:e.disabled,onClick:t[2]||=(...e)=>a.add&&a.add(...e)},A(a.addText),9,cT)])}var uT=Z(Xw,[[`render`,lT]]),dT={name:`SetImage`,props:nx,emits:rx,methods:{clear(){this.disabled||(this.$emit(`input`,``),this.$emit(`change`))}}},fT={class:`st-image`},pT={class:`st-image__row`},mT=[`disabled`,`value`],hT=[`disabled`];function gT(e,t,n,r,i,a){return z(),B(`div`,fT,[H(`div`,pT,[H(`input`,{class:`ni-input`,type:`text`,disabled:e.disabled,value:e.value||``,placeholder:`图片路径,如 @filestore/...png 或 https://...`,onInput:t[0]||=t=>e.$emit(`input`,t.target.value),onChange:t[1]||=t=>e.$emit(`change`)},null,40,mT),e.value?(z(),B(`button`,{key:0,class:`st-image__clear`,type:`button`,title:`清空`,disabled:e.disabled,onClick:t[2]||=(...e)=>a.clear&&a.clear(...e)},[...t[3]||=[H(`svg`,{viewBox:`0 0 16 16`,class:`st-ic`,"aria-hidden":`true`},[H(`use`,{href:`#icon-reset`})],-1)]],8,hT)):G(``,!0)])])}var _T=Z(dT,[[`render`,gT]]),vT={name:`SetCode`,props:nx,emits:rx,data(){return{code:``,bridge:null}},computed:{codeKey(){return this.options.codeKey||`code`},lines(){return this.code?this.code.split(`
|
|
80
|
+
`).length:0},chars(){return this.code.length}},mounted(){this.code=this.readCode(),this.$nextTick(()=>this.initJar())},beforeUnmount(){this._t&&clearTimeout(this._t),this.teardownBridge(!0),this._jar&&this._jar.destroy&&this._jar.destroy()},methods:{readCode(){let e=this.value;return e==null?``:typeof e==`string`?e:String(typeof e==`object`?e[this.codeKey]||``:e)},initJar(){let e=this.$refs.editor;if(!e)return;let t=e=>{e.innerHTML=lm.default.highlight(e.textContent,lm.default.languages.javascript,`javascript`)};this._jar=cm(e,t,{tab:` `,indentOn:/[({[]$/,addClosing:!0,history:!0}),this._jar.updateCode(this.code),this._jar.onUpdate(e=>this.onCode(e))},onCode(e){if(this.disabled||this.bridge)return;this.code=e;let t=this.value&&typeof this.value==`object`?Object.assign({},this.value):{};t[this.codeKey]=e,this.$emit(`input`,t),this._t&&clearTimeout(this._t),this._t=setTimeout(()=>this.$emit(`change`),400)},toggleBridge(){this.bridge?this.teardownBridge(!0):this.setupBridge()},async setupBridge(){if(this.disabled||this.bridge)return;let e=this.itemInfo&&this.itemInfo.itemKey?String(this.itemInfo.itemKey):``;try{let t=await Vs(this.code,e);this.bridge={id:t.id,file:t.file}}catch(e){console.error(`[VSCode 桥接建立失败]`,e);return}this.setEditorEditable(!1),this._hb=setInterval(()=>{this.bridge&&Us(this.bridge.id).catch(()=>{})},5e3),this._bridgeUnsub=Rs(e=>{if(!(!this.bridge||!e||e.id!==this.bridge.id)){if(e.reason)return this.teardownBridge(!1);this.pullBridgeCode()}})},async pullBridgeCode(){if(!this.bridge)return;let e;try{e=await Hs(this.bridge.id)}catch{return}let t=String(e.code==null?``:e.code);t!==this.code&&this.applyExternalCode(t)},applyExternalCode(e){this.code=e,this._jar&&this._jar.updateCode(e,!1);let t=this.value&&typeof this.value==`object`?Object.assign({},this.value):{};t[this.codeKey]=e,this.$emit(`input`,t),this._t&&clearTimeout(this._t),this._t=setTimeout(()=>this.$emit(`change`),400)},teardownBridge(e){let t=this.bridge;this.bridge=null,this._hb&&=(clearInterval(this._hb),null),this._bridgeUnsub&&=(this._bridgeUnsub(),null),this.setEditorEditable(!0),t&&e&&Ws(t.id).catch(()=>{})},setEditorEditable(e){let t=this.$refs.editor;t&&t.setAttribute(`contenteditable`,e?`true`:`false`)}}},yT={class:`st-code`},bT={class:`st-code__foot`},xT={class:`st-code__hint`},ST={class:`st-code__foot-actions`},CT=[`title`],wT=[`title`,`disabled`],TT={key:0,class:`st-code__vscode-label`};function ET(e,t,n,r,i,a){return z(),B(`div`,yT,[H(`div`,{ref:`editor`,class:k([`st-code__editor`,{"is-disabled":e.disabled,"is-bridged":!!i.bridge}])},null,2),t[2]||=H(`span`,{class:`st-code__lang`,"aria-hidden":`true`},`JS`,-1),H(`div`,bT,[H(`span`,xT,A(a.lines)+` 行 · `+A(a.chars)+` 字符`,1),H(`span`,ST,[i.bridge?(z(),B(`span`,{key:0,class:`st-code__bridge-tag`,title:i.bridge.file},`VSCode 同步中`,8,CT)):G(``,!0),H(`button`,{type:`button`,class:k([`st-code__vscode`,{"is-on":!!i.bridge}]),title:i.bridge?`断开 VSCode 桥接并删除临时文件`:`在 VSCode 中编辑:保存实时同步回编辑区,断开后清除临时文件`,disabled:e.disabled,onClick:t[0]||=(...e)=>a.toggleBridge&&a.toggleBridge(...e)},[i.bridge?G(``,!0):(z(),B(`span`,TT,`在编辑器中打开`)),t[1]||=H(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,"aria-hidden":`true`},[H(`path`,{fill:`currentColor`,d:`M23.15 2.587 18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z`})],-1)],10,wT)])])])}var DT=Z(vT,[[`render`,ET]]),OT={0:`常量`,1:`变量`,2:`图片`},kT={const:`0`,var:`1`,image:`2`};function AT(e){switch(e){case`InputNumber`:return{comp:yx};case`Color`:return{comp:wC};case`Select`:return{comp:Sx};case`TabSelect`:return{comp:Ix,kind:`TabSelect`};case`Input`:return{comp:cx};case`Textarea`:return{comp:cx,multiline:!0};case`Switcher`:return{comp:Bx};case`BooleanForm`:return{comp:Bx,boolean:!0};case`PaddingStyle`:return{comp:rw};case`NumberStyle`:return{comp:$C};case`PositionStyle`:return{comp:uw,kind:`PositionStyle`};case`BackgroundPositionStyle`:return{comp:gw};case`BackgroundSizeStyle`:return{comp:Nw};case`GradientStyle`:return{comp:Vw};case`FontStyle`:return{comp:Ix,kind:`FontStyle`};case`TextDecorationStyle`:return{comp:Ix,kind:`TextDecorationStyle`};case`JustifyContentStyle`:return{comp:Ix,kind:`JustifyContentStyle`};case`AlignItemsStyle`:return{comp:Ix,kind:`AlignItemsStyle`};case`IconSelect`:return{comp:FC};case`CustomSelect`:return{comp:Yw};case`List`:return{comp:uT};case`IfForm`:return{comp:KC};case`Code`:return{comp:DT};default:return{comp:cx}}}var jT={name:`PropControl`,components:{SetText:cx,SetNumber:yx,SetSelect:Sx,SetSegment:Ix,SetSwitch:Bx,SetColor:wC,SetIconSelect:FC,SetIfForm:KC,SetNumberStyle:$C,SetPadding:rw,SetGrid9:uw,SetBgPosition:gw,SetBgSize:Nw,SetGradient:Vw,SetCustomSelect:Yw,SetList:uT,SetImage:_T,SetCode:DT,SetExpr:VC},props:{property:{type:Object,required:!0},watches:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},bExchange:{type:Boolean,default:!0}},emits:[`change`,`sync`],computed:{itemType(){return this.property&&this.property.itemType||``},sources(){let e=this.property&&this.property.itemTypeRange||`const`,t=String(e).split(`,`).map(e=>e.trim()).filter(Boolean).map(e=>({key:kT[e],label:OT[kT[e]]})).filter(e=>e.key),n=String(this.property.itemValueFrom);return/^[012]$/.test(n)&&!t.some(e=>e.key===n)&&(t=t.concat([{key:n,label:OT[n]||`来源`+n}])),t},setterComp(){return AT(this.itemType)}},methods:{onInput(e){this.property.itemValue=e,this.$emit(`change`)},onChange(){this.$emit(`change`)},onSync(e){this.$emit(`sync`,e)},setSource(e){if(this.disabled)return;let t=this.property,n=String(e);t.itemValueFrom!==n&&(t._valuesByFrom||={0:void 0,1:void 0,2:void 0},t._valuesByFrom[t.itemValueFrom]=t.itemValue,t.itemValueFrom=n,t._valuesByFrom[n]===void 0?n===`0`?(t.itemValue=t.itemDefaultValue??this.defaultFor(),t._valuesByFrom[n]=t.itemValue):(t.itemValue=``,t._valuesByFrom[n]=``):t.itemValue=t._valuesByFrom[n],this.$emit(`change`))},defaultFor(){switch(this.itemType){case`Color`:return`#000000`;case`InputNumber`:return 0;case`Switcher`:return`0`;case`BooleanForm`:return!1;case`TabSelect`:case`Select`:{let e=this.property.itemOption||{},t=e.iParamList||e.iTypeList||[];return t.length?t[0].key:``}default:return``}}}},MT={key:0,class:`pc-srcs`},NT=[`disabled`,`onClick`],PT={class:`pc-body`};function FT(e,t,n,r,i,a){let o=I(`SetImage`),s=I(`SetExpr`);return z(),B(`div`,{class:k([`pc`,{"pc--readonly":n.disabled}])},[a.sources.length>1&&n.bExchange?(z(),B(`div`,MT,[(z(!0),B(R,null,L(a.sources,e=>(z(),B(`button`,{key:e.key,type:`button`,class:k([`pc-src`,{"is-active":n.property.itemValueFrom===e.key}]),disabled:n.disabled,onClick:t=>a.setSource(e.key)},A(e.label),11,NT))),128))])):G(``,!0),H(`div`,PT,[n.property.itemValueFrom===`2`?(z(),V(o,{key:0,value:n.property.itemValue,options:n.property.itemOption,"item-info":n.property,disabled:n.disabled,onInput:a.onInput,onChange:a.onChange},null,8,[`value`,`options`,`item-info`,`disabled`,`onInput`,`onChange`])):n.property.itemValueFrom===`1`?(z(),V(s,{key:1,value:n.property.itemValue,disabled:n.disabled,"item-info":n.property,onInput:a.onInput,onChange:a.onChange},null,8,[`value`,`disabled`,`item-info`,`onInput`,`onChange`])):(z(),V(qr(a.setterComp.comp),{key:2,value:n.property.itemValue,options:n.property.itemOption,watches:n.watches,"item-info":n.property,disabled:n.disabled,kind:a.setterComp.kind,multiline:a.setterComp.multiline,boolean:a.setterComp.boolean,onInput:a.onInput,onChange:a.onChange,onSync:a.onSync},null,40,[`value`,`options`,`watches`,`item-info`,`disabled`,`kind`,`multiline`,`boolean`,`onInput`,`onChange`,`onSync`]))])],2)}var IT=Z(jT,[[`render`,FT],[`__scopeId`,`data-v-c0ff0a96`]]),LT={name:`PropTree`,props:{properties:{type:Array,default:()=>[]},mode:{type:String,default:`property`},depth:{type:Number,default:1},chain:{type:Array,default:()=>[]},watches:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},bExchange:{type:Boolean,default:!0},plain:{type:Boolean,default:!1}},emits:[`leaf-change`,`leaf-sync`],data(){return{openMap:{}}},methods:{isGroup(e){if(!e)return!1;if(e.itemType===`group`)return!0;let t=e.itemChildren&&e.itemChildren.properties;return!!(t&&t.length)},childCount(e){let t=e.itemChildren&&e.itemChildren.properties;return t?t.length:0},isBlock(e){return e&&e.itemType===`Code`},groupVisible(e){if(e.itemVisible===!1)return!1;let t=e.itemChildren&&e.itemChildren.properties;return!t||!t.length||t.some(e=>e.itemVisible===!1?!1:!this.isGroup(e)||this.groupVisible(e))},isOpen(e){return this.openMap[e.itemId]!==!1},toggle(e){this.openMap[e.itemId]=this.openMap[e.itemId]===!1,this.openMap=Object.assign({},this.openMap)},onLeaf(e){this.$emit(`leaf-change`,this.chain.concat(e))},onSync(e){this.$emit(`leaf-sync`,e)}}},RT={key:0,class:`ptree__group`},zT=[`onClick`],BT={class:`ptree__group-name`},VT={class:`ptree__group-body`},HT=[`title`],UT={class:`ptree__control`};function WT(e,t,n,r,i,a){let o=I(`prop-tree`,!0),s=I(`prop-control`);return z(),B(`div`,{class:k([`ptree`,{"ptree--plain":n.plain}])},[(z(!0),B(R,null,L(n.properties,r=>(z(),B(R,{key:r.itemId},[a.isGroup(r)&&a.groupVisible(r)?(z(),B(`div`,RT,[H(`div`,{class:`ptree__group-head`,type:`button`,onClick:e=>a.toggle(r)},[H(`span`,{class:k([`ptree__caret`,{"is-open":a.isOpen(r)}])},`▸`,2),H(`span`,BT,A(r.itemName||r.itemKey),1)],8,zT),F(H(`div`,VT,[r.itemChildren&&r.itemChildren.properties.length?(z(),V(o,{key:0,properties:r.itemChildren.properties,mode:n.mode,depth:n.depth+1,chain:n.chain.concat(r),watches:n.watches,disabled:n.disabled,"b-exchange":n.bExchange,plain:n.plain,onLeafChange:t[0]||=t=>e.$emit(`leaf-change`,t),onLeafSync:t[1]||=t=>e.$emit(`leaf-sync`,t)},null,8,[`properties`,`mode`,`depth`,`chain`,`watches`,`disabled`,`b-exchange`,`plain`])):G(``,!0)],512),[[Fo,a.isOpen(r)]])])):r.itemVisible===!1?G(``,!0):(z(),B(`div`,{key:1,class:k([`ptree__row`,{"ptree__row--disabled":n.disabled,"ptree__row--block":a.isBlock(r)}])},[H(`label`,{class:`ptree__label`,title:r.itemDesc||r.itemName||r.itemKey},A(r.itemName||r.itemKey||r.itemType||`字段`),9,HT),H(`div`,UT,[U(s,{property:r,watches:n.watches,disabled:n.disabled,"b-exchange":n.bExchange,onChange:e=>a.onLeaf(r),onSync:a.onSync},null,8,[`property`,`watches`,`disabled`,`b-exchange`,`onChange`,`onSync`])])],2))],64))),128))],2)}var GT=Z(LT,[[`render`,WT]]),KT=Cs(tx);KT.component(`prop-control`,IT),KT.component(`prop-tree`,GT),KT.component(`Dropdown`,Dw),KT.config.errorHandler=(e,t,n)=>{console.error(`[render error]`,n,e),window.__cardDebug&&window.__cardDebug.pushError(`render`,`${n}: ${e.message}`)},KT.mount(`#app`);
|