@vtj/pro 0.7.21 → 0.7.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/assets/{index-AhotWI8F.js → index-BHI4MX59.js} +1 -1
- package/dist/assets/{index-DJr5bB4x.js → index-Bg1zyKQS.js} +7 -7
- package/dist/assets/{index-BahTfvW_.js → index-xz9-w-X_.js} +2 -2
- package/dist/assets/{preview-DkjQEL0E.js → preview-otBQ6xgp.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +10 -10
|
@@ -56,13 +56,13 @@ version: 2.9.0
|
|
|
56
56
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
57
57
|
* @name @vtj/core
|
|
58
58
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
59
|
-
* @version 0.7.
|
|
59
|
+
* @version 0.7.22
|
|
60
60
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
61
61
|
*/const Ti="BuiltIn",ou="VueMaterial",au="VueRouterMaterial",Mg={vue:"Vue","vue-router":"VueRouter"},Rg={[ou]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[au]:["RouterView","RouterLink"]};let So=class{listeners=[];isReady=!1;triggerReady(){this.isReady=!0;for(const e of this.listeners)e();this.listeners=[]}ready(e){this.isReady?e():this.listeners.push(e)}resetReady(){this.isReady=!1}},ii=class su{constructor(e,t,r){this.name=e,this.value=t,this.defaultValue=r,this.setValue(t)}isUnset=!1;setValue(e){this.value=e,this.isUnset=this.value===this.defaultValue}getValue(){return this.value??this.defaultValue}static toDsl(e={}){return Object.entries(e).reduce((t,[r,i])=>(i.isUnset||(t[r]=i.getValue()),t),{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new su(r,i),t),{})}},oi=class lu{constructor(e){this.schema=e;const{name:t,handler:r}=this.schema;this.name=t,this.handler=r,this.update(e)}name;handler;modifiers={};update(e){Object.assign(this.schema,e);const{handler:t,modifiers:r={}}=this.schema;this.handler=t,this.modifiers=r}static toDsl(e){return Object.entries(e).reduce((t,[r,i])=>{const{handler:o,modifiers:a}=i;return t[r]={name:r,handler:o,modifiers:a},t},{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new lu(i),t),{})}},rn=class uu{constructor(e){this.schema=e,this.id=e.id||ut(),this.update(e)}id;name="";arg;modifiers;value;iterator;update(e){Object.assign(this.schema,e);const{name:t,arg:r,modifiers:i,value:o,iterator:a}=this.schema;this.name=t,this.arg=r,this.modifiers=i,this.value=o,this.iterator=a}static parse(e=[]){return e.map(t=>new uu(t))}static toDsl(e=[]){return e.map(t=>{const{name:r,arg:i,modifiers:o,value:a,iterator:s,id:u}=t;return{id:u,name:r,arg:i,modifiers:o,value:a,iterator:s}})}};const Se="EVENT_NODE_CHANGE";let $r=class mr{constructor(e,t=null){this.parent=t;const{id:r=ut(),name:i,from:o=""}=e;this.id=r,this.name=i,this.from=o,this.update(e,!0),mr.nodes[this.id]=this}__VTJ_NODE__=!0;locked=!1;static nodes={};id;name;from;invisible=!1;children="";slot;props={};events={};directives=[];disposed=!1;update(e,t=!1){const{invisible:r=!1,locked:i=!1,children:o=[],slot:a,props:s={},events:u={},directives:l=[]}=e;this.invisible=r,this.locked=i,this.setChildren(o,!0),this.setSlot(a,!0),this.props=ii.parse(s),this.events=oi.parse(u),this.directives=rn.parse(l),t||q.emit(Se,this)}setChildren(e="",t=!1){Array.isArray(e)?this.children=e.map(r=>new mr(r,this)):this.children=e,t||q.emit(Se,this)}setSlot(e,t=!1){this.slot=typeof e=="string"?{name:e,params:[]}:e,t||q.emit(Se,this)}setProp(e,t,r,i=!1){const o=this.props[e];o?o.setValue(t):this.props[e]=new ii(e,t,r),i||q.emit(Se,this)}removeProp(e,t=!1){delete this.props[e],t||q.emit(Se,this)}getPropValue(e){const t=this.props[e];if(t)return t.getValue()}setEvent(e,t=!1){const r=this.events[e.name];r?r.update(e):this.events[e.name]=new oi(e),t||q.emit(Se,this)}removeEvent(e,t=!1){delete this.events[e],t||q.emit(Se,this)}setDirective(e,t=!1){const r=this.directives.findIndex(i=>i.id===e.id);r>=0?this.directives.splice(r,1,new rn(e)):this.directives.push(new rn(e)),t||q.emit(Se,this)}removeDirective(e,t=!1){const r=this.directives.findIndex(i=>i===e||i.id===e.id);r>=0&&this.directives.splice(r,1),t||q.emit(Se,this)}removeChild(e,t=!1){const{children:r,disposed:i}=this;if(i||!Array.isArray(r))return;const o=r.findIndex(a=>a===e);e.parent=null,r.splice(o,1),t||q.emit(Se,this)}appendChild(e,t=!1){const{children:r,disposed:i}=this;i||(e.parent=this,Array.isArray(r)?r.push(e):this.children=[e],t||q.emit(Se,this))}insertAfter(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i+1,0,e),t||q.emit(Se,this.parent)}}insertBefore(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i,0,e),t||q.emit(Se,this.parent)}}movePrev(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>0&&(r.splice(i,1),r.splice(i-1,0,this),e||q.emit(Se,t))}}moveNext(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,this),e||q.emit(Se,t))}}toDsl(){const{id:e,name:t,from:r,invisible:i,locked:o,slot:a,children:s,props:u,directives:l,events:c}=this,p=Array.isArray(s)?s.map(m=>m.toDsl()):s;return{id:e,name:t,from:r,invisible:i,locked:o,slot:a,children:p,props:ii.toDsl(u),directives:rn.toDsl(l),events:oi.toDsl(c)}}dispose(e=!1){const{children:t,disposed:r}=this;r||(Array.isArray(t)&&t.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,e):e||q.emit(Se,this),this.parent=null,this.disposed=!0,delete mr.nodes[this.id])}lock(e=!1){if(this.locked=!0,Array.isArray(this.children))for(const t of this.children)t.lock(!0);e||q.emit(Se,this)}unlock(e=!1){if(this.locked=!1,Array.isArray(this.children))for(const t of this.children)t.unlock(!0);e||q.emit(Se,this)}setVisible(e,t=!1){if(this.invisible=!e,Array.isArray(this.children))for(const r of this.children)r.setVisible(e,!0);t||q.emit(Se,this)}isChild(e){let t=!1;if(Array.isArray(this.children)){for(const r of this.children)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break}return t}};const ge="EVENT_BLOCK_CHANGE";let ln=class Bi{__VTJ_BLOCK__=!0;id;name="";inject=[];state={};lifeCycles={};methods={};computed={};watch=[];css="";props=[];emits=[];slots=[];dataSources={};nodes=[];locked=!1;disposed=!1;static normalAttrs=["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources"];constructor(e){const{id:t}=e;this.id=t||ut(),this.update(e,!0)}update(e,t=!1){for(const i of Bi.normalAttrs){const o=e[i];o&&(this[i]=o)}const{nodes:r=[]}=e;r.length&&(this.nodes=r.map(i=>new $r(i))),t||q.emit(ge,this)}toDsl(e){const{__VTJ_BLOCK__:t,id:r,nodes:i}=this;return{...Bi.normalAttrs.reduce((o,a)=>(o[a]=this[a],o),{}),__VTJ_BLOCK__:t,__VERSION__:e||eu().toString(),id:r,nodes:i.map(o=>o.toDsl())}}dispose(){this.nodes.map(e=>e.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(e,t,r,i=!1){this[e][t]=r,i||q.emit(ge,this)}removeFunction(e,t,r=!1){delete this[e][t],r||q.emit(ge,this)}setState(e,t,r=!1){this.state[e]=t,r||q.emit(ge,this)}removeState(e,t=!1){delete this.state[e],t||q.emit(ge,this)}setCss(e,t=!1){this.css=e,t||q.emit(ge,this)}setWatch(e,t=!1){e.id=e.id||ut();const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1?this.watch.splice(r,1,e):this.watch.push(e),t||q.emit(ge,this)}removeWatch(e,t=!1){const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1&&(this.watch.splice(r,1),t||q.emit(ge,this))}setProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1?this.props.splice(r,1,e):this.props.push(e),t||q.emit(ge,this)}removeProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1&&(this.props.splice(r,1),t||q.emit(ge,this))}setEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1?this.emits.splice(r,1,e):this.emits.push(e),t||q.emit(ge,this)}removeEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1&&(this.emits.splice(r,1),t||q.emit(ge,this))}setSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1?this.slots.splice(r,1,e):this.slots.push(e),t||q.emit(ge,this)}removeSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1&&(this.slots.splice(r,1),t||q.emit(ge,this))}setInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1?this.inject.splice(r,1,e):this.inject.push(e),t||q.emit(ge,this)}removeInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1&&(this.inject.splice(r,1),t||q.emit(ge,this))}setDataSource(e,t=!1){this.dataSources[e.name]=e,t||q.emit(ge,this)}removeDataSource(e,t=!1){delete this.dataSources[e],t||q.emit(ge,this)}insertAfter(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i+1,0,e),r||q.emit(ge,this)}insertBefore(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i,0,e),r||q.emit(ge,this)}appendNode(e,t=!1){e.parent=null,this.nodes.push(e),t||q.emit(ge,this)}addNode(e,t,r="inner",i=!1){t?["left","top"].includes(r)?t.parent?t.insertAfter(e,i):this.insertBefore(e,t,i):["right","bottom"].includes(r)?t.parent?t.insertAfter(e,i):this.insertAfter(e,t,i):t.appendChild(e,i):this.appendNode(e,i)}__removeNode(e,t=!1){const r=this.nodes.findIndex(i=>i.id===e.id);r>-1&&(this.nodes.splice(r,1),t||q.emit(ge,this))}removeNode(e,t=!1){e.parent?e.dispose(t):(e.dispose(!0),this.__removeNode(e,t))}move(e,t,r="inner",i=!1){e.parent?e.parent.removeChild(e,!0):this.__removeNode(e,!0),this.addNode(e,t,r,i)}movePrev(e,t=!1){if(e.parent)e.movePrev(t);else{const r=this.nodes,i=r.indexOf(e);i>0&&(r.splice(i,1),r.splice(i-1,0,e),t||q.emit(ge,this))}}moveNext(e,t=!1){if(e.parent)e.moveNext(t);else{const r=this.nodes,i=r.indexOf(e);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,e),t||q.emit(ge,this))}}cloneNode(e,t=!1){const r=pu(e.toDsl()),i=new $r(r);return this.addNode(i,e,"bottom",t),i}lock(e=!1){this.locked=!0;for(const t of this.nodes)t.lock(!0);e||q.emit(ge,this)}unlock(e=!1){this.locked=!1;for(const t of this.nodes)t.unlock(!0);e||q.emit(ge,this)}isChild(e){let t=!1;for(const r of this.nodes)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break;return t}};const Ue="EVENT_PROJECT_CHANGE",Fn="EVENT_PROJECT_ACTIVED",zi="EVENT_PROJECT_DEPS_CHANGE",En="EVENT_PROJECT_PAGES_CHANGE",fr="EVENT_PROJECT_BLOCKS_CHANGE",Xa="EVENT_PROJECT_APIS_CHANGE",cu="EVENT_PROJECT_PUBLISH",du="EVENT_PROJECT_FILE_PUBLISH";let Pg=class Oi{id="";name="";description="";homepage="";dependencies=[];pages=[];blocks=[];apis=[];currentFile=null;static attrs=["name","homepage","description","dependencies","pages","blocks","apis"];constructor(e){const{id:t}=e;this.id=t||ut(),this.update(e,!0)}update(e,t=!1){for(const r of Oi.attrs){const i=e[r];i&&(this[r]=i)}t||q.emit(Ue,{model:this,type:"update",data:e})}isPageFile(e){return e.type==="page"}toDsl(e){const{id:t}=this,r=Oi.attrs.reduce((i,o)=>(i[o]=this[o],i),{});return r.pages&&(r.pages=r.pages.map(i=>(delete i.dsl,i))),r.blocks&&(r.blocks=r.blocks.map(i=>(delete i.dsl,i))),{__VTJ_PROJECT__:!0,__VERSION__:e||eu().toString(),id:t,...r}}active(e,t=!1){this.currentFile=e,t||q.emit(Fn,{model:this,type:"update",data:e})}deactivate(e=!1){this.currentFile=null,e||q.emit(Fn,{model:this,type:"update",data:null})}setDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(a=>a.package===e.package);let o;if(i>-1?(o="update",r.splice(i,1,{...r[i],...e})):(o="create",r.push(e)),!t){const a={model:this,type:o,data:e};q.emit(zi,a),q.emit(Ue,a)}}removeDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(o=>o.package===e.package);if(i>-1&&r.splice(i,1),!t){const o={model:this,type:"delete",data:e};q.emit(zi,o),q.emit(Ue,o)}}getPage(e){const t=(r,i=[])=>{for(const o of i){if(o.id===r)return o;if(o.children&&o.children.length){const a=t(r,o.children);if(a)return a}}};return t(e,this.pages)}getPages(){const e=(t=[])=>{let r=[];for(const i of t)i.dir?i.children&&i.children.length&&(r=r.concat(e(i.children))):r.push(i);return r};return e(this.pages)}createPage(e,t,r=!1){if(e.id=e.raw?e.name:e.id||ut(),e.type="page",e.dir?e.children=[]:e.dsl=e.dsl||new ln({id:e.id,name:jr(e.name)}).toDsl(),t){const i=this.getPage(t);i?i.children?i.children.push(e):i.children=[e]:console.warn(`not found PageFile for id: ${t} `)}else this.pages.push(e);if(!this.currentFile&&!e.dir&&this.active(e,r),!r){const i={model:this,type:"create",data:e};q.emit(En,i),q.emit(Ue,i)}}updatePage(e,t=!1){const r=this.getPage(e.id);if(r?Object.assign(r,e):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};q.emit(En,i),q.emit(Ue,i)}}clonePage(e,t,r=!1){const i=ut(),o=`${e.name}Copy`,a=`${e.title}_副本`,s=new ln({id:i,name:o}).toDsl(),u=ct({},e,{id:i,name:o,title:a,dsl:s}),l=t?this.getPage(t)?.children||[]:this.pages,c=l.findIndex(p=>p.id===e.id);if(l.splice(c+1,0,u),!r){const p={model:this,type:"clone",data:{page:e,newPage:u}};q.emit(En,p),q.emit(Ue,p)}}removePage(e,t=!1){const r=this.getPage(e),i=(o,a)=>{const s=a.findIndex(u=>u.id===o);if(s>=0){a.splice(s,1);return}for(const u of a)if(u.children&&u.children.length)return i(o,u.children)};if(i(e,this.pages),e===this.homepage&&(this.homepage=""),this.currentFile?.id===e&&this.deactivate(t),!t){const o={model:this,type:"delete",data:r};q.emit(En,o),q.emit(Ue,o)}}getBlock(e){return this.blocks.find(t=>t.id===e)}createBlock(e,t=!1){const r=e.id||ut(),i=jr(e.name);if(e.id=r,e.type="block",e.dsl=new ln({id:r,name:i}).toDsl(),this.blocks.push(e),this.currentFile||this.active(e,t),!t){const o={model:this,type:"create",data:e};q.emit(fr,o),q.emit(Ue,o)}}updateBlock(e,t=!1){const r=this.getBlock(e.id);if(r?(Object.assign(r,e),r.dsl&&(r.dsl.name=e.name)):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};q.emit(fr,i),q.emit(Ue,i)}}removeBlock(e,t=!1){const r=this.getBlock(e),i=this.blocks,o=i.findIndex(a=>a.id===e);if(o>-1?(i.splice(o,1),this.currentFile?.id===e&&this.deactivate(t)):console.warn(`not found PageFile for id: ${e} `),!t){const a={model:this,type:"delete",data:r};q.emit(fr,a),q.emit(Ue,a)}}existBlockName(e,t=[]){return this.blocks.some(r=>r.name===e&&!t.includes(r.id))}existPageName(e,t=[]){return this.getPages().some(r=>r.name===e&&!t.includes(r.id))}setApi(e,t=!1){const r=this.apis.find(o=>o.name===e.name||o.id===e.id);let i;if(r?(i="update",Object.assign(r,e)):(i="create",e.id=ut(),this.apis.push(e)),!t){const o={model:this,type:i,data:e};q.emit(Xa,o),q.emit(Ue,o)}}removeApi(e,t=!1){const r=this.apis.findIndex(i=>i.name===e||i.id===e);if(r>-1?this.apis.splice(r,1):console.warn(`not found Api for name: ${e} `),!t){const i={model:this,type:"delete",data:e};q.emit(Xa,i),q.emit(Ue,i)}}existApiName(e,t=[]){return this.apis.some(r=>r.name===e&&!t.includes(r.id))}setHomepage(e,t=!1){if(this.homepage=e,!t){const r={model:this,type:"update",data:e};q.emit(Ue,r)}}publish(e){const t={model:this,type:"publish",data:e||this};e?q.emit(du,t):q.emit(cu,t)}};const Cn="EVENT_HISTORY_CHANGE",vr="EVENT_HISTORY_LOAD";let Ng=class{options={max:50};index=-1;id;items;constructor(e,t={}){Object.assign(this.options,t);const{id:r,items:i=[]}=e;this.id=r,this.items=i}toDsl(){const{id:e,items:t}=this;return{id:e,items:t.map(r=>({id:r.id,label:r.label}))}}get(e){return this.items.find(t=>t.id===e)}add(e,t=!1){const{max:r}=this.options,i={id:ut(),label:new Date().toLocaleString(),dsl:Jn(e)};if(this.items.unshift(i),this.items.length>r){const o=this.items.splice(r);t||q.emit(Cn,{model:this,type:"delete",data:o.map(a=>a.id)})}this.index=-1,t||q.emit(Cn,{model:this,type:"create",data:i})}remove(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>-1?(this.items.splice(r,1),r===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${e} `),t||q.emit(Cn,{model:this,type:"delete",data:[e]})}forward(e=!1){const{index:t,items:r}=this;if(t<0)return;--this.index;const i=r[this.index];i&&!e&&q.emit(vr,{model:this,type:"load",data:i})}backward(e=!1){const{index:t,items:r}=this;if(t>=r.length-1)return;t<0&&(this.index=0),++this.index;const i=r[this.index];i&&!e&&q.emit(vr,{model:this,type:"load",data:i})}load(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>=0&&(this.index=r,t||q.emit(vr,{model:this,type:"load",data:this.items[r]}))}clear(e=!1){this.index=-1;const t=this.items.map(r=>r.id);this.items=[],e||q.emit(Cn,{model:this,type:"clear",data:t})}};const q=Ig();function je(n){return n instanceof ln}function pu(n){return delete n.id,Array.isArray(n.children)&&(n.children=n.children.map(e=>pu(e))),n}/**!
|
|
62
62
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
63
63
|
* @name @vtj/icons
|
|
64
64
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
65
|
-
* @version 0.7.
|
|
65
|
+
* @version 0.7.22
|
|
66
66
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
67
67
|
*/const Fg=O({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Hg=O({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Lg=O({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ug=O({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Jg=O({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),hu=O({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),mu=O({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),fu=O({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),qg=O({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),vu=O({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Wg=O({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Kg=O({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Yg=O({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Gg=O({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Zg=O({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Xg=O({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Qg=O({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>w("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)=>w("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),e2=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:Fg,Fixed:Hg,Fullscreen:Lg,Invisible:Ug,LineHeight:Jg,Maximize:hu,Minimize:mu,Popup:fu,QrCodeLogin:qg,RawClose:vu,RawLock:Wg,RawUnLock:Kg,Rows:Yg,Skin:Gg,UnFixed:Zg,UserLogin:Xg,Visible:Qg},Symbol.toStringTag,{value:"Module"}));function Y(n,e){return zt(O({name:n,render(){return w("i",{class:e})}}))}const t2=Y("VtjIconWindowMax","vtj-icon-window-max"),n2=Y("VtjIconWindowMin","vtj-icon-window-min"),r2=Y("VtjIconWindowClose","vtj-icon-window-close"),i2=Y("VtjIconWindowNormal","vtj-icon-window-normal"),o2=Y("VtjIconWindowDown","vtj-icon-window-down"),a2=Y("VtjIconWindowUp","vtj-icon-window-up"),s2=Y("VtjIconNpSave","vtj-icon-np-save"),l2=Y("VtjIconNpFile","vtj-icon-np-file"),u2=Y("VtjIconNpEdit","vtj-icon-np-edit"),c2=Y("VtjIconNpShare","vtj-icon-np-share"),d2=Y("VtjIconNpSearch","vtj-icon-np-search"),p2=Y("VtjIconNpExport","vtj-icon-np-export"),h2=Y("VtjIconNpImport","vtj-icon-np-import"),m2=Y("VtjIconNpList","vtj-icon-np-list"),f2=Y("VtjIconNpPrint","vtj-icon-np-print"),v2=Y("VtjIconNpCancel","vtj-icon-np-cancel"),g2=Y("VtjIconNpConfirm","vtj-icon-np-confirm"),y2=Y("VtjIconNpReset","vtj-icon-np-reset"),b2=Y("VtjIconNpReturnAll","vtj-icon-np-return-all"),w2=Y("VtjIconNpReturn","vtj-icon-np-return"),_2=Y("VtjIconNpRemove","vtj-icon-np-remove"),x2=Y("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),S2=Y("VtjIconNpDelete","vtj-icon-np-delete"),k2=Y("VtjIconNpExit","vtj-icon-np-exit"),j2=Y("VtjIconNpRefresh","vtj-icon-np-refresh"),$2=Y("VtjIconNpAdd","vtj-icon-np-add"),V2=Y("VtjIconNpSelect","vtj-icon-np-select"),E2=Y("VtjIconNpAddRow","vtj-icon-np-add-row"),C2=Y("VtjIconNpExtend","vtj-icon-np-extend"),A2=Y("VtjIconNpClose","vtj-icon-np-close"),T2=Y("VtjIconNpSubmit","vtj-icon-np-submit"),B2=Y("VtjIconDeps","vtj-icon-deps"),gu=Y("VtjIconBack","vtj-icon-back"),yu=Y("VtjIconHome","vtj-icon-home"),bu=Y("VtjIconApi","vtj-icon-api"),z2=Y("VtjIconExport","vtj-icon-export"),O2=Y("VtjIconImport","vtj-icon-import"),D2=Y("VtjIconGreater","vtj-icon-greater"),I2=Y("VtjIconSmaller","vtj-icon-smaller"),ko=Y("VtjIconCheck","vtj-icon-check"),wu=Y("VtjIconSwitch","vtj-icon-switch"),jo=Y("VtjIconCopy","vtj-icon-copy"),$o=Y("VtjIconLock","vtj-icon-lock"),_u=Y("VtjIconUnlock","vtj-icon-unlock"),Vo=Y("VtjIconLayers","vtj-icon-layers"),M2=Y("VtjIconConsole","vtj-icon-console"),R2=Y("VtjIconTeam","vtj-icon-team"),P2=Y("VtjIconPublish","vtj-icon-publish"),xu=Y("VtjIconPreview","vtj-icon-preview"),Su=Y("VtjIconSave","vtj-icon-save"),ku=Y("VtjIconPc","vtj-icon-pc"),ju=Y("VtjIconPhone","vtj-icon-phone"),$u=Y("VtjIconPad","vtj-icon-pad"),Vu=Y("VtjIconRedo","vtj-icon-redo"),Eu=Y("VtjIconRefresh","vtj-icon-refresh"),Cu=Y("VtjIconUndo","vtj-icon-undo"),Au=Y("VtjIconCategory","vtj-icon-category"),N2=Y("VtjIconProject","vtj-icon-project"),F2=Y("VtjIconNotice","vtj-icon-notice"),H2=Y("VtjIconFav","vtj-icon-fav"),L2=Y("VtjIconBug","vtj-icon-bug"),U2=Y("VtjIconFile","vtj-icon-file"),J2=Y("VtjIconFolder","vtj-icon-folder"),q2=Y("VtjIconUpload","vtj-icon-upload"),W2=Y("VtjIconDownload","vtj-icon-download"),K2=Y("VtjIconUser","vtj-icon-user"),Tu=Y("VtjIconSetting","vtj-icon-setting"),Y2=Y("VtjIconArrowRight","vtj-icon-arrow-right"),G2=Y("VtjIconArrowLeft","vtj-icon-arrow-left"),Bu=Y("VtjIconArrowDown","vtj-icon-arrow-down"),zu=Y("VtjIconArrowUp","vtj-icon-arrow-up"),Z2=Y("VtjIconShare","vtj-icon-share"),X2=Y("VtjIconData","vtj-icon-data"),Q2=Y("VtjIconTemplate","vtj-icon-template"),ey=Y("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),ty=Y("VtjIconFullscreen","vtj-icon-fullscreen"),Eo=Y("VtjIconEdit","vtj-icon-edit"),qn=Y("VtjIconRemove","vtj-icon-remove"),ny=Y("VtjIconJs","vtj-icon-js"),ry=Y("VtjIconDatabase","vtj-icon-database"),Ou=Y("VtjIconInfo","vtj-icon-info"),Co=Y("VtjIconPlus","vtj-icon-plus"),iy=Y("VtjIconMinus","vtj-icon-minus"),Du=Y("VtjIconHelp","vtj-icon-help"),Iu=Y("VtjIconVars","vtj-icon-vars"),Mu=Y("VtjIconOutline","vtj-icon-outline"),Ru=Y("VtjIconVisible","vtj-icon-visible"),Ao=Y("VtjIconInvisible","vtj-icon-invisible"),Pu=Y("VtjIconDocument","vtj-icon-document"),Nu=Y("VtjIconHistory","vtj-icon-history"),oy=Y("VtjIconFixed","vtj-icon-fixed"),ay=Y("VtjIconUnfixed","vtj-icon-unfixed"),Fu=Y("VtjIconSearch","vtj-icon-search"),sy=Y("VtjIconMore","vtj-icon-more"),ly=Y("VtjIconClose","vtj-icon-close"),Hu=Y("VtjIconComponents","vtj-icon-components"),Lu=Y("VtjIconBlock","vtj-icon-block"),uy=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:bu,VtjIconArrowDown:Bu,VtjIconArrowLeft:G2,VtjIconArrowRight:Y2,VtjIconArrowUp:zu,VtjIconBack:gu,VtjIconBlock:Lu,VtjIconBug:L2,VtjIconCategory:Au,VtjIconCheck:ko,VtjIconClose:ly,VtjIconComponents:Hu,VtjIconConsole:M2,VtjIconCopy:jo,VtjIconData:X2,VtjIconDatabase:ry,VtjIconDeps:B2,VtjIconDocument:Pu,VtjIconDownload:W2,VtjIconEdit:Eo,VtjIconExitFullscreen:ey,VtjIconExport:z2,VtjIconFav:H2,VtjIconFile:U2,VtjIconFixed:oy,VtjIconFolder:J2,VtjIconFullscreen:ty,VtjIconGreater:D2,VtjIconHelp:Du,VtjIconHistory:Nu,VtjIconHome:yu,VtjIconImport:O2,VtjIconInfo:Ou,VtjIconInvisible:Ao,VtjIconJs:ny,VtjIconLayers:Vo,VtjIconLock:$o,VtjIconMinus:iy,VtjIconMore:sy,VtjIconNotice:F2,VtjIconNpAdd:$2,VtjIconNpAddRow:E2,VtjIconNpCancel:v2,VtjIconNpClose:A2,VtjIconNpConfirm:g2,VtjIconNpDelete:S2,VtjIconNpEdit:u2,VtjIconNpExit:k2,VtjIconNpExport:p2,VtjIconNpExtend:C2,VtjIconNpFile:l2,VtjIconNpImport:h2,VtjIconNpList:m2,VtjIconNpPrint:f2,VtjIconNpRefresh:j2,VtjIconNpRemove:_2,VtjIconNpRemoveRow:x2,VtjIconNpReset:y2,VtjIconNpReturn:w2,VtjIconNpReturnAll:b2,VtjIconNpSave:s2,VtjIconNpSearch:d2,VtjIconNpSelect:V2,VtjIconNpShare:c2,VtjIconNpSubmit:T2,VtjIconOutline:Mu,VtjIconPad:$u,VtjIconPc:ku,VtjIconPhone:ju,VtjIconPlus:Co,VtjIconPreview:xu,VtjIconProject:N2,VtjIconPublish:P2,VtjIconRedo:Vu,VtjIconRefresh:Eu,VtjIconRemove:qn,VtjIconSave:Su,VtjIconSearch:Fu,VtjIconSetting:Tu,VtjIconShare:Z2,VtjIconSmaller:I2,VtjIconSwitch:wu,VtjIconTeam:R2,VtjIconTemplate:Q2,VtjIconUndo:Cu,VtjIconUnfixed:ay,VtjIconUnlock:_u,VtjIconUpload:q2,VtjIconUser:K2,VtjIconVars:Iu,VtjIconVisible:Ru,VtjIconWindowClose:r2,VtjIconWindowDown:o2,VtjIconWindowMax:t2,VtjIconWindowMin:n2,VtjIconWindowNormal:i2,VtjIconWindowUp:a2},Symbol.toStringTag,{value:"Module"})),cy="data:image/svg+xml,%3csvg%20data-icon='BorderAll'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v12h12V2zm-2%202H4v8h8V4z'%3e%3c/path%3e%3c/svg%3e",dy="data:image/svg+xml,%3csvg%20data-icon='BorderBottom'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%2011V4h8v7h2V2H2v9h2z'%3e%3c/path%3e%3cpath%20d='M2%2014v-2h12v2z'%3e%3c/path%3e%3c/svg%3e",py="data:image/svg+xml,%3csvg%20data-icon='BorderLeft'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5%204h7v8H5v2h9V2H5v2z'%3e%3c/path%3e%3cpath%20d='M2%202h2v12H2z'%3e%3c/path%3e%3c/svg%3e",hy="data:image/svg+xml,%3csvg%20data-icon='BorderRight'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11%204H4v8h7v2H2V2h9v2z'%3e%3c/path%3e%3cpath%20d='M14%202h-2v12h2z'%3e%3c/path%3e%3c/svg%3e",my="data:image/svg+xml,%3csvg%20data-icon='BorderStyleDashed'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M0%207h4v2H0zm6%200h4v2H6zm6%200h4v2h-4z'%3e%3c/path%3e%3c/svg%3e",fy="data:image/svg+xml,%3csvg%20data-icon='BorderStyleDotted'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M1%207h2v2H1zm4%200h2v2H5zm4%200h2v2H9zm4%200h2v2h-2z'%3e%3c/path%3e%3c/svg%3e",vy="data:image/svg+xml,%3csvg%20data-icon='BorderStyleSolid'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20d='M1%207h14v2H1z'%3e%3c/path%3e%3c/svg%3e",gy="data:image/svg+xml,%3csvg%20data-icon='BorderTop'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.4'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%205v7H4V5H2v9h12V5h-2z'%3e%3c/path%3e%3cpath%20d='M14%202v2H2V2z'%3e%3c/path%3e%3c/svg%3e",yy="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20width='16'%20height='16'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.4%2012l6.3-6.3c.4-.4.4-1%200-1.4-.4-.4-1-.4-1.4%200L12%2010.6%205.7%204.3c-.4-.4-1-.4-1.4%200-.4.4-.4%201%200%201.4l6.3%206.3-6.3%206.3c-.4.4-.4%201%200%201.4.2.2.4.3.7.3.3%200%20.5-.1.7-.3l6.3-6.3%206.3%206.3c.2.2.4.3.7.3s.5-.1.7-.3c.4-.4.4-1%200-1.4L13.4%2012z'%20%3e%3c/path%3e%3c/svg%3e",Uu="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全局/关闭%3c/title%3e%3cg%20id='全局/关闭'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%3e%3cg%20id='编组-56备份-2'%20transform='translate(2.000000,%202.000000)'%20stroke='currentColor'%20stroke-width='1.2'%3e%3cline%20x1='6'%20y1='1.65412684e-11'%20x2='6'%20y2='12'%20id='路径-4'%20transform='translate(6.000000,%206.000000)%20rotate(-225.000000)%20translate(-6.000000,%20-6.000000)%20'%3e%3c/line%3e%3cline%20x1='-4.71192529e-12'%20y1='6'%20x2='12'%20y2='6'%20id='路径-3'%20transform='translate(6.000000,%206.000000)%20rotate(-225.000000)%20translate(-6.000000,%20-6.000000)%20'%3e%3c/line%3e%3c/g%3e%3c/g%3e%3c/svg%3e",by="data:image/svg+xml,%3csvg%20data-icon='CursorAuto'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2011%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M9.716%208.113L1%201v11.533l2.71-2.69%202.364%204.732%202.023-1.048L5.79%208.912z'%3e%3c/path%3e%3c/svg%3e",wy="data:image/svg+xml,%3csvg%20data-icon='CursorNone'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M13.716%208.113L10.734%205.68%205%2011.414v1.12l2.71-2.69%202.363%204.732%202.023-1.05L9.79%208.913l3.926-.8zm-2.14-6.537L8.938%204.214%205%201v7.15l-3.424%203.425.85.85%2010-10-.85-.85z'%3e%3c/path%3e%3c/svg%3e",_y="data:image/svg+xml,%3csvg%20data-icon='CursorNoDrop'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%201C4.134%201%201%204.133%201%208s3.134%207%207%207%207-3.133%207-7-3.134-7-7-7zm5%207a4.97%204.97%200%2001-.832%202.75l-6.92-6.918A4.97%204.97%200%20018%203c2.757%200%205%202.243%205%205zM3%208c0-1.018.31-1.963.833-2.753l6.92%206.92A4.97%204.97%200%20018%2013c-2.757%200-5-2.243-5-5z'%3e%3c/path%3e%3c/svg%3e",xy="data:image/svg+xml,%3csvg%20data-icon='CursorPointer'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2014%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M11.45%205.864h-.35v2.08h-.704V5.16a.703.703%200%2000-.703-.702H8.99V7.24h-.7V4.46a.703.703%200%2000-.703-.704h-.703V7.27H6.18V2a1.054%201.054%200%2000-2.108%200v7.378l-1.867-1.6A.843.843%200%2000.967%208.904S3.72%2013.594%204.775%2015H11.1l1.135-3.973c.18-.628.27-1.278.27-1.93v-2.18c0-.58-.473-1.053-1.055-1.053zM6%2012.5a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2zm2%200a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2zm2%200a.5.5%200%2001-1%200v-2a.5.5%200%20011%200v2z'%3e%3c/path%3e%3c/svg%3e",Sy="data:image/svg+xml,%3csvg%20data-icon='DisplayBlock'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%204h12v8H2V4zm10%202H4v4h8V6z'%3e%3c/path%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%201h12v1H2V1zm0%2013h12v1H2v-1z'%3e%3c/path%3e%3c/svg%3e",ky="data:image/svg+xml,%3csvg%20data-icon='DisplayFlex'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2%202h12v12H2V2zM1%201h14v14H1V1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7%204H4v8h3V4zm2%200h3v8H9V4z'%3e%3c/path%3e%3c/svg%3e",jy="data:image/svg+xml,%3csvg%20data-icon='DisplayInlineBlock'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%204h8v8H4V4zm6%202H6v4h4V6z'%3e%3c/path%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%202h1v12H1V2zm14%200h-1v12h1V2z'%3e%3c/path%3e%3c/svg%3e",$y="data:image/svg+xml,%3csvg%20data-icon='DisplayInline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%202h1v12H1V2zm14%200h-1v12h1V2z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.25%203L3.5%2013h2l1-3h3l1%203h2L8.75%203h-1.5zm1.917%206L8%205.5%206.833%209h2.334z'%20%3e%3c/path%3e%3c/svg%3e",Vy="data:image/svg+xml,%3csvg%20data-icon='EyeInvisible'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20opacity='.6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.842%203.33A5.537%205.537%200%20008%203C4.134%203%201%207.5%201%208c0%20.23.666%201.311%201.763%202.409l2.242-2.242a3%203%200%20013.162-3.162l1.675-1.676zm-2.009%207.665a3%203%200%20003.162-3.162l2.242-2.242C14.334%206.69%2015%207.77%2015%208c0%20.5-3.134%205-7%205a5.538%205.538%200%2001-1.842-.33l1.675-1.675z'%20%3e%3c/path%3e%3cpath%20d='M2%2014L14%202'%20stroke='currentColor'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",Ey="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignbaselinerow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M864%200v480h160v64h-160v224H544v-224h-64v480H160V544H0v-64h160V256h320v224h64V0h320zM416%20320H224v160h192v-160z%20m384-256h-192v416h192V64z'%3e%3c/path%3e%3c/svg%3e",Cy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Aligncenterrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%2064v416h64V64h320v416h160v64h-160v416H544V544h-64v416H160V544H0v-64h160V64h320z'%3e%3c/path%3e%3c/svg%3e",Ay="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignflex-endrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%20800V96H160v704h320z%20m384%200V96H544v704h320z%20m160%20128v-64H0v64h1024z'%3e%3c/path%3e%3c/svg%3e",Ty="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignflex-startrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%20224v704H160V224h320z%20m384%200v704H544V224h320z%20m160-128v64H0V96h1024z'%3e%3c/path%3e%3c/svg%3e",By="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Alignstretchrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M1024%20960v64H0v-64h1024zM480%20128v768H160V128h320z%20m384%200v768H544V128h320z%20m160-128v64H0V0h1024z'%3e%3c/path%3e%3c/svg%3e",zy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directioncolumn-reverse'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M896%20704H128v320h768V704z%20m0-320H128v256h768v-256z%20m-128-192l-256-192-256%20192%20192%200.032V320h128V192h192z'%3e%3c/path%3e%3c/svg%3e",Oy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directioncolumn'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M896%20320H128V0h768v320z%20m0%20320H128v-256h768v256z%20m-128%20192l-256%20192-256-192%20192-0.032V704h128v128h192z'%3e%3c/path%3e%3c/svg%3e",Dy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directionrow-reverse'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M704%20128v768h320V128H704zM384%20128v768h256V128h-256zM192%20256l-192%20256%20192%20256%200.032-192H320v-128H192V256z'%3e%3c/path%3e%3c/svg%3e",Iy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Directionrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M320%20128v768H0V128h320z%20m320%200v768h-256V128h256z%20m192%20128l192%20256-192%20256-0.032-192H704v-128h128V256z'%3e%3c/path%3e%3c/svg%3e",My="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifycenterrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M480%201024V0h64v1024h-64z%20m128-64V64h320v896H608zM96%20960V64h320v896H96z'%3e%3c/path%3e%3c/svg%3e",Ry="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyflex-endrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M416%20160H96v704h320V160z%20m384%200H480v704h320V160z%20m128-160h-64v1024h64V0z'%3e%3c/path%3e%3c/svg%3e",Py="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyflex-startrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M608%20160h320v704H608V160zM224%20160h320v704H224V160zM96%200h64v1024H96V0z'%3e%3c/path%3e%3c/svg%3e",Ny="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyspace-aroundrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M320%20864H192v160H128v-160H0V160h128V0h64v160h128v704z%20m704%200h-128v160h-64v-160h-128V160h128V0h64v160h128v704z'%3e%3c/path%3e%3c/svg%3e",Fy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='icon-a-Justifyspace-betweenrow'%20viewBox='0%200%201024%201024'%3e%3cpath%20d='M64%201024H0V0h64v1024z%20m384-160H128V160h320v704z%20m448%200H576V160h320v704z%20m128%20160h-64V0h64v1024z'%3e%3c/path%3e%3c/svg%3e",Hy="data:image/svg+xml,%3csvg%20data-icon='FontStyleItalic'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20stroke='currentColor'%20d='M7.5%203.5h5v1h-5zm-4%208h5v1h-5z'%3e%3c/path%3e%3cpath%20d='M5.5%2012l5-8'%20stroke='currentColor'%20stroke-width='2'%3e%3c/path%3e%3c/svg%3e",Ly="data:image/svg+xml,%3csvg%20data-icon='FontStyleNone'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%203h2v2H9v6h2v2H5v-2h2V5H5V3h4z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",Uy="data:image/svg+xml,%3csvg%20data-icon='PositionAll'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='currentColor'%3e%3cpath%20d='M3%203h9v9H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",Jy="data:image/svg+xml,%3csvg%20data-icon='PositionBottomLeft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%208h4v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",qy="data:image/svg+xml,%3csvg%20data-icon='PositionBottomRight'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%208h4v4H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Wy="data:image/svg+xml,%3csvg%20data-icon='PositionBottom'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%208h9v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Ky="data:image/svg+xml,%3csvg%20data-icon='PositionLeft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h4v9H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Yy="data:image/svg+xml,%3csvg%20data-icon='PositionRight'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%203h4v9H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Gy="data:image/svg+xml,%3csvg%20data-icon='PositionTopleft'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h4v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Zy="data:image/svg+xml,%3csvg%20data-icon='PositionTopright'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M8%203h4v4H8z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Xy="data:image/svg+xml,%3csvg%20data-icon='PositionTop'%20aria-hidden='true'%20focusable='false'%20viewBox='0%200%2015%2015'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='currentColor'%20d='M3%203h9v4H3z'%3e%3c/path%3e%3cpath%20opacity='.3'%20fill='currentColor'%20d='M2%2013V2h11v11H2M14%201H1v13h13V1'%3e%3c/path%3e%3c/svg%3e",Qy="data:image/svg+xml,%3csvg%20data-icon='TextAlignCenter'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm-2%203H4v2h8V5zm-8%206h8v2H4v-2zm10-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",e3="data:image/svg+xml,%3csvg%20data-icon='TextAlignJustify'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm0%203H2v2h12V5zM2%2011h12v2H2v-2zm12-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",t3="data:image/svg+xml,%3csvg%20data-icon='TextAlignLeft'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm-4%203H2v2h8V5zm-8%206h8v2H2v-2zm12-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",n3="data:image/svg+xml,%3csvg%20data-icon='TextAlignRight'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14%202H2v2h12V2zm0%203H6v2h8V5zm-8%206h8v2H6v-2zm8-3H2v2h12V8z'%20fill='currentColor'%20%3e%3c/path%3e%3c/svg%3e",r3="data:image/svg+xml,%3csvg%20data-icon='TextDecorationOverline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20d='M1%201h14v1H1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%203H4v2h3v8h2V5h3V3z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e",i3="data:image/svg+xml,%3csvg%20data-icon='TextDecorationStrike'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%203h8v2H9v2H7V5H4V3zm3%206v4h2V9H7z'%20fill='currentColor'%20%3e%3c/path%3e%3cpath%20fill='currentColor'%20d='M1%208h14v1H1z'%3e%3c/path%3e%3c/svg%3e",o3="data:image/svg+xml,%3csvg%20data-icon='TextDecorationUnderline'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='display:%20block'%20%3e%3cpath%20fill='currentColor'%20d='M1%2014h14v1H1z'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%203H4v2h3v8h2V5h3V3z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e",a3="data:image/svg+xml,%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileX'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M1%206h4v4H1zm5%200h4v4H6zm5%200h4v4h-4z'%3e%3c/path%3e%3c/svg%3e",s3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileXY'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M1%201h4v4H1zm5%200h4v4H6zm5%200h4v4h-4zM1%206h4v4H1zm5%200h4v4H6zm5%200h4v4h-4zM1%2011h4v4H1zm5%200h4v4H6zm5%200h4v4h-4z'%3e%3c/path%3e%3c/svg%3e",l3="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20data-icon='TileY'%20aria-hidden='true'%20focusable='false'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M6%201h4v4H6zm0%205h4v4H6zm0%205h4v4H6z'%3e%3c/path%3e%3c/svg%3e",Di={...kd,...e2,...uy};function Ju(n,e){return function(){return n.apply(e,arguments)}}const{toString:u3}=Object.prototype,{getPrototypeOf:To}=Object,Pr=(n=>e=>{const t=u3.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),mt=n=>(n=n.toLowerCase(),e=>Pr(e)===n),Nr=n=>e=>typeof e===n,{isArray:wn}=Array,Hn=Nr("undefined");function c3(n){return n!==null&&!Hn(n)&&n.constructor!==null&&!Hn(n.constructor)&&et(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const qu=mt("ArrayBuffer");function d3(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&qu(n.buffer),e}const p3=Nr("string"),et=Nr("function"),Wu=Nr("number"),Fr=n=>n!==null&&typeof n=="object",h3=n=>n===!0||n===!1,gr=n=>{if(Pr(n)!=="object")return!1;const e=To(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},m3=mt("Date"),f3=mt("File"),v3=mt("Blob"),g3=mt("FileList"),y3=n=>Fr(n)&&et(n.pipe),b3=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||et(n.append)&&((e=Pr(n))==="formdata"||e==="object"&&et(n.toString)&&n.toString()==="[object FormData]"))},w3=mt("URLSearchParams"),_3=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wn(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),wn(n))for(r=0,i=n.length;r<i;r++)e.call(null,n[r],r,n);else{const o=t?Object.getOwnPropertyNames(n):Object.keys(n),a=o.length;let s;for(r=0;r<a;r++)s=o[r],e.call(null,n[s],s,n)}}function Ku(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const Yu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gu=n=>!Hn(n)&&n!==Yu;function Ii(){const{caseless:n}=Gu(this)&&this||{},e={},t=(r,i)=>{const o=n&&Ku(e,i)||i;gr(e[o])&&gr(r)?e[o]=Ii(e[o],r):gr(r)?e[o]=Ii({},r):wn(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Wn(arguments[r],t);return e}const x3=(n,e,t,{allOwnKeys:r}={})=>(Wn(e,(i,o)=>{t&&et(i)?n[o]=Ju(i,t):n[o]=i},{allOwnKeys:r}),n),S3=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),k3=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},j3=(n,e,t,r)=>{let i,o,a;const s={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),o=i.length;o-- >0;)a=i[o],(!r||r(a,n,e))&&!s[a]&&(e[a]=n[a],s[a]=!0);n=t!==!1&&To(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},$3=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},V3=n=>{if(!n)return null;if(wn(n))return n;let e=n.length;if(!Wu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},E3=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&To(Uint8Array)),C3=(n,e)=>{const t=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=t.next())&&!r.done;){const i=r.value;e.call(n,i[0],i[1])}},A3=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},T3=mt("HTMLFormElement"),B3=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Qa=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),z3=mt("RegExp"),Zu=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Wn(t,(i,o)=>{let a;(a=e(i,o,n))!==!1&&(r[o]=a||i)}),Object.defineProperties(n,r)},O3=n=>{Zu(n,(e,t)=>{if(et(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(et(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},D3=(n,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return wn(n)?r(n):r(String(n).split(e)),t},I3=()=>{},M3=(n,e)=>(n=+n,Number.isFinite(n)?n:e),ai="abcdefghijklmnopqrstuvwxyz",es="0123456789",Xu={DIGIT:es,ALPHA:ai,ALPHA_DIGIT:ai+ai.toUpperCase()+es},R3=(n=16,e=Xu.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function P3(n){return!!(n&&et(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const N3=n=>{const e=new Array(10),t=(r,i)=>{if(Fr(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=wn(r)?[]:{};return Wn(r,(a,s)=>{const u=t(a,i+1);!Hn(u)&&(o[s]=u)}),e[i]=void 0,o}}return r};return t(n,0)},F3=mt("AsyncFunction"),H3=n=>n&&(Fr(n)||et(n))&&et(n.then)&&et(n.catch),P={isArray:wn,isArrayBuffer:qu,isBuffer:c3,isFormData:b3,isArrayBufferView:d3,isString:p3,isNumber:Wu,isBoolean:h3,isObject:Fr,isPlainObject:gr,isUndefined:Hn,isDate:m3,isFile:f3,isBlob:v3,isRegExp:z3,isFunction:et,isStream:y3,isURLSearchParams:w3,isTypedArray:E3,isFileList:g3,forEach:Wn,merge:Ii,extend:x3,trim:_3,stripBOM:S3,inherits:k3,toFlatObject:j3,kindOf:Pr,kindOfTest:mt,endsWith:$3,toArray:V3,forEachEntry:C3,matchAll:A3,isHTMLForm:T3,hasOwnProperty:Qa,hasOwnProp:Qa,reduceDescriptors:Zu,freezeMethods:O3,toObjectSet:D3,toCamelCase:B3,noop:I3,toFiniteNumber:M3,findKey:Ku,global:Yu,isContextDefined:Gu,ALPHABET:Xu,generateString:R3,isSpecCompliantForm:P3,toJSONObject:N3,isAsyncFn:F3,isThenable:H3};function fe(n,e,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}P.inherits(fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Qu=fe.prototype,ec={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{ec[n]={value:n}});Object.defineProperties(fe,ec);Object.defineProperty(Qu,"isAxiosError",{value:!0});fe.from=(n,e,t,r,i,o)=>{const a=Object.create(Qu);return P.toFlatObject(n,a,function(s){return s!==Error.prototype},s=>s!=="isAxiosError"),fe.call(a,n.message,e,t,r,i),a.cause=n,a.name=n.name,o&&Object.assign(a,o),a};const L3=null;function Mi(n){return P.isPlainObject(n)||P.isArray(n)}function tc(n){return P.endsWith(n,"[]")?n.slice(0,-2):n}function ts(n,e,t){return n?n.concat(e).map(function(r,i){return r=tc(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function U3(n){return P.isArray(n)&&!n.some(Mi)}const J3=P.toFlatObject(P,{},null,function(n){return/^is[A-Z]/.test(n)});function Hr(n,e,t){if(!P.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=P.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,f){return!P.isUndefined(f[h])});const r=t.metaTokens,i=t.visitor||l,o=t.dots,a=t.indexes,s=(t.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(e);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(P.isDate(h))return h.toISOString();if(!s&&P.isBlob(h))throw new fe("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(h)||P.isTypedArray(h)?s&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function l(h,f,v){let g=h;if(h&&!v&&typeof h=="object"){if(P.endsWith(f,"{}"))f=r?f:f.slice(0,-2),h=JSON.stringify(h);else if(P.isArray(h)&&U3(h)||(P.isFileList(h)||P.endsWith(f,"[]"))&&(g=P.toArray(h)))return f=tc(f),g.forEach(function(k,b){!(P.isUndefined(k)||k===null)&&e.append(a===!0?ts([f],b,o):a===null?f:f+"[]",u(k))}),!1}return Mi(h)?!0:(e.append(ts(v,f,o),u(h)),!1)}const c=[],p=Object.assign(J3,{defaultVisitor:l,convertValue:u,isVisitable:Mi});function m(h,f){if(!P.isUndefined(h)){if(c.indexOf(h)!==-1)throw Error("Circular reference detected in "+f.join("."));c.push(h),P.forEach(h,function(v,g){(!(P.isUndefined(v)||v===null)&&i.call(e,v,P.isString(g)?g.trim():g,f,p))===!0&&m(v,f?f.concat(g):[g])}),c.pop()}}if(!P.isObject(n))throw new TypeError("data must be an object");return m(n),e}function ns(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Bo(n,e){this._pairs=[],n&&Hr(n,this,e)}const nc=Bo.prototype;nc.append=function(n,e){this._pairs.push([n,e])};nc.toString=function(n){const e=n?function(t){return n.call(this,t,ns)}:ns;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function q3(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rc(n,e,t){if(!e)return n;const r=t&&t.encode||q3,i=t&&t.serialize;let o;if(i?o=i(e,t):o=P.isURLSearchParams(e)?e.toString():new Bo(e,t).toString(r),o){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}class rs{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){P.forEach(this.handlers,function(t){t!==null&&e(t)})}}const ic={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},W3=typeof URLSearchParams<"u"?URLSearchParams:Bo,K3=typeof FormData<"u"?FormData:null,Y3=typeof Blob<"u"?Blob:null,G3={isBrowser:!0,classes:{URLSearchParams:W3,FormData:K3,Blob:Y3},protocols:["http","https","file","blob","url","data"]},oc=typeof window<"u"&&typeof document<"u",Z3=(n=>oc&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),X3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Q3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oc,hasStandardBrowserEnv:Z3,hasStandardBrowserWebWorkerEnv:X3},Symbol.toStringTag,{value:"Module"})),dt={...Q3,...G3};function eb(n,e){return Hr(n,new dt.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return dt.isNode&&P.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function tb(n){return P.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function nb(n){const e={},t=Object.keys(n);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],e[o]=n[o];return e}function ac(n){function e(t,r,i,o){let a=t[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=o>=t.length;return a=!a&&P.isArray(i)?i.length:a,u?(P.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!P.isObject(i[a]))&&(i[a]=[]),e(t,r,i[a],o)&&P.isArray(i[a])&&(i[a]=nb(i[a])),!s)}if(P.isFormData(n)&&P.isFunction(n.entries)){const t={};return P.forEachEntry(n,(r,i)=>{e(tb(r),i,t,0)}),t}return null}function rb(n,e,t){if(P.isString(n))try{return(e||JSON.parse)(n),P.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const zo={transitional:ic,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=P.isObject(n);if(i&&P.isHTMLForm(n)&&(n=new FormData(n)),P.isFormData(n))return r?JSON.stringify(ac(n)):n;if(P.isArrayBuffer(n)||P.isBuffer(n)||P.isStream(n)||P.isFile(n)||P.isBlob(n))return n;if(P.isArrayBufferView(n))return n.buffer;if(P.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return eb(n,this.formSerializer).toString();if((o=P.isFileList(n))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Hr(o?{"files[]":n}:n,a&&new a,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),rb(n)):n}],transformResponse:[function(n){const e=this.transitional||zo.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&P.isString(n)&&(t&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(o){if(i)throw o.name==="SyntaxError"?fe.from(o,fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],n=>{zo.headers[n]={}});const Oo=zo,ib=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ob=n=>{const e={};let t,r,i;return n&&n.split(`
|
|
68
68
|
`).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!t||e[t]&&ib[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},is=Symbol("internals");function $n(n){return n&&String(n).trim().toLowerCase()}function yr(n){return n===!1||n==null?n:P.isArray(n)?n.map(yr):String(n)}function ab(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const sb=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function si(n,e,t,r,i){if(P.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!P.isString(e)){if(P.isString(r))return e.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(e)}}function lb(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function ub(n,e){const t=P.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}let Lr=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(s,u,l){const c=$n(u);if(!c)throw new Error("header name must be a non-empty string");const p=P.findKey(i,c);(!p||i[p]===void 0||l===!0||l===void 0&&i[p]!==!1)&&(i[p||u]=yr(s))}const a=(s,u)=>P.forEach(s,(l,c)=>o(l,c,u));return P.isPlainObject(e)||e instanceof this.constructor?a(e,t):P.isString(e)&&(e=e.trim())&&!sb(e)?a(ob(e),t):e!=null&&o(t,e,r),this}get(e,t){if(e=$n(e),e){const r=P.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return ab(i);if(P.isFunction(t))return t.call(this,i,r);if(P.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$n(e),e){const r=P.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||si(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(a){if(a=$n(a),a){const s=P.findKey(r,a);s&&(!t||si(r,r[s],s,t))&&(delete r[s],i=!0)}}return P.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!e||si(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return P.forEach(this,(i,o)=>{const a=P.findKey(r,o);if(a){t[a]=yr(i),delete t[o];return}const s=e?lb(o):String(o).trim();s!==o&&delete t[o],t[s]=yr(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return P.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&P.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
@@ -73,24 +73,24 @@ version: 2.9.0
|
|
|
73
73
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
74
74
|
* @name @vtj/ui
|
|
75
75
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
76
|
-
* @version 0.7.
|
|
76
|
+
* @version 0.7.22
|
|
77
77
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
78
78
|
*/const Wb={default:14,small:12,large:18},Kb={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 Ln(n){return typeof n=="string"?n:`${n}px`}function sr(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 Yb=["src"],rt=O({name:"XIcon",__name:"Icon",props:Kb,setup(n){const e=n,t=Yi(),r=Un(),i=T(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?zt(e.icon):u?.component(e.icon)||e.icon}),o=T(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),a=T(()=>({"background-color":e.background,"border-radius":e.radius?Ln(e.radius):void 0,padding:e.padding?Ln(e.padding):void 0})),s=T(()=>typeof e.size=="number"?e.size:Wb[e.size]??void 0);return(u,l)=>(y(),j(d(ed),{class:ue(["x-icon",o.value]),color:e.color,size:s.value,style:Tt(a.value)},{default:S(()=>[le(u.$slots,"default",{},()=>[i.value?(y(),j(Ke(i.value),{key:0})):M("",!0),e.src?(y(),R("img",{key:1,src:e.src},null,8,Yb)):M("",!0)])]),_:3},8,["class","color","size","style"]))}}),yc={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 Gb(n){return T(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function Zb(n){return T(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function Xb(n){return T(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function Qb(n){const e=Un();return T(()=>{const t=d(n);if(t)if(typeof t=="string"||t.setup||t.render||Kc(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function Mo(n){const e=Qb(n);return e.value?zt(O({render:()=>Oe(rt,e.value)})):void 0}function Ro(n,e){return T(()=>{const t=d(n);return typeof t=="function"?t(e):!!t})}const e6={key:0},t6=O({__name:"Trigger",props:yc,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=Mo(_r(t,"icon")),o=Ro(_r(t,"disabled")),a=T(()=>({[`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})),s=u=>{if(u.preventDefault(),!o.value)return r("click"),!1};return(u,l)=>t.mode==="button"?(y(),j(d(Ce),ve({key:0,icon:d(i),type:t.type,size:t.size,disabled:d(o)},t.button,{onClick:s}),{default:S(()=>[de(ee(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(y(),R("div",{key:1,class:ue(["x-action__inner",a.value]),onClick:s},[(y(),j(Ke(d(i)))),u.label?(y(),R("span",e6,ee(u.label),1)):M("",!0)],2))}}),De=O({name:"XAction",__name:"Action",props:yc,emits:["click","command"],setup(n,{emit:e}){const t=n,r=qc(),i=e,o=Gb(t),a=Zb(t),s=Xb(t),u=Ro(_r(t,"disabled")),l=T(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",on(t))},p=g=>{if(u.value)return;const k=t.menus?.find(b=>b.command===g);k&&i("command",on(k))},m=g=>Oe(td,a.value,()=>[].concat(g)),h=g=>Oe(eo,{...s.value,disabled:u.value,onCommand:p},{default:()=>[g],dropdown:()=>[Oe(Qi,()=>(t.menus||[]).map((k,b)=>Oe(xr,k,()=>r.item?r.item({item:k,index:b}):k.label)))]}),f=g=>Oe(Cr,{...o.value,disabled:u.value},()=>[g]),v=T(()=>{let g=Oe(zt(t6),{...t,onClick:c});const k=r.default?.();return k&&k.length&&(g=k[0]),a.value&&(g=m(g)),s.value&&(g=h(g)),o.value&&(g=f(g)),g});return(g,k)=>(y(),R("div",{class:ue(["x-action",l.value])},[(y(),j(Ke(v.value)))],2))}}),n6={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}},r6=O({name:"XActionBar",__name:"ActionBar",props:n6,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=T(()=>(t.items||[]).map(s=>s==="|"?s:{...s,badge:s.badge?{...t.badge,...typeof s.badge=="object"?s.badge||{}:{value:s.badge}}:void 0,tooltip:s.tooltip?{...t.tooltip,...typeof s.tooltip=="object"?s.tooltip||{}:{content:s.tooltip}}:void 0})),o=s=>{r("click",s)},a=(s,u)=>{r("command",s,u)};return(s,u)=>(y(),j(d(ae),{class:"x-action-bar",align:"center"},{default:S(()=>[(y(!0),R(ne,null,oe(i.value,l=>(y(),R(ne,null,[l==="|"?(y(),j(d(Ar),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(y(),j(d(De),ve({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:d(Ro)(t.disabled,l).value},l,{onClick:o,onCommand:c=>a(l,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),i6={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}},ae=O({name:"XContainer",__name:"Container",props:i6,setup(n){const e=n,t=Yi(),r=Un(),i=T(()=>{const s=r?.parent;if(!s)return!1;const u=s.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=T(()=>({"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})),a=T(()=>{const{width:s,height:u,fit:l}=e;return l?null:{width:s?Ln(s):void 0,height:u?Ln(u):void 0}});return(s,u)=>(y(),j(Ke(e.tag),{class:ue(["x-container",o.value]),style:Tt(a.value)},{default:S(()=>[le(s.$slots,"default")]),_:3},8,["class","style"]))}}),o6={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},a6={class:"x-header__content"},s6={key:0,class:"x-header__actions"},l6=O({name:"XHeader",inheritAttrs:!1,__name:"Header",props:o6,setup(n){const e=n,t=Mo(_r(e,"icon")),r=Yi(),i=T(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,a)=>(y(),j(d(ae),{class:ue(["x-header",i.value]),justify:"space-between",align:"center"},{default:S(()=>[w(d(ae),{align:"center",class:ue(["x-header__wrapper",i.value]),grow:"",onClick:d(r).onClick},{default:S(()=>[d(t)?(y(),j(Ke(d(t)),{key:0,class:"x-header__icon",onClick:d(r).onClickIcon||d(r).onClick},null,8,["onClick"])):M("",!0),I("span",a6,[le(o.$slots,"default",{},()=>[de(ee(e.content),1)])]),e.more?(y(),j(d(rt),{key:1,class:"x-header__more",icon:d(Ts)},null,8,["icon"])):M("",!0),e.subtitle||o.$slots.subtitle?(y(),R("span",{key:2,class:"x-header__subtitle",onClick:a[0]||(a[0]=(...s)=>d(r).onClick&&d(r).onClick(...s))},[le(o.$slots,"subtitle",{},()=>[de(ee(e.subtitle),1)])])):M("",!0)]),_:3},8,["class","onClick"]),o.$slots.actions?(y(),R("div",s6,[le(o.$slots,"actions")])):M("",!0)]),_:3},8,["class"]))}}),u6={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}},Ur=O({name:"XPanel",__name:"Panel",props:u6,setup(n,{expose:e}){const t=n,r=B(),i=T(()=>({"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=T(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),a=T(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(s,u)=>(y(),j(d(ae),{class:ue(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:S(()=>[o.value?(y(),j(d(ae),{key:0,flex:!1,class:"x-panel__header"},{default:S(()=>[le(s.$slots,"header",{},()=>[w(d(l6),wt(Ot(o.value)),{default:S(()=>[le(s.$slots,"title")]),actions:S(()=>[le(s.$slots,"actions")]),_:3},16)])]),_:3})):M("",!0),w(d(ae),ve({ref_key:"bodyRef",ref:r,flex:!1,overflow:a.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:S(()=>[le(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(y(),j(d(ae),ve({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:S(()=>[le(s.$slots,"footer")]),_:3},16)):M("",!0)]),_:3},8,["class","fit","width","height"]))}}),ms="user-select-none";let fs=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=ks(),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):d(e)||document.body}init(){const{el:e,options:t}=this,{disabled:r,delay:i=150,onStart:o,onEnd:a}=t;if(r)return;let s=null;const u=this.getHandle(),l=this.getTarget();let c=e.getBoundingClientRect(),p=null;const{x:m,y:h}=zd(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(f,v)=>{document.body.classList.add(ms),clearTimeout(s),s=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),p=l?.getBoundingClientRect(),o&&o(f,v)},i)},onEnd:(f,v)=>{if(clearTimeout(s),document.body.classList.remove(ms),this.dragging&&p){this.dragging=!1;const{x:g,y:k}=f,b=this.getPosition(p,c,g,k);a&&a(b,v),p=null}}});ce([m,h],()=>{if(this.dragging&&p){const f=this.getPosition(p,c,m.value,h.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,t,r,i){const{edge:o=50}=this.options,a=-t.width+o,s=e.width-o,u=0,l=e.height-o,c=Math.min(s,Math.max(r,a)),p=Math.min(l,Math.max(i,u));return{x:c,y:p}}destory(){this.scope.stop()}};const c6={mounted(n,e){const t=e.value||{},r=new fs(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!_o(r.options,t)&&(r.destory(),n.__draggable__=new fs(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},ci="user-select-none";let vs=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=ks(),this.scope.run(()=>{this.init()})}scope;resizing=B(!1);direction=B("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=Bd(e),this.cleanMousedown=Ko(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=Ko(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}),ce(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(ci):l.classList.remove(ci)});const{x:a,y:s}=this.MIE;ce([a,s],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:t,resizing:r,options:i,el:o}=this,a=t?.value||"";if(!e||!r.value||!a)return;const{x:s,y:u,elementX:l,elementY:c,elementHeight:p,elementWidth:m}=e,{onResizing:h}=i,{minWidth:f=0,minHeight:v=0,maxWidth:g=99999,maxHeight:k=99999}=i;if(a.includes("e")){const b=Math.min(Math.max(l.value,f),g);o.style.width=`${b}px`}if(a.includes("s")){const b=Math.min(Math.max(c.value,v),k);o.style.height=`${b}px`}if(a.includes("w")){const b=Math.min(Math.max(m.value-l.value,f),g);o.style.width=`${b}px`,o.style.left=`${s.value}px`}if(a.includes("n")){const b=Math.min(Math.max(p.value-c.value,v),k);this.el.style.height=`${b}px`,this.el.style.top=`${u.value}px`}h&&h(a,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:a=["n","s","w","e"],edge:s=5}=this.options;let u="";return a.includes("n")&&t.value<=s?u+="n":a.includes("s")&&t.value>r.value-s&&(u+="s"),a.includes("w")&&e.value<=s?u+="w":a.includes("e")&&e.value>i.value-s&&(u+="e"),u}destory(){const e=document.body;e.style.cursor="",e.classList.remove(ci),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}};const Ji={mounted(n,e){const t=e.value||{},r=new vs(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!_o(r.options,t)&&(r.destory(),n.__resizable__=new vs(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},d6={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 un=1e3;function p6(n,e){const{width:t,height:r}=dn(e),i=qt({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++un,dragging:!1,resizing:!1});return ce([t,r],([o,a])=>{i.wrapperWidth=o,i.wrapperHeight=a,i.width=sr(n.width,o),i.height=sr(n.height,a),i.left=n.left?sr(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?sr(n.top,a):Math.max(Math.floor((a-i.height)/2),0)}),ce(i,o=>{un=Math.max(o.zIndex,un)}),{state:i,normal:T(()=>i.mode==="normal"),maximized:T(()=>i.mode==="maximized"),minimized:T(()=>i.mode==="minimized")}}function h6(n,e){const t=T(()=>{const{width:a,height:s,top:u,left:l,zIndex:c}=e;return{width:`${a}px`,height:`${s}px`,top:`${u}px`,left:`${l}px`,zIndex:c}}),r=T(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=T(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=T(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function m6(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 a=o.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(a.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++un))},submit:()=>t("submit"),cancel:()=>{t("cancel"),i()}}}function f6(n,e,t,r){return T(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...ze(n.draggable)?n.draggable:{},disabled:i,target:r,selector:".x-panel__header",onStart(o){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++un),t("dragStart",o)},onMove(o){t("dragging",o)},onEnd(o){if(e.mode==="maximized")return;const{x:a,y:s}=o;e.left=a,e.top=s,e.dragging=!1,t("dragEnd",o)}}})}function v6(n,e,t){return T(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...ze(n.resizable)?n.resizable:{},disabled:r,dirs:["e","s","w"],onStart(i,o){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++un),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 g6(n,e){const t=n.componentInstance;if(!t)return;let r=null;return Gi(()=>{const i=d(e),o=d(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),Zi(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const y6=["src"],Zt=O({name:"XDialog",__name:"Dialog",props:d6,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=Un(),a=B(),s=B(),{state:u,maximized:l,minimized:c,normal:p}=p6(r,a),{styles:m,classes:h,wrapperClass:f,modalStyle:v}=h6(r,u),{changeMode:g,active:k,close:b,show:_,hide:V,submit:$,cancel:x}=m6(r,u,i),E=f6(r,u,i,a),D=v6(r,u,i),Z=g6(r,s);js(async()=>{r.modelValue&&(await bt(),o&&i("open",o))});const C=T(()=>s.value?.$el);return e({$vtjEl:C,panelRef:s,state:u,maximized:l,minimized:c,changeMode:g,show:_,hide:V,submit:$,cancel:x,componentInstance:Z}),(A,F)=>r.modelValue?(y(),j(Wc,{key:0,to:"body"},[I("div",{ref_key:"wrapper",ref:a,class:ue(["x-dialog__wrapper",d(f)])},[r.modal?(y(),R("div",{key:0,class:"x-dialog__modal",style:Tt(d(v))},null,4)):M("",!0),Bt((y(),j(d(Ur),ve({ref_key:"panelRef",ref:s,class:["x-dialog",d(h)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:d(m),size:r.size,body:{padding:r.bodyPadding},onClick:d(k)},A.$attrs),Jt({title:S(()=>[de(ee(r.title),1)]),actions:S(()=>[le(A.$slots,"actions"),r.minimizable?(y(),j(d(De),{key:0,icon:d(mu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[0]||(F[0]=z=>d(g)("minimized"))},null,8,["icon","size"])):M("",!0),r.maximizable?(y(),R(ne,{key:1},[d(p)?(y(),j(d(De),{key:1,icon:d(hu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[2]||(F[2]=z=>d(g)("maximized"))},null,8,["icon","size"])):(y(),j(d(De),{key:0,icon:d(fu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:F[1]||(F[1]=z=>d(g)("normal"))},null,8,["icon","size"]))],64)):M("",!0),r.closable?(y(),j(d(De),{key:2,icon:d(vu),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:d(b)},null,8,["icon","size","onClick"])):M("",!0)]),default:S(()=>[le(A.$slots,"default",{},()=>[r.content?(y(),j(Ke(r.content),{key:0})):M("",!0),r.src?(y(),R("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,y6)):M("",!0)])]),_:2},[r.cancel||r.submit||A.$slots.footer||A.$slots.extra||A.$slots.handle?{name:"footer",fn:S(()=>[le(A.$slots,"footer",{},()=>[w(d(ae),{align:"center"},{default:S(()=>[le(A.$slots,"extra")]),_:3}),w(d(ae),{align:"center"},{default:S(()=>[le(A.$slots,"handle"),r.cancel?(y(),j(d(Ce),{key:0,type:"default",size:r.size,onClick:d(x)},{default:S(()=>[de(ee(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):M("",!0),r.submit?(y(),j(d(Ce),{key:1,type:"primary",size:r.size,onClick:d($)},{default:S(()=>[de(ee(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):M("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[d(c6),d(E)],[d(Ji),d(D)]])],2)])):M("",!0)}});function bc(n,e){const t=document.createElement("div"),r=w(Zt,n);r.appContext=e??bc._context,Uo(r,t);const i=()=>{Uo(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const b6=O({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(y(),j(d(no),wt(Ot(t.$attrs)),{default:S(()=>[(y(!0),R(ne,null,oe(e.options,(i,o)=>(y(),j(d(ro),ve({key:`item_${o}_${i.value}`},i),Jt({_:2},[t.$slots.option?{name:"default",fn:S(()=>[le(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),w6=O({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=T(()=>zt(e.button?od:ad));return(r,i)=>(y(),j(d(sd),wt(Ot(r.$attrs)),{default:S(()=>[(y(!0),R(ne,null,oe(e.options,(o,a)=>(y(),j(Ke(t.value),{key:`item_${a}_${o.value}`,label:o.label,value:o.value},{default:S(()=>[de(ee(o.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},16))}}),_6=O({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=T(()=>zt(e.button?Bn:ld));return(r,i)=>(y(),j(d(io),wt(Ot(r.$attrs)),{default:S(()=>[(y(!0),R(ne,null,oe(e.options,(o,a)=>(y(),j(Ke(t.value),{key:`item_${a}_${o.value}`,label:o.label,value:o.value},{default:S(()=>[de(ee(o.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},16))}}),wc={none:{component:"div",props:{class:"x-field-none"}},text:{component:tt,props:{clearable:!0},defaultValue:""},textarea:{component:tt,props:{type:"textarea",rows:2},defaultValue:""},select:{component:b6,props:{clearable:!0}},checkbox:{component:w6,props:{},defaultValue:[]},radio:{component:_6,props:{}},number:{component:Es,props:{}},date:{component:Jo,props:{}},time:{component:nd,props:{}},datetime:{component:Jo,props:{type:"datetime"}},switch:{component:to,props:{}},rate:{component:rd,props:{}},slider:{component:Cs,props:{}},cascader:{component:id,props:{}}},x6={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 wc[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 S6(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function k6(n,e,t,r,i){const o=B([]),a=T(()=>!r||!i?{}:xo(n.cascader).reduce((s,u)=>(s[u]=cr(i,u),s),{}));return ce(a,async s=>{if(t.value){o.value=await S6(n,s);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:T(()=>{const{editor:s="text",placeholder:u,label:l="...",disabled:c,readonly:p}=n,m={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:p,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:f=>e("change",f)},h=typeof s=="string"?wc[s]:{component:s,props:{}};return ct({},h,{props:m})})}}const j6={key:1,class:"el-form-item__error"},$6={key:0,class:"x-field__tip"},te=O({name:"XField",__name:"Field",props:x6,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=An(_c,null),a=An(Zc,null),s=An(xc,null),u=T(()=>!o?.proxy||!s?r.visible:typeof r.visible=="function"?r.visible(s):ze(r.visible)?Object.entries(r.visible).every(([$,x])=>cr(s,$)===x):r.visible),l=()=>o?.proxy&&s&&r.name?cr(s,r.name)??r.modelValue:r.modelValue,c=B(l()),{editor:p}=k6(r,i,u,o,s),m=B(),h=B(),f=T(()=>r.size||a?.size||"default"),v=T(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),g=($="")=>r.error?r.error:$.includes("is required")?`${r.label||r.name}是必填项!`:$,k=T(()=>{const $=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!$&&!!r.tooltipPosition}}),b=T(()=>{const $=o?.proxy;return{width:r.width?Ln(r.width):$&&$.inline&&$.inlineColumns?`${100/$.inlineColumns}%`:null}}),_=T(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),V=T(()=>({...p.value.props,modelValue:c.value,"onUpdate:modelValue":$=>{c.value=$}}));return ce(c,($,x)=>{u.value&&!_o($,x)&&(i("update:modelValue",$),o?.proxy&&s&&r.name&&Zr(s,r.name,$))}),ce(()=>!o?.proxy||!r.name||!s?r.modelValue:cr(s,r.name)??r.modelValue,$=>{u.value&&(c.value=$)},{immediate:!0}),ce(u,$=>{o?.proxy&&s&&r.name&&($?(c.value=l(),Zr(s,r.name,c.value)):(c.value=void 0,Zr(s,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:m,editorRef:h,focus:()=>{h.value?.focus&&h.value.focus()},blur:()=>{h.value?.foucs&&h.value.blur()}}),($,x)=>u.value?(y(),j(d(Xi),ve({key:0,class:["x-field",k.value],ref_key:"itemRef",ref:m,prop:r.name,label:$.label,size:f.value,style:b.value},$.$attrs),Jt({error:S(({error:E})=>[le($.$slots,"error",{error:E},()=>[d(o)?.props.tooltipMessage??r.tooltipMessage?(y(),R("div",{key:0,class:"x-field__info",style:Tt(_.value)},[w(d(Cr),ve({content:g(E)},v.value),{default:S(()=>[w(d(rt),{class:"x-field__trigger",icon:d(jd),size:f.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(y(),R("div",j6,ee(g(E)),1))])]),default:S(()=>[I("div",{class:ue(["x-field__editor_wrap",{"is-inline":r.inline}])},[le($.$slots,"editor",{editor:V.value},()=>[d(p).component?(y(),j(Ke(d(p).component),ve({key:0,class:"x-field__editor",ref_key:"editorRef",ref:h,modelValue:c.value,"onUpdate:modelValue":x[0]||(x[0]=E=>c.value=E)},d(p).props),Jt({_:2},[$.$slots.option?{name:"option",fn:S(({option:E})=>[le($.$slots,"option",{option:E})]),key:"0"}:void 0]),1040,["modelValue"])):M("",!0)]),r.tip||$.$slots.tip?(y(),R("div",$6,[le($.$slots,"tip",{},()=>[de(ee(r.tip),1)])])):M("",!0)],2),le($.$slots,"default")]),_:2},[$.$slots.label?{name:"label",fn:S(()=>[le($.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):M("",!0)}}),V6={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}},_c=Symbol("formInstanceKey"),xc=Symbol("formModelKey"),Sc=O({name:"XForm",__name:"Form",props:V6,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Un(),a=B(),s=qt(r.model||{}),u=B(!1);Lo(_c,o),Lo(xc,s),ce(s,()=>{i("change",on(s))}),ce(()=>r.model,p=>{Object.assign(s,p)},{deep:!0});const l=async()=>{await a.value.validate().catch(()=>!1)&&(i("submit",on(s)),r.submitMethod&&(u.value=!0,await r.submitMethod(on(s)),u.value=!1))},c=p=>{a.value.resetFields(p),i("reset")};return e({formRef:a,model:s,submit:l,reset:c}),(p,m)=>(y(),j(d(We),ve({ref_key:"formRef",ref:a,class:"x-form",inline:r.inline,model:s,onKeyup:Tn(l,["enter"]),onSubmit:m[1]||(m[1]=an(()=>{},["stop","prevent"]))},p.$attrs),{default:S(()=>[le(p.$slots,"default"),r.footer?(y(),j(d(te),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:S(()=>[le(p.$slots,"footer",{},()=>[r.submitText?(y(),j(d(Ce),{key:0,loading:u.value,type:"primary",onClick:l},{default:S(()=>[de(ee(r.submitText),1)]),_:1},8,["loading"])):M("",!0),r.resetText?(y(),j(d(Ce),{key:1,type:"default",onClick:m[0]||(m[0]=()=>c())},{default:S(()=>[de(ee(r.resetText),1)]),_:1})):M("",!0),le(p.$slots,"action")])]),_:3})):M("",!0)]),_:3},16,["inline","model"]))}}),E6={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}},ft=O({name:"XDialogForm",__name:"DialogForm",props:E6,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=B(),a=B(),s=T(()=>a.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async h=>{i("submit",h),r.submitMethod?await r.submitMethod(h)&&l():l()},p=T(()=>r.formProps?.disabled?!1:r.submit),m=T(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:s,formRef:o,dialogRef:a}),(h,f)=>(y(),j(d(Zt),ve({ref_key:"dialogRef",ref:a,class:"x-dialog-form","model-value":r.modelValue,submit:p.value,cancel:m.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},h.$attrs),Jt({default:S(()=>[w(d(Sc),ve({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:S(()=>[le(h.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[h.$slots.extra?{name:"extra",fn:S(()=>[le(h.$slots,"extra")]),key:"0"}:void 0,h.$slots.handle?{name:"handle",fn:S(()=>[le(h.$slots,"handle")]),key:"1"}:void 0,h.$slots.footer?{name:"footer",fn:S(()=>[le(h.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),C6={items:{type:Array,default(){return[]}},border:{type:Boolean}},A6={class:"x-tabs__label-inner"},T6={key:0,class:"x-tabs__actions"},kc=O({name:"XTabs",__name:"Tabs",props:C6,emits:["actionClick","actionCommand"],setup(n,{emit:e}){const t=n,r=e,i=u=>{const{label:l,name:c,value:p,disabled:m,closable:h,lazy:f}=u;return{label:l,name:p??c,disabled:m,closable:h,lazy:f}},o=T(()=>({"is-no-border":!t.border})),a=u=>{r("actionClick",u)},s=u=>{r("actionCommand",u)};return(u,l)=>(y(),j(d(Qc),ve({class:["x-tabs",o.value]},u.$attrs),{default:S(()=>[(y(!0),R(ne,null,oe(t.items,c=>(y(),j(d(Xc),ve({key:c.value??c.name},i(c)),{label:S(()=>[le(u.$slots,"label",wt(Ot(c)),()=>[c.icon?(y(),j(Ke(d(Mo)(c.icon)),{key:0,class:"x-tabs__icon"})):M("",!0),I("div",A6,[de(ee(c.label)+" ",1),c.actions&&[c.name,c.value].includes(u.$attrs.modelValue)?(y(),R("div",T6,[(y(!0),R(ne,null,oe(c.actions,p=>(y(),j(d(De),ve({mode:"icon",type:"primary",size:"small",circle:""},p,{onClick:a,onCommand:s}),null,16))),256))])):M("",!0)])])]),default:S(()=>[le(u.$slots,"default",wt(Ot(c)),()=>[c.component?(y(),j(Ke(c.component),wt(ve({key:0},c.props)),null,16)):M("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}}),B6={units:{type:[String,Object,Array]},unit:{type:String},appendWidth:{type:Number,default:100},withUnit:{type:Boolean,default:!0},format:{type:String},modelValue:{type:[String,Number]},selectProps:{type:Object}},jc=O({name:"XInputUnit",__name:"InputUnit",props:B6,emits:["update:modelValue","update:unit","change","unit-change"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=T(()=>xo(r.units).map(f=>typeof f=="string"?{label:f,value:f}:f)),a=T(()=>{const f=o.value.map(v=>v.value);return r.unit&&f.push(r.unit),ru(f)}),s=B(),u=B(),l=f=>r.format&&f?Cg(Number(f)||0,r.format):f,c=f=>{if(!r.withUnit||typeof f!="string")return{value:l(f),unit:r.unit};for(const v of a.value){const g=new RegExp(`${v}$`);if(g.test(f))return{value:l(f.toString().replace(g,"")),unit:v}}return{value:l(f),unit:r.unit}},p=()=>{const f=l(u.value),v=s.value;return r.withUnit&&f&&v?`${f}${v}`:f};ce(()=>r.modelValue,f=>{const{value:v,unit:g}=c(f);s.value=g,u.value=v},{immediate:!0}),ce(u,f=>{i("change",f)});const m=async()=>{const{value:f,unit:v}=c(p());u.value=f,s.value=v,i("update:modelValue",p())},h=()=>{i("unit-change",s.value),m()};return e({parser:c,formatValue:l}),(f,v)=>(y(),j(d(tt),{modelValue:u.value,"onUpdate:modelValue":v[1]||(v[1]=g=>u.value=g),modelModifiers:{trim:!0},class:"x-input-unit",onChange:m},Jt({_:2},[o.value.length?{name:"append",fn:S(()=>[w(d(no),ve({class:"x-input-unit__unit",modelValue:s.value,"onUpdate:modelValue":v[0]||(v[0]=g=>s.value=g),size:f.$attrs.size,style:{width:`${r.appendWidth}px`}},f.$props.selectProps,{onChange:h}),{default:S(()=>[(y(!0),R(ne,null,oe(o.value,g=>(y(),j(d(ro),{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue","size","style"])]),key:"0"}:{name:"suffix",fn:S(()=>[s.value?(y(),R("div",{key:0,class:"x-input-unit__unit"},[I("span",null,ee(s.value),1)])):M("",!0)]),key:"1"}]),1032,["modelValue"]))}});/**!
|
|
79
79
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
80
80
|
* @name @vtj/renderer
|
|
81
81
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
82
|
-
* @version 0.7.
|
|
82
|
+
* @version 0.7.22
|
|
83
83
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
84
|
-
*/const Dn="0.7.
|
|
84
|
+
*/const Dn="0.7.22";var qe=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(qe||{});const gs=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],z6=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],O6=["vIf","vShow","vModel","vFor","vBind"],$c={String,Number,Boolean,Array,Object,Function,Date};function lr(n,e){return n.map(t=>$g(t)?t:`${e}${t}`)}function Vc(n){return/\.css$/.test(n)}function Ec(n){return/\.js$/.test(n)}function ys(n){return n.map(e=>`<script src="${On.append(e,{v:Dn})}"><\/script>`).join("")}function D6(n=[]){return n.map(e=>`<link rel="stylesheet" href="${On.append(e,{v:Dn})}" />`).join("")}function Cc(n,e){const t=n.filter(c=>!!c.enabled),r=[],i=[],o=[],a=[],s={},u=[],l={};return t.forEach(({urls:c,assetsUrl:p,library:m,assetsLibrary:h})=>{c?.forEach(f=>{Ec(f)&&r.push(f),Vc(f)&&i.push(f)}),m&&(a.push(m),s[m]=lr(c||[],e)),p&&o.push(p),h&&u.push(h),m&&h&&(l[h]=m)}),{scripts:lr(r,e),css:lr(i,e),materials:lr(o,e),libraryExports:a,materialExports:ru(u),materialMapLibrary:l,libraryMap:s}}function qi(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function Ac(n){return yn(n)?n:JSON.stringify(n)}function Tc(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,a=o.adoptedStyleSheets,s=Array.from(a).filter(u=>u.id!==e);o.adoptedStyleSheets=[...s,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 I6(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&Tc(window,n,t)}function M6(n){return In(n)||In(n?.install)}function Dt(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,(s,u)=>`__self${u}`),o=i.join(`
|
|
85
85
|
`)+o;const a=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(e)}catch(i){if(Ye.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function Wi(n,e,t=!1,r=!1){const i=Dt(n,e,t,r);if(typeof i!="function"&&(Ye.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function Re(n){return n&&n.type==="JSExpression"}function Yn(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function R6(n){return Re(n)||Yn(n)}function mn(n){return R6(n)?n.value:JSON.stringify(n)}let tn=null;const P6=hc({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{Wt.error({message:n||"未知错误"})},showLoading:()=>{tn&&tn.close(),tn=As.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{tn&&(tn.close(),tn=null)}}});function N6(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?Dt(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(a,s)=>r.send(ct(o,s||{},{data:a}))}}function Bc(n=[],e){return n.reduce((t,r)=>(t[r.id]=N6(r,e),t),{})}class F6{__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=Br){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&&gs.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){gs.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===qe.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Wi({type:r,value:i},this)}else return Wi(e,this)}__parseExpression(e){if(e)if(this.__mode===qe.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Dt({type:r,value:i},this)}else return Dt(e,this)}__ref(e=null,t){if(this.__mode!==qe.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),qe.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 a=new Set([].concat(o,r));this.$refs[t]=Array.from(a)}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 Po(n){const{Vue:e=Br,mode:t=qe.Runtime,components:r={},libs:i={},apis:o={},loader:a}=n,s=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new F6({mode:t,dsl:s.value,attrs:u}),c=e.defineComponent({name:s.value.name,props:{...H6(s.value.props??[],l)},setup(p){l.$props=p,s.value.id&&Tc(n.window||window,s.value.id,s.value.css||""),l.state=L6(e,s.value.state??{},l);const m=U6(e,s.value.computed??{},l),h=J6(s.value.methods??{},l),f=q6(e,s.value.inject,l),v=W6(s.value.dataSources||{},l),g={...f,...m,...h,...v};return l.setup(g,e),K6(e,s.value.watch??[],l),{vtj:l}},emits:[...s.value.emits??[]],expose:["vtj"],render(){if(!s.value.nodes)return null;const p=s.value.nodes||[];return p.length===1?Er(p[0],l,e,a):p.map(m=>Er(m,l,e,a))},...Y6(s.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function H6(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>$c[i]):void 0;return n.map(r=>yn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Re(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 L6(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return Re(o)?o=t.__parseExpression(o):Yn(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function U6(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function J6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function q6(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:a}=i||{};i.default;const s=Re(a)?t.__parseExpression(a)||o:a??o,u=Re(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(s,u),r},{})}function W6(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],a=Yn(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;return t[r]=async(...s)=>{const u=await o.apply(e,s);return a?a(u):u},t},{})}function K6(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function Y6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const G6=n=>n;function No(n){const{getDsl:e,options:t}=n;return(r,i,o=Br)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const a=await e(i.id);return a?Po({...t,Vue:o,dsl:a,mode:qe.Runtime,loader:No(n)}).renderer:null}):r}function Er(n,e,t=Br,r=G6){if(!n||!n.name||n.invisible)return null;const{id:i=null,directives:o=[]}=n,{vIf:a,vFor:s,vShow:u,vModels:l,vBind:c}=Z6(o);if(a&&!X6(a,e))return null;const p=m=>{const h=m.$components,f=(()=>{if(n.name==="component")return Q6(m,n.props?.is);if(n.name==="slot")return n.name;const b=r(n.name,n.from,t);return yn(b)?h[b]??b:b})(),v=ew(i,n.props??{},m),g=tw(t,n.events??{},m);if(n.name==="slot")return nw(t,n,v,m);c&&Object.assign(v,m.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},iw(u,m))),l.forEach(b=>{Object.assign(v,ow(t,b,m))});const k=aw(t,n.children??[],m,n);return t.createVNode(f,{...v,...g},k)};return s?uw(s,p,e):p(e)}function Z6(n=[]){const e=n.find(s=>Ht(s.name)==="vIf"),t=n.find(s=>Ht(s.name)==="vFor"),r=n.find(s=>Ht(s.name)==="vShow"),i=n.find(s=>Ht(s.name)==="vBind"),o=n.filter(s=>Ht(s.name)==="vModel"),a=n.filter(s=>!O6.includes(Ht(s.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:a}}function X6(n,e){return!!e.__parseExpression(n.value)}function Q6(n,e){return e?Re(e)?n.__parseExpression(e):e:"div"}function ew(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let a=e[o];return Re(a)?a=t.__parseExpression(a):Yn(a)&&(a=t.__parseFunction(a)),i[o]=a,i},{});return r.ref=t.__ref(n,r.ref),r}function tw(n,e,t){const r=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(e||{}).reduce((o,a)=>{const s=e[a],u=zc(s.modifiers),l=u.find(m=>r.includes(m)),c="on"+yo(a)+(l&&i[l]||""),p=t.__parseFunction(s.handler);return p&&(o[c]=n.withModifiers(p,u)),o},{})}function zc(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function nw(n,e,t,r){const{children:i}=e,o=rw(e,r),a=r.$slots?.[o.name];return a?a(t):i?yn(i)?n.createTextVNode(i):Re(i)?n.createTextVNode(Ac(r.__parseExpression(i))):Array.isArray(i)?i.map(s=>Er(s,r,n)):null:null}function rw(n,e){const{props:t}=n,r=t?.name||"default";return{name:Re(r)?e.__parseExpression(r):r,params:[]}}function iw(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function ow(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
|
|
86
86
|
${e.value.value} = v;
|
|
87
87
|
}`:"(v) => {}"},i=t.__parseFunction(r),o=zc(e.modifiers),a=Re(e.arg)?t.__parseExpression(e.arg):e.arg||"modelValue";return{[a]:t.__parseExpression(e.value),[`onUpdate:${a}`]:o.length&&i?n.withModifiers(i,o):i}}function aw(n,e,t,r){if(!e)return null;if(yn(e))return{default:()=>e};if(Re(e))return{default:()=>Ac(t.__parseExpression(e))};if(Array.isArray(e)){const i=sw(e),o=a=>!a||!r?{}:r?.id&&Object.keys(a).length?{[`scope_${r.id}`]:a}:{};return Object.entries(i).reduce((a,[s,{nodes:u,params:l}])=>(a[s]=c=>{const p=l.length?Dg(c??{},l):o(c);return u.map(m=>Er(m,t.__clone(p),n))},a),{})}}function sw(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=lw(t.slot),i=r.name;e[i]?(e[i].nodes.push(t),e[i].params=e[i].params.concat(r.params)):e[i]={nodes:[t],params:r.params}}return e}function lw(n="default"){return yn(n)?{name:n,params:[]}:{params:[],...n}}function uw(n,e,t){const{value:r,iterator:i}=n,{item:o="item",index:a="index"}=i||{};let s=t.__parseExpression(r)||[];return Number.isInteger(s)&&(s=new Array(s).fill(!0).map((u,l)=>l+1)),Array.isArray(s)?s.map((u,l)=>e(t.__clone({[o]:u,[a]:l}))):(console.warn("[vForRender]:",`${r?.value} is not a Arrary`),[])}const bs=O({name:"VtjPageContainer",async setup(){const n=bw(),e=Md(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&Od(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Oe(this.component,this.query):Oe("div","页面不存在")}}),cw={name:{type:String,default:"VTJ.PRO"},tagline:{type:String,default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{type:String,default:"开始设计"},actionLink:{type:String,default:"/@vtj/pro/"}},dw={class:"x-startup"},pw={class:"x-startup__wrapper"},hw={class:"x-startup__name"},mw={class:"clip"},fw={class:"x-startup__tagline"},vw={class:"x-startup__actions"},gw=O({__name:"Startup",props:cw,setup(n){const e=n,t=()=>{if(typeof window<"u"){let r=(window.__VTJ_LINK__||{}).href||window.location.pathname+"@vtj/pro/#/";window.location.href=r}};return(r,i)=>(y(),R("div",dw,[I("div",pw,[I("div",hw,[I("span",mw,ee(e.name),1)]),I("div",fw,ee(e.tagline),1),I("div",vw,[w(d(Ce),{type:"primary",size:"large",round:"",icon:d(Bs),onClick:t},{default:S(()=>[de(ee(e.actionText),1)]),_:1},8,["icon"])])])]))}}),yw=O({name:"VtjStartupContainer",render(){return Oe(gw)}}),Oc=Symbol("Provider");class Dc extends So{mode;globals={};modules={};adapter={request:P6,jsonp:Db};apis={};dependencies={};materials={};library={};service;project=null;components={};router=null;materialPath="./";constructor(e){super();const{service:t,mode:r=qe.Raw,dependencies:i,materials:o,project:a={},adapter:s={},globals:u={},modules:l={},router:c=null,materialPath:p="./"}=e;this.mode=r,this.modules=l,this.service=t,this.router=c,this.materialPath=p,i&&(this.dependencies=i),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,s),r!==qe.Design&&this.load(a)}async load(e){const t=this.modules[`.vtj/projects/${e.id}.json`];if(this.project=t?await t():await this.service.init(e),!this.project)throw new Error("project is null");const{dependencies:r=[],apis:i}=this.project,{dependencies:o,library:a,components:s,materialPath:u}=this,{libraryExports:l,libraryMap:c,materials:p,materialExports:m,materialMapLibrary:h}=Cc(r,u);for(const v of l){const g=o[v],k=window[v];if(k)a[v]=k;else if(g)window[v]=a[v]=await g();else{const b=c[v]||[];for(const _ of b)Vc(_)&&await I6(v,On.append(_,{v:Dn})),Ec(_)&&await ps(On.append(_,{v:Dn})),a[v]=window[v]}}for(const v of p)await ps(On.append(v,{v:Dn}));const f=this.materials||{};for(const v of m){const g=window[h[v]],k=Rg[v];if(k)g&&k.forEach(b=>{s[b]=g[b]});else{const b=f[v]?(await f[v]()).default:window[v];b&&g&&(b.components||[]).forEach(_=>{s[_.name]=qi(_,g)})}}i&&(this.apis=Bc(i,this.adapter)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:bs}),e.addRoute({path:"/",name:"VtjHomepage",component:t?.homepage?bs:yw}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&M6(i)&&(e.use(i),t[r]=!0);e.provide(Oc,this),e.config.globalProperties.installed=t}getFile(e){const{blocks:t=[]}=this.project||{};return this.getPage(e)||t.find(r=>r.id===e)||null}getPage(e){const{pages:t=[]}=this.project||{},r=(i,o=[])=>{for(const a of o){if(a.id===i)return a;if(a.children&&a.children.length){const s=r(i,a.children);if(s)return s}}};return r(e,t)||null}getHomepage(){const{homepage:e}=this.project||{};return e?this.getPage(e):null}async getDsl(e){const t=this.modules[`.vtj/files/${e}.json`];return t?await t():this.service.getFile(e).catch(()=>null)}async getRenderComponent(e){const t=this.getFile(e);if(!t)return Ye.warn(`Can not find file: ${e}`),null;const r=`.vtj/vue/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const o=await this.getDsl(t.id);if(!o)return Ye.warn(`Can not find dsl: ${e}`),null;const{library:a,components:s,mode:u,apis:l}=this,c={mode:u,Vue:a.Vue,components:s,libs:a,apis:l,window},p=No({getDsl:async h=>await this.getDsl(h)||null,options:c}),{renderer:m}=Po({...c,dsl:o,loader:p});return m}}function O_(n){const e=new Dc(n);return{provider:e,onReady:t=>e.ready(t)}}function bw(n={}){const e=An(Oc);if(!e)throw new Error("Can not find provider");if(e.mode===qe.Raw){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&Wt.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const ww=new pc({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{Wt.error({message:n||"未知错误"})}}}),_w=(n="/vtj/local/repository/${type}.json")=>(e,t)=>ww.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}});class xw{api;constructor(){this.api=_w()}async init(e){return console.log("BaseService.init",e),{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return console.log("BaseService.saveMaterials",e,t),!1}async saveFile(e){return console.log("BaseService.saveFile",e),!1}async getFile(e){return console.log("BaseService.getFile",e),{}}async removeFile(e){return console.log("BaseService.removeFile",e),!1}async saveHistory(e){return console.log("BaseService.saveHistory",e),!1}async removeHistory(e){return console.log("BaseService.removeHistory",e),!1}async getHistory(e){return console.log("BaseService.getHistory",e),{}}async getHistoryItem(e,t){return console.log("BaseService.getHistoryItem",e,t),{}}async saveHistoryItem(e,t){return console.log("BaseService.saveHistoryItem",e,t),!1}async removeHistoryItem(e,t){return console.log("BaseService.removeHistoryItem",e,t),!1}async publish(e){return!!await this.api("publish",e).catch(()=>!1)}async publishFile(e,t){return!!await this.api("publishFile",{project:e,file:t}).catch(()=>!1)}async genVueContent(e,t){return await this.api("genVueContent",{project:e,dsl:t}).catch(()=>"")}async createRawPage(e){return await this.api("createRawPage",e).catch(()=>"")}async removeRawPage(e){return await this.api("removeRawPage",e).catch(()=>"")}}new mc({type:"local",expired:0,prefix:"__VTJ_"});class D_ extends xw{async init(e){return await this.api("init",e).catch(()=>null)||{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return!!await this.api("saveMaterials",{project:e,materials:Og(t)}).catch(()=>!1)}async saveFile(e){return!!await this.api("saveFile",e).catch(()=>!1)}async getFile(e){return await this.api("getFile",e).catch(()=>null)||{}}async removeFile(e){return!!await this.api("removeFile",e).catch(()=>!1)}async saveHistory(e){return!!await this.api("saveHistory",e).catch(()=>!1)}async removeHistory(e){return!!await this.api("removeHistory",e).catch(()=>!1)}async getHistory(e){return await this.api("getHistory",e).catch(()=>null)||{}}async getHistoryItem(e,t){return await this.api("getHistoryItem",{fId:e,id:t}).catch(()=>null)||{}}async saveHistoryItem(e,t){return!!await this.api("saveHistoryItem",{fId:e,item:t}).catch(()=>!1)}async removeHistoryItem(e,t){return!!await this.api("removeHistoryItem",{fId:e,ids:t}).catch(()=>!1)}}/**!
|
|
88
88
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
89
89
|
* @name @vtj/designer
|
|
90
90
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
91
|
-
* @version 0.7.
|
|
91
|
+
* @version 0.7.22
|
|
92
92
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
93
|
-
*/const Sw="0.7.21",ws={width:390,height:844},_s={width:1180,height:820},St=/^[A-Za-z_$][\w_-]*$/,kw=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],jw=["keydown","keyup","keypress"],$w=["GET","POST","PUT","PATCH","DELETE","JSONP"],Vw=["stop","prevent","capture","self","once","passive"];var it=(n=>(n.Block="block",n.Node="node",n))(it||{});const Fo="data:image/png;base64,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",Ew=["title","src"],Cw={key:1},Aw=O({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:Fo},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(y(),R("div",{class:"v-logo-widget",onClick:t},[e.icon?(y(),R("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,Ew)):(y(),R("span",Cw,ee(e.text),1))]))}}),Tw={class:"v-empty-widget"},Bw=O({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(y(),R("div",Tw,"EmptyWidget"))}});function Ic(){const n=He(),e=T(()=>n.project.value?.dependencies??[]),t=T(()=>n.project.value?.apis??[]);return{engine:n,dependencies:e,apis:t}}function Mt(n,e){const t=T(()=>Lc.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=B();return{widgets:t,widgetsRef:r}}function Mc(){const n=He();return{span:T(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function zw(){const n=He(),e=T(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const Ow=(n=[])=>n.map(e=>e.name);function Dw(){const n=He(),{components:e,groups:t,componentMap:r}=n.assets,i=qt({}),o=T(()=>{const p={};return t.value&&t.value.forEach(m=>{p[m.name]=m}),p}),a=T(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),s=B(a.value[0]?.name),u=B(""),l=T(()=>o.value[s.value]);js(()=>{const p=a.value.reduce((m,h)=>(m[h.name]=Ow(o.value[h.name].children),m),{});Object.assign(i,p)});const c=T(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(m=>m.name.toLowerCase().includes(p)||m.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:a,model:i,currentTab:s,currentGroup:l,searchKey:u,searchResult:c}}function Pe(){const n=He(),e=T(()=>n.current.value),t=T(()=>n.simulator.renderer?.context??null),r=T(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function Iw(n,e,t){const r=He();r.simulator.init(n,e,t);const i=T(()=>r.simulator.designer.value),o=T(()=>di("hover",i.value?.hover.value)),a=T(()=>di("dropping",i.value?.dropping.value)),s=T(()=>di("selected",i.value?.selected.value));return ce(r.changed,()=>{i.value?.updateRect()}),{designer:i,dropping:a,hover:o,selected:s}}function Mw(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let a,s;return s=t>30?"top":"bottom",a=e||o<300&&i<300?"left":"right",[a,s].join("-")}function Rw(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:a}=e,s={left:r,width:i,top:o,height:a};switch(t){case"left":s.left=0,s.width=0;break;case"right":s.left=s.left+s.width-4,s.width=0;break;case"bottom":s.top=s.top+s.height-4,s.height=0;break;case"top":s.height=0;break}return s}function di(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?Rw(e):e.rect,a={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:a,position:Mw(e.rect,n!=="selected")}}function vt(){const n=He(),e=T(()=>n.simulator.designer.value),t=T(()=>e.value?.selected.value),r=T(()=>je(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function Pw(n,e){const t=B(""),{selected:r,isSelectBlock:i}=vt(),o=T(()=>r.value?.model.id),a=T(()=>{const u=mi(n),l=mi(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],m=l===p||i.value?[]:Object.keys(p?.context||{}).filter(V=>!["context","ref"].includes(V)).map(V=>`this.context.${V}`);m.length&&c.push({title:"上下文",items:m});const h=u.inject.map(V=>`this.${V.name}`);h.length&&c.push({title:"注入",items:h});const f=u.props.map(V=>typeof V=="string"?`this.$props.${V}`:`this.$props.${V.name}`);f.length&&c.push({title:"属性",items:f});const v=Object.keys(u.state).map(V=>`this.state.${V}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(V=>`this.${V}.value`);g.length&&c.push({title:"计算属性",items:g});const k=Object.keys(u.methods).map(V=>`this.${V}`);k.length&&c.push({title:"方法",items:k});const b=Object.keys(u.dataSources).map(V=>`this.${V}`);b.length&&c.push({title:"数据源",items:b});const _=Object.keys(l?.$refs||{}).map(V=>`this.$refs.${V}`);return _.length&&c.push({title:"refs",items:_}),c}),s=T(()=>{if(!t.value)return a.value;const u=t.value.toLowerCase(),l=[];return a.value.forEach(c=>{const p=c.items.filter(m=>m.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:a,searchResult:s}}const ur=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function Nw(n){const e=He(),t=T(()=>{const u=n.value?.model||null;return je(u)?null:u}),r=B();ce(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=T(()=>t.value?[{name:"key",setters:ur,value:t.value.getPropValue("key")},{name:"ref",setters:ur,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:ur,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:ur,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=T(()=>{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})):[]}),a=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",s=T(()=>t.value?Object.keys(t.value.props).filter(u=>!a(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:s,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:a}}function Ae(n,e="提示"){return Wt.warning({title:e,message:n})}async function _n(n){return await ao.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Je(n,e="success"){return Tr({message:n,type:e})}function Me(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Dt(n,e,t,!0):Wi(n,e,t,!0)}catch(i){r=!1,Wt.error({title:"代码错误",message:i.message})}return r}function Rc(){const n=He(),e=T(()=>n.simulator.designer.value),t=T(()=>n.current.value?n.history.value:null),r=T(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},a=l=>{e.value?.cleanHelper(),t.value?.load(l),Je("已载入历史记录","success")},s=T(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=T(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:a,forwardDisabled:s,backwardDisabled:u}}function Jr(){const n=He(),e=T(()=>n.project.value);return{engine:n,project:e}}function Fw(n){const e=He(),t=T(()=>{const s=n.value?.model||null;return!s||je(s)?null:s}),r=B();ce(t,async s=>{s?.from?r.value=await e.assets.getBlockMaterial(s.from)||void 0:r.value=void 0});const i=T(()=>{if(je(t.value))return[];const s=t.value?.events||{};return kw.map(u=>({name:u,event:s[u]}))}),o=T(()=>{if(je(t.value))return[];const s=t.value?.events||{};return jw.map(u=>({name:u,event:s[u]}))}),a=T(()=>{if(!t.value||je(t.value))return[];const s=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:s[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:a}}const Hw=(n,e)=>new rn({name:n,value:void 0,iterator:e}),Lw=(n="modelValue")=>new rn({name:"vModel",value:void 0,arg:n});function Uw(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 Jw(n){const e=He(),t=T(()=>{const p=n.value?.model||null;return je(p)?null:p}),r=p=>T(()=>t.value&&(t.value.directives||[]).find(m=>m.name===p)||Hw(p)),i=()=>T(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?Uw(p):[]).map(m=>(t.value?.directives||[]).find(h=>h.name==="vModel"&&h.arg==m.name)||Lw(m.name))}),o=r("vIf"),a=r("vShow"),s=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:a,vBind:s,vFor:u};return{engine:e,node:t,vIf:o,vShow:a,vBind:s,vFor:u,vModels:l,onValueChange:(p,m)=>{const h=c[p];t.value&&(m?(h.value.value=m,t.value.setDirective(h.value)):(h.value.value=void 0,t.value.removeDirective(h.value)))},onForChange:(p,m)=>{if(t.value){if(p==="value"){m?(u.value.value=m,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:m||void 0},t.value.setDirective(u.value))}},onModelChange:(p,m)=>{if(!t.value)return;const h=parseInt(p),f=l.value[h];f&&(m?(f.value=m,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function qw(){const{engine:n,project:e}=Jr(),t=T(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const Ww={class:"v-switcher-widget"},Kw={key:1},Yw=O({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Pe(),i=T(()=>r.project.value?.name),o=T(()=>r.project.value?.currentFile?.title),a=()=>{t("click",r.project.value)};return(s,u)=>(y(),R("div",Ww,[w(d(Ce),{size:"small",round:"",onClick:a},{default:S(()=>[w(d(gu),{class:"v-switcher-widget__back"}),I("span",null,ee(i.value),1),o.value?(y(),j(d(Ar),{key:0,direction:"vertical"})):M("",!0),o.value?(y(),R("span",Kw,ee(o.value),1)):M("",!0)]),_:1})]))}}),Gw={class:"v-toolbar-widget"},Zw=O({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:a}=Rc(),s=B("pc");return e({mode:s}),(u,l)=>(y(),R("div",Gw,[w(d(io),{size:"small",modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c)},{default:S(()=>[w(d(Bn),{label:"pc"},{default:S(()=>[w(d(ku))]),_:1}),w(d(Bn),{label:"mobile"},{default:S(()=>[w(d(ju))]),_:1}),w(d(Bn),{label:"pad"},{default:S(()=>[w(d($u))]),_:1})]),_:1},8,["modelValue"]),M("",!0),w(d(ud),null,{default:S(()=>[w(d(Ce),{type:"default",size:"small",onClick:d(i),disabled:d(a)||!!t.preview},{default:S(()=>[w(d(Cu))]),_:1},8,["onClick","disabled"]),w(d(Ce),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:S(()=>[w(d(Vu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),Xw={class:"v-actions-widget"},Qw=I("span",null,"发布",-1),e4=O({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=vt(),r=B(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Je("刷新完成","success")):Je("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await tu(1e3)),t.value?.setSelected(e.current.value)):Je("请先打开文件","warning")},a=()=>{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 Je("请先打开文件","warning")},s=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Je("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?s():c.publish())};return(l,c)=>(y(),R("div",Xw,[M("",!0),M("",!0),w(d(Ce),{onClick:a,type:r.value?"warning":"default",size:"small",title:"预览"},{default:S(()=>[w(d(xu))]),_:1},8,["type"]),w(d(Ce),{onClick:i,type:"default",size:"small",title:"刷新"},{default:S(()=>[w(d(Eu))]),_:1}),w(d(Ce),{type:"default",size:"small",title:"页面设置",onClick:o},{default:S(()=>[w(d(Tu))]),_:1}),w(d(Ar),{direction:"vertical"}),w(d(eo),{"split-button":"",type:"primary",size:"small",onClick:s,onCommand:u},{dropdown:S(()=>[w(d(Qi),null,{default:S(()=>[w(d(xr),{command:"current"},{default:S(()=>[de("发布页面")]),_:1}),w(d(xr),{command:"project"},{default:S(()=>[de("整站发布")]),_:1})]),_:1})]),default:S(()=>[Qw]),_:1})]))}}),t4={class:"v-icon-setter"},n4={class:"v-icon-setter__content"},r4={class:"v-icon-setter__list"},Pc=O({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=B(!1),o=B(t.modelValue),a=B(""),s=T(()=>Di[t.modelValue]||t.modelValue),u=T(()=>{const h=Object.entries(Di);return a.value?h.filter(f=>f[0].toLowerCase().includes(a.value)):h}),l=h=>{o.value=h},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},m=()=>{i.value=!0};return(h,f)=>(y(),R("div",t4,[w(d(tt),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(zs),onFocus:m},{prepend:S(()=>[w(d(rt),{icon:s.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(y(),j(d(Zt),{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:S(()=>[w(d(Ce),{size:"default",type:"warning",onClick:p},{default:S(()=>[de(" 清除绑定 ")]),_:1})]),default:S(()=>[I("div",n4,[w(d(tt),{size:t.size,"prefix-icon":d(Os),clearable:"",modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),I("div",r4,[(y(!0),R(ne,null,oe(u.value,v=>(y(),j(d(rt),{icon:v[1],onClick:g=>l(v[0]),class:ue({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(y(),j(d(Be),{key:0})):M("",!0)])])]),_:1},8,["modelValue"])):M("",!0)]))}}),i4=O({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Jr(),r=T(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=B(e.item||i()),a=[{label:"页面",value:!1},{label:"目录",value:!0}],s=l=>{o.value&&(o.value.name=jr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ae("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(y(),j(d(ft),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:S(()=>[w(d(te),{name:"dir",label:"类型",editor:"radio",options:a,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),w(d(te),{name:"name",label:"名称",required:"",onChange:s,rules:{pattern:d(St),message:"名称格式不正确"}},null,8,["rules"]),w(d(te),{name:"title",label:"标题",required:""}),w(d(te),{name:"icon",label:"菜单图标",editor:"none"},{editor:S(()=>[w(Pc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),w(d(te),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),w(d(te),{name:"hidden",label:"隐藏菜单",editor:"switch"}),w(d(te),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),xs=O({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=T(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(a,s)=>(y(),j(d(Cr),{effect:"dark",placement:"right",content:a.label,"show-after":600},{default:S(()=>[I("div",{class:ue(["v-apps-region__icon",i.value]),onClick:o},[(y(),j(Ke(a.icon)))],2)]),_:1},8,["content"]))}}),me=O({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},edit:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0},collapsable:{type:Boolean}},emits:["plus","back","remove","save","edit"],setup(n,{emit:e}){const t=n,r=e,i=B(!1),o=T(()=>({"is-collapsed":!!i.value})),a=()=>{r("plus")},s=()=>{r("edit")},u=()=>{r("back")},l=()=>{r("remove")},c=()=>{r("save")},p=T(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?$d:void 0,onClickBack:t.back?u:void 0,onClick:t.collapsable?()=>{i.value=!i.value}:void 0}:null),m=h=>{i.value=h};return(h,f)=>(y(),j(d(Ur),{class:ue(["v-panel",o.value]),border:!1,header:p.value,fit:""},Jt({actions:S(()=>[t.plus?(y(),j(d(De),{key:0,size:h.$attrs.size,mode:"icon",icon:d(Co),background:"hover",title:"新增",onClick:a},null,8,["size","icon"])):M("",!0),t.edit?(y(),j(d(De),{key:1,size:h.$attrs.size,mode:"icon",icon:d(Bs),background:"hover",title:"编辑",onClick:s},null,8,["size","icon"])):M("",!0),t.remove?(y(),j(d(De),{key:2,size:h.$attrs.size,mode:"icon",icon:d(Vd),background:"hover",title:"清除",onClick:l},null,8,["size","icon"])):M("",!0),t.save?(y(),j(d(De),{key:3,size:h.$attrs.size,mode:"icon",icon:d(Su),background:"hover",title:"保存",onClick:c},null,8,["size","icon"])):M("",!0),t.collapsable?Bt((y(),j(d(De),{key:4,size:h.$attrs.size,mode:"icon",icon:d(zs),background:"hover",title:"展开",onClick:f[0]||(f[0]=v=>m(!1))},null,8,["size","icon"])),[[cn,i.value]]):M("",!0),t.collapsable?Bt((y(),j(d(De),{key:5,size:h.$attrs.size,mode:"icon",icon:d(Ed),background:"hover",title:"收起",onClick:f[1]||(f[1]=v=>m(!0))},null,8,["size","icon"])),[[cn,!i.value]]):M("",!0),le(h.$slots,"actions")]),default:S(()=>[le(h.$slots,"default")]),_:2},[h.$slots.footer?{name:"footer",fn:S(()=>[le(h.$slots,"footer")]),key:"0"}:void 0]),1032,["class","header"]))}}),o4={class:"v-tabs__header"},a4={key:0,class:"v-tabs__actions"},qr=O({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove","action-click"],setup(n,{emit:e}){const t=n,r=e,i=B((t.modelValue||t.items[0]?.name)??"");ce(i,()=>{r("update:modelValue",i.value)}),ce(()=>t.modelValue,u=>{i.value=u});const o=u=>{r("command",u)},a=u=>{r("remove",u)},s=u=>{r("action-click",u)};return(u,l)=>(y(),j(d(Ur),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:S(()=>[I("div",o4,[w(d(kc),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.value=c),onTabRemove:a,onActionClick:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(y(),R("div",a4,[t.menus&&t.menus.length?(y(),j(d(De),{key:0,mode:"icon",size:"small",icon:d(so),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:S(({item:c})=>[I("span",null,[t.checkable?(y(),j(d(ko),{key:0,class:ue({"v-tabs__checked":!0,"is-checked":c.checked})},null,8,["class"])):M("",!0),de(" "+ee(c.label),1)])]),_:1},8,["icon","menus"])):M("",!0)])):M("",!0)])]),default:S(()=>[le(u.$slots,"default")]),_:3}))}}),s4={key:2,class:"v-item__index"},l4={class:"v-item__content"},u4={key:3,class:"v-item__subtitle"},Ie=O({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:Co},copy:{label:"复制",icon:jo},edit:{label:"编辑",icon:Eo},remove:{label:"删除",icon:qn},lock:{label:"锁定",icon:$o},unlock:{label:"解锁",icon:_u},invisible:{label:"隐藏",icon:Ao},visible:{label:"显示",icon:Ru},home:{label:"主页",icon:yu}},r=n,i=e,o=B(!!r.modelValue),a=T(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),s=T(()=>({"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 ao.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return ce(o,c=>{i("update:modelValue",c),i("switch",c)}),ce(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(y(),j(d(ae),{class:ue(["v-item",s.value]),justify:"space-between",align:"center",onClick:u},{default:S(()=>[w(d(ae),{class:"v-item__title",align:"center"},{default:S(()=>[le(c.$slots,"default",{},()=>[c.icon?(y(),j(d(rt),{key:0,icon:c.icon},null,8,["icon"])):M("",!0),r.tag?(y(),j(d(bd),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:S(()=>[de(ee(r.tag),1)]),_:1},8,["type"])):M("",!0),c.index!==void 0?(y(),R("span",s4," # "+ee(c.index),1)):M("",!0),I("span",l4,ee(c.title),1),c.subtitle?(y(),R("span",u4,ee(c.subtitle),1)):M("",!0)])]),_:3}),w(d(ae),{class:"v-item__actions",onClick:p[1]||(p[1]=an(()=>{},["stop"]))},{default:S(()=>[(y(!0),R(ne,null,oe(a.value,m=>(y(),j(d(De),{name:m.name,title:m.label,mode:"icon",size:"small",background:"none",type:"info",icon:m.icon,onClick:h=>l(m.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(y(),j(d(to),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=m=>o.value=m),class:"v-item__switch",size:"small"},null,8,["modelValue"])):M("",!0),le(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),c4=["draggable"],d4={class:"v-box__name"},p4={class:"v-box__label"},Ki=O({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 ao.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},a=T(()=>({"is-active":t.active,"is-draggable":t.draggable})),s=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(y(),R("div",{class:ue(["v-box",a.value]),draggable:l.draggable,onDragstart:s,onDragend:u},[w(d(ae),{direction:"column",justify:"center",align:"center"},{default:S(()=>[I("span",d4,ee(t.name),1),I("span",p4,ee(t.title),1)]),_:1}),t.editable?(y(),j(d(ae),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:S(()=>[w(d(rt),{icon:d(Eo),onClick:i},null,8,["icon"]),w(d(rt),{icon:d(qn),onClick:o},null,8,["icon"])]),_:1})):M("",!0)],42,c4))}}),h4={class:"v-context-viewer"},m4=O({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,m=ni(p);return m==="Object"||m==="Module"?Object.keys(p||{}).length===0:m==="Array"?p.length===0:!0},a=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((m,h)=>{const f=`[${h}]`;return{label:f,value:m,type:ni(m),path:`${p}${f}`}}):Object.entries(c).map(([m,h])=>({label:m,value:h,type:ni(h),path:`${p}.${m}`})).filter(m=>!m.label.startsWith("__")&&!i.includes(m.label)):[],s=(c,p)=>{if(c.level===0)p(a(t.context));else{const m=on(c.data.value);p(a(m,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(y(),R("div",h4,[c.context?(y(),j(d(oo),{key:0,lazy:"",load:s,"expand-on-click-node":!1,props:{isLeaf:o}},{default:S(({data:m})=>[w(Ie,{title:m.label,clickable:"",onClick:h=>l(m),background:"",actions:["copy"],onAction:h=>u(m),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):M("",!0)]))}}),Ho=O({__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}=Pw(t.block,t.context),{copy:a}=Dd({}),s=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=B("normal"),l=B(),c=async k=>{r("submit",k),t.submitMethod?await t.submitMethod(k)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},m=()=>{r("unbind")},h=()=>{p()},f=async()=>{l.value?.submit()},v=k=>{r("pick",k)},g=k=>{a(k),Tr.success({message:"已经复制到粘贴板"})};return(k,b)=>(y(),j(d(Zt),{"model-value":t.modelValue,class:"v-binder",title:k.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:S(()=>[w(d(ae),{fit:"",direction:"row",overflow:"hidden"},{default:S(()=>[w(d(ae),{width:"30%",height:"100%"},{default:S(()=>[w(qr,{class:"v-binder__tabs",items:s,modelValue:u.value,"onUpdate:modelValue":b[1]||(b[1]=_=>u.value=_)},{default:S(()=>[w(d(ae),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:S(()=>[Bt(I("div",null,[w(d(tt),{modelValue:d(o),"onUpdate:modelValue":b[0]||(b[0]=_=>hi(o)?o.value=_:null),size:"small",clearable:"","prefix-icon":d(Os),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(y(!0),R(ne,null,oe(d(i),_=>(y(),R("div",null,[w(d(Ar),{"border-style":"dotted"},{default:S(()=>[de(ee(_.title),1)]),_:2},1024),(y(!0),R(ne,null,oe(_.items,V=>(y(),j(Ie,{title:V,background:"",actions:["copy"],small:"",onClick:$=>v(V),onAction:$=>g(V)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?M("",!0):(y(),j(d(Be),{key:0}))],512),[[cn,u.value==="normal"]]),Bt(w(m4,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[cn,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),w(d(Ur),{grow:"",header:null,border:!1},{footer:S(()=>[w(d(ae),{justify:"space-between"},{default:S(()=>[w(d(ae),null,{default:S(()=>[k.unbindEnabled?(y(),j(d(Ce),{key:0,type:"warning",size:"default",onClick:m},{default:S(()=>[de(" 移除绑定 ")]),_:1})):M("",!0)]),_:1}),w(d(ae),null,{default:S(()=>[w(d(Ce),{type:"default",size:"default",onClick:h},{default:S(()=>[de(" 取消 ")]),_:1}),w(d(Ce),{type:"primary",size:"default",onClick:f},{default:S(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:S(()=>[w(d(Sc),{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:S(()=>[le(k.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),f4={class:"v-slots-picker__sn"},v4=O({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=B(),o=T(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),a=u=>{i.value=u},s=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ae("请选择插槽")};return(u,l)=>(y(),j(d(Zt),ve({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:s},u.$attrs),{default:S(()=>[w(d(Sd),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),w(d(ae),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:S(()=>[(y(!0),R(ne,null,oe(t.slots,(c,p)=>(y(),j(d(ae),{class:ue(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:m=>a(c)},{default:S(()=>[I("span",f4,"#"+ee(p+1),1),de(" "+ee(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),Nc=O({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=T(()=>[`is-${e.mode}`]),r=T(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?ws:_s,{width:a,height:s}=o,u=a>0?(e.width||0)/a:1,l=s>0?(e.height||0)/s:1;return Math.min(u,l)}),i=T(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?ws:_s,{width:a,height:s}=o;return{width:`${a}px`,height:`${s}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,a)=>(y(),R("div",{class:ue(["v-viewport",t.value]),style:Tt(i.value)},[le(o.$slots,"default")],6))}}),g4=O({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Jr(),r=T(()=>e.value?.pages||[]),{current:i}=Pe(),o=B(!1),a=B(),s=B(),u=()=>{s.value=void 0,a.value=void 0,o.value=!0},l=async h=>{const{name:f,modelValue:v}=h,{data:g,node:k}=v;if(f==="add"&&(a.value=void 0,s.value=g.id,o.value=!0),f==="edit"&&(a.value=Jn(g),s.value=void 0,o.value=!0),f==="remove"){if(g.dir){const b=e.value?.getPage(g.id);if(b&&b.children?.length){Ae("请先删除子页面");return}}e.value?.removePage(g.id)}if(f==="copy"){const b=k.parent?.data.id;e.value?.clonePage(g,b)}f==="home"&&(e.value?.setHomepage(g.id),Je("设置主页成功","success"))},c=async h=>{h.raw&&Je("这是源码模式页面,不能低代码设计","warning"),h.dir||h.raw?t.project.value?.deactivate():t.project.value?.active(h)},p=(h,f,v)=>v==="inner"?!!f.data.dir:!0,m=()=>{e.value?.update({pages:mi(r)})};return(h,f)=>(y(),j(d(me),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:S(()=>[w(d(oo),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:m},{default:S(({data:v,node:g})=>[w(d(Ie),{class:"v-pages-widget__item",icon:d(Di)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:k=>c(v),active:d(i)?.id===v.id,tag:d(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?(y(),j(i4,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),item:a.value,"parent-id":s.value},null,8,["modelValue","item","parent-id"])):M("",!0)]),_:1}))}}),y4=O({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=Mc(),{blocks:t,engine:r}=zw(),i=B(void 0),{current:o}=Pe(),a=B(!1),s=T(()=>i.value?.id?"编辑":"新增"),u=T(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async b=>{const _=b,V=r.project.value;if(!V)return!1;if(b.id)if(!V.existBlockName(_.name,[_.id]))V.updateBlock(_);else return Ae(`名称【${_.name}】已经存在,请更换名称`),!1;else if(!V.existBlockName(_.name))V.createBlock(_);else return Ae(`名称【${_.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),a.value=!0},m=b=>{i.value=Jn(b),a.value=!0},h=b=>{r.project.value?.removeBlock(b.id)},f=b=>{i.value&&(i.value.name=jr(b))},v=async b=>{r.project.value?.active(b)},g=async b=>{const _={type:"Schema",id:b.id},V=await r.assets.getBlockMaterial(_),$=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;$&&V&&$.setDragging(V)},k=()=>{const b=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;b&&b.setDragging(null)};return(b,_)=>(y(),j(d(me),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:S(()=>[w(d(gi),{wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(d(t),V=>(y(),j(d(vi),{key:V.id,span:d(e)},{default:S(()=>[w(d(Ki),{name:V.name,title:V.title,active:d(o)?.id===V.id,editable:"",onEdit:$=>m(V),onRemove:$=>h(V),onClick:$=>v(V),draggable:d(o)?.id!==V.id,onDragstart:$=>g(V),onDragend:k},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?M("",!0):(y(),j(d(Be),{key:0})),w(d(ft),{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=V=>a.value=V),title:s.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:S(()=>[w(d(te),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(St)},onChange:f},null,8,["rules"]),w(d(te),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),b4={class:"v-components-widget__search"},w4={key:0,class:"v-components-widget__result"},_4={class:"v-components-widget__list"},x4=O({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=Mc(),{tabs:r,currentTab:i,currentGroup:o,model:a,searchKey:s,searchResult:u}=Dw(),l=p=>{const m=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;m&&m.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,m)=>(y(),j(d(me),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:S(()=>[I("div",b4,[w(d(tt),{modelValue:d(s),"onUpdate:modelValue":m[0]||(m[0]=h=>hi(s)?s.value=h:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:S(()=>[w(d(Fu))]),_:1},8,["modelValue"])]),d(s)?(y(),R("div",w4,[w(d(gi),{wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(d(u),h=>(y(),j(d(vi),{span:d(e),key:h.name},{default:S(()=>[w(d(Ki),{name:h.name,title:h.label||h.name,draggable:"",onDragstart:f=>l(h),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?M("",!0):(y(),j(d(Be),{key:0}))])):(y(),j(d(kc),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":m[2]||(m[2]=h=>hi(i)?i.value=h:null)},{default:S(()=>[I("div",_4,[d(o)?(y(),j(d(cd),{key:0,modelValue:d(a)[d(i)],"onUpdate:modelValue":m[1]||(m[1]=h=>d(a)[d(i)]=h)},{default:S(()=>[(y(!0),R(ne,null,oe(d(o).children,h=>(y(),j(d(dd),{key:h.name,name:h.name,title:`${h.label} (${h.count})`},{default:S(()=>[h.components?(y(),j(d(gi),{key:0,wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(h.components,f=>(y(),j(d(vi),{span:d(e),key:f.name},{default:S(()=>[w(d(Ki),{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)):M("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):M("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),S4=O({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=vt(),{current:i}=Pe(),o=B([]),a=$=>{if(je($))return $.locked?["unlock"]:["lock"];const x=$.parent;return x&&(x.locked||x.invisible)?[]:i.value?.locked?[]:$.locked?["unlock"]:$.invisible?["visible"]:["lock","invisible","copy","remove"]},s=$=>{const x=[];return $.forEach(E=>{const D={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(D.children=s(E.children)),x.push(D)}),x},u=()=>{if(!i.value)return[];const{id:$,name:x,nodes:E}=i.value;return[{id:$,label:x,type:$,model:i.value,children:s(E)}]},l=async()=>{o.value=u(),r.value?.model&&(await bt(),t.value?.setSelected(r.value.model))},c=T(()=>r.value?.model.id),p=$=>{const x=$.data;if(je(x.model)||x.model.locked||x.model.name==="template")return!1;const E=e.assets.componentMap.get(x.model.name);return E?(t.value?.setDragging(E),!0):!1},m=async($,x,E)=>{const D=x.data,Z={prev:"top",next:"bottom",inner:"inner"}[E];let C=!1;if(je(D.model))C=E==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Z),t.value?.setDropping(C?A:null,"inner")}return C},h=$=>{const x=$?.model;!x||x.invisible||(t.value?.setSelected(x),t.value?.setHover(null))},f=async($,x,E)=>{const D=$.data,Z=x.data;if(je(Z.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Z.model,A={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Tr.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const F=await t.value?.getDropSlot(E==="inner"?C:C.parent);if(F!==null){const z=D.model;z.slot=F,i.value?.move(z,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=$=>{je($.model)?t.value?.setHover($.model):(t.value?.setHover($.model),$.model.invisible&&t.value?.setHover(null),$.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},k=$=>{const x=$.data;x.dragging=!0;const E=e.assets.componentMap.get(x.model.name);E&&t.value?.setDragging(E)},b=async $=>{const x=$.data;x.dragging=!1},_=($,x)=>{$&&(($.id===x.id||!je($)&&x.isChild($))&&t.value?.setSelected(null),t.value?.setHover(null))},V=$=>{const{name:x,modelValue:E}=$,D=r.value?.model;switch(x){case"lock":_(D,E),E.lock();break;case"unlock":_(D,E),E.unlock();break;case"invisible":_(D,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const Z=i.value?.cloneNode(E);Z&&t.value?.setSelected(Z);break;case"remove":_(D,E),i.value?.removeNode(E);break}};return ce(e.changed,l,{immediate:!0}),($,x)=>(y(),j(d(me),{class:"v-outline-widget",title:"大纲树"},{default:S(()=>[(y(),j(d(oo),{key:d(e).changed.value,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":m,"allow-drag":p,onCurrentChange:h,onNodeDrop:f,onNodeDragStart:k,onNodeDragEnd:b},{default:S(({data:E,node:D})=>[w(d(Ie),{class:ue(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging}]),active:!E.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?d($o):E.model.invisible?d(Ao):void 0,title:E.label,subtitle:E.type,actions:a(E.model),onAction:V,onMouseenter:Z=>v(E),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),k4=O({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=Rc(),i=T(()=>`(共 ${r.value} 条)`),o=s=>{s.name==="remove"&&e.value?.remove(s.modelValue.id)},a=async()=>{await _n("确定要清空历史记录吗?")&&e.value?.clear()};return(s,u)=>(y(),j(d(me),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:a},{default:S(()=>[d(r)===0?(y(),j(d(Be),{key:0,"image-size":50})):M("",!0),d(e)?(y(!0),R(ne,{key:1},oe(d(e).items,(l,c)=>(y(),j(d(Ie),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):M("",!0)]),_:1},8,["subtitle","remove"]))}}),Te=Gc({loader:()=>Jc(()=>import("./Editor-BKlikwSl-D5v39DEP.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:O({render(){return Oe("div","正在拼命加载...")}}),errorComponent:O({render(){return Oe("div","组件加载失败!")}})}),j4=O({name:"ApisWidget",__name:"index",setup(n){const e=B(!1),t=B(null),r=B(!1),i=T(()=>r.value?"编辑API":"新增API"),o=T(()=>a.value?.apis||[]),{project:a}=Jr(),s=()=>({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=s()},l=$w.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],m=(g,k,b)=>{Me({type:"JSExpression",value:k},window)?b():b(new Error("代码错误"))},h=g=>{g.name==="edit"&&f(g.modelValue),g.name==="remove"&&a.value?.removeApi(g.modelValue.name)},f=g=>{r.value=!0,t.value=Jn(g),e.value=!0},v=async g=>a.value?.existApiName(g.name,r.value?[g.id]:[])?(Ae(`API名称 [ ${g.name} ] 已存在`),!1):(a.value?.setApi(g),!0);return(g,k)=>(y(),j(d(me),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:S(()=>[(y(!0),R(ne,null,oe(o.value,b=>(y(),j(d(Ie),{key:b.id,small:"",title:b.name,subtitle:b.label,"model-value":b,tag:b.method?.toUpperCase(),"tag-type":c[b.method||"get"],background:"",actions:["edit","remove"],onClick:_=>f(b),onAction:h},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(y(),j(d(Be),{key:0,"image-size":50})):M("",!0),w(d(ft),{modelValue:e.value,"onUpdate:modelValue":k[1]||(k[1]=b=>e.value=b),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:S(()=>[w(d(ae),{gap:"",fit:""},{default:S(()=>[w(d(ae),{direction:"column",grow:"",width:"50%",shrink:""},{default:S(()=>[w(d(te),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),w(d(te),{name:"name",label:"接口名称",required:"",rules:{pattern:d(St),message:"名称格式不正确"}},null,8,["rules"]),w(d(te),{name:"label",label:"备注说明",required:""}),w(d(te),{name:"url",label:"接口URL",required:""})]),_:1}),w(d(ae),{direction:"column",grow:"",width:"50%",shrink:""},{default:S(()=>[t.value.method!=="jsonp"?(y(),j(d(me),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:S(()=>[w(d(ae),{justify:"space-around"},{default:S(()=>[w(d(te),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),w(d(te),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),w(d(te),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),w(d(te),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),w(d(te),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),w(d(te),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),w(d(te),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:m}},{editor:S(()=>[w(d(Te),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":k[0]||(k[0]=b=>t.value.settings.headers.value=b),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):M("",!0),t.value.method==="jsonp"?(y(),j(d(me),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:S(()=>[w(d(te),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),w(d(te),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),w(d(te),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),w(d(te),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):M("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),$4=O({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=Ic(),r=B(!1),i=B(!1),o=B({}),a=T(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),s=f=>f.required||f.official?[]:["edit","remove"],u=f=>f.official&&!f.required,l=async f=>(f.urls=f.urls.split(`
|
|
93
|
+
*/const Sw="0.7.22",ws={width:390,height:844},_s={width:1180,height:820},St=/^[A-Za-z_$][\w_-]*$/,kw=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],jw=["keydown","keyup","keypress"],$w=["GET","POST","PUT","PATCH","DELETE","JSONP"],Vw=["stop","prevent","capture","self","once","passive"];var it=(n=>(n.Block="block",n.Node="node",n))(it||{});const Fo="data:image/png;base64,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",Ew=["title","src"],Cw={key:1},Aw=O({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:Fo},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(y(),R("div",{class:"v-logo-widget",onClick:t},[e.icon?(y(),R("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,Ew)):(y(),R("span",Cw,ee(e.text),1))]))}}),Tw={class:"v-empty-widget"},Bw=O({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(y(),R("div",Tw,"EmptyWidget"))}});function Ic(){const n=He(),e=T(()=>n.project.value?.dependencies??[]),t=T(()=>n.project.value?.apis??[]);return{engine:n,dependencies:e,apis:t}}function Mt(n,e){const t=T(()=>Lc.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=B();return{widgets:t,widgetsRef:r}}function Mc(){const n=He();return{span:T(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function zw(){const n=He(),e=T(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const Ow=(n=[])=>n.map(e=>e.name);function Dw(){const n=He(),{components:e,groups:t,componentMap:r}=n.assets,i=qt({}),o=T(()=>{const p={};return t.value&&t.value.forEach(m=>{p[m.name]=m}),p}),a=T(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),s=B(a.value[0]?.name),u=B(""),l=T(()=>o.value[s.value]);js(()=>{const p=a.value.reduce((m,h)=>(m[h.name]=Ow(o.value[h.name].children),m),{});Object.assign(i,p)});const c=T(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(m=>m.name.toLowerCase().includes(p)||m.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:a,model:i,currentTab:s,currentGroup:l,searchKey:u,searchResult:c}}function Pe(){const n=He(),e=T(()=>n.current.value),t=T(()=>n.simulator.renderer?.context??null),r=T(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function Iw(n,e,t){const r=He();r.simulator.init(n,e,t);const i=T(()=>r.simulator.designer.value),o=T(()=>di("hover",i.value?.hover.value)),a=T(()=>di("dropping",i.value?.dropping.value)),s=T(()=>di("selected",i.value?.selected.value));return ce(r.changed,()=>{i.value?.updateRect()}),{designer:i,dropping:a,hover:o,selected:s}}function Mw(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let a,s;return s=t>30?"top":"bottom",a=e||o<300&&i<300?"left":"right",[a,s].join("-")}function Rw(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:a}=e,s={left:r,width:i,top:o,height:a};switch(t){case"left":s.left=0,s.width=0;break;case"right":s.left=s.left+s.width-4,s.width=0;break;case"bottom":s.top=s.top+s.height-4,s.height=0;break;case"top":s.height=0;break}return s}function di(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?Rw(e):e.rect,a={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:a,position:Mw(e.rect,n!=="selected")}}function vt(){const n=He(),e=T(()=>n.simulator.designer.value),t=T(()=>e.value?.selected.value),r=T(()=>je(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function Pw(n,e){const t=B(""),{selected:r,isSelectBlock:i}=vt(),o=T(()=>r.value?.model.id),a=T(()=>{const u=mi(n),l=mi(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],m=l===p||i.value?[]:Object.keys(p?.context||{}).filter(V=>!["context","ref"].includes(V)).map(V=>`this.context.${V}`);m.length&&c.push({title:"上下文",items:m});const h=u.inject.map(V=>`this.${V.name}`);h.length&&c.push({title:"注入",items:h});const f=u.props.map(V=>typeof V=="string"?`this.$props.${V}`:`this.$props.${V.name}`);f.length&&c.push({title:"属性",items:f});const v=Object.keys(u.state).map(V=>`this.state.${V}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(V=>`this.${V}.value`);g.length&&c.push({title:"计算属性",items:g});const k=Object.keys(u.methods).map(V=>`this.${V}`);k.length&&c.push({title:"方法",items:k});const b=Object.keys(u.dataSources).map(V=>`this.${V}`);b.length&&c.push({title:"数据源",items:b});const _=Object.keys(l?.$refs||{}).map(V=>`this.$refs.${V}`);return _.length&&c.push({title:"refs",items:_}),c}),s=T(()=>{if(!t.value)return a.value;const u=t.value.toLowerCase(),l=[];return a.value.forEach(c=>{const p=c.items.filter(m=>m.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:a,searchResult:s}}const ur=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function Nw(n){const e=He(),t=T(()=>{const u=n.value?.model||null;return je(u)?null:u}),r=B();ce(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=T(()=>t.value?[{name:"key",setters:ur,value:t.value.getPropValue("key")},{name:"ref",setters:ur,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:ur,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:ur,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=T(()=>{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})):[]}),a=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",s=T(()=>t.value?Object.keys(t.value.props).filter(u=>!a(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:s,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:a}}function Ae(n,e="提示"){return Wt.warning({title:e,message:n})}async function _n(n){return await ao.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Je(n,e="success"){return Tr({message:n,type:e})}function Me(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Dt(n,e,t,!0):Wi(n,e,t,!0)}catch(i){r=!1,Wt.error({title:"代码错误",message:i.message})}return r}function Rc(){const n=He(),e=T(()=>n.simulator.designer.value),t=T(()=>n.current.value?n.history.value:null),r=T(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},a=l=>{e.value?.cleanHelper(),t.value?.load(l),Je("已载入历史记录","success")},s=T(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=T(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:a,forwardDisabled:s,backwardDisabled:u}}function Jr(){const n=He(),e=T(()=>n.project.value);return{engine:n,project:e}}function Fw(n){const e=He(),t=T(()=>{const s=n.value?.model||null;return!s||je(s)?null:s}),r=B();ce(t,async s=>{s?.from?r.value=await e.assets.getBlockMaterial(s.from)||void 0:r.value=void 0});const i=T(()=>{if(je(t.value))return[];const s=t.value?.events||{};return kw.map(u=>({name:u,event:s[u]}))}),o=T(()=>{if(je(t.value))return[];const s=t.value?.events||{};return jw.map(u=>({name:u,event:s[u]}))}),a=T(()=>{if(!t.value||je(t.value))return[];const s=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:s[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:a}}const Hw=(n,e)=>new rn({name:n,value:void 0,iterator:e}),Lw=(n="modelValue")=>new rn({name:"vModel",value:void 0,arg:n});function Uw(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 Jw(n){const e=He(),t=T(()=>{const p=n.value?.model||null;return je(p)?null:p}),r=p=>T(()=>t.value&&(t.value.directives||[]).find(m=>m.name===p)||Hw(p)),i=()=>T(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?Uw(p):[]).map(m=>(t.value?.directives||[]).find(h=>h.name==="vModel"&&h.arg==m.name)||Lw(m.name))}),o=r("vIf"),a=r("vShow"),s=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:a,vBind:s,vFor:u};return{engine:e,node:t,vIf:o,vShow:a,vBind:s,vFor:u,vModels:l,onValueChange:(p,m)=>{const h=c[p];t.value&&(m?(h.value.value=m,t.value.setDirective(h.value)):(h.value.value=void 0,t.value.removeDirective(h.value)))},onForChange:(p,m)=>{if(t.value){if(p==="value"){m?(u.value.value=m,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:m||void 0},t.value.setDirective(u.value))}},onModelChange:(p,m)=>{if(!t.value)return;const h=parseInt(p),f=l.value[h];f&&(m?(f.value=m,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function qw(){const{engine:n,project:e}=Jr(),t=T(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const Ww={class:"v-switcher-widget"},Kw={key:1},Yw=O({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Pe(),i=T(()=>r.project.value?.name),o=T(()=>r.project.value?.currentFile?.title),a=()=>{t("click",r.project.value)};return(s,u)=>(y(),R("div",Ww,[w(d(Ce),{size:"small",round:"",onClick:a},{default:S(()=>[w(d(gu),{class:"v-switcher-widget__back"}),I("span",null,ee(i.value),1),o.value?(y(),j(d(Ar),{key:0,direction:"vertical"})):M("",!0),o.value?(y(),R("span",Kw,ee(o.value),1)):M("",!0)]),_:1})]))}}),Gw={class:"v-toolbar-widget"},Zw=O({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:a}=Rc(),s=B("pc");return e({mode:s}),(u,l)=>(y(),R("div",Gw,[w(d(io),{size:"small",modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c)},{default:S(()=>[w(d(Bn),{label:"pc"},{default:S(()=>[w(d(ku))]),_:1}),w(d(Bn),{label:"mobile"},{default:S(()=>[w(d(ju))]),_:1}),w(d(Bn),{label:"pad"},{default:S(()=>[w(d($u))]),_:1})]),_:1},8,["modelValue"]),M("",!0),w(d(ud),null,{default:S(()=>[w(d(Ce),{type:"default",size:"small",onClick:d(i),disabled:d(a)||!!t.preview},{default:S(()=>[w(d(Cu))]),_:1},8,["onClick","disabled"]),w(d(Ce),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:S(()=>[w(d(Vu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),Xw={class:"v-actions-widget"},Qw=I("span",null,"发布",-1),e4=O({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=vt(),r=B(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Je("刷新完成","success")):Je("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await tu(1e3)),t.value?.setSelected(e.current.value)):Je("请先打开文件","warning")},a=()=>{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 Je("请先打开文件","warning")},s=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Je("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?s():c.publish())};return(l,c)=>(y(),R("div",Xw,[M("",!0),M("",!0),w(d(Ce),{onClick:a,type:r.value?"warning":"default",size:"small",title:"预览"},{default:S(()=>[w(d(xu))]),_:1},8,["type"]),w(d(Ce),{onClick:i,type:"default",size:"small",title:"刷新"},{default:S(()=>[w(d(Eu))]),_:1}),w(d(Ce),{type:"default",size:"small",title:"页面设置",onClick:o},{default:S(()=>[w(d(Tu))]),_:1}),w(d(Ar),{direction:"vertical"}),w(d(eo),{"split-button":"",type:"primary",size:"small",onClick:s,onCommand:u},{dropdown:S(()=>[w(d(Qi),null,{default:S(()=>[w(d(xr),{command:"current"},{default:S(()=>[de("发布页面")]),_:1}),w(d(xr),{command:"project"},{default:S(()=>[de("整站发布")]),_:1})]),_:1})]),default:S(()=>[Qw]),_:1})]))}}),t4={class:"v-icon-setter"},n4={class:"v-icon-setter__content"},r4={class:"v-icon-setter__list"},Pc=O({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=B(!1),o=B(t.modelValue),a=B(""),s=T(()=>Di[t.modelValue]||t.modelValue),u=T(()=>{const h=Object.entries(Di);return a.value?h.filter(f=>f[0].toLowerCase().includes(a.value)):h}),l=h=>{o.value=h},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},m=()=>{i.value=!0};return(h,f)=>(y(),R("div",t4,[w(d(tt),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(zs),onFocus:m},{prepend:S(()=>[w(d(rt),{icon:s.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(y(),j(d(Zt),{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:S(()=>[w(d(Ce),{size:"default",type:"warning",onClick:p},{default:S(()=>[de(" 清除绑定 ")]),_:1})]),default:S(()=>[I("div",n4,[w(d(tt),{size:t.size,"prefix-icon":d(Os),clearable:"",modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),I("div",r4,[(y(!0),R(ne,null,oe(u.value,v=>(y(),j(d(rt),{icon:v[1],onClick:g=>l(v[0]),class:ue({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(y(),j(d(Be),{key:0})):M("",!0)])])]),_:1},8,["modelValue"])):M("",!0)]))}}),i4=O({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Jr(),r=T(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=B(e.item||i()),a=[{label:"页面",value:!1},{label:"目录",value:!0}],s=l=>{o.value&&(o.value.name=jr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ae("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(y(),j(d(ft),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:S(()=>[w(d(te),{name:"dir",label:"类型",editor:"radio",options:a,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),w(d(te),{name:"name",label:"名称",required:"",onChange:s,rules:{pattern:d(St),message:"名称格式不正确"}},null,8,["rules"]),w(d(te),{name:"title",label:"标题",required:""}),w(d(te),{name:"icon",label:"菜单图标",editor:"none"},{editor:S(()=>[w(Pc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),w(d(te),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),w(d(te),{name:"hidden",label:"隐藏菜单",editor:"switch"}),w(d(te),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),xs=O({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=T(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(a,s)=>(y(),j(d(Cr),{effect:"dark",placement:"right",content:a.label,"show-after":600},{default:S(()=>[I("div",{class:ue(["v-apps-region__icon",i.value]),onClick:o},[(y(),j(Ke(a.icon)))],2)]),_:1},8,["content"]))}}),me=O({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},edit:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0},collapsable:{type:Boolean}},emits:["plus","back","remove","save","edit"],setup(n,{emit:e}){const t=n,r=e,i=B(!1),o=T(()=>({"is-collapsed":!!i.value})),a=()=>{r("plus")},s=()=>{r("edit")},u=()=>{r("back")},l=()=>{r("remove")},c=()=>{r("save")},p=T(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?$d:void 0,onClickBack:t.back?u:void 0,onClick:t.collapsable?()=>{i.value=!i.value}:void 0}:null),m=h=>{i.value=h};return(h,f)=>(y(),j(d(Ur),{class:ue(["v-panel",o.value]),border:!1,header:p.value,fit:""},Jt({actions:S(()=>[t.plus?(y(),j(d(De),{key:0,size:h.$attrs.size,mode:"icon",icon:d(Co),background:"hover",title:"新增",onClick:a},null,8,["size","icon"])):M("",!0),t.edit?(y(),j(d(De),{key:1,size:h.$attrs.size,mode:"icon",icon:d(Bs),background:"hover",title:"编辑",onClick:s},null,8,["size","icon"])):M("",!0),t.remove?(y(),j(d(De),{key:2,size:h.$attrs.size,mode:"icon",icon:d(Vd),background:"hover",title:"清除",onClick:l},null,8,["size","icon"])):M("",!0),t.save?(y(),j(d(De),{key:3,size:h.$attrs.size,mode:"icon",icon:d(Su),background:"hover",title:"保存",onClick:c},null,8,["size","icon"])):M("",!0),t.collapsable?Bt((y(),j(d(De),{key:4,size:h.$attrs.size,mode:"icon",icon:d(zs),background:"hover",title:"展开",onClick:f[0]||(f[0]=v=>m(!1))},null,8,["size","icon"])),[[cn,i.value]]):M("",!0),t.collapsable?Bt((y(),j(d(De),{key:5,size:h.$attrs.size,mode:"icon",icon:d(Ed),background:"hover",title:"收起",onClick:f[1]||(f[1]=v=>m(!0))},null,8,["size","icon"])),[[cn,!i.value]]):M("",!0),le(h.$slots,"actions")]),default:S(()=>[le(h.$slots,"default")]),_:2},[h.$slots.footer?{name:"footer",fn:S(()=>[le(h.$slots,"footer")]),key:"0"}:void 0]),1032,["class","header"]))}}),o4={class:"v-tabs__header"},a4={key:0,class:"v-tabs__actions"},qr=O({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove","action-click"],setup(n,{emit:e}){const t=n,r=e,i=B((t.modelValue||t.items[0]?.name)??"");ce(i,()=>{r("update:modelValue",i.value)}),ce(()=>t.modelValue,u=>{i.value=u});const o=u=>{r("command",u)},a=u=>{r("remove",u)},s=u=>{r("action-click",u)};return(u,l)=>(y(),j(d(Ur),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:S(()=>[I("div",o4,[w(d(kc),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.value=c),onTabRemove:a,onActionClick:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(y(),R("div",a4,[t.menus&&t.menus.length?(y(),j(d(De),{key:0,mode:"icon",size:"small",icon:d(so),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:S(({item:c})=>[I("span",null,[t.checkable?(y(),j(d(ko),{key:0,class:ue({"v-tabs__checked":!0,"is-checked":c.checked})},null,8,["class"])):M("",!0),de(" "+ee(c.label),1)])]),_:1},8,["icon","menus"])):M("",!0)])):M("",!0)])]),default:S(()=>[le(u.$slots,"default")]),_:3}))}}),s4={key:2,class:"v-item__index"},l4={class:"v-item__content"},u4={key:3,class:"v-item__subtitle"},Ie=O({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:Co},copy:{label:"复制",icon:jo},edit:{label:"编辑",icon:Eo},remove:{label:"删除",icon:qn},lock:{label:"锁定",icon:$o},unlock:{label:"解锁",icon:_u},invisible:{label:"隐藏",icon:Ao},visible:{label:"显示",icon:Ru},home:{label:"主页",icon:yu}},r=n,i=e,o=B(!!r.modelValue),a=T(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),s=T(()=>({"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 ao.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return ce(o,c=>{i("update:modelValue",c),i("switch",c)}),ce(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(y(),j(d(ae),{class:ue(["v-item",s.value]),justify:"space-between",align:"center",onClick:u},{default:S(()=>[w(d(ae),{class:"v-item__title",align:"center"},{default:S(()=>[le(c.$slots,"default",{},()=>[c.icon?(y(),j(d(rt),{key:0,icon:c.icon},null,8,["icon"])):M("",!0),r.tag?(y(),j(d(bd),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:S(()=>[de(ee(r.tag),1)]),_:1},8,["type"])):M("",!0),c.index!==void 0?(y(),R("span",s4," # "+ee(c.index),1)):M("",!0),I("span",l4,ee(c.title),1),c.subtitle?(y(),R("span",u4,ee(c.subtitle),1)):M("",!0)])]),_:3}),w(d(ae),{class:"v-item__actions",onClick:p[1]||(p[1]=an(()=>{},["stop"]))},{default:S(()=>[(y(!0),R(ne,null,oe(a.value,m=>(y(),j(d(De),{name:m.name,title:m.label,mode:"icon",size:"small",background:"none",type:"info",icon:m.icon,onClick:h=>l(m.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(y(),j(d(to),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=m=>o.value=m),class:"v-item__switch",size:"small"},null,8,["modelValue"])):M("",!0),le(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),c4=["draggable"],d4={class:"v-box__name"},p4={class:"v-box__label"},Ki=O({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 ao.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},a=T(()=>({"is-active":t.active,"is-draggable":t.draggable})),s=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(y(),R("div",{class:ue(["v-box",a.value]),draggable:l.draggable,onDragstart:s,onDragend:u},[w(d(ae),{direction:"column",justify:"center",align:"center"},{default:S(()=>[I("span",d4,ee(t.name),1),I("span",p4,ee(t.title),1)]),_:1}),t.editable?(y(),j(d(ae),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:S(()=>[w(d(rt),{icon:d(Eo),onClick:i},null,8,["icon"]),w(d(rt),{icon:d(qn),onClick:o},null,8,["icon"])]),_:1})):M("",!0)],42,c4))}}),h4={class:"v-context-viewer"},m4=O({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,m=ni(p);return m==="Object"||m==="Module"?Object.keys(p||{}).length===0:m==="Array"?p.length===0:!0},a=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((m,h)=>{const f=`[${h}]`;return{label:f,value:m,type:ni(m),path:`${p}${f}`}}):Object.entries(c).map(([m,h])=>({label:m,value:h,type:ni(h),path:`${p}.${m}`})).filter(m=>!m.label.startsWith("__")&&!i.includes(m.label)):[],s=(c,p)=>{if(c.level===0)p(a(t.context));else{const m=on(c.data.value);p(a(m,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(y(),R("div",h4,[c.context?(y(),j(d(oo),{key:0,lazy:"",load:s,"expand-on-click-node":!1,props:{isLeaf:o}},{default:S(({data:m})=>[w(Ie,{title:m.label,clickable:"",onClick:h=>l(m),background:"",actions:["copy"],onAction:h=>u(m),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):M("",!0)]))}}),Ho=O({__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}=Pw(t.block,t.context),{copy:a}=Dd({}),s=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=B("normal"),l=B(),c=async k=>{r("submit",k),t.submitMethod?await t.submitMethod(k)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},m=()=>{r("unbind")},h=()=>{p()},f=async()=>{l.value?.submit()},v=k=>{r("pick",k)},g=k=>{a(k),Tr.success({message:"已经复制到粘贴板"})};return(k,b)=>(y(),j(d(Zt),{"model-value":t.modelValue,class:"v-binder",title:k.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:S(()=>[w(d(ae),{fit:"",direction:"row",overflow:"hidden"},{default:S(()=>[w(d(ae),{width:"30%",height:"100%"},{default:S(()=>[w(qr,{class:"v-binder__tabs",items:s,modelValue:u.value,"onUpdate:modelValue":b[1]||(b[1]=_=>u.value=_)},{default:S(()=>[w(d(ae),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:S(()=>[Bt(I("div",null,[w(d(tt),{modelValue:d(o),"onUpdate:modelValue":b[0]||(b[0]=_=>hi(o)?o.value=_:null),size:"small",clearable:"","prefix-icon":d(Os),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(y(!0),R(ne,null,oe(d(i),_=>(y(),R("div",null,[w(d(Ar),{"border-style":"dotted"},{default:S(()=>[de(ee(_.title),1)]),_:2},1024),(y(!0),R(ne,null,oe(_.items,V=>(y(),j(Ie,{title:V,background:"",actions:["copy"],small:"",onClick:$=>v(V),onAction:$=>g(V)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?M("",!0):(y(),j(d(Be),{key:0}))],512),[[cn,u.value==="normal"]]),Bt(w(m4,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[cn,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),w(d(Ur),{grow:"",header:null,border:!1},{footer:S(()=>[w(d(ae),{justify:"space-between"},{default:S(()=>[w(d(ae),null,{default:S(()=>[k.unbindEnabled?(y(),j(d(Ce),{key:0,type:"warning",size:"default",onClick:m},{default:S(()=>[de(" 移除绑定 ")]),_:1})):M("",!0)]),_:1}),w(d(ae),null,{default:S(()=>[w(d(Ce),{type:"default",size:"default",onClick:h},{default:S(()=>[de(" 取消 ")]),_:1}),w(d(Ce),{type:"primary",size:"default",onClick:f},{default:S(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:S(()=>[w(d(Sc),{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:S(()=>[le(k.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),f4={class:"v-slots-picker__sn"},v4=O({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=B(),o=T(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),a=u=>{i.value=u},s=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Ae("请选择插槽")};return(u,l)=>(y(),j(d(Zt),ve({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:s},u.$attrs),{default:S(()=>[w(d(Sd),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),w(d(ae),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:S(()=>[(y(!0),R(ne,null,oe(t.slots,(c,p)=>(y(),j(d(ae),{class:ue(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:m=>a(c)},{default:S(()=>[I("span",f4,"#"+ee(p+1),1),de(" "+ee(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),Nc=O({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=T(()=>[`is-${e.mode}`]),r=T(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?ws:_s,{width:a,height:s}=o,u=a>0?(e.width||0)/a:1,l=s>0?(e.height||0)/s:1;return Math.min(u,l)}),i=T(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?ws:_s,{width:a,height:s}=o;return{width:`${a}px`,height:`${s}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,a)=>(y(),R("div",{class:ue(["v-viewport",t.value]),style:Tt(i.value)},[le(o.$slots,"default")],6))}}),g4=O({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Jr(),r=T(()=>e.value?.pages||[]),{current:i}=Pe(),o=B(!1),a=B(),s=B(),u=()=>{s.value=void 0,a.value=void 0,o.value=!0},l=async h=>{const{name:f,modelValue:v}=h,{data:g,node:k}=v;if(f==="add"&&(a.value=void 0,s.value=g.id,o.value=!0),f==="edit"&&(a.value=Jn(g),s.value=void 0,o.value=!0),f==="remove"){if(g.dir){const b=e.value?.getPage(g.id);if(b&&b.children?.length){Ae("请先删除子页面");return}}e.value?.removePage(g.id)}if(f==="copy"){const b=k.parent?.data.id;e.value?.clonePage(g,b)}f==="home"&&(e.value?.setHomepage(g.id),Je("设置主页成功","success"))},c=async h=>{h.raw&&Je("这是源码模式页面,不能低代码设计","warning"),h.dir||h.raw?t.project.value?.deactivate():t.project.value?.active(h)},p=(h,f,v)=>v==="inner"?!!f.data.dir:!0,m=()=>{e.value?.update({pages:mi(r)})};return(h,f)=>(y(),j(d(me),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:S(()=>[w(d(oo),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:m},{default:S(({data:v,node:g})=>[w(d(Ie),{class:"v-pages-widget__item",icon:d(Di)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:k=>c(v),active:d(i)?.id===v.id,tag:d(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?(y(),j(i4,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),item:a.value,"parent-id":s.value},null,8,["modelValue","item","parent-id"])):M("",!0)]),_:1}))}}),y4=O({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=Mc(),{blocks:t,engine:r}=zw(),i=B(void 0),{current:o}=Pe(),a=B(!1),s=T(()=>i.value?.id?"编辑":"新增"),u=T(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async b=>{const _=b,V=r.project.value;if(!V)return!1;if(b.id)if(!V.existBlockName(_.name,[_.id]))V.updateBlock(_);else return Ae(`名称【${_.name}】已经存在,请更换名称`),!1;else if(!V.existBlockName(_.name))V.createBlock(_);else return Ae(`名称【${_.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),a.value=!0},m=b=>{i.value=Jn(b),a.value=!0},h=b=>{r.project.value?.removeBlock(b.id)},f=b=>{i.value&&(i.value.name=jr(b))},v=async b=>{r.project.value?.active(b)},g=async b=>{const _={type:"Schema",id:b.id},V=await r.assets.getBlockMaterial(_),$=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;$&&V&&$.setDragging(V)},k=()=>{const b=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;b&&b.setDragging(null)};return(b,_)=>(y(),j(d(me),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:S(()=>[w(d(gi),{wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(d(t),V=>(y(),j(d(vi),{key:V.id,span:d(e)},{default:S(()=>[w(d(Ki),{name:V.name,title:V.title,active:d(o)?.id===V.id,editable:"",onEdit:$=>m(V),onRemove:$=>h(V),onClick:$=>v(V),draggable:d(o)?.id!==V.id,onDragstart:$=>g(V),onDragend:k},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?M("",!0):(y(),j(d(Be),{key:0})),w(d(ft),{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=V=>a.value=V),title:s.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:S(()=>[w(d(te),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(St)},onChange:f},null,8,["rules"]),w(d(te),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),b4={class:"v-components-widget__search"},w4={key:0,class:"v-components-widget__result"},_4={class:"v-components-widget__list"},x4=O({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=Mc(),{tabs:r,currentTab:i,currentGroup:o,model:a,searchKey:s,searchResult:u}=Dw(),l=p=>{const m=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;m&&m.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,m)=>(y(),j(d(me),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:S(()=>[I("div",b4,[w(d(tt),{modelValue:d(s),"onUpdate:modelValue":m[0]||(m[0]=h=>hi(s)?s.value=h:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:S(()=>[w(d(Fu))]),_:1},8,["modelValue"])]),d(s)?(y(),R("div",w4,[w(d(gi),{wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(d(u),h=>(y(),j(d(vi),{span:d(e),key:h.name},{default:S(()=>[w(d(Ki),{name:h.name,title:h.label||h.name,draggable:"",onDragstart:f=>l(h),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?M("",!0):(y(),j(d(Be),{key:0}))])):(y(),j(d(kc),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":m[2]||(m[2]=h=>hi(i)?i.value=h:null)},{default:S(()=>[I("div",_4,[d(o)?(y(),j(d(cd),{key:0,modelValue:d(a)[d(i)],"onUpdate:modelValue":m[1]||(m[1]=h=>d(a)[d(i)]=h)},{default:S(()=>[(y(!0),R(ne,null,oe(d(o).children,h=>(y(),j(d(dd),{key:h.name,name:h.name,title:`${h.label} (${h.count})`},{default:S(()=>[h.components?(y(),j(d(gi),{key:0,wrap:"wrap",gutter:5},{default:S(()=>[(y(!0),R(ne,null,oe(h.components,f=>(y(),j(d(vi),{span:d(e),key:f.name},{default:S(()=>[w(d(Ki),{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)):M("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):M("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),S4=O({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=vt(),{current:i}=Pe(),o=B([]),a=$=>{if(je($))return $.locked?["unlock"]:["lock"];const x=$.parent;return x&&(x.locked||x.invisible)?[]:i.value?.locked?[]:$.locked?["unlock"]:$.invisible?["visible"]:["lock","invisible","copy","remove"]},s=$=>{const x=[];return $.forEach(E=>{const D={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(D.children=s(E.children)),x.push(D)}),x},u=()=>{if(!i.value)return[];const{id:$,name:x,nodes:E}=i.value;return[{id:$,label:x,type:$,model:i.value,children:s(E)}]},l=async()=>{o.value=u(),r.value?.model&&(await bt(),t.value?.setSelected(r.value.model))},c=T(()=>r.value?.model.id),p=$=>{const x=$.data;if(je(x.model)||x.model.locked||x.model.name==="template")return!1;const E=e.assets.componentMap.get(x.model.name);return E?(t.value?.setDragging(E),!0):!1},m=async($,x,E)=>{const D=x.data,Z={prev:"top",next:"bottom",inner:"inner"}[E];let C=!1;if(je(D.model))C=E==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Z),t.value?.setDropping(C?A:null,"inner")}return C},h=$=>{const x=$?.model;!x||x.invisible||(t.value?.setSelected(x),t.value?.setHover(null))},f=async($,x,E)=>{const D=$.data,Z=x.data;if(je(Z.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Z.model,A={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Tr.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const F=await t.value?.getDropSlot(E==="inner"?C:C.parent);if(F!==null){const z=D.model;z.slot=F,i.value?.move(z,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=$=>{je($.model)?t.value?.setHover($.model):(t.value?.setHover($.model),$.model.invisible&&t.value?.setHover(null),$.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},k=$=>{const x=$.data;x.dragging=!0;const E=e.assets.componentMap.get(x.model.name);E&&t.value?.setDragging(E)},b=async $=>{const x=$.data;x.dragging=!1},_=($,x)=>{$&&(($.id===x.id||!je($)&&x.isChild($))&&t.value?.setSelected(null),t.value?.setHover(null))},V=$=>{const{name:x,modelValue:E}=$,D=r.value?.model;switch(x){case"lock":_(D,E),E.lock();break;case"unlock":_(D,E),E.unlock();break;case"invisible":_(D,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const Z=i.value?.cloneNode(E);Z&&t.value?.setSelected(Z);break;case"remove":_(D,E),i.value?.removeNode(E);break}};return ce(e.changed,l,{immediate:!0}),($,x)=>(y(),j(d(me),{class:"v-outline-widget",title:"大纲树"},{default:S(()=>[(y(),j(d(oo),{key:d(e).changed.value,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":m,"allow-drag":p,onCurrentChange:h,onNodeDrop:f,onNodeDragStart:k,onNodeDragEnd:b},{default:S(({data:E,node:D})=>[w(d(Ie),{class:ue(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging}]),active:!E.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?d($o):E.model.invisible?d(Ao):void 0,title:E.label,subtitle:E.type,actions:a(E.model),onAction:V,onMouseenter:Z=>v(E),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),k4=O({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=Rc(),i=T(()=>`(共 ${r.value} 条)`),o=s=>{s.name==="remove"&&e.value?.remove(s.modelValue.id)},a=async()=>{await _n("确定要清空历史记录吗?")&&e.value?.clear()};return(s,u)=>(y(),j(d(me),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:a},{default:S(()=>[d(r)===0?(y(),j(d(Be),{key:0,"image-size":50})):M("",!0),d(e)?(y(!0),R(ne,{key:1},oe(d(e).items,(l,c)=>(y(),j(d(Ie),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):M("",!0)]),_:1},8,["subtitle","remove"]))}}),Te=Gc({loader:()=>Jc(()=>import("./Editor-BKlikwSl-D5v39DEP.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:O({render(){return Oe("div","正在拼命加载...")}}),errorComponent:O({render(){return Oe("div","组件加载失败!")}})}),j4=O({name:"ApisWidget",__name:"index",setup(n){const e=B(!1),t=B(null),r=B(!1),i=T(()=>r.value?"编辑API":"新增API"),o=T(()=>a.value?.apis||[]),{project:a}=Jr(),s=()=>({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=s()},l=$w.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],m=(g,k,b)=>{Me({type:"JSExpression",value:k},window)?b():b(new Error("代码错误"))},h=g=>{g.name==="edit"&&f(g.modelValue),g.name==="remove"&&a.value?.removeApi(g.modelValue.name)},f=g=>{r.value=!0,t.value=Jn(g),e.value=!0},v=async g=>a.value?.existApiName(g.name,r.value?[g.id]:[])?(Ae(`API名称 [ ${g.name} ] 已存在`),!1):(a.value?.setApi(g),!0);return(g,k)=>(y(),j(d(me),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:S(()=>[(y(!0),R(ne,null,oe(o.value,b=>(y(),j(d(Ie),{key:b.id,small:"",title:b.name,subtitle:b.label,"model-value":b,tag:b.method?.toUpperCase(),"tag-type":c[b.method||"get"],background:"",actions:["edit","remove"],onClick:_=>f(b),onAction:h},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(y(),j(d(Be),{key:0,"image-size":50})):M("",!0),w(d(ft),{modelValue:e.value,"onUpdate:modelValue":k[1]||(k[1]=b=>e.value=b),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:S(()=>[w(d(ae),{gap:"",fit:""},{default:S(()=>[w(d(ae),{direction:"column",grow:"",width:"50%",shrink:""},{default:S(()=>[w(d(te),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),w(d(te),{name:"name",label:"接口名称",required:"",rules:{pattern:d(St),message:"名称格式不正确"}},null,8,["rules"]),w(d(te),{name:"label",label:"备注说明",required:""}),w(d(te),{name:"url",label:"接口URL",required:""})]),_:1}),w(d(ae),{direction:"column",grow:"",width:"50%",shrink:""},{default:S(()=>[t.value.method!=="jsonp"?(y(),j(d(me),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:S(()=>[w(d(ae),{justify:"space-around"},{default:S(()=>[w(d(te),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),w(d(te),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),w(d(te),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),w(d(te),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),w(d(te),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),w(d(te),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),w(d(te),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:m}},{editor:S(()=>[w(d(Te),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":k[0]||(k[0]=b=>t.value.settings.headers.value=b),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):M("",!0),t.value.method==="jsonp"?(y(),j(d(me),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:S(()=>[w(d(te),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),w(d(te),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),w(d(te),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),w(d(te),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):M("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),$4=O({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=Ic(),r=B(!1),i=B(!1),o=B({}),a=T(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),s=f=>f.required||f.official?[]:["edit","remove"],u=f=>f.official&&!f.required,l=async f=>(f.urls=f.urls.split(`
|
|
94
94
|
`),t.project.value?.setDeps(f),!0),c=f=>{t.project.value?.setDeps(f)},p=()=>{i.value=!1,r.value=!0,o.value=null},m=f=>{i.value=!0,o.value={...f,urls:f.urls.join(`
|
|
95
95
|
`)},r.value=!0},h=(f,v)=>{v.name==="edit"&&(o.value={...f,urls:f.urls.join(`
|
|
96
96
|
`)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(f)};return(f,v)=>(y(),j(d(me),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:p},{default:S(()=>[(y(!0),R(ne,null,oe(d(e),g=>(y(),j(d(Ie),{key:g.package,title:g.package,subtitle:g.version,actions:s(g),background:"",switch:u(g),modelValue:g.enabled,"onUpdate:modelValue":k=>g.enabled=k,onSwitch:k=>c(g),onClick:k=>m(g),onAction:k=>h(g,k)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),w(d(ft),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),width:"600px",height:"500px",title:a.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:S(()=>[w(d(te),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),w(d(te),{name:"version",label:"版本",required:""}),w(d(te),{name:"library",label:"导出名称",required:""}),w(d(te),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),w(d(te),{name:"assetsUrl",label:"物料URL"}),w(d(te),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),V4=O({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=T(()=>t.model.name),o=T(()=>!je(t.model)&&!t.model.locked),a=T(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),s=[{name:"prev",icon:zu,title:"向前移动"},{name:"next",icon:Bu,title:"向后移动"},{name:"copy",icon:jo,title:"复制"},{name:"remove",icon:qn,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await _n("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,p)=>(y(),R("div",{class:ue(["v-actions",[`is-${t.position}`]])},[w(d(De),{mode:"icon",size:"small",icon:d(Vo),label:i.value,menus:a.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),w(d(r6),{disabled:!o.value,mode:"icon",size:"small",items:s,background:"none",onClick:l},null,8,["disabled"])],2))}}),E4={key:1,class:"v-designer__placeholder"},C4=O({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=B(),r=B(),{width:i,height:o}=dn(t),{dependencies:a,engine:s,apis:u}=Ic(),{current:l,isEmpty:c}=Pe(),p=T(()=>s.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:m,hover:h,dropping:f,selected:v}=Iw(r,a,u),g=k=>{const b=k.type,_=k.model;if(l.value)switch(b){case"remove":l.value.removeNode(_),m.value?.setSelected(null);break;case"copy":const V=l.value.cloneNode(_);m.value?.setSelected(V);break;case"prev":l.value.movePrev(_),m.value?.setSelected(_);break;case"next":l.value.moveNext(_),m.value?.setSelected(_);break;case"hover":m.value?.setHover(_);break;case"selected":m.value?.setSelected(_);break}};return e({designer:m,mode:p}),(k,b)=>(y(),R("div",{ref_key:"container",ref:t,class:"v-designer"},[w(d(Nc),{mode:p.value,width:d(i),height:d(o)},{default:S(()=>[I("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),d(f)?(y(),R("div",{key:0,class:ue(["v-designer__dropping","is-inner"]),style:Tt(d(f).style)},null,4)):M("",!0),d(h)?(y(),R("div",{key:1,class:"v-designer__hover",style:Tt(d(h).style)},[I("span",{class:ue(`is-${d(h).position}`)},[de(ee(d(h).model.name)+": ",1),I("i",null,ee(d(h).model.id),1)],2)],4)):M("",!0),d(v)?(y(),R("div",{key:2,class:"v-designer__selected",style:Tt(d(v).style)},[w(V4,{position:d(v).position,model:d(v).model,path:d(v).path,onAction:g},null,8,["position","model","path"])],4)):M("",!0)]),_:1},8,["mode","width","height"]),d(l)?M("",!0):(y(),j(d(Be),{key:0,description:"请新建或打开文件"})),d(l)&&d(c)?(y(),R("div",E4," 您可以拖拽组件放置到这里 ")):M("",!0)],512))}}),Gn=O({__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=B(),r=B(),i=B(!1),o=B(e.createEmpty()),a=B(!1),s=T(()=>a.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{a.value=!1,o.value=e.createEmpty(),i.value=!0},l=(f,v)=>{switch(v.name){case"edit":p(f);break;case"remove":e.remove(f);break}},c=f=>{o.value.value=f},p=f=>{a.value=!0,o.value={...f},i.value=!0},m=async f=>e.submit(f,a.value),h=()=>{r.value?.itemRef.validate()};return(f,v)=>(y(),j(d(me),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:S(()=>[(y(!0),R(ne,null,oe(f.list,g=>(y(),j(d(Ie),{title:e.itemTitle(g),border:"",actions:["edit","remove"],onAction:k=>l(g,k),onClick:k=>p(g)},null,8,["title","onAction","onClick"]))),256)),f.list.length?M("",!0):(y(),j(d(Be),{key:0,"image-size":40})),w(d(Ho),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=g=>i.value=g),title:s.value,"submit-method":m,model:o.value,block:f.current,context:f.context,onPick:c},{default:S(()=>[le(f.$slots,"fields",wt(Ot({model:o.value,isEdit:a.value,nameLabel:f.nameLabel,valueLabel:f.valueLabel})),()=>[w(d(te),{name:"name",label:f.nameLabel,required:"",disabled:a.value},null,8,["label","disabled"]),w(d(te),{ref_key:"codeFieldRef",ref:r,name:"value",label:f.valueLabel,required:""},{editor:S(()=>[w(d(Te),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=g=>o.value.value=g),onBlur:h},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),A4=O({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=T(()=>Object.entries(e.current?.state||{}).map(([a,s])=>({name:a,value:mn(s)}))),r=()=>({name:"",value:""}),i=a=>e.current?.removeState(a.name),o=async(a,s)=>{const{name:u,value:l}=a;if(!s&&e.current?.state[u])return Ae(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Me(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(a,s)=>(y(),j(Gn,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),T4=O({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=T(()=>Object.entries(e.current?.computed||{}).map(([a,s])=>({name:a,value:mn(s)}))),r=()=>({name:"",value:"() => { }"}),i=a=>e.current?.removeFunction("computed",a.name),o=async(a,s)=>{const{name:u,value:l}=a;if(!s&&e.current?.computed[u])return Ae(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Me(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(a,s)=>(y(),j(Gn,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),B4=O({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=T(()=>Object.entries(e.current?.methods||{}).map(([a,s])=>({name:a,value:mn(s)}))),r=()=>({name:"",value:"() => { }"}),i=a=>e.current?.removeFunction("methods",a.name),o=async(a,s)=>{const{name:u,value:l}=a;if(!s&&e.current?.methods[u])return Ae(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Me(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(a,s)=>(y(),j(Gn,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),z4=O({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=T(()=>z6.map(s=>({label:s,value:s}))),r=T(()=>Object.entries(e.current?.lifeCycles||{}).map(([s,u])=>({name:s,value:mn(u)}))),i=()=>({name:"",value:"() => { }"}),o=s=>e.current?.removeFunction("lifeCycles",s.name),a=async(s,u)=>{const{name:l,value:c}=s;if(!u&&e.current?.lifeCycles[l])return Ae(`名称 ${l} 已存在,请更换!`),!1;const p={type:"JSFunction",value:c};return Me(p,e.context,!0)?(e.current?.setFunction("lifeCycles",l,p),!0):!1};return(s,u)=>(y(),j(Gn,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:a},{fields:S(({model:l,nameLabel:c,isEdit:p,valueLabel:m})=>[w(d(te),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:p},null,8,["label","options","disabled"]),w(d(te),{name:"value",label:m,required:""},{editor:S(()=>[w(d(Te),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":h=>l.value=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),O4=O({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=T(()=>(e.current?.watch||[]).map(s=>({...s,source:mn(s.source),handler:mn(s.handler)}))),r=()=>({source:"() => { }",deep:!1,immediate:!1,handler:"() => { }"}),i=s=>s.source,o=s=>e.current?.removeWatch(s),a=async(s,u)=>{const l={type:"JSFunction",value:s.source},c={type:"JSFunction",value:s.handler};if(!Me(l,e.context,!0)||!Me(c,e.context,!0))return!1;const p={...s,source:l,handler:c};return e.current?.setWatch(p),!0};return(s,u)=>(y(),j(Gn,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:a,itemTitle:i,grow:""},{fields:S(({model:l,nameLabel:c,valueLabel:p})=>[w(d(te),{name:"source",label:c,required:""},{editor:S(()=>[w(d(Te),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":m=>l.source=m},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),w(d(te),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":m=>l.deep=m,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),w(d(te),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":m=>l.immediate=m,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),w(d(te),{name:"handler",label:p,required:""},{editor:S(()=>[w(d(Te),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":m=>l.handler=m},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),D4=O({__name:"index",setup(n){const{current:e,context:t}=Pe();return(r,i)=>(y(),j(d(ae),{class:"v-scripts-widget",direction:"column",fit:""},{default:S(()=>[w(A4,{current:d(e),context:d(t)},null,8,["current","context"]),w(T4,{current:d(e),context:d(t)},null,8,["current","context"]),w(B4,{current:d(e),context:d(t)},null,8,["current","context"]),w(z4,{current:d(e),context:d(t)},null,8,["current","context"]),w(O4,{current:d(e),context:d(t)},null,8,["current","context"])]),_:1}))}}),pi=O({__name:"setters",props:{context:{},current:{},title:{},items:{},node:{},removable:{type:Boolean}},emits:["change","remove"],setup(n,{emit:e}){const t=n,r=e,i=(a,s)=>{r("change",a,s)},o=a=>{r("remove",a)};return(a,s)=>(y(),j(d(me),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:S(()=>[w(d(We),{class:"v-properties-widget__form",size:"small","label-width":"90px",onKeydown:s[0]||(s[0]=Tn(an(()=>{},["prevent","stop"]),["enter"]))},{default:S(()=>[(y(!0),R(ne,null,oe(t.items,u=>(y(),j(d(he),ve(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"]))}}),I4=O({name:"PropertiesWidget",__name:"index",setup(n){const{current:e,context:t}=Pe(),{selected:r}=vt(),{node:i,commonProps:o,change:a,componentProps:s,customProps:u,addCustom:l,removeCustom:c,isExist:p}=Nw(r),m=B(!1),h=B(),f=()=>{m.value=!0,h.value={name:""}},v=async k=>{const b=Object.keys(i.value?.props||{});return!p(k.name)&&!b.includes(k.name)?(l(k.name),!0):(Ae("已存在该属性名称"),!1)},g=async k=>{await _n("确定删除?")&&c(k)};return(k,b)=>d(e)?(y(),j(d(ae),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:S(()=>[d(i)?(y(),j(pi,{key:0,title:"通用属性",current:d(e),context:d(t),node:d(i),items:d(o),onChange:d(a)},null,8,["current","context","node","items","onChange"])):M("",!0),d(i)&&d(s).length?(y(),j(pi,{key:1,title:"组件属性",current:d(e),context:d(t),node:d(i),items:d(s),onChange:d(a)},null,8,["current","context","node","items","onChange"])):M("",!0),d(i)?(y(),j(pi,{key:2,title:"自定义属性",current:d(e),context:d(t),node:d(i),items:d(u),onChange:d(a),removable:"",plus:"",grow:"",onPlus:f,onRemove:g},null,8,["current","context","node","items","onChange"])):M("",!0),w(d(ft),{modelValue:m.value,"onUpdate:modelValue":b[0]||(b[0]=_=>m.value=_),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:h.value},{default:S(()=>[w(d(te),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:d(St)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):M("",!0)}}),M4=O({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=B(),r=qt({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,a)=>(y(),j(d(Ho),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:S(()=>[w(d(te),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:S(()=>[w(d(Te),{ref_key:"editorRef",ref:t,modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=s=>r.value=s),dark:"",height:"450px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),R4=O({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=B(),r=qt({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=Vw.map(a=>({label:a,value:a})),o=a=>{t.value.getEditor().setValue(a),r.handler.value=a};return(a,s)=>(y(),j(d(Ho),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:S(()=>[w(d(te),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:d(i)},null,8,["options"]),w(d(te),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:S(()=>[w(d(Te),{ref_key:"editorRef",ref:t,modelValue:r.handler.value,"onUpdate:modelValue":s[0]||(s[0]=u=>r.handler.value=u),dark:"",height:"350px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),P4=O({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=Pe(),{selected:r}=vt(),{mouseEventList:i,keyboardEventList:o,componentEventList:a}=Fw(r),s=B({name:"",event:void 0}),u=B(!1),l=f=>{s.value=Jn(f),u.value=!0},c=async f=>{const v={...f,modifiers:f.modifiers.reduce((g,k)=>(g[k]=!0,g),{})};return Me(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},p=async f=>{const v=r.value?.model;f.name&&(v.removeEvent(f.name),u.value=!1)},m=async()=>{s.value.name&&await _n("确定要删除该事件吗?")&&p(s.value)},h=f=>{const{name:v,modelValue:g}=f;v==="edit"&&l(g),v==="remove"&&p(g)};return(f,v)=>(y(),j(d(ae),{class:"v-events-widget",direction:"column",fit:""},{default:S(()=>[w(d(me),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:S(()=>[d(a).length?M("",!0):(y(),j(d(Be),{key:0,"image-size":50,description:"该组件无自带事件"})),(y(!0),R(ne,null,oe(d(a),g=>(y(),j(d(Ie),{key:`component_${g.name}`,title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:k=>l(g),onAction:h},null,8,["title","model-value","actions","active","onClick"]))),128))]),_:1}),w(d(me),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:S(()=>[(y(!0),R(ne,null,oe(d(i),g=>(y(),j(d(Ie),{key:`mouse_${g.name}`,title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:k=>l(g),onAction:h},null,8,["title","model-value","actions","active","onClick"]))),128))]),_:1}),w(d(me),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:S(()=>[(y(!0),R(ne,null,oe(d(o),g=>(y(),j(d(Ie),{key:`keyboard_${g.name}`,title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:k=>l(g),onAction:h},null,8,["title","model-value","actions","active","onClick"]))),128))]),_:1}),u.value?(y(),j(d(R4),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=g=>u.value=g),context:d(t),current:d(e),name:s.value.name,event:s.value.event,submitMethod:c,onUnbind:m},null,8,["modelValue","context","current","name","event"])):M("",!0)]),_:1}))}}),N4=O({name:"CssWidget",__name:"index",setup(n){const{current:e}=Pe(),t=B(),r=T(()=>e.value?.css||""),i=a=>{e.value?.setCss(a)},o=()=>{const a=(t.value?.getEditor()).getValue();i(a),Je("保存成功")};return(a,s)=>(y(),j(d(me),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:S(()=>[w(d(Te),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),F4=O({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=Pe(),{selected:r}=vt(),{vIf:i,vShow:o,vBind:a,vFor:s,vModels:u,onValueChange:l,onForChange:c,onModelChange:p}=Jw(r),m=h=>h.arg?typeof h.arg=="string"?h.arg:Dt(h.arg,{}):"modelValue";return(h,f)=>(y(),j(d(ae),{class:"v-directives-widget",direction:"column",fit:""},{default:S(()=>[w(d(me),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:S(()=>[w(d(We),{size:"small","label-width":"80px",onKeydown:f[0]||(f[0]=Tn(an(()=>{},["prevent","stop"]),["enter"]))},{default:S(()=>[w(d(he),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(i).value,onChange:d(l)},null,8,["current","context","value","onChange"]),w(d(he),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(o).value,onChange:d(l)},null,8,["current","context","value","onChange"]),w(d(he),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(a).value,onChange:d(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),w(d(me),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:S(()=>[w(d(We),{size:"small","label-width":"80px",onKeydown:f[1]||(f[1]=Tn(an(()=>{},["prevent","stop"]),["enter"]))},{default:S(()=>[w(d(he),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(s).value,onChange:d(c)},null,8,["current","context","value","onChange"]),w(d(he),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:d(e),context:d(t),value:d(s).iterator?.item,onChange:d(c)},null,8,["current","context","value","onChange"]),w(d(he),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:d(e),context:d(t),value:d(s).iterator?.index,onChange:d(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),w(d(me),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:S(()=>[(y(!0),R(ne,null,oe(d(u),(v,g)=>(y(),j(d(me),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${m(v)}`,body:{grow:!1},fit:!1},{default:S(()=>[w(d(We),{size:"small","label-width":"60px",onKeydown:f[2]||(f[2]=Tn(an(()=>{},["prevent","stop"]),["enter"]))},{default:S(()=>[w(d(he),{name:g.toString(),label:"绑定变量",setters:"ExpressionSetter",current:d(e),context:d(t),value:v.value,onChange:d(p)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),d(u).length?M("",!0):(y(),j(d(Be),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),H4=O({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=T(()=>e.item?"编辑定义属性":"新增定义属性"),r=B(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys($c).map(a=>({label:a,value:a})),o=async a=>{const s=a.default;return s&&!Me(s,e.context,!0)?!1:(e.current.setProp(a),!0)};return(a,s)=>(y(),j(d(ft),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:S(()=>[w(d(te),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(St)}},null,8,["disabled","rules"]),w(d(te),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:d(i),required:""},null,8,["options"]),w(d(te),{name:"required",label:"必须",editor:"switch"}),w(d(te),{name:"default.value",label:"默认值",editor:"none"},{default:S(()=>[w(d(Te),{modelValue:r.value.default.value,"onUpdate:modelValue":s[0]||(s[0]=u=>r.value.default.value=u),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),L4=O({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=T(()=>e.item?"编辑定义事件":"新增定义事件"),r=B({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,a)=>(y(),j(d(ft),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:S(()=>[w(d(te),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(St)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),U4=O({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=T(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=B({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,a)=>(y(),j(d(ft),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:S(()=>[w(d(te),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:d(St)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),J4=O({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=T(()=>e.item?"编辑注入":"新增注入"),r=B(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const a=o.default;return a&&!Me(a,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,a)=>(y(),j(d(ft),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:S(()=>[w(d(te),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(St)}},null,8,["disabled","rules"]),w(d(te),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),w(d(te),{name:"default.value",label:"默认值",editor:"none"},{default:S(()=>[w(d(Te),{modelValue:r.value.default.value,"onUpdate:modelValue":a[0]||(a[0]=s=>r.value.default.value=s),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),q4=O({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=Pe(),r=T(()=>(e.value?.props||[]).map(A=>typeof A=="string"?{name:A}:A)),i=T(()=>e.value?.emits||[]),o=T(()=>e.value?.slots||[]),a=T(()=>e.value?.inject||[]),s=B(!1),u=B(),l=B(!1),c=B(),p=B(!1),m=B(),h=B(!1),f=B(),v=()=>{u.value=void 0,s.value=!0},g=A=>{const{name:F,modelValue:z}=A;F==="edit"&&k(z),F==="remove"&&e.value?.removeProp(z)},k=A=>{u.value=A,s.value=!0},b=()=>{c.value=void 0,l.value=!0},_=A=>{c.value=A,l.value=!0},V=A=>{const{name:F,modelValue:z}=A;F==="edit"&&_(z),F==="remove"&&e.value?.removeEmit(z)},$=()=>{m.value=void 0,p.value=!0},x=A=>{m.value=A,p.value=!0},E=A=>{const{name:F,modelValue:z}=A;F==="edit"&&x(z),F==="remove"&&e.value?.removeSlot(z)},D=()=>{f.value=void 0,h.value=!0},Z=A=>{f.value=A,h.value=!0},C=A=>{const{name:F,modelValue:z}=A;F==="edit"&&Z(z),F==="remove"&&e.value?.removeInject(z)};return(A,F)=>d(e)&&d(t)?(y(),j(d(ae),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:S(()=>[w(d(me),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:S(()=>[(y(!0),R(ne,null,oe(r.value,z=>(y(),j(d(Ie),{"model-value":z,title:z.name,border:"",actions:["edit","remove"],onClick:G=>k(z),onAction:g},null,8,["model-value","title","onClick"]))),256)),r.value.length?M("",!0):(y(),j(d(Be),{key:0,"image-size":50})),s.value?(y(),j(H4,{key:1,current:d(e),context:d(t),modelValue:s.value,"onUpdate:modelValue":F[0]||(F[0]=z=>s.value=z),item:u.value},null,8,["current","context","modelValue","item"])):M("",!0)]),_:1}),w(d(me),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:b},{default:S(()=>[(y(!0),R(ne,null,oe(i.value,z=>(y(),j(d(Ie),{"model-value":z,title:z,border:"",actions:["remove"],onClick:G=>_(z),onAction:V},null,8,["model-value","title","onClick"]))),256)),i.value.length?M("",!0):(y(),j(d(Be),{key:0,"image-size":50})),l.value?(y(),j(L4,{key:1,modelValue:l.value,"onUpdate:modelValue":F[1]||(F[1]=z=>l.value=z),current:d(e),context:d(t),item:c.value},null,8,["modelValue","current","context","item"])):M("",!0)]),_:1}),w(d(me),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:$},{default:S(()=>[(y(!0),R(ne,null,oe(o.value,z=>(y(),j(d(Ie),{"model-value":z,title:z,border:"",actions:["remove"],onClick:G=>x(z),onAction:E},null,8,["model-value","title","onClick"]))),256)),o.value.length?M("",!0):(y(),j(d(Be),{key:0,"image-size":50})),p.value?(y(),j(U4,{key:1,modelValue:p.value,"onUpdate:modelValue":F[2]||(F[2]=z=>p.value=z),current:d(e),context:d(t),item:m.value},null,8,["modelValue","current","context","item"])):M("",!0)]),_:1}),w(d(me),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:D},{default:S(()=>[(y(!0),R(ne,null,oe(a.value,z=>(y(),j(d(Ie),{"model-value":z,title:z.name,border:"",actions:["remove"],onClick:G=>Z(z),onAction:C},null,8,["model-value","title","onClick"]))),256)),a.value.length?M("",!0):(y(),j(d(Be),{key:0,"image-size":50})),h.value?(y(),j(J4,{key:1,modelValue:h.value,"onUpdate:modelValue":F[3]||(F[3]=z=>h.value=z),current:d(e),context:d(t),item:f.value},null,8,["modelValue","current","context","item"])):M("",!0)]),_:1})]),_:1})):M("",!0)}}),W4=O({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=qw(),r=B(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {
|