@vtj/pro 0.7.3 → 0.7.4

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.
@@ -33,13 +33,13 @@ version: 2.9.0
33
33
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
34
34
  * @name @vtj/icons
35
35
  * @author CHC chenhuachun1549@dingtalk.com
36
- * @version 0.7.2
36
+ * @version 0.7.4
37
37
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
38
38
  */const C2=J({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M298.666667 298.666667V85.333333h85.333333v298.666667H85.333333V298.666667h213.333334z m426.666666-213.333334v213.333334h213.333334v85.333333h-298.666667V85.333333h85.333333zM298.666667 938.666667v-213.333334H85.333333v-85.333333h298.666667v298.666667H298.666667z m426.666666 0h-85.333333v-298.666667h298.666667v85.333333h-213.333334v213.333334z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),I2=J({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M374.442667 486.229333l-81.237334 101.034667c-2.218667 4.352-2.218667 6.570667 0 8.789333 0 2.218667 2.218667 4.352 6.570667 4.352H719.36c4.352 0 6.570667-2.133333 6.570667-4.352 0-2.218667 2.218667-4.437333 0-8.789333l-81.237334-101.034667H374.442667z m362.922666 179.2H281.770667a66.56 66.56 0 0 1-57.173334-35.754666 67.242667 67.242667 0 0 1 7.082667-66.730667l104.96-128.853333h345.856l104.96 128.853333c14.250667 19.029333 19.029333 45.226667 7.168 66.730667a66.56 66.56 0 0 1-57.258667 35.84zM380.16 178.773333H639.146667L680.362667 76.544c2.218667-4.266667 0-6.485333 0-6.485333 0-2.218667-2.133333-4.352-6.485334-4.352H347.562667c-4.352 0-6.570667 2.133333-6.570667 4.266666 0 2.218667-2.133333 4.437333 0 6.570667l39.253333 102.229333z m307.114667 62.122667H331.861333l-57.173333-145.493333a61.269333 61.269333 0 0 1 7.082667-57.173334 63.317333 63.317333 0 0 1 52.48-26.282666h355.413333c21.418667 0 40.533333 9.557333 52.48 26.197333 11.946667 16.725333 14.250667 38.229333 7.082667 57.258667l-61.952 145.493333z",color:"#FFFFFF"},{path:"M386.901333 426.922667h245.248V245.76H386.901333v181.162667z m309.930667 59.733333H322.304V186.026667h372.053333v300.544h2.474667zM510.72 992.256c-19.029333-16.725333-28.586667-40.618667-30.976-66.816L458.24 636.842667h107.349333l-21.418666 288.597333a127.146667 127.146667 0 0 1-33.450667 66.816",color:"#FFFFFF"},{path:"M19.2 905.557333m52.48 0l878.08 0q52.48 0 52.48 52.48l0 0.085334q0 52.48-52.48 52.48l-878.08 0q-52.48 0-52.48-52.48l0-0.085334q0-52.48 52.48-52.48Z",color:"#FFFFFF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),R2=J({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M170.666667 170.666667v213.333333H85.333333V85.333333h298.666667v85.333334H170.666667z m682.666666 213.333333V170.666667h-213.333333V85.333333h298.666667v298.666667h-85.333334zM170.666667 640v213.333333h213.333333v85.333334H85.333333v-298.666667h85.333334z m682.666666 0h85.333334v298.666667h-298.666667v-85.333334h213.333333v-213.333333z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),M2=J({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M891.0336 113.7664a32 32 0 0 1 0 45.2352l-104.6016 104.6016a380.1088 380.1088 0 0 1 81.408 65.024l4.5312 4.7104c2.6112 2.6368 5.4272 5.3504 8.704 8.3968l11.6224 10.4192 30.6176 26.624 12.9792 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 47.488-26.7776 79.744-100.3776 142.848l-17.8432 15.4368a471.04 471.04 0 0 0-15.5392 14.1312l-4.7104 4.6592-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-86.784 0-169.5744-18.9696-239.1808-53.3504l-135.5264 135.5008a32 32 0 1 1-45.2352-45.2352l123.8784-123.904a364.9536 364.9536 0 0 1-63.4368-56.192l-1.8176-2.048a249.0112 249.0112 0 0 0-21.4016-20.1728l-12.6976-10.7776-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-38.7072 19.3792-66.5088 70.8096-111.7952l12.4416-10.7776 27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936c-6.656 7.4752-13.2352 14.0032-22.9888 22.6816l-9.216 8.0384-42.8544 36.1728c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 17.4336 14.5152c17.8176 14.8224 28.416 24.0128 36.9664 32.5376l4.9664 5.0944 11.3408 12.3648a315.8272 315.8272 0 0 0 55.168 45.568l89.7536-89.8304a30.0544 30.0544 0 0 1 10.1632-10.1632l217.4976-217.472a146.4064 146.4064 0 0 0-200.1152 70.7328 146.4832 146.4832 0 0 0-12.288 69.632 30.0544 30.0544 0 0 1-60.0064 4.224 206.7712 206.7712 0 0 1 17.408-98.304c46.2592-103.936 168.448-150.8608 272.4096-104.576 9.3696 4.1728 18.2528 8.96 26.6496 14.2592l56.5248-56.5504c-50.5088-17.7408-106.88-27.3664-165.2736-27.3664-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664 75.3152 0 148.0704 14.4896 211.712 41.0368l119.552-119.5008a32 32 0 0 1 45.2352 0z m-148.5568 193.792l-71.0656 71.0912a206.592 206.592 0 0 1 29.824 215.808c-46.2848 103.9616-168.4992 150.8608-272.4608 104.576a205.7216 205.7216 0 0 1-48-29.7472l-60.1088 60.0832 10.112 4.2496c51.968 20.9664 110.7968 32.7168 170.88 34.2016l12.8768 0.1536c124.928 0 240.7168-44.1088 309.504-117.4272l6.656-6.8864c3.1744-3.1744 6.5536-6.4 10.4704-9.984l8.6528-7.7824 44.6976-38.8352c17.5872-15.6928 29.568-27.776 38.8864-39.68 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936c-11.1104-9.728-18.4832-16.4608-25.0112-22.9376l-13.312-13.7472a332.9792 332.9792 0 0 0-75.3408-55.808z m-113.8432 113.8688l-205.056 205.0816a146.4064 146.4064 0 0 0 222.72-56.5248 146.3552 146.3552 0 0 0-17.664-148.5568z",color:"#CCCCCC"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),N2=J({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M648 160H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8z m272.8 546H856V318h64.8c6 0 9.4-7 5.7-11.7L825.7 178.7c-2.9-3.7-8.5-3.7-11.3 0L713.6 306.3c-3.7 4.7-0.4 11.7 5.7 11.7H784v388h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.8-4.7 0.4-11.7-5.6-11.7z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),gh=J({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M926.45937303 97.54062697v828.2973677H97.54062697V97.54062697h828.91874606m4.97102697-77.6722963h-838.8608c-39.7682157 0-72.07989097 32.31167525-72.07989097 72.07989096v839.48217837c0 39.7682157 32.31167525 72.07989097 72.07989097 72.07989097h839.48217837c39.7682157 0 72.07989097-32.31167525 72.07989096-72.07989097v-838.8608c0-40.38959408-32.31167525-72.70126933-72.70126933-72.70126933 0.62137837 0 0 0 0 0z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),yh=J({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M65.23884 456.152041 958.760137 456.152041l0 111.695918L65.23884 567.847959 65.23884 456.152041z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),bh=J({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M959.72 0H294.216a63.96 63.96 0 0 0-63.96 63.96v127.92H64.28A63.96 63.96 0 0 0 0.32 255.84V959.4a63.96 63.96 0 0 0 63.96 63.96h703.56a63.96 63.96 0 0 0 63.96-63.96V792.465h127.92a63.96 63.96 0 0 0 63.96-63.96V63.96A63.96 63.96 0 0 0 959.72 0zM767.84 728.505V959.4H64.28V255.84h703.56z m189.322 0H831.8V255.84a63.96 63.96 0 0 0-63.96-63.96H294.216V63.96H959.72z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),P2=J({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M1024 866.459826V1024h-78.781217v-157.540174H1024z m-157.540174 0V1024H801.391304l-13.712695-13.712696v-143.827478h78.781217z m-78.758956-315.080348v157.540174h157.517913V551.401739H1024v236.321391H708.919652v-78.781217h-78.758956l-0.022261 143.805217-78.758957-78.758956v-222.586435h236.321392z m-315.080348 0l-0.022261 143.805218-143.782957-143.805218h143.805218zM1024 0v472.598261H551.379478V0H1024zM472.598261 0v472.598261h-222.564174l-78.758957-78.758957h222.564174V78.758957H78.758957v222.541913L0 222.564174V0h472.598261z m472.620522 78.758957H630.160696v315.080347H945.196522V78.758957zM315.080348 157.540174v157.540174H157.540174V157.540174h157.540174z m551.379478 0v157.540174h-157.540174V157.540174h157.540174z",color:"#26B8CF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),wh=J({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M512 432.46249999L865.92499999 78.49999973a56.13749998 56.13749998 0 0 1 79.53750003-5e-8 56.17500029 56.17500029 0 0 1 0 79.53750002L591.49999971 512l353.925 353.92499999c21.97500029 21.97500029 22.12499972 57.4125003 0 79.53750003a56.17500029 56.17500029 0 0 1-79.53750004 0L512 591.49999971 158.07500001 945.50000027a56.13749998 56.13749998 0 0 1-79.53750003 5e-8 56.17500029 56.17500029 0 0 1 0-79.53750002L432.50000029 512 78.49999973 158.07500001a56.13749998 56.13749998 0 0 1-5e-8-79.53750003 56.17500029 56.17500029 0 0 1 79.53750002 0L512 432.50000029z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),z2=J({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M800.421 436.525h-63.661v-148.673c0-124.507-100.762-225.757-224.732-225.757-123.98 0-224.857 101.25-224.857 225.766v148.662h-63.593c-30.667 0-55.532 24.952-55.532 55.752v407.048c0 30.848 24.865 55.82 55.532 55.82h576.9c30.667 0 55.465-24.97 55.465-55.82v-407.048c0-30.802-24.855-55.752-55.532-55.752zM543.203 706.409v88.88c-0.016 4.026-3.264 7.287-7.282 7.325h-47.733c-4.039-0.022-7.307-3.287-7.334-7.322v-88.882c-22.423-11.518-37.953-34.602-37.953-61.659 0-38.288 30.945-69.425 69.070-69.425 38.183 0 69.138 31.136 69.138 69.415 0.057 27.067-15.473 50.152-37.905 61.659zM650.514 436.525h-276.989v-144.986c0-76.691 62.196-139.146 138.552-139.146 76.366 0 138.447 62.454 138.447 139.146v144.986z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),F2=J({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M796.444 446.009H343.61V320.853c0-86.47 70.542-157.013 157.013-157.013s157.014 70.542 157.014 157.013c0 25.031 20.48 45.511 45.51 45.511s45.512-20.48 45.512-45.51c0-136.534-111.502-248.036-248.036-248.036S252.587 184.32 252.587 320.853V446.01H204.8c-25.031 0-45.511 20.48-45.511 45.511v420.978c0 25.03 20.48 45.51 45.511 45.51h591.644c25.032 0 45.512-20.48 45.512-45.51V491.52c0-25.031-20.48-45.511-45.512-45.511zM537.031 737.28c-2.275 0-4.551 2.276-4.551 4.551v43.236c0 43.235-13.653 50.062-31.858 50.062s-31.858-4.551-31.858-50.062V739.556c0-2.276-2.275-4.552-4.55-4.552-13.654-9.102-22.756-25.03-22.756-45.51 0-31.858 27.306-59.165 59.164-59.165s59.165 25.031 59.165 59.164c2.275 20.48-9.103 36.41-22.756 47.787z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),L2=J({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M915.692308 275.692308h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538462v-59.076923C78.769231 171.323077 92.553846 157.538462 108.307692 157.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538462z m0 293.415384h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-13.784615 13.784615-27.569231 29.538461-27.569231h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076924c0 13.784615-13.784615 27.569231-29.538461 27.56923z m0 297.353846h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-15.753846 13.784615-29.538462 29.538461-29.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538462v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538461z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),H2=J({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M910.74 338.74L756.8 195.33c-11.5-10.71-27.32-16.15-43.59-14.99-1.53-0.12-3.03-0.18-4.48-0.18h-82.01l-5.75 2.98c-30.39 15.75-69.15 24.42-109.16 24.42s-78.78-8.67-109.16-24.42l-5.75-2.98h-82.02c-20.91 0-39.71 10.63-49.43 27.51L113.29 349.43C102.78 359.21 97 372.22 97 386.06c0 13.84 5.78 26.84 16.29 36.63l111.17 103.58c9.31 8.66 21.33 13.87 34.27 14.95v250.3c0 28.84 25.19 52.31 56.14 52.31h393.85c30.96 0 56.14-23.47 56.14-52.31V530.57c13.1-1 25.28-6.23 34.68-14.98l111.18-103.58c21.7-20.19 21.7-53.07 0.02-73.27z m0 0"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),U2=J({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M301.824 455.509333l-168.021333 18.261334c-5.973333 2.048-8.021333 4.010667-8.021334 8.106666-2.048 1.962667-2.048 5.973333 1.962667 10.069334l386.730667 386.730666c4.010667 4.010667 8.021333 4.010667 10.069333 1.962667 2.048-1.962667 6.058667-1.962667 8.106667-8.021333l18.261333-168.106667-249.088-249.002667z m168.106667 467.626667L83.2 536.661333C62.976 516.266667 56.917333 485.802667 65.024 457.472a80.725333 80.725333 0 0 1 62.72-50.602667l198.4-20.224 293.546667 293.546667-20.224 198.4c-4.010667 28.330667-22.272 54.613333-50.602667 62.72-28.330667 8.106667-58.709333 2.048-78.933333-18.176z m93.098666-720.64l240.896 240.896 133.632-56.661333c6.058667-2.048 6.058667-6.058667 6.058667-6.058667 2.048-2.048 2.048-6.144-2.048-10.24L637.952 66.901333C633.856 62.805333 629.76 62.805333 627.797333 64.853333c-2.048 2.048-6.058667 2.048-6.058666 6.144l-58.709334 131.584z m224.682667 317.866667L486.058667 218.709333 560.981333 46.592a73.557333 73.557333 0 0 1 54.613334-42.496 76.032 76.032 0 0 1 66.901333 22.186667l301.653333 301.738666a75.946667 75.946667 0 0 1 22.186667 66.816 73.557333 73.557333 0 0 1-42.496 54.613334l-176.128 70.826666z",color:"#FFFFFF"},{path:"M360.618667 421.12l224.682666 224.682667 165.973334-165.973334L526.592 255.146667 360.618667 421.12z m226.730666 315.818667L269.482667 419.072l255.146666-255.061333 315.733334 315.818666-255.146667 255.146667 2.133333 1.962667z",color:"#FFFFFF"},{path:"M0.256 1008.213333c-2.048-30.378667 10.069333-58.709333 30.293333-83.029333L257.365333 662.016l91.050667 91.136L85.333333 979.882667a152.576 152.576 0 0 1-84.992 28.330666",color:"#FFFFFF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),q2=J({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M943.081739 44.877913a79.09287 79.09287 0 0 1 79.805218 75.620174l0.111304 4.296348v511.510261a79.09287 79.09287 0 0 1-75.620174 79.805217l-4.296348 0.111304H685.612522v100.930783h178.799304v145.229913l-124.660869-0.022261-54.227479-54.227478h124.66087v-36.730435l-161.413565-0.022261-54.227479-54.227478h36.841739v-100.930783h-137.772521l-54.249739-54.249739h481.458087c26.000696 0 46.124522-18.988522 47.838608-44.432695l0.111305-3.494957V147.055304c0-27.158261-20.769391-47.949913-47.949913-47.949913H102.177391c-25.978435 0-46.124522 19.010783-47.838608 44.432696l-0.111305 3.517217v129.78087L0 222.608696V124.416l0.111304-3.917913A79.026087 79.026087 0 0 1 75.620174 44.966957l4.296348-0.111305h863.165217z m-38.244174 118.160696v435.021913l-529.408-0.022261L118.160696 340.769391V163.038609h786.676869z",color:"#26B8CF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),W2=J({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M514.5344 192.2304c137.216 0 265.856 48.0768 346.7008 129.536l8.576 8.9344c5.888 6.144 12.288 12.16 22.8864 21.4528l30.592 26.624 13.0048 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 45.952-25.088 77.6448-93.4144 136.832l-24.832 21.4528c-9.0112 7.936-14.976 13.4656-20.224 18.7904l-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-141.7216 0-272.896-50.6112-353.2544-136.3456l-8.064-8.8576-4.2496-4.4544c-6.7072-6.784-15.3088-14.336-29.8496-26.5216l-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-41.6768 22.4768-70.7328 83.2512-122.5728l27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936l-5.76 6.2464c-6.8608 7.168-14.592 14.336-26.4448 24.4736L124.928 442.24c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 27.2896 22.784c15.1296 12.7488 24.064 20.8896 32.0768 29.3632l11.3408 12.3648c31.7696 33.28 74.496 61.3888 124.16 81.408 55.6544 22.4512 119.2192 34.3552 183.7312 34.3552 121.2672 0 233.9072-41.5488 303.3088-111.0272l12.8512-13.2864 6.7328-6.5024c3.584-3.4048 7.6032-7.04 12.3904-11.264l44.6976-38.8352 10.9312-9.984c11.8528-11.0848 20.7104-20.4288 27.9552-29.696 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936-12.4416-11.0592c-4.8384-4.3776-8.832-8.192-12.544-11.8784l-13.312-13.7472c-69.4272-69.4784-182.016-111.0272-303.3088-111.0272-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664z m-1.8176 111.9488c31.8976 0 62.5664 7.1168 91.008 21.12a30.08 30.08 0 0 1-26.5472 53.9392 146.4064 146.4064 0 0 0-210.688 131.3024 146.4064 146.4064 0 0 0 146.2272 146.2016 146.4064 146.4064 0 0 0 146.2272-146.2016c0-23.936-5.888-47.6672-17.0496-68.608a30.0544 30.0544 0 0 1 53.0688-28.2624 206.7712 206.7712 0 0 1 24.0896 96.8704c0 113.792-92.544 206.336-206.336 206.336s-206.336-92.544-206.336-206.336c0-113.8176 92.544-206.3616 206.336-206.3616z m97.2544 152.0128l3.2256 0.4864c16.2304 3.4048 26.6496 19.2512 23.296 35.4304-3.5072 17.4592-12.7488 42.9312-29.3888 67.4816-28.5184 42.0352-69.248 64.4352-117.504 64.4352-3.9936 0-7.9616-0.1536-12.0064-0.4608a30.0544 30.0544 0 1 1 4.4544-59.9552c29.5424 2.176 53.1456-8.448 71.424-32.384l3.3792-4.6336 2.6624-4.0704c5.888-9.3184 10.5984-19.3792 14.1568-29.4656l2.1504-6.4512a115.712 115.712 0 0 0 0.768-2.6368l1.8944-7.2192c4.352-13.3632 17.4848-21.9392 31.488-20.5568z",color:"#CCCCCC"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),J2=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:C2,Fixed:I2,Fullscreen:R2,Invisible:M2,LineHeight:N2,Maximize:gh,Minimize:yh,Popup:bh,QrCodeLogin:P2,RawClose:wh,RawLock:z2,RawUnLock:F2,Rows:L2,Skin:H2,UnFixed:U2,UserLogin:q2,Visible:W2},Symbol.toStringTag,{value:"Module"}));function ee(n,e){return Xt(J({name:n,render(){return T("i",{class:e})}}))}const Y2=ee("VtjIconWindowMax","vtj-icon-window-max"),K2=ee("VtjIconWindowMin","vtj-icon-window-min"),Z2=ee("VtjIconWindowClose","vtj-icon-window-close"),G2=ee("VtjIconWindowNormal","vtj-icon-window-normal"),X2=ee("VtjIconWindowDown","vtj-icon-window-down"),Q2=ee("VtjIconWindowUp","vtj-icon-window-up"),eb=ee("VtjIconNpSave","vtj-icon-np-save"),tb=ee("VtjIconNpFile","vtj-icon-np-file"),nb=ee("VtjIconNpEdit","vtj-icon-np-edit"),rb=ee("VtjIconNpShare","vtj-icon-np-share"),ib=ee("VtjIconNpSearch","vtj-icon-np-search"),ob=ee("VtjIconNpExport","vtj-icon-np-export"),sb=ee("VtjIconNpImport","vtj-icon-np-import"),ab=ee("VtjIconNpList","vtj-icon-np-list"),lb=ee("VtjIconNpPrint","vtj-icon-np-print"),ub=ee("VtjIconNpCancel","vtj-icon-np-cancel"),cb=ee("VtjIconNpConfirm","vtj-icon-np-confirm"),hb=ee("VtjIconNpReset","vtj-icon-np-reset"),db=ee("VtjIconNpReturnAll","vtj-icon-np-return-all"),pb=ee("VtjIconNpReturn","vtj-icon-np-return"),fb=ee("VtjIconNpRemove","vtj-icon-np-remove"),mb=ee("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),vb=ee("VtjIconNpDelete","vtj-icon-np-delete"),gb=ee("VtjIconNpExit","vtj-icon-np-exit"),yb=ee("VtjIconNpRefresh","vtj-icon-np-refresh"),bb=ee("VtjIconNpAdd","vtj-icon-np-add"),wb=ee("VtjIconNpSelect","vtj-icon-np-select"),_b=ee("VtjIconNpAddRow","vtj-icon-np-add-row"),xb=ee("VtjIconNpExtend","vtj-icon-np-extend"),Sb=ee("VtjIconNpClose","vtj-icon-np-close"),$b=ee("VtjIconNpSubmit","vtj-icon-np-submit"),jb=ee("VtjIconDeps","vtj-icon-deps"),_h=ee("VtjIconBack","vtj-icon-back"),xh=ee("VtjIconHome","vtj-icon-home"),Sh=ee("VtjIconApi","vtj-icon-api"),Eb=ee("VtjIconExport","vtj-icon-export"),kb=ee("VtjIconImport","vtj-icon-import"),Tb=ee("VtjIconGreater","vtj-icon-greater"),Vb=ee("VtjIconSmaller","vtj-icon-smaller"),Os=ee("VtjIconCheck","vtj-icon-check"),$h=ee("VtjIconSwitch","vtj-icon-switch"),Bs=ee("VtjIconCopy","vtj-icon-copy"),Cs=ee("VtjIconLock","vtj-icon-lock"),jh=ee("VtjIconUnlock","vtj-icon-unlock"),Is=ee("VtjIconLayers","vtj-icon-layers"),Db=ee("VtjIconConsole","vtj-icon-console"),Ab=ee("VtjIconTeam","vtj-icon-team"),Ob=ee("VtjIconPublish","vtj-icon-publish"),Eh=ee("VtjIconPreview","vtj-icon-preview"),kh=ee("VtjIconSave","vtj-icon-save"),Th=ee("VtjIconPc","vtj-icon-pc"),Vh=ee("VtjIconPhone","vtj-icon-phone"),Dh=ee("VtjIconPad","vtj-icon-pad"),Ah=ee("VtjIconRedo","vtj-icon-redo"),Oh=ee("VtjIconRefresh","vtj-icon-refresh"),Bh=ee("VtjIconUndo","vtj-icon-undo"),Ch=ee("VtjIconCategory","vtj-icon-category"),Bb=ee("VtjIconProject","vtj-icon-project"),Cb=ee("VtjIconNotice","vtj-icon-notice"),Ib=ee("VtjIconFav","vtj-icon-fav"),Ih=ee("VtjIconBug","vtj-icon-bug"),Rb=ee("VtjIconFile","vtj-icon-file"),Mb=ee("VtjIconFolder","vtj-icon-folder"),Nb=ee("VtjIconUpload","vtj-icon-upload"),Pb=ee("VtjIconDownload","vtj-icon-download"),zb=ee("VtjIconUser","vtj-icon-user"),Rh=ee("VtjIconSetting","vtj-icon-setting"),Fb=ee("VtjIconArrowRight","vtj-icon-arrow-right"),Lb=ee("VtjIconArrowLeft","vtj-icon-arrow-left"),Mh=ee("VtjIconArrowDown","vtj-icon-arrow-down"),Nh=ee("VtjIconArrowUp","vtj-icon-arrow-up"),Hb=ee("VtjIconShare","vtj-icon-share"),Ub=ee("VtjIconData","vtj-icon-data"),qb=ee("VtjIconTemplate","vtj-icon-template"),Wb=ee("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),Jb=ee("VtjIconFullscreen","vtj-icon-fullscreen"),Rs=ee("VtjIconEdit","vtj-icon-edit"),Tr=ee("VtjIconRemove","vtj-icon-remove"),Yb=ee("VtjIconJs","vtj-icon-js"),Kb=ee("VtjIconDatabase","vtj-icon-database"),Ph=ee("VtjIconInfo","vtj-icon-info"),Ms=ee("VtjIconPlus","vtj-icon-plus"),Zb=ee("VtjIconMinus","vtj-icon-minus"),zh=ee("VtjIconHelp","vtj-icon-help"),Fh=ee("VtjIconVars","vtj-icon-vars"),Lh=ee("VtjIconOutline","vtj-icon-outline"),Hh=ee("VtjIconVisible","vtj-icon-visible"),Ns=ee("VtjIconInvisible","vtj-icon-invisible"),Uh=ee("VtjIconDocument","vtj-icon-document"),qh=ee("VtjIconHistory","vtj-icon-history"),Gb=ee("VtjIconFixed","vtj-icon-fixed"),Xb=ee("VtjIconUnfixed","vtj-icon-unfixed"),Wh=ee("VtjIconSearch","vtj-icon-search"),Qb=ee("VtjIconMore","vtj-icon-more"),e6=ee("VtjIconClose","vtj-icon-close"),Jh=ee("VtjIconComponents","vtj-icon-components"),Yh=ee("VtjIconBlock","vtj-icon-block"),t6=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:Sh,VtjIconArrowDown:Mh,VtjIconArrowLeft:Lb,VtjIconArrowRight:Fb,VtjIconArrowUp:Nh,VtjIconBack:_h,VtjIconBlock:Yh,VtjIconBug:Ih,VtjIconCategory:Ch,VtjIconCheck:Os,VtjIconClose:e6,VtjIconComponents:Jh,VtjIconConsole:Db,VtjIconCopy:Bs,VtjIconData:Ub,VtjIconDatabase:Kb,VtjIconDeps:jb,VtjIconDocument:Uh,VtjIconDownload:Pb,VtjIconEdit:Rs,VtjIconExitFullscreen:Wb,VtjIconExport:Eb,VtjIconFav:Ib,VtjIconFile:Rb,VtjIconFixed:Gb,VtjIconFolder:Mb,VtjIconFullscreen:Jb,VtjIconGreater:Tb,VtjIconHelp:zh,VtjIconHistory:qh,VtjIconHome:xh,VtjIconImport:kb,VtjIconInfo:Ph,VtjIconInvisible:Ns,VtjIconJs:Yb,VtjIconLayers:Is,VtjIconLock:Cs,VtjIconMinus:Zb,VtjIconMore:Qb,VtjIconNotice:Cb,VtjIconNpAdd:bb,VtjIconNpAddRow:_b,VtjIconNpCancel:ub,VtjIconNpClose:Sb,VtjIconNpConfirm:cb,VtjIconNpDelete:vb,VtjIconNpEdit:nb,VtjIconNpExit:gb,VtjIconNpExport:ob,VtjIconNpExtend:xb,VtjIconNpFile:tb,VtjIconNpImport:sb,VtjIconNpList:ab,VtjIconNpPrint:lb,VtjIconNpRefresh:yb,VtjIconNpRemove:fb,VtjIconNpRemoveRow:mb,VtjIconNpReset:hb,VtjIconNpReturn:pb,VtjIconNpReturnAll:db,VtjIconNpSave:eb,VtjIconNpSearch:ib,VtjIconNpSelect:wb,VtjIconNpShare:rb,VtjIconNpSubmit:$b,VtjIconOutline:Lh,VtjIconPad:Dh,VtjIconPc:Th,VtjIconPhone:Vh,VtjIconPlus:Ms,VtjIconPreview:Eh,VtjIconProject:Bb,VtjIconPublish:Ob,VtjIconRedo:Ah,VtjIconRefresh:Oh,VtjIconRemove:Tr,VtjIconSave:kh,VtjIconSearch:Wh,VtjIconSetting:Rh,VtjIconShare:Hb,VtjIconSmaller:Vb,VtjIconSwitch:$h,VtjIconTeam:Ab,VtjIconTemplate:qb,VtjIconUndo:Bh,VtjIconUnfixed:Xb,VtjIconUnlock:jh,VtjIconUpload:Nb,VtjIconUser:zb,VtjIconVars:Fh,VtjIconVisible:Hh,VtjIconWindowClose:Z2,VtjIconWindowDown:X2,VtjIconWindowMax:Y2,VtjIconWindowMin:K2,VtjIconWindowNormal:G2,VtjIconWindowUp:Q2},Symbol.toStringTag,{value:"Module"})),Mo={...Jf,...J2,...t6};/**!
39
39
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
40
40
  * @name @vtj/utils
41
41
  * @author CHC chenhuachun1549@dingtalk.com
42
- * @version 0.7.2
42
+ * @version 0.7.4
43
43
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
44
44
  */var n6={ENV_TYPE:"local",NODE_ENV:"production"},r6=typeof global=="object"&&global&&global.Object===Object&&global;const Kh=r6;var i6=typeof self=="object"&&self&&self.Object===Object&&self,o6=Kh||i6||Function("return this")();const gt=o6;var s6=gt.Symbol;const St=s6;var Zh=Object.prototype,a6=Zh.hasOwnProperty,l6=Zh.toString,ir=St?St.toStringTag:void 0;function u6(n){var e=a6.call(n,ir),t=n[ir];try{n[ir]=void 0;var r=!0}catch{}var i=l6.call(n);return r&&(e?n[ir]=t:delete n[ir]),i}var c6=Object.prototype,h6=c6.toString;function d6(n){return h6.call(n)}var p6="[object Null]",f6="[object Undefined]",dl=St?St.toStringTag:void 0;function It(n){return n==null?n===void 0?f6:p6:dl&&dl in Object(n)?u6(n):d6(n)}function ut(n){return n!=null&&typeof n=="object"}var m6="[object Symbol]";function Di(n){return typeof n=="symbol"||ut(n)&&It(n)==m6}function Gh(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var v6=Array.isArray;const vt=v6;var g6=1/0,pl=St?St.prototype:void 0,fl=pl?pl.toString:void 0;function Xh(n){if(typeof n=="string")return n;if(vt(n))return Gh(n,Xh)+"";if(Di(n))return fl?fl.call(n):"";var e=n+"";return e=="0"&&1/n==-g6?"-0":e}var y6=/\s/;function b6(n){for(var e=n.length;e--&&y6.test(n.charAt(e)););return e}var w6=/^\s+/;function _6(n){return n&&n.slice(0,b6(n)+1).replace(w6,"")}function Ne(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var ml=NaN,x6=/^[-+]0x[0-9a-f]+$/i,S6=/^0b[01]+$/i,$6=/^0o[0-7]+$/i,j6=parseInt;function vl(n){if(typeof n=="number")return n;if(Di(n))return ml;if(Ne(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ne(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=_6(n);var t=S6.test(n);return t||$6.test(n)?j6(n.slice(2),t?2:8):x6.test(n)?ml:+n}function Qh(n){return n}var E6="[object AsyncFunction]",k6="[object Function]",T6="[object GeneratorFunction]",V6="[object Proxy]";function wr(n){if(!Ne(n))return!1;var e=It(n);return e==k6||e==T6||e==E6||e==V6}var D6=gt["__core-js_shared__"];const Qi=D6;var gl=function(){var n=/[^.]+$/.exec(Qi&&Qi.keys&&Qi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function A6(n){return!!gl&&gl in n}var O6=Function.prototype,B6=O6.toString;function _n(n){if(n!=null){try{return B6.call(n)}catch{}try{return n+""}catch{}}return""}var C6=/[\\^$.*+?()[\]{}|]/g,I6=/^\[object .+?Constructor\]$/,R6=Function.prototype,M6=Object.prototype,N6=R6.toString,P6=M6.hasOwnProperty,z6=RegExp("^"+N6.call(P6).replace(C6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F6(n){if(!Ne(n)||A6(n))return!1;var e=wr(n)?z6:I6;return e.test(_n(n))}function L6(n,e){return n?.[e]}function xn(n,e){var t=L6(n,e);return F6(t)?t:void 0}var H6=xn(gt,"WeakMap");const No=H6;var yl=Object.create,U6=function(){function n(){}return function(e){if(!Ne(e))return{};if(yl)return yl(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const q6=U6;function ed(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function td(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var W6=800,J6=16,Y6=Date.now;function K6(n){var e=0,t=0;return function(){var r=Y6(),i=J6-(r-t);if(t=r,i>0){if(++e>=W6)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function Z6(n){return function(){return n}}var G6=function(){try{var n=xn(Object,"defineProperty");return n({},"",{}),n}catch{}}();const gi=G6;var X6=gi?function(n,e){return gi(n,"toString",{configurable:!0,enumerable:!1,value:Z6(e),writable:!0})}:Qh;const Q6=X6;var e3=K6(Q6);const t3=e3;function n3(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var r3=9007199254740991,i3=/^(?:0|[1-9]\d*)$/;function Ps(n,e){var t=typeof n;return e=e??r3,!!e&&(t=="number"||t!="symbol"&&i3.test(n))&&n>-1&&n%1==0&&n<e}function zs(n,e,t){e=="__proto__"&&gi?gi(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Kn(n,e){return n===e||n!==n&&e!==e}var o3=Object.prototype,s3=o3.hasOwnProperty;function Fs(n,e,t){var r=n[e];(!(s3.call(n,e)&&Kn(r,t))||t===void 0&&!(e in n))&&zs(n,e,t)}function Zn(n,e,t,r){var i=!t;t||(t={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(t[a],n[a],a,t,n):void 0;u===void 0&&(u=n[a]),i?zs(t,a,u):Fs(t,a,u)}return t}var bl=Math.max;function a3(n,e,t){return e=bl(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=bl(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(s),ed(n,this,a)}}function nd(n,e){return t3(a3(n,e,Qh),n+"")}var l3=9007199254740991;function rd(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=l3}function Ai(n){return n!=null&&rd(n.length)&&!wr(n)}function id(n,e,t){if(!Ne(t))return!1;var r=typeof e;return(r=="number"?Ai(t)&&Ps(e,t.length):r=="string"&&e in t)?Kn(t[e],n):!1}function od(n){return nd(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,s&&id(t[0],t[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,o)}return e})}var u3=Object.prototype;function Ls(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||u3;return n===t}function c3(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var h3="[object Arguments]";function wl(n){return ut(n)&&It(n)==h3}var sd=Object.prototype,d3=sd.hasOwnProperty,p3=sd.propertyIsEnumerable,f3=wl(function(){return arguments}())?wl:function(n){return ut(n)&&d3.call(n,"callee")&&!p3.call(n,"callee")};const Po=f3;function m3(){return!1}var ad=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_l=ad&&typeof module=="object"&&module&&!module.nodeType&&module,v3=_l&&_l.exports===ad,xl=v3?gt.Buffer:void 0,g3=xl?xl.isBuffer:void 0,y3=g3||m3;const _r=y3;var b3="[object Arguments]",w3="[object Array]",_3="[object Boolean]",x3="[object Date]",S3="[object Error]",$3="[object Function]",j3="[object Map]",E3="[object Number]",k3="[object Object]",T3="[object RegExp]",V3="[object Set]",D3="[object String]",A3="[object WeakMap]",O3="[object ArrayBuffer]",B3="[object DataView]",C3="[object Float32Array]",I3="[object Float64Array]",R3="[object Int8Array]",M3="[object Int16Array]",N3="[object Int32Array]",P3="[object Uint8Array]",z3="[object Uint8ClampedArray]",F3="[object Uint16Array]",L3="[object Uint32Array]",$e={};$e[C3]=$e[I3]=$e[R3]=$e[M3]=$e[N3]=$e[P3]=$e[z3]=$e[F3]=$e[L3]=!0,$e[b3]=$e[w3]=$e[O3]=$e[_3]=$e[B3]=$e[x3]=$e[S3]=$e[$3]=$e[j3]=$e[E3]=$e[k3]=$e[T3]=$e[V3]=$e[D3]=$e[A3]=!1;function H3(n){return ut(n)&&rd(n.length)&&!!$e[It(n)]}function Hs(n){return function(e){return n(e)}}var ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mr=ld&&typeof module=="object"&&module&&!module.nodeType&&module,U3=mr&&mr.exports===ld,eo=U3&&Kh.process,q3=function(){try{var n=mr&&mr.require&&mr.require("util").types;return n||eo&&eo.binding&&eo.binding("util")}catch{}}();const $t=q3;var Sl=$t&&$t.isTypedArray,W3=Sl?Hs(Sl):H3;const Us=W3;var J3=Object.prototype,Y3=J3.hasOwnProperty;function ud(n,e){var t=vt(n),r=!t&&Po(n),i=!t&&!r&&_r(n),o=!t&&!r&&!i&&Us(n),s=t||r||i||o,a=s?c3(n.length,String):[],u=a.length;for(var l in n)(e||Y3.call(n,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ps(l,u)))&&a.push(l);return a}function cd(n,e){return function(t){return n(e(t))}}var K3=cd(Object.keys,Object);const Z3=K3;var G3=Object.prototype,X3=G3.hasOwnProperty;function Q3(n){if(!Ls(n))return Z3(n);var e=[];for(var t in Object(n))X3.call(n,t)&&t!="constructor"&&e.push(t);return e}function Oi(n){return Ai(n)?ud(n):Q3(n)}function ew(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var tw=Object.prototype,nw=tw.hasOwnProperty;function rw(n){if(!Ne(n))return ew(n);var e=Ls(n),t=[];for(var r in n)r=="constructor"&&(e||!nw.call(n,r))||t.push(r);return t}function Gn(n){return Ai(n)?ud(n,!0):rw(n)}var iw=od(function(n,e,t,r){Zn(e,Gn(e),n,r)});const $l=iw;var ow=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sw=/^\w*$/;function aw(n,e){if(vt(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Di(n)?!0:sw.test(n)||!ow.test(n)||e!=null&&n in Object(e)}var lw=xn(Object,"create");const xr=lw;function uw(){this.__data__=xr?xr(null):{},this.size=0}function cw(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var hw="__lodash_hash_undefined__",dw=Object.prototype,pw=dw.hasOwnProperty;function fw(n){var e=this.__data__;if(xr){var t=e[n];return t===hw?void 0:t}return pw.call(e,n)?e[n]:void 0}var mw=Object.prototype,vw=mw.hasOwnProperty;function gw(n){var e=this.__data__;return xr?e[n]!==void 0:vw.call(e,n)}var yw="__lodash_hash_undefined__";function bw(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=xr&&e===void 0?yw:e,this}function vn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}vn.prototype.clear=uw,vn.prototype.delete=cw,vn.prototype.get=fw,vn.prototype.has=gw,vn.prototype.set=bw;function ww(){this.__data__=[],this.size=0}function Bi(n,e){for(var t=n.length;t--;)if(Kn(n[t][0],e))return t;return-1}var _w=Array.prototype,xw=_w.splice;function Sw(n){var e=this.__data__,t=Bi(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():xw.call(e,t,1),--this.size,!0}function $w(n){var e=this.__data__,t=Bi(e,n);return t<0?void 0:e[t][1]}function jw(n){return Bi(this.__data__,n)>-1}function Ew(n,e){var t=this.__data__,r=Bi(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Dt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Dt.prototype.clear=ww,Dt.prototype.delete=Sw,Dt.prototype.get=$w,Dt.prototype.has=jw,Dt.prototype.set=Ew;var kw=xn(gt,"Map");const Sr=kw;function Tw(){this.size=0,this.__data__={hash:new vn,map:new(Sr||Dt),string:new vn}}function Vw(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Ci(n,e){var t=n.__data__;return Vw(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Dw(n){var e=Ci(this,n).delete(n);return this.size-=e?1:0,e}function Aw(n){return Ci(this,n).get(n)}function Ow(n){return Ci(this,n).has(n)}function Bw(n,e){var t=Ci(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function At(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}At.prototype.clear=Tw,At.prototype.delete=Dw,At.prototype.get=Aw,At.prototype.has=Ow,At.prototype.set=Bw;var Cw="Expected a function";function qs(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Cw);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var s=n.apply(this,r);return t.cache=o.set(i,s)||o,s};return t.cache=new(qs.Cache||At),t}qs.Cache=At;var Iw=500;function Rw(n){var e=qs(n,function(r){return t.size===Iw&&t.clear(),r}),t=e.cache;return e}var Mw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nw=/\\(\\)?/g,Pw=Rw(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Mw,function(t,r,i,o){e.push(i?o.replace(Nw,"$1"):r||t)}),e});const zw=Pw;function Sn(n){return n==null?"":Xh(n)}function hd(n,e){return vt(n)?n:aw(n,e)?[n]:zw(Sn(n))}var Fw=1/0;function dd(n){if(typeof n=="string"||Di(n))return n;var e=n+"";return e=="0"&&1/n==-Fw?"-0":e}function Lw(n,e){e=hd(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[dd(e[t++])];return t&&t==r?n:void 0}function ii(n,e,t){var r=n==null?void 0:Lw(n,e);return r===void 0?t:r}function pd(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var Hw=cd(Object.getPrototypeOf,Object);const Ws=Hw;var Uw="[object Object]",qw=Function.prototype,Ww=Object.prototype,fd=qw.toString,Jw=Ww.hasOwnProperty,Yw=fd.call(Object);function Js(n){if(!ut(n)||It(n)!=Uw)return!1;var e=Ws(n);if(e===null)return!0;var t=Jw.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&fd.call(t)==Yw}var Kw="[object DOMException]",Zw="[object Error]";function md(n){if(!ut(n))return!1;var e=It(n);return e==Zw||e==Kw||typeof n.message=="string"&&typeof n.name=="string"&&!Js(n)}var Gw=nd(function(n,e){try{return ed(n,void 0,e)}catch(t){return md(t)?t:new Error(t)}});const Xw=Gw;function Qw(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function e4(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:Qw(n,e,t)}var t4="\\ud800-\\udfff",n4="\\u0300-\\u036f",r4="\\ufe20-\\ufe2f",i4="\\u20d0-\\u20ff",o4=n4+r4+i4,s4="\\ufe0e\\ufe0f",a4="\\u200d",l4=RegExp("["+a4+t4+o4+s4+"]");function vd(n){return l4.test(n)}function u4(n){return n.split("")}var gd="\\ud800-\\udfff",c4="\\u0300-\\u036f",h4="\\ufe20-\\ufe2f",d4="\\u20d0-\\u20ff",p4=c4+h4+d4,f4="\\ufe0e\\ufe0f",m4="["+gd+"]",zo="["+p4+"]",Fo="\\ud83c[\\udffb-\\udfff]",v4="(?:"+zo+"|"+Fo+")",yd="[^"+gd+"]",bd="(?:\\ud83c[\\udde6-\\uddff]){2}",wd="[\\ud800-\\udbff][\\udc00-\\udfff]",g4="\\u200d",_d=v4+"?",xd="["+f4+"]?",y4="(?:"+g4+"(?:"+[yd,bd,wd].join("|")+")"+xd+_d+")*",b4=xd+_d+y4,w4="(?:"+[yd+zo+"?",zo,bd,wd,m4].join("|")+")",_4=RegExp(Fo+"(?="+Fo+")|"+w4+b4,"g");function x4(n){return n.match(_4)||[]}function S4(n){return vd(n)?x4(n):u4(n)}function $4(n){return function(e){e=Sn(e);var t=vd(e)?S4(e):void 0,r=t?t[0]:e.charAt(0),i=t?e4(t,1).join(""):e.slice(1);return r[n]()+i}}var j4=$4("toUpperCase");const Ys=j4;function E4(n){return Ys(Sn(n).toLowerCase())}function k4(n,e,t,r){var i=-1,o=n==null?0:n.length;for(r&&o&&(t=n[++i]);++i<o;)t=e(t,n[i],i,n);return t}function Sd(n){return function(e){return n?.[e]}}var T4={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},V4=Sd(T4);const D4=V4;var A4=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,O4="\\u0300-\\u036f",B4="\\ufe20-\\ufe2f",C4="\\u20d0-\\u20ff",I4=O4+B4+C4,R4="["+I4+"]",M4=RegExp(R4,"g");function N4(n){return n=Sn(n),n&&n.replace(A4,D4).replace(M4,"")}var P4=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function z4(n){return n.match(P4)||[]}var F4=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function L4(n){return F4.test(n)}var $d="\\ud800-\\udfff",H4="\\u0300-\\u036f",U4="\\ufe20-\\ufe2f",q4="\\u20d0-\\u20ff",W4=H4+U4+q4,jd="\\u2700-\\u27bf",Ed="a-z\\xdf-\\xf6\\xf8-\\xff",J4="\\xac\\xb1\\xd7\\xf7",Y4="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",K4="\\u2000-\\u206f",Z4=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kd="A-Z\\xc0-\\xd6\\xd8-\\xde",G4="\\ufe0e\\ufe0f",Td=J4+Y4+K4+Z4,Vd="['’]",jl="["+Td+"]",X4="["+W4+"]",Dd="\\d+",Q4="["+jd+"]",Ad="["+Ed+"]",Od="[^"+$d+Td+Dd+jd+Ed+kd+"]",e8="\\ud83c[\\udffb-\\udfff]",t8="(?:"+X4+"|"+e8+")",n8="[^"+$d+"]",Bd="(?:\\ud83c[\\udde6-\\uddff]){2}",Cd="[\\ud800-\\udbff][\\udc00-\\udfff]",An="["+kd+"]",r8="\\u200d",El="(?:"+Ad+"|"+Od+")",i8="(?:"+An+"|"+Od+")",kl="(?:"+Vd+"(?:d|ll|m|re|s|t|ve))?",Tl="(?:"+Vd+"(?:D|LL|M|RE|S|T|VE))?",Id=t8+"?",Rd="["+G4+"]?",o8="(?:"+r8+"(?:"+[n8,Bd,Cd].join("|")+")"+Rd+Id+")*",s8="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a8="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",l8=Rd+Id+o8,u8="(?:"+[Q4,Bd,Cd].join("|")+")"+l8,c8=RegExp([An+"?"+Ad+"+"+kl+"(?="+[jl,An,"$"].join("|")+")",i8+"+"+Tl+"(?="+[jl,An+El,"$"].join("|")+")",An+"?"+El+"+"+kl,An+"+"+Tl,a8,s8,Dd,u8].join("|"),"g");function h8(n){return n.match(c8)||[]}function d8(n,e,t){return n=Sn(n),e=t?void 0:e,e===void 0?L4(n)?h8(n):z4(n):n.match(e)||[]}var p8="['’]",f8=RegExp(p8,"g");function m8(n){return function(e){return k4(d8(N4(e).replace(f8,"")),n,"")}}var v8=m8(function(n,e,t){return e=e.toLowerCase(),n+(t?E4(e):e)});const dn=v8;function g8(){this.__data__=new Dt,this.size=0}function y8(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function b8(n){return this.__data__.get(n)}function w8(n){return this.__data__.has(n)}var _8=200;function x8(n,e){var t=this.__data__;if(t instanceof Dt){var r=t.__data__;if(!Sr||r.length<_8-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new At(r)}return t.set(n,e),this.size=t.size,this}function bt(n){var e=this.__data__=new Dt(n);this.size=e.size}bt.prototype.clear=g8,bt.prototype.delete=y8,bt.prototype.get=b8,bt.prototype.has=w8,bt.prototype.set=x8;function S8(n,e){return n&&Zn(e,Oi(e),n)}function $8(n,e){return n&&Zn(e,Gn(e),n)}var Md=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vl=Md&&typeof module=="object"&&module&&!module.nodeType&&module,j8=Vl&&Vl.exports===Md,Dl=j8?gt.Buffer:void 0,Al=Dl?Dl.allocUnsafe:void 0;function Nd(n,e){if(e)return n.slice();var t=n.length,r=Al?Al(t):new n.constructor(t);return n.copy(r),r}function E8(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var s=n[t];e(s,t,n)&&(o[i++]=s)}return o}function Pd(){return[]}var k8=Object.prototype,T8=k8.propertyIsEnumerable,Ol=Object.getOwnPropertySymbols,V8=Ol?function(n){return n==null?[]:(n=Object(n),E8(Ol(n),function(e){return T8.call(n,e)}))}:Pd;const Ks=V8;function D8(n,e){return Zn(n,Ks(n),e)}var A8=Object.getOwnPropertySymbols,O8=A8?function(n){for(var e=[];n;)pd(e,Ks(n)),n=Ws(n);return e}:Pd;const zd=O8;function B8(n,e){return Zn(n,zd(n),e)}function Fd(n,e,t){var r=e(n);return vt(n)?r:pd(r,t(n))}function Lo(n){return Fd(n,Oi,Ks)}function C8(n){return Fd(n,Gn,zd)}var I8=xn(gt,"DataView");const Ho=I8;var R8=xn(gt,"Promise");const Uo=R8;var M8=xn(gt,"Set");const qo=M8;var Bl="[object Map]",N8="[object Object]",Cl="[object Promise]",Il="[object Set]",Rl="[object WeakMap]",Ml="[object DataView]",P8=_n(Ho),z8=_n(Sr),F8=_n(Uo),L8=_n(qo),H8=_n(No),pn=It;(Ho&&pn(new Ho(new ArrayBuffer(1)))!=Ml||Sr&&pn(new Sr)!=Bl||Uo&&pn(Uo.resolve())!=Cl||qo&&pn(new qo)!=Il||No&&pn(new No)!=Rl)&&(pn=function(n){var e=It(n),t=e==N8?n.constructor:void 0,r=t?_n(t):"";if(r)switch(r){case P8:return Ml;case z8:return Bl;case F8:return Cl;case L8:return Il;case H8:return Rl}return e});const $r=pn;var U8=Object.prototype,q8=U8.hasOwnProperty;function W8(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&q8.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var J8=gt.Uint8Array;const yi=J8;function Zs(n){var e=new n.constructor(n.byteLength);return new yi(e).set(new yi(n)),e}function Y8(n,e){var t=e?Zs(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var K8=/\w*$/;function Z8(n){var e=new n.constructor(n.source,K8.exec(n));return e.lastIndex=n.lastIndex,e}var Nl=St?St.prototype:void 0,Pl=Nl?Nl.valueOf:void 0;function G8(n){return Pl?Object(Pl.call(n)):{}}function Ld(n,e){var t=e?Zs(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var X8="[object Boolean]",Q8="[object Date]",e5="[object Map]",t5="[object Number]",n5="[object RegExp]",r5="[object Set]",i5="[object String]",o5="[object Symbol]",s5="[object ArrayBuffer]",a5="[object DataView]",l5="[object Float32Array]",u5="[object Float64Array]",c5="[object Int8Array]",h5="[object Int16Array]",d5="[object Int32Array]",p5="[object Uint8Array]",f5="[object Uint8ClampedArray]",m5="[object Uint16Array]",v5="[object Uint32Array]";function g5(n,e,t){var r=n.constructor;switch(e){case s5:return Zs(n);case X8:case Q8:return new r(+n);case a5:return Y8(n,t);case l5:case u5:case c5:case h5:case d5:case p5:case f5:case m5:case v5:return Ld(n,t);case e5:return new r;case t5:case i5:return new r(n);case n5:return Z8(n);case r5:return new r;case o5:return G8(n)}}function Hd(n){return typeof n.constructor=="function"&&!Ls(n)?q6(Ws(n)):{}}var y5="[object Map]";function b5(n){return ut(n)&&$r(n)==y5}var zl=$t&&$t.isMap,w5=zl?Hs(zl):b5;const _5=w5;var x5="[object Set]";function S5(n){return ut(n)&&$r(n)==x5}var Fl=$t&&$t.isSet,$5=Fl?Hs(Fl):S5;const j5=$5;var E5=1,k5=2,T5=4,Ud="[object Arguments]",V5="[object Array]",D5="[object Boolean]",A5="[object Date]",O5="[object Error]",qd="[object Function]",B5="[object GeneratorFunction]",C5="[object Map]",I5="[object Number]",Wd="[object Object]",R5="[object RegExp]",M5="[object Set]",N5="[object String]",P5="[object Symbol]",z5="[object WeakMap]",F5="[object ArrayBuffer]",L5="[object DataView]",H5="[object Float32Array]",U5="[object Float64Array]",q5="[object Int8Array]",W5="[object Int16Array]",J5="[object Int32Array]",Y5="[object Uint8Array]",K5="[object Uint8ClampedArray]",Z5="[object Uint16Array]",G5="[object Uint32Array]",we={};we[Ud]=we[V5]=we[F5]=we[L5]=we[D5]=we[A5]=we[H5]=we[U5]=we[q5]=we[W5]=we[J5]=we[C5]=we[I5]=we[Wd]=we[R5]=we[M5]=we[N5]=we[P5]=we[Y5]=we[K5]=we[Z5]=we[G5]=!0,we[O5]=we[qd]=we[z5]=!1;function oi(n,e,t,r,i,o){var s,a=e&E5,u=e&k5,l=e&T5;if(t&&(s=i?t(n,r,i,o):t(n)),s!==void 0)return s;if(!Ne(n))return n;var c=vt(n);if(c){if(s=W8(n),!a)return td(n,s)}else{var d=$r(n),h=d==qd||d==B5;if(_r(n))return Nd(n,a);if(d==Wd||d==Ud||h&&!i){if(s=u||h?{}:Hd(n),!a)return u?B8(n,$8(s,n)):D8(n,S8(s,n))}else{if(!we[d])return i?n:{};s=g5(n,d,a)}}o||(o=new bt);var p=o.get(n);if(p)return p;o.set(n,s),j5(n)?n.forEach(function(y){s.add(oi(y,e,t,y,n,o))}):_5(n)&&n.forEach(function(y,$){s.set($,oi(y,e,t,$,n,o))});var f=l?u?C8:Lo:u?Gn:Oi,v=c?void 0:f(n);return n3(v||n,function(y,$){v&&($=y,y=n[$]),Fs(s,$,oi(y,e,t,$,n,o))}),s}var X5=1,Q5=4;function Ii(n){return oi(n,X5|Q5)}var e_="__lodash_hash_undefined__";function t_(n){return this.__data__.set(n,e_),this}function n_(n){return this.__data__.has(n)}function si(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new At;++e<t;)this.add(n[e])}si.prototype.add=si.prototype.push=t_,si.prototype.has=n_;function r_(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function i_(n,e){return n.has(e)}var o_=1,s_=2;function Jd(n,e,t,r,i,o){var s=t&o_,a=n.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(n),c=o.get(e);if(l&&c)return l==e&&c==n;var d=-1,h=!0,p=t&s_?new si:void 0;for(o.set(n,e),o.set(e,n);++d<a;){var f=n[d],v=e[d];if(r)var y=s?r(v,f,d,e,n,o):r(f,v,d,n,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!r_(e,function($,g){if(!i_(p,g)&&(f===$||i(f,$,t,r,o)))return p.push(g)})){h=!1;break}}else if(!(f===v||i(f,v,t,r,o))){h=!1;break}}return o.delete(n),o.delete(e),h}function a_(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function l_(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var u_=1,c_=2,h_="[object Boolean]",d_="[object Date]",p_="[object Error]",f_="[object Map]",m_="[object Number]",v_="[object RegExp]",g_="[object Set]",y_="[object String]",b_="[object Symbol]",w_="[object ArrayBuffer]",__="[object DataView]",Ll=St?St.prototype:void 0,to=Ll?Ll.valueOf:void 0;function x_(n,e,t,r,i,o,s){switch(t){case __:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case w_:return!(n.byteLength!=e.byteLength||!o(new yi(n),new yi(e)));case h_:case d_:case m_:return Kn(+n,+e);case p_:return n.name==e.name&&n.message==e.message;case v_:case y_:return n==e+"";case f_:var a=a_;case g_:var u=r&u_;if(a||(a=l_),n.size!=e.size&&!u)return!1;var l=s.get(n);if(l)return l==e;r|=c_,s.set(n,e);var c=Jd(a(n),a(e),r,i,o,s);return s.delete(n),c;case b_:if(to)return to.call(n)==to.call(e)}return!1}var S_=1,$_=Object.prototype,j_=$_.hasOwnProperty;function E_(n,e,t,r,i,o){var s=t&S_,a=Lo(n),u=a.length,l=Lo(e),c=l.length;if(u!=c&&!s)return!1;for(var d=u;d--;){var h=a[d];if(!(s?h in e:j_.call(e,h)))return!1}var p=o.get(n),f=o.get(e);if(p&&f)return p==e&&f==n;var v=!0;o.set(n,e),o.set(e,n);for(var y=s;++d<u;){h=a[d];var $=n[h],g=e[h];if(r)var b=s?r(g,$,h,e,n,o):r($,g,h,n,e,o);if(!(b===void 0?$===g||i($,g,t,r,o):b)){v=!1;break}y||(y=h=="constructor")}if(v&&!y){var _=n.constructor,x=e.constructor;_!=x&&"constructor"in n&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof x=="function"&&x instanceof x)&&(v=!1)}return o.delete(n),o.delete(e),v}var k_=1,Hl="[object Arguments]",Ul="[object Array]",Pr="[object Object]",T_=Object.prototype,ql=T_.hasOwnProperty;function V_(n,e,t,r,i,o){var s=vt(n),a=vt(e),u=s?Ul:$r(n),l=a?Ul:$r(e);u=u==Hl?Pr:u,l=l==Hl?Pr:l;var c=u==Pr,d=l==Pr,h=u==l;if(h&&_r(n)){if(!_r(e))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new bt),s||Us(n)?Jd(n,e,t,r,i,o):x_(n,e,u,t,r,i,o);if(!(t&k_)){var p=c&&ql.call(n,"__wrapped__"),f=d&&ql.call(e,"__wrapped__");if(p||f){var v=p?n.value():n,y=f?e.value():e;return o||(o=new bt),i(v,y,t,r,o)}}return h?(o||(o=new bt),E_(n,e,t,r,i,o)):!1}function Yd(n,e,t,r,i){return n===e?!0:n==null||e==null||!ut(n)&&!ut(e)?n!==n&&e!==e:V_(n,e,t,r,Yd,i)}function D_(n){return function(e,t,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var u=s[n?a:++i];if(t(o[u],u,o)===!1)break}return e}}var A_=D_();const O_=A_;var B_=function(){return gt.Date.now()};const no=B_;var C_="Expected a function",I_=Math.max,R_=Math.min;function Kd(n,e,t){var r,i,o,s,a,u,l=0,c=!1,d=!1,h=!0;if(typeof n!="function")throw new TypeError(C_);e=vl(e)||0,Ne(t)&&(c=!!t.leading,d="maxWait"in t,o=d?I_(vl(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function p(w){var E=r,A=i;return r=i=void 0,l=w,s=n.apply(A,E),s}function f(w){return l=w,a=setTimeout($,e),c?p(w):s}function v(w){var E=w-u,A=w-l,H=e-E;return d?R_(H,o-A):H}function y(w){var E=w-u,A=w-l;return u===void 0||E>=e||E<0||d&&A>=o}function $(){var w=no();if(y(w))return g(w);a=setTimeout($,v(w))}function g(w){return a=void 0,h&&r?p(w):(r=i=void 0,s)}function b(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function _(){return a===void 0?s:g(no())}function x(){var w=no(),E=y(w);if(r=arguments,i=this,u=w,E){if(a===void 0)return f(u);if(d)return clearTimeout(a),a=setTimeout($,e),p(u)}return a===void 0&&(a=setTimeout($,e)),s}return x.cancel=b,x.flush=_,x}function Wo(n,e,t){(t!==void 0&&!Kn(n[e],t)||t===void 0&&!(e in n))&&zs(n,e,t)}function M_(n){return ut(n)&&Ai(n)}function Jo(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function N_(n){return Zn(n,Gn(n))}function P_(n,e,t,r,i,o,s){var a=Jo(n,t),u=Jo(e,t),l=s.get(u);if(l){Wo(n,t,l);return}var c=o?o(a,u,t+"",n,e,s):void 0,d=c===void 0;if(d){var h=vt(u),p=!h&&_r(u),f=!h&&!p&&Us(u);c=u,h||p||f?vt(a)?c=a:M_(a)?c=td(a):p?(d=!1,c=Nd(u,!0)):f?(d=!1,c=Ld(u,!0)):c=[]:Js(u)||Po(u)?(c=a,Po(a)?c=N_(a):(!Ne(a)||wr(a))&&(c=Hd(u))):d=!1}d&&(s.set(u,c),i(c,u,r,o,s),s.delete(u)),Wo(n,t,c)}function Zd(n,e,t,r,i){n!==e&&O_(e,function(o,s){if(i||(i=new bt),Ne(o))P_(n,e,s,t,Zd,r,i);else{var a=r?r(Jo(n,s),o,s+"",n,e,i):void 0;a===void 0&&(a=o),Wo(n,s,a)}},Gn)}var z_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F_=Sd(z_);const L_=F_;var Gd=/[&<>"']/g,H_=RegExp(Gd.source);function U_(n){return n=Sn(n),n&&H_.test(n)?n.replace(Gd,L_):n}var q_="[object String]";function Xn(n){return typeof n=="string"||!vt(n)&&ut(n)&&It(n)==q_}function W_(n,e){return Gh(e,function(t){return n[t]})}$t&&$t.isArrayBuffer;$t&&$t.isDate;function Gs(n,e){return Yd(n,e)}var J_=od(function(n,e,t){Zd(n,e,t)});const Kt=J_;function Y_(n,e,t,r){if(!Ne(n))return n;e=hd(e,n);for(var i=-1,o=e.length,s=o-1,a=n;a!=null&&++i<o;){var u=dd(e[i]),l=t;if(u==="__proto__"||u==="constructor"||u==="prototype")return n;if(i!=s){var c=a[u];l=r?r(c,u,a):void 0,l===void 0&&(l=Ne(c)?c:Ps(e[i+1])?[]:{})}Fs(a,u,l),a=a[u]}return n}function ro(n,e,t){return n==null?n:Y_(n,e,t)}var Xd=Object.prototype,K_=Xd.hasOwnProperty;function Wl(n,e,t,r){return n===void 0||Kn(n,Xd[t])&&!K_.call(r,t)?e:n}var Z_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function G_(n){return"\\"+Z_[n]}var X_=/<%=([\s\S]+?)%>/g;const Qd=X_;var Q_=/<%-([\s\S]+?)%>/g;const ex=Q_;var tx=/<%([\s\S]+?)%>/g;const nx=tx;var rx={escape:ex,evaluate:nx,interpolate:Qd,variable:"",imports:{_:{escape:U_}}};const Jl=rx;var ix="Invalid `variable` option passed into `_.template`",ox=/\b__p \+= '';/g,sx=/\b(__p \+=) '' \+/g,ax=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lx=/[()=,{}\[\]\/\s]/,ux=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zr=/($^)/,cx=/['\n\r\u2028\u2029\\]/g,hx=Object.prototype,Yl=hx.hasOwnProperty;function ep(n,e,t){var r=Jl.imports._.templateSettings||Jl;t&&id(n,e,t)&&(e=void 0),n=Sn(n),e=$l({},e,r,Wl);var i=$l({},e.imports,r.imports,Wl),o=Oi(i),s=W_(i,o),a,u,l=0,c=e.interpolate||zr,d="__p += '",h=RegExp((e.escape||zr).source+"|"+c.source+"|"+(c===Qd?ux:zr).source+"|"+(e.evaluate||zr).source+"|$","g"),p=Yl.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
45
45
  `:"";n.replace(h,function(y,$,g,b,_,x){return g||(g=b),d+=n.slice(l,x).replace(cx,G_),$&&(a=!0,d+=`' +
@@ -97,7 +97,7 @@ version: 2.9.0
97
97
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
98
98
  * @name @vtj/ui
99
99
  * @author CHC chenhuachun1549@dingtalk.com
100
- * @version 0.7.2
100
+ * @version 0.7.4
101
101
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
102
102
  */const D7={default:14,small:12,large:18},A7={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function Er(n){return typeof n=="string"?n:`${n}px`}function Yr(n=0,e){if(typeof n=="number")return n;if(/(%|vh|vw)$/i.test(n)){const t=Number.parseInt(n);return Math.floor(e*t/100)}return Number.parseInt(n)}const O7=["src"],en=J({name:"XIcon",__name:"Icon",props:A7,setup(n){const e=n,t=ls(),r=kr(),i=L(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?Xt(e.icon):u?.component(e.icon)||e.icon}),o=L(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),s=L(()=>({"background-color":e.background,"border-radius":e.radius?Er(e.radius):void 0,padding:e.padding?Er(e.padding):void 0})),a=L(()=>typeof e.size=="number"?e.size:D7[e.size]??void 0);return(u,l)=>(k(),P(m($f),{class:Ee(["x-icon",o.value]),color:e.color,size:a.value,style:Gt(s.value)},{default:O(()=>[le(u.$slots,"default",{},()=>[i.value?(k(),P(it(i.value),{key:0})):Z("",!0),e.src?(k(),te("img",{key:1,src:e.src},null,8,O7)):Z("",!0)])]),_:3},8,["class","color","size","style"]))}}),Lp={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean}};function B7(n){return L(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function C7(n){return L(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function I7(n){return L(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function R7(n){const e=kr();return L(()=>{const t=m(n);if(t)if(typeof t=="string"||t.setup||t.render||yf(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function ia(n){const e=R7(n);return e.value?Xt(J({render:()=>Ye(en,e.value)})):void 0}function oa(n,e){return L(()=>{const t=m(n);return typeof t=="function"?t(e):!!t})}const M7={key:0},N7=J({__name:"Trigger",props:Lp,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=ia(di(t,"icon")),o=oa(di(t,"disabled")),s=L(()=>({[`is-${t.mode}`]:!!t.mode,[`is-${t.type}`]:!!t.type,[`is-${t.size}`]:!!t.size&&t.size!=="default",[`is-background-${t.background}`]:t.mode==="icon"&&!!t.background,"is-disabled":!!t.disabled,"is-circle":!!t.circle})),a=u=>{if(u.stopPropagation(),u.preventDefault(),!o.value)return r("click"),!1};return(u,l)=>t.mode==="button"?(k(),P(m(ze),je({key:0,icon:m(i),type:t.type,size:t.size,disabled:m(o)},t.button,{onClick:a}),{default:O(()=>[fe(ie(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(k(),te("div",{key:1,class:Ee(["x-action__inner",s.value]),onClick:a},[(k(),P(it(m(i)))),u.label?(k(),te("span",M7,ie(u.label),1)):Z("",!0)],2))}}),nt=J({name:"XAction",__name:"Action",props:Lp,emits:["click","command"],setup(n,{emit:e}){const t=n,r=vf(),i=e,o=B7(t),s=C7(t),a=I7(t),u=oa(di(t,"disabled")),l=L(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",Bn(t))},d=y=>{if(u.value)return;const $=t.menus?.find(g=>g.command===y);$&&i("command",Bn($))},h=y=>Ye(qu,s.value,()=>[].concat(y)),p=y=>Ye(ps,{...a.value,disabled:u.value,onCommand:d},{default:()=>[y],dropdown:()=>[Ye(ds,()=>(t.menus||[]).map($=>Ye(fi,$,()=>r.item?r.item({item:$}):$.label)))]}),f=y=>Ye(xi,{...o.value,disabled:u.value},()=>[y]),v=L(()=>{let y=r.default?r.default()[0]:Ye(Xt(N7),{...t,onClick:c});return s.value&&(y=h(y)),a.value&&(y=p(y)),o.value&&(y=f(y)),y});return(y,$)=>(k(),te("div",{class:Ee(["x-action",l.value])},[(k(),P(it(v.value)))],2))}}),P7={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},z7=J({name:"XActionBar",__name:"ActionBar",props:P7,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>(t.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...t.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...t.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),o=a=>{r("click",a)},s=(a,u)=>{r("command",a,u)};return(a,u)=>(k(),P(m(he),{class:"x-action-bar",align:"center"},{default:O(()=>[(k(!0),te(re,null,ae(i.value,l=>(k(),te(re,null,[l==="|"?(k(),P(m(vr),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(k(),P(m(nt),je({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:m(oa)(t.disabled,l).value},l,{onClick:o,onCommand:c=>s(l,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),F7={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},he=J({name:"XContainer",__name:"Container",props:F7,setup(n){const e=n,t=ls(),r=kr(),i=L(()=>{const a=r?.parent;if(!a)return!1;const u=a.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=L(()=>({"is-fit":e.fit,"is-flex":e.flex&&!e.inline,"is-inline-flex":e.flex&&e.inline,[`is-direction-${e.direction}`]:e.flex&&e.direction!=="row",[`is-wrap-${e.wrap}`]:e.flex&&e.wrap!=="nowrap",[`is-justify-${e.justify}`]:e.flex&&e.justify!=="flex-start",[`is-align-${e.align}`]:e.flex&&e.align!=="flex-start",[`is-align-content-${e.alignContent}`]:e.flex&&e.alignContent!=="stretch","is-grow":e.grow??i.value,"is-shrink":i.value&&e.shrink,[`is-align-self-${e.alignSelf}`]:i.value&&e.alignSelf!=="auto",[`is-overflow-${e.overflow}`]:!!e.overflow,"is-padding":!!e.padding,"is-pointer":e.autoPointer&&!!t.onClick,"is-gap":!!e.gap})),s=L(()=>{const{width:a,height:u,fit:l}=e;return l?null:{width:a?Er(a):void 0,height:u?Er(u):void 0}});return(a,u)=>(k(),P(it(e.tag),{class:Ee(["x-container",o.value]),style:Gt(s.value)},{default:O(()=>[le(a.$slots,"default")]),_:3},8,["class","style"]))}}),L7={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},H7={key:0,class:"x-header__actions"},U7=J({name:"XHeader",inheritAttrs:!1,__name:"Header",props:L7,setup(n){const e=n,t=ia(di(e,"icon")),r=ls(),i=L(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,s)=>(k(),P(m(he),{class:Ee(["x-header",i.value]),justify:"space-between",align:"center"},{default:O(()=>[T(m(he),{align:"center",class:Ee(["x-header__wrapper",i.value]),grow:""},{default:O(()=>[m(t)?(k(),P(it(m(t)),{key:0,class:"x-header__icon",onClick:m(r).onClickIcon||m(r).onClick},null,8,["onClick"])):Z("",!0),pe("span",{class:"x-header__content",onClick:s[0]||(s[0]=(...a)=>m(r).onClick&&m(r).onClick(...a))},[le(o.$slots,"default",{},()=>[fe(ie(e.content),1)])]),e.more?(k(),P(m(en),{key:1,class:"x-header__more",icon:m(Gu)},null,8,["icon"])):Z("",!0),e.subtitle||o.$slots.subtitle?(k(),te("span",{key:2,class:"x-header__subtitle",onClick:s[1]||(s[1]=(...a)=>m(r).onClick&&m(r).onClick(...a))},[le(o.$slots,"subtitle",{},()=>[fe(ie(e.subtitle),1)])])):Z("",!0)]),_:3},8,["class"]),o.$slots.actions?(k(),te("div",H7,[le(o.$slots,"actions")])):Z("",!0)]),_:3},8,["class"]))}}),q7={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Li=J({name:"XPanel",__name:"Panel",props:q7,setup(n,{expose:e}){const t=n,r=q(),i=L(()=>({"x-panel--card":!!t.card,"x-panel--default":!t.card,[`is-${t.size}`]:!!t.size&&t.size!=="default","is-border":!!t.border,"is-radius":!!t.radius,[`is-shadow-${t.shadow}`]:!!t.shadow&&t.shadow!=="none"})),o=L(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),s=L(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(a,u)=>(k(),P(m(he),{class:Ee(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:O(()=>[o.value?(k(),P(m(he),{key:0,flex:!1,class:"x-panel__header"},{default:O(()=>[le(a.$slots,"header",{},()=>[T(m(U7),Ot(Qt(o.value)),{default:O(()=>[le(a.$slots,"title")]),actions:O(()=>[le(a.$slots,"actions")]),_:3},16)])]),_:3})):Z("",!0),T(m(he),je({ref_key:"bodyRef",ref:r,flex:!1,overflow:s.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:O(()=>[le(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(k(),P(m(he),je({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:O(()=>[le(a.$slots,"footer")]),_:3},16)):Z("",!0)]),_:3},8,["class","fit","width","height"]))}}),Au="user-select-none";class Ou{constructor(e,t={}){this.el=e,this.options=t,this.scope=Fu(),this.scope.run(()=>{this.init()})}scope;dragging=!1;getHandle(){const{selector:e,handle:t}=this.options;return e?this.el.querySelector(e):t}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):m(e)||document.body}init(){const{el:e,options:t}=this,{disabled:r,delay:i=150,onStart:o,onEnd:s}=t;if(r)return;let a=null;const u=this.getHandle(),l=this.getTarget();let c=e.getBoundingClientRect(),d=null;const{x:h,y:p}=Qf(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(f,v)=>{document.body.classList.add(Au),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),d=l?.getBoundingClientRect(),o&&o(f,v)},i)},onEnd:(f,v)=>{if(clearTimeout(a),document.body.classList.remove(Au),this.dragging&&d){this.dragging=!1;const{x:y,y:$}=f,g=this.getPosition(d,c,y,$);s&&s(g,v),d=null}}});_e([h,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,h.value,p.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,t,r,i){const{edge:o=50}=this.options,s=-t.width+o,a=e.width-o,u=0,l=e.height-o,c=Math.min(a,Math.max(r,s)),d=Math.min(l,Math.max(i,u));return{x:c,y:d}}destory(){this.scope.stop()}}const W7={mounted(n,e){const t=e.value||{},r=new Ou(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!Gs(r.options,t)&&(r.destory(),n.__draggable__=new Ou(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},mo="user-select-none";class Bu{constructor(e,t={}){this.el=e,this.options=t,this.scope=Fu(),this.scope.run(()=>{this.init()})}scope;resizing=q(!1);direction=q("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=Xf(e),this.cleanMousedown=fa(document,"mousedown",()=>{this.direction?.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),i&&i(this.direction.value,this.MIE))}),this.cleanMouseup=fa(document,"mouseup",()=>{this.resizing.value&&this.direction?.value&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),o&&o(this.direction.value,this.MIE)),this.resizing.value=!1}),_e(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(mo):l.classList.remove(mo)});const{x:s,y:a}=this.MIE;_e([s,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:t,resizing:r,options:i,el:o}=this,s=t?.value||"";if(!e||!r.value||!s)return;const{x:a,y:u,elementX:l,elementY:c,elementHeight:d,elementWidth:h}=e,{onResizing:p}=i,{minWidth:f=0,minHeight:v=0,maxWidth:y=99999,maxHeight:$=99999}=i;if(s.includes("e")){const g=Math.min(Math.max(l.value,f),y);o.style.width=`${g}px`}if(s.includes("s")){const g=Math.min(Math.max(c.value,v),$);o.style.height=`${g}px`}if(s.includes("w")){const g=Math.min(Math.max(h.value-l.value,f),y);o.style.width=`${g}px`,o.style.left=`${a.value}px`}if(s.includes("n")){const g=Math.min(Math.max(d.value-c.value,v),$);this.el.style.height=`${g}px`,this.el.style.top=`${u.value}px`}p&&p(s,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:t,elementHeight:r,elementWidth:i,isOutside:o}=this.MIE;if(o.value)return"";const{dirs:s=["n","s","w","e"],edge:a=5}=this.options;let u="";return s.includes("n")&&t.value<=a?u+="n":s.includes("s")&&t.value>r.value-a&&(u+="s"),s.includes("w")&&e.value<=a?u+="w":s.includes("e")&&e.value>i.value-a&&(u+="e"),u}destory(){const e=document.body;e.style.cursor="",e.classList.remove(mo),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}}const is={mounted(n,e){const t=e.value||{},r=new Bu(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!Gs(r.options,t)&&(r.destory(),n.__resizable__=new Bu(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},J7={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let Pn=1e3;function Y7(n,e){const{width:t,height:r}=bs(e),i=gn({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++Pn,dragging:!1,resizing:!1});return _e([t,r],([o,s])=>{i.wrapperWidth=o,i.wrapperHeight=s,i.width=Yr(n.width,o),i.height=Yr(n.height,s),i.left=n.left?Yr(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?Yr(n.top,s):Math.max(Math.floor((s-i.height)/2),0)}),_e(i,o=>{Pn=Math.max(o.zIndex,Pn)}),{state:i,normal:L(()=>i.mode==="normal"),maximized:L(()=>i.mode==="maximized"),minimized:L(()=>i.mode==="minimized")}}function K7(n,e){const t=L(()=>{const{width:s,height:a,top:u,left:l,zIndex:c}=e;return{width:`${s}px`,height:`${a}px`,top:`${u}px`,left:`${l}px`,zIndex:c}}),r=L(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=L(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=L(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function Z7(n,e,t){const r=o=>{e.mode=o,["maximized","minimized","normal"].includes(o)&&t(o),t("modeChange",o)},i=async()=>{(!n.beforeClose||await n.beforeClose())&&(t("update:modelValue",!1),t("close"),t("destroy"))};return{close:i,changeMode:r,show:()=>r("normal"),hide:()=>r("minimized"),active:o=>{const s=o.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(s.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++Pn))},submit:()=>t("submit"),cancel:()=>{t("cancel"),i()}}}function G7(n,e,t,r){return L(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Ne(n.draggable)?n.draggable:{},disabled:i,target:r,selector:".x-panel__header",onStart(o){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++Pn),t("dragStart",o)},onMove(o){t("dragging",o)},onEnd(o){if(e.mode==="maximized")return;const{x:s,y:a}=o;e.left=s,e.top=a,e.dragging=!1,t("dragEnd",o)}}})}function X7(n,e,t){return L(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Ne(n.resizable)?n.resizable:{},disabled:r,dirs:["e","s","w"],onStart(i,o){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++Pn),t("resizeStart",i,o)},onResizing(i,o){t("resizing",i,o)},onEnd(i,o){e.left=o.elementPositionX.value,e.top=o.elementPositionY.value,e.width=o.elementWidth.value,e.height=o.elementHeight.value,e.resizing=!1,t("resizeEnd",i,o)}}})}function Q7(n,e){const t=n.componentInstance;if(!t)return;let r=null;return cs(()=>{const i=m(e),o=m(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),hs(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const e$=["src"],$n=J({name:"XDialog",__name:"Dialog",props:J7,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=kr(),s=q(),a=q(),{state:u,maximized:l,minimized:c,normal:d}=Y7(r,s),{styles:h,classes:p,wrapperClass:f,modalStyle:v}=K7(r,u),{changeMode:y,active:$,close:g,show:b,hide:_,submit:x,cancel:w}=Z7(r,u,i),E=G7(r,u,i,s),A=X7(r,u,i),H=Q7(r,a);us(async()=>{r.modelValue&&(await Jt(),o&&i("open",o))});const S=L(()=>a.value?.$el);return e({$vtjEl:S,panelRef:a,state:u,maximized:l,minimized:c,changeMode:y,show:b,hide:_,submit:x,cancel:w,componentInstance:H}),(j,N)=>r.modelValue?(k(),P(gf,{key:0,to:"body"},[pe("div",{ref_key:"wrapper",ref:s,class:Ee(["x-dialog__wrapper",m(f)])},[r.modal?(k(),te("div",{key:0,class:"x-dialog__modal",style:Gt(m(v))},null,4)):Z("",!0),Cn((k(),P(m(Li),je({ref_key:"panelRef",ref:a,class:["x-dialog",m(p)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:m(h),size:r.size,body:{padding:r.bodyPadding},onClick:m($)},j.$attrs),zn({title:O(()=>[fe(ie(r.title),1)]),actions:O(()=>[le(j.$slots,"actions"),r.minimizable?(k(),P(m(nt),{key:0,icon:m(yh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[0]||(N[0]=V=>m(y)("minimized"))},null,8,["icon","size"])):Z("",!0),r.maximizable?(k(),te(re,{key:1},[m(d)?(k(),P(m(nt),{key:1,icon:m(gh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[2]||(N[2]=V=>m(y)("maximized"))},null,8,["icon","size"])):(k(),P(m(nt),{key:0,icon:m(bh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[1]||(N[1]=V=>m(y)("normal"))},null,8,["icon","size"]))],64)):Z("",!0),r.closable?(k(),P(m(nt),{key:2,icon:m(wh),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:m(g)},null,8,["icon","size","onClick"])):Z("",!0)]),default:O(()=>[le(j.$slots,"default",{},()=>[r.content?(k(),P(it(r.content),{key:0})):Z("",!0),r.src?(k(),te("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,e$)):Z("",!0)])]),_:2},[r.cancel||r.submit||j.$slots.footer||j.$slots.extra||j.$slots.handle?{name:"footer",fn:O(()=>[le(j.$slots,"footer",{},()=>[T(m(he),{align:"center"},{default:O(()=>[le(j.$slots,"extra")]),_:3}),T(m(he),{align:"center"},{default:O(()=>[le(j.$slots,"handle"),r.cancel?(k(),P(m(ze),{key:0,type:"default",size:r.size,onClick:m(w)},{default:O(()=>[fe(ie(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Z("",!0),r.submit?(k(),P(m(ze),{key:1,type:"primary",size:r.size,onClick:m(x)},{default:O(()=>[fe(ie(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):Z("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[m(W7),m(E)],[m(is),m(A)]])],2)])):Z("",!0)}});function Hp(n,e){const t=document.createElement("div"),r=T($n,n);r.appContext=e??Hp._context,ca(r,t);const i=()=>{ca(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const t$=J({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(k(),P(m(Yu),Ot(Qt(t.$attrs)),{default:O(()=>[(k(!0),te(re,null,ae(e.options,(i,o)=>(k(),P(m(Ju),je({key:`item_${o}_${i.value}`},i),zn({_:2},[t.$slots.option?{name:"default",fn:O(()=>[le(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),n$=J({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=L(()=>Xt(e.button?Vf:Df));return(r,i)=>(k(),P(m(Af),Ot(Qt(r.$attrs)),{default:O(()=>[(k(!0),te(re,null,ae(e.options,(o,s)=>(k(),P(it(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:O(()=>[fe(ie(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),r$=J({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=L(()=>Xt(e.button?Xr:Of));return(r,i)=>(k(),P(m(Ku),Ot(Qt(r.$attrs)),{default:O(()=>[(k(!0),te(re,null,ae(e.options,(o,s)=>(k(),P(it(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:O(()=>[fe(ie(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),Up={none:{component:"div",props:{class:"x-field-none"}},text:{component:mt,props:{clearable:!0},defaultValue:""},textarea:{component:mt,props:{type:"textarea",rows:2},defaultValue:""},select:{component:t$,props:{clearable:!0}},checkbox:{component:n$,props:{},defaultValue:[]},radio:{component:r$,props:{}},number:{component:Wu,props:{}},date:{component:ha,props:{}},time:{component:jf,props:{}},datetime:{component:ha,props:{type:"datetime"}},switch:{component:fs,props:{}},rate:{component:Ef,props:{}},slider:{component:kf,props:{}},cascader:{component:Tf,props:{}}},i$={name:{type:String},label:{type:String},editor:{type:[String,Object],default:"text"},props:{type:Object},modelValue:{type:[String,Number,Boolean,Object,Array],default(n){return Up[n.editor]?.defaultValue}},size:{type:String},width:{type:[String,Number]},tooltipMessage:{type:[Boolean,Object],default:!0},tooltipPosition:{type:[String,Number],default:"outer"},placeholder:{type:String},disabled:{type:Boolean},readonly:{type:Boolean},options:{type:[Array,Function]},visible:{type:[Boolean,Object,Function],default:!0},cascader:{type:[String,Array]},error:{type:String},tip:{type:String},inline:{type:Boolean}};async function o$(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function s$(n,e,t,r,i){const o=q([]),s=L(()=>!r||!i?{}:mp(n.cascader).reduce((a,u)=>(a[u]=ii(i,u),a),{}));return _e(s,async a=>{if(t.value){o.value=await o$(n,a);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:L(()=>{const{editor:a="text",placeholder:u,label:l="...",disabled:c,readonly:d}=n,h={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:d,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:f=>e("change",f)},p=typeof a=="string"?Up[a]:{component:a,props:{}};return Kt({},p,{props:h})})}}const a$={key:1,class:"el-form-item__error"},l$={key:0,class:"x-field__tip"},ne=J({name:"XField",__name:"Field",props:i$,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=hr(qp,null),s=hr(_f,null),a=hr(Wp,null),u=L(()=>!o?.proxy||!a?r.visible:typeof r.visible=="function"?r.visible(a):Ne(r.visible)?Object.entries(r.visible).every(([x,w])=>ii(a,x)===w):r.visible),l=()=>o?.proxy&&a&&r.name?ii(a,r.name)??r.modelValue:r.modelValue,c=q(l()),{editor:d}=s$(r,i,u,o,a),h=q(),p=q(),f=L(()=>r.size||s?.size||"default"),v=L(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),y=(x="")=>r.error?r.error:x.includes("is required")?`${r.label||r.name}是必填项!`:x,$=L(()=>{const x=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!x&&!!r.tooltipPosition}}),g=L(()=>{const x=o?.proxy;return{width:r.width?Er(r.width):x&&x.inline&&x.inlineColumns?`${100/x.inlineColumns}%`:null}}),b=L(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),_=L(()=>({...d.value.props,modelValue:c.value,"onUpdate:modelValue":x=>{c.value=x}}));return _e(c,(x,w)=>{u.value&&!Gs(x,w)&&(i("update:modelValue",x),o?.proxy&&a&&r.name&&ro(a,r.name,x))}),_e(()=>!o?.proxy||!r.name||!a?r.modelValue:ii(a,r.name)??r.modelValue,x=>{u.value&&(c.value=x)},{immediate:!0}),_e(u,x=>{o?.proxy&&a&&r.name&&(x?(c.value=l(),ro(a,r.name,c.value)):(c.value=void 0,ro(a,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:h,editorRef:p,focus:()=>{p.value?.focus&&p.value.focus()},blur:()=>{p.value?.foucs&&p.value.blur()}}),(x,w)=>u.value?(k(),P(m(Uu),je({key:0,class:["x-field",$.value],ref_key:"itemRef",ref:h,prop:r.name,label:x.label,size:f.value,style:g.value},x.$attrs),zn({error:O(({error:E})=>[le(x.$slots,"error",{error:E},()=>[m(o)?.props.tooltipMessage??r.tooltipMessage?(k(),te("div",{key:0,class:"x-field__info",style:Gt(b.value)},[T(m(xi),je({content:y(E)},v.value),{default:O(()=>[T(m(en),{class:"x-field__trigger",icon:m(Yf),size:f.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(k(),te("div",a$,ie(y(E)),1))])]),default:O(()=>[pe("div",{class:Ee(["x-field__editor_wrap",{"is-inline":r.inline}])},[le(x.$slots,"editor",{editor:_.value},()=>[m(d).component?(k(),P(it(m(d).component),je({key:0,class:"x-field__editor",ref_key:"editorRef",ref:p,modelValue:c.value,"onUpdate:modelValue":w[0]||(w[0]=E=>c.value=E)},m(d).props),zn({_:2},[x.$slots.option?{name:"option",fn:O(({option:E})=>[le(x.$slots,"option",{option:E})]),key:"0"}:void 0]),1040,["modelValue"])):Z("",!0)]),r.tip||x.$slots.tip?(k(),te("div",l$,[le(x.$slots,"tip",{},()=>[fe(ie(r.tip),1)])])):Z("",!0)],2),le(x.$slots,"default")]),_:2},[x.$slots.label?{name:"label",fn:O(()=>[le(x.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):Z("",!0)}}),u$={model:{type:Object,default(){return Object.create(null)}},inline:{type:Boolean},inlineColumns:{type:Number},footer:{type:Boolean,default:!0},submitText:{type:String,default:"提交"},resetText:{type:String,default:"重置"},submitMethod:{type:Function},tooltipMessage:{type:[Object,Boolean],default:void 0}},qp=Symbol("formInstanceKey"),Wp=Symbol("formModelKey"),Jp=J({name:"XForm",__name:"Form",props:u$,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=kr(),s=q(),a=gn(r.model||{}),u=q(!1);ua(qp,o),ua(Wp,a),_e(a,()=>{i("change",Bn(a))}),_e(()=>r.model,d=>{Object.assign(a,d)},{deep:!0});const l=async()=>{await s.value.validate().catch(()=>!1)&&(i("submit",Bn(a)),r.submitMethod&&(u.value=!0,await r.submitMethod(Bn(a)),u.value=!1))},c=d=>{s.value.resetFields(d),i("reset")};return e({formRef:s,model:a,submit:l,reset:c}),(d,h)=>(k(),P(m(pr),je({ref_key:"formRef",ref:s,class:"x-form",inline:r.inline,model:a,onKeyup:dr(l,["enter"]),onSubmit:h[1]||(h[1]=In(()=>{},["stop","prevent"]))},d.$attrs),{default:O(()=>[le(d.$slots,"default"),r.footer?(k(),P(m(ne),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:O(()=>[le(d.$slots,"footer",{},()=>[r.submitText?(k(),P(m(ze),{key:0,loading:u.value,type:"primary",onClick:l},{default:O(()=>[fe(ie(r.submitText),1)]),_:1},8,["loading"])):Z("",!0),r.resetText?(k(),P(m(ze),{key:1,type:"default",onClick:h[0]||(h[0]=()=>c())},{default:O(()=>[fe(ie(r.resetText),1)]),_:1})):Z("",!0),le(d.$slots,"action")])]),_:3})):Z("",!0)]),_:3},16,["inline","model"]))}}),c$={modelValue:{type:Boolean,default:!0},size:{type:String},formProps:{type:Object},submit:{type:[Boolean,String],default:"确定"},cancel:{type:[Boolean,String],default:"取消"},model:{type:Object,default(){return Object.create(null)}},rules:{type:Object},submitMethod:{type:Function}},kt=J({name:"XDialogForm",__name:"DialogForm",props:c$,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=q(),s=q(),a=L(()=>s.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async p=>{i("submit",p),r.submitMethod?await r.submitMethod(p)&&l():l()},d=L(()=>r.formProps?.disabled?!1:r.submit),h=L(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:a,formRef:o,dialogRef:s}),(p,f)=>(k(),P(m($n),je({ref_key:"dialogRef",ref:s,class:"x-dialog-form","model-value":r.modelValue,submit:d.value,cancel:h.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},p.$attrs),zn({default:O(()=>[T(m(Jp),je({ref_key:"formRef",ref:o,class:"x-dialog-form__form",footer:!1,"label-width":"80px",size:r.size,model:r.model,rules:r.rules,"submit-method":c},r.formProps),{default:O(()=>[le(p.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[p.$slots.extra?{name:"extra",fn:O(()=>[le(p.$slots,"extra")]),key:"0"}:void 0,p.$slots.handle?{name:"handle",fn:O(()=>[le(p.$slots,"handle")]),key:"1"}:void 0,p.$slots.footer?{name:"footer",fn:O(()=>[le(p.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),h$={items:{type:Array,default(){return[]}},border:{type:Boolean}},Yp=J({name:"XTabs",__name:"Tabs",props:h$,setup(n){const e=n,t=i=>{const{label:o,name:s,value:a,disabled:u,closable:l,lazy:c}=i;return{label:o,name:a??s,disabled:u,closable:l,lazy:c}},r=L(()=>({"is-no-border":!e.border}));return(i,o)=>(k(),P(m(Sf),je({class:["x-tabs",r.value]},i.$attrs),{default:O(()=>[(k(!0),te(re,null,ae(e.items,s=>(k(),P(m(xf),je({key:s.value??s.name},t(s)),{label:O(()=>[le(i.$slots,"label",Ot(Qt(s)),()=>[s.icon?(k(),P(it(m(ia)(s.icon)),{key:0,class:"x-tabs__icon"})):Z("",!0),fe(" "+ie(s.label),1)])]),default:O(()=>[le(i.$slots,"default",Ot(Qt(s)),()=>[s.component?(k(),P(it(s.component),Ot(je({key:0},s.props)),null,16)):Z("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}});var rt=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(rt||{});const Cu=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],d$=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],p$=["vIf","vShow","vModel","vFor","vBind"],Kp={String,Number,Boolean,Array,Object,Function,Date};function Kr(n,e){return n.map(t=>Ux(t)?t:`${e}${t}`)}function Zp(n){return/\.css$/.test(n)}function Gp(n){return/\.js$/.test(n)}function Iu(n){return n.map(e=>`<script src="${e}"><\/script>`).join("")}function f$(n=[]){return n.map(e=>`<link rel="stylesheet" href="${e}" />`).join("")}function Xp(n,e){const t=n.filter(c=>!!c.enabled),r=[],i=[],o=[],s=[],a={},u=[],l={};return t.forEach(({urls:c,assetsUrl:d,library:h,assetsLibrary:p})=>{c?.forEach(f=>{Gp(f)&&r.push(f),Zp(f)&&i.push(f)}),h&&(s.push(h),a[h]=Kr(c||[],e)),d&&o.push(d),p&&u.push(p),h&&p&&(l[p]=h)}),{scripts:Kr(r,e),css:Kr(i,e),materials:Kr(o,e),libraryExports:s,materialExports:u,materialMapLibrary:l,libraryMap:a}}function Qp(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function ef(n){return Xn(n)?n:JSON.stringify(n)}function tf(n,e,t){const r=n.CSSStyleSheet;if(r.prototype.replaceSync){const i=new r;i.id=e,i.replaceSync(t);const o=n.document,s=o.adoptedStyleSheets,a=Array.from(s).filter(u=>u.id!==e);o.adoptedStyleSheets=[...a,i]}else{const i=n.document;let o=i.getElementById(e);o?o.innerHTML=t:(o=i.createElement("style"),o.id=e,o.innerHTML=t,i.head.appendChild(o))}}async function m$(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&tf(window,n,t)}function v$(n){return wr(n)||wr(n?.install)}var wi=function(){return wi=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},wi.apply(this,arguments)},os={debug:-1,log:0,info:0,warn:1,error:2},g$=function(n,e,t,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e&&os[e]<=os[n]&&console[n].apply&&(r==="*"||t.startsWith(r)))return console[n].apply(console,y$(i,t))}};function y$(n,e){return e!=="*"&&(typeof n[0]=="string"?n[0]="["+e+"] "+n[0]:n=["["+e+"]"].concat(n)),n}function b$(n,e){if(!n)return{targetLevel:e.level,targetBizName:e.bizName};if(~n.indexOf(":")){var t=n.split(":");return{targetLevel:t[0],targetBizName:t[1]}}return{targetLevel:n,targetBizName:"*"}}var w$={level:"warn",bizName:"*"},_$=function(){function n(e){e=wi(wi({},w$),e);var t=location||{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(t.href)||[])[1],i=b$(r,e),o=i.targetLevel,s=i.targetBizName;for(var a in os)this[a]=g$(a,o,e.bizName,s)}return n}();function x$(n){return new _$(n)}const ot=x$({level:"log",bizName:"VTJ"});function tn(n,e,t=!1,r=!1){try{const i=['"use strict";',"var __self = arguments[0];"];i.push("return ");let o=(n.value||"").trim();o=o.replace(/this(\W|$)/g,(a,u)=>`__self${u}`),o=i.join(`
103
103
  `)+o;const s=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",s)(e)}catch(i){if(ot.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function ss(n,e,t=!1,r=!1){const i=tn(n,e,t,r);if(typeof i!="function"&&(ot.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function Le(n){return n&&n.type==="JSExpression"}function Ar(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function S$(n){return Le(n)||Ar(n)}function qn(n){return S$(n)?n.value:JSON.stringify(n)}let Vn=null;const $$=Pp({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{yn.error({message:n||"未知错误"})},showLoading:()=>{Vn&&Vn.close(),Vn=Zu.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{Vn&&(Vn.close(),Vn=null)}}});function j$(n,e){const{jsonp:t,request:r}=e;if(n.method==="jsonp")return(i={})=>t(n.url,{...n.jsonpOptions,query:i});{const i=n.headers?tn(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(s,a)=>r.send(Kt(o,a||{},{data:s}))}}function nf(n=[],e){return n.reduce((t,r)=>(t[r.id]=j$(r,e),t),{})}class E${__id=null;__mode;__instance=null;__contextRefs={};__refs={};context={};state={};$props={};$refs={};$el=null;$emit=null;$nextTick=null;$parent=null;$root=null;$attrs=null;$slots=null;$watch=null;$options=null;$forceUpdate=null;$components={};$libs={};$apis={};__transform={};constructor(e){const{mode:t,dsl:r,attrs:i}=e;this.__mode=t,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),i&&Object.assign(this,i)}setup(e,t=Si){const r=t.getCurrentInstance();if(!r)return;this.__instance=r.proxy;const i=r.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,e||{}),this.__proxy(),t.onMounted(()=>{this.__proxy()}),t.onUnmounted(()=>{this.__cleanup()})}__proxy(){this.__instance&&Cu.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){Cu.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===rt.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return ss({type:r,value:i},this)}else return ss(e,this)}__parseExpression(e){if(e)if(this.__mode===rt.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return tn({type:r,value:i},this)}else return tn(e,this)}__ref(e=null,t){if(this.__mode!==rt.VNode)return e&&e!==this.__id&&(this.__contextRefs[e]=this),r=>{let i=r?.$vtjEl||r?.$el||r;if(!i){typeof t=="string"&&(delete this.$refs[t],e&&delete this.__refs[e]);return}if(i.__vtj__=e,i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),rt.Design===this.__mode&&(i.__context__=this),e&&(this.__refs[e]=r),typeof t=="function")t(r);else if(t){const o=this.$refs[t];if(o){const s=new Set([].concat(o,r));this.$refs[t]=Array.from(s)}else this.$refs[t]=r}return r}}__clone(e={}){const t={...this.context,...e},r={...t,context:t};return r.context.__proto__=this.context,r.__proto__=this,r}}function sa(n){const{Vue:e=Si,mode:t=rt.Runtime,components:r={},libs:i={},apis:o={},loader:s}=n,a=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new E$({mode:t,dsl:a.value,attrs:u}),c=e.defineComponent({name:a.value.name,props:{...k$(a.value.props??[],l)},setup(d){l.$props=d,a.value.id&&tf(n.window||window,a.value.id,a.value.css||""),l.state=T$(e,a.value.state??{},l);const h=V$(e,a.value.computed??{},l),p=D$(a.value.methods??{},l),f=A$(e,a.value.inject,l),v=O$(a.value.dataSources||{},l),y={...f,...h,...p,...v};return l.setup(y,e),B$(e,a.value.watch??[],l),{vtj:l}},emits:[...a.value.emits??[]],expose:["vtj"],render(){if(!a.value.nodes)return null;const d=a.value.nodes||[];return d.length===1?_i(d[0],l,e,s):d.map(h=>_i(h,l,e,s))},...C$(a.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function k$(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>Kp[i]):void 0;return n.map(r=>Xn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Le(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,i)=>(r[i.name]={type:t(i.type),required:i.required,default:i.default},r),{})}function T$(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return Le(o)?o=t.__parseExpression(o):Ar(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function V$(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function D$(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function A$(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:s}=i||{};i.default;const a=Le(s)?t.__parseExpression(s)||o:s??o,u=Le(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(a,u),r},{})}function O$(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],s=Ar(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;return t[r]=async(...a)=>{const u=await o.apply(e,a);return s?s(u):u},t},{})}function B$(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function C$(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const I$=n=>n;function aa(n){const{getDsl:e,options:t}=n;return(r,i,o=Si)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const s=await e(i.id);return s?sa({...t,Vue:o,dsl:s,mode:rt.Runtime,loader:aa(n)}).renderer:null}):r}function _i(n,e,t=Si,r=I$){if(!n||!n.name||n.invisible)return null;const{id:i=null,directives:o=[]}=n,{vIf:s,vFor:a,vShow:u,vModels:l,vBind:c}=R$(o);if(s&&!M$(s,e))return null;const d=h=>{const p=h.$components,f=(()=>{if(n.name==="component")return N$(h,n.props?.is);if(n.name==="slot")return n.name;const g=r(n.name,n.from,t);return Xn(g)?p[g]??g:g})(),v=P$(i,n.props??{},h),y=z$(t,n.events??{},h);if(n.name==="slot")return F$(t,n,v,h);c&&Object.assign(v,h.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},H$(u,h))),l.forEach(g=>{Object.assign(v,U$(t,g,h))});const $=q$(t,n.children??[],h,n);return t.createVNode(f,{...v,...y},$)};return a?Y$(a,d,e):d(e)}function R$(n=[]){const e=n.find(a=>dn(a.name)==="vIf"),t=n.find(a=>dn(a.name)==="vFor"),r=n.find(a=>dn(a.name)==="vShow"),i=n.find(a=>dn(a.name)==="vBind"),o=n.filter(a=>dn(a.name)==="vModel"),s=n.filter(a=>!p$.includes(dn(a.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:s}}function M$(n,e){return!!e.__parseExpression(n.value)}function N$(n,e){return e?Le(e)?n.__parseExpression(e):e:"div"}function P$(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let s=e[o];return Le(s)?s=t.__parseExpression(s):Ar(s)&&(s=t.__parseFunction(s)),i[o]=s,i},{});return r.ref=t.__ref(n,r.ref),r}function z$(n,e,t){const r=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(e||{}).reduce((o,s)=>{const a=e[s],u=rf(a.modifiers),l=u.find(h=>r.includes(h)),c="on"+Ys(s)+(l&&i[l]||""),d=t.__parseFunction(a.handler);return d&&(o[c]=n.withModifiers(d,u)),o},{})}function rf(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function F$(n,e,t,r){const{children:i}=e,o=L$(e,r),s=r.$slots?.[o.name];return s?s(t):i?Xn(i)?n.createTextVNode(i):Le(i)?n.createTextVNode(ef(r.__parseExpression(i))):Array.isArray(i)?i.map(a=>_i(a,r,n)):null:null}function L$(n,e){const{props:t}=n,r=t?.name||"default";return{name:Le(r)?e.__parseExpression(r):r,params:[]}}function H$(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function U$(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
@@ -106,9 +106,9 @@ version: 2.9.0
106
106
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
107
107
  * @name @vtj/designer
108
108
  * @author CHC chenhuachun1549@dingtalk.com
109
- * @version 0.7.2
109
+ * @version 0.7.4
110
110
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
111
- */const ej="0.7.2",Mu={width:390,height:844},Nu={width:1180,height:820},Rt=/^[A-Za-z_$][\w_-]*$/,tj=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],nj=["keydown","keyup","keypress"],rj=["GET","POST","PUT","PATCH","DELETE","JSONP"],ij=["stop","prevent","capture","self","once","passive"];var dt=(n=>(n.Block="block",n.Node="node",n))(dt||{});const af="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC",oj=["title","src"],sj={key:1},aj=J({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:af},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(k(),te("div",{class:"v-logo-widget",onClick:t},[e.icon?(k(),te("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,oj)):(k(),te("span",sj,ie(e.text),1))]))}}),lj={class:"v-empty-widget"},uj=J({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(k(),te("div",lj,"EmptyWidget"))}});function lf(){const n=Ge(),e=L(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function an(n,e){const t=L(()=>pf.getWidgets(m(n),m(e)).filter(i=>!i.invisible)),r=q();return{widgets:t,widgetsRef:r}}function uf(){const n=Ge();return{span:L(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function cj(){const n=Ge(),e=L(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const hj=(n=[])=>n.map(e=>e.name);function dj(){const n=Ge(),{components:e,groups:t,componentMap:r}=n.assets,i=gn({}),o=L(()=>{const d={};return t.value&&t.value.forEach(h=>{d[h.name]=h}),d}),s=L(()=>t.value?t.value.map(d=>({label:`${d.label} (${d.count})`,name:d.name,disabled:!d.children?.length})):[]),a=q(s.value[0]?.name),u=q(""),l=L(()=>o.value[a.value]);us(()=>{const d=s.value.reduce((h,p)=>(h[p.name]=hj(o.value[p.name].children),h),{});Object.assign(i,d)});const c=L(()=>{const d=u.value.toLowerCase();return!d||!e?[]:e.filter(h=>h.name.toLowerCase().includes(d)||h.label?.toLowerCase().includes(d))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function He(){const n=Ge(),e=L(()=>n.current.value),t=L(()=>n.context.value),r=L(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function pj(n,e){const t=Ge();t.simulator.init(n,e);const r=L(()=>t.simulator.designer.value),i=L(()=>vo("hover",r.value?.hover.value)),o=L(()=>vo("dropping",r.value?.dropping.value)),s=L(()=>vo("selected",r.value?.selected.value));return{designer:r,dropping:o,hover:i,selected:s}}function fj(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let s,a;return a=t>30?"top":"bottom",s=e||o<300&&i<300?"left":"right",[s,a].join("-")}function mj(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:s}=e,a={left:r,width:i,top:o,height:s};switch(t){case"left":a.left=0,a.width=0;break;case"right":a.left=a.left+a.width-4,a.width=0;break;case"bottom":a.top=a.top+a.height-4,a.height=0;break;case"top":a.height=0;break}return a}function vo(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?mj(e):e.rect,s={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:s,position:fj(e.rect,n!=="selected")}}function Mt(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>e.value?.selected.value),r=L(()=>Oe(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function vj(n,e){const t=q(""),{selected:r,isSelectBlock:i}=Mt(),o=L(()=>r.value?.model.id),s=L(()=>{const u=bo(n),l=bo(e),c=[];if(!u)return c;const d=l?.__contextRefs[o.value||""],h=l===d||i.value?[]:Object.keys(d?.context||{}).filter(_=>!["context","ref"].includes(_)).map(_=>`this.context.${_}`);h.length&&c.push({title:"上下文",items:h});const p=u.inject.map(_=>`this.${_.name}`);p.length&&c.push({title:"注入",items:p});const f=u.props.map(_=>typeof _=="string"?`this.$props.${_}`:`this.$props.${_.name}`);f.length&&c.push({title:"属性",items:f});const v=Object.keys(u.state).map(_=>`this.state.${_}`);v.length&&c.push({title:"状态",items:v});const y=Object.keys(u.computed).map(_=>`this.${_}.value`);y.length&&c.push({title:"计算属性",items:y});const $=Object.keys(u.methods).map(_=>`this.${_}`);$.length&&c.push({title:"方法",items:$});const g=Object.keys(u.dataSources).map(_=>`this.${_}`);g.length&&c.push({title:"数据源",items:g});const b=Object.keys(l?.$refs||{}).map(_=>`this.$refs.${_}`);return b.length&&c.push({title:"refs",items:b}),c}),a=L(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const d=c.items.filter(h=>h.toLowerCase().includes(u));d.length&&l.push({title:c.title,items:d})}),l});return{keyword:t,options:s,searchResult:a}}const Zr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function gj(n){const e=Ge(),t=L(()=>{const u=n.value?.model||null;return Oe(u)?null:u}),r=q();_e(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=L(()=>t.value?[{name:"key",setters:Zr,value:t.value.getPropValue("key")},{name:"ref",setters:Zr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:Zr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:Zr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=L(()=>{if(!t.value)return[];const u=r.value||e.assets.componentMap.get(t.value.name);return u?(u.props||[]).map(l=>({...l,value:t.value?.getPropValue(l.name)??l.defaultValue})):[]}),s=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",a=L(()=>t.value?Object.keys(t.value.props).filter(u=>!s(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:a,node:t,change:(u,l)=>{t.value&&(u==="children"?t.value.setChildren(l):t.value.setProp(u,l))},addCustom:u=>{u&&t.value?.setProp(u,"")},removeCustom:u=>{t.value?.removeProp(u)},isExist:s}}function Me(n,e="提示"){return yn.warning({title:e,message:n})}async function tr(n){return await gs.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function et(n,e="success"){return vs({message:n,type:e})}function Fe(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?tn(n,e,t,!0):ss(n,e,t,!0)}catch(i){r=!1,yn.error({title:"代码错误",message:i.message})}return r}function cf(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>n.current.value?n.history.value:null),r=L(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},s=l=>{e.value?.cleanHelper(),t.value?.load(l),et("已载入历史记录","success")},a=L(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=L(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:s,forwardDisabled:a,backwardDisabled:u}}function Hi(){const n=Ge(),e=L(()=>n.project.value);return{engine:n,project:e}}function yj(n){const e=Ge(),t=L(()=>{const a=n.value?.model||null;return Oe(a)?null:a}),r=q();_e(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=L(()=>{if(Oe(t.value))return[];const a=t.value?.events||{};return tj.map(u=>({name:u,event:a[u]}))}),o=L(()=>{if(Oe(t.value))return[];const a=t.value?.events||{};return nj.map(u=>({name:u,event:a[u]}))}),s=L(()=>{if(!t.value||Oe(t.value))return[];const a=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(u=>{const l=typeof u=="string"?u:u.name;return{name:l,event:a[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:s}}const bj=(n,e)=>new On({name:n,value:void 0,iterator:e}),wj=(n="modelValue")=>new On({name:"vModel",value:void 0,arg:n});function _j(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(o=>o.includes(i.name))):[]}return[]}function xj(n){const e=Ge(),t=L(()=>{const d=n.value?.model||null;return Oe(d)?null:d}),r=d=>L(()=>t.value&&(t.value.directives||[]).find(h=>h.name===d)||bj(d)),i=()=>L(()=>{if(!t.value)return[];const d=e.assets.componentMap.get(t.value.name||"");return(d?_j(d):[]).map(h=>(t.value?.directives||[]).find(p=>p.name==="vModel"&&p.arg==h.name)||wj(h.name))}),o=r("vIf"),s=r("vShow"),a=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:s,vBind:a,vFor:u};return{engine:e,node:t,vIf:o,vShow:s,vBind:a,vFor:u,vModels:l,onValueChange:(d,h)=>{const p=c[d];t.value&&(h?(p.value.value=h,t.value.setDirective(p.value)):(p.value.value=void 0,t.value.removeDirective(p.value)))},onForChange:(d,h)=>{if(t.value){if(d==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(d==="item"||d==="index")&&(u.value.iterator={...u.value.iterator,[d]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(d,h)=>{if(!t.value)return;const p=parseInt(d),f=l.value[p];f&&(h?(f.value=h,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function Sj(){const{engine:n,project:e}=Hi(),t=L(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const $j={class:"v-switcher-widget"},jj={key:1},Ej=J({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=He(),i=L(()=>r.project.value?.name),o=L(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(k(),te("div",$j,[T(m(ze),{size:"small",round:"",onClick:s},{default:O(()=>[T(m(_h),{class:"v-switcher-widget__back"}),pe("span",null,ie(i.value),1),o.value?(k(),P(m(vr),{key:0,direction:"vertical"})):Z("",!0),o.value?(k(),te("span",jj,ie(o.value),1)):Z("",!0)]),_:1})]))}}),kj={class:"v-toolbar-widget"},Tj=J({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:s}=cf(),a=q("pc");return e({mode:a}),(u,l)=>(k(),te("div",kj,[T(m(Ku),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:O(()=>[T(m(Xr),{label:"pc"},{default:O(()=>[T(m(Th))]),_:1}),T(m(Xr),{label:"mobile"},{default:O(()=>[T(m(Vh))]),_:1}),T(m(Xr),{label:"pad"},{default:O(()=>[T(m(Dh))]),_:1})]),_:1},8,["modelValue"]),Z("",!0),T(m(Bf),null,{default:O(()=>[T(m(ze),{type:"default",size:"small",onClick:m(i),disabled:m(s)||!!t.preview},{default:O(()=>[T(m(Bh))]),_:1},8,["onClick","disabled"]),T(m(ze),{type:"default",size:"small",onClick:m(r),disabled:m(o)||!!t.preview},{default:O(()=>[T(m(Ah))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),Vj={class:"v-actions-widget"},Dj=pe("span",null,"发布",-1),Aj=J({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=Mt(),r=q(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),et("刷新完成","success")):et("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await fp(1e3)),t.value?.setSelected(e.current.value)):et("请先打开文件","warning")},s=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else et("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):et("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(k(),te("div",Vj,[T(m(qu),{value:0,max:99,hidden:!0},{default:O(()=>[T(m(nt),{mode:"icon",icon:m(Ih),background:"hover"},null,8,["icon"])]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ze),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:O(()=>[T(m(Eh))]),_:1},8,["type"]),T(m(ze),{onClick:i,type:"default",size:"small",title:"刷新"},{default:O(()=>[T(m(Oh))]),_:1}),T(m(ze),{type:"default",size:"small",title:"页面设置",onClick:o},{default:O(()=>[T(m(Rh))]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ps),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:O(()=>[T(m(ds),null,{default:O(()=>[T(m(fi),{command:"current"},{default:O(()=>[fe("发布页面")]),_:1}),T(m(fi),{command:"project"},{default:O(()=>[fe("整站发布")]),_:1})]),_:1})]),default:O(()=>[Dj]),_:1})]))}}),Oj={class:"v-icon-setter"},Bj={class:"v-icon-setter__content"},Cj={class:"v-icon-setter__list"},hf=J({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(!1),o=q(t.modelValue),s=q(""),a=L(()=>Mo[t.modelValue]||t.modelValue),u=L(()=>{const p=Object.entries(Mo);return s.value?p.filter(f=>f[0].toLowerCase().includes(s.value)):p}),l=p=>{o.value=p},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},d=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(p,f)=>(k(),te("div",Oj,[T(m(mt),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":m(Gf),onFocus:h},{prepend:O(()=>[T(m(en),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(k(),P(m($n),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),onSubmit:c},{extra:O(()=>[T(m(ze),{size:"default",type:"warning",onClick:d},{default:O(()=>[fe(" 清除绑定 ")]),_:1})]),default:O(()=>[pe("div",Bj,[T(m(mt),{size:t.size,"prefix-icon":m(Xu),clearable:"",modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),pe("div",Cj,[(k(!0),te(re,null,ae(u.value,v=>(k(),P(m(en),{icon:v[1],onClick:y=>l(v[0]),class:Ee({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(k(),P(m(Re),{key:0})):Z("",!0)])])]),_:1},8,["modelValue"])):Z("",!0)]))}}),Ij=J({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Hi(),r=L(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=q(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=tp(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Me("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(k(),P(m(kt),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:O(()=>[T(m(ne),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),T(m(ne),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""}),T(m(ne),{name:"icon",label:"菜单图标",editor:"none"},{editor:O(()=>[T(hf,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value.icon=d),size:"default"},null,8,["modelValue"])]),_:1}),T(m(ne),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),T(m(ne),{name:"hidden",label:"隐藏菜单",editor:"switch"}),T(m(ne),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),Pu=J({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(k(),P(m(xi),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:O(()=>[pe("div",{class:Ee(["v-apps-region__icon",i.value]),onClick:o},[(k(),P(it(s.icon)))],2)]),_:1},8,["content"]))}}),ge=J({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0}},emits:["plus","back","remove","save"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("plus")},o=()=>{r("back")},s=()=>{r("remove")},a=()=>{r("save")},u=L(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?Kf:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(k(),P(m(Li),{class:"v-panel",border:!1,header:u.value,fit:""},zn({actions:O(()=>[t.plus?(k(),P(m(nt),{key:0,size:l.$attrs.size,mode:"icon",icon:m(Ms),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):Z("",!0),t.remove?(k(),P(m(nt),{key:1,size:l.$attrs.size,mode:"icon",icon:m(Zf),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):Z("",!0),t.save?(k(),P(m(nt),{key:2,size:l.$attrs.size,mode:"icon",icon:m(kh),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):Z("",!0),le(l.$slots,"actions")]),default:O(()=>[le(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:O(()=>[le(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),Rj={class:"v-tabs__header"},Mj={key:0,class:"v-tabs__actions"},Ui=J({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove"],setup(n,{emit:e}){const t=n,r=e,i=q((t.modelValue||t.items[0]?.name)??"");_e(i,()=>{r("update:modelValue",i.value)}),_e(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(k(),P(m(Li),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:O(()=>[pe("div",Rj,[T(m(Yp),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value=l),onTabRemove:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(k(),te("div",Mj,[t.menus&&t.menus.length?(k(),P(m(nt),{key:0,mode:"icon",size:"small",icon:m(ys),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:O(({item:l})=>[pe("span",null,[t.checkable?(k(),P(m(Os),{key:0,class:Ee({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):Z("",!0),fe(" "+ie(l.label),1)])]),_:1},8,["icon","menus"])):Z("",!0)])):Z("",!0)])]),default:O(()=>[le(a.$slots,"default")]),_:3}))}}),Nj={key:2,class:"v-item__index"},Pj={class:"v-item__content"},zj={key:3,class:"v-item__subtitle"},Pe=J({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:Ms},copy:{label:"复制",icon:Bs},edit:{label:"编辑",icon:Rs},remove:{label:"删除",icon:Tr},lock:{label:"锁定",icon:Cs},unlock:{label:"解锁",icon:jh},invisible:{label:"隐藏",icon:Ns},visible:{label:"显示",icon:Hh},home:{label:"主页",icon:xh}},r=n,i=e,o=q(!!r.modelValue),s=L(()=>r.actions.map(c=>{const d=t[c];return{name:c,...d}})),a=L(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),u=()=>{i("click",r.modelValue)},l=async c=>{c==="remove"?await gs.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return _e(o,c=>{i("update:modelValue",c),i("switch",c)}),_e(()=>r.modelValue,c=>{o.value=!!c}),(c,d)=>(k(),P(m(he),{class:Ee(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:O(()=>[T(m(he),{class:"v-item__title",align:"center"},{default:O(()=>[le(c.$slots,"default",{},()=>[c.icon?(k(),P(m(en),{key:0,icon:c.icon},null,8,["icon"])):Z("",!0),r.tag?(k(),P(m(Hf),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:O(()=>[fe(ie(r.tag),1)]),_:1},8,["type"])):Z("",!0),c.index!==void 0?(k(),te("span",Nj," # "+ie(c.index),1)):Z("",!0),pe("span",Pj,ie(c.title),1),c.subtitle?(k(),te("span",zj,ie(c.subtitle),1)):Z("",!0)])]),_:3}),T(m(he),{class:"v-item__actions",onClick:d[1]||(d[1]=In(()=>{},["stop"]))},{default:O(()=>[(k(!0),te(re,null,ae(s.value,h=>(k(),P(m(nt),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:p=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(k(),P(m(fs),{key:0,modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):Z("",!0),le(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),Fj=["draggable"],Lj={class:"v-box__name"},Hj={class:"v-box__label"},as=J({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},o=async()=>{await gs.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=L(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(k(),te("div",{class:Ee(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[T(m(he),{direction:"column",justify:"center",align:"center"},{default:O(()=>[pe("span",Lj,ie(t.name),1),pe("span",Hj,ie(t.title),1)]),_:1}),t.editable?(k(),P(m(he),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:O(()=>[T(m(en),{icon:m(Rs),onClick:i},null,8,["icon"]),T(m(en),{icon:m(Tr),onClick:o},null,8,["icon"])]),_:1})):Z("",!0)],42,Fj))}}),Uj={class:"v-context-viewer"},qj=J({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const d=c.value,h=lo(d);return h==="Object"||h==="Module"?Object.keys(d||{}).length===0:h==="Array"?d.length===0:!0},s=(c,d="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,p)=>{const f=`[${p}]`;return{label:f,value:h,type:lo(h),path:`${d}${f}`}}):Object.entries(c).map(([h,p])=>({label:h,value:p,type:lo(p),path:`${d}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,d)=>{if(c.level===0)d(s(t.context));else{const h=Bn(c.data.value);d(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,d)=>(k(),te("div",Uj,[c.context?(k(),P(m(ms),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:O(({data:h})=>[T(Pe,{title:h.label,clickable:"",onClick:p=>l(h),background:"",actions:["copy"],onAction:p=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):Z("",!0)]))}}),la=J({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:o}=vj(t.block,t.context),{copy:s}=t1({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=q("normal"),l=q(),c=async $=>{r("submit",$),t.submitMethod?await t.submitMethod($)&&d():d()},d=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},p=()=>{d()},f=async()=>{l.value?.submit()},v=$=>{r("pick",$)},y=$=>{s($),vs.success({message:"已经复制到粘贴板"})};return($,g)=>(k(),P(m($n),{"model-value":t.modelValue,class:"v-binder",title:$.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:d},{default:O(()=>[T(m(he),{fit:"",direction:"row",overflow:"hidden"},{default:O(()=>[T(m(he),{width:"30%",height:"100%"},{default:O(()=>[T(Ui,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":g[1]||(g[1]=b=>u.value=b)},{default:O(()=>[T(m(he),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:O(()=>[Cn(pe("div",null,[T(m(mt),{modelValue:m(o),"onUpdate:modelValue":g[0]||(g[0]=b=>yo(o)?o.value=b:null),size:"small",clearable:"","prefix-icon":m(Xu),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(k(!0),te(re,null,ae(m(i),b=>(k(),te("div",null,[T(m(vr),{"border-style":"dotted"},{default:O(()=>[fe(ie(b.title),1)]),_:2},1024),(k(!0),te(re,null,ae(b.items,_=>(k(),P(Pe,{title:_,background:"",actions:["copy"],small:"",onClick:x=>v(_),onAction:x=>y(_)},null,8,["title","onClick","onAction"]))),256))]))),256)),m(i).length?Z("",!0):(k(),P(m(Re),{key:0}))],512),[[pi,u.value==="normal"]]),Cn(T(qj,{context:t.context,onCopy:y,onPick:v},null,8,["context"]),[[pi,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),T(m(Li),{grow:"",header:null,border:!1},{footer:O(()=>[T(m(he),{justify:"space-between"},{default:O(()=>[T(m(he),null,{default:O(()=>[$.unbindEnabled?(k(),P(m(ze),{key:0,type:"warning",size:"default",onClick:h},{default:O(()=>[fe(" 移除绑定 ")]),_:1})):Z("",!0)]),_:1}),T(m(he),null,{default:O(()=>[T(m(ze),{type:"default",size:"default",onClick:p},{default:O(()=>[fe(" 取消 ")]),_:1}),T(m(ze),{type:"primary",size:"default",onClick:f},{default:O(()=>[fe(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:O(()=>[T(m(Jp),{ref_key:"formRef",ref:l,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":c},{default:O(()=>[le($.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),Wj={class:"v-slots-picker__sn"},Jj=J({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(),o=L(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),s=u=>{i.value=u},a=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Me("请选择插槽")};return(u,l)=>(k(),P(m($n),je({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:O(()=>[T(m(Wf),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),T(m(he),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:O(()=>[(k(!0),te(re,null,ae(t.slots,(c,d)=>(k(),P(m(he),{class:Ee(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:O(()=>[pe("span",Wj,"#"+ie(d+1),1),fe(" "+ie(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),df=J({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=L(()=>[`is-${e.mode}`]),r=L(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?Mu:Nu,{width:s,height:a}=o,u=s>0?(e.width||0)/s:1,l=a>0?(e.height||0)/a:1;return Math.min(u,l)}),i=L(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?Mu:Nu,{width:s,height:a}=o;return{width:`${s}px`,height:`${a}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,s)=>(k(),te("div",{class:Ee(["v-viewport",t.value]),style:Gt(i.value)},[le(o.$slots,"default")],6))}}),Yj=J({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Hi(),r=L(()=>e.value?.pages||[]),{current:i}=He(),o=q(!1),s=q(),a=q(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async p=>{const{name:f,modelValue:v}=p,{data:y,node:$}=v;if(f==="add"&&(s.value=void 0,a.value=y.id,o.value=!0),f==="edit"&&(s.value=Ii(y),a.value=void 0,o.value=!0),f==="remove"){if(y.dir){const g=e.value?.getPage(y.id);if(g&&g.children?.length){Me("请先删除子页面");return}}e.value?.removePage(y.id)}if(f==="copy"){const g=$.parent?.data.id;e.value?.clonePage(y,g)}f==="home"&&(e.value?.setHomepage(y.id),et("设置主页成功","success"))},c=async p=>{p.raw&&et("这是源码模式页面,不能低代码设计","warning"),p.dir||p.raw?t.project.value?.deactivate():t.project.value?.active(p)},d=(p,f,v)=>v==="inner"?!!f.data.dir:!0,h=()=>{e.value?.update({pages:bo(r)})};return(p,f)=>(k(),P(m(ge),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:O(()=>[T(m(ms),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":d,onNodeDrop:h},{default:O(({data:v,node:y})=>[T(m(Pe),{class:"v-pages-widget__item",icon:m(Mo)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:y},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:$=>c(v),active:m(i)?.id===v.id,tag:m(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),o.value?(k(),P(Ij,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):Z("",!0)]),_:1}))}}),Kj=J({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=uf(),{blocks:t,engine:r}=cj(),i=q(void 0),{current:o}=He(),s=q(!1),a=L(()=>i.value?.id?"编辑":"新增"),u=L(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async g=>{const b=g,_=r.project.value;if(!_)return!1;if(g.id)if(!_.existBlockName(b.name,[b.id]))_.updateBlock(b);else return Me(`名称【${b.name}】已经存在,请更换名称`),!1;else if(!_.existBlockName(b.name))_.createBlock(b);else return Me(`名称【${b.name}】已经存在,请更换名称`),!1;return!0},d=()=>{i.value=l(),s.value=!0},h=g=>{i.value=Ii(g),s.value=!0},p=g=>{r.project.value?.removeBlock(g.id)},f=g=>{i.value&&(i.value.name=tp(g))},v=async g=>{r.project.value?.active(g)},y=async g=>{const b={type:"Schema",id:g.id},_=await r.assets.getBlockMaterial(b),x=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;x&&_&&x.setDragging(_)},$=()=>{const g=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;g&&g.setDragging(null)};return(g,b)=>(k(),P(m(ge),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:d},{default:O(()=>[T(m(_o),{wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(m(t),_=>(k(),P(m(wo),{key:_.id,span:m(e)},{default:O(()=>[T(m(as),{name:_.name,title:_.title,active:m(o)?.id===_.id,editable:"",onEdit:x=>h(_),onRemove:x=>p(_),onClick:x=>v(_),draggable:m(o)?.id!==_.id,onDragstart:x=>y(_),onDragend:$},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(t).length?Z("",!0):(k(),P(m(Re),{key:0})),T(m(kt),{modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=_=>s.value=_),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:O(()=>[T(m(ne),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:m(Rt)},onChange:f},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),Zj={class:"v-components-widget__search"},Gj={key:0,class:"v-components-widget__result"},Xj={class:"v-components-widget__list"},Qj=J({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=uf(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=dj(),l=d=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(d)},c=()=>{const d=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;d&&d.setDragging(null)};return(d,h)=>(k(),P(m(ge),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:O(()=>[pe("div",Zj,[T(m(mt),{modelValue:m(a),"onUpdate:modelValue":h[0]||(h[0]=p=>yo(a)?a.value=p:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:O(()=>[T(m(Wh))]),_:1},8,["modelValue"])]),m(a)?(k(),te("div",Gj,[T(m(_o),{wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(m(u),p=>(k(),P(m(wo),{span:m(e),key:p.name},{default:O(()=>[T(m(as),{name:p.name,title:p.label||p.name,draggable:"",onDragstart:f=>l(p),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(u).length?Z("",!0):(k(),P(m(Re),{key:0}))])):(k(),P(m(Yp),{key:1,items:m(r),modelValue:m(i),"onUpdate:modelValue":h[2]||(h[2]=p=>yo(i)?i.value=p:null)},{default:O(()=>[pe("div",Xj,[m(o)?(k(),P(m(Cf),{key:0,modelValue:m(s)[m(i)],"onUpdate:modelValue":h[1]||(h[1]=p=>m(s)[m(i)]=p)},{default:O(()=>[(k(!0),te(re,null,ae(m(o).children,p=>(k(),P(m(If),{key:p.name,name:p.name,title:`${p.label} (${p.count})`},{default:O(()=>[p.components?(k(),P(m(_o),{key:0,wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(p.components,f=>(k(),P(m(wo),{span:m(e),key:f.name},{default:O(()=>[T(m(as),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:v=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):Z("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):Z("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),eE=J({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=Mt(),{current:i}=He(),o=q([]),s=x=>{if(Oe(x))return x.locked?["unlock"]:["lock"];const w=x.parent;return w&&(w.locked||w.invisible)?[]:i.value?.locked?[]:x.locked?["unlock"]:x.invisible?["visible"]:["lock","invisible","copy","remove"]},a=x=>{const w=[];return x.forEach(E=>{const A={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(A.children=a(E.children)),w.push(A)}),w},u=()=>{if(!i.value)return[];const{id:x,name:w,nodes:E}=i.value;return[{id:x,label:w,type:x,model:i.value,children:a(E)}]},l=()=>{o.value=u()},c=L(()=>r.value?.model.id),d=x=>{const w=x.data;if(Oe(w.model)||w.model.locked||w.model.name==="template")return!1;const E=e.assets.componentMap.get(w.model.name);return E?(t.value?.setDragging(E),!0):!1},h=async(x,w,E)=>{const A=w.data,H={prev:"top",next:"bottom",inner:"inner"}[E];let S=!1;if(Oe(A.model))S=E==="inner",t.value?.setDropping(S?A.model:null,"inner");else{const j=A.model;S=!!await t.value?.allowDrop(j,H),t.value?.setDropping(S?j:null,"inner")}return S},p=x=>{const w=x?.model;!w||w.invisible||(t.value?.setSelected(w),t.value?.setHover(null))},f=async(x,w,E)=>{const A=x.data,H=w.data;if(Oe(H.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const S=H.model,j={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(S,j)){t.value?.setDropping(null),l(),vs.warning({message:`${A.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const N=await t.value?.getDropSlot(E==="inner"?S:S.parent);if(N!==null){const V=A.model;V.slot=N,i.value?.move(V,S,j)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=x=>{Oe(x.model)?t.value?.setHover(x.model):(t.value?.setHover(x.model),x.model.invisible&&t.value?.setHover(null),x.model.name==="slot"&&t.value?.setHover(null))},y=()=>{t.value?.setHover(null)},$=x=>{const w=x.data;w.dragging=!0;const E=e.assets.componentMap.get(w.model.name);E&&t.value?.setDragging(E)},g=async x=>{const w=x.data;w.dragging=!1},b=(x,w)=>{x&&((x.id===w.id||!Oe(x)&&w.isChild(x))&&t.value?.setSelected(null),t.value?.setHover(null))},_=x=>{const{name:w,modelValue:E}=x,A=r.value?.model;switch(w){case"lock":b(A,E),E.lock();break;case"unlock":b(A,E),E.unlock();break;case"invisible":b(A,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const H=i.value?.cloneNode(E);H&&t.value?.setSelected(H);break;case"remove":b(A,E),i.value?.removeNode(E);break}};return _e(i,l,{immediate:!0,deep:!0}),(x,w)=>(k(),P(m(ge),{class:"v-outline-widget",title:"大纲树"},{default:O(()=>[T(m(ms),{data:o.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":c.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":d,onCurrentChange:p,onNodeDrop:f,onNodeDragStart:$,onNodeDragEnd:g},{default:O(({data:E,node:A})=>[T(m(Pe),{class:Ee(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging}]),active:!E.model.invisible&&A.isCurrent,grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?m(Cs):E.model.invisible?m(Ns):void 0,title:E.label,subtitle:E.type,actions:s(E.model),onAction:_,onMouseenter:H=>v(E),onMouseleave:y},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"])]),_:1}))}}),tE=J({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=cf(),i=L(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await tr("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(k(),P(m(ge),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!m(r),onRemove:s},{default:O(()=>[m(r)===0?(k(),P(m(Re),{key:0,"image-size":50})):Z("",!0),m(e)?(k(!0),te(re,{key:1},ae(m(e).items,(l,c)=>(k(),P(m(Pe),{index:c+1,title:l.label,"model-value":l,active:c==m(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:d=>m(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):Z("",!0)]),_:1},8,["subtitle","remove"]))}}),Ce=wf({loader:()=>mf(()=>import("./Editor-ctkAn2cu-Zm0zOJf-.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:J({render(){return Ye("div","正在拼命加载...")}}),errorComponent:J({render(){return Ye("div","组件加载失败!")}})}),nE=J({name:"ApisWidget",__name:"index",setup(n){const e=q(!1),t=q(null),r=q(!1),i=L(()=>r.value?"编辑API":"新增API"),o=L(()=>s.value?.apis||[]),{project:s}=Hi(),a=()=>({method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form",headers:{type:"JSExpression",value:"({})"}}}),u=()=>{e.value=!0,r.value=!1,t.value=a()},l=rj.map(y=>({label:y,value:y.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},d=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(y,$,g)=>{Fe({type:"JSExpression",value:$},window)?g():g(new Error("代码错误"))},p=y=>{y.name==="edit"&&f(y.modelValue),y.name==="remove"&&s.value?.removeApi(y.modelValue.name)},f=y=>{r.value=!0,t.value=Ii(y),e.value=!0},v=async y=>s.value?.existApiName(y.name,r.value?[y.id]:[])?(Me(`API名称 [ ${y.name} ] 已存在`),!1):(s.value?.setApi(y),!0);return(y,$)=>(k(),P(m(ge),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:O(()=>[(k(!0),te(re,null,ae(o.value,g=>(k(),P(m(Pe),{key:g.id,small:"",title:g.name,subtitle:g.label,"model-value":g,tag:g.method?.toUpperCase(),"tag-type":c[g.method||"get"],background:"",actions:["edit","remove"],onClick:b=>f(g),onAction:p},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(k(),P(m(Re),{key:0,"image-size":50})):Z("",!0),T(m(kt),{modelValue:e.value,"onUpdate:modelValue":$[1]||($[1]=g=>e.value=g),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:O(()=>[T(m(he),{gap:"",fit:""},{default:O(()=>[T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:O(()=>[T(m(ne),{name:"method",label:"请求类型",required:"",editor:"radio",options:m(l),props:{button:!0}},null,8,["options"]),T(m(ne),{name:"name",label:"接口名称",required:"",rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"label",label:"备注说明",required:""}),T(m(ne),{name:"url",label:"接口URL",required:""})]),_:1}),T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:O(()=>[t.value.method!=="jsonp"?(k(),P(m(ge),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:O(()=>[T(m(he),{justify:"space-around"},{default:O(()=>[T(m(ne),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),T(m(ne),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),T(m(ne),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),T(m(ne),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:d,props:{button:!0}}),T(m(ne),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:O(()=>[T(m(Ce),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":$[0]||($[0]=g=>t.value.settings.headers.value=g),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):Z("",!0),t.value.method==="jsonp"?(k(),P(m(ge),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:O(()=>[T(m(ne),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),T(m(ne),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),T(m(ne),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),T(m(ne),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):Z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),rE=J({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=lf(),r=q(!1),i=q(!1),o=q({}),s=L(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=f=>f.required||f.official?[]:["edit","remove"],u=f=>f.official&&!f.required,l=async f=>(f.urls=f.urls.split(`
111
+ */const ej="0.7.4",Mu={width:390,height:844},Nu={width:1180,height:820},Rt=/^[A-Za-z_$][\w_-]*$/,tj=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],nj=["keydown","keyup","keypress"],rj=["GET","POST","PUT","PATCH","DELETE","JSONP"],ij=["stop","prevent","capture","self","once","passive"];var dt=(n=>(n.Block="block",n.Node="node",n))(dt||{});const af="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC",oj=["title","src"],sj={key:1},aj=J({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:af},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(k(),te("div",{class:"v-logo-widget",onClick:t},[e.icon?(k(),te("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,oj)):(k(),te("span",sj,ie(e.text),1))]))}}),lj={class:"v-empty-widget"},uj=J({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(k(),te("div",lj,"EmptyWidget"))}});function lf(){const n=Ge(),e=L(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function an(n,e){const t=L(()=>pf.getWidgets(m(n),m(e)).filter(i=>!i.invisible)),r=q();return{widgets:t,widgetsRef:r}}function uf(){const n=Ge();return{span:L(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function cj(){const n=Ge(),e=L(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const hj=(n=[])=>n.map(e=>e.name);function dj(){const n=Ge(),{components:e,groups:t,componentMap:r}=n.assets,i=gn({}),o=L(()=>{const d={};return t.value&&t.value.forEach(h=>{d[h.name]=h}),d}),s=L(()=>t.value?t.value.map(d=>({label:`${d.label} (${d.count})`,name:d.name,disabled:!d.children?.length})):[]),a=q(s.value[0]?.name),u=q(""),l=L(()=>o.value[a.value]);us(()=>{const d=s.value.reduce((h,p)=>(h[p.name]=hj(o.value[p.name].children),h),{});Object.assign(i,d)});const c=L(()=>{const d=u.value.toLowerCase();return!d||!e?[]:e.filter(h=>h.name.toLowerCase().includes(d)||h.label?.toLowerCase().includes(d))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function He(){const n=Ge(),e=L(()=>n.current.value),t=L(()=>n.context.value),r=L(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function pj(n,e){const t=Ge();t.simulator.init(n,e);const r=L(()=>t.simulator.designer.value),i=L(()=>vo("hover",r.value?.hover.value)),o=L(()=>vo("dropping",r.value?.dropping.value)),s=L(()=>vo("selected",r.value?.selected.value));return{designer:r,dropping:o,hover:i,selected:s}}function fj(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let s,a;return a=t>30?"top":"bottom",s=e||o<300&&i<300?"left":"right",[s,a].join("-")}function mj(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:s}=e,a={left:r,width:i,top:o,height:s};switch(t){case"left":a.left=0,a.width=0;break;case"right":a.left=a.left+a.width-4,a.width=0;break;case"bottom":a.top=a.top+a.height-4,a.height=0;break;case"top":a.height=0;break}return a}function vo(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?mj(e):e.rect,s={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:s,position:fj(e.rect,n!=="selected")}}function Mt(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>e.value?.selected.value),r=L(()=>Oe(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function vj(n,e){const t=q(""),{selected:r,isSelectBlock:i}=Mt(),o=L(()=>r.value?.model.id),s=L(()=>{const u=bo(n),l=bo(e),c=[];if(!u)return c;const d=l?.__contextRefs[o.value||""],h=l===d||i.value?[]:Object.keys(d?.context||{}).filter(_=>!["context","ref"].includes(_)).map(_=>`this.context.${_}`);h.length&&c.push({title:"上下文",items:h});const p=u.inject.map(_=>`this.${_.name}`);p.length&&c.push({title:"注入",items:p});const f=u.props.map(_=>typeof _=="string"?`this.$props.${_}`:`this.$props.${_.name}`);f.length&&c.push({title:"属性",items:f});const v=Object.keys(u.state).map(_=>`this.state.${_}`);v.length&&c.push({title:"状态",items:v});const y=Object.keys(u.computed).map(_=>`this.${_}.value`);y.length&&c.push({title:"计算属性",items:y});const $=Object.keys(u.methods).map(_=>`this.${_}`);$.length&&c.push({title:"方法",items:$});const g=Object.keys(u.dataSources).map(_=>`this.${_}`);g.length&&c.push({title:"数据源",items:g});const b=Object.keys(l?.$refs||{}).map(_=>`this.$refs.${_}`);return b.length&&c.push({title:"refs",items:b}),c}),a=L(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const d=c.items.filter(h=>h.toLowerCase().includes(u));d.length&&l.push({title:c.title,items:d})}),l});return{keyword:t,options:s,searchResult:a}}const Zr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function gj(n){const e=Ge(),t=L(()=>{const u=n.value?.model||null;return Oe(u)?null:u}),r=q();_e(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=L(()=>t.value?[{name:"key",setters:Zr,value:t.value.getPropValue("key")},{name:"ref",setters:Zr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:Zr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:Zr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=L(()=>{if(!t.value)return[];const u=r.value||e.assets.componentMap.get(t.value.name);return u?(u.props||[]).map(l=>({...l,value:t.value?.getPropValue(l.name)??l.defaultValue})):[]}),s=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",a=L(()=>t.value?Object.keys(t.value.props).filter(u=>!s(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:a,node:t,change:(u,l)=>{t.value&&(u==="children"?t.value.setChildren(l):t.value.setProp(u,l))},addCustom:u=>{u&&t.value?.setProp(u,"")},removeCustom:u=>{t.value?.removeProp(u)},isExist:s}}function Me(n,e="提示"){return yn.warning({title:e,message:n})}async function tr(n){return await gs.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function et(n,e="success"){return vs({message:n,type:e})}function Fe(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?tn(n,e,t,!0):ss(n,e,t,!0)}catch(i){r=!1,yn.error({title:"代码错误",message:i.message})}return r}function cf(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>n.current.value?n.history.value:null),r=L(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},s=l=>{e.value?.cleanHelper(),t.value?.load(l),et("已载入历史记录","success")},a=L(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=L(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:s,forwardDisabled:a,backwardDisabled:u}}function Hi(){const n=Ge(),e=L(()=>n.project.value);return{engine:n,project:e}}function yj(n){const e=Ge(),t=L(()=>{const a=n.value?.model||null;return Oe(a)?null:a}),r=q();_e(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=L(()=>{if(Oe(t.value))return[];const a=t.value?.events||{};return tj.map(u=>({name:u,event:a[u]}))}),o=L(()=>{if(Oe(t.value))return[];const a=t.value?.events||{};return nj.map(u=>({name:u,event:a[u]}))}),s=L(()=>{if(!t.value||Oe(t.value))return[];const a=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(u=>{const l=typeof u=="string"?u:u.name;return{name:l,event:a[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:s}}const bj=(n,e)=>new On({name:n,value:void 0,iterator:e}),wj=(n="modelValue")=>new On({name:"vModel",value:void 0,arg:n});function _j(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(o=>o.includes(i.name))):[]}return[]}function xj(n){const e=Ge(),t=L(()=>{const d=n.value?.model||null;return Oe(d)?null:d}),r=d=>L(()=>t.value&&(t.value.directives||[]).find(h=>h.name===d)||bj(d)),i=()=>L(()=>{if(!t.value)return[];const d=e.assets.componentMap.get(t.value.name||"");return(d?_j(d):[]).map(h=>(t.value?.directives||[]).find(p=>p.name==="vModel"&&p.arg==h.name)||wj(h.name))}),o=r("vIf"),s=r("vShow"),a=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:s,vBind:a,vFor:u};return{engine:e,node:t,vIf:o,vShow:s,vBind:a,vFor:u,vModels:l,onValueChange:(d,h)=>{const p=c[d];t.value&&(h?(p.value.value=h,t.value.setDirective(p.value)):(p.value.value=void 0,t.value.removeDirective(p.value)))},onForChange:(d,h)=>{if(t.value){if(d==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(d==="item"||d==="index")&&(u.value.iterator={...u.value.iterator,[d]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(d,h)=>{if(!t.value)return;const p=parseInt(d),f=l.value[p];f&&(h?(f.value=h,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function Sj(){const{engine:n,project:e}=Hi(),t=L(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const $j={class:"v-switcher-widget"},jj={key:1},Ej=J({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=He(),i=L(()=>r.project.value?.name),o=L(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(k(),te("div",$j,[T(m(ze),{size:"small",round:"",onClick:s},{default:O(()=>[T(m(_h),{class:"v-switcher-widget__back"}),pe("span",null,ie(i.value),1),o.value?(k(),P(m(vr),{key:0,direction:"vertical"})):Z("",!0),o.value?(k(),te("span",jj,ie(o.value),1)):Z("",!0)]),_:1})]))}}),kj={class:"v-toolbar-widget"},Tj=J({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:s}=cf(),a=q("pc");return e({mode:a}),(u,l)=>(k(),te("div",kj,[T(m(Ku),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:O(()=>[T(m(Xr),{label:"pc"},{default:O(()=>[T(m(Th))]),_:1}),T(m(Xr),{label:"mobile"},{default:O(()=>[T(m(Vh))]),_:1}),T(m(Xr),{label:"pad"},{default:O(()=>[T(m(Dh))]),_:1})]),_:1},8,["modelValue"]),Z("",!0),T(m(Bf),null,{default:O(()=>[T(m(ze),{type:"default",size:"small",onClick:m(i),disabled:m(s)||!!t.preview},{default:O(()=>[T(m(Bh))]),_:1},8,["onClick","disabled"]),T(m(ze),{type:"default",size:"small",onClick:m(r),disabled:m(o)||!!t.preview},{default:O(()=>[T(m(Ah))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),Vj={class:"v-actions-widget"},Dj=pe("span",null,"发布",-1),Aj=J({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=Mt(),r=q(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),et("刷新完成","success")):et("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await fp(1e3)),t.value?.setSelected(e.current.value)):et("请先打开文件","warning")},s=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else et("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):et("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(k(),te("div",Vj,[T(m(qu),{value:0,max:99,hidden:!0},{default:O(()=>[T(m(nt),{mode:"icon",icon:m(Ih),background:"hover"},null,8,["icon"])]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ze),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:O(()=>[T(m(Eh))]),_:1},8,["type"]),T(m(ze),{onClick:i,type:"default",size:"small",title:"刷新"},{default:O(()=>[T(m(Oh))]),_:1}),T(m(ze),{type:"default",size:"small",title:"页面设置",onClick:o},{default:O(()=>[T(m(Rh))]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ps),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:O(()=>[T(m(ds),null,{default:O(()=>[T(m(fi),{command:"current"},{default:O(()=>[fe("发布页面")]),_:1}),T(m(fi),{command:"project"},{default:O(()=>[fe("整站发布")]),_:1})]),_:1})]),default:O(()=>[Dj]),_:1})]))}}),Oj={class:"v-icon-setter"},Bj={class:"v-icon-setter__content"},Cj={class:"v-icon-setter__list"},hf=J({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(!1),o=q(t.modelValue),s=q(""),a=L(()=>Mo[t.modelValue]||t.modelValue),u=L(()=>{const p=Object.entries(Mo);return s.value?p.filter(f=>f[0].toLowerCase().includes(s.value)):p}),l=p=>{o.value=p},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},d=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(p,f)=>(k(),te("div",Oj,[T(m(mt),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":m(Gf),onFocus:h},{prepend:O(()=>[T(m(en),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(k(),P(m($n),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),onSubmit:c},{extra:O(()=>[T(m(ze),{size:"default",type:"warning",onClick:d},{default:O(()=>[fe(" 清除绑定 ")]),_:1})]),default:O(()=>[pe("div",Bj,[T(m(mt),{size:t.size,"prefix-icon":m(Xu),clearable:"",modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),pe("div",Cj,[(k(!0),te(re,null,ae(u.value,v=>(k(),P(m(en),{icon:v[1],onClick:y=>l(v[0]),class:Ee({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(k(),P(m(Re),{key:0})):Z("",!0)])])]),_:1},8,["modelValue"])):Z("",!0)]))}}),Ij=J({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Hi(),r=L(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=q(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=tp(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Me("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(k(),P(m(kt),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:O(()=>[T(m(ne),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),T(m(ne),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""}),T(m(ne),{name:"icon",label:"菜单图标",editor:"none"},{editor:O(()=>[T(hf,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=d=>o.value.icon=d),size:"default"},null,8,["modelValue"])]),_:1}),T(m(ne),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),T(m(ne),{name:"hidden",label:"隐藏菜单",editor:"switch"}),T(m(ne),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),Pu=J({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(k(),P(m(xi),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:O(()=>[pe("div",{class:Ee(["v-apps-region__icon",i.value]),onClick:o},[(k(),P(it(s.icon)))],2)]),_:1},8,["content"]))}}),ge=J({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0}},emits:["plus","back","remove","save"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("plus")},o=()=>{r("back")},s=()=>{r("remove")},a=()=>{r("save")},u=L(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?Kf:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(k(),P(m(Li),{class:"v-panel",border:!1,header:u.value,fit:""},zn({actions:O(()=>[t.plus?(k(),P(m(nt),{key:0,size:l.$attrs.size,mode:"icon",icon:m(Ms),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):Z("",!0),t.remove?(k(),P(m(nt),{key:1,size:l.$attrs.size,mode:"icon",icon:m(Zf),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):Z("",!0),t.save?(k(),P(m(nt),{key:2,size:l.$attrs.size,mode:"icon",icon:m(kh),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):Z("",!0),le(l.$slots,"actions")]),default:O(()=>[le(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:O(()=>[le(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),Rj={class:"v-tabs__header"},Mj={key:0,class:"v-tabs__actions"},Ui=J({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove"],setup(n,{emit:e}){const t=n,r=e,i=q((t.modelValue||t.items[0]?.name)??"");_e(i,()=>{r("update:modelValue",i.value)}),_e(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(k(),P(m(Li),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:O(()=>[pe("div",Rj,[T(m(Yp),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value=l),onTabRemove:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(k(),te("div",Mj,[t.menus&&t.menus.length?(k(),P(m(nt),{key:0,mode:"icon",size:"small",icon:m(ys),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:O(({item:l})=>[pe("span",null,[t.checkable?(k(),P(m(Os),{key:0,class:Ee({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):Z("",!0),fe(" "+ie(l.label),1)])]),_:1},8,["icon","menus"])):Z("",!0)])):Z("",!0)])]),default:O(()=>[le(a.$slots,"default")]),_:3}))}}),Nj={key:2,class:"v-item__index"},Pj={class:"v-item__content"},zj={key:3,class:"v-item__subtitle"},Pe=J({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:Ms},copy:{label:"复制",icon:Bs},edit:{label:"编辑",icon:Rs},remove:{label:"删除",icon:Tr},lock:{label:"锁定",icon:Cs},unlock:{label:"解锁",icon:jh},invisible:{label:"隐藏",icon:Ns},visible:{label:"显示",icon:Hh},home:{label:"主页",icon:xh}},r=n,i=e,o=q(!!r.modelValue),s=L(()=>r.actions.map(c=>{const d=t[c];return{name:c,...d}})),a=L(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),u=()=>{i("click",r.modelValue)},l=async c=>{c==="remove"?await gs.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return _e(o,c=>{i("update:modelValue",c),i("switch",c)}),_e(()=>r.modelValue,c=>{o.value=!!c}),(c,d)=>(k(),P(m(he),{class:Ee(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:O(()=>[T(m(he),{class:"v-item__title",align:"center"},{default:O(()=>[le(c.$slots,"default",{},()=>[c.icon?(k(),P(m(en),{key:0,icon:c.icon},null,8,["icon"])):Z("",!0),r.tag?(k(),P(m(Hf),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:O(()=>[fe(ie(r.tag),1)]),_:1},8,["type"])):Z("",!0),c.index!==void 0?(k(),te("span",Nj," # "+ie(c.index),1)):Z("",!0),pe("span",Pj,ie(c.title),1),c.subtitle?(k(),te("span",zj,ie(c.subtitle),1)):Z("",!0)])]),_:3}),T(m(he),{class:"v-item__actions",onClick:d[1]||(d[1]=In(()=>{},["stop"]))},{default:O(()=>[(k(!0),te(re,null,ae(s.value,h=>(k(),P(m(nt),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:p=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(k(),P(m(fs),{key:0,modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):Z("",!0),le(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),Fj=["draggable"],Lj={class:"v-box__name"},Hj={class:"v-box__label"},as=J({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},o=async()=>{await gs.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=L(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(k(),te("div",{class:Ee(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[T(m(he),{direction:"column",justify:"center",align:"center"},{default:O(()=>[pe("span",Lj,ie(t.name),1),pe("span",Hj,ie(t.title),1)]),_:1}),t.editable?(k(),P(m(he),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:O(()=>[T(m(en),{icon:m(Rs),onClick:i},null,8,["icon"]),T(m(en),{icon:m(Tr),onClick:o},null,8,["icon"])]),_:1})):Z("",!0)],42,Fj))}}),Uj={class:"v-context-viewer"},qj=J({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const d=c.value,h=lo(d);return h==="Object"||h==="Module"?Object.keys(d||{}).length===0:h==="Array"?d.length===0:!0},s=(c,d="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,p)=>{const f=`[${p}]`;return{label:f,value:h,type:lo(h),path:`${d}${f}`}}):Object.entries(c).map(([h,p])=>({label:h,value:p,type:lo(p),path:`${d}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,d)=>{if(c.level===0)d(s(t.context));else{const h=Bn(c.data.value);d(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,d)=>(k(),te("div",Uj,[c.context?(k(),P(m(ms),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:O(({data:h})=>[T(Pe,{title:h.label,clickable:"",onClick:p=>l(h),background:"",actions:["copy"],onAction:p=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):Z("",!0)]))}}),la=J({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:o}=vj(t.block,t.context),{copy:s}=t1({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=q("normal"),l=q(),c=async $=>{r("submit",$),t.submitMethod?await t.submitMethod($)&&d():d()},d=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},p=()=>{d()},f=async()=>{l.value?.submit()},v=$=>{r("pick",$)},y=$=>{s($),vs.success({message:"已经复制到粘贴板"})};return($,g)=>(k(),P(m($n),{"model-value":t.modelValue,class:"v-binder",title:$.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:d},{default:O(()=>[T(m(he),{fit:"",direction:"row",overflow:"hidden"},{default:O(()=>[T(m(he),{width:"30%",height:"100%"},{default:O(()=>[T(Ui,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":g[1]||(g[1]=b=>u.value=b)},{default:O(()=>[T(m(he),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:O(()=>[Cn(pe("div",null,[T(m(mt),{modelValue:m(o),"onUpdate:modelValue":g[0]||(g[0]=b=>yo(o)?o.value=b:null),size:"small",clearable:"","prefix-icon":m(Xu),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(k(!0),te(re,null,ae(m(i),b=>(k(),te("div",null,[T(m(vr),{"border-style":"dotted"},{default:O(()=>[fe(ie(b.title),1)]),_:2},1024),(k(!0),te(re,null,ae(b.items,_=>(k(),P(Pe,{title:_,background:"",actions:["copy"],small:"",onClick:x=>v(_),onAction:x=>y(_)},null,8,["title","onClick","onAction"]))),256))]))),256)),m(i).length?Z("",!0):(k(),P(m(Re),{key:0}))],512),[[pi,u.value==="normal"]]),Cn(T(qj,{context:t.context,onCopy:y,onPick:v},null,8,["context"]),[[pi,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),T(m(Li),{grow:"",header:null,border:!1},{footer:O(()=>[T(m(he),{justify:"space-between"},{default:O(()=>[T(m(he),null,{default:O(()=>[$.unbindEnabled?(k(),P(m(ze),{key:0,type:"warning",size:"default",onClick:h},{default:O(()=>[fe(" 移除绑定 ")]),_:1})):Z("",!0)]),_:1}),T(m(he),null,{default:O(()=>[T(m(ze),{type:"default",size:"default",onClick:p},{default:O(()=>[fe(" 取消 ")]),_:1}),T(m(ze),{type:"primary",size:"default",onClick:f},{default:O(()=>[fe(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:O(()=>[T(m(Jp),{ref_key:"formRef",ref:l,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":c},{default:O(()=>[le($.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),Wj={class:"v-slots-picker__sn"},Jj=J({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(),o=L(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),s=u=>{i.value=u},a=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Me("请选择插槽")};return(u,l)=>(k(),P(m($n),je({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:O(()=>[T(m(Wf),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),T(m(he),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:O(()=>[(k(!0),te(re,null,ae(t.slots,(c,d)=>(k(),P(m(he),{class:Ee(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:O(()=>[pe("span",Wj,"#"+ie(d+1),1),fe(" "+ie(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),df=J({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=L(()=>[`is-${e.mode}`]),r=L(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?Mu:Nu,{width:s,height:a}=o,u=s>0?(e.width||0)/s:1,l=a>0?(e.height||0)/a:1;return Math.min(u,l)}),i=L(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?Mu:Nu,{width:s,height:a}=o;return{width:`${s}px`,height:`${a}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,s)=>(k(),te("div",{class:Ee(["v-viewport",t.value]),style:Gt(i.value)},[le(o.$slots,"default")],6))}}),Yj=J({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Hi(),r=L(()=>e.value?.pages||[]),{current:i}=He(),o=q(!1),s=q(),a=q(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async p=>{const{name:f,modelValue:v}=p,{data:y,node:$}=v;if(f==="add"&&(s.value=void 0,a.value=y.id,o.value=!0),f==="edit"&&(s.value=Ii(y),a.value=void 0,o.value=!0),f==="remove"){if(y.dir){const g=e.value?.getPage(y.id);if(g&&g.children?.length){Me("请先删除子页面");return}}e.value?.removePage(y.id)}if(f==="copy"){const g=$.parent?.data.id;e.value?.clonePage(y,g)}f==="home"&&(e.value?.setHomepage(y.id),et("设置主页成功","success"))},c=async p=>{p.raw&&et("这是源码模式页面,不能低代码设计","warning"),p.dir||p.raw?t.project.value?.deactivate():t.project.value?.active(p)},d=(p,f,v)=>v==="inner"?!!f.data.dir:!0,h=()=>{e.value?.update({pages:bo(r)})};return(p,f)=>(k(),P(m(ge),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:O(()=>[T(m(ms),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":d,onNodeDrop:h},{default:O(({data:v,node:y})=>[T(m(Pe),{class:"v-pages-widget__item",icon:m(Mo)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:y},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:$=>c(v),active:m(i)?.id===v.id,tag:m(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),o.value?(k(),P(Ij,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):Z("",!0)]),_:1}))}}),Kj=J({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=uf(),{blocks:t,engine:r}=cj(),i=q(void 0),{current:o}=He(),s=q(!1),a=L(()=>i.value?.id?"编辑":"新增"),u=L(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async g=>{const b=g,_=r.project.value;if(!_)return!1;if(g.id)if(!_.existBlockName(b.name,[b.id]))_.updateBlock(b);else return Me(`名称【${b.name}】已经存在,请更换名称`),!1;else if(!_.existBlockName(b.name))_.createBlock(b);else return Me(`名称【${b.name}】已经存在,请更换名称`),!1;return!0},d=()=>{i.value=l(),s.value=!0},h=g=>{i.value=Ii(g),s.value=!0},p=g=>{r.project.value?.removeBlock(g.id)},f=g=>{i.value&&(i.value.name=tp(g))},v=async g=>{r.project.value?.active(g)},y=async g=>{const b={type:"Schema",id:g.id},_=await r.assets.getBlockMaterial(b),x=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;x&&_&&x.setDragging(_)},$=()=>{const g=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;g&&g.setDragging(null)};return(g,b)=>(k(),P(m(ge),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:d},{default:O(()=>[T(m(_o),{wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(m(t),_=>(k(),P(m(wo),{key:_.id,span:m(e)},{default:O(()=>[T(m(as),{name:_.name,title:_.title,active:m(o)?.id===_.id,editable:"",onEdit:x=>h(_),onRemove:x=>p(_),onClick:x=>v(_),draggable:m(o)?.id!==_.id,onDragstart:x=>y(_),onDragend:$},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(t).length?Z("",!0):(k(),P(m(Re),{key:0})),T(m(kt),{modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=_=>s.value=_),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:O(()=>[T(m(ne),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:m(Rt)},onChange:f},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),Zj={class:"v-components-widget__search"},Gj={key:0,class:"v-components-widget__result"},Xj={class:"v-components-widget__list"},Qj=J({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=uf(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=dj(),l=d=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(d)},c=()=>{const d=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;d&&d.setDragging(null)};return(d,h)=>(k(),P(m(ge),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:O(()=>[pe("div",Zj,[T(m(mt),{modelValue:m(a),"onUpdate:modelValue":h[0]||(h[0]=p=>yo(a)?a.value=p:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:O(()=>[T(m(Wh))]),_:1},8,["modelValue"])]),m(a)?(k(),te("div",Gj,[T(m(_o),{wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(m(u),p=>(k(),P(m(wo),{span:m(e),key:p.name},{default:O(()=>[T(m(as),{name:p.name,title:p.label||p.name,draggable:"",onDragstart:f=>l(p),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(u).length?Z("",!0):(k(),P(m(Re),{key:0}))])):(k(),P(m(Yp),{key:1,items:m(r),modelValue:m(i),"onUpdate:modelValue":h[2]||(h[2]=p=>yo(i)?i.value=p:null)},{default:O(()=>[pe("div",Xj,[m(o)?(k(),P(m(Cf),{key:0,modelValue:m(s)[m(i)],"onUpdate:modelValue":h[1]||(h[1]=p=>m(s)[m(i)]=p)},{default:O(()=>[(k(!0),te(re,null,ae(m(o).children,p=>(k(),P(m(If),{key:p.name,name:p.name,title:`${p.label} (${p.count})`},{default:O(()=>[p.components?(k(),P(m(_o),{key:0,wrap:"wrap",gutter:5},{default:O(()=>[(k(!0),te(re,null,ae(p.components,f=>(k(),P(m(wo),{span:m(e),key:f.name},{default:O(()=>[T(m(as),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:v=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):Z("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):Z("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),eE=J({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=Mt(),{current:i}=He(),o=q([]),s=x=>{if(Oe(x))return x.locked?["unlock"]:["lock"];const w=x.parent;return w&&(w.locked||w.invisible)?[]:i.value?.locked?[]:x.locked?["unlock"]:x.invisible?["visible"]:["lock","invisible","copy","remove"]},a=x=>{const w=[];return x.forEach(E=>{const A={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(A.children=a(E.children)),w.push(A)}),w},u=()=>{if(!i.value)return[];const{id:x,name:w,nodes:E}=i.value;return[{id:x,label:w,type:x,model:i.value,children:a(E)}]},l=()=>{o.value=u()},c=L(()=>r.value?.model.id),d=x=>{const w=x.data;if(Oe(w.model)||w.model.locked||w.model.name==="template")return!1;const E=e.assets.componentMap.get(w.model.name);return E?(t.value?.setDragging(E),!0):!1},h=async(x,w,E)=>{const A=w.data,H={prev:"top",next:"bottom",inner:"inner"}[E];let S=!1;if(Oe(A.model))S=E==="inner",t.value?.setDropping(S?A.model:null,"inner");else{const j=A.model;S=!!await t.value?.allowDrop(j,H),t.value?.setDropping(S?j:null,"inner")}return S},p=x=>{const w=x?.model;!w||w.invisible||(t.value?.setSelected(w),t.value?.setHover(null))},f=async(x,w,E)=>{const A=x.data,H=w.data;if(Oe(H.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const S=H.model,j={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(S,j)){t.value?.setDropping(null),l(),vs.warning({message:`${A.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const N=await t.value?.getDropSlot(E==="inner"?S:S.parent);if(N!==null){const V=A.model;V.slot=N,i.value?.move(V,S,j)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=x=>{Oe(x.model)?t.value?.setHover(x.model):(t.value?.setHover(x.model),x.model.invisible&&t.value?.setHover(null),x.model.name==="slot"&&t.value?.setHover(null))},y=()=>{t.value?.setHover(null)},$=x=>{const w=x.data;w.dragging=!0;const E=e.assets.componentMap.get(w.model.name);E&&t.value?.setDragging(E)},g=async x=>{const w=x.data;w.dragging=!1},b=(x,w)=>{x&&((x.id===w.id||!Oe(x)&&w.isChild(x))&&t.value?.setSelected(null),t.value?.setHover(null))},_=x=>{const{name:w,modelValue:E}=x,A=r.value?.model;switch(w){case"lock":b(A,E),E.lock();break;case"unlock":b(A,E),E.unlock();break;case"invisible":b(A,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const H=i.value?.cloneNode(E);H&&t.value?.setSelected(H);break;case"remove":b(A,E),i.value?.removeNode(E);break}};return _e(i,l,{immediate:!0,deep:!0}),(x,w)=>(k(),P(m(ge),{class:"v-outline-widget",title:"大纲树"},{default:O(()=>[T(m(ms),{data:o.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":c.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":h,"allow-drag":d,onCurrentChange:p,onNodeDrop:f,onNodeDragStart:$,onNodeDragEnd:g},{default:O(({data:E,node:A})=>[T(m(Pe),{class:Ee(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging}]),active:!E.model.invisible&&A.isCurrent,grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?m(Cs):E.model.invisible?m(Ns):void 0,title:E.label,subtitle:E.type,actions:s(E.model),onAction:_,onMouseenter:H=>v(E),onMouseleave:y},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"])]),_:1}))}}),tE=J({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=cf(),i=L(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await tr("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(k(),P(m(ge),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!m(r),onRemove:s},{default:O(()=>[m(r)===0?(k(),P(m(Re),{key:0,"image-size":50})):Z("",!0),m(e)?(k(!0),te(re,{key:1},ae(m(e).items,(l,c)=>(k(),P(m(Pe),{index:c+1,title:l.label,"model-value":l,active:c==m(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:d=>m(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):Z("",!0)]),_:1},8,["subtitle","remove"]))}}),Ce=wf({loader:()=>mf(()=>import("./Editor-ctkAn2cu-Zm0zOJf-.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:J({render(){return Ye("div","正在拼命加载...")}}),errorComponent:J({render(){return Ye("div","组件加载失败!")}})}),nE=J({name:"ApisWidget",__name:"index",setup(n){const e=q(!1),t=q(null),r=q(!1),i=L(()=>r.value?"编辑API":"新增API"),o=L(()=>s.value?.apis||[]),{project:s}=Hi(),a=()=>({method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form",headers:{type:"JSExpression",value:"({})"}}}),u=()=>{e.value=!0,r.value=!1,t.value=a()},l=rj.map(y=>({label:y,value:y.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},d=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(y,$,g)=>{Fe({type:"JSExpression",value:$},window)?g():g(new Error("代码错误"))},p=y=>{y.name==="edit"&&f(y.modelValue),y.name==="remove"&&s.value?.removeApi(y.modelValue.name)},f=y=>{r.value=!0,t.value=Ii(y),e.value=!0},v=async y=>s.value?.existApiName(y.name,r.value?[y.id]:[])?(Me(`API名称 [ ${y.name} ] 已存在`),!1):(s.value?.setApi(y),!0);return(y,$)=>(k(),P(m(ge),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:O(()=>[(k(!0),te(re,null,ae(o.value,g=>(k(),P(m(Pe),{key:g.id,small:"",title:g.name,subtitle:g.label,"model-value":g,tag:g.method?.toUpperCase(),"tag-type":c[g.method||"get"],background:"",actions:["edit","remove"],onClick:b=>f(g),onAction:p},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(k(),P(m(Re),{key:0,"image-size":50})):Z("",!0),T(m(kt),{modelValue:e.value,"onUpdate:modelValue":$[1]||($[1]=g=>e.value=g),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:O(()=>[T(m(he),{gap:"",fit:""},{default:O(()=>[T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:O(()=>[T(m(ne),{name:"method",label:"请求类型",required:"",editor:"radio",options:m(l),props:{button:!0}},null,8,["options"]),T(m(ne),{name:"name",label:"接口名称",required:"",rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"label",label:"备注说明",required:""}),T(m(ne),{name:"url",label:"接口URL",required:""})]),_:1}),T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:O(()=>[t.value.method!=="jsonp"?(k(),P(m(ge),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:O(()=>[T(m(he),{justify:"space-around"},{default:O(()=>[T(m(ne),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),T(m(ne),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),T(m(ne),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),T(m(ne),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:d,props:{button:!0}}),T(m(ne),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:O(()=>[T(m(Ce),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":$[0]||($[0]=g=>t.value.settings.headers.value=g),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):Z("",!0),t.value.method==="jsonp"?(k(),P(m(ge),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:O(()=>[T(m(ne),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),T(m(ne),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),T(m(ne),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),T(m(ne),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):Z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),rE=J({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=lf(),r=q(!1),i=q(!1),o=q({}),s=L(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=f=>f.required||f.official?[]:["edit","remove"],u=f=>f.official&&!f.required,l=async f=>(f.urls=f.urls.split(`
112
112
  `),t.project.value?.setDeps(f),!0),c=f=>{t.project.value?.setDeps(f)},d=()=>{i.value=!1,r.value=!0,o.value=null},h=f=>{i.value=!0,o.value={...f,urls:f.urls.join(`
113
113
  `)},r.value=!0},p=(f,v)=>{v.name==="edit"&&(o.value={...f,urls:f.urls.join(`
114
114
  `)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(f)};return(f,v)=>(k(),P(m(ge),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:d},{default:O(()=>[(k(!0),te(re,null,ae(m(e),y=>(k(),P(m(Pe),{key:y.package,title:y.package,subtitle:y.version,actions:a(y),background:"",switch:u(y),modelValue:y.enabled,"onUpdate:modelValue":$=>y.enabled=$,onSwitch:$=>c(y),onClick:$=>h(y),onAction:$=>p(y,$)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),T(m(kt),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=y=>r.value=y),width:"600px",height:"500px",title:s.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:O(()=>[T(m(ne),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),T(m(ne),{name:"version",label:"版本",required:""}),T(m(ne),{name:"library",label:"导出名称",required:""}),T(m(ne),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),T(m(ne),{name:"assetsUrl",label:"物料URL"}),T(m(ne),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),iE=J({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>t.model.name),o=L(()=>!Oe(t.model)&&!t.model.locked),s=L(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),a=[{name:"prev",icon:Nh,title:"向前移动"},{name:"next",icon:Mh,title:"向后移动"},{name:"copy",icon:Bs,title:"复制"},{name:"remove",icon:Tr,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await tr("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,d)=>(k(),te("div",{class:Ee(["v-actions",[`is-${t.position}`]])},[T(m(nt),{mode:"icon",size:"small",icon:m(Is),label:i.value,menus:s.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),T(m(z7),{disabled:!o.value,mode:"icon",size:"small",items:a,background:"none",onClick:l},null,8,["disabled"])],2))}}),oE={key:1,class:"v-designer__placeholder"},sE=J({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=q(),r=q(),{width:i,height:o}=bs(t),{dependencies:s,engine:a}=lf(),{current:u,isEmpty:l}=He(),c=L(()=>a.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:d,hover:h,dropping:p,selected:f}=pj(r,s),v=y=>{const $=y.type,g=y.model;if(u.value)switch($){case"remove":u.value.removeNode(g),d.value?.setSelected(null);break;case"copy":const b=u.value.cloneNode(g);d.value?.setSelected(b);break;case"prev":u.value.movePrev(g),d.value?.setSelected(g);break;case"next":u.value.moveNext(g),d.value?.setSelected(g);break;case"hover":d.value?.setHover(g);break;case"selected":d.value?.setSelected(g);break}};return e({designer:d,mode:c}),(y,$)=>(k(),te("div",{ref_key:"container",ref:t,class:"v-designer"},[T(m(df),{mode:c.value,width:m(i),height:m(o)},{default:O(()=>[pe("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),m(p)?(k(),te("div",{key:0,class:Ee(["v-designer__dropping","is-inner"]),style:Gt(m(p).style)},null,4)):Z("",!0),m(h)?(k(),te("div",{key:1,class:"v-designer__hover",style:Gt(m(h).style)},[pe("span",{class:Ee(`is-${m(h).position}`)},[fe(ie(m(h).model.name)+": ",1),pe("i",null,ie(m(h).model.id),1)],2)],4)):Z("",!0),m(f)?(k(),te("div",{key:2,class:"v-designer__selected",style:Gt(m(f).style)},[T(iE,{position:m(f).position,model:m(f).model,path:m(f).path,onAction:v},null,8,["position","model","path"])],4)):Z("",!0)]),_:1},8,["mode","width","height"]),m(u)?Z("",!0):(k(),P(m(Re),{key:0,description:"请新建或打开文件"})),m(u)&&m(l)?(k(),te("div",oE," 您可以拖拽组件放置到这里 ")):Z("",!0)],512))}}),Or=J({__name:"group",props:{context:{},current:{},title:{},nameLabel:{},valueLabel:{},createEmpty:{},list:{},remove:{},submit:{},itemTitle:{type:Function,default:n=>n.name}},setup(n){const e=n,t=q(),r=q(),i=q(!1),o=q(e.createEmpty()),s=q(!1),a=L(()=>s.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{s.value=!1,o.value=e.createEmpty(),i.value=!0},l=(f,v)=>{switch(v.name){case"edit":d(f);break;case"remove":e.remove(f);break}},c=f=>{o.value.value=f},d=f=>{s.value=!0,o.value={...f},i.value=!0},h=async f=>e.submit(f,s.value),p=()=>{r.value?.itemRef.validate()};return(f,v)=>(k(),P(m(ge),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:O(()=>[(k(!0),te(re,null,ae(f.list,y=>(k(),P(m(Pe),{title:e.itemTitle(y),border:"",actions:["edit","remove"],onAction:$=>l(y,$),onClick:$=>d(y)},null,8,["title","onAction","onClick"]))),256)),f.list.length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":40})),T(m(la),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=y=>i.value=y),title:a.value,"submit-method":h,model:o.value,block:f.current,context:f.context,onPick:c},{default:O(()=>[le(f.$slots,"fields",Ot(Qt({model:o.value,isEdit:s.value,nameLabel:f.nameLabel,valueLabel:f.valueLabel})),()=>[T(m(ne),{name:"name",label:f.nameLabel,required:"",disabled:s.value},null,8,["label","disabled"]),T(m(ne),{ref_key:"codeFieldRef",ref:r,name:"value",label:f.valueLabel,required:""},{editor:O(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=y=>o.value.value=y),onBlur:p},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),aE=J({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.state||{}).map(([s,a])=>({name:s,value:qn(a)}))),r=()=>({name:"",value:""}),i=s=>e.current?.removeState(s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.state[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Fe(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(s,a)=>(k(),P(Or,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),lE=J({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.computed||{}).map(([s,a])=>({name:s,value:qn(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("computed",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.computed[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Fe(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(s,a)=>(k(),P(Or,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),uE=J({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.methods||{}).map(([s,a])=>({name:s,value:qn(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("methods",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.methods[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Fe(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(s,a)=>(k(),P(Or,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),cE=J({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>d$.map(a=>({label:a,value:a}))),r=L(()=>Object.entries(e.current?.lifeCycles||{}).map(([a,u])=>({name:a,value:qn(u)}))),i=()=>({name:"",value:"() => { }"}),o=a=>e.current?.removeFunction("lifeCycles",a.name),s=async(a,u)=>{const{name:l,value:c}=a;if(!u&&e.current?.lifeCycles[l])return Me(`名称 ${l} 已存在,请更换!`),!1;const d={type:"JSFunction",value:c};return Fe(d,e.context,!0)?(e.current?.setFunction("lifeCycles",l,d),!0):!1};return(a,u)=>(k(),P(Or,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:s},{fields:O(({model:l,nameLabel:c,isEdit:d,valueLabel:h})=>[T(m(ne),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:d},null,8,["label","options","disabled"]),T(m(ne),{name:"value",label:h,required:""},{editor:O(()=>[T(m(Ce),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":p=>l.value=p},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),hE=J({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>(e.current?.watch||[]).map(a=>({...a,source:qn(a.source),handler:qn(a.handler)}))),r=()=>({source:"() => { }",deep:!1,immediate:!1,handler:"() => { }"}),i=a=>a.source,o=a=>e.current?.removeWatch(a),s=async(a,u)=>{const l={type:"JSFunction",value:a.source},c={type:"JSFunction",value:a.handler};if(!Fe(l,e.context,!0)||!Fe(c,e.context,!0))return!1;const d={...a,source:l,handler:c};return e.current?.setWatch(d),!0};return(a,u)=>(k(),P(Or,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:s,itemTitle:i,grow:""},{fields:O(({model:l,nameLabel:c,valueLabel:d})=>[T(m(ne),{name:"source",label:c,required:""},{editor:O(()=>[T(m(Ce),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":h=>l.source=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),T(m(ne),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":h=>l.deep=h,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),T(m(ne),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":h=>l.immediate=h,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),T(m(ne),{name:"handler",label:d,required:""},{editor:O(()=>[T(m(Ce),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":h=>l.handler=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),dE=J({__name:"index",setup(n){const{current:e,context:t}=He();return(r,i)=>(k(),P(m(he),{class:"v-scripts-widget",direction:"column",fit:""},{default:O(()=>[T(aE,{current:m(e),context:m(t)},null,8,["current","context"]),T(lE,{current:m(e),context:m(t)},null,8,["current","context"]),T(uE,{current:m(e),context:m(t)},null,8,["current","context"]),T(cE,{current:m(e),context:m(t)},null,8,["current","context"]),T(hE,{current:m(e),context:m(t)},null,8,["current","context"])]),_:1}))}}),go=J({__name:"setters",props:{context:{},current:{},title:{},items:{},node:{},removable:{type:Boolean}},emits:["change","remove"],setup(n,{emit:e}){const t=n,r=e,i=(s,a)=>{r("change",s,a)},o=s=>{r("remove",s)};return(s,a)=>(k(),P(m(ge),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:O(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:a[0]||(a[0]=dr(In(()=>{},["prevent","stop"]),["enter"]))},{default:O(()=>[(k(!0),te(re,null,ae(t.items,u=>(k(),P(m(Ft),je(u,{key:`${u.name}_${t.node.id}`,current:t.current,context:t.context,removable:t.removable,onChange:i,onRemove:o}),null,16,["current","context","removable"]))),128))]),_:1})]),_:1},8,["title"]))}}),pE=J({__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{node:i,commonProps:o,change:s,componentProps:a,customProps:u,addCustom:l,removeCustom:c,isExist:d}=gj(r),h=q(!1),p=q(),f=()=>{h.value=!0,p.value={name:""}},v=async $=>{const g=Object.keys(i.value?.props||{});return!d($.name)&&!g.includes($.name)?(l($.name),!0):(Me("已存在该属性名称"),!1)},y=async $=>{await tr("确定删除?")&&c($)};return($,g)=>m(e)?(k(),P(m(he),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:O(()=>[m(i)?(k(),P(go,{key:0,title:"通用属性",current:m(e),context:m(t),node:m(i),items:m(o),onChange:m(s)},null,8,["current","context","node","items","onChange"])):Z("",!0),m(i)?(k(),P(go,{key:1,title:"组件属性",current:m(e),context:m(t),node:m(i),items:m(a),onChange:m(s)},null,8,["current","context","node","items","onChange"])):Z("",!0),m(i)?(k(),P(go,{key:2,title:"自定义属性",current:m(e),context:m(t),node:m(i),items:m(u),onChange:m(s),removable:"",plus:"",grow:"",onPlus:f,onRemove:y},null,8,["current","context","node","items","onChange"])):Z("",!0),T(m(kt),{modelValue:h.value,"onUpdate:modelValue":g[0]||(g[0]=b=>h.value=b),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:p.value},{default:O(()=>[T(m(ne),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):Z("",!0)}}),fE=J({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=q(),r=gn({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,s)=>(k(),P(m(la),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:O(()=>[T(m(ne),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:O(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),dark:"",height:"450px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),mE=J({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=q(),r=gn({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=ij.map(s=>({label:s,value:s})),o=s=>{t.value.getEditor().setValue(s),r.handler.value=s};return(s,a)=>(k(),P(m(la),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:O(()=>[T(m(ne),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:m(i)},null,8,["options"]),T(m(ne),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:O(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,modelValue:r.handler.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.handler.value=u),dark:"",height:"350px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),vE=J({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{mouseEventList:i,keyboardEventList:o,componentEventList:s}=yj(r),a=q({name:"",event:void 0}),u=q(!1),l=f=>{a.value=Ii(f),u.value=!0},c=async f=>{const v={...f,modifiers:f.modifiers.reduce((y,$)=>(y[$]=!0,y),{})};return Fe(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},d=async f=>{const v=r.value?.model;f.name&&(v.removeEvent(f.name),u.value=!1)},h=async()=>{a.value.name&&await tr("确定要删除该事件吗?")&&d(a.value)},p=f=>{const{name:v,modelValue:y}=f;v==="edit"&&l(y),v==="remove"&&d(y)};return(f,v)=>(k(),P(m(he),{class:"v-events-widget",direction:"column",fit:""},{default:O(()=>[T(m(ge),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:O(()=>[m(s).length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":50,description:"该组件无自带事件"})),(k(!0),te(re,null,ae(m(s),y=>(k(),P(m(Pe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),T(m(ge),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:O(()=>[(k(!0),te(re,null,ae(m(i),y=>(k(),P(m(Pe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),T(m(ge),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:O(()=>[(k(!0),te(re,null,ae(m(o),y=>(k(),P(m(Pe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),u.value?(k(),P(m(mE),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=y=>u.value=y),context:m(t),current:m(e),name:a.value.name,event:a.value.event,submitMethod:c,onUnbind:h},null,8,["modelValue","context","current","name","event"])):Z("",!0)]),_:1}))}}),gE=J({name:"CssWidget",__name:"index",setup(n){const{current:e}=He(),t=q(),r=L(()=>e.value?.css||""),i=s=>{e.value?.setCss(s)},o=()=>{const s=(t.value?.getEditor()).getValue();i(s),et("保存成功")};return(s,a)=>(k(),P(m(ge),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:O(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),yE=J({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{vIf:i,vShow:o,vBind:s,vFor:a,vModels:u,onValueChange:l,onForChange:c,onModelChange:d}=xj(r),h=p=>p.arg?typeof p.arg=="string"?p.arg:tn(p.arg,{}):"modelValue";return(p,f)=>(k(),P(m(he),{class:"v-directives-widget",direction:"column",fit:""},{default:O(()=>[T(m(ge),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:O(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:f[0]||(f[0]=dr(In(()=>{},["prevent","stop"]),["enter"]))},{default:O(()=>[T(m(Ft),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(i).value,onChange:m(l)},null,8,["current","context","value","onChange"]),T(m(Ft),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(o).value,onChange:m(l)},null,8,["current","context","value","onChange"]),T(m(Ft),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(s).value,onChange:m(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),T(m(ge),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:O(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:f[1]||(f[1]=dr(In(()=>{},["prevent","stop"]),["enter"]))},{default:O(()=>[T(m(Ft),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(a).value,onChange:m(c)},null,8,["current","context","value","onChange"]),T(m(Ft),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:m(e),context:m(t),value:m(a).iterator?.item,onChange:m(c)},null,8,["current","context","value","onChange"]),T(m(Ft),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:m(e),context:m(t),value:m(a).iterator?.index,onChange:m(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),T(m(ge),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:O(()=>[(k(!0),te(re,null,ae(m(u),(v,y)=>(k(),P(m(ge),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${h(v)}`,body:{grow:!1},fit:!1},{default:O(()=>[T(m(pr),{size:"small","label-width":"60px",onKeydown:f[2]||(f[2]=dr(In(()=>{},["prevent","stop"]),["enter"]))},{default:O(()=>[T(m(Ft),{name:y.toString(),label:"绑定变量",setters:"ExpressionSetter",current:m(e),context:m(t),value:v.value,onChange:m(d)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),m(u).length?Z("",!0):(k(),P(m(Re),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),bE=J({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义属性":"新增定义属性"),r=q(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys(Kp).map(s=>({label:s,value:s})),o=async s=>{const a=s.default;return a&&!Fe(a,e.context,!0)?!1:(e.current.setProp(s),!0)};return(s,a)=>(k(),P(m(kt),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:O(()=>[T(m(ne),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"]),T(m(ne),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:m(i),required:""},null,8,["options"]),T(m(ne),{name:"required",label:"必须",editor:"switch"}),T(m(ne),{name:"default.value",label:"默认值",editor:"none"},{default:O(()=>[T(m(Ce),{modelValue:r.value.default.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.value.default.value=u),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),wE=J({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义事件":"新增定义事件"),r=q({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,s)=>(k(),P(m(kt),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:O(()=>[T(m(ne),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),_E=J({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=q({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,s)=>(k(),P(m(kt),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:O(()=>[T(m(ne),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),xE=J({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑注入":"新增注入"),r=q(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const s=o.default;return s&&!Fe(s,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,s)=>(k(),P(m(kt),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:O(()=>[T(m(ne),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"]),T(m(ne),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),T(m(ne),{name:"default.value",label:"默认值",editor:"none"},{default:O(()=>[T(m(Ce),{modelValue:r.value.default.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value.default.value=a),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),SE=J({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=He(),r=L(()=>(e.value?.props||[]).map(j=>typeof j=="string"?{name:j}:j)),i=L(()=>e.value?.emits||[]),o=L(()=>e.value?.slots||[]),s=L(()=>e.value?.inject||[]),a=q(!1),u=q(),l=q(!1),c=q(),d=q(!1),h=q(),p=q(!1),f=q(),v=()=>{u.value=void 0,a.value=!0},y=j=>{const{name:N,modelValue:V}=j;N==="edit"&&$(V),N==="remove"&&e.value?.removeProp(V)},$=j=>{u.value=j,a.value=!0},g=()=>{c.value=void 0,l.value=!0},b=j=>{c.value=j,l.value=!0},_=j=>{const{name:N,modelValue:V}=j;N==="edit"&&b(V),N==="remove"&&e.value?.removeEmit(V)},x=()=>{h.value=void 0,d.value=!0},w=j=>{h.value=j,d.value=!0},E=j=>{const{name:N,modelValue:V}=j;N==="edit"&&w(V),N==="remove"&&e.value?.removeSlot(V)},A=()=>{f.value=void 0,p.value=!0},H=j=>{f.value=j,p.value=!0},S=j=>{const{name:N,modelValue:V}=j;N==="edit"&&H(V),N==="remove"&&e.value?.removeInject(V)};return(j,N)=>m(e)&&m(t)?(k(),P(m(he),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:O(()=>[T(m(ge),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:O(()=>[(k(!0),te(re,null,ae(r.value,V=>(k(),P(m(Pe),{"model-value":V,title:V.name,border:"",actions:["edit","remove"],onClick:z=>$(V),onAction:y},null,8,["model-value","title","onClick"]))),256)),r.value.length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":50})),a.value?(k(),P(bE,{key:1,current:m(e),context:m(t),modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=V=>a.value=V),item:u.value},null,8,["current","context","modelValue","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:g},{default:O(()=>[(k(!0),te(re,null,ae(i.value,V=>(k(),P(m(Pe),{"model-value":V,title:V,border:"",actions:["remove"],onClick:z=>b(V),onAction:_},null,8,["model-value","title","onClick"]))),256)),i.value.length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":50})),l.value?(k(),P(wE,{key:1,modelValue:l.value,"onUpdate:modelValue":N[1]||(N[1]=V=>l.value=V),current:m(e),context:m(t),item:c.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:x},{default:O(()=>[(k(!0),te(re,null,ae(o.value,V=>(k(),P(m(Pe),{"model-value":V,title:V,border:"",actions:["remove"],onClick:z=>w(V),onAction:E},null,8,["model-value","title","onClick"]))),256)),o.value.length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":50})),d.value?(k(),P(_E,{key:1,modelValue:d.value,"onUpdate:modelValue":N[2]||(N[2]=V=>d.value=V),current:m(e),context:m(t),item:h.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:A},{default:O(()=>[(k(!0),te(re,null,ae(s.value,V=>(k(),P(m(Pe),{"model-value":V,title:V.name,border:"",actions:["remove"],onClick:z=>H(V),onAction:S},null,8,["model-value","title","onClick"]))),256)),s.value.length?Z("",!0):(k(),P(m(Re),{key:0,"image-size":50})),p.value?(k(),P(xE,{key:1,modelValue:p.value,"onUpdate:modelValue":N[3]||(N[3]=V=>p.value=V),current:m(e),context:m(t),item:f.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1})]),_:1})):Z("",!0)}}),$E=J({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=Sj(),r=q(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {