ace-component-lib 0.0.130 → 0.0.131

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.
@@ -1,4 +1,4 @@
1
- (function(i,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("@wangeditor/editor"),require("vue"),require("element-plus"),require("vue-draggable-plus"),require("dayjs"),require("echarts/core"),require("@wangeditor/editor-for-vue"),require("jsoneditor")):typeof define=="function"&&define.amd?define(["@wangeditor/editor","vue","element-plus","vue-draggable-plus","dayjs","echarts/core","@wangeditor/editor-for-vue","jsoneditor"],n):(i=typeof globalThis<"u"?globalThis:i||self,i["ace-component-lib"]=n(i.editor,i.Vue,i.elementPlus,i.vueDraggablePlus,i.dayjs,i.core,i.editorForVue,i.JsonEditor))})(this,function(editor,vue,elementPlus,vueDraggablePlus,dayjs,core,editorForVue,JsonEditor){"use strict";var It=Object.defineProperty;var zt=(i,n,r)=>n in i?It(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r;var xt=(i,n,r)=>(zt(i,typeof n!="symbol"?n+"":n,r),r);const version="0.0.130",aceLib="";class e{constructor(n){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,n),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let n="";this.settings.url&&!this.settings.asyncUrl&&(n=this.settings.url);let r=this;if(this.settings.asyncUrl)return void r.settings.asyncUrl(function(a){let l=r.getPrintWindow(a);r.settings.preview?r.previewIfrmaeLoad():r.print(l)},r.settings.vue);let o=this.getPrintWindow(n);this.settings.url||this.write(o.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(o)}addEvent(n,r,o){n.addEventListener?n.addEventListener(r,o,!1):n.attachEvent?n.attachEvent("on"+r,o):n["on"+r]=o}previewIfrmaeLoad(){let n=document.getElementById("vue-pirnt-nb-previewBox");if(n){let r=this,o=n.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(o,"load",function(){r.previewBoxShow(),r.removeCanvasImg(),r.settings.previewOpenCallback()}),this.addEvent(n.querySelector(".previewBodyUtilPrintBtn"),"click",function(){r.settings.beforeOpenCallback(),r.settings.openCallback(),o.contentWindow.print(),r.settings.closeCallback()})}}removeCanvasImg(){let n=this;try{if(n.elsdom){let r=n.elsdom.querySelectorAll(".canvasImg");for(let o=0;o<r.length;o++)r[o].remove()}}catch(r){console.log(r)}}print(n){var r=this;let o=document.getElementById(this.settings.id)||n.f,a=document.getElementById(this.settings.id).contentWindow||n.f.contentWindow;r.settings.beforeOpenCallback(),r.addEvent(o,"load",function(){a.focus(),r.settings.openCallback(),a.print(),o.remove(),r.settings.closeCallback(),r.removeCanvasImg()})}write(n){n.open(),n.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),n.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let n="",r="",o="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,l=>{n+=l}),[].forEach.call(document.querySelectorAll("link"),function(l){l.href.indexOf(".css")>=0&&(r+=`<link type="text/css" rel="stylesheet" href="${l.href}" >`)});let a=document.styleSheets;if(a&&a.length>0)for(let l=0;l<a.length;l++)try{if(a[l].cssRules||a[l].rules){let s=a[l].cssRules||a[l].rules;for(let u=0;u<s.length;u++)o+=s[u].cssText}}catch(s){console.log(a[l].href+s)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,l=>{r+=`<link type="text/css" rel="stylesheet" href="${l}">`}),`<head><title>${this.settings.popTitle}</title>${n}${r}<style type="text/css">${o}</style></head>`}getBody(){let n=this.settings.ids;return n=n.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(n)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(n){let r=n.querySelectorAll("canvas");for(let o=0;o<r.length;o++)if(!r[o].style.display){let a=r[o].parentNode,l=r[o].toDataURL("image/png"),s=new Image;s.className="canvasImg",s.style.display="none",s.src=l,a.appendChild(s)}return n}getFormData(n){let r=n.cloneNode(!0),o=r.querySelectorAll("input,select,textarea"),a=r.querySelectorAll(".canvasImg,canvas"),l=-1;for(let s=0;s<a.length;s++){let u=a[s].parentNode,c=a[s];c.tagName.toLowerCase()==="canvas"?u.removeChild(c):c.style.display="block"}for(let s=0;s<o.length;s++){let u=o[s],c=u.getAttribute("type"),d=o[s];if(c||(c=u.tagName==="SELECT"?"select":u.tagName==="TEXTAREA"?"textarea":""),u.tagName==="INPUT")c==="radio"||c==="checkbox"?u.checked&&d.setAttribute("checked",u.checked):(d.value=u.value,d.setAttribute("value",u.value));else if(c==="select"){l++;for(let f=0;f<n.querySelectorAll("select").length;f++){let p=n.querySelectorAll("select")[f];if(!p.getAttribute("newbs")&&p.setAttribute("newbs",f),p.getAttribute("newbs")==l){let v=n.querySelectorAll("select")[l].selectedIndex;u.options[v].setAttribute("selected",!0)}}}else d.innerHTML=u.value,d.setAttribute("html",u.value)}return r}getPrintWindow(n){var r=this.Iframe(n);return{f:r,win:r.contentWindow||r,doc:r.doc}}previewBoxShow(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: hidden"),n.style.display="block")}previewBoxHide(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: visible;"),n.querySelector("iframe")&&n.querySelector("iframe").remove(),n.style.display="none")}previewBox(){let n=document.getElementById("vue-pirnt-nb-previewBox"),r="previewBody";if(n)return n.querySelector("iframe")&&n.querySelector("iframe").remove(),{close:n.querySelector(".previewClose"),previewBody:n.querySelector(".previewBody")};let o=document.createElement("div");o.setAttribute("id","vue-pirnt-nb-previewBox"),o.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),o.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,o.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let s=document.createElement("div"),u=document.createElement("div");s.setAttribute("class","closeBefore"),s.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),u.setAttribute("class","closeAfter"),u.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(s),l.appendChild(u),a.appendChild(l),this.previewBody=document.createElement("div");let c=this.previewBody;c.setAttribute("class",r),c.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),o.appendChild(c);let d=document.createElement("div");d.setAttribute("class","previewBodyUtil"),d.setAttribute("style","height: 32px;background: #474747;position: relative;"),c.appendChild(d),this.previewBodyUtilPrintBtn=document.createElement("div");let f=this.previewBodyUtilPrintBtn;return f.setAttribute("class","previewBodyUtilPrintBtn"),f.innerHTML=this.settings.previewPrintBtnLabel,f.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),d.appendChild(f),document.body.appendChild(o),{close:this.close,previewBody:this.previewBody}}iframeBox(n,r){let o=document.createElement("iframe");return o.style.border="0px",o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.right="0px",o.style.top="0px",o.setAttribute("id",n),o.setAttribute("src",r),o}Iframe(n){let r=this.settings.id;n=n||new Date().getTime();let o=this,a=this.iframeBox(r,n);try{if(this.settings.preview){a.setAttribute("style","border: 0px;flex: 1;");let l=this.previewBox(),s=l.previewBody,u=l.close;s.appendChild(a),this.addEvent(u,"click",function(){o.previewBoxHide()})}else document.body.appendChild(a);a.doc=null,a.doc=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document}catch(l){throw new Error(l+". iframes may not be supported in this browser.")}if(a.doc==null)throw new Error("Cannot find document.");return a}}var t={directiveName:"print",mounted(i,n,r){let o=n.instance,a="";var l,s,u;s="click",u=()=>{if(typeof n.value=="string")a=n.value;else{if(typeof n.value!="object"||!n.value.id)return void window.print();{a=n.value.id;let d=a.replace(new RegExp("#","g"),"");document.getElementById(d)||(console.log("id in Error"),a="")}}c()},(l=i).addEventListener?l.addEventListener(s,u,!1):l.attachEvent?l.attachEvent("on"+s,u):l["on"+s]=u;const c=()=>{new e({ids:a,vue:o,url:n.value.url,standard:"",extraHead:n.value.extraHead,extraCss:n.value.extraCss,zIndex:n.value.zIndex||20002,previewTitle:n.value.previewTitle||"打印预览",previewPrintBtnLabel:n.value.previewPrintBtnLabel||"打印",popTitle:n.value.popTitle,preview:n.value.preview||!1,asyncUrl:n.value.asyncUrl,previewBeforeOpenCallback(){n.value.previewBeforeOpenCallback&&n.value.previewBeforeOpenCallback(o)},previewOpenCallback(){n.value.previewOpenCallback&&n.value.previewOpenCallback(o)},openCallback(){n.value.openCallback&&n.value.openCallback(o)},closeCallback(){n.value.closeCallback&&n.value.closeCallback(o)},beforeOpenCallback(){n.value.beforeOpenCallback&&n.value.beforeOpenCallback(o)}})}},install:function(i){i.directive("print",t)}},FieldRenderType=(i=>(i.String="string",i.Integer="interget",i))(FieldRenderType||{}),DynamicTableType=(i=>(i.Default="default",i.DataForm="dataForm",i))(DynamicTableType||{}),ItableType=(i=>(i.Link="link",i))(ItableType||{}),FieldType=(i=>(i.Text="text",i.Select="select",i.Date="date",i.DateTime="datetime",i.CheckBox="checkbox",i.Switch="switch",i.Radio="radio",i.Textarea="textarea",i.Number="number",i.NumberRange="numberRange",i.Cascader="cascader",i.Daterange="daterange",i.Monthrange="monthrange",i.File="file",i.TreeSelect="treeSelect",i.Year="year",i.Month="month",i.Hr="hr",i.Slot="slot",i.Editor="editor",i.Password="password",i.Json="json",i.Markdown="markdown",i.Rate="rate",i.TimeRange="timerange",i.Time="time",i.DateTimeRange="datetimerange",i))(FieldType||{});let nanoid=(i=21)=>crypto.getRandomValues(new Uint8Array(i)).reduce((n,r)=>(r&=63,r<36?n+=r.toString(36):r<62?n+=(r-26).toString(36).toUpperCase():r>62?n+="-":n+="_",n),"");const theme=vue.ref(localStorage.getItem("design-theme")||""),stageWidth=vue.ref(1920),stageHeight=vue.ref(1080),scale$1=vue.ref(.2),targetsWidget=vue.ref([]),sketchRuleLine=vue.ref({h:[],v:[]}),widgetConfg=vue.ref({config:{backgroundColor:"transparent",backgroundImage:""},list:[]}),widgetHoverIds=vue.ref([]),pasteWidget=vue.ref([]),createLoading=vue.ref(!1),showRightPannel=vue.ref(!1),tempChartData=vue.ref({}),chartData=vue.ref({}),countMap=vue.ref({}),getScale=vue.computed(()=>vue.unref(scale$1)),getStage=vue.computed(()=>({stageWidth:vue.unref(stageWidth),stageHeight:vue.unref(stageHeight)})),getSketchRuleLine=vue.computed(()=>vue.unref(sketchRuleLine)),getTargetWidget=vue.computed(()=>vue.unref(targetsWidget)),getWidgetConfig=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.config}),getWidgetList=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.list}),getWidgetHoverIds=vue.computed(()=>vue.unref(widgetHoverIds)),getPasteWidget=vue.computed(()=>vue.unref(pasteWidget)),getCreateLoading=vue.computed(()=>vue.unref(createLoading)),getRightPannel=vue.computed(()=>vue.unref(showRightPannel)),getTheme=vue.computed(()=>vue.unref(theme)),getChartData=vue.computed(()=>vue.unref(chartData)),getCountMap=vue.computed(()=>vue.unref(countMap));function setSacle(i){scale$1.value=i/100}function setSketchRuleLine(i,n){vue.unref(sketchRuleLine).h=i,vue.unref(sketchRuleLine).v=n}function clearSketchRuleLine(){sketchRuleLine.value={h:[],v:[]}}function setTargetWidget(i){targetsWidget.value=i}function setWidgetList(i){vue.unref(widgetConfg).list=i}function setWidgetHoverIds(i){widgetHoverIds.value=i}function delWidgetItem(i){setWidgetList(vue.unref(getWidgetList).filter(n=>!i.includes(n.id))),setTargetWidget(vue.unref(getTargetWidget).filter(n=>!i.includes(n.id)))}function copyWidgetItem(i){pasteWidget.value=[],i.forEach(n=>{const r=vue.unref(getWidgetList).find(o=>o.id==n);r&&vue.unref(pasteWidget).push(r)})}function pasteWidgetItem(){vue.unref(pasteWidget).forEach(r=>{const o=JSON.parse(JSON.stringify(r));let a=o.x,l=o.y;o.x+40>vue.unref(stageWidth)-o.w?a=vue.unref(stageWidth)-o.w-40:a+=40,o.y+40>vue.unref(stageHeight)-o.h?l=vue.unref(stageHeight)-o.h-40:l+=40,vue.unref(widgetConfg).list.unshift({...o,id:nanoid(),x:a,y:l,z:vue.unref(widgetConfg).list.length+1,locked:!1})})}function sortWidgetList(){vue.unref(widgetConfg).list.sort((i,n)=>n.z-i.z)}function setCreateLoading(i){createLoading.value=i,i&&(targetsWidget.value=[],clearSketchRuleLine())}function setRightPannel(i){showRightPannel.value=i}function setStageWidth(i){i&&(stageWidth.value=i,vue.unref(widgetConfg).config.stageWidth=i)}function setStageHeight(i){i&&(stageHeight.value=i,vue.unref(widgetConfg).config.stageHeight=i)}function setTheme(){theme.value=vue.unref(theme)=="dark"?"":"dark",document.getElementsByTagName("html")[0].className=vue.unref(theme),localStorage.setItem("design-theme",vue.unref(theme))}function setChartData(i){chartData.value=i}function setCountMap(i,n){vue.unref(countMap)[i]=n}const useScreenDesign=()=>({theme,stageWidth,stageHeight,scale:scale$1,targetsWidget,sketchRuleLine,widgetConfg,widgetHoverIds,pasteWidget,createLoading,showRightPannel,tempChartData,chartData,countMap,getScale,getStage,getSketchRuleLine,getTargetWidget,getWidgetConfig,getWidgetList,getWidgetHoverIds,getPasteWidget,getCreateLoading,getRightPannel,getTheme,getChartData,getCountMap,setSacle,setSketchRuleLine,clearSketchRuleLine,setTargetWidget,setWidgetList,setWidgetHoverIds,delWidgetItem,copyWidgetItem,pasteWidgetItem,sortWidgetList,setCreateLoading,setRightPannel,setStageWidth,setStageHeight,setTheme,setChartData,setCountMap});/*!
1
+ (function(i,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("@wangeditor/editor"),require("vue"),require("element-plus"),require("vue-draggable-plus"),require("dayjs"),require("echarts/core"),require("@wangeditor/editor-for-vue"),require("jsoneditor")):typeof define=="function"&&define.amd?define(["@wangeditor/editor","vue","element-plus","vue-draggable-plus","dayjs","echarts/core","@wangeditor/editor-for-vue","jsoneditor"],n):(i=typeof globalThis<"u"?globalThis:i||self,i["ace-component-lib"]=n(i.editor,i.Vue,i.elementPlus,i.vueDraggablePlus,i.dayjs,i.core,i.editorForVue,i.JsonEditor))})(this,function(editor,vue,elementPlus,vueDraggablePlus,dayjs,core,editorForVue,JsonEditor){"use strict";var It=Object.defineProperty;var zt=(i,n,r)=>n in i?It(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r;var xt=(i,n,r)=>(zt(i,typeof n!="symbol"?n+"":n,r),r);const version="0.0.131",aceLib="";class e{constructor(n){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,n),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let n="";this.settings.url&&!this.settings.asyncUrl&&(n=this.settings.url);let r=this;if(this.settings.asyncUrl)return void r.settings.asyncUrl(function(a){let l=r.getPrintWindow(a);r.settings.preview?r.previewIfrmaeLoad():r.print(l)},r.settings.vue);let o=this.getPrintWindow(n);this.settings.url||this.write(o.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(o)}addEvent(n,r,o){n.addEventListener?n.addEventListener(r,o,!1):n.attachEvent?n.attachEvent("on"+r,o):n["on"+r]=o}previewIfrmaeLoad(){let n=document.getElementById("vue-pirnt-nb-previewBox");if(n){let r=this,o=n.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(o,"load",function(){r.previewBoxShow(),r.removeCanvasImg(),r.settings.previewOpenCallback()}),this.addEvent(n.querySelector(".previewBodyUtilPrintBtn"),"click",function(){r.settings.beforeOpenCallback(),r.settings.openCallback(),o.contentWindow.print(),r.settings.closeCallback()})}}removeCanvasImg(){let n=this;try{if(n.elsdom){let r=n.elsdom.querySelectorAll(".canvasImg");for(let o=0;o<r.length;o++)r[o].remove()}}catch(r){console.log(r)}}print(n){var r=this;let o=document.getElementById(this.settings.id)||n.f,a=document.getElementById(this.settings.id).contentWindow||n.f.contentWindow;r.settings.beforeOpenCallback(),r.addEvent(o,"load",function(){a.focus(),r.settings.openCallback(),a.print(),o.remove(),r.settings.closeCallback(),r.removeCanvasImg()})}write(n){n.open(),n.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),n.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let n="",r="",o="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,l=>{n+=l}),[].forEach.call(document.querySelectorAll("link"),function(l){l.href.indexOf(".css")>=0&&(r+=`<link type="text/css" rel="stylesheet" href="${l.href}" >`)});let a=document.styleSheets;if(a&&a.length>0)for(let l=0;l<a.length;l++)try{if(a[l].cssRules||a[l].rules){let s=a[l].cssRules||a[l].rules;for(let u=0;u<s.length;u++)o+=s[u].cssText}}catch(s){console.log(a[l].href+s)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,l=>{r+=`<link type="text/css" rel="stylesheet" href="${l}">`}),`<head><title>${this.settings.popTitle}</title>${n}${r}<style type="text/css">${o}</style></head>`}getBody(){let n=this.settings.ids;return n=n.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(n)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(n){let r=n.querySelectorAll("canvas");for(let o=0;o<r.length;o++)if(!r[o].style.display){let a=r[o].parentNode,l=r[o].toDataURL("image/png"),s=new Image;s.className="canvasImg",s.style.display="none",s.src=l,a.appendChild(s)}return n}getFormData(n){let r=n.cloneNode(!0),o=r.querySelectorAll("input,select,textarea"),a=r.querySelectorAll(".canvasImg,canvas"),l=-1;for(let s=0;s<a.length;s++){let u=a[s].parentNode,c=a[s];c.tagName.toLowerCase()==="canvas"?u.removeChild(c):c.style.display="block"}for(let s=0;s<o.length;s++){let u=o[s],c=u.getAttribute("type"),d=o[s];if(c||(c=u.tagName==="SELECT"?"select":u.tagName==="TEXTAREA"?"textarea":""),u.tagName==="INPUT")c==="radio"||c==="checkbox"?u.checked&&d.setAttribute("checked",u.checked):(d.value=u.value,d.setAttribute("value",u.value));else if(c==="select"){l++;for(let f=0;f<n.querySelectorAll("select").length;f++){let p=n.querySelectorAll("select")[f];if(!p.getAttribute("newbs")&&p.setAttribute("newbs",f),p.getAttribute("newbs")==l){let v=n.querySelectorAll("select")[l].selectedIndex;u.options[v].setAttribute("selected",!0)}}}else d.innerHTML=u.value,d.setAttribute("html",u.value)}return r}getPrintWindow(n){var r=this.Iframe(n);return{f:r,win:r.contentWindow||r,doc:r.doc}}previewBoxShow(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: hidden"),n.style.display="block")}previewBoxHide(){let n=document.getElementById("vue-pirnt-nb-previewBox");n&&(document.querySelector("html").setAttribute("style","overflow: visible;"),n.querySelector("iframe")&&n.querySelector("iframe").remove(),n.style.display="none")}previewBox(){let n=document.getElementById("vue-pirnt-nb-previewBox"),r="previewBody";if(n)return n.querySelector("iframe")&&n.querySelector("iframe").remove(),{close:n.querySelector(".previewClose"),previewBody:n.querySelector(".previewBody")};let o=document.createElement("div");o.setAttribute("id","vue-pirnt-nb-previewBox"),o.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),o.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,o.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let s=document.createElement("div"),u=document.createElement("div");s.setAttribute("class","closeBefore"),s.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),u.setAttribute("class","closeAfter"),u.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(s),l.appendChild(u),a.appendChild(l),this.previewBody=document.createElement("div");let c=this.previewBody;c.setAttribute("class",r),c.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),o.appendChild(c);let d=document.createElement("div");d.setAttribute("class","previewBodyUtil"),d.setAttribute("style","height: 32px;background: #474747;position: relative;"),c.appendChild(d),this.previewBodyUtilPrintBtn=document.createElement("div");let f=this.previewBodyUtilPrintBtn;return f.setAttribute("class","previewBodyUtilPrintBtn"),f.innerHTML=this.settings.previewPrintBtnLabel,f.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),d.appendChild(f),document.body.appendChild(o),{close:this.close,previewBody:this.previewBody}}iframeBox(n,r){let o=document.createElement("iframe");return o.style.border="0px",o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.right="0px",o.style.top="0px",o.setAttribute("id",n),o.setAttribute("src",r),o}Iframe(n){let r=this.settings.id;n=n||new Date().getTime();let o=this,a=this.iframeBox(r,n);try{if(this.settings.preview){a.setAttribute("style","border: 0px;flex: 1;");let l=this.previewBox(),s=l.previewBody,u=l.close;s.appendChild(a),this.addEvent(u,"click",function(){o.previewBoxHide()})}else document.body.appendChild(a);a.doc=null,a.doc=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document}catch(l){throw new Error(l+". iframes may not be supported in this browser.")}if(a.doc==null)throw new Error("Cannot find document.");return a}}var t={directiveName:"print",mounted(i,n,r){let o=n.instance,a="";var l,s,u;s="click",u=()=>{if(typeof n.value=="string")a=n.value;else{if(typeof n.value!="object"||!n.value.id)return void window.print();{a=n.value.id;let d=a.replace(new RegExp("#","g"),"");document.getElementById(d)||(console.log("id in Error"),a="")}}c()},(l=i).addEventListener?l.addEventListener(s,u,!1):l.attachEvent?l.attachEvent("on"+s,u):l["on"+s]=u;const c=()=>{new e({ids:a,vue:o,url:n.value.url,standard:"",extraHead:n.value.extraHead,extraCss:n.value.extraCss,zIndex:n.value.zIndex||20002,previewTitle:n.value.previewTitle||"打印预览",previewPrintBtnLabel:n.value.previewPrintBtnLabel||"打印",popTitle:n.value.popTitle,preview:n.value.preview||!1,asyncUrl:n.value.asyncUrl,previewBeforeOpenCallback(){n.value.previewBeforeOpenCallback&&n.value.previewBeforeOpenCallback(o)},previewOpenCallback(){n.value.previewOpenCallback&&n.value.previewOpenCallback(o)},openCallback(){n.value.openCallback&&n.value.openCallback(o)},closeCallback(){n.value.closeCallback&&n.value.closeCallback(o)},beforeOpenCallback(){n.value.beforeOpenCallback&&n.value.beforeOpenCallback(o)}})}},install:function(i){i.directive("print",t)}},FieldRenderType=(i=>(i.String="string",i.Integer="interget",i))(FieldRenderType||{}),DynamicTableType=(i=>(i.Default="default",i.DataForm="dataForm",i))(DynamicTableType||{}),ItableType=(i=>(i.Link="link",i))(ItableType||{}),FieldType=(i=>(i.Text="text",i.Select="select",i.Date="date",i.DateTime="datetime",i.CheckBox="checkbox",i.Switch="switch",i.Radio="radio",i.Textarea="textarea",i.Number="number",i.NumberRange="numberRange",i.Cascader="cascader",i.Daterange="daterange",i.Monthrange="monthrange",i.File="file",i.TreeSelect="treeSelect",i.Year="year",i.Month="month",i.Hr="hr",i.Slot="slot",i.Editor="editor",i.Password="password",i.Json="json",i.Markdown="markdown",i.Rate="rate",i.TimeRange="timerange",i.Time="time",i.DateTimeRange="datetimerange",i))(FieldType||{});let nanoid=(i=21)=>crypto.getRandomValues(new Uint8Array(i)).reduce((n,r)=>(r&=63,r<36?n+=r.toString(36):r<62?n+=(r-26).toString(36).toUpperCase():r>62?n+="-":n+="_",n),"");const theme=vue.ref(localStorage.getItem("design-theme")||""),stageWidth=vue.ref(1920),stageHeight=vue.ref(1080),scale$1=vue.ref(.2),targetsWidget=vue.ref([]),sketchRuleLine=vue.ref({h:[],v:[]}),widgetConfg=vue.ref({config:{backgroundColor:"transparent",backgroundImage:""},list:[]}),widgetHoverIds=vue.ref([]),pasteWidget=vue.ref([]),createLoading=vue.ref(!1),showRightPannel=vue.ref(!1),tempChartData=vue.ref({}),chartData=vue.ref({}),countMap=vue.ref({}),getScale=vue.computed(()=>vue.unref(scale$1)),getStage=vue.computed(()=>({stageWidth:vue.unref(stageWidth),stageHeight:vue.unref(stageHeight)})),getSketchRuleLine=vue.computed(()=>vue.unref(sketchRuleLine)),getTargetWidget=vue.computed(()=>vue.unref(targetsWidget)),getWidgetConfig=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.config}),getWidgetList=vue.computed(()=>{var i;return(i=vue.unref(widgetConfg))==null?void 0:i.list}),getWidgetHoverIds=vue.computed(()=>vue.unref(widgetHoverIds)),getPasteWidget=vue.computed(()=>vue.unref(pasteWidget)),getCreateLoading=vue.computed(()=>vue.unref(createLoading)),getRightPannel=vue.computed(()=>vue.unref(showRightPannel)),getTheme=vue.computed(()=>vue.unref(theme)),getChartData=vue.computed(()=>vue.unref(chartData)),getCountMap=vue.computed(()=>vue.unref(countMap));function setSacle(i){scale$1.value=i/100}function setSketchRuleLine(i,n){vue.unref(sketchRuleLine).h=i,vue.unref(sketchRuleLine).v=n}function clearSketchRuleLine(){sketchRuleLine.value={h:[],v:[]}}function setTargetWidget(i){targetsWidget.value=i}function setWidgetList(i){vue.unref(widgetConfg).list=i}function setWidgetHoverIds(i){widgetHoverIds.value=i}function delWidgetItem(i){setWidgetList(vue.unref(getWidgetList).filter(n=>!i.includes(n.id))),setTargetWidget(vue.unref(getTargetWidget).filter(n=>!i.includes(n.id)))}function copyWidgetItem(i){pasteWidget.value=[],i.forEach(n=>{const r=vue.unref(getWidgetList).find(o=>o.id==n);r&&vue.unref(pasteWidget).push(r)})}function pasteWidgetItem(){vue.unref(pasteWidget).forEach(r=>{const o=JSON.parse(JSON.stringify(r));let a=o.x,l=o.y;o.x+40>vue.unref(stageWidth)-o.w?a=vue.unref(stageWidth)-o.w-40:a+=40,o.y+40>vue.unref(stageHeight)-o.h?l=vue.unref(stageHeight)-o.h-40:l+=40,vue.unref(widgetConfg).list.unshift({...o,id:nanoid(),x:a,y:l,z:vue.unref(widgetConfg).list.length+1,locked:!1})})}function sortWidgetList(){vue.unref(widgetConfg).list.sort((i,n)=>n.z-i.z)}function setCreateLoading(i){createLoading.value=i,i&&(targetsWidget.value=[],clearSketchRuleLine())}function setRightPannel(i){showRightPannel.value=i}function setStageWidth(i){i&&(stageWidth.value=i,vue.unref(widgetConfg).config.stageWidth=i)}function setStageHeight(i){i&&(stageHeight.value=i,vue.unref(widgetConfg).config.stageHeight=i)}function setTheme(){theme.value=vue.unref(theme)=="dark"?"":"dark",document.getElementsByTagName("html")[0].className=vue.unref(theme),localStorage.setItem("design-theme",vue.unref(theme))}function setChartData(i){chartData.value=i}function setCountMap(i,n){vue.unref(countMap)[i]=n}const useScreenDesign=()=>({theme,stageWidth,stageHeight,scale:scale$1,targetsWidget,sketchRuleLine,widgetConfg,widgetHoverIds,pasteWidget,createLoading,showRightPannel,tempChartData,chartData,countMap,getScale,getStage,getSketchRuleLine,getTargetWidget,getWidgetConfig,getWidgetList,getWidgetHoverIds,getPasteWidget,getCreateLoading,getRightPannel,getTheme,getChartData,getCountMap,setSacle,setSketchRuleLine,clearSketchRuleLine,setTargetWidget,setWidgetList,setWidgetHoverIds,delWidgetItem,copyWidgetItem,pasteWidgetItem,sortWidgetList,setCreateLoading,setRightPannel,setStageWidth,setStageHeight,setTheme,setChartData,setCountMap});/*!
2
2
  * Compressor.js v1.2.1
3
3
  * https://fengyuanchen.github.io/compressorjs
4
4
  *
@@ -624,7 +624,7 @@ ${p} div ,${p} span,${p} a,${p} * {
624
624
  }`),m=vue.ref({});r({},s);const g=vue.ref(0),_=async()=>{var T;const B=await n.$baseHttp.post("/api/ace-data-center/file-extract-cache/count",{modelId:(T=l==null?void 0:l.model)==null?void 0:T.id,extractStatus:"00"});g.value=B.data};_();const y=vue.ref({}),b=()=>{var B;if(((B=l.model)==null?void 0:B.publishStatus)!=2){n.$message.warning("模型未发布无法抽取");return}n.$baseConfirm({content:"是否立即执行",callConfirm:async()=>{var O,I;C.value=[],w.value=[],p.value=null;const{params:T}=o(s),N=await n.$baseHttp.post("/api/ace-data-center/file-extract/extract",{title:l.model.modelName,modelId:l.model.id,fileUrl:vue.unref(y).link,fileName:vue.unref(y).originalName,extractType:T.extractType,hasPicture:T.hasPicture,projectId:n.$baseGetCurrentProjectId(),pluginScript:vue.unref(v)},{headers:{loading:!0}});if(N&&(p.value=N.data,(O=N.data)!=null&&O.isExtractSuccess?n.$message.success("抽取成功"):n.$message.warning("抽取失败"),!N.data.isValidateSuccess)){C.value=((I=N.data)==null?void 0:I.errorValidateData)??[];const L=await a(l.model.id);L.data&&L.data.unshift({label:"异常情况",prop:"异常情况",mapLabel:"异常情况"}),w.value=(L.data??[]).map(D=>({...D,prop:D.mapLabel}));return}}})},x=async()=>{var B;if(((B=l.model)==null?void 0:B.publishStatus)!=2){n.$message.warning("模型未发布无法抽取");return}n.$baseConfirm({content:"是否立即执行批量抽取",callConfirm:async()=>{const{params:T}=o(s);await n.$baseHttp.post("/api/ace-data-center/file-extract/batch-extract",{title:l.model.modelName,modelId:l.model.id,extractType:T.extractType,hasPicture:T.hasPicture,projectId:n.$baseGetCurrentProjectId(),pluginScript:vue.unref(v)},{headers:{loading:!0}})&&(n.$message.success("操作完成"),_())}})},C=vue.ref([]),w=vue.ref([]),E=async B=>{const T=new FormData;T.append("file",B.file);const N=await n.$baseHttp.post("/api/ace-api/blade-resource/oss/endpoint/put-file",T,{headers:{"Content-Type":"multipart/form-data",loading:!0}});N&&(y.value=N.data,n.$message.success("上传成功"))},$=async B=>{const T=new FormData;T.append("file",B.file);const N=await n.$baseHttp.post("/api/ace-api/blade-resource/oss/endpoint/put-file",T,{headers:{"Content-Type":"multipart/form-data",loading:!0}});!N||!await n.$baseHttp.post("/api/ace-data-center/file-extract-cache/submit",{modelId:l.model.id,fileUrl:N.data.link,fileName:N.data.originalName,extractStatus:"00",projectId:n.$baseGetCurrentProjectId()},{headers:{loading:!0}})||(n.$message.success("操作完成"),_())},S=async()=>{var T,N;let B;B=await n.$baseHttp.get("/api/ace-data-center/file-extract/getDebugData",{params:{fileUrl:(T=vue.unref(y))==null?void 0:T.link,modelId:(N=l.model)==null?void 0:N.id}}),B&&(B=await n.$baseHttp.post("/api/ace-data-center/plugin-script/pluginScriptDebug",{paramData:JSON.stringify(B.data[0]),pluginScript:vue.unref(v)}),B&&(m.value=JSON.parse(B.data||"{}"),n.$message.success("插件执行完成")))},V=async()=>{const B=await n.$baseHttp.get(`/api/ace-data-center/file-extract-template/detailByParams?modelId=${l.model.id}`);if(B){if(!B.data){n.$message.warning("暂无数据");return}n.$globalUtils.exportFile(B.data.modelTemplateFileUrl,B.data.modelTemplateFileName)}},k=()=>{vue.unref(d).init({businessId:l.model.id})},P=async()=>{vue.unref(f).init()};return(B,T)=>{var D,F;const N=vue.resolveComponent("aceHeader"),O=vue.resolveComponent("AppCodemirror"),I=vue.resolveComponent("AppForm"),L=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$w,[vue.createElementVNode("div",_hoisted_2$p,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"success",onClick:P},{default:vue.withCtx(()=>[_hoisted_3$n,vue.createTextVNode(" 模板上传 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"warning",class:"ml-3",onClick:V},{default:vue.withCtx(()=>[_hoisted_4$n,vue.createTextVNode(" 模板下载 ")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-3",onClick:k},{default:vue.withCtx(()=>[_hoisted_5$k,vue.createTextVNode(" 导入历史 ")]),_:1})])]),vue.createElementVNode("div",_hoisted_6$i,[vue.unref(p)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$g,[vue.createVNode(vue.unref(elementPlus.ElAlert),{title:"温馨提醒",type:vue.unref(p).isExtractSuccess?"success":"warning","show-icon":"",closable:!1},{default:vue.withCtx(()=>[vue.unref(p).isTitleCheckSuccess===!1?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[_hoisted_8$g,vue.createTextVNode(" 请检查Excel文件数据! ")],64)):vue.unref(p).isValidateSuccess?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[vue.createTextVNode(" 本批数据共有"+vue.toDisplayString(vue.unref(p).dataTotalNum)+"条,全部通过校验。 ",1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(" 本批数据共有"+vue.toDisplayString(vue.unref(p).dataTotalNum)+"条, 已校验"+vue.toDisplayString(vue.unref(p).validateSuccessNum+vue.unref(p).validateFailNum)+"条, "+vue.toDisplayString(vue.unref(p).validateFailNum)+"条 ",1),_hoisted_9$e,vue.createTextVNode(" 当前异常率约为"+vue.toDisplayString(Number(vue.unref(p).validateFailNum/(vue.unref(p).validateSuccessNum+vue.unref(p).validateFailNum)*100).toFixed(2))+"% ",1)],64))]),_:1},8,["type"])])):vue.createCommentVNode("",!0),vue.createVNode(I,{form:vue.unref(s)},{debug:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElPopover),{width:1e3,trigger:"hover"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[_hoisted_13$6,vue.createTextVNode(" 插件编写 ")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_10$d,[vue.createElementVNode("div",_hoisted_11$a,[vue.createVNode(N,{title:"插件编写",class:"mb-2"},{default:vue.withCtx(()=>{var M;return[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:S,disabled:(((M=vue.unref(y))==null?void 0:M.link)??"")==""},{default:vue.withCtx(()=>[vue.createTextVNode(" 执行插件 ")]),_:1},8,["disabled"])]}),_:1}),vue.createVNode(O,{modelValue:vue.unref(v),"onUpdate:modelValue":T[0]||(T[0]=M=>vue.isRef(v)?v.value=M:null)},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_12$8,[vue.createVNode(N,{title:"插件执行结果",class:"mb-2"}),vue.createVNode(vue.unref(JsonEditorVue),{style:{height:"300px"},modelValue:vue.unref(m),"onUpdate:modelValue":T[1]||(T[1]=M=>vue.isRef(m)?m.value=M:null)},null,8,["modelValue"])])])]),_:1})]),fileUrl:vue.withCtx(({element:M})=>[vue.createVNode(vue.unref(elementPlus.ElUpload),{style:{width:"300px"},drag:"","on-remove":()=>M.value="","on-success":()=>M.value="1",ref_key:"uploadRef",ref:u,"http-request":E,accept:"'.xls', '.xlsx'",multiple:!1},{default:vue.withCtx(()=>[_hoisted_14$5,_hoisted_15$2]),_:2},1032,["on-remove","on-success"]),vue.createElementVNode("div",_hoisted_16$2,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",disabled:M.value=="",onClick:b},{default:vue.withCtx(()=>[_hoisted_17$2,vue.createTextVNode(" 立即抽取 ")]),_:2},1032,["disabled"])])]),batchFileUrl:vue.withCtx(({element:M})=>[vue.createVNode(vue.unref(elementPlus.ElUpload),{style:{width:"300px"},drag:"","http-request":$,accept:"'.xls', '.xlsx'",multiple:"","show-file-list":!1},{default:vue.withCtx(()=>[_hoisted_18$2,_hoisted_19$2]),_:1}),vue.createElementVNode("div",_hoisted_20$2,[vue.createElementVNode("span",_hoisted_21$2,"批量待抽取数:"+vue.toDisplayString(vue.unref(g))+"个",1),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:T[2]||(T[2]=R=>vue.unref(c).init())},{default:vue.withCtx(()=>[vue.createTextVNode("查看详情")]),_:1})]),vue.createElementVNode("div",_hoisted_22$2,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",disabled:vue.unref(g)<=0,onClick:x},{default:vue.withCtx(()=>[_hoisted_23$2,vue.createTextVNode(" 批量抽取 ")]),_:1},8,["disabled"])])]),_:1},8,["form"]),vue.unref(w).length>0?(vue.openBlock(),vue.createBlock(L,{key:1,class:"mt-4",list:vue.unref(C),tableData:vue.unref(w),loading:!1},null,8,["list","tableData"])):vue.createCommentVNode("",!0),vue.createVNode(_sfc_main$G,{ref_key:"modelFileCacheListRef",ref:c,modelId:(D=l==null?void 0:l.model)==null?void 0:D.id,onSuccess:T[3]||(T[3]=M=>_())},null,8,["modelId"]),vue.createVNode(_sfc_main$F,{ref_key:"modelExtractLogRef",ref:d},null,512),vue.createVNode(_sfc_main$E,{ref_key:"modelExecelEditRef",ref:f,modelId:(F=l==null?void 0:l.model)==null?void 0:F.id},null,8,["modelId"])])],64)}}}),_hoisted_1$v={class:"flex"},_hoisted_2$o={class:"flex-1 overflow-hidden"},_hoisted_3$m=vue.createElementVNode("i",{class:"ml-2 cursor-pointer ri-lightbulb-line text-color-warning"},null,-1),_hoisted_4$m={class:"mt-2"},_hoisted_5$j={class:"flex-1 ml-5"},_hoisted_6$h={class:"mt-2"},_hoisted_7$f={class:"flex mt-3"},_hoisted_8$f={class:"flex-1 overflow-hidden"},_hoisted_9$d={class:"mt-2"},_hoisted_10$c={class:"flex-1 ml-5"},_hoisted_11$9={class:"mt-2"},_hoisted_12$7={class:"mt-2"},_sfc_main$B=vue.defineComponent({__name:"main",props:vue.mergeModels({modelAttributeList:{default:()=>[]}},{dataSourceId:{},dataSourceIdModifiers:{}}),emits:["update:dataSourceId"],setup(i,{expose:n}){const r=i,{proxy:o}=vue.getCurrentInstance(),{setFormValue:a,getFormValue:l}=o.$globalHooks.useForm(),s=vue.useModel(i,"dataSourceId"),u=[{sql:"select * from "}],c=vue.ref(""),d=vue.ref({}),f=vue.ref(),p=vue.ref({}),v=vue.ref(!1),m=vue.ref(!1),g=vue.ref([]),_=vue.ref(null),y=vue.computed(()=>b.find($=>$.fieldName=="extractType")),b=vue.reactive([{name:"方案名称",type:FieldType.Text,fieldName:"extractName",value:"",required:!0},{name:"数据流类型",type:FieldType.Radio,fieldName:"streamType",value:"",required:!0,options:[{label:"标准流",value:"STANDARD"},{label:"自定义流",value:"CUSTOM"}]},{name:"抽取方式",type:FieldType.Radio,fieldName:"extractType",value:"",required:!0,options:[{label:"全量抽取",value:"1"},{label:"增量抽取",value:"2"},{label:"协同抽取",value:"3"}],changeFunc:$=>{b.find(V=>V.fieldName=="incrementalField").hide=$.value!=2,b.find(V=>V.fieldName=="incrementalCondition").hide=$.value!=2,b.find(V=>V.fieldName=="incrementalConditionKey").hide=$.value!=2;const S=b.find(V=>V.fieldName=="clearBeforeExt");S.hide=$.value!=1,$.isChange&&$.value!=1&&(S.value="0")}},{name:"清空历史数据",type:FieldType.Radio,fieldName:"clearBeforeExt",value:"",required:!0,options:[{label:"是",value:"1"},{label:"否",value:"0"}],defVal:"0"},{name:"增量字段",type:FieldType.Slot,fieldName:"incrementalField",value:"",required:!0,tip:"该字段必须为本模型字段,并且是SQL结果集中存在的字段"},{name:"增量条件",type:FieldType.Slot,fieldName:"incrementalCondition",value:"",width:"60%"},{name:"增量值",type:FieldType.Text,fieldName:"incrementalConditionKey",width:"40%",value:""},{name:"taskDefinedId",type:FieldType.Text,fieldName:"taskDefinedId",hide:!0},{name:"id",type:FieldType.Text,fieldName:"id",hide:!0}]),x=vue.ref(null),C=$=>{vue.nextTick(()=>{s.value=($==null?void 0:$.dataSourceId)??"";const S=(($==null?void 0:$.incrementalCondition)??"").split("=");S.length&&$&&($.incrementalCondition=S[0]??"",$.incrementalConditionKey=(S[1]??"").replace(/^'|'$/g,"")),a($??{},b),$!=null&&$.taskDefined&&(m.value=!0),c.value=($==null?void 0:$.extractSql)??"",f.value=($==null?void 0:$.extractPluginScript)??`function plugin(item){
625
625
  var data=JSON.parse(item);
626
626
  return JSON.stringify(data)
627
- }`,vue.unref(_).init(($==null?void 0:$.taskDefined)??{}),x.value=($==null?void 0:$.taskDefined)??null}),o.$baseHttp.get("/api/ace-data-center/data-source/options?type=3").then(S=>{g.value=S.data})},w=()=>{if(!vue.unref(c)){o.$message.warning("请输入SQL");return}const{params:$,error:S}=l(b);if(!(S.length>0)){if(vue.unref(m)){const{params:V,error:k}=vue.unref(_).getForm();if(k.length>0)return;$.taskDefined={...vue.unref(x)??{},...V}}if($.incrementalCondition){let V=`'${$.incrementalConditionKey}'`;const k=r.modelAttributeList.find(P=>P.attributeCode==$.incrementalCondition);["int","bigint","double"].includes(k==null?void 0:k.dataType)&&(V=Number($.incrementalConditionKey)),$.incrementalCondition=`${$.incrementalCondition}=${V}`}return{...$,extractPluginScript:vue.unref(f),extractSql:vue.unref(c)}}},E=async $=>{v.value=!0;const S={dataSourceId:vue.unref(s),extractSql:vue.unref(c),projectId:o.$baseGetCurrentProjectId()};$==="javascript"&&(S.extractPluginScript=vue.unref(f)||"",S.streamType=b.find(k=>k.fieldName=="streamType").value);const V=await o.$baseHttp.post("/api/ace-data-center/db-extract/dbExtractDebug",S);v.value=!1,V&&($==="sql"?d.value=V.data:p.value=V.data,o.$message.success("执行成功"))};return n({extractSql:c,init:C,getValue:w}),($,S)=>{const V=vue.resolveComponent("aceHeader"),k=vue.resolveComponent("AppCodemirror"),P=vue.resolveComponent("AppForm"),B=vue.resolveComponent("AppTaskDesign");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$v,[vue.createElementVNode("div",_hoisted_2$o,[vue.createVNode(V,{title:"SQL数据抽取"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElPopover),{width:"600",placement:"bottom",trigger:"hover","popper-class":"ace-select"},{reference:vue.withCtx(()=>[_hoisted_3$m]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTable),{data:u},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"sql",label:"SQL示例"},{default:vue.withCtx(({row:T})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:T.sql,placement:"top"},{default:vue.withCtx(()=>[vue.createElementVNode("span",null,vue.toDisplayString(String(T.sql).substring(1,30))+"...",1)]),_:2},1032,["content"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{label:"操作",width:"120"},{default:vue.withCtx(({row:T})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:N=>c.value=T.sql},{default:vue.withCtx(()=>[vue.createTextVNode("复制到编辑框")]),_:2},1032,["onClick"])]),_:1})]),_:1})]),_:1}),vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),placeholder:"请选择数据源选项",clearable:!1,"popper-class":"ace-select",class:"w-40 ml-2",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(g),T=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:T.code,label:T.label,value:T.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(v),type:"warning",onClick:S[1]||(S[1]=T=>E("sql"))},{default:vue.withCtx(()=>[vue.createTextVNode("执行SQL")]),_:1},8,["disabled"])]),_:1}),vue.createElementVNode("div",_hoisted_4$m,[vue.createVNode(k,{extensions:"sql",modelValue:vue.unref(c),"onUpdate:modelValue":S[2]||(S[2]=T=>vue.isRef(c)?c.value=T:null),style:{height:"250px"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_5$j,[vue.createVNode(V,{title:"执行结果"}),vue.createElementVNode("div",_hoisted_6$h,[vue.createVNode(vue.unref(JsonEditorVue),{style:{height:"250px"},modelValue:vue.unref(d),"onUpdate:modelValue":S[3]||(S[3]=T=>vue.isRef(d)?d.value=T:null)},null,8,["modelValue"])])])]),vue.createElementVNode("div",_hoisted_7$f,[vue.createElementVNode("div",_hoisted_8$f,[vue.createVNode(V,{title:"插件编写"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(v),type:"warning",onClick:S[4]||(S[4]=T=>E("javascript"))},{default:vue.withCtx(()=>[vue.createTextVNode(" 执行插件 ")]),_:1},8,["disabled"])]),_:1}),vue.createElementVNode("div",_hoisted_9$d,[vue.createVNode(k,{modelValue:vue.unref(f),"onUpdate:modelValue":S[5]||(S[5]=T=>vue.isRef(f)?f.value=T:null),style:{height:"250px"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_10$c,[vue.createVNode(V,{title:"插件执行结果"}),vue.createElementVNode("div",_hoisted_11$9,[vue.createVNode(vue.unref(JsonEditorVue),{style:{height:"250px"},modelValue:vue.unref(p),"onUpdate:modelValue":S[6]||(S[6]=T=>vue.isRef(p)?p.value=T:null)},null,8,["modelValue"])])])]),vue.createVNode(V,{title:"抽取方案",class:"mt-4"}),vue.createVNode(P,{form:vue.unref(b)},{incrementalField:vue.withCtx(({element:T})=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:T.value,"onUpdate:modelValue":N=>T.value=N,placeholder:"请选择","popper-class":"ace-select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($.modelAttributeList,N=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:N.id,label:`${N.attributeCode}(${N.attributeComment||N.attributeCode})`,value:N.attributeCode},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),incrementalCondition:vue.withCtx(({element:T})=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:T.value,"onUpdate:modelValue":N=>T.value=N,placeholder:"请选择",clearable:"","popper-class":"ace-select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($.modelAttributeList,N=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:N.id,label:`${N.attributeCode}(${N.attributeComment||N.attributeCode})`,value:N.attributeCode},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["form"]),vue.withDirectives(vue.createElementVNode("div",_hoisted_12$7,[vue.createVNode(V,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(m),"onUpdate:modelValue":S[7]||(S[7]=T=>vue.isRef(m)?m.value=T:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(B,{ref_key:"taskDesignRef",ref:_},null,512)],512),[[vue.vShow,vue.unref(m)]])],512),[[vue.vShow,["1","2"].includes(vue.unref(y).value)]])],64)}}}),_withScopeId$d=i=>(vue.pushScopeId("data-v-2c23e1f2"),i=i(),vue.popScopeId(),i),_hoisted_1$u={class:"flex items-center mt-2"},_hoisted_2$n={class:"flex-1"},_hoisted_3$l={class:"mt-2 text-gray-400"},_hoisted_4$l=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型名称:",-1)),_hoisted_5$i=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型代码:",-1)),_hoisted_6$g=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型描述:",-1)),_sfc_main$A=vue.defineComponent({__name:"model-db-extract-design",props:{modelId:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{allModel:s,allModelAttribute:u,getDetail:c}=fetch$1(l).model,d=vue.ref(!1),f=vue.ref(null),p=vue.ref([]),v=vue.ref(""),m=vue.ref({}),g=vue.ref(""),_=($,S="")=>{m.value={},p.value=[],d.value=!0,[{label:"ODS源",value:"odsy"},{label:"DWD源",value:"dwdy"},{label:"DWD目标",value:"dwdmb"}].forEach(V=>{p.value.push({...V,attributeList:V.value=="dwdmb"?[]:{},options:[],selectValue:[],currentVal:"",checkAttributeList:[]})}),v.value=vue.unref(p)[0].value,s({modelLayer:"ODS"}).then(V=>{vue.unref(p).find(k=>k.value=="odsy").options=V.data}),s({modelLayer:"DWD"}).then(V=>{vue.unref(p).find(k=>k.value=="dwdy").options=V.data}),u({modelId:o.modelId}).then(V=>{vue.unref(p).find(k=>k.value=="dwdmb").attributeList=V.data}),c(o.modelId).then(V=>{m.value=V.data}),vue.nextTick(()=>{S?l.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${S}`).then(V=>{vue.unref(f).init($=="COPY"?{...V.data,id:null,extractType:null,incrementalField:null,status:null,taskDefined:null,taskDefinedId:null,createUser:null,createDept:null,createTime:null,updateUser:null,updateTime:null}:V.data)}):vue.unref(f).init()})},y=($,S="")=>S?$.options.find(V=>V.id==S):$.options.find(V=>V.id==$.currentVal),b=$=>{var S;if($.selectValue.length){const V=$.selectValue.at(-1);$.currentVal=(S=y($,V))==null?void 0:S.id,x($);return}$.currentVal=""},x=$=>{$.attributeList[$.currentVal]||u({modelId:$.currentVal}).then(S=>{$.attributeList[$.currentVal]=S.data})},C=$=>{v.value=$},w=$=>{var S;vue.unref(f).extractSql+=`select ${$.checkAttributeList.map(V=>V.attributeCode).toString()} from ${(S=y($))==null?void 0:S.modelCode}`},E=async()=>{const $={execExtract:0,dataSourceId:g.value,modelId:o.modelId,projectId:l.$baseGetCurrentProjectId()},S=vue.unref(f).getValue();!S||!await l.$baseHttp.post("/api/ace-data-center/db-extract/submitDbExtract",{...$,...S},{headers:{loading:!0}})||(l.$message.success("操作成功"),d.value=!1,a("success"))};return n({init:_}),($,S)=>{const V=vue.resolveComponent("aceHeader"),k=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(k,{modelValue:vue.unref(d),"onUpdate:modelValue":S[2]||(S[2]=P=>vue.isRef(d)?d.value=P:null),title:"数据抽取",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:E},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:S[1]||(S[1]=P=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden",style:{"margin-top":"0"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"flex flex-col pr-4 mr-5",style:{width:"320px",overflow:"hidden"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),P=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{onClick:B=>C(P.value),type:vue.unref(v)==P.value?"primary":"",key:P.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(P.label),1)]),_:2},1032,["onClick","type"]))),128))]),_:1}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),P=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:P.value},[P.value==vue.unref(v)&&["odsy","dwdy"].includes(P.value)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(V,{class:"mt-2",title:"模型选择"}),vue.createElementVNode("div",_hoisted_1$u,[vue.createElementVNode("div",_hoisted_2$n,[vue.createVNode(vue.unref(elementPlus.ElSelect),{"popper-class":"ace-select",modelValue:P.selectValue,"onUpdate:modelValue":B=>P.selectValue=B,onChange:()=>b(P),multiple:"","collapse-tags":"",clearable:"",filterable:"",placeholder:"请选择一个模型",class:"w-full"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(P.options,B=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:B.id,label:B.modelName,value:B.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),P.selectValue.length?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,placement:"right",width:"300",trigger:"hover"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElBadge),{value:P.selectValue.length,class:"ml-4"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),null,{default:vue.withCtx(()=>[vue.createTextVNode("模型")]),_:1})]),_:2},1032,["value"])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(P.selectValue,B=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:B,type:P.currentVal==B?"warning":"primary",onClick:T=>{P.currentVal=B,x(P)},style:{margin:"0 7px 7px 0",cursor:"pointer"}},{default:vue.withCtx(()=>{var T;return[vue.createTextVNode(vue.toDisplayString((T=y(P,B))==null?void 0:T.modelName),1)]}),_:2},1032,["type","onClick"]))),128))]),_:2},1024)):vue.createCommentVNode("",!0)]),P.currentVal?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTooltip),{key:0,effect:"dark",content:`${y(P).modelName}[${y(P).modelCode}]`,placement:"bottom"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$l,vue.toDisplayString(`${y(P).modelName}[${y(P).modelCode}]`),1)]),_:2},1032,["content"])):vue.createCommentVNode("",!0),vue.createVNode(V,{class:"mt-2 mb-2",title:"字段属性"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:P.checkAttributeList.length==0,type:"primary",onClick:B=>w(P)},{default:vue.withCtx(()=>[vue.createTextVNode(" 复制select语句到编辑框 ")]),_:2},1032,["disabled","onClick"])]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElTable),{data:P.attributeList[P.currentVal],height:"100%",onSelectionChange:B=>P.checkAttributeList=B},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{type:"selection",width:"55"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeCode",label:"字段名称"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeComment",label:"字段描述"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"dataType",label:"数据类型"})]),_:2},1032,["data","onSelectionChange"])],64)):vue.createCommentVNode("",!0),P.value==vue.unref(v)&&["dwdmb"].includes(P.value)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(V,{class:"mt-2",title:"DWD模型信息"}),vue.createElementVNode("section",null,[vue.createElementVNode("div",null,[_hoisted_4$l,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelName),1)]),vue.createElementVNode("div",null,[_hoisted_5$i,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelCode),1)]),vue.createElementVNode("div",null,[_hoisted_6$g,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelDesc),1)])]),vue.createVNode(vue.unref(elementPlus.ElTable),{data:P.attributeList,height:"100%"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"mapCode",label:"映射字段"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeComment",label:"名称"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{label:"来源"},{default:vue.withCtx(({row:B,$index:T})=>[vue.createTextVNode(vue.toDisplayString(B.sourceModelName)+"."+vue.toDisplayString(B.sourceColumnName),1)]),_:1})]),_:2},1032,["data"])],64)):vue.createCommentVNode("",!0)],64))),128))]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$B,{ref_key:"designMainRef",ref:f,modelAttributeList:vue.unref(p).at(-1).attributeList,dataSourceId:vue.unref(g),"onUpdate:dataSourceId":S[0]||(S[0]=P=>vue.isRef(g)?g.value=P:null)},null,8,["modelAttributeList","dataSourceId"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),modelDbExtractDesign_vue_vue_type_style_index_0_scoped_2c23e1f2_lang="",modelDbExtractDesign=_export_sfc$2(_sfc_main$A,[["__scopeId","data-v-2c23e1f2"]]),_sfc_main$z=vue.defineComponent({__name:"taskLog",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(!1),a=vue.ref(null),l=vue.ref(""),s=vue.reactive([]),u=vue.reactive([]),c=vue.reactive([{label:"调度参数",prop:"args"},{label:"调度结果",prop:"code"},{label:"调度日志",prop:"msg",slot:!0},{label:"调度开始时间",prop:"execBeginTime"},{label:"调度结束时间",prop:"execEndTime"}]),d=vue.reactive([]),f=_=>{_.data.forEach(y=>{})},p=(_,y,b)=>{},v=async _=>{},m=async _=>{r.value=!0,vue.nextTick(()=>{vue.unref(a).getData({url:`/api/ace-api/blade-system/task-log/list?taskId=${_}&descs=create_time`})})},g=_=>{o.value=!0,l.value=_.msg};return n({init:m}),(_,y)=>{const b=vue.resolveComponent("appList"),x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(r),"onUpdate:modelValue":y[1]||(y[1]=C=>vue.isRef(r)?r.value=C:null),title:"调度日志",size:1e3},{default:vue.withCtx(()=>[vue.createVNode(b,{ref_key:"appRef",ref:a,tableData:vue.unref(c),searchForm:vue.unref(s),searchBtns:vue.unref(u),formData:vue.unref(d),onFormSuccess:p,onSuccess:f,onBtnClick:v},{msg:vue.withCtx(({row:C})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:w=>g(C)},{default:vue.withCtx(()=>[vue.createTextVNode("查看调度日志")]),_:2},1032,["onClick"])]),_:1},8,["tableData","searchForm","searchBtns","formData"]),vue.createVNode(x,{modelValue:vue.unref(o),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(o)?o.value=C:null),title:"调度日志",size:"100%"},{default:vue.withCtx(()=>[vue.createElementVNode("pre",null,vue.toDisplayString(vue.unref(l)),1)]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}}),_sfc_main$y=vue.defineComponent({__name:"model-db-extract",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=`/api/ace-data-center/db-extract/list?modelId=${n.model.id}&projectId=${r.$baseGetCurrentProjectId()}`,c=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),d=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right"}]),f=v=>{v.data.forEach(m=>{m.htmlButton=[],m.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),m.htmlButton.push({name:"复制",key:"COPY",type:"primary",icon:"ri-file-copy-line"}),m.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),m.taskDefinedId&&m.htmlButton.push({name:"作业调度日志",key:"TASK-LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(m.extractType)&&m.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),m.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},p=v=>{const{type:m,row:g}=v;switch(m){case"ADD":case"COPY":case"EDIT":vue.unref(s).init(m,(g==null?void 0:g.id)??"");break;case"LOG":vue.unref(o).init({businessId:g.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK-LOG":vue.unref(a).init(g.taskDefinedId??"");break;case"PUSH":r.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${g.id}`,{},{headers:{loading:!0}})&&r.$message.success("操作成功")}});break;case"DEL":r.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${g.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(l).getData())}});break}};return(v,m)=>{const g=vue.resolveComponent("appList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:l,url:u,tableData:vue.unref(d),searchBtns:vue.unref(c),onSuccess:f,onBtnClick:p},{default:vue.withCtx(()=>{var _;return[vue.createVNode(_sfc_main$F,{ref_key:"modelExtractLogRef",ref:o},null,512),vue.createVNode(modelDbExtractDesign,{ref_key:"modelDbExtractDesignRef",ref:s,modelId:(_=n==null?void 0:n.model)==null?void 0:_.id,onSuccess:m[0]||(m[0]=y=>vue.unref(l).getData())},null,8,["modelId"]),vue.createVNode(_sfc_main$z,{ref_key:"taskLogRef",ref:a},null,512)]}),_:1},8,["tableData","searchBtns"])}}}),_hoisted_1$t={class:"flex max-h-96"},_hoisted_2$m={key:0,class:"p-2 mr-3 border border-gray-200 border-solid w-80"},_hoisted_3$k=vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1),_hoisted_4$k={key:0,class:"overflow-x-hidden overflow-y-auto max-h-60"},_hoisted_5$h={key:1},_hoisted_6$f={class:"flex flex-col flex-1 overflow-hidden border border-gray-200 border-solid"},_hoisted_7$e={class:"flex justify-between p-2"},_hoisted_8$e=vue.createElementVNode("i",{class:"mr-1 ri-add-line"},null,-1),_hoisted_9$c=vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1),_hoisted_10$b={class:"flex-1 h-full p-2 overflow-y-auto"},_sfc_main$x=vue.defineComponent({__name:"model-search-setting",props:{menu:{default:()=>[]},businessType:{default:"indicators"},businessId:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{getDetail:s}=fetch$1(l).model,{dynamicSearchForm:u,dynamicSearchFormat:c,dynamicSearchParams:d}=l.$aceDynamicSearch(l),f=vue.computed(()=>{let y="select * from yourTable temp where ";const b=[];return u.value.forEach(x=>{x.type=="stringSingle"?b.push(`temp.xxx like concat('%',#{query.${x.key}},'%')`):x.type=="numberSingle"||x.type=="select"?b.push(`temp.xxx = #{query.${x.key}}`):x.type=="numberRange"?(b.push(`temp.xxx>= #{query.${x.key}1}`),b.push(`temp.xxx<= #{query.${x.key}2}`)):x.type=="yySingle"?b.push(`toYear(temp.xxx)= #{query.${x.key}}`):x.type=="yyRange"?(b.push(`toYear(temp.xxx)>= #{query.${x.key}1}`),b.push(`toYear(temp.xxx)<#{query.${x.key}2}`)):x.type=="yymmSingle"?b.push(`formatDateTime(temp.xxx,'%Y-%m') = #{query.${x.key}}`):x.type=="yymmRange"?b.push(`formatDateTime(temp.xxx,'%Y-%m') BETWEEN #{query.${x.key}1} and #{query.${x.key}2}`):x.type=="yymmddSingle"?b.push(`formatDateTime(temp.xxx,'%Y-%m-%d') = #{query.${x.key}}`):x.type=="yymmddRange"&&b.push(`formatDateTime(temp.xxx,'%Y-%m-%d') BETWEEN #{query.${x.key}1} and #{query.${x.key}2}`)}),y+=b.join(" and ")}),p=vue.ref(o.menu.length?o.menu[0].value:""),v=vue.ref(!1),m=vue.ref(!1);vue.watch(v,async y=>{var C;if(!y)return;if(!o.businessId){m.value=!1,u.value=[];return}let b;switch(m.value=!0,u.value=[],o.businessType){case"model":b=await l.$baseHttp.post(`/api/ace-data-center/model/getFormJsonConfig/${o.businessId}`);break;case"dataform":b=await l.$baseHttp.get(`/api/ace-data-center/dataform/detail?id=${o.businessId}`);break;case"rule":b=await l.$baseHttp.get(`/api/ace-data-center/rule/detail?id=${o.businessId}`);break;case"indicators":b=await l.$baseHttp.get(`/api/ace-data-center/indicators/detail?id=${o.businessId}`);break}const x=JSON.parse(((C=b==null?void 0:b.data)==null?void 0:C.formConfJson)??"[]");["model"].includes(o.businessType)?s(o.businessId).then(w=>{u.value=w.data.listModelAttribute.map(E=>({name:E.attributeComment,key:E.attributeCode,dataType:E.dataType,hide:E.hide,checked:!1,type:"",value:"",minValue:"",maxValue:"",defaultRule:"",dictId:"",options:""})),x.forEach(E=>{const $=vue.unref(u).find(S=>S.key==E.key);$&&(Object.keys($).forEach(S=>{$[S]=E[S]}),$.checked=!0),["varchar","text"].includes(E.dataType)&&!$&&(E.type="stringSingle")}),m.value=!1}):(u.value=x,m.value=!1)});const g=async()=>{let y=!1,b=JSON.parse(JSON.stringify(vue.unref(u)));if(["model"].includes(o.businessType)&&(b=b.filter(E=>E.checked)),b.forEach(E=>{delete E.options,(E.key==""||E.name==""||E.type=="")&&(y=!0)}),y){l.$message.warning("存在字段未填写请核对");return}const x=d(vue.unref(u));if(!o.businessId){a("success",x),v.value=!1;return}let C="";switch(o.businessType){case"model":C="/api/ace-data-center/model/updateFormConfJson";break;case"dataform":C="/api/ace-data-center/dataform/submit";break;case"rule":C="/api/ace-data-center/rule/submit";break;case"indicators":C="/api/ace-data-center/indicators/updateFormConfJson";break}await l.$baseHttp.post(C,{id:o.businessId,formConfJson:JSON.stringify(b),paramsRemark:JSON.stringify(x),projectId:l.$baseGetCurrentProjectId()},{headers:{loading:!0}})&&(l.$message.success("操作成功"),a("success",x),v.value=!1)},_=()=>{const y=vue.unref(u).length;u.value.push({key:"temp"+y,name:"字段"+y,type:"stringSingle",value:""})};return n({visible:v,dynamicSearchForm:u}),(y,b)=>{const x=vue.resolveComponent("aceDynamicSearchEdit"),C=vue.resolveComponent("AppCodemirror");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{placement:"bottom",visible:vue.unref(v),"onUpdate:visible":b[2]||(b[2]=w=>vue.isRef(v)?v.value=w:null),trigger:"click","popper-class":"ace-select",width:y.menu.length?"1400px":"1200px"},{reference:vue.withCtx(()=>[vue.renderSlot(y.$slots,"reference")]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$t,[y.menu.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$m,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(y.menu,w=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(p)==w.value?"primary":"",key:w.value,onClick:E=>p.value=w.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(w.label),1)]),_:2},1032,["type","onClick"]))),128))]),_:1}),_hoisted_3$k,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(y.menu,w=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:w.value},[w.value==vue.unref(p)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.renderSlot(y.$slots,w.value),w.value=="tool"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$k,[vue.createVNode(x,{form:vue.unref(u).filter(E=>E.checked||E.checked==null),isEdit:!1},null,8,["form"])])):vue.createCommentVNode("",!0),w.value=="json"?(vue.openBlock(),vue.createElementBlock("pre",_hoisted_5$h,vue.toDisplayString(vue.unref(d)(vue.unref(u))),1)):vue.createCommentVNode("",!0),w.value=="sql"?(vue.openBlock(),vue.createBlock(C,{key:2,extensions:"sql",disabled:"",modelValue:vue.unref(f),"onUpdate:modelValue":b[0]||(b[0]=E=>vue.isRef(f)?f.value=E:null),style:{height:"250px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)],64))),128))])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_6$f,[vue.createElementVNode("div",_hoisted_7$e,[vue.createElementVNode("div",null,[["model"].includes(o.businessType)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",onClick:_},{default:vue.withCtx(()=>[_hoisted_8$e,vue.createTextVNode(" 新增参数 ")]),_:1}))]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",size:"small",onClick:b[1]||(b[1]=w=>v.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode(" 关闭 ")]),_:1})])]),_hoisted_9$c,vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(m),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_10$b,[vue.createVNode(x,{form:vue.unref(u),businessType:o.businessType},null,8,["form","businessType"])])]),_:1},8,["loading"])])])]),_:3},8,["visible","width"])}}}),_withScopeId$c=i=>(vue.pushScopeId("data-v-2c08e35e"),i=i(),vue.popScopeId(),i),_hoisted_1$s={class:"flex justify-end"},_hoisted_2$l=_withScopeId$c(()=>vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1)),_hoisted_3$j={class:"overflow-y-auto max-h-96"},_hoisted_4$j=_withScopeId$c(()=>vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",null,"字段名称"),vue.createElementVNode("td",null,"字段描述"),vue.createElementVNode("td",null,"数据类型"),vue.createElementVNode("td",{style:{width:"120px"}},"标题栏名称"),vue.createElementVNode("td",{style:{width:"120px"}},"注解"),vue.createElementVNode("td",{style:{width:"120px"}},"列的宽度"),vue.createElementVNode("td",{style:{width:"100px"}},"排序"),vue.createElementVNode("td",{style:{width:"60px"}},"固定"),vue.createElementVNode("td",{style:{width:"60px"}},"列显示"),vue.createElementVNode("td",{style:{width:"120px"}},"类型"),vue.createElementVNode("td",{style:{width:"120px"}},"额外参数"),vue.createElementVNode("td",{style:{width:"30px"}})])],-1)),_hoisted_5$g={class:"sort-target"},_hoisted_6$e={class:"flex items-center justify-center gap-1"},_hoisted_7$d=_withScopeId$c(()=>vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-move ri-mouse-line sortable-handle text-color-warning"})],-1)),_hoisted_8$d=_withScopeId$c(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-cloud-line"},null,-1)),_sfc_main$w=vue.defineComponent({__name:"dynamicTableCol",props:{model:{default:{}},title:{default:"标题栏配置"}},emits:["success"],setup(i,{emit:n}){const{proxy:r}=vue.getCurrentInstance(),{getDetail:o}=fetch$1(r).model,a=i,l=vue.ref([]),s=vue.ref([]),u=vue.ref(!1),c=vue.ref(!1),d=[{label:"文本",value:"txt"},{label:"字典",value:"dict"},{label:"地图",value:"map"},{label:"图片",value:"img"}],f=n,p=async()=>{c.value=!0,l.value=[];const g=await o(a.model.id);c.value=!1,r.$baseHttp.get(`/api/ace-data-center/custom-dic/options?projectId=${r.$baseGetCurrentProjectId()}`).then(b=>{s.value=b.data});const _=g.data.listModelAttribute,y=JSON.parse(g.data.columnOption||"[]");_.forEach(b=>{const x=y.find(C=>C.prop==b.attributeCode);x?b.columnOption=x:b.columnOption={prop:b.attributeCode,label:b.attributeComment,labelWidth:"",fixed:!1,isShow:!["id","project_id","create_time","create_user","create_dept","_project_id","tag","_create_time","_create_user","_create_dept","_tag","_data_from"].includes(b.attributeCode),sort:"",type:"txt",ext:{}}}),_.sort((b,x)=>b.columnOption.sort-x.columnOption.sort),l.value=_},v=g=>{const _=g.isSortable;l.value.forEach(y=>{y.columnOption.prop!=g.prop&&_&&(y.columnOption.isSortable=!1)})},m=async()=>{const g=[],_=[];if(vue.unref(l).forEach((b,x)=>{const C=b.columnOption;C.sort=x+1,C.type=="dict"?C.ext.dictId||_.push(`${b.attributeComment}字典值为空`):C.ext={},g.push(C)}),_.length>0){r.$message.error(_[0]);return}await r.$baseHttp.post("/api/ace-data-center/model/saveColumnOption",{id:a.model.id,columnOption:JSON.stringify(g)})&&(r.$message.success("操作成功"),u.value=!1,f("success"))};return(g,_)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{"popper-class":"ace-select",placement:"bottom",visible:vue.unref(u),"onUpdate:visible":_[3]||(_[3]=y=>vue.isRef(u)?u.value=y:null),trigger:"click",width:"1200px"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"warning",class:"ml-3",onClick:_[2]||(_[2]=y=>p())},{default:vue.withCtx(()=>[_hoisted_8$d,vue.createTextVNode(" "+vue.toDisplayString(g.title),1)]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$s,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:m},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",size:"small",onClick:_[0]||(_[0]=y=>u.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("关闭")]),_:1})]),_hoisted_2$l,vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(c),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$j,[vue.createVNode(vue.unref(vueDraggablePlus.VueDraggable),{modelValue:vue.unref(l),"onUpdate:modelValue":_[1]||(_[1]=y=>vue.isRef(l)?l.value=y:null),target:".sort-target",animation:150,handle:".sortable-handle"},{default:vue.withCtx(()=>[vue.createElementVNode("table",null,[_hoisted_4$j,vue.createElementVNode("tbody",_hoisted_5$g,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),y=>(vue.openBlock(),vue.createElementBlock("tr",{key:y.id},[vue.createElementVNode("td",null,vue.toDisplayString(y.attributeCode),1),vue.createElementVNode("td",null,vue.toDisplayString(y.attributeComment),1),vue.createElementVNode("td",null,vue.toDisplayString(y.dataType),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.label,"onUpdate:modelValue":b=>y.columnOption.label=b,placeholder:"名称"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.note,"onUpdate:modelValue":b=>y.columnOption.note=b,placeholder:"注解"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.labelWidth,"onUpdate:modelValue":b=>y.columnOption.labelWidth=b,placeholder:"列的宽度"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createElementVNode("div",_hoisted_6$e,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.isSortable,"onUpdate:modelValue":b=>y.columnOption.isSortable=b,onChange:b=>v(y.columnOption)},null,8,["modelValue","onUpdate:modelValue","onChange"]),y.columnOption.isSortable?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadioGroup),{key:0,modelValue:y.columnOption.sortable,"onUpdate:modelValue":b=>y.columnOption.sortable=b,size:"small"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadioButton),{label:"升",value:"ascending"}),vue.createVNode(vue.unref(elementPlus.ElRadioButton),{label:"降",value:"descending"})]),_:2},1032,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.fixed,"onUpdate:modelValue":b=>y.columnOption.fixed=b},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.isShow,"onUpdate:modelValue":b=>y.columnOption.isShow=b},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{teleported:!1,size:"small",class:"w-full",modelValue:y.columnOption.type,"onUpdate:modelValue":b=>y.columnOption.type=b,placeholder:"请选择"},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,b=>vue.createVNode(vue.unref(elementPlus.ElOption),{key:b.value,label:b.label,value:b.value},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[["dict"].includes(y.columnOption.type)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,teleported:!1,size:"small",modelValue:y.columnOption.ext.dictId,"onUpdate:modelValue":b=>y.columnOption.ext.dictId=b,placeholder:"字典值"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),b=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{label:b.label,value:b.code,key:b.code},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)]),_hoisted_7$d]))),128))])])]),_:1},8,["modelValue"])])]),_:1},8,["loading"])]),_:1},8,["visible"]))}}),dynamicTableCol_vue_vue_type_style_index_0_scoped_2c08e35e_lang="",dynamicTableCol=_export_sfc$2(_sfc_main$w,[["__scopeId","data-v-2c08e35e"]]),_hoisted_1$r={class:"relative pt-2.5"},_sfc_main$v=vue.defineComponent({__name:"insert",props:{model:{default:{}},permission:{default:()=>[]}},emits:["success"],setup(i,{expose:n,emit:r}){const o=r,a=vue.ref(!1),l=vue.ref(null),s=f=>{l.value=f,a.value=!0},u=()=>o("success"),c=vue.inject("masterData"),d=f=>{const p=vue.unref(l).joinFieldMapping.split(":")[0],v=vue.unref(l).joinFieldMapping.split(":")[1];f.dataMap[v]=vue.unref(c)[p]};return n({init:s}),(f,p)=>{const v=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(v,{modelValue:vue.unref(a),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(a)?a.value=m:null),title:"从表数据编辑",size:"1200px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$r,[vue.createVNode(_sfc_main$S,{model:vue.unref(l),permission:f.permission,onSuccess:u,paramsCallback:d},null,8,["model","permission"])])]),_:1},8,["modelValue"])}}}),insert_vue_vue_type_style_index_0_scoped_9480ca97_lang="",Insert=_export_sfc$2(_sfc_main$v,[["__scopeId","data-v-9480ca97"]]),_withScopeId$b=i=>(vue.pushScopeId("data-v-0f244db2"),i=i(),vue.popScopeId(),i),_hoisted_1$q={class:"mt-2.5 mb-2.5"},_hoisted_2$k={class:"flex items-center justify-between"},_hoisted_3$i={key:0,class:"relative"},_hoisted_4$i={key:0},_hoisted_5$f=_withScopeId$b(()=>vue.createElementVNode("i",{class:"ri-add-line"},null,-1)),_sfc_main$u=vue.defineComponent({__name:"slave",props:{model:{default:{}},permission:{default:()=>[]}},setup(i){const n=i,r=vue.inject("masterData"),o=()=>{s.value=!1,setTimeout(()=>s.value=!0,10)},a=vue.ref(null),l=vue.ref(""),s=vue.ref(!0);vue.nextTick(()=>{l.value=n.model.slaveModels[0].id});const u=vue.computed(()=>n.model.slaveModels.find(c=>c.id==vue.unref(l)));return vue.watch(l,c=>{}),(c,d)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$q,[vue.createElementVNode("div",_hoisted_2$k,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.model.slaveModels,(f,p)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:f.id==vue.unref(l)?"primary":"",onClick:v=>l.value=f.id},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(f.modelName),1)]),_:2},1032,["type","onClick"]))),256))]),_:1})]),vue.unref(u)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$i,[vue.unref(s)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$i,[vue.createVNode(_sfc_main$s,{model:vue.unref(u),permission:c.permission,masterData:vue.unref(r)},{btns:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(u).publishStatus=="1",type:"primary",class:"flex items-center mr-2",onClick:d[0]||(d[0]=f=>vue.unref(a).init(vue.unref(u)))},{default:vue.withCtx(()=>[_hoisted_5$f,vue.createTextVNode(" 新增数据 ")]),_:1},8,["disabled"])]),_:1},8,["model","permission","masterData"])])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)]),vue.createVNode(Insert,{ref_key:"insertRef",ref:a,masterId:"",model:c.model,permission:c.permission,onSuccess:o},null,8,["model","permission"])],64))}}),slave_vue_vue_type_style_index_0_scoped_0f244db2_lang="",ModelSlave=_export_sfc$2(_sfc_main$u,[["__scopeId","data-v-0f244db2"]]),_hoisted_1$p={class:"p-4"},_sfc_main$t=vue.defineComponent({__name:"view",props:{model:{default:{}},permission:{default:()=>[]}},setup(i,{expose:n}){const r=i,{loading:o,colValue:a,formData:l,init:s}=useInsertForm(r.model.id),u=vue.ref(!1),c=vue.ref({});return vue.provide("masterData",c),n({init:f=>{u.value=!0,c.value=f,s(f,"update")}}),(f,p)=>{const v=vue.resolveComponent("aceHeader"),m=vue.resolveComponent("AppForm"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(u),"onUpdate:modelValue":p[0]||(p[0]=_=>vue.isRef(u)?u.value=_:null),title:"主从详情数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{animated:"",loading:vue.unref(o)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),_=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:_.key},[_.key?(vue.openBlock(),vue.createBlock(v,{key:0,title:_.key},null,8,["title"])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_1$p,[vue.createVNode(m,{form:_.list,col:vue.unref(a),disabled:""},null,8,["form","col"])])],64))),128)),vue.createVNode(ModelSlave,{model:f.model,permission:f.permission},null,8,["model","permission"])]),_:1},8,["loading"])]),_:1},8,["modelValue"])}}}),_hoisted_1$o={class:"relative"},_hoisted_2$j={class:"absolute right-0 flex items-center -top-10"},_hoisted_3$h=vue.createElementVNode("i",{class:"mr-1 ri-file-upload-line"},null,-1),_hoisted_4$h=vue.createElementVNode("i",{class:"mr-1 ri-file-history-line"},null,-1),_sfc_main$s=vue.defineComponent({__name:"model-data",props:{model:{default:{}},masterData:{default:null},permission:{default:()=>[]}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref([]),l=d=>{a.value=d},s=d=>{const{data:f}=d;f.forEach(p=>{var m;(((m=n.model)==null?void 0:m.slaveModels)??[]).some(g=>g.parentModelId)&&p.htmlButton.unshift({name:"详情",key:"viewBTN",type:"primary",icon:"ri-file-2-line"})})},u=d=>{const{type:f,row:p}=d;if(f=="viewBTN"){const v={};n.model.listModelAttribute.forEach(m=>{v[m.mapCode]=p[m.attributeCode]}),vue.unref(o).init(v,"update")}},c=d=>{const{joinFieldMapping:f}=n.model;if(n.model.joinFieldMapping&&n.masterData){const p=f.split(":")[0],v=f.split(":")[1];d.params[v]=n.masterData[p]}return d};return(d,f)=>{var m,g,_;const p=vue.resolveComponent("AppTable"),v=vue.resolveComponent("aceDynamicList");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$o,[vue.createElementVNode("div",_hoisted_2$j,[vue.renderSlot(d.$slots,"btns"),vue.createVNode(_sfc_main$x,{ref:"modelSearchSettingRef",menu:[],businessType:"model",businessId:(m=d.model)==null?void 0:m.id,onSuccess:f[0]||(f[0]=y=>vue.unref(r).$refs.aceDynamicListRef.init())},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"success"},{default:vue.withCtx(()=>[_hoisted_3$h,vue.createTextVNode(" 查询配置 ")]),_:1})]),attr:vue.withCtx(()=>[vue.createVNode(p,{maxHeight:"250px",tableData:[{label:"标识符",prop:"prop"},{label:"字段名",prop:"label"}],list:vue.unref(a)},null,8,["list"])]),_:1},8,["businessId"]),vue.createVNode(dynamicTableCol,{model:d.model,onSuccess:f[1]||(f[1]=y=>vue.unref(r).$refs.aceDynamicListRef.init())},null,8,["model"]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-3",onClick:f[2]||(f[2]=y=>vue.unref(r).$refs.aceDynamicListRef.handleExport())},{default:vue.withCtx(()=>[_hoisted_4$h,vue.createTextVNode(" 导出EXCEL ")]),_:1}),vue.createVNode(_sfc_main$t,{ref_key:"modelSlaveViewRef",ref:o,model:d.model,permission:d.permission},null,8,["model","permission"])])]),vue.createVNode(v,{id:(g=d.model)==null?void 0:g.id,title:(_=d.model)==null?void 0:_.modelName,showPageIndex:!0,isDownLoad:!1,onTableHeader:l,formatParamsFunc:c,isDelete:d.permission.includes("DATA_DEL")&&d.model.modelLayer!="ODSVIEW"&&!d.model.shadowModelId,isEdit:d.model.openForm==2&&d.permission.includes("DATA_EDIT"),ref:"aceDynamicListRef",onBtnClick:u,onSuccessList:s},null,8,["id","title","isDelete","isEdit"])],64)}}}),_withScopeId$a=i=>(vue.pushScopeId("data-v-f8180b79"),i=i(),vue.popScopeId(),i),_hoisted_1$n={class:"flex flex-1 gap-2.5 overflow-hidden"},_hoisted_2$i={class:"flex-1 flex flex-col gap-2.5 overflow-hidden"},_hoisted_3$g={class:"flex flex-col flex-1"},_hoisted_4$g={class:"h"},_hoisted_5$e=_withScopeId$a(()=>vue.createElementVNode("div",{class:"h-item active"},"①SQL编写",-1)),_hoisted_6$d={class:"ml-2 text-xs text-color-info"},_hoisted_7$c={class:"text-color-warning"},_hoisted_8$c={class:"flex justify-end flex-1 overflow-hidden"},_hoisted_9$b=_withScopeId$a(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_10$a={class:"b"},_hoisted_11$8={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_12$6={class:"h"},_hoisted_13$5=["onClick"],_hoisted_14$4={class:"b"},_hoisted_15$1={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_16$1={class:"h"},_hoisted_17$1=_withScopeId$a(()=>vue.createElementVNode("div",{class:"h-item active"},"② 补跑数据配置",-1)),_hoisted_18$1={class:"ml-2 text-xs text-color-info"},_hoisted_19$1={class:"b"},_hoisted_20$1={class:"h-full overflow-y-auto flex flex-col gap-2.5"},_hoisted_21$1=_withScopeId$a(()=>vue.createElementVNode("div",null,[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"set字段映射")],-1)),_hoisted_22$1={style:{width:"50px"}},_hoisted_23$1=_withScopeId$a(()=>vue.createElementVNode("td",null,"补跑数据字段",-1)),_hoisted_24$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"50px"},null,-1)),_hoisted_25$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"80px"},null,-1)),_hoisted_26$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"200px"},"映射字段",-1)),_hoisted_27=["onClick"],_hoisted_28={key:0},_hoisted_29=_withScopeId$a(()=>vue.createElementVNode("td",{colspan:"5"},"暂无数据",-1)),_hoisted_30=[_hoisted_29],_hoisted_31=_withScopeId$a(()=>vue.createElementVNode("div",{class:"flex items-center"},[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"where条件映射")],-1)),_hoisted_32={style:{width:"50px"}},_hoisted_33=_withScopeId$a(()=>vue.createElementVNode("td",null,"补跑数据字段",-1)),_hoisted_34=_withScopeId$a(()=>vue.createElementVNode("td",{width:"50px"},null,-1)),_hoisted_35=_withScopeId$a(()=>vue.createElementVNode("td",{width:"80px"},null,-1)),_hoisted_36=_withScopeId$a(()=>vue.createElementVNode("td",{width:"200px"},"映射字段",-1)),_hoisted_37=["onClick"],_hoisted_38={key:0},_hoisted_39=_withScopeId$a(()=>vue.createElementVNode("td",{colspan:"5"},"暂无数据",-1)),_hoisted_40=[_hoisted_39],_hoisted_41=_withScopeId$a(()=>vue.createElementVNode("i",{class:"ri-play-fill"},null,-1)),_hoisted_42={key:0},_hoisted_43=_withScopeId$a(()=>vue.createElementVNode("div",null,[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"方案名称")],-1)),_sfc_main$r=vue.defineComponent({__name:"model-clean-design",props:{model:{default:null}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{openMessage:s}=l.$globalHooks.useMessage(),u=vue.inject("projectList"),c=vue.computed(()=>{var N,O;return((O=(N=(vue.unref(u)??[]).find(I=>I.value==l.$baseGetCurrentProjectId()))==null?void 0:N.ext)==null?void 0:O.storeType)??"-"}),d=[{label:"SQL执行结果",value:"1"},{label:"SQL执行结果(JSON)",value:"2"}],f=vue.ref("1"),p=vue.ref(!1),v=vue.ref(""),m=vue.ref([]),g=vue.ref(!1),_=vue.ref(""),y=vue.ref([]),b=vue.ref(-1),x=vue.ref(""),C=vue.ref([]),w=vue.ref([]),E=vue.ref(""),$=["project_id","create_time","create_user","create_dept","_project_id","tag","_create_time","_create_user","_create_dept","_tag","_data_from"],S=vue.computed(()=>(o.model.listModelAttribute??[]).filter(N=>!$.includes(N.attributeCode))),V=vue.computed(()=>(vue.unref(y).length?Object.keys(vue.unref(y)[0]):[]).filter(N=>!$.includes(N))),k=(N={})=>{p.value=!0,v.value="",C.value=(N==null?void 0:N.setFieldMapping)??[],w.value=(N==null?void 0:N.whereFieldMapping)??[],_.value=(N==null?void 0:N.sqlScript)??"",y.value=[],x.value=(N==null?void 0:N.name)??"",E.value=(N==null?void 0:N.id)??"",N.sqlScript&&P(!1),b.value=-1,l.$baseHttp.get("/api/ace-data-center/data-source/options?type=3").then(O=>{m.value=O.data})},P=async(N=!0)=>{g.value=!0;const O={dataSourceId:vue.unref(v),extractSql:vue.unref(_),projectId:l.$baseGetCurrentProjectId()};N&&(C.value=[],w.value=[]);const I=await l.$baseHttp.post("/api/ace-data-center/db-extract/dbExtractDebug",O);g.value=!1,I&&(y.value=I.data,N&&(s({type:"success",message:"执行成功"}),vue.unref(V).forEach(L=>{const D=vue.unref(S).find(F=>F.attributeCode==L);D&&C.value.push({mainTableFiled:D.attributeCode,tempTableField:L,operator:"=",constantFlag:1})})))},B=async()=>{const N=await l.$baseHttp.post("/api/ace-data-center/model-cleaning/debug",{modelId:o.model.id,tempTableSql:vue.unref(_),setFieldMapping:JSON.stringify(vue.unref(C)),whereFieldMapping:JSON.stringify(vue.unref(w))},{headers:{loading:!0}});N&&(b.value=N.data)},T=async()=>{const N={sqlScript:vue.unref(_),dataSourceId:v.value,modelId:o.model.id,name:vue.unref(x),projectId:l.$baseGetCurrentProjectId(),setFieldMapping:JSON.stringify(vue.unref(C)),whereFieldMapping:JSON.stringify(vue.unref(w))};if(N.name===""){s({type:"warning",message:"请填写方案名称"});return}if(!vue.unref(C)||!vue.unref(w)){s({type:"warning",message:"set字段映射或where字段映射必须大于0个"});return}if(Object.values(vue.unref(C)).some(I=>Object.values(I).some(L=>L===""))){s({type:"warning",message:"set字段映射存在空数据"});return}if(Object.values(vue.unref(w)).some(I=>Object.values(I).some(L=>L===""))){s({type:"warning",message:"where字段映射存在空数据"});return}vue.unref(E)&&(N.id=vue.unref(E)),await l.$baseHttp.post(`/api/ace-data-center/model-cleaning/${vue.unref(E)?"update":"save"}`,N,{headers:{loading:!0}})&&(l.$message.success("操作成功"),p.value=!1,a("success"))};return n({init:k}),(N,O)=>{const I=vue.resolveComponent("AppCodemirror"),L=vue.resolveComponent("AppTable"),D=vue.resolveComponent("AppJson"),F=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(F,{modelValue:vue.unref(p),"onUpdate:modelValue":O[8]||(O[8]=M=>vue.isRef(p)?p.value=M:null),title:"①SQL编写抽取数据 -> ②补跑数据配置",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:T},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(E)?"保存":"新增"),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:O[7]||(O[7]=M=>p.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>{var M;return[vue.createElementVNode("div",_hoisted_1$n,[vue.createElementVNode("div",_hoisted_2$i,[vue.createElementVNode("div",_hoisted_3$g,[vue.createElementVNode("div",_hoisted_4$g,[_hoisted_5$e,vue.createElementVNode("span",_hoisted_6$d,[vue.createTextVNode(" 当前数据仓库为: "),vue.createElementVNode("span",_hoisted_7$c,vue.toDisplayString(vue.unref(c)),1),vue.createTextVNode(" 注意sql语法 ")]),vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(v),"onUpdate:modelValue":O[0]||(O[0]=R=>vue.isRef(v)?v.value=R:null),placeholder:"请选择数据源选项",clearable:!0,"popper-class":"ace-select",class:"w-40 ml-2",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(m),R=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:R.code,label:R.label,value:R.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_8$c,[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(g),type:"warning",class:"flex items-center",onClick:O[1]||(O[1]=R=>P())},{default:vue.withCtx(()=>[_hoisted_9$b,vue.createTextVNode(" 执行SQL ")]),_:1},8,["disabled"])])]),vue.createElementVNode("div",_hoisted_10$a,[vue.createVNode(I,{extensions:"sql",modelValue:vue.unref(_),"onUpdate:modelValue":O[2]||(O[2]=R=>vue.isRef(_)?_.value=R:null),style:{height:"100%"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_11$8,[vue.createElementVNode("div",_hoisted_12$6,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,R=>vue.createElementVNode("span",{class:vue.normalizeClass(["h-item",{active:vue.unref(f)==R.value}]),onClick:z=>f.value=R.value},vue.toDisplayString(R.label),11,_hoisted_13$5)),64))]),vue.createElementVNode("div",_hoisted_14$4,[vue.unref(f)=="1"?(vue.openBlock(),vue.createBlock(L,{key:0,tableData:(M=vue.unref(y))!=null&&M.length?Object.keys(vue.unref(y)[0]).map(R=>({label:R,prop:R})):[],list:vue.unref(y)??[]},null,8,["tableData","list"])):vue.createCommentVNode("",!0),vue.unref(f)=="2"?(vue.openBlock(),vue.createBlock(D,{key:1,style:{height:"100%"},modelValue:vue.unref(y),"onUpdate:modelValue":O[3]||(O[3]=R=>vue.isRef(y)?y.value=R:null)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])])]),vue.createElementVNode("div",_hoisted_15$1,[vue.createElementVNode("div",_hoisted_16$1,[_hoisted_17$1,vue.createElementVNode("span",_hoisted_18$1," 模型:"+vue.toDisplayString(o.model.modelName)+"【"+vue.toDisplayString(o.model.modelCode)+"】 ",1)]),vue.createElementVNode("div",_hoisted_19$1,[vue.createElementVNode("div",_hoisted_20$1,[_hoisted_21$1,vue.createElementVNode("table",null,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",_hoisted_22$1,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:O[4]||(O[4]=R=>vue.unref(C).push({mainTableFiled:"",operator:"=",constantFlag:1,tempTableField:""}))})]),_hoisted_23$1,_hoisted_24$1,_hoisted_25$1,_hoisted_26$1])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C),(R,z)=>(vue.openBlock(),vue.createElementBlock("tr",null,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{onClick:U=>vue.unref(C).splice(z,1),class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger"},null,8,_hoisted_27)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.mainTableFiled,"onUpdate:modelValue":U=>R.mainTableFiled=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(S),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U.attributeCode,label:`${U.attributeCode}${U.attributeComment?`【${U.attributeComment}】`:""}`,disabled:vue.unref(C).some(G=>G.mainTableFiled===U.attributeCode),value:U.attributeCode},null,8,["label","disabled","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(R.operator),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.constantFlag,"onUpdate:modelValue":U=>R.constantFlag=U,placeholder:"请选择类型",size:"small",onChange:U=>R.tempTableField=""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElOption),{label:"字段",value:1}),vue.createVNode(vue.unref(elementPlus.ElOption),{label:"常量",value:0})]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[R.constantFlag==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(V),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElInput),{key:1,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请输入字段",size:"small"},null,8,["modelValue","onUpdate:modelValue"]))])]))),256)),vue.unref(C).length?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_28,_hoisted_30))]),_hoisted_31,vue.createElementVNode("table",null,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",_hoisted_32,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:O[5]||(O[5]=R=>vue.unref(w).push({mainTableFiled:"",operator:"=",constantFlag:1,tempTableField:""}))})]),_hoisted_33,_hoisted_34,_hoisted_35,_hoisted_36])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(w),(R,z)=>(vue.openBlock(),vue.createElementBlock("tr",null,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{onClick:U=>vue.unref(w).splice(z,1),class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger"},null,8,_hoisted_37)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.mainTableFiled,"onUpdate:modelValue":U=>R.mainTableFiled=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(S),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U.attributeCode,label:`${U.attributeCode}${U.attributeComment?`【${U.attributeComment}】`:""}`,disabled:vue.unref(w).some(G=>G.mainTableFiled===U.attributeCode),value:U.attributeCode},null,8,["label","disabled","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(R.operator),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.constantFlag,"onUpdate:modelValue":U=>R.constantFlag=U,placeholder:"请选择类型",size:"small",onChange:U=>R.tempTableField=""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElOption),{label:"字段",value:1}),vue.createVNode(vue.unref(elementPlus.ElOption),{label:"常量",value:0})]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[R.constantFlag==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(V),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElInput),{key:1,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请输入字段",size:"small"},null,8,["modelValue","onUpdate:modelValue"]))])]))),256)),vue.unref(w).length?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_38,_hoisted_40))]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButton),{disabled:!vue.unref(C).length||!vue.unref(w).length,type:"primary",plain:"",size:"small",onClick:B},{default:vue.withCtx(()=>[_hoisted_41,vue.createTextVNode(" 结果预览 ")]),_:1},8,["disabled"])]),vue.unref(b)>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_42,[vue.createVNode(vue.unref(elementPlus.ElAlert),{type:"warning","show-icon":"",title:`将被影响的条数:${vue.unref(b)}条`,closable:!1},null,8,["title"])])):vue.createCommentVNode("",!0),_hoisted_43,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(x),"onUpdate:modelValue":O[6]||(O[6]=R=>vue.isRef(x)?x.value=R:null),placeholder:"请输入方案名称"},null,8,["modelValue"])])])])])])]}),_:1},8,["modelValue"])}}}),modelCleanDesign_vue_vue_type_style_index_0_scoped_f8180b79_lang="",ModelCleanDesign=_export_sfc$2(_sfc_main$r,[["__scopeId","data-v-f8180b79"]]),_sfc_main$q=vue.defineComponent({__name:"model-clean",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=`/api/ace-data-center/model-cleaning/list?modelId=${n.model.id}&projectId=${r.$baseGetCurrentProjectId()}`,c=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),d=vue.reactive([{label:"方案名称",prop:"name"},{label:"类型",prop:"extractType",slot:!0},{label:"操作",prop:"htmlButton",fixed:"right"}]),f=v=>{v.data.forEach(m=>{m.htmlButton=[],m.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),m.htmlButton.push({name:"复制",key:"COPY",type:"primary",icon:"ri-file-copy-line"}),m.htmlButton.push({name:"清洗记录",key:"LOG",type:"primary",icon:"ri-file-line"}),m.taskDefinedId&&m.htmlButton.push({name:"作业调度日志",key:"TASK-LOG",type:"primary",icon:"ri-file-line"}),m.htmlButton.push({name:"清洗",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),m.setFieldMapping&&(m.setFieldMapping=JSON.parse(m.setFieldMapping)),m.whereFieldMapping&&(m.whereFieldMapping=JSON.parse(m.whereFieldMapping)),m.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},p=v=>{const{type:m,row:g}=v;switch(m){case"ADD":case"COPY":case"EDIT":vue.unref(a).init(JSON.parse(JSON.stringify({...g,id:m=="EDIT"?g.id:""})));break;case"LOG":vue.unref(s).init({businessId:g.id,businessType:"cleaning_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK-LOG":vue.unref(l).init(g.taskDefinedId??"");break;case"PUSH":r.$baseConfirm({content:"是否数据清洗?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/model-cleaning/execute/${g.id}`,{},{headers:{loading:!0}})&&r.$message.success("操作成功")}});break;case"DEL":r.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/model-cleaning/remove/${g.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break}};return(v,m)=>{const g=vue.resolveComponent("appList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:o,url:u,tableData:vue.unref(d),searchBtns:vue.unref(c),onSuccess:f,onBtnClick:p},{extractType:vue.withCtx(({row:_})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("规则补数")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(_sfc_main$z,{ref_key:"taskLogRef",ref:l},null,512),vue.createVNode(ModelCleanDesign,{model:v.model,ref_key:"modelCleanDesign",ref:a,onSuccess:m[0]||(m[0]=_=>vue.unref(o).getData())},null,8,["model"]),vue.createVNode(_sfc_main$F,{ref_key:"modelExtractLogRef",ref:s,title:"清洗日志"},null,512)]),_:1},8,["tableData","searchBtns"])}}}),_sfc_main$p=vue.defineComponent({__name:"dataSync",props:{model:{default:{}}},setup(i){const{proxy:n}=vue.getCurrentInstance(),{openMessage:r}=n.$globalHooks.useMessage(),o=i,a=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(null),d=vue.computed(()=>`/api/ace-data-center/db-extract/list?modelId=${o.model.id}&projectId=${n.$baseGetCurrentProjectId()}`),f=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"200px"}]),p=m=>{m.data.forEach(g=>{g.htmlButton=[],g.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),g.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(g.extractType)&&g.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),g.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},v=async m=>{const{type:g,row:_,index:y}=m;switch(g){case"history":vue.unref(u).init({ajaxUrl:`/api/ace-data-center/extract-log/modelSyncHistory?descs=create_time&modelId=${_.modelSyncDetail.modelId}`,table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"LOG":vue.unref(u).init({businessId:_.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"PUSH":n.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${_.id}`,{},{headers:{loading:!0}})&&r({type:"success",message:"操作成功"})}});break;case"DEL":n.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${_.id}`,{},{headers:{loading:!0}})&&(r({type:"success",message:"操作成功"}),vue.unref(l).getData())}});break;case"EDIT":const b=await n.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${_.id}`);if(!b)return;vue.unref(s).init(b.data);break;case"ADD":vue.unref(s).init({dataSourceId:o.model.dataSourceId,modelId:o.model.modelId});break}};return(m,g)=>{const _=vue.resolveComponent("aceModelExtractLog"),y=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(y,{tableData:vue.unref(f),url:vue.unref(d),searchBtns:vue.unref(a),ref_key:"appListRef",ref:l,onBtnClick:v,onSuccess:p},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$19,{ref_key:"settingRef",ref:s,onRefresh:g[0]||(g[0]=b=>vue.unref(l).getData({clear:!0}))},null,512),vue.createVNode(_,{ref_key:"extractLogRef",ref:u},null,512),vue.createVNode(_sfc_main$1a,{ref_key:"sourceTableDataRef",ref:c},null,512)]),_:1},8,["tableData","url","searchBtns"])}}}),_hoisted_1$m={class:"relative h-40"},_hoisted_2$h={class:"absolute right-3 top-1"},_hoisted_3$f={class:"flex flex-col gap-2.5"},_hoisted_4$f={class:"h-40"},_hoisted_5$d={class:"flex justify-end"},_sfc_main$o=vue.defineComponent({__name:"insertBtn",props:vue.mergeModels({example:{default:""},disabled:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const n=i,r=vue.useModel(i,"modelValue"),o=()=>{r.value=n.example};return(a,l)=>{const s=vue.resolveComponent("AppCodemirror");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(s,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),style:{height:"100%"}},null,8,["modelValue"]),n.disabled?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,width:"500px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$h,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("填充示例")]),_:1})])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$f,[vue.createElementVNode("div",_hoisted_4$f,[vue.createVNode(s,{diasbled:n.disabled,modelValue:n.example,"onUpdate:modelValue":l[1]||(l[1]=u=>n.example=u),style:{height:"100%"}},null,8,["diasbled","modelValue"])]),vue.createElementVNode("div",_hoisted_5$d,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:o},{default:vue.withCtx(()=>[vue.createTextVNode("复制到编辑框")]),_:1})])])]),_:1}))])}}}),_withScopeId$9=i=>(vue.pushScopeId("data-v-5d4941e4"),i=i(),vue.popScopeId(),i),_hoisted_1$l={class:"flex flex-1 gap-2.5"},_hoisted_2$g={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$e=_withScopeId$9(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 请求设置 ")])],-1)),_hoisted_4$e={class:"b"},_hoisted_5$c={class:"flex flex-col w-full gap-1"},_hoisted_6$c={class:"flex flex-col w-full"},_hoisted_7$b={class:"w-full"},_hoisted_8$b={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_9$a=_withScopeId$9(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 返回设置 ")])],-1)),_hoisted_10$9={class:"b"},_hoisted_11$7={class:"w-full"},_hoisted_12$5={class:"w-full"},_hoisted_13$4=_withScopeId$9(()=>vue.createElementVNode("i",{class:"ri-play-large-fill"},null,-1)),_sfc_main$n=vue.defineComponent({__name:"serverView",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref({}),u=vue.ref([]),c=vue.ref("header"),d=[{label:"请求头",value:"header"},{label:"请求参数",value:"parameters"},{label:"请求body",value:"body"}],f=vue.ref(!1),p=vue.ref(!1),v=vue.computed(()=>vue.unref(s).apiName===""||vue.unref(s).url===""||vue.unref(s).responseObjectCode===""||vue.unref(s).requestType===""),m=async(y,b=!1)=>{if(c.value="header",p.value=!1,f.value=b,s.value={apiName:"",url:"",jsModule:void 0,requestType:"GET",preApiId:"",header:"",parameters:"",body:"",isPages:0,pagesEndCondition:"",successCondition:"",responseObjectCode:"",extractPluginScript:"",clearBeforeExt:!1,id:""},y){const x=await a.$baseHttp.get(`/api/ace-data-center/invoke-api-extract/detail?id=${y}`,{headers:{loading:!0}});Object.keys(s.value).forEach(C=>{let w=x.data[C]??"";C=="jsModule"&&(w===""?w=[]:w=w.split(",")),s.value[C]=w})}l.value=!0,a.$baseHttp.get("/api/ace-data-center/invoke-pre-api/options").then(x=>{u.value=x.data})},g=async()=>{await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submit",{...vue.unref(s),projectId:a.$baseGetCurrentProjectId(),jsModule:vue.unref(s).jsModule.toString()},{headers:{loading:!0}})&&(a.$message.success("操作成功"),l.value=!1,o("success"))},_=async()=>{var b;await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/debug",{...vue.unref(s),jsModule:(((b=vue.unref(s))==null?void 0:b.jsModule)??"").toString()},{headers:{loading:!0}})&&(p.value=!0)};return n({init:m}),(y,b)=>{const x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(l),"onUpdate:modelValue":b[15]||(b[15]=C=>vue.isRef(l)?l.value=C:null),title:"数据接口",size:"100%"},vue.createSlots({default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$l,[vue.createElementVNode("div",_hoisted_2$g,[_hoisted_3$e,vue.createElementVNode("div",_hoisted_4$e,[vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口名称",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).apiName,"onUpdate:modelValue":b[0]||(b[0]=C=>vue.unref(s).apiName=C),placeholder:"请输入接口名称",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"引入第三方JS库"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(s).jsModule,"onUpdate:modelValue":b[1]||(b[1]=C=>vue.unref(s).jsModule=C),"popper-class":"ace-select",placeholder:"请选择需引入的第三方JS库",disabled:vue.unref(f),multiple:"",clearable:"",filterable:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a).$globalDict.jsModuleOptions,C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口URL",required:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$c,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(s).requestType,"onUpdate:modelValue":b[2]||(b[2]=C=>vue.unref(s).requestType=C),disabled:vue.unref(f)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"GET"},{default:vue.withCtx(()=>[vue.createTextVNode("GET")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"POST"},{default:vue.withCtx(()=>[vue.createTextVNode("POST")]),_:1})]),_:1},8,["modelValue","disabled"]),vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).url,"onUpdate:modelValue":b[3]||(b[3]=C=>vue.unref(s).url=C),disabled:vue.unref(f),example:`function plugin(){
627
+ }`,vue.unref(_).init(($==null?void 0:$.taskDefined)??{}),x.value=($==null?void 0:$.taskDefined)??null}),o.$baseHttp.get("/api/ace-data-center/data-source/options?type=3").then(S=>{g.value=S.data})},w=()=>{if(!vue.unref(c)){o.$message.warning("请输入SQL");return}const{params:$,error:S}=l(b);if(!(S.length>0)){if(vue.unref(m)){const{params:V,error:k}=vue.unref(_).getForm();if(k.length>0)return;$.taskDefined={...vue.unref(x)??{},...V}}if($.incrementalCondition){let V=`'${$.incrementalConditionKey}'`;const k=r.modelAttributeList.find(P=>P.attributeCode==$.incrementalCondition);["int","bigint","double"].includes(k==null?void 0:k.dataType)&&(V=Number($.incrementalConditionKey)),$.incrementalCondition=`${$.incrementalCondition}=${V}`}return{...$,extractPluginScript:vue.unref(f),extractSql:vue.unref(c)}}},E=async $=>{v.value=!0;const S={dataSourceId:vue.unref(s),extractSql:vue.unref(c),projectId:o.$baseGetCurrentProjectId()};$==="javascript"&&(S.extractPluginScript=vue.unref(f)||"",S.streamType=b.find(k=>k.fieldName=="streamType").value);const V=await o.$baseHttp.post("/api/ace-data-center/db-extract/dbExtractDebug",S);v.value=!1,V&&($==="sql"?d.value=V.data:p.value=V.data,o.$message.success("执行成功"))};return n({extractSql:c,init:C,getValue:w}),($,S)=>{const V=vue.resolveComponent("aceHeader"),k=vue.resolveComponent("AppCodemirror"),P=vue.resolveComponent("AppForm"),B=vue.resolveComponent("AppTaskDesign");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$v,[vue.createElementVNode("div",_hoisted_2$o,[vue.createVNode(V,{title:"SQL数据抽取"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElPopover),{width:"600",placement:"bottom",trigger:"hover","popper-class":"ace-select"},{reference:vue.withCtx(()=>[_hoisted_3$m]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTable),{data:u},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"sql",label:"SQL示例"},{default:vue.withCtx(({row:T})=>[vue.createVNode(vue.unref(elementPlus.ElTooltip),{content:T.sql,placement:"top"},{default:vue.withCtx(()=>[vue.createElementVNode("span",null,vue.toDisplayString(String(T.sql).substring(1,30))+"...",1)]),_:2},1032,["content"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{label:"操作",width:"120"},{default:vue.withCtx(({row:T})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:N=>c.value=T.sql},{default:vue.withCtx(()=>[vue.createTextVNode("复制到编辑框")]),_:2},1032,["onClick"])]),_:1})]),_:1})]),_:1}),vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=T=>s.value=T),placeholder:"请选择数据源选项",clearable:!1,"popper-class":"ace-select",class:"w-40 ml-2",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(g),T=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:T.code,label:T.label,value:T.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(v),type:"warning",onClick:S[1]||(S[1]=T=>E("sql"))},{default:vue.withCtx(()=>[vue.createTextVNode("执行SQL")]),_:1},8,["disabled"])]),_:1}),vue.createElementVNode("div",_hoisted_4$m,[vue.createVNode(k,{extensions:"sql",modelValue:vue.unref(c),"onUpdate:modelValue":S[2]||(S[2]=T=>vue.isRef(c)?c.value=T:null),style:{height:"250px"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_5$j,[vue.createVNode(V,{title:"执行结果"}),vue.createElementVNode("div",_hoisted_6$h,[vue.createVNode(vue.unref(JsonEditorVue),{style:{height:"250px"},modelValue:vue.unref(d),"onUpdate:modelValue":S[3]||(S[3]=T=>vue.isRef(d)?d.value=T:null)},null,8,["modelValue"])])])]),vue.createElementVNode("div",_hoisted_7$f,[vue.createElementVNode("div",_hoisted_8$f,[vue.createVNode(V,{title:"插件编写"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(v),type:"warning",onClick:S[4]||(S[4]=T=>E("javascript"))},{default:vue.withCtx(()=>[vue.createTextVNode(" 执行插件 ")]),_:1},8,["disabled"])]),_:1}),vue.createElementVNode("div",_hoisted_9$d,[vue.createVNode(k,{modelValue:vue.unref(f),"onUpdate:modelValue":S[5]||(S[5]=T=>vue.isRef(f)?f.value=T:null),style:{height:"250px"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_10$c,[vue.createVNode(V,{title:"插件执行结果"}),vue.createElementVNode("div",_hoisted_11$9,[vue.createVNode(vue.unref(JsonEditorVue),{style:{height:"250px"},modelValue:vue.unref(p),"onUpdate:modelValue":S[6]||(S[6]=T=>vue.isRef(p)?p.value=T:null)},null,8,["modelValue"])])])]),vue.createVNode(V,{title:"抽取方案",class:"mt-4"}),vue.createVNode(P,{form:vue.unref(b)},{incrementalField:vue.withCtx(({element:T})=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:T.value,"onUpdate:modelValue":N=>T.value=N,placeholder:"请选择","popper-class":"ace-select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($.modelAttributeList,N=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:N.id,label:`${N.attributeCode}(${N.attributeComment||N.attributeCode})`,value:N.attributeCode},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),incrementalCondition:vue.withCtx(({element:T})=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:T.value,"onUpdate:modelValue":N=>T.value=N,placeholder:"请选择",clearable:"","popper-class":"ace-select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList($.modelAttributeList,N=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:N.id,label:`${N.attributeCode}(${N.attributeComment||N.attributeCode})`,value:N.attributeCode},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["form"]),vue.withDirectives(vue.createElementVNode("div",_hoisted_12$7,[vue.createVNode(V,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(m),"onUpdate:modelValue":S[7]||(S[7]=T=>vue.isRef(m)?m.value=T:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(B,{ref_key:"taskDesignRef",ref:_},null,512)],512),[[vue.vShow,vue.unref(m)]])],512),[[vue.vShow,["1","2"].includes(vue.unref(y).value)]])],64)}}}),_withScopeId$d=i=>(vue.pushScopeId("data-v-2c23e1f2"),i=i(),vue.popScopeId(),i),_hoisted_1$u={class:"flex items-center mt-2"},_hoisted_2$n={class:"flex-1"},_hoisted_3$l={class:"mt-2 text-gray-400"},_hoisted_4$l=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型名称:",-1)),_hoisted_5$i=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型代码:",-1)),_hoisted_6$g=_withScopeId$d(()=>vue.createElementVNode("label",null,"模型描述:",-1)),_sfc_main$A=vue.defineComponent({__name:"model-db-extract-design",props:{modelId:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{allModel:s,allModelAttribute:u,getDetail:c}=fetch$1(l).model,d=vue.ref(!1),f=vue.ref(null),p=vue.ref([]),v=vue.ref(""),m=vue.ref({}),g=vue.ref(""),_=($,S="")=>{m.value={},p.value=[],d.value=!0,[{label:"ODS源",value:"odsy"},{label:"DWD源",value:"dwdy"},{label:"DWD目标",value:"dwdmb"}].forEach(V=>{p.value.push({...V,attributeList:V.value=="dwdmb"?[]:{},options:[],selectValue:[],currentVal:"",checkAttributeList:[]})}),v.value=vue.unref(p)[0].value,s({modelLayer:"ODS"}).then(V=>{vue.unref(p).find(k=>k.value=="odsy").options=V.data}),s({modelLayer:"DWD"}).then(V=>{vue.unref(p).find(k=>k.value=="dwdy").options=V.data}),u({modelId:o.modelId}).then(V=>{vue.unref(p).find(k=>k.value=="dwdmb").attributeList=V.data}),c(o.modelId).then(V=>{m.value=V.data}),vue.nextTick(()=>{S?l.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${S}`).then(V=>{vue.unref(f).init($=="COPY"?{...V.data,id:null,extractType:null,incrementalField:null,status:null,taskDefined:null,taskDefinedId:null,createUser:null,createDept:null,createTime:null,updateUser:null,updateTime:null}:V.data)}):vue.unref(f).init()})},y=($,S="")=>S?$.options.find(V=>V.id==S):$.options.find(V=>V.id==$.currentVal),b=$=>{var S;if($.selectValue.length){const V=$.selectValue.at(-1);$.currentVal=(S=y($,V))==null?void 0:S.id,x($);return}$.currentVal=""},x=$=>{$.attributeList[$.currentVal]||u({modelId:$.currentVal}).then(S=>{$.attributeList[$.currentVal]=S.data})},C=$=>{v.value=$},w=$=>{var S;vue.unref(f).extractSql+=`select ${$.checkAttributeList.map(V=>V.attributeCode).toString()} from ${(S=y($))==null?void 0:S.modelCode}`},E=async()=>{const $={execExtract:0,dataSourceId:g.value,modelId:o.modelId,projectId:l.$baseGetCurrentProjectId()},S=vue.unref(f).getValue();!S||!await l.$baseHttp.post("/api/ace-data-center/db-extract/submitDbExtract",{...$,...S},{headers:{loading:!0}})||(l.$message.success("操作成功"),d.value=!1,a("success"))};return n({init:_}),($,S)=>{const V=vue.resolveComponent("aceHeader"),k=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(k,{modelValue:vue.unref(d),"onUpdate:modelValue":S[2]||(S[2]=P=>vue.isRef(d)?d.value=P:null),title:"数据抽取",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:E},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:S[1]||(S[1]=P=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden",style:{"margin-top":"0"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElAside),{class:"flex flex-col pr-4 mr-5",style:{width:"320px",overflow:"hidden"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),P=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{onClick:B=>C(P.value),type:vue.unref(v)==P.value?"primary":"",key:P.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(P.label),1)]),_:2},1032,["onClick","type"]))),128))]),_:1}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),P=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:P.value},[P.value==vue.unref(v)&&["odsy","dwdy"].includes(P.value)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(V,{class:"mt-2",title:"模型选择"}),vue.createElementVNode("div",_hoisted_1$u,[vue.createElementVNode("div",_hoisted_2$n,[vue.createVNode(vue.unref(elementPlus.ElSelect),{"popper-class":"ace-select",modelValue:P.selectValue,"onUpdate:modelValue":B=>P.selectValue=B,onChange:()=>b(P),multiple:"","collapse-tags":"",clearable:"",filterable:"",placeholder:"请选择一个模型",class:"w-full"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(P.options,B=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:B.id,label:B.modelName,value:B.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),P.selectValue.length?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,placement:"right",width:"300",trigger:"hover"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElBadge),{value:P.selectValue.length,class:"ml-4"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),null,{default:vue.withCtx(()=>[vue.createTextVNode("模型")]),_:1})]),_:2},1032,["value"])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(P.selectValue,B=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:B,type:P.currentVal==B?"warning":"primary",onClick:T=>{P.currentVal=B,x(P)},style:{margin:"0 7px 7px 0",cursor:"pointer"}},{default:vue.withCtx(()=>{var T;return[vue.createTextVNode(vue.toDisplayString((T=y(P,B))==null?void 0:T.modelName),1)]}),_:2},1032,["type","onClick"]))),128))]),_:2},1024)):vue.createCommentVNode("",!0)]),P.currentVal?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTooltip),{key:0,effect:"dark",content:`${y(P).modelName}[${y(P).modelCode}]`,placement:"bottom"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$l,vue.toDisplayString(`${y(P).modelName}[${y(P).modelCode}]`),1)]),_:2},1032,["content"])):vue.createCommentVNode("",!0),vue.createVNode(V,{class:"mt-2 mb-2",title:"字段属性"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:P.checkAttributeList.length==0,type:"primary",onClick:B=>w(P)},{default:vue.withCtx(()=>[vue.createTextVNode(" 复制select语句到编辑框 ")]),_:2},1032,["disabled","onClick"])]),_:2},1024),vue.createVNode(vue.unref(elementPlus.ElTable),{data:P.attributeList[P.currentVal],height:"100%",onSelectionChange:B=>P.checkAttributeList=B},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{type:"selection",width:"55"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeCode",label:"字段名称"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeComment",label:"字段描述"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"dataType",label:"数据类型"})]),_:2},1032,["data","onSelectionChange"])],64)):vue.createCommentVNode("",!0),P.value==vue.unref(v)&&["dwdmb"].includes(P.value)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(V,{class:"mt-2",title:"DWD模型信息"}),vue.createElementVNode("section",null,[vue.createElementVNode("div",null,[_hoisted_4$l,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelName),1)]),vue.createElementVNode("div",null,[_hoisted_5$i,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelCode),1)]),vue.createElementVNode("div",null,[_hoisted_6$g,vue.createTextVNode(" "+vue.toDisplayString(vue.unref(m).modelDesc),1)])]),vue.createVNode(vue.unref(elementPlus.ElTable),{data:P.attributeList,height:"100%"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"mapCode",label:"映射字段"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{prop:"attributeComment",label:"名称"}),vue.createVNode(vue.unref(elementPlus.ElTableColumn),{label:"来源"},{default:vue.withCtx(({row:B,$index:T})=>[vue.createTextVNode(vue.toDisplayString(B.sourceModelName)+"."+vue.toDisplayString(B.sourceColumnName),1)]),_:1})]),_:2},1032,["data"])],64)):vue.createCommentVNode("",!0)],64))),128))]),_:1}),vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$B,{ref_key:"designMainRef",ref:f,modelAttributeList:vue.unref(p).at(-1).attributeList,dataSourceId:vue.unref(g),"onUpdate:dataSourceId":S[0]||(S[0]=P=>vue.isRef(g)?g.value=P:null)},null,8,["modelAttributeList","dataSourceId"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),modelDbExtractDesign_vue_vue_type_style_index_0_scoped_2c23e1f2_lang="",modelDbExtractDesign=_export_sfc$2(_sfc_main$A,[["__scopeId","data-v-2c23e1f2"]]),_sfc_main$z=vue.defineComponent({__name:"taskLog",setup(i,{expose:n}){const r=vue.ref(!1),o=vue.ref(!1),a=vue.ref(null),l=vue.ref(""),s=vue.reactive([]),u=vue.reactive([]),c=vue.reactive([{label:"调度参数",prop:"args"},{label:"调度结果",prop:"code"},{label:"调度日志",prop:"msg",slot:!0},{label:"调度开始时间",prop:"execBeginTime"},{label:"调度结束时间",prop:"execEndTime"}]),d=vue.reactive([]),f=_=>{_.data.forEach(y=>{})},p=(_,y,b)=>{},v=async _=>{},m=async _=>{r.value=!0,vue.nextTick(()=>{vue.unref(a).getData({url:`/api/ace-api/blade-system/task-log/list?taskId=${_}&descs=create_time`})})},g=_=>{o.value=!0,l.value=_.msg};return n({init:m}),(_,y)=>{const b=vue.resolveComponent("appList"),x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(r),"onUpdate:modelValue":y[1]||(y[1]=C=>vue.isRef(r)?r.value=C:null),title:"调度日志",size:1e3},{default:vue.withCtx(()=>[vue.createVNode(b,{ref_key:"appRef",ref:a,tableData:vue.unref(c),searchForm:vue.unref(s),searchBtns:vue.unref(u),formData:vue.unref(d),onFormSuccess:p,onSuccess:f,onBtnClick:v},{msg:vue.withCtx(({row:C})=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:w=>g(C)},{default:vue.withCtx(()=>[vue.createTextVNode("查看调度日志")]),_:2},1032,["onClick"])]),_:1},8,["tableData","searchForm","searchBtns","formData"]),vue.createVNode(x,{modelValue:vue.unref(o),"onUpdate:modelValue":y[0]||(y[0]=C=>vue.isRef(o)?o.value=C:null),title:"调度日志",size:"100%"},{default:vue.withCtx(()=>[vue.createElementVNode("pre",null,vue.toDisplayString(vue.unref(l)),1)]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}}),_sfc_main$y=vue.defineComponent({__name:"model-db-extract",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=`/api/ace-data-center/db-extract/list?modelId=${n.model.id}&projectId=${r.$baseGetCurrentProjectId()}`,c=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),d=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right"}]),f=v=>{v.data.forEach(m=>{m.htmlButton=[],m.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),m.htmlButton.push({name:"复制",key:"COPY",type:"primary",icon:"ri-file-copy-line"}),m.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),m.taskDefinedId&&m.htmlButton.push({name:"作业调度日志",key:"TASK-LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(m.extractType)&&m.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),m.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},p=v=>{const{type:m,row:g}=v;switch(m){case"ADD":case"COPY":case"EDIT":vue.unref(s).init(m,(g==null?void 0:g.id)??"");break;case"LOG":vue.unref(o).init({businessId:g.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK-LOG":vue.unref(a).init(g.taskDefinedId??"");break;case"PUSH":r.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${g.id}`,{},{headers:{loading:!0}})&&r.$message.success("操作成功")}});break;case"DEL":r.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${g.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(l).getData())}});break}};return(v,m)=>{const g=vue.resolveComponent("appList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:l,url:u,tableData:vue.unref(d),searchBtns:vue.unref(c),onSuccess:f,onBtnClick:p},{default:vue.withCtx(()=>{var _;return[vue.createVNode(_sfc_main$F,{ref_key:"modelExtractLogRef",ref:o},null,512),vue.createVNode(modelDbExtractDesign,{ref_key:"modelDbExtractDesignRef",ref:s,modelId:(_=n==null?void 0:n.model)==null?void 0:_.id,onSuccess:m[0]||(m[0]=y=>vue.unref(l).getData())},null,8,["modelId"]),vue.createVNode(_sfc_main$z,{ref_key:"taskLogRef",ref:a},null,512)]}),_:1},8,["tableData","searchBtns"])}}}),_hoisted_1$t={class:"flex max-h-96"},_hoisted_2$m={key:0,class:"p-2 mr-3 border border-gray-200 border-solid w-80"},_hoisted_3$k=vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1),_hoisted_4$k={key:0,class:"overflow-x-hidden overflow-y-auto max-h-60"},_hoisted_5$h={key:1},_hoisted_6$f={class:"flex flex-col flex-1 overflow-hidden border border-gray-200 border-solid"},_hoisted_7$e={class:"flex justify-between p-2"},_hoisted_8$e=vue.createElementVNode("i",{class:"mr-1 ri-add-line"},null,-1),_hoisted_9$c=vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1),_hoisted_10$b={class:"flex-1 h-full p-2 overflow-y-auto"},_sfc_main$x=vue.defineComponent({__name:"model-search-setting",props:{menu:{default:()=>[]},businessType:{default:"indicators"},businessId:{default:""}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{getDetail:s}=fetch$1(l).model,{dynamicSearchForm:u,dynamicSearchFormat:c,dynamicSearchParams:d}=l.$aceDynamicSearch(l),f=vue.computed(()=>{let y="select * from yourTable temp where ";const b=[];return u.value.forEach(x=>{x.type=="stringSingle"?b.push(`temp.xxx like concat('%',#{query.${x.key}},'%')`):x.type=="numberSingle"||x.type=="select"?b.push(`temp.xxx = #{query.${x.key}}`):x.type=="numberRange"?(b.push(`temp.xxx>= #{query.${x.key}1}`),b.push(`temp.xxx<= #{query.${x.key}2}`)):x.type=="yySingle"?b.push(`toYear(temp.xxx)= #{query.${x.key}}`):x.type=="yyRange"?(b.push(`toYear(temp.xxx)>= #{query.${x.key}1}`),b.push(`toYear(temp.xxx)<#{query.${x.key}2}`)):x.type=="yymmSingle"?b.push(`formatDateTime(temp.xxx,'%Y-%m') = #{query.${x.key}}`):x.type=="yymmRange"?b.push(`formatDateTime(temp.xxx,'%Y-%m') BETWEEN #{query.${x.key}1} and #{query.${x.key}2}`):x.type=="yymmddSingle"?b.push(`formatDateTime(temp.xxx,'%Y-%m-%d') = #{query.${x.key}}`):x.type=="yymmddRange"&&b.push(`formatDateTime(temp.xxx,'%Y-%m-%d') BETWEEN #{query.${x.key}1} and #{query.${x.key}2}`)}),y+=b.join(" and ")}),p=vue.ref(o.menu.length?o.menu[0].value:""),v=vue.ref(!1),m=vue.ref(!1);vue.watch(v,async y=>{var C;if(!y)return;if(!o.businessId){m.value=!1,u.value=[];return}let b;switch(m.value=!0,u.value=[],o.businessType){case"model":b=await l.$baseHttp.post(`/api/ace-data-center/model/getFormJsonConfig/${o.businessId}`);break;case"dataform":b=await l.$baseHttp.get(`/api/ace-data-center/dataform/detail?id=${o.businessId}`);break;case"rule":b=await l.$baseHttp.get(`/api/ace-data-center/rule/detail?id=${o.businessId}`);break;case"indicators":b=await l.$baseHttp.get(`/api/ace-data-center/indicators/detail?id=${o.businessId}`);break}const x=JSON.parse(((C=b==null?void 0:b.data)==null?void 0:C.formConfJson)??"[]");["model"].includes(o.businessType)?s(o.businessId).then(w=>{u.value=w.data.listModelAttribute.map(E=>({name:E.attributeComment,key:E.attributeCode,dataType:E.dataType,hide:E.hide,checked:!1,type:"",value:"",minValue:"",maxValue:"",defaultRule:"",dictId:"",options:""})),x.forEach(E=>{const $=vue.unref(u).find(S=>S.key==E.key);$&&(Object.keys($).forEach(S=>{$[S]=E[S]}),$.checked=!0),["varchar","text"].includes(E.dataType)&&!$&&(E.type="stringSingle")}),m.value=!1}):(u.value=x,m.value=!1)});const g=async()=>{let y=!1,b=JSON.parse(JSON.stringify(vue.unref(u)));if(["model"].includes(o.businessType)&&(b=b.filter(E=>E.checked)),b.forEach(E=>{delete E.options,(E.key==""||E.name==""||E.type=="")&&(y=!0)}),y){l.$message.warning("存在字段未填写请核对");return}const x=d(vue.unref(u));if(!o.businessId){a("success",x),v.value=!1;return}let C="";switch(o.businessType){case"model":C="/api/ace-data-center/model/updateFormConfJson";break;case"dataform":C="/api/ace-data-center/dataform/submit";break;case"rule":C="/api/ace-data-center/rule/submit";break;case"indicators":C="/api/ace-data-center/indicators/updateFormConfJson";break}await l.$baseHttp.post(C,{id:o.businessId,formConfJson:JSON.stringify(b),paramsRemark:JSON.stringify(x),projectId:l.$baseGetCurrentProjectId()},{headers:{loading:!0}})&&(l.$message.success("操作成功"),a("success",x),v.value=!1)},_=()=>{const y=vue.unref(u).length;u.value.push({key:"temp"+y,name:"字段"+y,type:"stringSingle",value:""})};return n({visible:v,dynamicSearchForm:u}),(y,b)=>{const x=vue.resolveComponent("aceDynamicSearchEdit"),C=vue.resolveComponent("AppCodemirror");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{placement:"bottom",visible:vue.unref(v),"onUpdate:visible":b[2]||(b[2]=w=>vue.isRef(v)?v.value=w:null),trigger:"click","popper-class":"ace-select",width:y.menu.length?"1400px":"1200px"},{reference:vue.withCtx(()=>[vue.renderSlot(y.$slots,"reference")]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$t,[y.menu.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$m,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(y.menu,w=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(p)==w.value?"primary":"",key:w.value,onClick:E=>p.value=w.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(w.label),1)]),_:2},1032,["type","onClick"]))),128))]),_:1}),_hoisted_3$k,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(y.menu,w=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:w.value},[w.value==vue.unref(p)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.renderSlot(y.$slots,w.value),w.value=="tool"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$k,[vue.createVNode(x,{form:vue.unref(u).filter(E=>E.checked||E.checked==null),isEdit:!1},null,8,["form"])])):vue.createCommentVNode("",!0),w.value=="json"?(vue.openBlock(),vue.createElementBlock("pre",_hoisted_5$h,vue.toDisplayString(vue.unref(d)(vue.unref(u))),1)):vue.createCommentVNode("",!0),w.value=="sql"?(vue.openBlock(),vue.createBlock(C,{key:2,extensions:"sql",disabled:"",modelValue:vue.unref(f),"onUpdate:modelValue":b[0]||(b[0]=E=>vue.isRef(f)?f.value=E:null),style:{height:"250px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)],64))),128))])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_6$f,[vue.createElementVNode("div",_hoisted_7$e,[vue.createElementVNode("div",null,[["model"].includes(o.businessType)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"primary",onClick:_},{default:vue.withCtx(()=>[_hoisted_8$e,vue.createTextVNode(" 新增参数 ")]),_:1}))]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",size:"small",onClick:b[1]||(b[1]=w=>v.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode(" 关闭 ")]),_:1})])]),_hoisted_9$c,vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(m),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_10$b,[vue.createVNode(x,{form:vue.unref(u),businessType:o.businessType},null,8,["form","businessType"])])]),_:1},8,["loading"])])])]),_:3},8,["visible","width"])}}}),_withScopeId$c=i=>(vue.pushScopeId("data-v-2c08e35e"),i=i(),vue.popScopeId(),i),_hoisted_1$s={class:"flex justify-end"},_hoisted_2$l=_withScopeId$c(()=>vue.createElementVNode("div",{class:"h-px mt-2 mb-2 bg-gray-200"},null,-1)),_hoisted_3$j={class:"overflow-y-auto max-h-96"},_hoisted_4$j=_withScopeId$c(()=>vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",null,"字段名称"),vue.createElementVNode("td",null,"字段描述"),vue.createElementVNode("td",null,"数据类型"),vue.createElementVNode("td",{style:{width:"120px"}},"标题栏名称"),vue.createElementVNode("td",{style:{width:"120px"}},"注解"),vue.createElementVNode("td",{style:{width:"120px"}},"列的宽度"),vue.createElementVNode("td",{style:{width:"100px"}},"排序"),vue.createElementVNode("td",{style:{width:"60px"}},"固定"),vue.createElementVNode("td",{style:{width:"60px"}},"列显示"),vue.createElementVNode("td",{style:{width:"120px"}},"类型"),vue.createElementVNode("td",{style:{width:"120px"}},"额外参数"),vue.createElementVNode("td",{style:{width:"30px"}})])],-1)),_hoisted_5$g={class:"sort-target"},_hoisted_6$e={class:"flex items-center justify-center gap-1"},_hoisted_7$d=_withScopeId$c(()=>vue.createElementVNode("td",null,[vue.createElementVNode("i",{class:"text-lg cursor-move ri-mouse-line sortable-handle text-color-warning"})],-1)),_hoisted_8$d=_withScopeId$c(()=>vue.createElementVNode("i",{class:"mr-1 ri-file-cloud-line"},null,-1)),_sfc_main$w=vue.defineComponent({__name:"dynamicTableCol",props:{model:{default:{}},title:{default:"标题栏配置"}},emits:["success"],setup(i,{emit:n}){const{proxy:r}=vue.getCurrentInstance(),{getDetail:o}=fetch$1(r).model,a=i,l=vue.ref([]),s=vue.ref([]),u=vue.ref(!1),c=vue.ref(!1),d=[{label:"文本",value:"txt"},{label:"字典",value:"dict"},{label:"地图",value:"map"},{label:"图片",value:"img"}],f=n,p=async()=>{c.value=!0,l.value=[];const g=await o(a.model.id);c.value=!1,r.$baseHttp.get(`/api/ace-data-center/custom-dic/options?projectId=${r.$baseGetCurrentProjectId()}`).then(b=>{s.value=b.data});const _=g.data.listModelAttribute,y=JSON.parse(g.data.columnOption||"[]");_.forEach(b=>{const x=y.find(C=>C.prop==b.attributeCode);x?b.columnOption=x:b.columnOption={prop:b.attributeCode,label:b.attributeComment,labelWidth:"",fixed:!1,isShow:!["id","project_id","create_time","create_user","create_dept","_project_id","tag","_create_time","_create_user","_create_dept","_tag","_data_from"].includes(b.attributeCode),sort:"",type:"txt",ext:{}}}),_.sort((b,x)=>b.columnOption.sort-x.columnOption.sort),l.value=_},v=g=>{const _=g.isSortable;l.value.forEach(y=>{y.columnOption.prop!=g.prop&&_&&(y.columnOption.isSortable=!1)})},m=async()=>{const g=[],_=[];if(vue.unref(l).forEach((b,x)=>{const C=b.columnOption;C.sort=x+1,C.type=="dict"?C.ext.dictId||_.push(`${b.attributeComment}字典值为空`):C.ext={},g.push(C)}),_.length>0){r.$message.error(_[0]);return}await r.$baseHttp.post("/api/ace-data-center/model/saveColumnOption",{id:a.model.id,columnOption:JSON.stringify(g)})&&(r.$message.success("操作成功"),u.value=!1,f("success"))};return(g,_)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{"popper-class":"ace-select",placement:"bottom",visible:vue.unref(u),"onUpdate:visible":_[3]||(_[3]=y=>vue.isRef(u)?u.value=y:null),trigger:"click",width:"1200px"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"warning",class:"ml-3",onClick:_[2]||(_[2]=y=>p())},{default:vue.withCtx(()=>[_hoisted_8$d,vue.createTextVNode(" "+vue.toDisplayString(g.title),1)]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$s,[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",onClick:m},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",class:"ml-3",size:"small",onClick:_[0]||(_[0]=y=>u.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("关闭")]),_:1})]),_hoisted_2$l,vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(c),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$j,[vue.createVNode(vue.unref(vueDraggablePlus.VueDraggable),{modelValue:vue.unref(l),"onUpdate:modelValue":_[1]||(_[1]=y=>vue.isRef(l)?l.value=y:null),target:".sort-target",animation:150,handle:".sortable-handle"},{default:vue.withCtx(()=>[vue.createElementVNode("table",null,[_hoisted_4$j,vue.createElementVNode("tbody",_hoisted_5$g,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),y=>(vue.openBlock(),vue.createElementBlock("tr",{key:y.id},[vue.createElementVNode("td",null,vue.toDisplayString(y.attributeCode),1),vue.createElementVNode("td",null,vue.toDisplayString(y.attributeComment),1),vue.createElementVNode("td",null,vue.toDisplayString(y.dataType),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.label,"onUpdate:modelValue":b=>y.columnOption.label=b,placeholder:"名称"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.note,"onUpdate:modelValue":b=>y.columnOption.note=b,placeholder:"注解"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{size:"small",modelValue:y.columnOption.labelWidth,"onUpdate:modelValue":b=>y.columnOption.labelWidth=b,placeholder:"列的宽度"},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createElementVNode("div",_hoisted_6$e,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.isSortable,"onUpdate:modelValue":b=>y.columnOption.isSortable=b,onChange:b=>v(y.columnOption)},null,8,["modelValue","onUpdate:modelValue","onChange"]),y.columnOption.isSortable?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElRadioGroup),{key:0,modelValue:y.columnOption.sortable,"onUpdate:modelValue":b=>y.columnOption.sortable=b,size:"small"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadioButton),{label:"升",value:"ascending"}),vue.createVNode(vue.unref(elementPlus.ElRadioButton),{label:"降",value:"descending"})]),_:2},1032,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.fixed,"onUpdate:modelValue":b=>y.columnOption.fixed=b},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:y.columnOption.isShow,"onUpdate:modelValue":b=>y.columnOption.isShow=b},null,8,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{teleported:!1,size:"small",class:"w-full",modelValue:y.columnOption.type,"onUpdate:modelValue":b=>y.columnOption.type=b,placeholder:"请选择"},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,b=>vue.createVNode(vue.unref(elementPlus.ElOption),{key:b.value,label:b.label,value:b.value},null,8,["label","value"])),64))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,[["dict"].includes(y.columnOption.type)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,teleported:!1,size:"small",modelValue:y.columnOption.ext.dictId,"onUpdate:modelValue":b=>y.columnOption.ext.dictId=b,placeholder:"字典值"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),b=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{label:b.label,value:b.code,key:b.code},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)]),_hoisted_7$d]))),128))])])]),_:1},8,["modelValue"])])]),_:1},8,["loading"])]),_:1},8,["visible"]))}}),dynamicTableCol_vue_vue_type_style_index_0_scoped_2c08e35e_lang="",dynamicTableCol=_export_sfc$2(_sfc_main$w,[["__scopeId","data-v-2c08e35e"]]),_hoisted_1$r={class:"relative pt-2.5"},_sfc_main$v=vue.defineComponent({__name:"insert",props:{model:{default:{}},permission:{default:()=>[]}},emits:["success"],setup(i,{expose:n,emit:r}){const o=r,a=vue.ref(!1),l=vue.ref(null),s=f=>{l.value=f,a.value=!0},u=()=>o("success"),c=vue.inject("masterData"),d=f=>{const p=vue.unref(l).joinFieldMapping.split(":")[0],v=vue.unref(l).joinFieldMapping.split(":")[1];f.dataMap[v]=vue.unref(c)[p]};return n({init:s}),(f,p)=>{const v=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(v,{modelValue:vue.unref(a),"onUpdate:modelValue":p[0]||(p[0]=m=>vue.isRef(a)?a.value=m:null),title:"从表数据编辑",size:"1200px"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$r,[vue.createVNode(_sfc_main$S,{model:vue.unref(l),permission:f.permission,onSuccess:u,paramsCallback:d},null,8,["model","permission"])])]),_:1},8,["modelValue"])}}}),insert_vue_vue_type_style_index_0_scoped_9480ca97_lang="",Insert=_export_sfc$2(_sfc_main$v,[["__scopeId","data-v-9480ca97"]]),_withScopeId$b=i=>(vue.pushScopeId("data-v-0f244db2"),i=i(),vue.popScopeId(),i),_hoisted_1$q={class:"mt-2.5 mb-2.5"},_hoisted_2$k={class:"flex items-center justify-between"},_hoisted_3$i={key:0,class:"relative"},_hoisted_4$i={key:0},_hoisted_5$f=_withScopeId$b(()=>vue.createElementVNode("i",{class:"ri-add-line"},null,-1)),_sfc_main$u=vue.defineComponent({__name:"slave",props:{model:{default:{}},permission:{default:()=>[]}},setup(i){const n=i,r=vue.inject("masterData"),o=()=>{s.value=!1,setTimeout(()=>s.value=!0,10)},a=vue.ref(null),l=vue.ref(""),s=vue.ref(!0);vue.nextTick(()=>{l.value=n.model.slaveModels[0].id});const u=vue.computed(()=>n.model.slaveModels.find(c=>c.id==vue.unref(l)));return vue.watch(l,c=>{}),(c,d)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$q,[vue.createElementVNode("div",_hoisted_2$k,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(c.model.slaveModels,(f,p)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:f.id==vue.unref(l)?"primary":"",onClick:v=>l.value=f.id},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(f.modelName),1)]),_:2},1032,["type","onClick"]))),256))]),_:1})]),vue.unref(u)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$i,[vue.unref(s)?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$i,[vue.createVNode(_sfc_main$s,{model:vue.unref(u),permission:c.permission,masterData:vue.unref(r)},{btns:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(u).publishStatus=="1",type:"primary",class:"flex items-center mr-2",onClick:d[0]||(d[0]=f=>vue.unref(a).init(vue.unref(u)))},{default:vue.withCtx(()=>[_hoisted_5$f,vue.createTextVNode(" 新增数据 ")]),_:1},8,["disabled"])]),_:1},8,["model","permission","masterData"])])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)]),vue.createVNode(Insert,{ref_key:"insertRef",ref:a,masterId:"",model:c.model,permission:c.permission,onSuccess:o},null,8,["model","permission"])],64))}}),slave_vue_vue_type_style_index_0_scoped_0f244db2_lang="",ModelSlave=_export_sfc$2(_sfc_main$u,[["__scopeId","data-v-0f244db2"]]),_hoisted_1$p={class:"p-4"},_sfc_main$t=vue.defineComponent({__name:"view",props:{model:{default:{}},permission:{default:()=>[]}},setup(i,{expose:n}){const r=i,{loading:o,colValue:a,formData:l,init:s}=useInsertForm(r.model.id),u=vue.ref(!1),c=vue.ref({});return vue.provide("masterData",c),n({init:f=>{u.value=!0,c.value=f,s(f,"update")}}),(f,p)=>{const v=vue.resolveComponent("aceHeader"),m=vue.resolveComponent("AppForm"),g=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(g,{modelValue:vue.unref(u),"onUpdate:modelValue":p[0]||(p[0]=_=>vue.isRef(u)?u.value=_:null),title:"主从详情数据",size:"90%"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{animated:"",loading:vue.unref(o)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),_=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:_.key},[_.key?(vue.openBlock(),vue.createBlock(v,{key:0,title:_.key},null,8,["title"])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_1$p,[vue.createVNode(m,{form:_.list,col:vue.unref(a),disabled:""},null,8,["form","col"])])],64))),128)),vue.createVNode(ModelSlave,{model:f.model,permission:f.permission},null,8,["model","permission"])]),_:1},8,["loading"])]),_:1},8,["modelValue"])}}}),_hoisted_1$o={class:"relative"},_hoisted_2$j={class:"absolute right-0 flex items-center -top-10"},_hoisted_3$h=vue.createElementVNode("i",{class:"mr-1 ri-file-upload-line"},null,-1),_hoisted_4$h=vue.createElementVNode("i",{class:"mr-1 ri-file-history-line"},null,-1),_sfc_main$s=vue.defineComponent({__name:"model-data",props:{model:{default:{}},masterData:{default:null},permission:{default:()=>[]}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref([]),l=d=>{a.value=d},s=d=>{const{data:f}=d;f.forEach(p=>{var m;(((m=n.model)==null?void 0:m.slaveModels)??[]).some(g=>g.parentModelId)&&p.htmlButton.unshift({name:"详情",key:"viewBTN",type:"primary",icon:"ri-file-2-line"})})},u=d=>{const{type:f,row:p}=d;if(f=="viewBTN"){const v={};n.model.listModelAttribute.forEach(m=>{v[m.mapCode]=p[m.attributeCode]}),vue.unref(o).init(v,"update")}},c=d=>{const{joinFieldMapping:f}=n.model;if(n.model.joinFieldMapping&&n.masterData){const p=f.split(":")[0],v=f.split(":")[1];d.params[v]=n.masterData[p]}return d};return(d,f)=>{var m,g,_;const p=vue.resolveComponent("AppTable"),v=vue.resolveComponent("aceDynamicList");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$o,[vue.createElementVNode("div",_hoisted_2$j,[vue.renderSlot(d.$slots,"btns"),vue.createVNode(_sfc_main$x,{ref:"modelSearchSettingRef",menu:[],businessType:"model",businessId:(m=d.model)==null?void 0:m.id,onSuccess:f[0]||(f[0]=y=>vue.unref(r).$refs.aceDynamicListRef.init())},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"success"},{default:vue.withCtx(()=>[_hoisted_3$h,vue.createTextVNode(" 查询配置 ")]),_:1})]),attr:vue.withCtx(()=>[vue.createVNode(p,{maxHeight:"250px",tableData:[{label:"标识符",prop:"prop"},{label:"字段名",prop:"label"}],list:vue.unref(a)},null,8,["list"])]),_:1},8,["businessId"]),vue.createVNode(dynamicTableCol,{model:d.model,onSuccess:f[1]||(f[1]=y=>vue.unref(r).$refs.aceDynamicListRef.init())},null,8,["model"]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-3",onClick:f[2]||(f[2]=y=>vue.unref(r).$refs.aceDynamicListRef.handleExport())},{default:vue.withCtx(()=>[_hoisted_4$h,vue.createTextVNode(" 导出EXCEL ")]),_:1}),vue.createVNode(_sfc_main$t,{ref_key:"modelSlaveViewRef",ref:o,model:d.model,permission:d.permission},null,8,["model","permission"])])]),vue.createVNode(v,{id:(g=d.model)==null?void 0:g.id,title:(_=d.model)==null?void 0:_.modelName,showPageIndex:!0,isDownLoad:!1,onTableHeader:l,formatParamsFunc:c,isDelete:d.permission.includes("DATA_DEL")&&d.model.modelLayer!="ODSVIEW"&&!d.model.shadowModelId,isEdit:d.model.openForm==2&&d.permission.includes("DATA_EDIT"),ref:"aceDynamicListRef",onBtnClick:u,onSuccessList:s},null,8,["id","title","isDelete","isEdit"])],64)}}}),_withScopeId$a=i=>(vue.pushScopeId("data-v-f8180b79"),i=i(),vue.popScopeId(),i),_hoisted_1$n={class:"flex flex-1 gap-2.5 overflow-hidden"},_hoisted_2$i={class:"flex-1 flex flex-col gap-2.5 overflow-hidden"},_hoisted_3$g={class:"flex flex-col flex-1"},_hoisted_4$g={class:"h"},_hoisted_5$e=_withScopeId$a(()=>vue.createElementVNode("div",{class:"h-item active"},"①SQL编写",-1)),_hoisted_6$d={class:"ml-2 text-xs text-color-info"},_hoisted_7$c={class:"text-color-warning"},_hoisted_8$c={class:"flex justify-end flex-1 overflow-hidden"},_hoisted_9$b=_withScopeId$a(()=>vue.createElementVNode("i",{class:"mr-1 ri-play-mini-fill"},null,-1)),_hoisted_10$a={class:"b"},_hoisted_11$8={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_12$6={class:"h"},_hoisted_13$5=["onClick"],_hoisted_14$4={class:"b"},_hoisted_15$1={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_16$1={class:"h"},_hoisted_17$1=_withScopeId$a(()=>vue.createElementVNode("div",{class:"h-item active"},"② 补跑数据配置",-1)),_hoisted_18$1={class:"ml-2 text-xs text-color-info"},_hoisted_19$1={class:"b"},_hoisted_20$1={class:"h-full overflow-y-auto flex flex-col gap-2.5"},_hoisted_21$1=_withScopeId$a(()=>vue.createElementVNode("div",null,[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"set字段映射")],-1)),_hoisted_22$1={style:{width:"50px"}},_hoisted_23$1=_withScopeId$a(()=>vue.createElementVNode("td",null,"补跑数据字段",-1)),_hoisted_24$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"50px"},null,-1)),_hoisted_25$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"80px"},null,-1)),_hoisted_26$1=_withScopeId$a(()=>vue.createElementVNode("td",{width:"200px"},"映射字段",-1)),_hoisted_27=["onClick"],_hoisted_28={key:0},_hoisted_29=_withScopeId$a(()=>vue.createElementVNode("td",{colspan:"5"},"暂无数据",-1)),_hoisted_30=[_hoisted_29],_hoisted_31=_withScopeId$a(()=>vue.createElementVNode("div",{class:"flex items-center"},[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"where条件映射")],-1)),_hoisted_32={style:{width:"50px"}},_hoisted_33=_withScopeId$a(()=>vue.createElementVNode("td",null,"补跑数据字段",-1)),_hoisted_34=_withScopeId$a(()=>vue.createElementVNode("td",{width:"50px"},null,-1)),_hoisted_35=_withScopeId$a(()=>vue.createElementVNode("td",{width:"80px"},null,-1)),_hoisted_36=_withScopeId$a(()=>vue.createElementVNode("td",{width:"200px"},"映射字段",-1)),_hoisted_37=["onClick"],_hoisted_38={key:0},_hoisted_39=_withScopeId$a(()=>vue.createElementVNode("td",{colspan:"5"},"暂无数据",-1)),_hoisted_40=[_hoisted_39],_hoisted_41=_withScopeId$a(()=>vue.createElementVNode("i",{class:"ri-play-fill"},null,-1)),_hoisted_42={key:0},_hoisted_43=_withScopeId$a(()=>vue.createElementVNode("div",null,[vue.createElementVNode("span",{class:"text-red-500"},"*"),vue.createElementVNode("strong",null,"方案名称")],-1)),_sfc_main$r=vue.defineComponent({__name:"model-clean-design",props:{model:{default:null}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),{openMessage:s}=l.$globalHooks.useMessage(),u=vue.inject("projectList"),c=vue.computed(()=>{var N,O;return((O=(N=(vue.unref(u)??[]).find(I=>I.value==l.$baseGetCurrentProjectId()))==null?void 0:N.ext)==null?void 0:O.storeType)??"-"}),d=[{label:"SQL执行结果",value:"1"},{label:"SQL执行结果(JSON)",value:"2"}],f=vue.ref("1"),p=vue.ref(!1),v=vue.ref(""),m=vue.ref([]),g=vue.ref(!1),_=vue.ref(""),y=vue.ref([]),b=vue.ref(-1),x=vue.ref(""),C=vue.ref([]),w=vue.ref([]),E=vue.ref(""),$=["project_id","create_time","create_user","create_dept","_project_id","tag","_create_time","_create_user","_create_dept","_tag","_data_from"],S=vue.computed(()=>(o.model.listModelAttribute??[]).filter(N=>!$.includes(N.attributeCode))),V=vue.computed(()=>(vue.unref(y).length?Object.keys(vue.unref(y)[0]):[]).filter(N=>!$.includes(N))),k=(N={})=>{p.value=!0,v.value="",C.value=(N==null?void 0:N.setFieldMapping)??[],w.value=(N==null?void 0:N.whereFieldMapping)??[],_.value=(N==null?void 0:N.sqlScript)??"",y.value=[],x.value=(N==null?void 0:N.name)??"",E.value=(N==null?void 0:N.id)??"",N.sqlScript&&P(!1),b.value=-1,l.$baseHttp.get("/api/ace-data-center/data-source/options?type=3").then(O=>{m.value=O.data})},P=async(N=!0)=>{g.value=!0;const O={dataSourceId:vue.unref(v),extractSql:vue.unref(_),projectId:l.$baseGetCurrentProjectId()};N&&(C.value=[],w.value=[]);const I=await l.$baseHttp.post("/api/ace-data-center/db-extract/dbExtractDebug",O);g.value=!1,I&&(y.value=I.data,N&&(s({type:"success",message:"执行成功"}),vue.unref(V).forEach(L=>{const D=vue.unref(S).find(F=>F.attributeCode==L);D&&C.value.push({mainTableFiled:D.attributeCode,tempTableField:L,operator:"=",constantFlag:1})})))},B=async()=>{const N=await l.$baseHttp.post("/api/ace-data-center/model-cleaning/debug",{modelId:o.model.id,tempTableSql:vue.unref(_),setFieldMapping:JSON.stringify(vue.unref(C)),whereFieldMapping:JSON.stringify(vue.unref(w))},{headers:{loading:!0}});N&&(b.value=N.data)},T=async()=>{const N={sqlScript:vue.unref(_),dataSourceId:v.value,modelId:o.model.id,name:vue.unref(x),projectId:l.$baseGetCurrentProjectId(),setFieldMapping:JSON.stringify(vue.unref(C)),whereFieldMapping:JSON.stringify(vue.unref(w))};if(N.name===""){s({type:"warning",message:"请填写方案名称"});return}if(!vue.unref(C)||!vue.unref(w)){s({type:"warning",message:"set字段映射或where字段映射必须大于0个"});return}if(Object.values(vue.unref(C)).some(I=>Object.values(I).some(L=>L===""))){s({type:"warning",message:"set字段映射存在空数据"});return}if(Object.values(vue.unref(w)).some(I=>Object.values(I).some(L=>L===""))){s({type:"warning",message:"where字段映射存在空数据"});return}vue.unref(E)&&(N.id=vue.unref(E)),await l.$baseHttp.post(`/api/ace-data-center/model-cleaning/${vue.unref(E)?"update":"save"}`,N,{headers:{loading:!0}})&&(l.$message.success("操作成功"),p.value=!1,a("success"))};return n({init:k}),(N,O)=>{const I=vue.resolveComponent("AppCodemirror"),L=vue.resolveComponent("AppTable"),D=vue.resolveComponent("AppJson"),F=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(F,{modelValue:vue.unref(p),"onUpdate:modelValue":O[8]||(O[8]=M=>vue.isRef(p)?p.value=M:null),title:"①SQL编写抽取数据 -> ②补跑数据配置",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:T},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(E)?"保存":"新增"),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:O[7]||(O[7]=M=>p.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>{var M;return[vue.createElementVNode("div",_hoisted_1$n,[vue.createElementVNode("div",_hoisted_2$i,[vue.createElementVNode("div",_hoisted_3$g,[vue.createElementVNode("div",_hoisted_4$g,[_hoisted_5$e,vue.createElementVNode("span",_hoisted_6$d,[vue.createTextVNode(" 当前数据仓库为: "),vue.createElementVNode("span",_hoisted_7$c,vue.toDisplayString(vue.unref(c)),1),vue.createTextVNode(" 注意sql语法 ")]),vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(v),"onUpdate:modelValue":O[0]||(O[0]=R=>vue.isRef(v)?v.value=R:null),placeholder:"请选择数据源选项",clearable:!0,"popper-class":"ace-select",class:"w-40 ml-2",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(m),R=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:R.code,label:R.label,value:R.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_8$c,[vue.createVNode(vue.unref(elementPlus.ElLink),{disabled:vue.unref(g),type:"warning",class:"flex items-center",onClick:O[1]||(O[1]=R=>P())},{default:vue.withCtx(()=>[_hoisted_9$b,vue.createTextVNode(" 执行SQL ")]),_:1},8,["disabled"])])]),vue.createElementVNode("div",_hoisted_10$a,[vue.createVNode(I,{extensions:"sql",modelValue:vue.unref(_),"onUpdate:modelValue":O[2]||(O[2]=R=>vue.isRef(_)?_.value=R:null),style:{height:"100%"}},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_11$8,[vue.createElementVNode("div",_hoisted_12$6,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,R=>vue.createElementVNode("span",{class:vue.normalizeClass(["h-item",{active:vue.unref(f)==R.value}]),onClick:z=>f.value=R.value},vue.toDisplayString(R.label),11,_hoisted_13$5)),64))]),vue.createElementVNode("div",_hoisted_14$4,[vue.unref(f)=="1"?(vue.openBlock(),vue.createBlock(L,{key:0,tableData:(M=vue.unref(y))!=null&&M.length?Object.keys(vue.unref(y)[0]).map(R=>({label:R,prop:R})):[],list:vue.unref(y)??[]},null,8,["tableData","list"])):vue.createCommentVNode("",!0),vue.unref(f)=="2"?(vue.openBlock(),vue.createBlock(D,{key:1,style:{height:"100%"},modelValue:vue.unref(y),"onUpdate:modelValue":O[3]||(O[3]=R=>vue.isRef(y)?y.value=R:null)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])])]),vue.createElementVNode("div",_hoisted_15$1,[vue.createElementVNode("div",_hoisted_16$1,[_hoisted_17$1,vue.createElementVNode("span",_hoisted_18$1," 模型:"+vue.toDisplayString(o.model.modelName)+"【"+vue.toDisplayString(o.model.modelCode)+"】 ",1)]),vue.createElementVNode("div",_hoisted_19$1,[vue.createElementVNode("div",_hoisted_20$1,[_hoisted_21$1,vue.createElementVNode("table",null,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",_hoisted_22$1,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:O[4]||(O[4]=R=>vue.unref(C).push({mainTableFiled:"",operator:"=",constantFlag:1,tempTableField:""}))})]),_hoisted_23$1,_hoisted_24$1,_hoisted_25$1,_hoisted_26$1])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(C),(R,z)=>(vue.openBlock(),vue.createElementBlock("tr",null,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{onClick:U=>vue.unref(C).splice(z,1),class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger"},null,8,_hoisted_27)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.mainTableFiled,"onUpdate:modelValue":U=>R.mainTableFiled=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(S),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U.attributeCode,label:`${U.attributeCode}${U.attributeComment?`【${U.attributeComment}】`:""}`,disabled:vue.unref(C).some(G=>G.mainTableFiled===U.attributeCode),value:U.attributeCode},null,8,["label","disabled","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(R.operator),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.constantFlag,"onUpdate:modelValue":U=>R.constantFlag=U,placeholder:"请选择类型",size:"small",onChange:U=>R.tempTableField=""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElOption),{label:"字段",value:1}),vue.createVNode(vue.unref(elementPlus.ElOption),{label:"常量",value:0})]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[R.constantFlag==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(V),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElInput),{key:1,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请输入字段",size:"small"},null,8,["modelValue","onUpdate:modelValue"]))])]))),256)),vue.unref(C).length?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_28,_hoisted_30))]),_hoisted_31,vue.createElementVNode("table",null,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[vue.createElementVNode("td",_hoisted_32,[vue.createElementVNode("i",{class:"text-lg cursor-pointer ri-add-circle-line text-color-primary",onClick:O[5]||(O[5]=R=>vue.unref(w).push({mainTableFiled:"",operator:"=",constantFlag:1,tempTableField:""}))})]),_hoisted_33,_hoisted_34,_hoisted_35,_hoisted_36])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(w),(R,z)=>(vue.openBlock(),vue.createElementBlock("tr",null,[vue.createElementVNode("td",null,[vue.createElementVNode("i",{onClick:U=>vue.unref(w).splice(z,1),class:"text-lg cursor-pointer ri-indeterminate-circle-line text-color-danger"},null,8,_hoisted_37)]),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.mainTableFiled,"onUpdate:modelValue":U=>R.mainTableFiled=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(S),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U.attributeCode,label:`${U.attributeCode}${U.attributeComment?`【${U.attributeComment}】`:""}`,disabled:vue.unref(w).some(G=>G.mainTableFiled===U.attributeCode),value:U.attributeCode},null,8,["label","disabled","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("td",null,vue.toDisplayString(R.operator),1),vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:R.constantFlag,"onUpdate:modelValue":U=>R.constantFlag=U,placeholder:"请选择类型",size:"small",onChange:U=>R.tempTableField=""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElOption),{label:"字段",value:1}),vue.createVNode(vue.unref(elementPlus.ElOption),{label:"常量",value:0})]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),vue.createElementVNode("td",null,[R.constantFlag==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSelect),{key:0,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请选择字段",size:"small"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(V),U=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElInput),{key:1,modelValue:R.tempTableField,"onUpdate:modelValue":U=>R.tempTableField=U,placeholder:"请输入字段",size:"small"},null,8,["modelValue","onUpdate:modelValue"]))])]))),256)),vue.unref(w).length?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("tr",_hoisted_38,_hoisted_40))]),vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElButton),{disabled:!vue.unref(C).length||!vue.unref(w).length,type:"primary",plain:"",size:"small",onClick:B},{default:vue.withCtx(()=>[_hoisted_41,vue.createTextVNode(" 结果预览 ")]),_:1},8,["disabled"])]),vue.unref(b)>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_42,[vue.createVNode(vue.unref(elementPlus.ElAlert),{type:"warning","show-icon":"",title:`将被影响的条数:${vue.unref(b)}条`,closable:!1},null,8,["title"])])):vue.createCommentVNode("",!0),_hoisted_43,vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(x),"onUpdate:modelValue":O[6]||(O[6]=R=>vue.isRef(x)?x.value=R:null),placeholder:"请输入方案名称"},null,8,["modelValue"])])])])])])]}),_:1},8,["modelValue"])}}}),modelCleanDesign_vue_vue_type_style_index_0_scoped_f8180b79_lang="",ModelCleanDesign=_export_sfc$2(_sfc_main$r,[["__scopeId","data-v-f8180b79"]]),_sfc_main$q=vue.defineComponent({__name:"model-clean",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=`/api/ace-data-center/model-cleaning/list?modelId=${n.model.id}&projectId=${r.$baseGetCurrentProjectId()}`,c=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),d=vue.reactive([{label:"方案名称",prop:"name"},{label:"类型",prop:"extractType",slot:!0},{label:"操作",prop:"htmlButton",fixed:"right"}]),f=v=>{v.data.forEach(m=>{m.htmlButton=[],m.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),m.htmlButton.push({name:"复制",key:"COPY",type:"primary",icon:"ri-file-copy-line"}),m.htmlButton.push({name:"清洗记录",key:"LOG",type:"primary",icon:"ri-file-line"}),m.taskDefinedId&&m.htmlButton.push({name:"作业调度日志",key:"TASK-LOG",type:"primary",icon:"ri-file-line"}),m.htmlButton.push({name:"清洗",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),m.setFieldMapping&&(m.setFieldMapping=JSON.parse(m.setFieldMapping)),m.whereFieldMapping&&(m.whereFieldMapping=JSON.parse(m.whereFieldMapping)),m.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},p=v=>{const{type:m,row:g}=v;switch(m){case"ADD":case"COPY":case"EDIT":vue.unref(a).init(JSON.parse(JSON.stringify({...g,id:m=="EDIT"?g.id:""})));break;case"LOG":vue.unref(s).init({businessId:g.id,businessType:"cleaning_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK-LOG":vue.unref(l).init(g.taskDefinedId??"");break;case"PUSH":r.$baseConfirm({content:"是否数据清洗?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/model-cleaning/execute/${g.id}`,{},{headers:{loading:!0}})&&r.$message.success("操作成功")}});break;case"DEL":r.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/model-cleaning/remove/${g.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break}};return(v,m)=>{const g=vue.resolveComponent("appList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:o,url:u,tableData:vue.unref(d),searchBtns:vue.unref(c),onSuccess:f,onBtnClick:p},{extractType:vue.withCtx(({row:_})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("规则补数")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(_sfc_main$z,{ref_key:"taskLogRef",ref:l},null,512),vue.createVNode(ModelCleanDesign,{model:v.model,ref_key:"modelCleanDesign",ref:a,onSuccess:m[0]||(m[0]=_=>vue.unref(o).getData())},null,8,["model"]),vue.createVNode(_sfc_main$F,{ref_key:"modelExtractLogRef",ref:s,title:"清洗日志"},null,512)]),_:1},8,["tableData","searchBtns"])}}}),_sfc_main$p=vue.defineComponent({__name:"dataSync",props:{model:{default:{}}},setup(i){const{proxy:n}=vue.getCurrentInstance(),{openMessage:r}=n.$globalHooks.useMessage(),o=i,a=vue.reactive([{name:"新增",key:"ADD",type:"primary",icon:"ri-add-line"}]),l=vue.ref(null),s=vue.ref(null),u=vue.ref(null),c=vue.ref(null),d=vue.computed(()=>`/api/ace-data-center/db-extract/list?modelId=${o.model.id}&projectId=${n.$baseGetCurrentProjectId()}`),f=vue.reactive([{label:"抽取方案名称",prop:"extractName"},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"操作",prop:"htmlButton",fixed:"right",width:"200px"}]),p=m=>{m.data.forEach(g=>{g.htmlButton=[],g.htmlButton.push({name:"编辑",key:"EDIT",type:"primary",icon:"ri-edit-line"}),g.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),[1,2].includes(g.extractType)&&g.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),g.htmlButton.push({name:"删除",key:"DEL",type:"danger",icon:"ri-delete-bin-6-line"})})},v=async m=>{const{type:g,row:_,index:y}=m;switch(g){case"history":vue.unref(u).init({ajaxUrl:`/api/ace-data-center/extract-log/modelSyncHistory?descs=create_time&modelId=${_.modelSyncDetail.modelId}`,table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"LOG":vue.unref(u).init({businessId:_.id,businessType:"db_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"协同参数",prop:"collaborateValue"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"PUSH":n.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/db-extract/extract/${_.id}`,{},{headers:{loading:!0}})&&r({type:"success",message:"操作成功"})}});break;case"DEL":n.$baseConfirm({content:"是否删除?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/db-extract/removeById/${_.id}`,{},{headers:{loading:!0}})&&(r({type:"success",message:"操作成功"}),vue.unref(l).getData())}});break;case"EDIT":const b=await n.$baseHttp.get(`/api/ace-data-center/db-extract/detailAndTask?dbExtractId=${_.id}`);if(!b)return;vue.unref(s).init(b.data);break;case"ADD":vue.unref(s).init({dataSourceId:o.model.dataSourceId,modelId:o.model.modelId});break}};return(m,g)=>{const _=vue.resolveComponent("aceModelExtractLog"),y=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(y,{tableData:vue.unref(f),url:vue.unref(d),searchBtns:vue.unref(a),ref_key:"appListRef",ref:l,onBtnClick:v,onSuccess:p},{default:vue.withCtx(()=>[vue.createVNode(_sfc_main$19,{ref_key:"settingRef",ref:s,onRefresh:g[0]||(g[0]=b=>vue.unref(l).getData({clear:!0}))},null,512),vue.createVNode(_,{ref_key:"extractLogRef",ref:u},null,512),vue.createVNode(_sfc_main$1a,{ref_key:"sourceTableDataRef",ref:c},null,512)]),_:1},8,["tableData","url","searchBtns"])}}}),_hoisted_1$m={class:"relative h-40"},_hoisted_2$h={class:"absolute right-3 top-1"},_hoisted_3$f={class:"flex flex-col gap-2.5"},_hoisted_4$f={class:"h-40"},_hoisted_5$d={class:"flex justify-end"},_sfc_main$o=vue.defineComponent({__name:"insertBtn",props:vue.mergeModels({example:{default:""},disabled:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const n=i,r=vue.useModel(i,"modelValue"),o=()=>{r.value=n.example};return(a,l)=>{const s=vue.resolveComponent("AppCodemirror");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,[vue.createVNode(s,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),style:{height:"100%"}},null,8,["modelValue"]),n.disabled?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,width:"500px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$h,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("填充示例")]),_:1})])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_3$f,[vue.createElementVNode("div",_hoisted_4$f,[vue.createVNode(s,{diasbled:n.disabled,modelValue:n.example,"onUpdate:modelValue":l[1]||(l[1]=u=>n.example=u),style:{height:"100%"}},null,8,["diasbled","modelValue"])]),vue.createElementVNode("div",_hoisted_5$d,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:o},{default:vue.withCtx(()=>[vue.createTextVNode("复制到编辑框")]),_:1})])])]),_:1}))])}}}),_withScopeId$9=i=>(vue.pushScopeId("data-v-734dfa7a"),i=i(),vue.popScopeId(),i),_hoisted_1$l={class:"flex flex-1 gap-2.5"},_hoisted_2$g={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$e=_withScopeId$9(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 请求设置 ")])],-1)),_hoisted_4$e={class:"b"},_hoisted_5$c={class:"flex flex-col w-full gap-1"},_hoisted_6$c={class:"flex flex-col w-full"},_hoisted_7$b={class:"w-full"},_hoisted_8$b={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_9$a=_withScopeId$9(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 返回设置 ")])],-1)),_hoisted_10$9={class:"b"},_hoisted_11$7={class:"w-full"},_hoisted_12$5={class:"w-full"},_hoisted_13$4=_withScopeId$9(()=>vue.createElementVNode("i",{class:"ri-play-large-fill"},null,-1)),_sfc_main$n=vue.defineComponent({__name:"serverView",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref({}),u=vue.ref([]),c=vue.ref("header"),d=[{label:"请求头",value:"header"},{label:"请求参数",value:"parameters"},{label:"请求body",value:"body"}],f=vue.ref(!1),p=vue.ref(!1),v=vue.computed(()=>vue.unref(s).apiName===""||vue.unref(s).url===""||vue.unref(s).responseObjectCode===""||vue.unref(s).requestType===""),m=async(y,b=!1)=>{if(c.value="header",p.value=!1,f.value=b,s.value={apiName:"",url:"",jsModule:[],requestType:"GET",preApiId:"",header:"",parameters:"",body:"",isPages:0,pagesEndCondition:"",successCondition:"",responseObjectCode:"",extractPluginScript:"",clearBeforeExt:!1,id:""},y){const x=await a.$baseHttp.get(`/api/ace-data-center/invoke-api-extract/detail?id=${y}`,{headers:{loading:!0}});Object.keys(s.value).forEach(C=>{let w=x.data[C]??"";C=="jsModule"&&(w===""?w=[]:w=w.split(",")),s.value[C]=w})}l.value=!0,a.$baseHttp.get("/api/ace-data-center/invoke-pre-api/options").then(x=>{u.value=x.data})},g=async()=>{await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submit",{...vue.unref(s),projectId:a.$baseGetCurrentProjectId(),jsModule:(vue.unref(s).jsModule??"").toString()},{headers:{loading:!0}})&&(a.$message.success("操作成功"),l.value=!1,o("success"))},_=async()=>{var b;await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/debug",{...vue.unref(s),jsModule:(((b=vue.unref(s))==null?void 0:b.jsModule)??"").toString()},{headers:{loading:!0}})&&(p.value=!0)};return n({init:m}),(y,b)=>{const x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(l),"onUpdate:modelValue":b[15]||(b[15]=C=>vue.isRef(l)?l.value=C:null),title:"数据接口",size:"100%"},vue.createSlots({default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$l,[vue.createElementVNode("div",_hoisted_2$g,[_hoisted_3$e,vue.createElementVNode("div",_hoisted_4$e,[vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口名称",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).apiName,"onUpdate:modelValue":b[0]||(b[0]=C=>vue.unref(s).apiName=C),placeholder:"请输入接口名称",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"引入第三方JS库"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(s).jsModule,"onUpdate:modelValue":b[1]||(b[1]=C=>vue.unref(s).jsModule=C),"popper-class":"ace-select",placeholder:"请选择需引入的第三方JS库",disabled:vue.unref(f),multiple:"",clearable:"",filterable:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a).$globalDict.jsModuleOptions,C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口URL",required:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$c,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(s).requestType,"onUpdate:modelValue":b[2]||(b[2]=C=>vue.unref(s).requestType=C),disabled:vue.unref(f)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"GET"},{default:vue.withCtx(()=>[vue.createTextVNode("GET")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"POST"},{default:vue.withCtx(()=>[vue.createTextVNode("POST")]),_:1})]),_:1},8,["modelValue","disabled"]),vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).url,"onUpdate:modelValue":b[3]||(b[3]=C=>vue.unref(s).url=C),disabled:vue.unref(f),example:`function plugin(){
628
628
  return 'http://127.0.0.1:8080/api/xxxxPage';
629
629
  }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"依赖前置接口"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{"popper-class":"ace-select",modelValue:vue.unref(s).preApiId,"onUpdate:modelValue":b[4]||(b[4]=C=>vue.unref(s).preApiId=C),placeholder:"请输入依赖前置接口",disabled:vue.unref(f)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"请求参数"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_6$c,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,C=>vue.createVNode(vue.unref(elementPlus.ElButton),{type:vue.unref(c)==C.value?"primary":"",onClick:w=>c.value=C.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.label),1)]),_:2},1032,["type","onClick"])),64))]),_:1}),vue.unref(c)=="header"?(vue.openBlock(),vue.createBlock(_sfc_main$o,{key:0,modelValue:vue.unref(s).header,"onUpdate:modelValue":b[5]||(b[5]=C=>vue.unref(s).header=C),disabled:vue.unref(f),example:`function plugin(){
630
630
  var data = {};
@@ -660,7 +660,7 @@ ${p} div ,${p} span,${p} a,${p} * {
660
660
  }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"ETL插件编写"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_12$5,[vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).extractPluginScript,"onUpdate:modelValue":b[12]||(b[12]=C=>vue.unref(s).extractPluginScript=C),disabled:vue.unref(f),example:`function plugin(item){
661
661
  var data=JSON.parse(item);
662
662
  return JSON.stringify(data);
663
- }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"清空历史数据",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:vue.unref(s).clearBeforeExt,"onUpdate:modelValue":b[13]||(b[13]=C=>vue.unref(s).clearBeforeExt=C),"active-value":1,"inactive-value":0,disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"success",onClick:_,disabled:vue.unref(v)},{default:vue.withCtx(()=>[_hoisted_13$4,vue.createTextVNode(" 调试接口 ")]),_:1},8,["disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.unref(p)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAlert),{key:0,type:"success",description:"接口调试成功","show-icon":"",closable:!1})):vue.createCommentVNode("",!0)]),_:1})])])])]),_:2},[vue.unref(f)?void 0:{name:"footer",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",disabled:vue.unref(v),type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(" 保存 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[14]||(b[14]=C=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),key:"0"}]),1032,["modelValue"])}}}),serverView_vue_vue_type_style_index_0_scoped_5d4941e4_lang="",ServerView=_export_sfc$2(_sfc_main$n,[["__scopeId","data-v-5d4941e4"]]),_hoisted_1$k=vue.createElementVNode("i",{class:"ri-eye-line"},null,-1),_sfc_main$m=vue.defineComponent({__name:"api",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=vue.reactive([]),c=vue.reactive([]),d=vue.ref(!1),f=vue.ref(""),p=vue.ref(""),v=vue.reactive([{label:"接口名称",prop:"apiName",slot:!0},{label:"状态",prop:"invokeStatus",slot:!0},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"接口操作",prop:"htmlButton",fixed:"right"}]),m=y=>{y.data.forEach(b=>{b.htmlButton=[],b.htmlButton.push({name:"作业配置",key:"TASK",type:"primary",icon:"ri-settings-2-line"}),[1,2].includes(b.extractType)&&b.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),b.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),b.htmlButton.push({name:b.invokeStatus?"停用":"启用",key:b.invokeStatus?"stop":"start",type:b.invokeStatus?"danger":"success",icon:b.invokeStatus?"ri-pause-circle-line":"ri-play-circle-line"})})},g=async y=>{const{type:b,row:x}=y;switch(b){case"view":case"edit":vue.unref(a).init(x.id,b==="view");break;case"start":case"stop":r.$baseConfirm({content:"是否确定操作",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/changeInvokeStatus/${x.id}/${x.invokeStatus?0:1}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"remove":r.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/remove?ids=${x.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"PUSH":r.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/extract?id=${x.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"LOG":vue.unref(l).init({businessId:x.id,businessType:"invoke_api_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK":d.value=!0,f.value=x.id,p.value=x.taskDefinedId;let C;if(x.taskDefinedId){const w=await r.$baseHttp.get(`/api/ace-api/blade-system/task-defined/detail?id=${x.taskDefinedId}`,{headers:{loading:!0}});if(!w)return;C=w.data}vue.nextTick(()=>{vue.unref(s).init(C??{})});break}},_=async()=>{const{params:y,error:b}=vue.unref(s).getForm();if(b.length>0){r.$message.warning("作业配置有误");return}const x={invokeApiExtractId:vue.unref(f),modelId:n.model.id,taskDefined:y};vue.unref(p)&&(x.taskDefined.id=vue.unref(p)),await r.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submitApiExtractTask",x,{headers:{loading:!0}})&&(r.$message.success("操作成功"),d.value=!1,vue.unref(o).getData())};return(y,b)=>{const x=vue.resolveComponent("aceModelExtractLog"),C=vue.resolveComponent("AppTaskDesign"),w=vue.resolveComponent("AppDialog"),E=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(E,{ref_key:"appRef",ref:o,searchForm:vue.unref(c),tableData:vue.unref(v),searchBtns:vue.unref(u),url:`/api/ace-data-center/invoke-api-extract/page?modelId=${n.model.id}`,onSuccess:m,onBtnClick:g},{invokeStatus:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:$.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString($.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),apiName:vue.withCtx(({row:$,index:S})=>[vue.createTextVNode(vue.toDisplayString($.apiName)+" ",1),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-2.5",onClick:V=>g({type:"view",row:$,index:S})},{default:vue.withCtx(()=>[_hoisted_1$k,vue.createTextVNode(" 查看 ")]),_:2},1032,["onClick"])]),default:vue.withCtx(()=>[vue.createVNode(ServerView,{ref_key:"serverRef",ref:a,onSuccess:b[0]||(b[0]=$=>vue.unref(o).getData())},null,512),vue.createVNode(x,{ref_key:"modelExtractLogRef",ref:l},null,512),vue.createVNode(w,{modelValue:vue.unref(d),"onUpdate:modelValue":b[2]||(b[2]=$=>vue.isRef(d)?d.value=$:null),title:"配置",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:_},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[1]||(b[1]=$=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(C,{ref_key:"taskDesignRef",ref:s},null,512)]),_:1},8,["modelValue"])]),_:1},8,["searchForm","tableData","searchBtns","url"])}}}),_hoisted_1$j={class:"flex flex-col h-full"},_hoisted_2$f={key:0,class:"flex flex-col h-full"},_hoisted_3$d={key:2,class:"flex flex-col overflow-y-auto"},_hoisted_4$d={class:"flex items-center gap-2.5"},_hoisted_5$b={class:"flex flex-col gap-2.5"},_hoisted_6$b={class:"h-44"},_hoisted_7$a={class:"flex justify-end"},_hoisted_8$a={key:0},_hoisted_9$9={key:1},_hoisted_10$8={key:2},_hoisted_11$6={class:"mt-2.5"},_hoisted_12$4={key:5,class:"flex flex-col h-full"},_hoisted_13$3={key:6,class:"flex flex-col h-full"},_hoisted_14$3={key:7,class:"flex flex-col h-full"},_sfc_main$l=vue.defineComponent({__name:"model-view",props:{type:{default:"ODS"},permission:{default:()=>[]},isCustom:{type:Boolean,default:!1}},setup(i,{expose:n}){const r=i,{proxy:o}=vue.getCurrentInstance(),{getDetail:a}=fetch$1(o).model,l=vue.ref({}),s=vue.ref(!1),u=vue.ref(""),c=vue.ref([]),d={1:"手动创建",2:"Excel生成",3:"数据源导入",4:"SQL新建",5:"ODS抽取",6:"数据库同步",8:"API接入"},f=vue.ref([{label:"字段名称",prop:"attributeCode",fixed:!0},{label:"字段描述",prop:"attributeComment"},{label:"映射字段",prop:"mapCode"},{label:"数据类型",prop:"dataType"},{label:"数据长度",prop:"dataLength"},{label:"数据标度",prop:"dataScale"},{label:"选择主键",prop:"primaryKey",props:{url:"/api/ace-api/blade-system/dict/dictionary?code=yes_no",label:"dictValue",value:"dictKey"}},{label:"唯一键",prop:"uniqueKey",slot:!0},{label:"查询字段",prop:"searchKey",slot:!0},{label:"协同字段",prop:"teamworkKey",slot:!0},{label:"字段来源",prop:"sourceModelName"},{label:"数据来源",prop:"sourceColumnName"}]),p=async x=>{s.value=!0,u.value="",c.value=[];const C=await a(x==null?void 0:x.id,!1);C&&(l.value=C.data,s.value=!1,c.value.push({label:"模型数据",value:"data"}),r.type=="ODS"&&r.permission.includes("EXCEL_EXTRACT")&&!C.data.parentModelId&&(r.isCustom||c.value.push({label:"Excel抽取",value:"fileExtract"})),r.type=="DWD"&&c.value.push({label:"抽取数据",value:"dbExtract"}),vue.unref(l).createMethod==6&&c.value.push({label:"同步数据",value:"dataSync"}),vue.unref(l).createMethod==8&&c.value.push({label:"API抽取",value:"api"}),c.value.push({label:"规则补数",value:"clean"},{label:"模型信息",value:"info"}),vue.unref(l).openForm==2&&vue.unref(l).publishStatus==2&&!C.data.parentModelId&&c.value.push({label:"录入数据",value:"insertForm"}),u.value=vue.unref(c)[0].value)},v=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/submit",{...x,projectId:o.$baseGetCurrentProjectId()})&&o.$message.success("操作成功")},m=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/submit",{id:x.id,searchKey:x.searchKey,projectId:o.$baseGetCurrentProjectId()})&&(o.$message.success("操作成功"),x.searchKey=="1"&&x.indexKey=="2"&&(x.indexKey=1,g(x)))},g=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeIndexKey",x)&&o.$message.success("操作成功")},_=async x=>{x.teamworkKey=="2"&&vue.unref(l).listModelAttribute.filter(w=>w.id!=x.id).forEach(w=>{w.teamworkKey=1}),await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeTeamworkKey",x)&&o.$message.success("操作成功")},y=async x=>(x.loading=!0,new Promise(async C=>{const w=await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeRequiredStatus",{modelAttributeId:x.id,status:x.required==2?1:2});return x.loading=!1,C(!!w)})),b=async x=>{const{toClipboard:C}=useClipboard();try{await C(x),o.$message.success("操作成功")}catch{o.$message.warning("复制失败")}};return n({init:p}),(x,C)=>{const w=vue.resolveComponent("AppCodemirror"),E=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(s),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$j,[vue.createVNode(vue.unref(elementPlus.ElTabs),{modelValue:vue.unref(u),"onUpdate:modelValue":C[0]||(C[0]=$=>vue.isRef(u)?u.value=$:null),type:"card"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c),$=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTabPane),{label:$.label,name:$.value,key:$.value},null,8,["label","name"]))),128))]),_:1},8,["modelValue"]),vue.unref(u)=="dbExtract"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$f,[vue.createVNode(_sfc_main$y,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="fileExtract"?(vue.openBlock(),vue.createBlock(_sfc_main$C,{key:1,model:vue.unref(l)},null,8,["model"])):vue.createCommentVNode("",!0),vue.unref(u)=="info"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$d,[vue.createVNode(vue.unref(elementPlus.ElDescriptions),{column:2,border:!0,style:{width:"100%"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型名称"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelName),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型代码"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$d,[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelCode)+" ",1),vue.unref(l).viewQuerySql?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,width:"400",placement:"bottom",trigger:"hover","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看sql")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$b,[vue.createElementVNode("div",_hoisted_6$b,[vue.createVNode(w,{extensions:"sql",disabled:"",modelValue:vue.unref(l).viewQuerySql,"onUpdate:modelValue":C[1]||(C[1]=$=>vue.unref(l).viewQuerySql=$),style:{height:"100%"}},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_7$a,[vue.createVNode(vue.unref(elementPlus.ElButton),{size:"small",type:"primary",onClick:C[2]||(C[2]=$=>b(vue.unref(l).viewQuerySql))},{default:vue.withCtx(()=>[vue.createTextVNode(" 复制 ")]),_:1})])])]),_:1})):vue.createCommentVNode("",!0)])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型层级"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:"danger"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelLayer),1)]),_:1})]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型类型"},{default:vue.withCtx(()=>[vue.unref(l).modelType==1?(vue.openBlock(),vue.createElementBlock("span",_hoisted_8$a,"维度模型")):vue.createCommentVNode("",!0),vue.unref(l).modelType==2?(vue.openBlock(),vue.createElementBlock("span",_hoisted_9$9,"事实模型")):vue.createCommentVNode("",!0),vue.unref(l).modelType==3?(vue.openBlock(),vue.createElementBlock("span",_hoisted_10$8,"其他模型")):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型描述"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelDesc),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型创建来源"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(d[vue.unref(l).createMethod]??vue.unref(l).createMethod),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"数据仓库"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelStore),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"发布状态"},{default:vue.withCtx(()=>[vue.unref(l).publishStatus==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未发布")]),_:1})):vue.createCommentVNode("",!0),vue.unref(l).publishStatus==2?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已发布")]),_:1})):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"表单录入数据"},{default:vue.withCtx(()=>[vue.unref(l).openForm==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未开启")]),_:1})):vue.createCommentVNode("",!0),vue.unref(l).openForm==2?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已开启")]),_:1})):vue.createCommentVNode("",!0)]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_11$6,[vue.createVNode(E,{tableData:vue.unref(f),list:vue.unref(l).listModelAttribute,ref:"appTable"},{uniqueKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{"true-value":"2","false-value":"1",modelValue:$.uniqueKey,"onUpdate:modelValue":S=>$.uniqueKey=S,onChange:S=>v($)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),required:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:$.required,"onUpdate:modelValue":S=>$.required=S,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":2,"inactive-value":1,loading:$.loading,"before-change":()=>y($)},null,8,["modelValue","onUpdate:modelValue","loading","before-change"])]),searchKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:$.searchKey,"onUpdate:modelValue":S=>$.searchKey=S,"true-value":"2","false-value":"1",onChange:S=>m($)},null,8,["modelValue","onUpdate:modelValue","onChange"]),$.searchKey==="2"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:0,modelValue:$.indexKey,"onUpdate:modelValue":S=>$.indexKey=S,"true-value":"2","false-value":"1",onChange:S=>g($)},{default:vue.withCtx(()=>[vue.createTextVNode(" 创建索引 ")]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):vue.createCommentVNode("",!0)]),teamworkKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{disabled:!["date","time","datetime"].includes($.dataType),modelValue:$.teamworkKey,"onUpdate:modelValue":S=>$.teamworkKey=S,"true-value":"2","false-value":"1",onChange:S=>_($)},null,8,["disabled","modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["tableData","list"])])])):vue.createCommentVNode("",!0),vue.unref(u)=="data"?(vue.openBlock(),vue.createBlock(_sfc_main$s,{key:3,model:vue.unref(l),permission:x.permission},null,8,["model","permission"])):vue.createCommentVNode("",!0),vue.unref(u)=="insertForm"?(vue.openBlock(),vue.createBlock(_sfc_main$S,{key:4,model:vue.unref(l),permission:x.permission},null,8,["model","permission"])):vue.createCommentVNode("",!0),vue.unref(u)=="clean"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$4,[vue.createVNode(_sfc_main$q,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="dataSync"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$3,[vue.createVNode(_sfc_main$p,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="api"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$3,[vue.createVNode(_sfc_main$m,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0)])]),_:1},8,["loading"])}}}),modelView_vue_vue_type_style_index_0_scoped_e126a32b_lang="",aceModelView=_export_sfc$2(_sfc_main$l,[["__scopeId","data-v-e126a32b"]]),_withScopeId$8=i=>(vue.pushScopeId("data-v-9af70b95"),i=i(),vue.popScopeId(),i),_hoisted_1$i={class:"overflow-y-auto"},_hoisted_2$e={class:"fadeIn animated"},_hoisted_3$c=_withScopeId$8(()=>vue.createElementVNode("th",null,null,-1)),_hoisted_4$c={class:"h-80"},_hoisted_5$a=["title"],_hoisted_6$a={class:"name"},_hoisted_7$9={class:"total"},_hoisted_8$9={class:"h-80"},_hoisted_9$8=["title"],_hoisted_10$7={class:"name"},_hoisted_11$5={class:"total"},_hoisted_12$3=_withScopeId$8(()=>vue.createElementVNode("br",null,null,-1)),_sfc_main$k=vue.defineComponent({__name:"matrix",setup(i,{expose:n}){const{proxy:r}=vue.getCurrentInstance(),{allModel:o,allModelAttribute:a,allModelMatrix:l,queryRows:s}=fetch$1(r).model,u=vue.ref([]),c=vue.ref([]),d=vue.ref({}),f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),m=vue.reactive([{label:"字段",prop:"attributeCode"},{label:"名称",prop:"attributeComment"},{label:"类型",prop:"dataType",func:_=>commonDataType[_.dataType]}]);Promise.all([o({modelLayer:"DWD",publishStatus:2}),l({modelLayer:"DWD"}),s({modelLayer:"DWD"})]).then(_=>{v.value=!1,u.value=_[0].data,c.value=_[1].data,d.value=_[2].data;const y=[];vue.unref(u).forEach(b=>{(b==null?void 0:b.modelType)==="1"?(b.rows=vue.unref(d)[b.modelCode],f.value.push(b)):(b==null?void 0:b.modelType)==="2"&&y.push(b)}),y.forEach(b=>{b.checked=[],vue.unref(f).forEach(x=>{b[x.modelCode]=vue.unref(c).some(C=>C.targetModelId===x.id&&C.modelId===b.id)}),b.rows=vue.unref(d)[b.modelCode],p.value.push(b)})});const g=_=>{_.attr||(_.loading=!0,a({modelId:_.id}).then(y=>{_.loading=!1,_.attr=y.data.filter(b=>!["project_id","create_time","create_user","create_dept","tag"].includes(b.attributeCode))}))};return n({wdModel:p}),(_,y)=>{const b=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(v),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("table",_hoisted_2$e,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[_hoisted_3$c,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),(x,C)=>(vue.openBlock(),vue.createElementBlock("th",{key:C},[vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"hover",onShow:w=>g(x),width:500},{reference:vue.withCtx(()=>[vue.createElementVNode("div",{title:x.modelName,class:"flex items-center justify-center"},[vue.createElementVNode("span",_hoisted_6$a,[vue.createElementVNode("label",null,vue.toDisplayString(x.modelName),1)]),vue.createElementVNode("span",_hoisted_7$9,vue.toDisplayString(x.rows),1)],8,_hoisted_5$a)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$c,[vue.createVNode(b,{tableData:vue.unref(m),list:x.attr,loading:x.loading},null,8,["tableData","list","loading"])])]),_:2},1032,["onShow"])]))),128))])]),vue.createElementVNode("tbody",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),(x,C)=>(vue.openBlock(),vue.createElementBlock("tr",{key:C},[vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"hover",onShow:w=>g(x),placement:"right",width:500},{reference:vue.withCtx(()=>[vue.createElementVNode("div",{title:x.modelName,class:"flex items-center justify-start"},[vue.createElementVNode("span",_hoisted_10$7,[vue.createElementVNode("label",null,vue.toDisplayString(x.modelName),1)]),vue.createElementVNode("span",_hoisted_11$5,vue.toDisplayString(x.rows),1)],8,_hoisted_9$8)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_8$9,[vue.createVNode(b,{tableData:vue.unref(m),list:x.attr,loading:x.loading},null,8,["tableData","list","loading"])])]),_:2},1032,["onShow"])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),w=>(vue.openBlock(),vue.createElementBlock("td",{key:w.id},[vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup),{modelValue:x.checked,"onUpdate:modelValue":E=>x.checked=E},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{value:w.id,checked:x[w.modelCode]},{default:vue.withCtx(()=>[_hoisted_12$3]),_:2},1032,["value","checked"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))]))),128))])])]),_:1},8,["loading"])])}}}),matrix_vue_vue_type_style_index_0_scoped_9af70b95_lang="",Matrix=_export_sfc$2(_sfc_main$k,[["__scopeId","data-v-9af70b95"]]),_hoisted_1$h={class:"ml-2.5 text-gray-500"},_hoisted_2$d={class:"my-2.5"},_hoisted_3$b={class:"flex my-2.5 overflow-hidden h-96"},_hoisted_4$b={class:"w-[300px] flex flex-col gap-2.5"},_hoisted_5$9={class:"flex-1 overflow-y-auto"},_hoisted_6$9={class:"flex-1 ml-5 flex flex-col gap-2.5 overflow-hidden"},_sfc_main$j=vue.defineComponent({__name:"fieldAdd",props:{model:{default:null}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),s=vue.ref(!1);vue.ref(!1);const u=vue.ref(""),c=vue.ref(null),d=vue.ref([]),f=vue.ref([]),p=vue.ref([{label:"整合视图",value:"ODSVIEW"},{label:"整合数据",value:"DWD"}]),v=vue.reactive([{label:"模型名称",prop:"modelName"},{label:"模型表名",prop:"modelCode"},{label:"模型类型",prop:"modelLayer",slot:!0},{label:"操作",prop:"action",fixed:"right",width:"120px",slot:!0}]),m=()=>{s.value=!0,u.value="ODSVIEW",f.value=[o.model],d.value=[{nanoid:nanoid(),dataScale:0,dataLength:0}]},g=x=>{u.value=x},_=x=>{f.value.splice(vue.unref(f).findIndex(C=>C.id==x),1)},y=x=>{vue.unref(f).some(C=>C.id==x.id)||f.value.push(x)},b=async()=>{var E;if(!await((E=vue.unref(c))==null?void 0:E.validate()))return;const C=vue.unref(c).isRepeat();if(C!==""){l.$baseAlert({content:C});return}const w={modelIds:vue.unref(f).map($=>$.id),columnConfigs:vue.unref(d)};l.$baseConfirm({content:"是否立即执行?",callConfirm:async()=>{const $=await l.$baseHttp.post("/api/ace-data-center/model/modelAttributeAdd",w);$&&$&&(s.value=!1,l.$message.success("操作成功"),a("success"))}})};return n({init:m}),(x,C)=>{const w=vue.resolveComponent("AppHeader"),E=vue.resolveComponent("AppTable"),$=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock($,{modelValue:vue.unref(s),"onUpdate:modelValue":C[2]||(C[2]=S=>vue.isRef(s)?s.value=S:null),title:"模型新增字段",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",disabled:!vue.unref(f).length||!vue.unref(d).length,onClick:b},{default:vue.withCtx(()=>[vue.createTextVNode(" 提交 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:C[1]||(C[1]=S=>s.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",null,[vue.createVNode(w,{title:"新增字段"},{left:vue.withCtx(()=>{var S,V;return[vue.createElementVNode("span",_hoisted_1$h," 模型名称:"+vue.toDisplayString((S=o.model)==null?void 0:S.modelName)+"【"+vue.toDisplayString((V=o.model)==null?void 0:V.modelCode)+"】 ",1)]}),_:1}),vue.createElementVNode("div",_hoisted_2$d,[vue.createVNode(ModelAttribute,{ref_key:"modelAttributeRef",ref:c,showHeader:!1,modelValue:vue.unref(d),"onUpdate:modelValue":C[0]||(C[0]=S=>vue.isRef(d)?d.value=S:null)},null,8,["modelValue"])]),vue.createVNode(w,{title:"选择其他模型同步新增"}),vue.createElementVNode("div",_hoisted_3$b,[vue.createElementVNode("div",_hoisted_4$b,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(u)==S.value?"primary":"",key:S.value,disabled:S.disabled,onClick:V=>g(S.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(S.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1}),vue.createElementVNode("div",_hoisted_5$9,[vue.createVNode(_sfc_main$O,{ref:"menuRef",type:vue.unref(u),onNodeClick:y},null,8,["type"])])]),vue.createElementVNode("div",_hoisted_6$9,[vue.createVNode(w,{title:"已选模型"}),vue.createVNode(E,{tableData:vue.unref(v),list:vue.unref(f)},{action:vue.withCtx(({row:S,index:V})=>[S.id!=o.model.id?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"danger",onClick:k=>_(S.id)},{default:vue.withCtx(()=>[vue.createTextVNode(" 移除 ")]),_:2},1032,["onClick"])):vue.createCommentVNode("",!0)]),modelLayer:vue.withCtx(({row:S})=>[S.modelLayer=="ODSVIEW"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("整合视图")]),_:1})):vue.createCommentVNode("",!0),S.modelLayer=="DWD"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:1,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("整合数据")]),_:1})):vue.createCommentVNode("",!0),S.modelLayer=="ODS"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:2,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("源数据")]),_:1})):vue.createCommentVNode("",!0)]),_:1},8,["tableData","list"])])])])]),_:1},8,["modelValue"])}}}),_hoisted_1$g=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_2$c={class:"flex justify-end flex-1"},_hoisted_3$a=vue.createElementVNode("div",{class:"text-color-primary mr-2.5 flex items-center"},[vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"}),vue.createTextVNode(" 新建模型 ")],-1),_hoisted_4$a=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_5$8={key:0},_hoisted_6$8=vue.createElementVNode("span",{class:"ml-2 mr-2 text-gray-300"},"|",-1),_hoisted_7$8=["onClick"],_hoisted_8$8={key:0,class:"flex items-center justify-center h-full"},_sfc_main$i=vue.defineComponent({__name:"index",props:{isCustom:{type:Boolean,default:!1},element:{default:null}},setup(i){const n=i,r=vue.inject("local"),{proxy:o}=vue.getCurrentInstance(),{getDetail:a,settingPublishStatus:l}=fetch$1(o).model,s=vue.ref([{label:"源数据",value:"ODS",rule:"VIEW_ODS",disabled:!0},{label:"整合视图",value:"ODSVIEW",rule:"VIEW_ODSVIEW",disabled:!0},{label:"整合数据",value:"DWD",rule:"VIEW_DWD",disabled:!0},{label:"总线矩阵",value:"MATRIX",rule:"SAVE_MODEL_MATRIX",disabled:!0}]),u=vue.ref(null),c=vue.ref(null),d=vue.ref([]),f=vue.ref([]),p=vue.ref(!1),v=vue.ref(""),m=vue.ref(n.element??{}),g=vue.ref([]);n.isCustom&&vue.nextTick(()=>{o.$refs.modelViewRef.init(vue.unref(m))}),fetch$1(o).getCurrFunc("MODEL").then(w=>{vue.unref(s).forEach(E=>{E.disabled=!w.data.includes(E.rule),!vue.unref(v)&&!E.disabled&&(v.value=E.value)}),g.value=w.data,n.isCustom||(f.value=[{label:"数据源导入模型",value:"conn",icon:"ri-add-circle-line",show:()=>w.data.includes("DB_IMPORT_MODEL")&&vue.unref(v)!="ODSVIEW"},{label:"SQL新建模型",value:"sql",icon:"ri-add-circle-line",show:()=>["ODS","DWD"].includes(vue.unref(v))&&w.data.includes("SQL_CREATE")},{label:"手动新建模型",value:"normal",icon:"ri-add-circle-line",show:()=>["ODS","DWD"].includes(vue.unref(v))&&w.data.includes("DO_CREATE")},{label:"Excel生成模型",value:"excel",icon:"ri-add-circle-line",show:()=>["ODS"].includes(vue.unref(v))&&w.data.includes("EXCEL_CREATE")},{label:"ODS抽取模型",value:"extract",icon:"ri-add-circle-line",show:()=>["DWD"].includes(vue.unref(v))&&w.data.includes("ODS_CREATE")}],d.value=[{label:()=>"保存",type:"warning",value:"SAVE_MODEL_MATRIX",icon:"ri-save-line",show:()=>["MATRIX"].includes(vue.unref(v))&&w.data.includes("SAVE_MODEL_MATRIX")},{label:()=>"复制",value:"COPY",icon:"ri-file-copy-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.id)&&(($=vue.unref(m))==null?void 0:$.shadowFlag)!=2&&w.data.includes("PUBLISH")}},{label:()=>"发布",value:"PUBLISH",icon:"ri-book-open-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.publishStatus)==1&&w.data.includes("PUBLISH")}},{label:()=>{let E="删除数据仓";return vue.unref(v)=="ODSVIEW"&&(E="删除视图"),E},value:"REMOVE_PUBLISH",type:"danger",icon:"ri-delete-bin-2-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.publishStatus)==2&&w.data.includes("REMOVE_PUBLISH")}},{label:()=>"编辑",value:"EDIT",icon:"ri-file-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("EDIT")}},{label:()=>"删除模型",value:"DEL",type:"danger",icon:"ri-delete-bin-2-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("DEL")}},{label:()=>"新增字段",value:"FIELD-ADD",icon:"ri-add-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("EDIT")}}])});const _=w=>{v.value=w,m.value={},vue.nextTick(()=>{var E;o.$refs.menuRef.$refs.treeRef.setCurrentKey((E=vue.unref(m))==null?void 0:E.id)})},y=w=>{m.value=w,vue.nextTick(()=>{o.$refs.modelViewRef.init(vue.unref(m))})},b=async(w,E)=>{var $,S;switch(p.value=!1,w){case"conn":case"sql":case"normal":case"excel":case"extract":o.$refs[`${w}Ref`].init();break;case"DEL":o.$baseConfirm({content:"是否确认删除?",callConfirm:async()=>{var k;await o.$baseHttp.post(`/ace-data-center/model/remove?ids=${(k=vue.unref(m))==null?void 0:k.id}`,{},{headers:{loading:!0}})&&(o.$message.success("操作成功"),m.value={},C())}});break;case"EDIT":{const V=await a(($=vue.unref(m))==null?void 0:$.id,!0);if(!V)return;if(V.data.publishStatus==1){if(["ODSVIEW"].includes(vue.unref(v))){vue.unref(u).init("ODSVIEW_EDIT");return}o.$refs.normalRef.init(V.data);return}o.$message.warning("模型已发布,无法编辑")}break;case"COPY":{if(["ODSVIEW"].includes(vue.unref(v))){vue.unref(u).init("ODSVIEW_COPY");return}const V=await a((S=vue.unref(m))==null?void 0:S.id,!0);if(!V)return;delete V.data.id,V.data.listModelAttribute.forEach(k=>{k.id=null,k.createUser=null,k.createDept=null,k.createTime=null,k.updateUser=null,k.updateTime=null,k.modelId=null,k.nanoid=nanoid()}),V.data.slaveModels&&V.data.slaveModels.forEach(k=>{delete k.id,k.listModelAttribute.forEach(P=>{delete P.id,P.createUser=null,P.createDept=null,P.createTime=null,P.updateUser=null,P.updateTime=null,P.modelId=null,P.nanoid=nanoid()})}),o.$refs.normalRef.init(V.data)}break;case"PUBLISH":case"REMOVE_PUBLISH":{const V=w==="PUBLISH"?"模型发布后,模型信息无法再进行变更操作,是否立即执行?":"确定删除数仓表,删除后模型数据将清空,是否执行?",k=w==="PUBLISH"?"2":"1";o.$baseConfirm({content:V,callConfirm:async()=>{var B;await l((B=vue.unref(m))==null?void 0:B.id,k)&&(vue.unref(m).publishStatus=k,o.$message.success("操作成功"),C())}})}break;case"editTag":o.$refs.tagEditRef.init(E);break;case"SAVE_MODEL_MATRIX":{if(!await o.$baseHttp.post("/api/ace-data-center/model-matrix/save",{modelLayer:"DWD",projectId:o.$baseGetCurrentProjectId(),list:o.$refs.MatrixRef.wdModel.map(k=>({modelId:k.id,listTargetModelId:k.checked}))},{headers:{loading:!0}}))return;o.$message.success("操作成功")}break;case"FIELD-ADD":vue.unref(c).init();break}},x=w=>{w==="model-add"&&(p.value=!0),vue.unref(u).init(w)},C=()=>{var w;o.$refs.menuRef.init(),(w=vue.unref(m))!=null&&w.id&&o.$refs.modelViewRef.init(vue.unref(m))};return(w,E)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden app-basic-container"},{default:vue.withCtx(()=>{var $;return[w.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElHeader),{key:0,style:{height:"auto",padding:"0"},class:"flex items-center mb-3 fadeIn animated"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(v)==S.value?"primary":"",key:S.value,disabled:S.disabled,onClick:V=>_(S.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(S.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",class:"ml-2.5",onClick:E[0]||(E[0]=S=>x("model-add"))},{default:vue.withCtx(()=>[_hoisted_1$g,vue.createTextVNode(" 编写sql数据整合 ")]),_:1}),vue.createElementVNode("div",_hoisted_2$c,[["ODSVIEW"].includes(vue.unref(v))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(f).length?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdown),{key:0,onCommand:b},{dropdown:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDropdownMenu),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdownItem),{disabled:!S.show(),command:S.value},{default:vue.withCtx(()=>[_hoisted_4$a,vue.createTextVNode(" "+vue.toDisplayString(S.label),1)]),_:2},1032,["disabled","command"]))),256))]),_:1})]),default:vue.withCtx(()=>[_hoisted_3$a]),_:1})):vue.createCommentVNode("",!0)],64)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(d),S=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[S.show()?(vue.openBlock(),vue.createElementBlock("span",_hoisted_5$8,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:S.type||"primary",onClick:V=>b(S.value)},{default:vue.withCtx(()=>[vue.createElementVNode("i",{class:vue.normalizeClass([S.icon,"mr-1"])},null,2),vue.createTextVNode(" "+vue.toDisplayString(S.label()),1)]),_:2},1032,["type","onClick"]),_hoisted_6$8])):vue.createCommentVNode("",!0)],64))),256))])]),_:1})),vue.withDirectives(vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"flex flex-1 overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(r)},{default:vue.withCtx(()=>[w.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"pr-5 mr-5"},{default:vue.withCtx(()=>{var S;return[vue.createVNode(_sfc_main$O,{ref:"menuRef",type:vue.unref(v),onNodeClick:y,id:(S=vue.unref(m))==null?void 0:S.id},{default:vue.withCtx(({element:V})=>[V.modelCode&&vue.unref(g).includes("EDIT")?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"ml-2 ri-edit-box-line",onClick:vue.withModifiers(k=>b("editTag",V),["stop"])},null,8,_hoisted_7$8)):vue.createCommentVNode("",!0)]),_:1},8,["type","id"])]}),_:1})),vue.createVNode(vue.unref(elementPlus.ElMain),{class:"flex-1 overflow-hidden"},{default:vue.withCtx(()=>{var S;return[(S=vue.unref(m))!=null&&S.id?(vue.openBlock(),vue.createBlock(aceModelView,{key:1,ref:"modelViewRef",type:vue.unref(v),permission:vue.unref(g),isCustom:w.isCustom},null,8,["type","permission","isCustom"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$8,[vue.createVNode(vue.unref(elementPlus.ElEmpty),{description:"请在左侧选择模型"})]))]}),_:1})]),_:1},8,["locale"])]),_:1},512),[[vue.vShow,["ODS","DWD","ODSVIEW"].includes(vue.unref(v))]]),["MATRIX"].includes(vue.unref(v))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{key:1,class:"overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(Matrix,{ref:"MatrixRef"},null,512)]),_:1})]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(_sfc_main$M,{ref:"connRef",onSuccess:E[1]||(E[1]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$L,{ref:"sqlRef",onSuccess:E[2]||(E[2]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$K,{ref:"normalRef",onSuccess:E[3]||(E[3]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$J,{ref:"excelRef",onSuccess:E[4]||(E[4]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$I,{ref:"extractRef",onSuccess:E[5]||(E[5]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$H,{ref:"tagEditRef",permission:vue.unref(g),onSuccess:E[6]||(E[6]=S=>C())},null,8,["permission"]),vue.createVNode(Sql,{ref_key:"modelSqlRef",ref:u,modelId:vue.unref(p)?"":($=vue.unref(m))==null?void 0:$.id,onSuccess:C},null,8,["modelId"]),vue.createVNode(_sfc_main$j,{ref_key:"fileAddRef",ref:c,model:vue.unref(m),onSuccess:E[7]||(E[7]=S=>vue.unref(o).$refs.modelViewRef.init(vue.unref(m)))},null,8,["model"])]}),_:1}))}}),_withScopeId$7=i=>(vue.pushScopeId("data-v-480e7149"),i=i(),vue.popScopeId(),i),_hoisted_1$f={class:"flex flex-col"},_hoisted_2$b={class:"flex flex-col h-60"},_hoisted_3$9={class:"h"},_hoisted_4$9=["onClick"],_hoisted_5$7={class:"ml-2.5 text-gray-500"},_hoisted_6$7={class:"flex justify-end flex-1"},_hoisted_7$7=_withScopeId$7(()=>vue.createElementVNode("i",{class:"ri-play-circle-line"},null,-1)),_hoisted_8$7={class:"b"},_hoisted_9$7={class:"flex flex-col h-60"},_hoisted_10$6={class:"h"},_hoisted_11$4=["onClick"],_hoisted_12$2={class:"b"},_hoisted_13$2={class:"overflow-y-auto max-h-96",style:{"min-height":"300px"}},_hoisted_14$2=_withScopeId$7(()=>vue.createElementVNode("span",{class:"mr-1 text-color-danger"},"*",-1)),_sfc_main$h=vue.defineComponent({__name:"create",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),{setFormValue:l,getFormValue:s}=a.$globalHooks.useForm(),u=vue.ref(null),c=vue.ref(null),d=vue.ref(!1),f=vue.ref({}),p=vue.ref(1),v=[{label:"接口执行结果",value:1},{label:"接口执行结果(JSON)",value:2}],m=vue.ref(1),g=[{label:"① 输出模型",value:1},{label:"② 作业配置",value:2}],_=vue.ref(""),y=vue.ref(!1),b=vue.ref([]),x=vue.ref([]),C=vue.reactive([{name:"模型层级",type:FieldType.Select,fieldName:"modelLayer",value:"",required:!0,disabled:!0,props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelLayer",label:"dictValue",value:"dictKey"}},{name:"模型名称",type:FieldType.Text,fieldName:"modelName",value:"",required:!0},{name:"模型表名",type:FieldType.Text,fieldName:"modelCode",value:"",required:!0,prepend:vue.h("div",{},"ods_")}]),w=async V=>{const k=await a.$baseHttp.get(`/api/ace-data-center/invoke-api-extract/detail?id=${V.id}`,{headers:{loading:!0}});f.value=k.data,b.value=[],p.value=1,m.value=1,x.value=[],_.value="",y.value=!1,l({modelLayer:"ODS"},C),d.value=!0,vue.nextTick(()=>{vue.unref(c).init({})})},E=async()=>{var I;m.value=1;const{params:V,error:k}=s(C);if(k.length>0)return;if(!await((I=vue.unref(u))==null?void 0:I.validate())){a.$message.warning("映射字段有误请核对");return}const B=vue.unref(u).isRepeat();if(B!==""){a.$baseAlert({content:B});return}if(!vue.unref(x).length){a.$message.warning("字段不能为空");return}const T={...V,modelCode:"ods_"+V.modelCode,projectId:String(a.$baseGetCurrentProjectId()),listModelAttribute:vue.unref(x),viewQuerySql:"",createMethod:8,taskDefined:null};if(vue.unref(y)){const{params:L,error:D}=vue.unref(c).getForm();if(D.length>0){m.value=2,a.$message.warning("作业配置有误");return}V.taskDefined=L}let N;const O=vue.unref(_)?"/api/ace-data-center/model/editModelDetail":"/api/ace-data-center/model/saveModelDetail";N=await a.$baseHttp.post(O,T,{headers:{loading:!0}}),N&&(_.value=N.data,N=await a.$baseHttp.post(`/api/ace-data-center/model/settingPublishStatus/${vue.unref(_)}/2`,{},{headers:{loading:!0}}),N&&(N=await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submitApiExtractTask",{invokeApiExtractId:vue.unref(f).id,modelId:_.value,taskDefined:V.taskDefined},{headers:{loading:!0}}),a.$message.success("操作成功"),d.value=!1,o("success")))},$=async()=>{const V=await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/debug",{...vue.unref(f)},{headers:{loading:!0}});if(V)try{b.value=JSON.parse(V.data),S()}catch{b.value=[]}},S=async()=>{const V=await a.$baseHttp.post("/api/ace-data-center/model/autoParseToModelByList",vue.unref(b),{headers:{loading:!0}});V&&(x.value=V.data)};return n({init:w}),(V,k)=>{const P=vue.resolveComponent("AppTable"),B=vue.resolveComponent("AppJson"),T=vue.resolveComponent("AppForm"),N=vue.resolveComponent("aceHeader"),O=vue.resolveComponent("AppTaskDesign"),I=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(I,{modelValue:vue.unref(d),"onUpdate:modelValue":k[4]||(k[4]=L=>vue.isRef(d)?d.value=L:null),title:"创建模型",size:"80%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:E},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:k[3]||(k[3]=L=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>{var L;return[vue.createElementVNode("div",_hoisted_1$f,[vue.createElementVNode("div",_hoisted_2$b,[vue.createElementVNode("div",_hoisted_3$9,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(v,D=>vue.createElementVNode("div",{class:vue.normalizeClass(["h-item",{active:D.value==vue.unref(p)}]),onClick:F=>p.value=D.value},vue.toDisplayString(D.label),11,_hoisted_4$9)),64)),vue.createElementVNode("div",_hoisted_5$7,"接口名称:"+vue.toDisplayString(vue.unref(f).apiName),1),vue.createElementVNode("div",_hoisted_6$7,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"warning",onClick:$},{default:vue.withCtx(()=>[_hoisted_7$7,vue.createTextVNode(" 执行接口 ")]),_:1})])]),vue.createElementVNode("div",_hoisted_8$7,[vue.unref(p)==1?(vue.openBlock(),vue.createBlock(P,{key:0,tableData:(L=vue.unref(b))!=null&&L.length?Object.keys(vue.unref(b)[0]).map(D=>({label:D,prop:D})):[],list:vue.unref(b)??[]},null,8,["tableData","list"])):vue.createCommentVNode("",!0),vue.unref(p)==2?(vue.openBlock(),vue.createBlock(B,{key:1,style:{height:"100%"},modelValue:vue.unref(b),"onUpdate:modelValue":k[0]||(k[0]=D=>vue.isRef(b)?b.value=D:null)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])]),vue.createElementVNode("div",_hoisted_9$7,[vue.createElementVNode("div",_hoisted_10$6,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(g,D=>vue.createElementVNode("div",{class:vue.normalizeClass(["h-item",{active:D.value==vue.unref(m)}]),onClick:F=>m.value=D.value},vue.toDisplayString(D.label),11,_hoisted_11$4)),64))]),vue.createElementVNode("div",_hoisted_12$2,[vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(T,{form:vue.unref(C),col:1},null,8,["form"]),vue.createVNode(vue.unref(elementPlus.ElPopover),{placement:"top-end",trigger:"click",width:"1000px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-7"},{default:vue.withCtx(()=>[_hoisted_14$2,vue.createTextVNode(" 字段映射("+vue.toDisplayString(vue.unref(x).length)+") ",1)]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_13$2,[vue.createVNode(Attribute,{ref_key:"attributeRef",ref:u,modelValue:vue.unref(x),"onUpdate:modelValue":k[1]||(k[1]=D=>vue.isRef(x)?x.value=D:null)},null,8,["modelValue"])])]),_:1})],512),[[vue.vShow,vue.unref(m)==1]]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(N,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(y),"onUpdate:modelValue":k[2]||(k[2]=D=>vue.isRef(y)?y.value=D:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(O,{ref_key:"taskDesignRef",ref:c},null,512)],512),[[vue.vShow,vue.unref(y)]])],512),[[vue.vShow,vue.unref(m)==2]])])])])]}),_:1},8,["modelValue"])}}}),create_vue_vue_type_style_index_0_scoped_480e7149_lang="",Create=_export_sfc$2(_sfc_main$h,[["__scopeId","data-v-480e7149"]]),_hoisted_1$e=vue.createElementVNode("i",{class:"ri-pushpin-line"},null,-1),_hoisted_2$a=vue.createElementVNode("i",{class:"ri-file-line"},null,-1),_sfc_main$g=vue.defineComponent({__name:"server",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.reactive([{name:"新增",key:"add",type:"primary",icon:"ri-add-line"}]),u=vue.reactive([{name:"api名称",type:FieldType.Text,fieldName:"apiName",value:""}]),c=vue.reactive([{label:"接口名称",prop:"apiName"},{label:"接口方式",prop:"requestType"},{label:"状态",prop:"invokeStatus",slot:!0},{label:"是否分页请求",prop:"isPages",dict:"status"},{label:"依赖前置接口",prop:"preApiName"},{label:"数据模型",prop:"modelId",slot:!0},{label:"模型名称",prop:"modelCode"},{label:"数据操作",prop:"dataAction",slot:!0},{label:"接口操作",prop:"htmlButton",fixed:"right",width:"200px"}]),d=p=>{p.data.forEach(v=>{v.htmlButton=[],v.htmlButton.push({name:"查看",key:"view",type:"warning",icon:"ri-eye-line"}),v.htmlButton.push({name:"编辑",key:"edit",type:"primary",icon:"ri-edit-line"}),v.htmlButton.push({name:v.invokeStatus?"停用":"启用",key:v.invokeStatus?"stop":"start",type:v.invokeStatus?"danger":"success",icon:v.invokeStatus?"ri-pause-circle-line":"ri-play-circle-line"}),v.invokeStatus||v.htmlButton.push({name:"删除",key:"remove",type:"danger",icon:"ri-delete-bin-6-line"})})},f=async p=>{const{type:v,row:m}=p;switch(v){case"add":vue.unref(o).init();break;case"view":case"edit":vue.unref(o).init(m.id,v==="view");break;case"start":case"stop":n.$baseConfirm({content:"是否确定操作",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/changeInvokeStatus/${m.id}/${m.invokeStatus?0:1}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"remove":n.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/remove?ids=${m.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"PUSH":n.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/extract?id=${m.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"LOG":vue.unref(l).init({businessId:m.id,businessType:"invoke_api_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"CREATE":vue.unref(a).init(m);break}};return(p,v)=>{const m=vue.resolveComponent("aceModelExtractLog"),g=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:r,searchForm:vue.unref(u),tableData:vue.unref(c),searchBtns:vue.unref(s),url:"/api/ace-data-center/invoke-api-extract/page",onSuccess:d,onBtnClick:f},{invokeStatus:vue.withCtx(({row:_})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:_.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(_.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),modelId:vue.withCtx(({row:_})=>[_.modelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:1,type:"primary",size:"small",plain:"",onClick:vue.withModifiers(y=>f({type:"CREATE",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[vue.createTextVNode(" 创建模型 ")]),_:2},1032,["onClick"]))]),dataAction:vue.withCtx(({row:_})=>[_.modelId?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:vue.withModifiers(y=>f({type:"PUSH",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[_hoisted_1$e,vue.createTextVNode(" 抽取 ")]),_:2},1032,["onClick"]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-3",onClick:vue.withModifiers(y=>f({type:"LOG",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[_hoisted_2$a,vue.createTextVNode(" 抽取记录 ")]),_:2},1032,["onClick"])],64)):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(ServerView,{ref_key:"serverRef",ref:o,onSuccess:v[0]||(v[0]=_=>vue.unref(r).getData())},null,512),vue.createVNode(m,{ref_key:"modelExtractLogRef",ref:l},null,512),vue.createVNode(Create,{ref_key:"createRef",ref:a,onSuccess:v[1]||(v[1]=_=>vue.unref(r).getData())},null,512)]),_:1},8,["searchForm","tableData","searchBtns"])}}}),_withScopeId$6=i=>(vue.pushScopeId("data-v-2f81f1fa"),i=i(),vue.popScopeId(),i),_hoisted_1$d={class:"flex flex-1 gap-2.5"},_hoisted_2$9={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$8=_withScopeId$6(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 请求设置 ")])],-1)),_hoisted_4$8={class:"b"},_hoisted_5$6={class:"flex flex-col w-full gap-1"},_hoisted_6$6={class:"flex flex-col w-full"},_hoisted_7$6={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_8$6=_withScopeId$6(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 返回设置 ")])],-1)),_hoisted_9$6={class:"b"},_hoisted_10$5={class:"w-full"},_hoisted_11$3=_withScopeId$6(()=>vue.createElementVNode("i",{class:"ri-play-large-fill"},null,-1)),_sfc_main$f=vue.defineComponent({__name:"preView",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref({}),u=vue.ref([]),c=vue.ref("header"),d=[{label:"请求头",value:"header"},{label:"请求参数",value:"parameters"},{label:"请求body",value:"body"}],f=vue.ref(!1),p=vue.ref(!1),v=vue.computed(()=>vue.unref(s).apiName===""||vue.unref(s).url===""||vue.unref(s).responseObjectCode===""||vue.unref(s).requestType===""),m=async(y,b=!1)=>{if(c.value="header",p.value=!1,f.value=b,s.value={apiName:"",url:"",jsModule:[],requestType:"GET",preApiId:"",header:"",parameters:"",body:"",successCondition:"",responseObjectCode:"",isCacheResult:0,cacheKey:"",cacheTime:"",id:""},y){const x=await a.$baseHttp.get(`/api/ace-data-center/invoke-pre-api/detail?id=${y}`);Object.keys(s.value).forEach(C=>{let w=x.data[C]??"";C=="jsModule"&&(w===""?w=[]:w=w.split(",")),s.value[C]=w})}l.value=!0,a.$baseHttp.get("/api/ace-data-center/invoke-pre-api/options").then(x=>{u.value=x.data})},g=async()=>{await a.$baseHttp.post("/api/ace-data-center/invoke-pre-api/submit",{...vue.unref(s),projectId:a.$baseGetCurrentProjectId(),jsModule:vue.unref(s).jsModule.toString()},{headers:{loading:!0}})&&(a.$message.success("操作成功"),l.value=!1,o("success"))},_=async()=>{var b;await a.$baseHttp.post("/api/ace-data-center/invoke-pre-api/debug",{...vue.unref(s),jsModule:(((b=vue.unref(s))==null?void 0:b.jsModule)??"").toString()},{headers:{loading:!0}})&&(p.value=!0)};return n({init:m}),(y,b)=>{const x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(l),"onUpdate:modelValue":b[14]||(b[14]=C=>vue.isRef(l)?l.value=C:null),title:"前置接口",size:"100%"},vue.createSlots({default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$9,[_hoisted_3$8,vue.createElementVNode("div",_hoisted_4$8,[vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口名称",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).apiName,"onUpdate:modelValue":b[0]||(b[0]=C=>vue.unref(s).apiName=C),placeholder:"请输入接口名称",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"引入第三方JS库"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(s).jsModule,"onUpdate:modelValue":b[1]||(b[1]=C=>vue.unref(s).jsModule=C),"popper-class":"ace-select",placeholder:"请选择需引入的第三方JS库",disabled:vue.unref(f),multiple:"",clearable:"",filterable:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a).$globalDict.jsModuleOptions,C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口URL",required:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$6,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(s).requestType,"onUpdate:modelValue":b[2]||(b[2]=C=>vue.unref(s).requestType=C),disabled:vue.unref(f)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"GET"},{default:vue.withCtx(()=>[vue.createTextVNode("GET")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"POST"},{default:vue.withCtx(()=>[vue.createTextVNode("POST")]),_:1})]),_:1},8,["modelValue","disabled"]),vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).url,"onUpdate:modelValue":b[3]||(b[3]=C=>vue.unref(s).url=C),disabled:vue.unref(f),example:`function plugin(){
663
+ }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"清空历史数据",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:vue.unref(s).clearBeforeExt,"onUpdate:modelValue":b[13]||(b[13]=C=>vue.unref(s).clearBeforeExt=C),"active-value":1,"inactive-value":0,disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"success",onClick:_,disabled:vue.unref(v)},{default:vue.withCtx(()=>[_hoisted_13$4,vue.createTextVNode(" 调试接口 ")]),_:1},8,["disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.unref(p)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAlert),{key:0,type:"success",description:"接口调试成功","show-icon":"",closable:!1})):vue.createCommentVNode("",!0)]),_:1})])])])]),_:2},[vue.unref(f)?void 0:{name:"footer",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",disabled:vue.unref(v),type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(" 保存 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[14]||(b[14]=C=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),key:"0"}]),1032,["modelValue"])}}}),serverView_vue_vue_type_style_index_0_scoped_734dfa7a_lang="",ServerView=_export_sfc$2(_sfc_main$n,[["__scopeId","data-v-734dfa7a"]]),_hoisted_1$k=vue.createElementVNode("i",{class:"ri-eye-line"},null,-1),_sfc_main$m=vue.defineComponent({__name:"api",props:{model:{default:{}}},setup(i){const n=i,{proxy:r}=vue.getCurrentInstance(),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.ref(null),u=vue.reactive([]),c=vue.reactive([]),d=vue.ref(!1),f=vue.ref(""),p=vue.ref(""),v=vue.reactive([{label:"接口名称",prop:"apiName",slot:!0},{label:"状态",prop:"invokeStatus",slot:!0},{label:"抽取类型",prop:"extractType",props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=extractType",label:"dictValue",value:"dictKey"}},{label:"接口操作",prop:"htmlButton",fixed:"right"}]),m=y=>{y.data.forEach(b=>{b.htmlButton=[],b.htmlButton.push({name:"作业配置",key:"TASK",type:"primary",icon:"ri-settings-2-line"}),[1,2].includes(b.extractType)&&b.htmlButton.push({name:"抽取",key:"PUSH",type:"primary",icon:"ri-pushpin-line"}),b.htmlButton.push({name:"抽取记录",key:"LOG",type:"primary",icon:"ri-file-line"}),b.htmlButton.push({name:b.invokeStatus?"停用":"启用",key:b.invokeStatus?"stop":"start",type:b.invokeStatus?"danger":"success",icon:b.invokeStatus?"ri-pause-circle-line":"ri-play-circle-line"})})},g=async y=>{const{type:b,row:x}=y;switch(b){case"view":case"edit":vue.unref(a).init(x.id,b==="view");break;case"start":case"stop":r.$baseConfirm({content:"是否确定操作",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/changeInvokeStatus/${x.id}/${x.invokeStatus?0:1}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"remove":r.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/remove?ids=${x.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"PUSH":r.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await r.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/extract?id=${x.id}`,{},{headers:{loading:!0}})&&(r.$message.success("操作成功"),vue.unref(o).getData())}});break;case"LOG":vue.unref(l).init({businessId:x.id,businessType:"invoke_api_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"TASK":d.value=!0,f.value=x.id,p.value=x.taskDefinedId;let C;if(x.taskDefinedId){const w=await r.$baseHttp.get(`/api/ace-api/blade-system/task-defined/detail?id=${x.taskDefinedId}`,{headers:{loading:!0}});if(!w)return;C=w.data}vue.nextTick(()=>{vue.unref(s).init(C??{})});break}},_=async()=>{const{params:y,error:b}=vue.unref(s).getForm();if(b.length>0){r.$message.warning("作业配置有误");return}const x={invokeApiExtractId:vue.unref(f),modelId:n.model.id,taskDefined:y};vue.unref(p)&&(x.taskDefined.id=vue.unref(p)),await r.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submitApiExtractTask",x,{headers:{loading:!0}})&&(r.$message.success("操作成功"),d.value=!1,vue.unref(o).getData())};return(y,b)=>{const x=vue.resolveComponent("aceModelExtractLog"),C=vue.resolveComponent("AppTaskDesign"),w=vue.resolveComponent("AppDialog"),E=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(E,{ref_key:"appRef",ref:o,searchForm:vue.unref(c),tableData:vue.unref(v),searchBtns:vue.unref(u),url:`/api/ace-data-center/invoke-api-extract/page?modelId=${n.model.id}`,onSuccess:m,onBtnClick:g},{invokeStatus:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:$.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString($.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),apiName:vue.withCtx(({row:$,index:S})=>[vue.createTextVNode(vue.toDisplayString($.apiName)+" ",1),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-2.5",onClick:V=>g({type:"view",row:$,index:S})},{default:vue.withCtx(()=>[_hoisted_1$k,vue.createTextVNode(" 查看 ")]),_:2},1032,["onClick"])]),default:vue.withCtx(()=>[vue.createVNode(ServerView,{ref_key:"serverRef",ref:a,onSuccess:b[0]||(b[0]=$=>vue.unref(o).getData())},null,512),vue.createVNode(x,{ref_key:"modelExtractLogRef",ref:l},null,512),vue.createVNode(w,{modelValue:vue.unref(d),"onUpdate:modelValue":b[2]||(b[2]=$=>vue.isRef(d)?d.value=$:null),title:"配置",size:800},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:_},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[1]||(b[1]=$=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createVNode(C,{ref_key:"taskDesignRef",ref:s},null,512)]),_:1},8,["modelValue"])]),_:1},8,["searchForm","tableData","searchBtns","url"])}}}),_hoisted_1$j={class:"flex flex-col h-full"},_hoisted_2$f={key:0,class:"flex flex-col h-full"},_hoisted_3$d={key:2,class:"flex flex-col overflow-y-auto"},_hoisted_4$d={class:"flex items-center gap-2.5"},_hoisted_5$b={class:"flex flex-col gap-2.5"},_hoisted_6$b={class:"h-44"},_hoisted_7$a={class:"flex justify-end"},_hoisted_8$a={key:0},_hoisted_9$9={key:1},_hoisted_10$8={key:2},_hoisted_11$6={class:"mt-2.5"},_hoisted_12$4={key:5,class:"flex flex-col h-full"},_hoisted_13$3={key:6,class:"flex flex-col h-full"},_hoisted_14$3={key:7,class:"flex flex-col h-full"},_sfc_main$l=vue.defineComponent({__name:"model-view",props:{type:{default:"ODS"},permission:{default:()=>[]},isCustom:{type:Boolean,default:!1}},setup(i,{expose:n}){const r=i,{proxy:o}=vue.getCurrentInstance(),{getDetail:a}=fetch$1(o).model,l=vue.ref({}),s=vue.ref(!1),u=vue.ref(""),c=vue.ref([]),d={1:"手动创建",2:"Excel生成",3:"数据源导入",4:"SQL新建",5:"ODS抽取",6:"数据库同步",8:"API接入"},f=vue.ref([{label:"字段名称",prop:"attributeCode",fixed:!0},{label:"字段描述",prop:"attributeComment"},{label:"映射字段",prop:"mapCode"},{label:"数据类型",prop:"dataType"},{label:"数据长度",prop:"dataLength"},{label:"数据标度",prop:"dataScale"},{label:"选择主键",prop:"primaryKey",props:{url:"/api/ace-api/blade-system/dict/dictionary?code=yes_no",label:"dictValue",value:"dictKey"}},{label:"唯一键",prop:"uniqueKey",slot:!0},{label:"查询字段",prop:"searchKey",slot:!0},{label:"协同字段",prop:"teamworkKey",slot:!0},{label:"字段来源",prop:"sourceModelName"},{label:"数据来源",prop:"sourceColumnName"}]),p=async x=>{s.value=!0,u.value="",c.value=[];const C=await a(x==null?void 0:x.id,!1);C&&(l.value=C.data,s.value=!1,c.value.push({label:"模型数据",value:"data"}),r.type=="ODS"&&r.permission.includes("EXCEL_EXTRACT")&&!C.data.parentModelId&&(r.isCustom||c.value.push({label:"Excel抽取",value:"fileExtract"})),r.type=="DWD"&&c.value.push({label:"抽取数据",value:"dbExtract"}),vue.unref(l).createMethod==6&&c.value.push({label:"同步数据",value:"dataSync"}),vue.unref(l).createMethod==8&&c.value.push({label:"API抽取",value:"api"}),c.value.push({label:"规则补数",value:"clean"},{label:"模型信息",value:"info"}),vue.unref(l).openForm==2&&vue.unref(l).publishStatus==2&&!C.data.parentModelId&&c.value.push({label:"录入数据",value:"insertForm"}),u.value=vue.unref(c)[0].value)},v=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/submit",{...x,projectId:o.$baseGetCurrentProjectId()})&&o.$message.success("操作成功")},m=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/submit",{id:x.id,searchKey:x.searchKey,projectId:o.$baseGetCurrentProjectId()})&&(o.$message.success("操作成功"),x.searchKey=="1"&&x.indexKey=="2"&&(x.indexKey=1,g(x)))},g=async x=>{await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeIndexKey",x)&&o.$message.success("操作成功")},_=async x=>{x.teamworkKey=="2"&&vue.unref(l).listModelAttribute.filter(w=>w.id!=x.id).forEach(w=>{w.teamworkKey=1}),await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeTeamworkKey",x)&&o.$message.success("操作成功")},y=async x=>(x.loading=!0,new Promise(async C=>{const w=await o.$baseHttp.post("/api/ace-data-center/model-attribute/changeRequiredStatus",{modelAttributeId:x.id,status:x.required==2?1:2});return x.loading=!1,C(!!w)})),b=async x=>{const{toClipboard:C}=useClipboard();try{await C(x),o.$message.success("操作成功")}catch{o.$message.warning("复制失败")}};return n({init:p}),(x,C)=>{const w=vue.resolveComponent("AppCodemirror"),E=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(s),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$j,[vue.createVNode(vue.unref(elementPlus.ElTabs),{modelValue:vue.unref(u),"onUpdate:modelValue":C[0]||(C[0]=$=>vue.isRef(u)?u.value=$:null),type:"card"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(c),$=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTabPane),{label:$.label,name:$.value,key:$.value},null,8,["label","name"]))),128))]),_:1},8,["modelValue"]),vue.unref(u)=="dbExtract"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$f,[vue.createVNode(_sfc_main$y,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="fileExtract"?(vue.openBlock(),vue.createBlock(_sfc_main$C,{key:1,model:vue.unref(l)},null,8,["model"])):vue.createCommentVNode("",!0),vue.unref(u)=="info"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$d,[vue.createVNode(vue.unref(elementPlus.ElDescriptions),{column:2,border:!0,style:{width:"100%"}},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型名称"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelName),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型代码"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$d,[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelCode)+" ",1),vue.unref(l).viewQuerySql?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElPopover),{key:0,width:"400",placement:"bottom",trigger:"hover","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("查看sql")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$b,[vue.createElementVNode("div",_hoisted_6$b,[vue.createVNode(w,{extensions:"sql",disabled:"",modelValue:vue.unref(l).viewQuerySql,"onUpdate:modelValue":C[1]||(C[1]=$=>vue.unref(l).viewQuerySql=$),style:{height:"100%"}},null,8,["modelValue"])]),vue.createElementVNode("div",_hoisted_7$a,[vue.createVNode(vue.unref(elementPlus.ElButton),{size:"small",type:"primary",onClick:C[2]||(C[2]=$=>b(vue.unref(l).viewQuerySql))},{default:vue.withCtx(()=>[vue.createTextVNode(" 复制 ")]),_:1})])])]),_:1})):vue.createCommentVNode("",!0)])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型层级"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:"danger"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelLayer),1)]),_:1})]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型类型"},{default:vue.withCtx(()=>[vue.unref(l).modelType==1?(vue.openBlock(),vue.createElementBlock("span",_hoisted_8$a,"维度模型")):vue.createCommentVNode("",!0),vue.unref(l).modelType==2?(vue.openBlock(),vue.createElementBlock("span",_hoisted_9$9,"事实模型")):vue.createCommentVNode("",!0),vue.unref(l).modelType==3?(vue.openBlock(),vue.createElementBlock("span",_hoisted_10$8,"其他模型")):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型描述"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelDesc),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"模型创建来源"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(d[vue.unref(l).createMethod]??vue.unref(l).createMethod),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"数据仓库"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l).modelStore),1)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"发布状态"},{default:vue.withCtx(()=>[vue.unref(l).publishStatus==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未发布")]),_:1})):vue.createCommentVNode("",!0),vue.unref(l).publishStatus==2?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已发布")]),_:1})):vue.createCommentVNode("",!0)]),_:1}),vue.createVNode(vue.unref(elementPlus.ElDescriptionsItem),{label:"表单录入数据"},{default:vue.withCtx(()=>[vue.unref(l).openForm==1?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("未开启")]),_:1})):vue.createCommentVNode("",!0),vue.unref(l).openForm==2?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:1,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已开启")]),_:1})):vue.createCommentVNode("",!0)]),_:1})]),_:1}),vue.createElementVNode("div",_hoisted_11$6,[vue.createVNode(E,{tableData:vue.unref(f),list:vue.unref(l).listModelAttribute,ref:"appTable"},{uniqueKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{"true-value":"2","false-value":"1",modelValue:$.uniqueKey,"onUpdate:modelValue":S=>$.uniqueKey=S,onChange:S=>v($)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),required:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:$.required,"onUpdate:modelValue":S=>$.required=S,"inline-prompt":"","active-text":"是","inactive-text":"否","active-value":2,"inactive-value":1,loading:$.loading,"before-change":()=>y($)},null,8,["modelValue","onUpdate:modelValue","loading","before-change"])]),searchKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{modelValue:$.searchKey,"onUpdate:modelValue":S=>$.searchKey=S,"true-value":"2","false-value":"1",onChange:S=>m($)},null,8,["modelValue","onUpdate:modelValue","onChange"]),$.searchKey==="2"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElCheckbox),{key:0,modelValue:$.indexKey,"onUpdate:modelValue":S=>$.indexKey=S,"true-value":"2","false-value":"1",onChange:S=>g($)},{default:vue.withCtx(()=>[vue.createTextVNode(" 创建索引 ")]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):vue.createCommentVNode("",!0)]),teamworkKey:vue.withCtx(({row:$})=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{disabled:!["date","time","datetime"].includes($.dataType),modelValue:$.teamworkKey,"onUpdate:modelValue":S=>$.teamworkKey=S,"true-value":"2","false-value":"1",onChange:S=>_($)},null,8,["disabled","modelValue","onUpdate:modelValue","onChange"])]),_:1},8,["tableData","list"])])])):vue.createCommentVNode("",!0),vue.unref(u)=="data"?(vue.openBlock(),vue.createBlock(_sfc_main$s,{key:3,model:vue.unref(l),permission:x.permission},null,8,["model","permission"])):vue.createCommentVNode("",!0),vue.unref(u)=="insertForm"?(vue.openBlock(),vue.createBlock(_sfc_main$S,{key:4,model:vue.unref(l),permission:x.permission},null,8,["model","permission"])):vue.createCommentVNode("",!0),vue.unref(u)=="clean"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_12$4,[vue.createVNode(_sfc_main$q,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="dataSync"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_13$3,[vue.createVNode(_sfc_main$p,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0),vue.unref(u)=="api"?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$3,[vue.createVNode(_sfc_main$m,{model:vue.unref(l)},null,8,["model"])])):vue.createCommentVNode("",!0)])]),_:1},8,["loading"])}}}),modelView_vue_vue_type_style_index_0_scoped_e126a32b_lang="",aceModelView=_export_sfc$2(_sfc_main$l,[["__scopeId","data-v-e126a32b"]]),_withScopeId$8=i=>(vue.pushScopeId("data-v-9af70b95"),i=i(),vue.popScopeId(),i),_hoisted_1$i={class:"overflow-y-auto"},_hoisted_2$e={class:"fadeIn animated"},_hoisted_3$c=_withScopeId$8(()=>vue.createElementVNode("th",null,null,-1)),_hoisted_4$c={class:"h-80"},_hoisted_5$a=["title"],_hoisted_6$a={class:"name"},_hoisted_7$9={class:"total"},_hoisted_8$9={class:"h-80"},_hoisted_9$8=["title"],_hoisted_10$7={class:"name"},_hoisted_11$5={class:"total"},_hoisted_12$3=_withScopeId$8(()=>vue.createElementVNode("br",null,null,-1)),_sfc_main$k=vue.defineComponent({__name:"matrix",setup(i,{expose:n}){const{proxy:r}=vue.getCurrentInstance(),{allModel:o,allModelAttribute:a,allModelMatrix:l,queryRows:s}=fetch$1(r).model,u=vue.ref([]),c=vue.ref([]),d=vue.ref({}),f=vue.ref([]),p=vue.ref([]),v=vue.ref(!0),m=vue.reactive([{label:"字段",prop:"attributeCode"},{label:"名称",prop:"attributeComment"},{label:"类型",prop:"dataType",func:_=>commonDataType[_.dataType]}]);Promise.all([o({modelLayer:"DWD",publishStatus:2}),l({modelLayer:"DWD"}),s({modelLayer:"DWD"})]).then(_=>{v.value=!1,u.value=_[0].data,c.value=_[1].data,d.value=_[2].data;const y=[];vue.unref(u).forEach(b=>{(b==null?void 0:b.modelType)==="1"?(b.rows=vue.unref(d)[b.modelCode],f.value.push(b)):(b==null?void 0:b.modelType)==="2"&&y.push(b)}),y.forEach(b=>{b.checked=[],vue.unref(f).forEach(x=>{b[x.modelCode]=vue.unref(c).some(C=>C.targetModelId===x.id&&C.modelId===b.id)}),b.rows=vue.unref(d)[b.modelCode],p.value.push(b)})});const g=_=>{_.attr||(_.loading=!0,a({modelId:_.id}).then(y=>{_.loading=!1,_.attr=y.data.filter(b=>!["project_id","create_time","create_user","create_dept","tag"].includes(b.attributeCode))}))};return n({wdModel:p}),(_,y)=>{const b=vue.resolveComponent("AppTable");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[vue.createVNode(vue.unref(elementPlus.ElSkeleton),{loading:vue.unref(v),animated:""},{default:vue.withCtx(()=>[vue.createElementVNode("table",_hoisted_2$e,[vue.createElementVNode("thead",null,[vue.createElementVNode("tr",null,[_hoisted_3$c,(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),(x,C)=>(vue.openBlock(),vue.createElementBlock("th",{key:C},[vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"hover",onShow:w=>g(x),width:500},{reference:vue.withCtx(()=>[vue.createElementVNode("div",{title:x.modelName,class:"flex items-center justify-center"},[vue.createElementVNode("span",_hoisted_6$a,[vue.createElementVNode("label",null,vue.toDisplayString(x.modelName),1)]),vue.createElementVNode("span",_hoisted_7$9,vue.toDisplayString(x.rows),1)],8,_hoisted_5$a)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$c,[vue.createVNode(b,{tableData:vue.unref(m),list:x.attr,loading:x.loading},null,8,["tableData","list","loading"])])]),_:2},1032,["onShow"])]))),128))])]),vue.createElementVNode("tbody",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),(x,C)=>(vue.openBlock(),vue.createElementBlock("tr",{key:C},[vue.createElementVNode("td",null,[vue.createVNode(vue.unref(elementPlus.ElPopover),{trigger:"hover",onShow:w=>g(x),placement:"right",width:500},{reference:vue.withCtx(()=>[vue.createElementVNode("div",{title:x.modelName,class:"flex items-center justify-start"},[vue.createElementVNode("span",_hoisted_10$7,[vue.createElementVNode("label",null,vue.toDisplayString(x.modelName),1)]),vue.createElementVNode("span",_hoisted_11$5,vue.toDisplayString(x.rows),1)],8,_hoisted_9$8)]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_8$9,[vue.createVNode(b,{tableData:vue.unref(m),list:x.attr,loading:x.loading},null,8,["tableData","list","loading"])])]),_:2},1032,["onShow"])]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),w=>(vue.openBlock(),vue.createElementBlock("td",{key:w.id},[vue.createVNode(vue.unref(elementPlus.ElCheckboxGroup),{modelValue:x.checked,"onUpdate:modelValue":E=>x.checked=E},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{value:w.id,checked:x[w.modelCode]},{default:vue.withCtx(()=>[_hoisted_12$3]),_:2},1032,["value","checked"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))]))),128))])])]),_:1},8,["loading"])])}}}),matrix_vue_vue_type_style_index_0_scoped_9af70b95_lang="",Matrix=_export_sfc$2(_sfc_main$k,[["__scopeId","data-v-9af70b95"]]),_hoisted_1$h={class:"ml-2.5 text-gray-500"},_hoisted_2$d={class:"my-2.5"},_hoisted_3$b={class:"flex my-2.5 overflow-hidden h-96"},_hoisted_4$b={class:"w-[300px] flex flex-col gap-2.5"},_hoisted_5$9={class:"flex-1 overflow-y-auto"},_hoisted_6$9={class:"flex-1 ml-5 flex flex-col gap-2.5 overflow-hidden"},_sfc_main$j=vue.defineComponent({__name:"fieldAdd",props:{model:{default:null}},emits:["success"],setup(i,{expose:n,emit:r}){const o=i,a=r,{proxy:l}=vue.getCurrentInstance(),s=vue.ref(!1);vue.ref(!1);const u=vue.ref(""),c=vue.ref(null),d=vue.ref([]),f=vue.ref([]),p=vue.ref([{label:"整合视图",value:"ODSVIEW"},{label:"整合数据",value:"DWD"}]),v=vue.reactive([{label:"模型名称",prop:"modelName"},{label:"模型表名",prop:"modelCode"},{label:"模型类型",prop:"modelLayer",slot:!0},{label:"操作",prop:"action",fixed:"right",width:"120px",slot:!0}]),m=()=>{s.value=!0,u.value="ODSVIEW",f.value=[o.model],d.value=[{nanoid:nanoid(),dataScale:0,dataLength:0}]},g=x=>{u.value=x},_=x=>{f.value.splice(vue.unref(f).findIndex(C=>C.id==x),1)},y=x=>{vue.unref(f).some(C=>C.id==x.id)||f.value.push(x)},b=async()=>{var E;if(!await((E=vue.unref(c))==null?void 0:E.validate()))return;const C=vue.unref(c).isRepeat();if(C!==""){l.$baseAlert({content:C});return}const w={modelIds:vue.unref(f).map($=>$.id),columnConfigs:vue.unref(d)};l.$baseConfirm({content:"是否立即执行?",callConfirm:async()=>{const $=await l.$baseHttp.post("/api/ace-data-center/model/modelAttributeAdd",w);$&&$&&(s.value=!1,l.$message.success("操作成功"),a("success"))}})};return n({init:m}),(x,C)=>{const w=vue.resolveComponent("AppHeader"),E=vue.resolveComponent("AppTable"),$=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock($,{modelValue:vue.unref(s),"onUpdate:modelValue":C[2]||(C[2]=S=>vue.isRef(s)?s.value=S:null),title:"模型新增字段",size:"100%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",disabled:!vue.unref(f).length||!vue.unref(d).length,onClick:b},{default:vue.withCtx(()=>[vue.createTextVNode(" 提交 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:C[1]||(C[1]=S=>s.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",null,[vue.createVNode(w,{title:"新增字段"},{left:vue.withCtx(()=>{var S,V;return[vue.createElementVNode("span",_hoisted_1$h," 模型名称:"+vue.toDisplayString((S=o.model)==null?void 0:S.modelName)+"【"+vue.toDisplayString((V=o.model)==null?void 0:V.modelCode)+"】 ",1)]}),_:1}),vue.createElementVNode("div",_hoisted_2$d,[vue.createVNode(ModelAttribute,{ref_key:"modelAttributeRef",ref:c,showHeader:!1,modelValue:vue.unref(d),"onUpdate:modelValue":C[0]||(C[0]=S=>vue.isRef(d)?d.value=S:null)},null,8,["modelValue"])]),vue.createVNode(w,{title:"选择其他模型同步新增"}),vue.createElementVNode("div",_hoisted_3$b,[vue.createElementVNode("div",_hoisted_4$b,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(u)==S.value?"primary":"",key:S.value,disabled:S.disabled,onClick:V=>g(S.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(S.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1}),vue.createElementVNode("div",_hoisted_5$9,[vue.createVNode(_sfc_main$O,{ref:"menuRef",type:vue.unref(u),onNodeClick:y},null,8,["type"])])]),vue.createElementVNode("div",_hoisted_6$9,[vue.createVNode(w,{title:"已选模型"}),vue.createVNode(E,{tableData:vue.unref(v),list:vue.unref(f)},{action:vue.withCtx(({row:S,index:V})=>[S.id!=o.model.id?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElLink),{key:0,type:"danger",onClick:k=>_(S.id)},{default:vue.withCtx(()=>[vue.createTextVNode(" 移除 ")]),_:2},1032,["onClick"])):vue.createCommentVNode("",!0)]),modelLayer:vue.withCtx(({row:S})=>[S.modelLayer=="ODSVIEW"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:0,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("整合视图")]),_:1})):vue.createCommentVNode("",!0),S.modelLayer=="DWD"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:1,type:"warning"},{default:vue.withCtx(()=>[vue.createTextVNode("整合数据")]),_:1})):vue.createCommentVNode("",!0),S.modelLayer=="ODS"?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElText),{key:2,type:"primary"},{default:vue.withCtx(()=>[vue.createTextVNode("源数据")]),_:1})):vue.createCommentVNode("",!0)]),_:1},8,["tableData","list"])])])])]),_:1},8,["modelValue"])}}}),_hoisted_1$g=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_2$c={class:"flex justify-end flex-1"},_hoisted_3$a=vue.createElementVNode("div",{class:"text-color-primary mr-2.5 flex items-center"},[vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"}),vue.createTextVNode(" 新建模型 ")],-1),_hoisted_4$a=vue.createElementVNode("i",{class:"mr-1 ri-add-circle-line"},null,-1),_hoisted_5$8={key:0},_hoisted_6$8=vue.createElementVNode("span",{class:"ml-2 mr-2 text-gray-300"},"|",-1),_hoisted_7$8=["onClick"],_hoisted_8$8={key:0,class:"flex items-center justify-center h-full"},_sfc_main$i=vue.defineComponent({__name:"index",props:{isCustom:{type:Boolean,default:!1},element:{default:null}},setup(i){const n=i,r=vue.inject("local"),{proxy:o}=vue.getCurrentInstance(),{getDetail:a,settingPublishStatus:l}=fetch$1(o).model,s=vue.ref([{label:"源数据",value:"ODS",rule:"VIEW_ODS",disabled:!0},{label:"整合视图",value:"ODSVIEW",rule:"VIEW_ODSVIEW",disabled:!0},{label:"整合数据",value:"DWD",rule:"VIEW_DWD",disabled:!0},{label:"总线矩阵",value:"MATRIX",rule:"SAVE_MODEL_MATRIX",disabled:!0}]),u=vue.ref(null),c=vue.ref(null),d=vue.ref([]),f=vue.ref([]),p=vue.ref(!1),v=vue.ref(""),m=vue.ref(n.element??{}),g=vue.ref([]);n.isCustom&&vue.nextTick(()=>{o.$refs.modelViewRef.init(vue.unref(m))}),fetch$1(o).getCurrFunc("MODEL").then(w=>{vue.unref(s).forEach(E=>{E.disabled=!w.data.includes(E.rule),!vue.unref(v)&&!E.disabled&&(v.value=E.value)}),g.value=w.data,n.isCustom||(f.value=[{label:"数据源导入模型",value:"conn",icon:"ri-add-circle-line",show:()=>w.data.includes("DB_IMPORT_MODEL")&&vue.unref(v)!="ODSVIEW"},{label:"SQL新建模型",value:"sql",icon:"ri-add-circle-line",show:()=>["ODS","DWD"].includes(vue.unref(v))&&w.data.includes("SQL_CREATE")},{label:"手动新建模型",value:"normal",icon:"ri-add-circle-line",show:()=>["ODS","DWD"].includes(vue.unref(v))&&w.data.includes("DO_CREATE")},{label:"Excel生成模型",value:"excel",icon:"ri-add-circle-line",show:()=>["ODS"].includes(vue.unref(v))&&w.data.includes("EXCEL_CREATE")},{label:"ODS抽取模型",value:"extract",icon:"ri-add-circle-line",show:()=>["DWD"].includes(vue.unref(v))&&w.data.includes("ODS_CREATE")}],d.value=[{label:()=>"保存",type:"warning",value:"SAVE_MODEL_MATRIX",icon:"ri-save-line",show:()=>["MATRIX"].includes(vue.unref(v))&&w.data.includes("SAVE_MODEL_MATRIX")},{label:()=>"复制",value:"COPY",icon:"ri-file-copy-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.id)&&(($=vue.unref(m))==null?void 0:$.shadowFlag)!=2&&w.data.includes("PUBLISH")}},{label:()=>"发布",value:"PUBLISH",icon:"ri-book-open-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.publishStatus)==1&&w.data.includes("PUBLISH")}},{label:()=>{let E="删除数据仓";return vue.unref(v)=="ODSVIEW"&&(E="删除视图"),E},value:"REMOVE_PUBLISH",type:"danger",icon:"ri-delete-bin-2-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.publishStatus)==2&&w.data.includes("REMOVE_PUBLISH")}},{label:()=>"编辑",value:"EDIT",icon:"ri-file-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("EDIT")}},{label:()=>"删除模型",value:"DEL",type:"danger",icon:"ri-delete-bin-2-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("DEL")}},{label:()=>"新增字段",value:"FIELD-ADD",icon:"ri-add-line",show:()=>{var E,$;return["ODS","DWD","ODSVIEW"].includes(vue.unref(v))&&((E=vue.unref(m))==null?void 0:E.shadowFlag)!=2&&(($=vue.unref(m))==null?void 0:$.id)&&w.data.includes("EDIT")}}])});const _=w=>{v.value=w,m.value={},vue.nextTick(()=>{var E;o.$refs.menuRef.$refs.treeRef.setCurrentKey((E=vue.unref(m))==null?void 0:E.id)})},y=w=>{m.value=w,vue.nextTick(()=>{o.$refs.modelViewRef.init(vue.unref(m))})},b=async(w,E)=>{var $,S;switch(p.value=!1,w){case"conn":case"sql":case"normal":case"excel":case"extract":o.$refs[`${w}Ref`].init();break;case"DEL":o.$baseConfirm({content:"是否确认删除?",callConfirm:async()=>{var k;await o.$baseHttp.post(`/ace-data-center/model/remove?ids=${(k=vue.unref(m))==null?void 0:k.id}`,{},{headers:{loading:!0}})&&(o.$message.success("操作成功"),m.value={},C())}});break;case"EDIT":{const V=await a(($=vue.unref(m))==null?void 0:$.id,!0);if(!V)return;if(V.data.publishStatus==1){if(["ODSVIEW"].includes(vue.unref(v))){vue.unref(u).init("ODSVIEW_EDIT");return}o.$refs.normalRef.init(V.data);return}o.$message.warning("模型已发布,无法编辑")}break;case"COPY":{if(["ODSVIEW"].includes(vue.unref(v))){vue.unref(u).init("ODSVIEW_COPY");return}const V=await a((S=vue.unref(m))==null?void 0:S.id,!0);if(!V)return;delete V.data.id,V.data.listModelAttribute.forEach(k=>{k.id=null,k.createUser=null,k.createDept=null,k.createTime=null,k.updateUser=null,k.updateTime=null,k.modelId=null,k.nanoid=nanoid()}),V.data.slaveModels&&V.data.slaveModels.forEach(k=>{delete k.id,k.listModelAttribute.forEach(P=>{delete P.id,P.createUser=null,P.createDept=null,P.createTime=null,P.updateUser=null,P.updateTime=null,P.modelId=null,P.nanoid=nanoid()})}),o.$refs.normalRef.init(V.data)}break;case"PUBLISH":case"REMOVE_PUBLISH":{const V=w==="PUBLISH"?"模型发布后,模型信息无法再进行变更操作,是否立即执行?":"确定删除数仓表,删除后模型数据将清空,是否执行?",k=w==="PUBLISH"?"2":"1";o.$baseConfirm({content:V,callConfirm:async()=>{var B;await l((B=vue.unref(m))==null?void 0:B.id,k)&&(vue.unref(m).publishStatus=k,o.$message.success("操作成功"),C())}})}break;case"editTag":o.$refs.tagEditRef.init(E);break;case"SAVE_MODEL_MATRIX":{if(!await o.$baseHttp.post("/api/ace-data-center/model-matrix/save",{modelLayer:"DWD",projectId:o.$baseGetCurrentProjectId(),list:o.$refs.MatrixRef.wdModel.map(k=>({modelId:k.id,listTargetModelId:k.checked}))},{headers:{loading:!0}}))return;o.$message.success("操作成功")}break;case"FIELD-ADD":vue.unref(c).init();break}},x=w=>{w==="model-add"&&(p.value=!0),vue.unref(u).init(w)},C=()=>{var w;o.$refs.menuRef.init(),(w=vue.unref(m))!=null&&w.id&&o.$refs.modelViewRef.init(vue.unref(m))};return(w,E)=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{class:"h-full overflow-hidden app-basic-container"},{default:vue.withCtx(()=>{var $;return[w.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElHeader),{key:0,style:{height:"auto",padding:"0"},class:"flex items-center mb-3 fadeIn animated"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{type:vue.unref(v)==S.value?"primary":"",key:S.value,disabled:S.disabled,onClick:V=>_(S.value)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(S.label),1)]),_:2},1032,["type","disabled","onClick"]))),128))]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{type:"primary",size:"small",class:"ml-2.5",onClick:E[0]||(E[0]=S=>x("model-add"))},{default:vue.withCtx(()=>[_hoisted_1$g,vue.createTextVNode(" 编写sql数据整合 ")]),_:1}),vue.createElementVNode("div",_hoisted_2$c,[["ODSVIEW"].includes(vue.unref(v))?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.unref(f).length?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdown),{key:0,onCommand:b},{dropdown:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElDropdownMenu),null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),S=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElDropdownItem),{disabled:!S.show(),command:S.value},{default:vue.withCtx(()=>[_hoisted_4$a,vue.createTextVNode(" "+vue.toDisplayString(S.label),1)]),_:2},1032,["disabled","command"]))),256))]),_:1})]),default:vue.withCtx(()=>[_hoisted_3$a]),_:1})):vue.createCommentVNode("",!0)],64)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(d),S=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[S.show()?(vue.openBlock(),vue.createElementBlock("span",_hoisted_5$8,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:S.type||"primary",onClick:V=>b(S.value)},{default:vue.withCtx(()=>[vue.createElementVNode("i",{class:vue.normalizeClass([S.icon,"mr-1"])},null,2),vue.createTextVNode(" "+vue.toDisplayString(S.label()),1)]),_:2},1032,["type","onClick"]),_hoisted_6$8])):vue.createCommentVNode("",!0)],64))),256))])]),_:1})),vue.withDirectives(vue.createVNode(vue.unref(elementPlus.ElContainer),{class:"flex flex-1 overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElConfigProvider),{locale:vue.unref(r)},{default:vue.withCtx(()=>[w.isCustom?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAside),{key:0,class:"pr-5 mr-5"},{default:vue.withCtx(()=>{var S;return[vue.createVNode(_sfc_main$O,{ref:"menuRef",type:vue.unref(v),onNodeClick:y,id:(S=vue.unref(m))==null?void 0:S.id},{default:vue.withCtx(({element:V})=>[V.modelCode&&vue.unref(g).includes("EDIT")?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"ml-2 ri-edit-box-line",onClick:vue.withModifiers(k=>b("editTag",V),["stop"])},null,8,_hoisted_7$8)):vue.createCommentVNode("",!0)]),_:1},8,["type","id"])]}),_:1})),vue.createVNode(vue.unref(elementPlus.ElMain),{class:"flex-1 overflow-hidden"},{default:vue.withCtx(()=>{var S;return[(S=vue.unref(m))!=null&&S.id?(vue.openBlock(),vue.createBlock(aceModelView,{key:1,ref:"modelViewRef",type:vue.unref(v),permission:vue.unref(g),isCustom:w.isCustom},null,8,["type","permission","isCustom"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$8,[vue.createVNode(vue.unref(elementPlus.ElEmpty),{description:"请在左侧选择模型"})]))]}),_:1})]),_:1},8,["locale"])]),_:1},512),[[vue.vShow,["ODS","DWD","ODSVIEW"].includes(vue.unref(v))]]),["MATRIX"].includes(vue.unref(v))?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElContainer),{key:1,class:"overflow-hidden"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElMain),null,{default:vue.withCtx(()=>[vue.createVNode(Matrix,{ref:"MatrixRef"},null,512)]),_:1})]),_:1})):vue.createCommentVNode("",!0),vue.createVNode(_sfc_main$M,{ref:"connRef",onSuccess:E[1]||(E[1]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$L,{ref:"sqlRef",onSuccess:E[2]||(E[2]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$K,{ref:"normalRef",onSuccess:E[3]||(E[3]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$J,{ref:"excelRef",onSuccess:E[4]||(E[4]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$I,{ref:"extractRef",onSuccess:E[5]||(E[5]=S=>C()),permission:vue.unref(g)},null,8,["permission"]),vue.createVNode(_sfc_main$H,{ref:"tagEditRef",permission:vue.unref(g),onSuccess:E[6]||(E[6]=S=>C())},null,8,["permission"]),vue.createVNode(Sql,{ref_key:"modelSqlRef",ref:u,modelId:vue.unref(p)?"":($=vue.unref(m))==null?void 0:$.id,onSuccess:C},null,8,["modelId"]),vue.createVNode(_sfc_main$j,{ref_key:"fileAddRef",ref:c,model:vue.unref(m),onSuccess:E[7]||(E[7]=S=>vue.unref(o).$refs.modelViewRef.init(vue.unref(m)))},null,8,["model"])]}),_:1}))}}),_withScopeId$7=i=>(vue.pushScopeId("data-v-480e7149"),i=i(),vue.popScopeId(),i),_hoisted_1$f={class:"flex flex-col"},_hoisted_2$b={class:"flex flex-col h-60"},_hoisted_3$9={class:"h"},_hoisted_4$9=["onClick"],_hoisted_5$7={class:"ml-2.5 text-gray-500"},_hoisted_6$7={class:"flex justify-end flex-1"},_hoisted_7$7=_withScopeId$7(()=>vue.createElementVNode("i",{class:"ri-play-circle-line"},null,-1)),_hoisted_8$7={class:"b"},_hoisted_9$7={class:"flex flex-col h-60"},_hoisted_10$6={class:"h"},_hoisted_11$4=["onClick"],_hoisted_12$2={class:"b"},_hoisted_13$2={class:"overflow-y-auto max-h-96",style:{"min-height":"300px"}},_hoisted_14$2=_withScopeId$7(()=>vue.createElementVNode("span",{class:"mr-1 text-color-danger"},"*",-1)),_sfc_main$h=vue.defineComponent({__name:"create",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),{setFormValue:l,getFormValue:s}=a.$globalHooks.useForm(),u=vue.ref(null),c=vue.ref(null),d=vue.ref(!1),f=vue.ref({}),p=vue.ref(1),v=[{label:"接口执行结果",value:1},{label:"接口执行结果(JSON)",value:2}],m=vue.ref(1),g=[{label:"① 输出模型",value:1},{label:"② 作业配置",value:2}],_=vue.ref(""),y=vue.ref(!1),b=vue.ref([]),x=vue.ref([]),C=vue.reactive([{name:"模型层级",type:FieldType.Select,fieldName:"modelLayer",value:"",required:!0,disabled:!0,props:{url:"/api/ace-api/blade-system/dict-biz/dictionary?code=modelLayer",label:"dictValue",value:"dictKey"}},{name:"模型名称",type:FieldType.Text,fieldName:"modelName",value:"",required:!0},{name:"模型表名",type:FieldType.Text,fieldName:"modelCode",value:"",required:!0,prepend:vue.h("div",{},"ods_")}]),w=async V=>{const k=await a.$baseHttp.get(`/api/ace-data-center/invoke-api-extract/detail?id=${V.id}`,{headers:{loading:!0}});f.value=k.data,b.value=[],p.value=1,m.value=1,x.value=[],_.value="",y.value=!1,l({modelLayer:"ODS"},C),d.value=!0,vue.nextTick(()=>{vue.unref(c).init({})})},E=async()=>{var I;m.value=1;const{params:V,error:k}=s(C);if(k.length>0)return;if(!await((I=vue.unref(u))==null?void 0:I.validate())){a.$message.warning("映射字段有误请核对");return}const B=vue.unref(u).isRepeat();if(B!==""){a.$baseAlert({content:B});return}if(!vue.unref(x).length){a.$message.warning("字段不能为空");return}const T={...V,modelCode:"ods_"+V.modelCode,projectId:String(a.$baseGetCurrentProjectId()),listModelAttribute:vue.unref(x),viewQuerySql:"",createMethod:8,taskDefined:null};if(vue.unref(y)){const{params:L,error:D}=vue.unref(c).getForm();if(D.length>0){m.value=2,a.$message.warning("作业配置有误");return}V.taskDefined=L}let N;const O=vue.unref(_)?"/api/ace-data-center/model/editModelDetail":"/api/ace-data-center/model/saveModelDetail";N=await a.$baseHttp.post(O,T,{headers:{loading:!0}}),N&&(_.value=N.data,N=await a.$baseHttp.post(`/api/ace-data-center/model/settingPublishStatus/${vue.unref(_)}/2`,{},{headers:{loading:!0}}),N&&(N=await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/submitApiExtractTask",{invokeApiExtractId:vue.unref(f).id,modelId:_.value,taskDefined:V.taskDefined},{headers:{loading:!0}}),a.$message.success("操作成功"),d.value=!1,o("success")))},$=async()=>{const V=await a.$baseHttp.post("/api/ace-data-center/invoke-api-extract/debug",{...vue.unref(f)},{headers:{loading:!0}});if(V)try{b.value=JSON.parse(V.data),S()}catch{b.value=[]}},S=async()=>{const V=await a.$baseHttp.post("/api/ace-data-center/model/autoParseToModelByList",vue.unref(b),{headers:{loading:!0}});V&&(x.value=V.data)};return n({init:w}),(V,k)=>{const P=vue.resolveComponent("AppTable"),B=vue.resolveComponent("AppJson"),T=vue.resolveComponent("AppForm"),N=vue.resolveComponent("aceHeader"),O=vue.resolveComponent("AppTaskDesign"),I=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(I,{modelValue:vue.unref(d),"onUpdate:modelValue":k[4]||(k[4]=L=>vue.isRef(d)?d.value=L:null),title:"创建模型",size:"80%"},{footer:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",type:"primary",onClick:E},{default:vue.withCtx(()=>[vue.createTextVNode("保存")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:k[3]||(k[3]=L=>d.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),default:vue.withCtx(()=>{var L;return[vue.createElementVNode("div",_hoisted_1$f,[vue.createElementVNode("div",_hoisted_2$b,[vue.createElementVNode("div",_hoisted_3$9,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(v,D=>vue.createElementVNode("div",{class:vue.normalizeClass(["h-item",{active:D.value==vue.unref(p)}]),onClick:F=>p.value=D.value},vue.toDisplayString(D.label),11,_hoisted_4$9)),64)),vue.createElementVNode("div",_hoisted_5$7,"接口名称:"+vue.toDisplayString(vue.unref(f).apiName),1),vue.createElementVNode("div",_hoisted_6$7,[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"warning",onClick:$},{default:vue.withCtx(()=>[_hoisted_7$7,vue.createTextVNode(" 执行接口 ")]),_:1})])]),vue.createElementVNode("div",_hoisted_8$7,[vue.unref(p)==1?(vue.openBlock(),vue.createBlock(P,{key:0,tableData:(L=vue.unref(b))!=null&&L.length?Object.keys(vue.unref(b)[0]).map(D=>({label:D,prop:D})):[],list:vue.unref(b)??[]},null,8,["tableData","list"])):vue.createCommentVNode("",!0),vue.unref(p)==2?(vue.openBlock(),vue.createBlock(B,{key:1,style:{height:"100%"},modelValue:vue.unref(b),"onUpdate:modelValue":k[0]||(k[0]=D=>vue.isRef(b)?b.value=D:null)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])]),vue.createElementVNode("div",_hoisted_9$7,[vue.createElementVNode("div",_hoisted_10$6,[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(g,D=>vue.createElementVNode("div",{class:vue.normalizeClass(["h-item",{active:D.value==vue.unref(m)}]),onClick:F=>m.value=D.value},vue.toDisplayString(D.label),11,_hoisted_11$4)),64))]),vue.createElementVNode("div",_hoisted_12$2,[vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(T,{form:vue.unref(C),col:1},null,8,["form"]),vue.createVNode(vue.unref(elementPlus.ElPopover),{placement:"top-end",trigger:"click",width:"1000px","popper-class":"ace-select"},{reference:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-7"},{default:vue.withCtx(()=>[_hoisted_14$2,vue.createTextVNode(" 字段映射("+vue.toDisplayString(vue.unref(x).length)+") ",1)]),_:1})]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_13$2,[vue.createVNode(Attribute,{ref_key:"attributeRef",ref:u,modelValue:vue.unref(x),"onUpdate:modelValue":k[1]||(k[1]=D=>vue.isRef(x)?x.value=D:null)},null,8,["modelValue"])])]),_:1})],512),[[vue.vShow,vue.unref(m)==1]]),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(N,{title:"作业配置",class:"mb-2"},{left:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElCheckbox),{class:"ml-2",modelValue:vue.unref(y),"onUpdate:modelValue":k[2]||(k[2]=D=>vue.isRef(y)?y.value=D:null)},{default:vue.withCtx(()=>[vue.createTextVNode("作业配置")]),_:1},8,["modelValue"])]),_:1}),vue.withDirectives(vue.createElementVNode("div",null,[vue.createVNode(O,{ref_key:"taskDesignRef",ref:c},null,512)],512),[[vue.vShow,vue.unref(y)]])],512),[[vue.vShow,vue.unref(m)==2]])])])])]}),_:1},8,["modelValue"])}}}),create_vue_vue_type_style_index_0_scoped_480e7149_lang="",Create=_export_sfc$2(_sfc_main$h,[["__scopeId","data-v-480e7149"]]),_hoisted_1$e=vue.createElementVNode("i",{class:"ri-pushpin-line"},null,-1),_hoisted_2$a=vue.createElementVNode("i",{class:"ri-file-line"},null,-1),_sfc_main$g=vue.defineComponent({__name:"server",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(null),a=vue.ref(null),l=vue.ref(null),s=vue.reactive([{name:"新增",key:"add",type:"primary",icon:"ri-add-line"}]),u=vue.reactive([{name:"api名称",type:FieldType.Text,fieldName:"apiName",value:""}]),c=vue.reactive([{label:"接口名称",prop:"apiName"},{label:"接口方式",prop:"requestType"},{label:"状态",prop:"invokeStatus",slot:!0},{label:"是否分页请求",prop:"isPages",dict:"status"},{label:"依赖前置接口",prop:"preApiName"},{label:"数据模型",prop:"modelId",slot:!0},{label:"模型名称",prop:"modelCode"},{label:"数据操作",prop:"dataAction",slot:!0},{label:"接口操作",prop:"htmlButton",fixed:"right",width:"200px"}]),d=p=>{p.data.forEach(v=>{v.htmlButton=[],v.htmlButton.push({name:"查看",key:"view",type:"warning",icon:"ri-eye-line"}),v.htmlButton.push({name:"编辑",key:"edit",type:"primary",icon:"ri-edit-line"}),v.htmlButton.push({name:v.invokeStatus?"停用":"启用",key:v.invokeStatus?"stop":"start",type:v.invokeStatus?"danger":"success",icon:v.invokeStatus?"ri-pause-circle-line":"ri-play-circle-line"}),v.invokeStatus||v.htmlButton.push({name:"删除",key:"remove",type:"danger",icon:"ri-delete-bin-6-line"})})},f=async p=>{const{type:v,row:m}=p;switch(v){case"add":vue.unref(o).init();break;case"view":case"edit":vue.unref(o).init(m.id,v==="view");break;case"start":case"stop":n.$baseConfirm({content:"是否确定操作",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/changeInvokeStatus/${m.id}/${m.invokeStatus?0:1}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"remove":n.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/remove?ids=${m.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"PUSH":n.$baseConfirm({content:"是否抽取?",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-api-extract/extract?id=${m.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break;case"LOG":vue.unref(l).init({businessId:m.id,businessType:"invoke_api_extract",table:[{label:"日期",prop:"createTime"},{label:"数据总数",prop:"totalNum"},{label:"成功数",prop:"successNum"},{label:"失败数",prop:"failNum"},{label:"操作",prop:"action",slot:!0,fixed:"right"}]});break;case"CREATE":vue.unref(a).init(m);break}};return(p,v)=>{const m=vue.resolveComponent("aceModelExtractLog"),g=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(g,{ref_key:"appRef",ref:r,searchForm:vue.unref(u),tableData:vue.unref(c),searchBtns:vue.unref(s),url:"/api/ace-data-center/invoke-api-extract/page",onSuccess:d,onBtnClick:f},{invokeStatus:vue.withCtx(({row:_})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:_.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(_.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),modelId:vue.withCtx(({row:_})=>[_.modelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:1,type:"primary",size:"small",plain:"",onClick:vue.withModifiers(y=>f({type:"CREATE",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[vue.createTextVNode(" 创建模型 ")]),_:2},1032,["onClick"]))]),dataAction:vue.withCtx(({row:_})=>[_.modelId?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",onClick:vue.withModifiers(y=>f({type:"PUSH",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[_hoisted_1$e,vue.createTextVNode(" 抽取 ")]),_:2},1032,["onClick"]),vue.createVNode(vue.unref(elementPlus.ElLink),{type:"primary",class:"ml-3",onClick:vue.withModifiers(y=>f({type:"LOG",row:_,index:-1}),["stop"])},{default:vue.withCtx(()=>[_hoisted_2$a,vue.createTextVNode(" 抽取记录 ")]),_:2},1032,["onClick"])],64)):vue.createCommentVNode("",!0)]),default:vue.withCtx(()=>[vue.createVNode(ServerView,{ref_key:"serverRef",ref:o,onSuccess:v[0]||(v[0]=_=>vue.unref(r).getData())},null,512),vue.createVNode(m,{ref_key:"modelExtractLogRef",ref:l},null,512),vue.createVNode(Create,{ref_key:"createRef",ref:a,onSuccess:v[1]||(v[1]=_=>vue.unref(r).getData())},null,512)]),_:1},8,["searchForm","tableData","searchBtns"])}}}),_withScopeId$6=i=>(vue.pushScopeId("data-v-04d83cd1"),i=i(),vue.popScopeId(),i),_hoisted_1$d={class:"flex flex-1 gap-2.5"},_hoisted_2$9={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_3$8=_withScopeId$6(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 请求设置 ")])],-1)),_hoisted_4$8={class:"b"},_hoisted_5$6={class:"flex flex-col w-full gap-1"},_hoisted_6$6={class:"flex flex-col w-full"},_hoisted_7$6={class:"flex flex-col flex-1 overflow-hidden"},_hoisted_8$6=_withScopeId$6(()=>vue.createElementVNode("div",{class:"h"},[vue.createElementVNode("div",{class:"h-item active"},[vue.createElementVNode("i",{class:"ri-settings-2-line"}),vue.createTextVNode(" 返回设置 ")])],-1)),_hoisted_9$6={class:"b"},_hoisted_10$5={class:"w-full"},_hoisted_11$3=_withScopeId$6(()=>vue.createElementVNode("i",{class:"ri-play-large-fill"},null,-1)),_sfc_main$f=vue.defineComponent({__name:"preView",emits:["success"],setup(i,{expose:n,emit:r}){const o=r,{proxy:a}=vue.getCurrentInstance(),l=vue.ref(!1),s=vue.ref({}),u=vue.ref([]),c=vue.ref("header"),d=[{label:"请求头",value:"header"},{label:"请求参数",value:"parameters"},{label:"请求body",value:"body"}],f=vue.ref(!1),p=vue.ref(!1),v=vue.computed(()=>vue.unref(s).apiName===""||vue.unref(s).url===""||vue.unref(s).responseObjectCode===""||vue.unref(s).requestType===""),m=async(y,b=!1)=>{if(c.value="header",p.value=!1,f.value=b,s.value={apiName:"",url:"",jsModule:[],requestType:"GET",preApiId:"",header:"",parameters:"",body:"",successCondition:"",responseObjectCode:"",isCacheResult:0,cacheKey:"",cacheTime:"",id:""},y){const x=await a.$baseHttp.get(`/api/ace-data-center/invoke-pre-api/detail?id=${y}`);Object.keys(s.value).forEach(C=>{let w=x.data[C]??"";C=="jsModule"&&(w===""?w=[]:w=w.split(",")),s.value[C]=w})}l.value=!0,a.$baseHttp.get("/api/ace-data-center/invoke-pre-api/options").then(x=>{u.value=x.data})},g=async()=>{await a.$baseHttp.post("/api/ace-data-center/invoke-pre-api/submit",{...vue.unref(s),projectId:a.$baseGetCurrentProjectId(),jsModule:(vue.unref(s).jsModule??"").toString()},{headers:{loading:!0}})&&(a.$message.success("操作成功"),l.value=!1,o("success"))},_=async()=>{var b;await a.$baseHttp.post("/api/ace-data-center/invoke-pre-api/debug",{...vue.unref(s),jsModule:(((b=vue.unref(s))==null?void 0:b.jsModule)??"").toString()},{headers:{loading:!0}})&&(p.value=!0)};return n({init:m}),(y,b)=>{const x=vue.resolveComponent("AppDrawer");return vue.openBlock(),vue.createBlock(x,{modelValue:vue.unref(l),"onUpdate:modelValue":b[14]||(b[14]=C=>vue.isRef(l)?l.value=C:null),title:"前置接口",size:"100%"},vue.createSlots({default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$9,[_hoisted_3$8,vue.createElementVNode("div",_hoisted_4$8,[vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"120px"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口名称",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).apiName,"onUpdate:modelValue":b[0]||(b[0]=C=>vue.unref(s).apiName=C),placeholder:"请输入接口名称",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"引入第三方JS库"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(s).jsModule,"onUpdate:modelValue":b[1]||(b[1]=C=>vue.unref(s).jsModule=C),"popper-class":"ace-select",placeholder:"请选择需引入的第三方JS库",disabled:vue.unref(f),multiple:"",clearable:"",filterable:""},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a).$globalDict.jsModuleOptions,C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口URL",required:""},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$6,[vue.createVNode(vue.unref(elementPlus.ElRadioGroup),{modelValue:vue.unref(s).requestType,"onUpdate:modelValue":b[2]||(b[2]=C=>vue.unref(s).requestType=C),disabled:vue.unref(f)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"GET"},{default:vue.withCtx(()=>[vue.createTextVNode("GET")]),_:1}),vue.createVNode(vue.unref(elementPlus.ElRadio),{value:"POST"},{default:vue.withCtx(()=>[vue.createTextVNode("POST")]),_:1})]),_:1},8,["modelValue","disabled"]),vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).url,"onUpdate:modelValue":b[3]||(b[3]=C=>vue.unref(s).url=C),disabled:vue.unref(f),example:`function plugin(){
664
664
  return 'http://127.0.0.1:8910/api/login';
665
665
  }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"依赖前置接口"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSelect),{modelValue:vue.unref(s).preApiId,"onUpdate:modelValue":b[4]||(b[4]=C=>vue.unref(s).preApiId=C),placeholder:"请输入依赖前置接口",disabled:vue.unref(f)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),C=>(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElOption),{key:C.code,label:C.label,value:C.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"请求参数"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_6$6,[vue.createVNode(vue.unref(elementPlus.ElButtonGroup),null,{default:vue.withCtx(()=>[(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,vue.renderList(d,C=>vue.createVNode(vue.unref(elementPlus.ElButton),{type:vue.unref(c)==C.value?"primary":"",onClick:w=>c.value=C.value},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(C.label),1)]),_:2},1032,["type","onClick"])),64))]),_:1}),vue.unref(c)=="header"?(vue.openBlock(),vue.createBlock(_sfc_main$o,{key:0,modelValue:vue.unref(s).header,"onUpdate:modelValue":b[5]||(b[5]=C=>vue.unref(s).header=C),disabled:vue.unref(f),example:`function plugin(){
666
666
  var data = {};
@@ -680,7 +680,7 @@ ${p} div ,${p} span,${p} a,${p} * {
680
680
  }`},null,8,["modelValue","disabled"])):vue.createCommentVNode("",!0)])]),_:1})]),_:1})])]),vue.createElementVNode("div",_hoisted_7$6,[_hoisted_8$6,vue.createElementVNode("div",_hoisted_9$6,[vue.createVNode(vue.unref(elementPlus.ElForm),{"label-width":"120px",disabled:vue.unref(f)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"返回对象编码",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).responseObjectCode,"onUpdate:modelValue":b[8]||(b[8]=C=>vue.unref(s).responseObjectCode=C),placeholder:"请输入返回对象编码",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"接口调用成功条件"},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_10$5,[vue.createVNode(_sfc_main$o,{modelValue:vue.unref(s).successCondition,"onUpdate:modelValue":b[9]||(b[9]=C=>vue.unref(s).successCondition=C),disabled:vue.unref(f),example:`function plugin(){
681
681
  //token为本接口返回对象编码
682
682
  return token.code == 200;
683
- }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"是否缓存结果",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:vue.unref(s).isCacheResult,"onUpdate:modelValue":b[10]||(b[10]=C=>vue.unref(s).isCacheResult=C),"active-value":1,"inactive-value":0,disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"缓存key"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).cacheKey,"onUpdate:modelValue":b[11]||(b[11]=C=>vue.unref(s).cacheKey=C),placeholder:"请输入缓存key",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"缓存时长"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).cacheTime,"onUpdate:modelValue":b[12]||(b[12]=C=>vue.unref(s).cacheTime=C),placeholder:"请输入缓存时长",disabled:vue.unref(f)},{append:vue.withCtx(()=>[vue.createTextVNode("秒")]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"success",onClick:_,disabled:vue.unref(v)},{default:vue.withCtx(()=>[_hoisted_11$3,vue.createTextVNode(" 调试接口 ")]),_:1},8,["disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.unref(p)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAlert),{key:0,type:"success",description:"接口调试成功","show-icon":"",closable:!1})):vue.createCommentVNode("",!0)]),_:1})])])])]),_:2},[vue.unref(f)?void 0:{name:"footer",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",disabled:vue.unref(v),type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(" 保存 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[13]||(b[13]=C=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),key:"0"}]),1032,["modelValue"])}}}),preView_vue_vue_type_style_index_0_scoped_2f81f1fa_lang="",PreView=_export_sfc$2(_sfc_main$f,[["__scopeId","data-v-2f81f1fa"]]),_sfc_main$e=vue.defineComponent({__name:"pre",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(null),a=vue.reactive([{name:"新增",key:"add",type:"primary",icon:"ri-add-line"}]),l=vue.reactive([{name:"api名称",type:FieldType.Text,fieldName:"apiName",value:""}]),s=vue.reactive([{label:"接口名称",prop:"apiName"},{label:"接口方式",prop:"requestType"},{label:"是否缓存接口",prop:"isCacheResult",dict:"status"},{label:"依赖前置接口",prop:"preApiName"},{label:"返回对象编码",prop:"responseObjectCode"},{label:"接口操作",prop:"htmlButton",fixed:"right",width:"200px"}]),u=d=>{d.data.forEach(f=>{f.htmlButton=[],f.htmlButton.push({name:"查看",key:"view",type:"warning",icon:"ri-eye-line"}),f.htmlButton.push({name:"编辑",key:"edit",type:"primary",icon:"ri-edit-line"}),f.htmlButton.push({name:"删除",key:"remove",type:"danger",icon:"ri-delete-bin-6-line"})})},c=async d=>{const{type:f,row:p}=d;switch(f){case"add":vue.unref(o).init();break;case"view":case"edit":vue.unref(o).init(p.id,f==="view");break;case"remove":n.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-pre-api/remove?ids=${p.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break}};return(d,f)=>{const p=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(p,{ref_key:"appRef",ref:r,searchForm:vue.unref(l),tableData:vue.unref(s),searchBtns:vue.unref(a),url:"/api/ace-data-center/invoke-pre-api/page",onSuccess:u,onBtnClick:c},{invokeStatus:vue.withCtx(({row:v})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:v.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(v.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),modelId:vue.withCtx(({row:v})=>[v.modelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:1,type:"primary",size:"small",plain:""},{default:vue.withCtx(()=>[vue.createTextVNode("创建模型")]),_:1}))]),default:vue.withCtx(()=>[vue.createVNode(PreView,{ref_key:"preViewRef",ref:o,onSuccess:f[0]||(f[0]=v=>vue.unref(r).getData())},null,512)]),_:1},8,["searchForm","tableData","searchBtns"])}}}),_hoisted_1$c={class:"flex flex-col flex-1 gap-2 overflow-hidden"},_sfc_main$d=vue.defineComponent({__name:"index",setup(i){const n=vue.ref("server"),r=vue.ref([{label:"数据接口",value:"server"},{label:"前置接口",value:"pre"}]);return(o,a)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElSegmented),{modelValue:vue.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>vue.isRef(n)?n.value=l:null),options:vue.unref(r)},null,8,["modelValue","options"])]),vue.unref(n)=="server"?(vue.openBlock(),vue.createBlock(_sfc_main$g,{key:0})):vue.createCommentVNode("",!0),vue.unref(n)=="pre"?(vue.openBlock(),vue.createBlock(_sfc_main$e,{key:1})):vue.createCommentVNode("",!0)]))}});typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(i){i.forEach(n=>{Object.prototype.hasOwnProperty.call(n,"append")||Object.defineProperty(n,"append",{configurable:!0,enumerable:!0,writable:!0,value(...r){const o=document.createDocumentFragment();r.forEach(a=>{const l=a instanceof Node;o.appendChild(l?a:document.createTextNode(String(a)))}),this.appendChild(o)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class Disposable{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(i){function n(){return(r,o,a)=>{const l=a.value,s=r.__proto__;a.value=function(...u){this.disposed||(l.call(this,...u),s.dispose.call(this))}}}i.dispose=n})(Disposable||(Disposable={}));class DisposableSet{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(n=>{n.dispose()}),this.items.clear())}contains(n){return this.items.has(n)}add(n){this.items.add(n)}remove(n){this.items.delete(n)}clear(){this.items.clear()}}(function(i){function n(r){const o=new i;return r.forEach(a=>{o.add(a)}),o}i.from=n})(DisposableSet||(DisposableSet={}));var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$1=root$1.Symbol;const Symbol$2=Symbol$1;var objectProto$j=Object.prototype,hasOwnProperty$g=objectProto$j.hasOwnProperty,nativeObjectToString$1=objectProto$j.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(i){var n=hasOwnProperty$g.call(i,symToStringTag$1),r=i[symToStringTag$1];try{i[symToStringTag$1]=void 0;var o=!0}catch{}var a=nativeObjectToString$1.call(i);return o&&(n?i[symToStringTag$1]=r:delete i[symToStringTag$1]),a}var objectProto$i=Object.prototype,nativeObjectToString=objectProto$i.toString;function objectToString(i){return nativeObjectToString.call(i)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(i){return i==null?i===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(i)?getRawTag(i):objectToString(i)}function isObjectLike(i){return i!=null&&typeof i=="object"}var symbolTag$3="[object Symbol]";function isSymbol(i){return typeof i=="symbol"||isObjectLike(i)&&baseGetTag(i)==symbolTag$3}function arrayMap(i,n){for(var r=-1,o=i==null?0:i.length,a=Array(o);++r<o;)a[r]=n(i[r],r,i);return a}var isArray=Array.isArray;const isArray$1=isArray;var INFINITY$2=1/0,symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(i){if(typeof i=="string")return i;if(isArray$1(i))return arrayMap(i,baseToString)+"";if(isSymbol(i))return symbolToString?symbolToString.call(i):"";var n=i+"";return n=="0"&&1/i==-INFINITY$2?"-0":n}var reWhitespace=/\s/;function trimmedEndIndex(i){for(var n=i.length;n--&&reWhitespace.test(i.charAt(n)););return n}var reTrimStart=/^\s+/;function baseTrim(i){return i&&i.slice(0,trimmedEndIndex(i)+1).replace(reTrimStart,"")}function isObject(i){var n=typeof i;return i!=null&&(n=="object"||n=="function")}var NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(i){if(typeof i=="number")return i;if(isSymbol(i))return NAN;if(isObject(i)){var n=typeof i.valueOf=="function"?i.valueOf():i;i=isObject(n)?n+"":n}if(typeof i!="string")return i===0?i:+i;i=baseTrim(i);var r=reIsBinary.test(i);return r||reIsOctal.test(i)?freeParseInt(i.slice(2),r?2:8):reIsBadHex.test(i)?NAN:+i}function identity(i){return i}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(i){if(!isObject(i))return!1;var n=baseGetTag(i);return n==funcTag$2||n==genTag$1||n==asyncTag||n==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var i=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function isMasked(i){return!!maskSrcKey&&maskSrcKey in i}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(i){if(i!=null){try{return funcToString$2.call(i)}catch{}try{return i+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$h=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$f=objectProto$h.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$f).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(i){if(!isObject(i)||isMasked(i))return!1;var n=isFunction(i)?reIsNative:reIsHostCtor;return n.test(toSource(i))}function getValue(i,n){return i==null?void 0:i[n]}function getNative(i,n){var r=getValue(i,n);return baseIsNative(r)?r:void 0}var WeakMap$1=getNative(root$1,"WeakMap");const WeakMap$2=WeakMap$1;var objectCreate=Object.create,baseCreate=function(){function i(){}return function(n){if(!isObject(n))return{};if(objectCreate)return objectCreate(n);i.prototype=n;var r=new i;return i.prototype=void 0,r}}();const baseCreate$1=baseCreate;function apply$1(i,n,r){switch(r.length){case 0:return i.call(n);case 1:return i.call(n,r[0]);case 2:return i.call(n,r[0],r[1]);case 3:return i.call(n,r[0],r[1],r[2])}return i.apply(n,r)}function noop$1(){}function copyArray(i,n){var r=-1,o=i.length;for(n||(n=Array(o));++r<o;)n[r]=i[r];return n}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(i){var n=0,r=0;return function(){var o=nativeNow(),a=HOT_SPAN-(o-r);if(r=o,a>0){if(++n>=HOT_COUNT)return arguments[0]}else n=0;return i.apply(void 0,arguments)}}function constant(i){return function(){return i}}var defineProperty=function(){try{var i=getNative(Object,"defineProperty");return i({},"",{}),i}catch{}}();const defineProperty$1=defineProperty;var baseSetToString=defineProperty$1?function(i,n){return defineProperty$1(i,"toString",{configurable:!0,enumerable:!1,value:constant(n),writable:!0})}:identity;const baseSetToString$1=baseSetToString;var setToString=shortOut(baseSetToString$1);const setToString$1=setToString;function arrayEach(i,n){for(var r=-1,o=i==null?0:i.length;++r<o&&n(i[r],r,i)!==!1;);return i}function baseFindIndex(i,n,r,o){for(var a=i.length,l=r+(o?1:-1);o?l--:++l<a;)if(n(i[l],l,i))return l;return-1}function baseIsNaN(i){return i!==i}function strictIndexOf(i,n,r){for(var o=r-1,a=i.length;++o<a;)if(i[o]===n)return o;return-1}function baseIndexOf(i,n,r){return n===n?strictIndexOf(i,n,r):baseFindIndex(i,baseIsNaN,r)}function arrayIncludes(i,n){var r=i==null?0:i.length;return!!r&&baseIndexOf(i,n,0)>-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(i,n){var r=typeof i;return n=n??MAX_SAFE_INTEGER$1,!!n&&(r=="number"||r!="symbol"&&reIsUint.test(i))&&i>-1&&i%1==0&&i<n}function baseAssignValue(i,n,r){n=="__proto__"&&defineProperty$1?defineProperty$1(i,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[n]=r}function eq(i,n){return i===n||i!==i&&n!==n}var objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function assignValue(i,n,r){var o=i[n];(!(hasOwnProperty$e.call(i,n)&&eq(o,r))||r===void 0&&!(n in i))&&baseAssignValue(i,n,r)}function copyObject(i,n,r,o){var a=!r;r||(r={});for(var l=-1,s=n.length;++l<s;){var u=n[l],c=o?o(r[u],i[u],u,r,i):void 0;c===void 0&&(c=i[u]),a?baseAssignValue(r,u,c):assignValue(r,u,c)}return r}var nativeMax$1=Math.max;function overRest(i,n,r){return n=nativeMax$1(n===void 0?i.length-1:n,0),function(){for(var o=arguments,a=-1,l=nativeMax$1(o.length-n,0),s=Array(l);++a<l;)s[a]=o[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=o[a];return u[n]=r(s),apply$1(i,this,u)}}function baseRest(i,n){return setToString$1(overRest(i,n,identity),i+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=MAX_SAFE_INTEGER}function isArrayLike(i){return i!=null&&isLength(i.length)&&!isFunction(i)}function isIterateeCall(i,n,r){if(!isObject(r))return!1;var o=typeof n;return(o=="number"?isArrayLike(r)&&isIndex(n,r.length):o=="string"&&n in r)?eq(r[n],i):!1}function createAssigner(i){return baseRest(function(n,r){var o=-1,a=r.length,l=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(l=i.length>3&&typeof l=="function"?(a--,l):void 0,s&&isIterateeCall(r[0],r[1],s)&&(l=a<3?void 0:l,a=1),n=Object(n);++o<a;){var u=r[o];u&&i(n,u,o,l)}return n})}var objectProto$f=Object.prototype;function isPrototype(i){var n=i&&i.constructor,r=typeof n=="function"&&n.prototype||objectProto$f;return i===r}function baseTimes(i,n){for(var r=-1,o=Array(i);++r<i;)o[r]=n(r);return o}var argsTag$3="[object Arguments]";function baseIsArguments(i){return isObjectLike(i)&&baseGetTag(i)==argsTag$3}var objectProto$e=Object.prototype,hasOwnProperty$d=objectProto$e.hasOwnProperty,propertyIsEnumerable$1=objectProto$e.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(i){return isObjectLike(i)&&hasOwnProperty$d.call(i,"callee")&&!propertyIsEnumerable$1.call(i,"callee")};const isArguments$1=isArguments;function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$1=moduleExports$2?root$1.Buffer:void 0,nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$6="[object Map]",numberTag$4="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$6="[object Set]",stringTag$3="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$6]=typedArrayTags[numberTag$4]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$6]=typedArrayTags[stringTag$3]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(i){return isObjectLike(i)&&isLength(i.length)&&!!typedArrayTags[baseGetTag(i)]}function baseUnary(i){return function(n){return i(n)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal$1.process,nodeUtil=function(){try{var i=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return i||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;var objectProto$d=Object.prototype,hasOwnProperty$c=objectProto$d.hasOwnProperty;function arrayLikeKeys(i,n){var r=isArray$1(i),o=!r&&isArguments$1(i),a=!r&&!o&&isBuffer$1(i),l=!r&&!o&&!a&&isTypedArray$1(i),s=r||o||a||l,u=s?baseTimes(i.length,String):[],c=u.length;for(var d in i)(n||hasOwnProperty$c.call(i,d))&&!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||l&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||isIndex(d,c)))&&u.push(d);return u}function overArg(i,n){return function(r){return i(n(r))}}var nativeKeys=overArg(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$c=Object.prototype,hasOwnProperty$b=objectProto$c.hasOwnProperty;function baseKeys(i){if(!isPrototype(i))return nativeKeys$1(i);var n=[];for(var r in Object(i))hasOwnProperty$b.call(i,r)&&r!="constructor"&&n.push(r);return n}function keys(i){return isArrayLike(i)?arrayLikeKeys(i):baseKeys(i)}function nativeKeysIn(i){var n=[];if(i!=null)for(var r in Object(i))n.push(r);return n}var objectProto$b=Object.prototype,hasOwnProperty$a=objectProto$b.hasOwnProperty;function baseKeysIn(i){if(!isObject(i))return nativeKeysIn(i);var n=isPrototype(i),r=[];for(var o in i)o=="constructor"&&(n||!hasOwnProperty$a.call(i,o))||r.push(o);return r}function keysIn(i){return isArrayLike(i)?arrayLikeKeys(i,!0):baseKeysIn(i)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(i,n){if(isArray$1(i))return!1;var r=typeof i;return r=="number"||r=="symbol"||r=="boolean"||i==null||isSymbol(i)?!0:reIsPlainProp.test(i)||!reIsDeepProp.test(i)||n!=null&&i in Object(n)}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(i){var n=this.has(i)&&delete this.__data__[i];return this.size-=n?1:0,n}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$a=Object.prototype,hasOwnProperty$9=objectProto$a.hasOwnProperty;function hashGet(i){var n=this.__data__;if(nativeCreate$1){var r=n[i];return r===HASH_UNDEFINED$2?void 0:r}return hasOwnProperty$9.call(n,i)?n[i]:void 0}var objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function hashHas(i){var n=this.__data__;return nativeCreate$1?n[i]!==void 0:hasOwnProperty$8.call(n,i)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(i,n){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=nativeCreate$1&&n===void 0?HASH_UNDEFINED$1:n,this}function Hash(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(i,n){for(var r=i.length;r--;)if(eq(i[r][0],n))return r;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(i){var n=this.__data__,r=assocIndexOf(n,i);if(r<0)return!1;var o=n.length-1;return r==o?n.pop():splice.call(n,r,1),--this.size,!0}function listCacheGet(i){var n=this.__data__,r=assocIndexOf(n,i);return r<0?void 0:n[r][1]}function listCacheHas(i){return assocIndexOf(this.__data__,i)>-1}function listCacheSet(i,n){var r=this.__data__,o=assocIndexOf(r,i);return o<0?(++this.size,r.push([i,n])):r[o][1]=n,this}function ListCache(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map");const Map$2=Map$1;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$2||ListCache),string:new Hash}}function isKeyable(i){var n=typeof i;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?i!=="__proto__":i===null}function getMapData(i,n){var r=i.__data__;return isKeyable(n)?r[typeof n=="string"?"string":"hash"]:r.map}function mapCacheDelete(i){var n=getMapData(this,i).delete(i);return this.size-=n?1:0,n}function mapCacheGet(i){return getMapData(this,i).get(i)}function mapCacheHas(i){return getMapData(this,i).has(i)}function mapCacheSet(i,n){var r=getMapData(this,i),o=r.size;return r.set(i,n),this.size+=r.size==o?0:1,this}function MapCache(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$2="Expected a function";function memoize(i,n){if(typeof i!="function"||n!=null&&typeof n!="function")throw new TypeError(FUNC_ERROR_TEXT$2);var r=function(){var o=arguments,a=n?n.apply(this,o):o[0],l=r.cache;if(l.has(a))return l.get(a);var s=i.apply(this,o);return r.cache=l.set(a,s)||l,s};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(i){var n=memoize(i,function(o){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),o}),r=n.cache;return n}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(i){var n=[];return i.charCodeAt(0)===46&&n.push(""),i.replace(rePropName,function(r,o,a,l){n.push(a?l.replace(reEscapeChar,"$1"):o||r)}),n});const stringToPath$1=stringToPath;function toString(i){return i==null?"":baseToString(i)}function castPath(i,n){return isArray$1(i)?i:isKey(i,n)?[i]:stringToPath$1(toString(i))}var INFINITY$1=1/0;function toKey(i){if(typeof i=="string"||isSymbol(i))return i;var n=i+"";return n=="0"&&1/i==-INFINITY$1?"-0":n}function baseGet(i,n){n=castPath(n,i);for(var r=0,o=n.length;i!=null&&r<o;)i=i[toKey(n[r++])];return r&&r==o?i:void 0}function get(i,n,r){var o=i==null?void 0:baseGet(i,n);return o===void 0?r:o}function arrayPush(i,n){for(var r=-1,o=n.length,a=i.length;++r<o;)i[a+r]=n[r];return i}var spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable(i){return isArray$1(i)||isArguments$1(i)||!!(spreadableSymbol&&i&&i[spreadableSymbol])}function baseFlatten(i,n,r,o,a){var l=-1,s=i.length;for(r||(r=isFlattenable),a||(a=[]);++l<s;){var u=i[l];n>0&&r(u)?n>1?baseFlatten(u,n-1,r,o,a):arrayPush(a,u):o||(a[a.length]=u)}return a}function flatten(i){var n=i==null?0:i.length;return n?baseFlatten(i,1):[]}function flatRest(i){return setToString$1(overRest(i,void 0,flatten),i+"")}var getPrototype=overArg(Object.getPrototypeOf,Object);const getPrototype$1=getPrototype;var objectTag$3="[object Object]",funcProto=Function.prototype,objectProto$8=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$7=objectProto$8.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(i){if(!isObjectLike(i)||baseGetTag(i)!=objectTag$3)return!1;var n=getPrototype$1(i);if(n===null)return!0;var r=hasOwnProperty$7.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&funcToString.call(r)==objectCtorString}function baseSlice(i,n,r){var o=-1,a=i.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(a);++o<a;)l[o]=i[o+n];return l}function castSlice(i,n,r){var o=i.length;return r=r===void 0?o:r,!n&&r>=o?i:baseSlice(i,n,r)}var rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode(i){return reHasUnicode.test(i)}function asciiToArray(i){return i.split("")}var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray(i){return i.match(reUnicode)||[]}function stringToArray(i){return hasUnicode(i)?unicodeToArray(i):asciiToArray(i)}function createCaseFirst(i){return function(n){n=toString(n);var r=hasUnicode(n)?stringToArray(n):void 0,o=r?r[0]:n.charAt(0),a=r?castSlice(r,1).join(""):n.slice(1);return o[i]()+a}}var upperFirst=createCaseFirst("toUpperCase");const upperFirst$1=upperFirst;function capitalize(i){return upperFirst$1(toString(i).toLowerCase())}function arrayReduce(i,n,r,o){var a=-1,l=i==null?0:i.length;for(o&&l&&(r=i[++a]);++a<l;)r=n(r,i[a],a,i);return r}function basePropertyOf(i){return function(n){return i==null?void 0:i[n]}}var deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter=basePropertyOf(deburredLetters);const deburrLetter$1=deburrLetter;var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr(i){return i=toString(i),i&&i.replace(reLatin,deburrLetter$1).replace(reComboMark,"")}var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords(i){return i.match(reAsciiWord)||[]}var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord(i){return reHasUnicodeWord.test(i)}var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords(i){return i.match(reUnicodeWord)||[]}function words(i,n,r){return i=toString(i),n=r?void 0:n,n===void 0?hasUnicodeWord(i)?unicodeWords(i):asciiWords(i):i.match(n)||[]}var rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder(i){return function(n){return arrayReduce(words(deburr(n).replace(reApos,"")),i,"")}}var camelCase=createCompounder(function(i,n,r){return n=n.toLowerCase(),i+(r?capitalize(n):n)});const camelCase$1=camelCase;function baseClamp(i,n,r){return i===i&&(r!==void 0&&(i=i<=r?i:r),n!==void 0&&(i=i>=n?i:n)),i}function clamp(i,n,r){return r===void 0&&(r=n,n=void 0),r!==void 0&&(r=toNumber(r),r=r===r?r:0),n!==void 0&&(n=toNumber(n),n=n===n?n:0),baseClamp(toNumber(i),n,r)}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(i){var n=this.__data__,r=n.delete(i);return this.size=n.size,r}function stackGet(i){return this.__data__.get(i)}function stackHas(i){return this.__data__.has(i)}var LARGE_ARRAY_SIZE$2=200;function stackSet(i,n){var r=this.__data__;if(r instanceof ListCache){var o=r.__data__;if(!Map$2||o.length<LARGE_ARRAY_SIZE$2-1)return o.push([i,n]),this.size=++r.size,this;r=this.__data__=new MapCache(o)}return r.set(i,n),this.size=r.size,this}function Stack(i){var n=this.__data__=new ListCache(i);this.size=n.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function baseAssign(i,n){return i&&copyObject(n,keys(n),i)}function baseAssignIn(i,n){return i&&copyObject(n,keysIn(n),i)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root$1.Buffer:void 0,allocUnsafe=Buffer?Buffer.allocUnsafe:void 0;function cloneBuffer(i,n){if(n)return i.slice();var r=i.length,o=allocUnsafe?allocUnsafe(r):new i.constructor(r);return i.copy(o),o}function arrayFilter(i,n){for(var r=-1,o=i==null?0:i.length,a=0,l=[];++r<o;){var s=i[r];n(s,r,i)&&(l[a++]=s)}return l}function stubArray(){return[]}var objectProto$7=Object.prototype,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols$1?function(i){return i==null?[]:(i=Object(i),arrayFilter(nativeGetSymbols$1(i),function(n){return propertyIsEnumerable.call(i,n)}))}:stubArray;const getSymbols$1=getSymbols;function copySymbols(i,n){return copyObject(i,getSymbols$1(i),n)}var nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn=nativeGetSymbols?function(i){for(var n=[];i;)arrayPush(n,getSymbols$1(i)),i=getPrototype$1(i);return n}:stubArray;const getSymbolsIn$1=getSymbolsIn;function copySymbolsIn(i,n){return copyObject(i,getSymbolsIn$1(i),n)}function baseGetAllKeys(i,n,r){var o=n(i);return isArray$1(i)?o:arrayPush(o,r(i))}function getAllKeys(i){return baseGetAllKeys(i,keys,getSymbols$1)}function getAllKeysIn(i){return baseGetAllKeys(i,keysIn,getSymbolsIn$1)}var DataView$1=getNative(root$1,"DataView");const DataView$2=DataView$1;var Promise$1=getNative(root$1,"Promise");const Promise$2=Promise$1;var Set$1=getNative(root$1,"Set");const Set$2=Set$1;var mapTag$5="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$5="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$3="[object DataView]",dataViewCtorString=toSource(DataView$2),mapCtorString=toSource(Map$2),promiseCtorString=toSource(Promise$2),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$2),getTag=baseGetTag;(DataView$2&&getTag(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$3||Map$2&&getTag(new Map$2)!=mapTag$5||Promise$2&&getTag(Promise$2.resolve())!=promiseTag||Set$2&&getTag(new Set$2)!=setTag$5||WeakMap$2&&getTag(new WeakMap$2)!=weakMapTag$1)&&(getTag=function(i){var n=baseGetTag(i),r=n==objectTag$2?i.constructor:void 0,o=r?toSource(r):"";if(o)switch(o){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$5;case promiseCtorString:return promiseTag;case setCtorString:return setTag$5;case weakMapCtorString:return weakMapTag$1}return n});const getTag$1=getTag;var objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function initCloneArray(i){var n=i.length,r=new i.constructor(n);return n&&typeof i[0]=="string"&&hasOwnProperty$6.call(i,"index")&&(r.index=i.index,r.input=i.input),r}var Uint8Array$1=root$1.Uint8Array;const Uint8Array$2=Uint8Array$1;function cloneArrayBuffer(i){var n=new i.constructor(i.byteLength);return new Uint8Array$2(n).set(new Uint8Array$2(i)),n}function cloneDataView(i,n){var r=n?cloneArrayBuffer(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.byteLength)}var reFlags=/\w*$/;function cloneRegExp(i){var n=new i.constructor(i.source,reFlags.exec(i));return n.lastIndex=i.lastIndex,n}var symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(i){return symbolValueOf$1?Object(symbolValueOf$1.call(i)):{}}function cloneTypedArray(i,n){var r=n?cloneArrayBuffer(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$4="[object Map]",numberTag$3="[object Number]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(i,n,r){var o=i.constructor;switch(n){case arrayBufferTag$2:return cloneArrayBuffer(i);case boolTag$2:case dateTag$2:return new o(+i);case dataViewTag$2:return cloneDataView(i,r);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(i,r);case mapTag$4:return new o;case numberTag$3:case stringTag$2:return new o(i);case regexpTag$2:return cloneRegExp(i);case setTag$4:return new o;case symbolTag$2:return cloneSymbol(i)}}function initCloneObject(i){return typeof i.constructor=="function"&&!isPrototype(i)?baseCreate$1(getPrototype$1(i)):{}}var mapTag$3="[object Map]";function baseIsMap(i){return isObjectLike(i)&&getTag$1(i)==mapTag$3}var nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;const isMap$1=isMap;var setTag$3="[object Set]";function baseIsSet(i){return isObjectLike(i)&&getTag$1(i)==setTag$3}var nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;const isSet$1=isSet;var CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$2="[object Map]",numberTag$2="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$2]=cloneableTags[numberTag$2]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$2]=cloneableTags[stringTag$1]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(i,n,r,o,a,l){var s,u=n&CLONE_DEEP_FLAG$1,c=n&CLONE_FLAT_FLAG,d=n&CLONE_SYMBOLS_FLAG$2;if(r&&(s=a?r(i,o,a,l):r(i)),s!==void 0)return s;if(!isObject(i))return i;var f=isArray$1(i);if(f){if(s=initCloneArray(i),!u)return copyArray(i,s)}else{var p=getTag$1(i),v=p==funcTag||p==genTag;if(isBuffer$1(i))return cloneBuffer(i,u);if(p==objectTag$1||p==argsTag$1||v&&!a){if(s=c||v?{}:initCloneObject(i),!u)return c?copySymbolsIn(i,baseAssignIn(s,i)):copySymbols(i,baseAssign(s,i))}else{if(!cloneableTags[p])return a?i:{};s=initCloneByTag(i,p,u)}}l||(l=new Stack);var m=l.get(i);if(m)return m;l.set(i,s),isSet$1(i)?i.forEach(function(y){s.add(baseClone(y,n,r,y,i,l))}):isMap$1(i)&&i.forEach(function(y,b){s.set(b,baseClone(y,n,r,b,i,l))});var g=d?c?getAllKeysIn:getAllKeys:c?keysIn:keys,_=f?void 0:g(i);return arrayEach(_||i,function(y,b){_&&(b=y,y=i[b]),assignValue(s,b,baseClone(y,n,r,b,i,l))}),s}var CLONE_SYMBOLS_FLAG$1=4;function clone(i){return baseClone(i,CLONE_SYMBOLS_FLAG$1)}var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(i){return baseClone(i,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(i){return this.__data__.set(i,HASH_UNDEFINED),this}function setCacheHas(i){return this.__data__.has(i)}function SetCache(i){var n=-1,r=i==null?0:i.length;for(this.__data__=new MapCache;++n<r;)this.add(i[n])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;function arraySome(i,n){for(var r=-1,o=i==null?0:i.length;++r<o;)if(n(i[r],r,i))return!0;return!1}function cacheHas(i,n){return i.has(n)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(i,n,r,o,a,l){var s=r&COMPARE_PARTIAL_FLAG$5,u=i.length,c=n.length;if(u!=c&&!(s&&c>u))return!1;var d=l.get(i),f=l.get(n);if(d&&f)return d==n&&f==i;var p=-1,v=!0,m=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(l.set(i,n),l.set(n,i);++p<u;){var g=i[p],_=n[p];if(o)var y=s?o(_,g,p,n,i,l):o(g,_,p,i,n,l);if(y!==void 0){if(y)continue;v=!1;break}if(m){if(!arraySome(n,function(b,x){if(!cacheHas(m,x)&&(g===b||a(g,b,r,o,l)))return m.push(x)})){v=!1;break}}else if(!(g===_||a(g,_,r,o,l))){v=!1;break}}return l.delete(i),l.delete(n),v}function mapToArray(i){var n=-1,r=Array(i.size);return i.forEach(function(o,a){r[++n]=[a,o]}),r}function setToArray(i){var n=-1,r=Array(i.size);return i.forEach(function(o){r[++n]=o}),r}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(i,n,r,o,a,l,s){switch(r){case dataViewTag:if(i.byteLength!=n.byteLength||i.byteOffset!=n.byteOffset)return!1;i=i.buffer,n=n.buffer;case arrayBufferTag:return!(i.byteLength!=n.byteLength||!l(new Uint8Array$2(i),new Uint8Array$2(n)));case boolTag:case dateTag:case numberTag$1:return eq(+i,+n);case errorTag:return i.name==n.name&&i.message==n.message;case regexpTag:case stringTag:return i==n+"";case mapTag$1:var u=mapToArray;case setTag$1:var c=o&COMPARE_PARTIAL_FLAG$4;if(u||(u=setToArray),i.size!=n.size&&!c)return!1;var d=s.get(i);if(d)return d==n;o|=COMPARE_UNORDERED_FLAG$2,s.set(i,n);var f=equalArrays(u(i),u(n),o,a,l,s);return s.delete(i),f;case symbolTag:if(symbolValueOf)return symbolValueOf.call(i)==symbolValueOf.call(n)}return!1}var COMPARE_PARTIAL_FLAG$3=1,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function equalObjects(i,n,r,o,a,l){var s=r&COMPARE_PARTIAL_FLAG$3,u=getAllKeys(i),c=u.length,d=getAllKeys(n),f=d.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var v=u[p];if(!(s?v in n:hasOwnProperty$5.call(n,v)))return!1}var m=l.get(i),g=l.get(n);if(m&&g)return m==n&&g==i;var _=!0;l.set(i,n),l.set(n,i);for(var y=s;++p<c;){v=u[p];var b=i[v],x=n[v];if(o)var C=s?o(x,b,v,n,i,l):o(b,x,v,i,n,l);if(!(C===void 0?b===x||a(b,x,r,o,l):C)){_=!1;break}y||(y=v=="constructor")}if(_&&!y){var w=i.constructor,E=n.constructor;w!=E&&"constructor"in i&&"constructor"in n&&!(typeof w=="function"&&w instanceof w&&typeof E=="function"&&E instanceof E)&&(_=!1)}return l.delete(i),l.delete(n),_}var COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function baseIsEqualDeep(i,n,r,o,a,l){var s=isArray$1(i),u=isArray$1(n),c=s?arrayTag:getTag$1(i),d=u?arrayTag:getTag$1(n);c=c==argsTag?objectTag:c,d=d==argsTag?objectTag:d;var f=c==objectTag,p=d==objectTag,v=c==d;if(v&&isBuffer$1(i)){if(!isBuffer$1(n))return!1;s=!0,f=!1}if(v&&!f)return l||(l=new Stack),s||isTypedArray$1(i)?equalArrays(i,n,r,o,a,l):equalByTag(i,n,c,r,o,a,l);if(!(r&COMPARE_PARTIAL_FLAG$2)){var m=f&&hasOwnProperty$4.call(i,"__wrapped__"),g=p&&hasOwnProperty$4.call(n,"__wrapped__");if(m||g){var _=m?i.value():i,y=g?n.value():n;return l||(l=new Stack),a(_,y,r,o,l)}}return v?(l||(l=new Stack),equalObjects(i,n,r,o,a,l)):!1}function baseIsEqual(i,n,r,o,a){return i===n?!0:i==null||n==null||!isObjectLike(i)&&!isObjectLike(n)?i!==i&&n!==n:baseIsEqualDeep(i,n,r,o,baseIsEqual,a)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(i,n,r,o){var a=r.length,l=a,s=!o;if(i==null)return!l;for(i=Object(i);a--;){var u=r[a];if(s&&u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<l;){u=r[a];var c=u[0],d=i[c],f=u[1];if(s&&u[2]){if(d===void 0&&!(c in i))return!1}else{var p=new Stack;if(o)var v=o(d,f,c,i,n,p);if(!(v===void 0?baseIsEqual(f,d,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,o,p):v))return!1}}return!0}function isStrictComparable(i){return i===i&&!isObject(i)}function getMatchData(i){for(var n=keys(i),r=n.length;r--;){var o=n[r],a=i[o];n[r]=[o,a,isStrictComparable(a)]}return n}function matchesStrictComparable(i,n){return function(r){return r==null?!1:r[i]===n&&(n!==void 0||i in Object(r))}}function baseMatches(i){var n=getMatchData(i);return n.length==1&&n[0][2]?matchesStrictComparable(n[0][0],n[0][1]):function(r){return r===i||baseIsMatch(r,i,n)}}function baseHasIn(i,n){return i!=null&&n in Object(i)}function hasPath(i,n,r){n=castPath(n,i);for(var o=-1,a=n.length,l=!1;++o<a;){var s=toKey(n[o]);if(!(l=i!=null&&r(i,s)))break;i=i[s]}return l||++o!=a?l:(a=i==null?0:i.length,!!a&&isLength(a)&&isIndex(s,a)&&(isArray$1(i)||isArguments$1(i)))}function hasIn(i,n){return i!=null&&hasPath(i,n,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(i,n){return isKey(i)&&isStrictComparable(n)?matchesStrictComparable(toKey(i),n):function(r){var o=get(r,i);return o===void 0&&o===n?hasIn(r,i):baseIsEqual(n,o,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(i){return function(n){return n==null?void 0:n[i]}}function basePropertyDeep(i){return function(n){return baseGet(n,i)}}function property(i){return isKey(i)?baseProperty(toKey(i)):basePropertyDeep(i)}function baseIteratee(i){return typeof i=="function"?i:i==null?identity:typeof i=="object"?isArray$1(i)?baseMatchesProperty(i[0],i[1]):baseMatches(i):property(i)}function arrayAggregator(i,n,r,o){for(var a=-1,l=i==null?0:i.length;++a<l;){var s=i[a];n(o,s,r(s),i)}return o}function createBaseFor(i){return function(n,r,o){for(var a=-1,l=Object(n),s=o(n),u=s.length;u--;){var c=s[i?u:++a];if(r(l[c],c,l)===!1)break}return n}}var baseFor=createBaseFor();const baseFor$1=baseFor;function baseForOwn(i,n){return i&&baseFor$1(i,n,keys)}function createBaseEach(i,n){return function(r,o){if(r==null)return r;if(!isArrayLike(r))return i(r,o);for(var a=r.length,l=n?a:-1,s=Object(r);(n?l--:++l<a)&&o(s[l],l,s)!==!1;);return r}}var baseEach=createBaseEach(baseForOwn);const baseEach$1=baseEach;function baseAggregator(i,n,r,o){return baseEach$1(i,function(a,l,s){n(o,a,r(a),s)}),o}function createAggregator(i,n){return function(r,o){var a=isArray$1(r)?arrayAggregator:baseAggregator,l=n?n():{};return a(r,i,baseIteratee(o),l)}}var now=function(){return root$1.Date.now()};const now$1=now;var FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin$1=Math.min;function debounce$1(i,n,r){var o,a,l,s,u,c,d=0,f=!1,p=!1,v=!0;if(typeof i!="function")throw new TypeError(FUNC_ERROR_TEXT$1);n=toNumber(n)||0,isObject(r)&&(f=!!r.leading,p="maxWait"in r,l=p?nativeMax(toNumber(r.maxWait)||0,n):l,v="trailing"in r?!!r.trailing:v);function m($){var S=o,V=a;return o=a=void 0,d=$,s=i.apply(V,S),s}function g($){return d=$,u=setTimeout(b,n),f?m($):s}function _($){var S=$-c,V=$-d,k=n-S;return p?nativeMin$1(k,l-V):k}function y($){var S=$-c,V=$-d;return c===void 0||S>=n||S<0||p&&V>=l}function b(){var $=now$1();if(y($))return x($);u=setTimeout(b,_($))}function x($){return u=void 0,v&&o?m($):(o=a=void 0,s)}function C(){u!==void 0&&clearTimeout(u),d=0,o=c=a=u=void 0}function w(){return u===void 0?s:x(now$1())}function E(){var $=now$1(),S=y($);if(o=arguments,a=this,c=$,S){if(u===void 0)return g(c);if(p)return clearTimeout(u),u=setTimeout(b,n),m(c)}return u===void 0&&(u=setTimeout(b,n)),s}return E.cancel=C,E.flush=w,E}var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty,defaults$3=baseRest(function(i,n){i=Object(i);var r=-1,o=n.length,a=o>2?n[2]:void 0;for(a&&isIterateeCall(n[0],n[1],a)&&(o=1);++r<o;)for(var l=n[r],s=keysIn(l),u=-1,c=s.length;++u<c;){var d=s[u],f=i[d];(f===void 0||eq(f,objectProto$3[d])&&!hasOwnProperty$3.call(i,d))&&(i[d]=l[d])}return i});const defaults$4=defaults$3;function assignMergeValue(i,n,r){(r!==void 0&&!eq(i[n],r)||r===void 0&&!(n in i))&&baseAssignValue(i,n,r)}function isArrayLikeObject(i){return isObjectLike(i)&&isArrayLike(i)}function safeGet(i,n){if(!(n==="constructor"&&typeof i[n]=="function")&&n!="__proto__")return i[n]}function toPlainObject(i){return copyObject(i,keysIn(i))}function baseMergeDeep(i,n,r,o,a,l,s){var u=safeGet(i,r),c=safeGet(n,r),d=s.get(c);if(d){assignMergeValue(i,r,d);return}var f=l?l(u,c,r+"",i,n,s):void 0,p=f===void 0;if(p){var v=isArray$1(c),m=!v&&isBuffer$1(c),g=!v&&!m&&isTypedArray$1(c);f=c,v||m||g?isArray$1(u)?f=u:isArrayLikeObject(u)?f=copyArray(u):m?(p=!1,f=cloneBuffer(c,!0)):g?(p=!1,f=cloneTypedArray(c,!0)):f=[]:isPlainObject(c)||isArguments$1(c)?(f=u,isArguments$1(u)?f=toPlainObject(u):(!isObject(u)||isFunction(u))&&(f=initCloneObject(c))):p=!1}p&&(s.set(c,f),a(f,c,o,l,s),s.delete(c)),assignMergeValue(i,r,f)}function baseMerge(i,n,r,o,a){i!==n&&baseFor$1(n,function(l,s){if(a||(a=new Stack),isObject(l))baseMergeDeep(i,n,s,r,baseMerge,o,a);else{var u=o?o(safeGet(i,s),l,s+"",i,n,a):void 0;u===void 0&&(u=l),assignMergeValue(i,s,u)}},keysIn)}function customDefaultsMerge(i,n,r,o,a,l){return isObject(i)&&isObject(n)&&(l.set(n,i),baseMerge(i,n,void 0,customDefaultsMerge,l),l.delete(n)),i}var mergeWith=createAssigner(function(i,n,r,o){baseMerge(i,n,r,o)});const mergeWith$1=mergeWith;var defaultsDeep=baseRest(function(i){return i.push(void 0,customDefaultsMerge),apply$1(mergeWith$1,void 0,i)});const defaultsDeep$1=defaultsDeep;function arrayIncludesWith(i,n,r){for(var o=-1,a=i==null?0:i.length;++o<a;)if(r(n,i[o]))return!0;return!1}var LARGE_ARRAY_SIZE$1=200;function baseDifference(i,n,r,o){var a=-1,l=arrayIncludes,s=!0,u=i.length,c=[],d=n.length;if(!u)return c;r&&(n=arrayMap(n,baseUnary(r))),o?(l=arrayIncludesWith,s=!1):n.length>=LARGE_ARRAY_SIZE$1&&(l=cacheHas,s=!1,n=new SetCache(n));e:for(;++a<u;){var f=i[a],p=r==null?f:r(f);if(f=o||f!==0?f:0,s&&p===p){for(var v=d;v--;)if(n[v]===p)continue e;c.push(f)}else l(n,p,o)||c.push(f)}return c}var difference=baseRest(function(i,n){return isArrayLikeObject(i)?baseDifference(i,baseFlatten(n,1,isArrayLikeObject,!0)):[]});const difference$1=difference;function baseMap(i,n){var r=-1,o=isArrayLike(i)?Array(i.length):[];return baseEach$1(i,function(a,l,s){o[++r]=n(a,l,s)}),o}var objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty,groupBy=createAggregator(function(i,n,r){hasOwnProperty$2.call(i,r)?i[r].push(n):baseAssignValue(i,r,[n])});const groupBy$1=groupBy;function baseGt(i,n){return i>n}var objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseHas(i,n){return i!=null&&hasOwnProperty$1.call(i,n)}function has(i,n){return i!=null&&hasPath(i,n,baseHas)}var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(i){if(i==null)return!0;if(isArrayLike(i)&&(isArray$1(i)||typeof i=="string"||typeof i.splice=="function"||isBuffer$1(i)||isTypedArray$1(i)||isArguments$1(i)))return!i.length;var n=getTag$1(i);if(n==mapTag||n==setTag)return!i.size;if(isPrototype(i))return!baseKeys(i).length;for(var r in i)if(hasOwnProperty.call(i,r))return!1;return!0}function isEqual(i,n){return baseIsEqual(i,n)}var numberTag="[object Number]";function isNumber(i){return typeof i=="number"||isObjectLike(i)&&baseGetTag(i)==numberTag}var lowerFirst=createCaseFirst("toLowerCase");const lowerFirst$1=lowerFirst;function baseExtremum(i,n,r){for(var o=-1,a=i.length;++o<a;){var l=i[o],s=n(l);if(s!=null&&(u===void 0?s===s&&!isSymbol(s):r(s,u)))var u=s,c=l}return c}function max(i){return i&&i.length?baseExtremum(i,identity,baseGt):void 0}var merge=createAssigner(function(i,n,r){baseMerge(i,n,r)});const merge$1=merge;function baseSet(i,n,r,o){if(!isObject(i))return i;n=castPath(n,i);for(var a=-1,l=n.length,s=l-1,u=i;u!=null&&++a<l;){var c=toKey(n[a]),d=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return i;if(a!=s){var f=u[c];d=o?o(f,c,u):void 0,d===void 0&&(d=isObject(f)?f:isIndex(n[a+1])?[]:{})}assignValue(u,c,d),u=u[c]}return i}function basePickBy(i,n,r){for(var o=-1,a=n.length,l={};++o<a;){var s=n[o],u=baseGet(i,s);r(u,s)&&baseSet(l,castPath(s,i),u)}return l}function baseSortBy(i,n){var r=i.length;for(i.sort(n);r--;)i[r]=i[r].value;return i}function compareAscending(i,n){if(i!==n){var r=i!==void 0,o=i===null,a=i===i,l=isSymbol(i),s=n!==void 0,u=n===null,c=n===n,d=isSymbol(n);if(!u&&!d&&!l&&i>n||l&&s&&c&&!u&&!d||o&&s&&c||!r&&c||!a)return 1;if(!o&&!l&&!d&&i<n||d&&r&&a&&!o&&!l||u&&r&&a||!s&&a||!c)return-1}return 0}function compareMultiple(i,n,r){for(var o=-1,a=i.criteria,l=n.criteria,s=a.length,u=r.length;++o<s;){var c=compareAscending(a[o],l[o]);if(c){if(o>=u)return c;var d=r[o];return c*(d=="desc"?-1:1)}}return i.index-n.index}function baseOrderBy(i,n,r){n.length?n=arrayMap(n,function(l){return isArray$1(l)?function(s){return baseGet(s,l.length===1?l[0]:l)}:l}):n=[identity];var o=-1;n=arrayMap(n,baseUnary(baseIteratee));var a=baseMap(i,function(l,s,u){var c=arrayMap(n,function(d){return d(l)});return{criteria:c,index:++o,value:l}});return baseSortBy(a,function(l,s){return compareMultiple(l,s,r)})}function basePick(i,n){return basePickBy(i,n,function(r,o){return hasIn(i,o)})}var pick=flatRest(function(i,n){return i==null?{}:basePick(i,n)});const pick$1=pick;var sortBy=baseRest(function(i,n){if(i==null)return[];var r=n.length;return r>1&&isIterateeCall(i,n[0],n[1])?n=[]:r>2&&isIterateeCall(n[0],n[1],n[2])&&(n=[n[0]]),baseOrderBy(i,baseFlatten(n,1),[])});const sortBy$1=sortBy;var MAX_ARRAY_LENGTH$1=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH$1-1,nativeFloor=Math.floor,nativeMin=Math.min;function baseSortedIndexBy(i,n,r,o){var a=0,l=i==null?0:i.length;if(l===0)return 0;n=r(n);for(var s=n!==n,u=n===null,c=isSymbol(n),d=n===void 0;a<l;){var f=nativeFloor((a+l)/2),p=r(i[f]),v=p!==void 0,m=p===null,g=p===p,_=isSymbol(p);if(s)var y=o||g;else d?y=g&&(o||v):u?y=g&&v&&(o||!m):c?y=g&&v&&!m&&(o||!_):m||_?y=!1:y=o?p<=n:p<n;y?a=f+1:l=f}return nativeMin(l,MAX_ARRAY_INDEX)}var MAX_ARRAY_LENGTH=4294967295,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;function baseSortedIndex(i,n,r){var o=0,a=i==null?o:i.length;if(typeof n=="number"&&n===n&&a<=HALF_MAX_ARRAY_LENGTH){for(;o<a;){var l=o+a>>>1,s=i[l];s!==null&&!isSymbol(s)&&(r?s<=n:s<n)?o=l+1:a=l}return a}return baseSortedIndexBy(i,n,identity,r)}function sortedIndex(i,n){return baseSortedIndex(i,n)}function sortedIndexBy(i,n,r){return baseSortedIndexBy(i,n,baseIteratee(r))}var startCase=createCompounder(function(i,n,r){return i+(r?" ":"")+upperFirst$1(n)});const startCase$1=startCase;var FUNC_ERROR_TEXT="Expected a function";function throttle(i,n,r){var o=!0,a=!0;if(typeof i!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),debounce$1(i,n,{leading:o,maxWait:n,trailing:a})}var INFINITY=1/0,createSet=Set$2&&1/setToArray(new Set$2([,-0]))[1]==INFINITY?function(i){return new Set$2(i)}:noop$1;const createSet$1=createSet;var LARGE_ARRAY_SIZE=200;function baseUniq(i,n,r){var o=-1,a=arrayIncludes,l=i.length,s=!0,u=[],c=u;if(r)s=!1,a=arrayIncludesWith;else if(l>=LARGE_ARRAY_SIZE){var d=n?null:createSet$1(i);if(d)return setToArray(d);s=!1,a=cacheHas,c=new SetCache}else c=n?[]:u;e:for(;++o<l;){var f=i[o],p=n?n(f):f;if(f=r||f!==0?f:0,s&&p===p){for(var v=c.length;v--;)if(c[v]===p)continue e;n&&c.push(p),u.push(f)}else a(c,p,r)||(c!==u&&c.push(p),u.push(f))}return u}var union=baseRest(function(i){return baseUniq(baseFlatten(i,1,isArrayLikeObject,!0))});const union$1=union;function uniq(i){return i&&i.length?baseUniq(i):[]}function apply(i,n,r){if(r)switch(r.length){case 0:return i.call(n);case 1:return i.call(n,r[0]);case 2:return i.call(n,r[0],r[1]);case 3:return i.call(n,r[0],r[1],r[2]);case 4:return i.call(n,r[0],r[1],r[2],r[3]);case 5:return i.call(n,r[0],r[1],r[2],r[3],r[4]);case 6:return i.call(n,r[0],r[1],r[2],r[3],r[4],r[5]);default:return i.apply(n,r)}return i.call(n)}function call$1(i,n,...r){return apply(i,n,r)}function isAsyncLike(i){return typeof i=="object"&&i.then&&typeof i.then=="function"}function isAsync(i){return i!=null&&(i instanceof Promise||isAsyncLike(i))}function toAsyncBoolean(...i){const n=[];if(i.forEach(o=>{Array.isArray(o)?n.push(...o):n.push(o)}),n.some(o=>isAsync(o))){const o=n.map(a=>isAsync(a)?a:Promise.resolve(a!==!1));return Promise.all(o).then(a=>a.reduce((l,s)=>s!==!1&&l,!0))}return n.every(o=>o!==!1)}function toDeferredBoolean(...i){const n=toAsyncBoolean(i);return typeof n=="boolean"?Promise.resolve(n):n}function call(i,n){const r=[];for(let o=0;o<i.length;o+=2){const a=i[o],l=i[o+1],s=Array.isArray(n)?n:[n],u=apply(a,l,s);r.push(u)}return toAsyncBoolean(r)}class Events{constructor(){this.listeners={}}on(n,r,o){return r==null?this:(this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(r,o),this)}once(n,r,o){const a=(...l)=>(this.off(n,a),call([r,o],l));return this.on(n,a,this)}off(n,r,o){if(!(n||r||o))return this.listeners={},this;const a=this.listeners;return(n?[n]:Object.keys(a)).forEach(s=>{const u=a[s];if(u){if(!(r||o)){delete a[s];return}for(let c=u.length-2;c>=0;c-=2)r&&u[c]!==r||o&&u[c+1]!==o||u.splice(c,2)}}),this}trigger(n,...r){let o=!0;if(n!=="*"){const l=this.listeners[n];l!=null&&(o=call([...l],r))}const a=this.listeners["*"];return a!=null?toAsyncBoolean([o,call([...a],[n,...r])]):o}emit(n,...r){return this.trigger(n,...r)}}function applyMixins(i,...n){n.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(o=>{o!=="constructor"&&Object.defineProperty(i.prototype,o,Object.getOwnPropertyDescriptor(r.prototype,o))})})}const extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n[r])};function inherit(i,n){extendStatics(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}class A{}const isNativeClass=/^\s*class\s+/.test(`${A}`)||/^\s*class\s*\{/.test(`${class{}}`);function createClass(i,n){let r;return isNativeClass?r=class extends n{}:(r=function(){return n.apply(this,arguments)},inherit(r,n)),Object.defineProperty(r,"name",{value:i}),r}function isMaliciousProp(i){return i==="__proto__"}function getByPath(i,n,r="/"){let o;const a=Array.isArray(n)?n:n.split(r);if(a.length)for(o=i;a.length;){const l=a.shift();if(Object(o)===o&&l&&l in o)o=o[l];else return}return o}function setByPath(i,n,r,o="/"){const a=Array.isArray(n)?n:n.split(o),l=a.pop();if(l&&!isMaliciousProp(l)){let s=i;a.forEach(u=>{isMaliciousProp(u)||(s[u]==null&&(s[u]={}),s=s[u])}),s[l]=r}return i}function unsetByPath(i,n,r="/"){const o=Array.isArray(n)?n.slice():n.split(r),a=o.pop();if(a)if(o.length>0){const l=getByPath(i,o);l&&delete l[a]}else delete i[a];return i}var __decorate$u=globalThis&&globalThis.__decorate||function(i,n,r,o){var a=arguments.length,l=a<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,n,r,o);else for(var u=i.length-1;u>=0;u--)(s=i[u])&&(l=(a<3?s(l):a>3?s(n,r,l):s(n,r))||l);return a>3&&l&&Object.defineProperty(n,r,l),l};class Basecoat extends Events{dispose(){this.off()}}__decorate$u([Disposable.dispose()],Basecoat.prototype,"dispose",null),function(i){i.dispose=Disposable.dispose}(Basecoat||(Basecoat={})),applyMixins(Basecoat,Disposable);const cacheStringFunction=i=>{const n=Object.create(null);return r=>n[r]||(n[r]=i(r))},kebabCase=cacheStringFunction(i=>i.replace(/\B([A-Z])/g,"-$1").toLowerCase()),pascalCase=cacheStringFunction(i=>startCase$1(camelCase$1(i)).replace(/ /g,""));function hashcode(i){let n=2166136261,r=!1,o=i;for(let a=0,l=o.length;a<l;a+=1){let s=o.charCodeAt(a);s>127&&!r&&(o=unescape(encodeURIComponent(o)),s=o.charCodeAt(a),r=!0),n^=s,n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24)}return n>>>0}function uuid(){let i="";const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let r=0,o=n.length;r<o;r+=1){const a=n[r],l=Math.random()*16|0,s=a==="x"?l:a==="y"?l&3|8:a;i+=s.toString(16)}return i}function getSpellingSuggestion(i,n,r){const o=Math.min(2,Math.floor(i.length*.34));let a=Math.floor(i.length*.4)+1,l,s=!1;const u=i.toLowerCase();for(const c of n){const d=r(c);if(d!==void 0&&Math.abs(d.length-u.length)<=o){const f=d.toLowerCase();if(f===u){if(d===i)continue;return c}if(s||d.length<3)continue;const p=levenshteinWithMax(u,f,a-1);if(p===void 0)continue;p<3?(s=!0,l=c):(a=p,l=c)}}return l}function levenshteinWithMax(i,n,r){let o=new Array(n.length+1),a=new Array(n.length+1);const l=r+1;for(let u=0;u<=n.length;u+=1)o[u]=u;for(let u=1;u<=i.length;u+=1){const c=i.charCodeAt(u-1),d=u>r?u-r:1,f=n.length>r+u?r+u:n.length;a[0]=u;let p=u;for(let m=1;m<d;m+=1)a[m]=l;for(let m=d;m<=f;m+=1){const g=c===n.charCodeAt(m-1)?o[m-1]:Math.min(o[m]+1,a[m-1]+1,o[m-1]+2);a[m]=g,p=Math.min(p,g)}for(let m=f+1;m<=n.length;m+=1)a[m]=l;if(p>r)return;const v=o;o=a,a=v}const s=o[n.length];return s>r?void 0:s}function isPercentage(i){return typeof i=="string"&&i.slice(-1)==="%"}function normalizePercentage(i,n){if(i==null)return 0;let r;if(typeof i=="string"){if(r=parseFloat(i),isPercentage(i)&&(r/=100,Number.isFinite(r)))return r*n}else r=i;return Number.isFinite(r)?r>0&&r<1?r*n:r:0}function normalizeSides(i){if(typeof i=="object"){let r=0,o=0,a=0,l=0;return i.vertical!=null&&Number.isFinite(i.vertical)&&(o=l=i.vertical),i.horizontal!=null&&Number.isFinite(i.horizontal)&&(a=r=i.horizontal),i.left!=null&&Number.isFinite(i.left)&&(r=i.left),i.top!=null&&Number.isFinite(i.top)&&(o=i.top),i.right!=null&&Number.isFinite(i.right)&&(a=i.right),i.bottom!=null&&Number.isFinite(i.bottom)&&(l=i.bottom),{top:o,right:a,bottom:l,left:r}}let n=0;return i!=null&&Number.isFinite(i)&&(n=i),{top:n,right:n,bottom:n,left:n}}let _IS_MAC=!1,_IS_IOS=!1,_IS_WINDOWS=!1,_IS_IE=!1,_IS_IE11=!1,_IS_EDGE=!1,_IS_NETSCAPE=!1,_IS_CHROME_APP=!1,_IS_CHROME=!1,_IS_OPERA=!1,_IS_FIREFOX=!1,_IS_SAFARI=!1,_SUPPORT_TOUCH=!1,_SUPPORT_POINTER=!1,_SUPPORT_PASSIVE=!1,_NO_FOREIGNOBJECT=!1;if(typeof navigator=="object"){const i=navigator.userAgent;_IS_MAC=i.indexOf("Macintosh")>=0,_IS_IOS=!!i.match(/(iPad|iPhone|iPod)/g),_IS_WINDOWS=i.indexOf("Windows")>=0,_IS_IE=i.indexOf("MSIE")>=0,_IS_IE11=!!i.match(/Trident\/7\./),_IS_EDGE=!!i.match(/Edge\//),_IS_NETSCAPE=i.indexOf("Mozilla/")>=0&&i.indexOf("MSIE")<0&&i.indexOf("Edge/")<0,_IS_CHROME=i.indexOf("Chrome/")>=0&&i.indexOf("Edge/")<0,_IS_OPERA=i.indexOf("Opera/")>=0||i.indexOf("OPR/")>=0,_IS_FIREFOX=i.indexOf("Firefox/")>=0,_IS_SAFARI=i.indexOf("AppleWebKit/")>=0&&i.indexOf("Chrome/")<0&&i.indexOf("Edge/")<0,typeof document=="object"&&(_NO_FOREIGNOBJECT=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||i.indexOf("Opera/")>=0)}if(typeof window=="object"&&(_IS_CHROME_APP=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,_SUPPORT_POINTER=window.PointerEvent!=null&&!_IS_MAC),typeof document=="object"){_SUPPORT_TOUCH="ontouchstart"in document.documentElement;try{const i=Object.defineProperty({},"passive",{get(){_SUPPORT_PASSIVE=!0}}),n=document.createElement("div");n.addEventListener&&n.addEventListener("click",()=>{},i)}catch{}}var Platform;(function(i){i.IS_MAC=_IS_MAC,i.IS_IOS=_IS_IOS,i.IS_WINDOWS=_IS_WINDOWS,i.IS_IE=_IS_IE,i.IS_IE11=_IS_IE11,i.IS_EDGE=_IS_EDGE,i.IS_NETSCAPE=_IS_NETSCAPE,i.IS_CHROME_APP=_IS_CHROME_APP,i.IS_CHROME=_IS_CHROME,i.IS_OPERA=_IS_OPERA,i.IS_FIREFOX=_IS_FIREFOX,i.IS_SAFARI=_IS_SAFARI,i.SUPPORT_TOUCH=_SUPPORT_TOUCH,i.SUPPORT_POINTER=_SUPPORT_POINTER,i.SUPPORT_PASSIVE=_SUPPORT_PASSIVE,i.NO_FOREIGNOBJECT=_NO_FOREIGNOBJECT,i.SUPPORT_FOREIGNOBJECT=!i.NO_FOREIGNOBJECT})(Platform||(Platform={})),function(i){function n(){const l=window.module;return l!=null&&l.hot!=null&&l.hot.status!=null?l.hot.status():"unkonwn"}i.getHMRStatus=n;function r(){return n()==="apply"}i.isApplyingHMR=r;const o={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function a(l){const s=document.createElement(o[l]||"div"),u=`on${l}`;let c=u in s;return c||(s.setAttribute(u,"return;"),c=typeof s[u]=="function"),c}i.isEventSupported=a}(Platform||(Platform={}));const rclass=/[\t\r\n\f]/g,rnotwhite=/\S+/g,fillSpaces=i=>` ${i} `;function getClass(i){return i&&i.getAttribute&&i.getAttribute("class")||""}function hasClass(i,n){if(i==null||n==null)return!1;const r=fillSpaces(getClass(i)),o=fillSpaces(n);return i.nodeType===1?r.replace(rclass," ").includes(o):!1}function addClass(i,n){if(!(i==null||n==null)){if(typeof n=="function")return addClass(i,n(getClass(i)));if(typeof n=="string"&&i.nodeType===1){const r=n.match(rnotwhite)||[],o=fillSpaces(getClass(i)).replace(rclass," ");let a=r.reduce((l,s)=>l.indexOf(fillSpaces(s))<0?`${l}${s} `:l,o);a=a.trim(),o!==a&&i.setAttribute("class",a)}}}function removeClass(i,n){if(i!=null){if(typeof n=="function")return removeClass(i,n(getClass(i)));if((!n||typeof n=="string")&&i.nodeType===1){const r=(n||"").match(rnotwhite)||[],o=fillSpaces(getClass(i)).replace(rclass," ");let a=r.reduce((l,s)=>{const u=fillSpaces(s);return l.indexOf(u)>-1?l.replace(u," "):l},o);a=n?a.trim():"",o!==a&&i.setAttribute("class",a)}}}function toggleClass(i,n,r){if(!(i==null||n==null)){if(r!=null&&typeof n=="string"){r?addClass(i,n):removeClass(i,n);return}if(typeof n=="function")return toggleClass(i,n(getClass(i),r),r);typeof n=="string"&&(n.match(rnotwhite)||[]).forEach(a=>{hasClass(i,a)?removeClass(i,a):addClass(i,a)})}}let idCounter=0;function uniqueId(){return idCounter+=1,`v${idCounter}`}function ensureId(i){return(i.id==null||i.id==="")&&(i.id=uniqueId()),i.id}function isSVGGraphicsElement(i){return i==null?!1:typeof i.getScreenCTM=="function"&&i instanceof SVGElement}const ns={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},svgVersion="1.1";function createElement(i,n=document){return n.createElement(i)}function createElementNS(i,n=ns.xhtml,r=document){return r.createElementNS(n,i)}function createSvgElement(i,n=document){return createElementNS(i,ns.svg,n)}function createSvgDocument(i){if(i){const r=`<svg xmlns="${ns.svg}" xmlns:xlink="${ns.xlink}" version="${svgVersion}">${i}</svg>`,{documentElement:o}=parseXML(r,{async:!1});return o}const n=document.createElementNS(ns.svg,"svg");return n.setAttributeNS(ns.xmlns,"xmlns:xlink",ns.xlink),n.setAttribute("version",svgVersion),n}function parseXML(i,n={}){let r;try{const o=new DOMParser;if(n.async!=null){const a=o;a.async=n.async}r=o.parseFromString(i,n.mimeType||"text/xml")}catch{r=void 0}if(!r||r.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${i}`);return r}function tagName(i,n=!0){const r=i.nodeName;return n?r.toLowerCase():r.toUpperCase()}function index$1(i){let n=0,r=i.previousSibling;for(;r;)r.nodeType===1&&(n+=1),r=r.previousSibling;return n}function find(i,n){return i.querySelectorAll(n)}function findOne(i,n){return i.querySelector(n)}function findParentByClass(i,n,r){const o=i.ownerSVGElement;let a=i.parentNode;for(;a&&a!==r&&a!==o;){if(hasClass(a,n))return a;a=a.parentNode}return null}function contains(i,n){const r=n&&n.parentNode;return i===r||!!(r&&r.nodeType===1&&i.compareDocumentPosition(r)&16)}function remove(i){i&&(Array.isArray(i)?i:[i]).forEach(r=>{r.parentNode&&r.parentNode.removeChild(r)})}function empty(i){for(;i.firstChild;)i.removeChild(i.firstChild)}function append(i,n){(Array.isArray(n)?n:[n]).forEach(o=>{o!=null&&i.appendChild(o)})}function prepend(i,n){const r=i.firstChild;return r?before(r,n):append(i,n)}function before(i,n){const r=i.parentNode;r&&(Array.isArray(n)?n:[n]).forEach(a=>{a!=null&&r.insertBefore(a,i)})}function after(i,n){const r=i.parentNode;r&&(Array.isArray(n)?n:[n]).forEach(a=>{a!=null&&r.insertBefore(a,i.nextSibling)})}function appendTo(i,n){n!=null&&n.appendChild(i)}function isHTMLElement(i){try{return i instanceof HTMLElement}catch{return typeof i=="object"&&i.nodeType===1&&typeof i.style=="object"&&typeof i.ownerDocument=="object"}}function children(i,n){const r=[];let o=i.firstChild;for(;o;o=o.nextSibling)o.nodeType===1&&(!n||hasClass(o,n))&&r.push(o);return r}const CASE_SENSITIVE_ATTR=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function getAttribute(i,n){return i.getAttribute(n)}function removeAttribute(i,n){const r=qualifyAttr(n);r.ns?i.hasAttributeNS(r.ns,r.local)&&i.removeAttributeNS(r.ns,r.local):i.hasAttribute(n)&&i.removeAttribute(n)}function setAttribute(i,n,r){if(r==null)return removeAttribute(i,n);const o=qualifyAttr(n);o.ns&&typeof r=="string"?i.setAttributeNS(o.ns,n,r):n==="id"?i.id=`${r}`:i.setAttribute(n,`${r}`)}function setAttributes(i,n){Object.keys(n).forEach(r=>{setAttribute(i,r,n[r])})}function attr(i,n,r){if(n==null){const o=i.attributes,a={};for(let l=0;l<o.length;l+=1)a[o[l].name]=o[l].value;return a}if(typeof n=="string"&&r===void 0)return i.getAttribute(n);typeof n=="object"?setAttributes(i,n):setAttribute(i,n,r)}function qualifyAttr(i){if(i.indexOf(":")!==-1){const n=i.split(":");return{ns:ns[n[0]],local:n[1]}}return{ns:null,local:i}}function kebablizeAttrs(i){const n={};return Object.keys(i).forEach(r=>{const o=CASE_SENSITIVE_ATTR.includes(r)?r:kebabCase(r);n[o]=i[r]}),n}function styleToObject(i){const n={};return i.split(";").forEach(o=>{const a=o.trim();if(a){const l=a.split("=");l.length&&(n[l[0].trim()]=l[1]?l[1].trim():"")}}),n}function mergeAttrs(i,n){return Object.keys(n).forEach(r=>{if(r==="class")i[r]=i[r]?`${i[r]} ${n[r]}`:n[r];else if(r==="style"){const o=typeof i[r]=="object",a=typeof n[r]=="object";let l,s;o&&a?(l=i[r],s=n[r]):o?(l=i[r],s=styleToObject(n[r])):a?(l=styleToObject(i[r]),s=n[r]):(l=styleToObject(i[r]),s=styleToObject(n[r])),i[r]=mergeAttrs(l,s)}else i[r]=n[r]}),i}function annotate(i,n,r={}){const o=r.offset||0,a=[],l=[];let s,u,c=null;for(let d=0;d<i.length;d+=1){s=l[d]=i[d];for(let f=0,p=n.length;f<p;f+=1){const v=n[f],m=v.start+o,g=v.end+o;d>=m&&d<g&&(typeof s=="string"?s=l[d]={t:i[d],attrs:v.attrs}:s.attrs=mergeAttrs(mergeAttrs({},s.attrs),v.attrs),r.includeAnnotationIndices&&(s.annotations==null&&(s.annotations=[]),s.annotations.push(f)))}u=l[d-1],u?isObject(s)&&isObject(u)?(c=c,JSON.stringify(s.attrs)===JSON.stringify(u.attrs)?c.t+=s.t:(a.push(c),c=s)):isObject(s)||isObject(u)?(c=c,a.push(c),c=s):c=(c||"")+s:c=s}return c!=null&&a.push(c),a}function sanitize(i){return i.replace(/ /g," ")}var DataUri;(function(i){function n(d){const f="data:";return d.substr(0,f.length)===f}i.isDataUrl=n;function r(d,f){if(!d||n(d)){setTimeout(()=>f(null,d));return}const p=()=>{f(new Error(`Failed to load image: ${d}`))},v=window.FileReader?g=>{if(g.status===200){const _=new FileReader;_.onload=y=>{const b=y.target.result;f(null,b)},_.onerror=p,_.readAsDataURL(g.response)}else p()}:g=>{const _=y=>{const x=[];for(let C=0;C<y.length;C+=32768)x.push(String.fromCharCode.apply(null,y.subarray(C,C+32768)));return x.join("")};if(g.status===200){let y=d.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,x=new Uint8Array(g.response),C=b+btoa(_(x));f(null,C)}else p()},m=new XMLHttpRequest;m.responseType=window.FileReader?"blob":"arraybuffer",m.open("GET",d,!0),m.addEventListener("error",p),m.addEventListener("load",()=>v(m)),m.send()}i.imageToDataUri=r;function o(d){let f=d.replace(/\s/g,"");f=decodeURIComponent(f);const p=f.indexOf(","),v=f.slice(0,p),m=v.split(":")[1].split(";")[0],g=f.slice(p+1);let _;v.indexOf("base64")>=0?_=atob(g):_=unescape(encodeURIComponent(g));const y=new Uint8Array(_.length);for(let b=0;b<_.length;b+=1)y[b]=_.charCodeAt(b);return new Blob([y],{type:m})}i.dataUriToBlob=o;function a(d,f){const p=window.navigator.msSaveBlob;if(p)p(d,f);else{const v=window.URL.createObjectURL(d),m=document.createElement("a");m.href=v,m.download=f,document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(v)}}i.downloadBlob=a;function l(d,f){const p=o(d);a(p,f)}i.downloadDataUri=l;function s(d){const f=d.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return f&&f[2]?f[2].replace(/\s+/," ").split(" "):null}function u(d){const f=parseFloat(d);return Number.isNaN(f)?null:f}function c(d,f={}){let p=null;const v=C=>(p==null&&(p=s(d)),p!=null?u(p[C]):null),m=C=>{const w=d.match(C);return w&&w[2]?u(w[2]):null};let g=f.width;if(g==null&&(g=m(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=v(2)),g==null)throw new Error("Can not parse width from svg string");let _=f.height;if(_==null&&(_=m(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),_==null&&(_=v(3)),_==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(d).replace(/'/g,"%27").replace(/"/g,"%22")}`}i.svgToDataUrl=c})(DataUri||(DataUri={}));let millimeterSize;const supportedUnits={px(i){return i},mm(i){return millimeterSize*i},cm(i){return millimeterSize*i*10},in(i){return millimeterSize*i*25.4},pt(i){return millimeterSize*(25.4*i/72)},pc(i){return millimeterSize*(25.4*i/6)}};var Unit;(function(i){function n(o,a,l){const s=document.createElement("div"),u=s.style;u.display="inline-block",u.position="absolute",u.left="-15000px",u.top="-15000px",u.width=o+(l||"px"),u.height=a+(l||"px"),document.body.appendChild(s);const c=s.getBoundingClientRect(),d={width:c.width||0,height:c.height||0};return document.body.removeChild(s),d}i.measure=n;function r(o,a){millimeterSize==null&&(millimeterSize=n("1","1","mm").width);const l=a?supportedUnits[a]:null;return l?l(o):o}i.toPx=r})(Unit||(Unit={}));const hyphenPattern=/-(.)/g;function camelize(i){return i.replace(hyphenPattern,(n,r)=>r.toUpperCase())}const memoized={},prefixes=["webkit","ms","moz","o"],testStyle=typeof document<"u"?document.createElement("div").style:{};function getWithPrefix(i){for(let n=0;n<prefixes.length;n+=1){const r=prefixes[n]+i;if(r in testStyle)return r}return null}function getVendorPrefixedName(i){const n=camelize(i);if(memoized[n]==null){const r=n.charAt(0).toUpperCase()+n.slice(1);memoized[n]=n in testStyle?n:getWithPrefix(r)}return memoized[n]}function getComputedStyle$1(i,n){const r=i.ownerDocument&&i.ownerDocument.defaultView&&i.ownerDocument.defaultView.opener?i.ownerDocument.defaultView.getComputedStyle(i,null):window.getComputedStyle(i,null);return r&&n?r.getPropertyValue(n)||r[n]:r}const numericProps={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function isCSSVariable(i){return/^--/.test(i)}function computeStyle(i,n,r){const o=window.getComputedStyle(i,null);return r?o.getPropertyValue(n)||void 0:o[n]||i.style[n]}function getSuffixedValue(i,n){return!numericProps[i]&&typeof n=="number"?`${n}px`:n}function css(i,n,r){if(typeof n=="string"){const o=isCSSVariable(n);if(o||(n=getVendorPrefixedName(n)),r===void 0)return computeStyle(i,n,o);o||(r=getSuffixedValue(n,r));const a=i.style;o?a.setProperty(n,r):a[n]=r;return}for(const o in n)css(i,o,n[o])}const dataset=new WeakMap;function getData(i,n){const r=camelCase$1(n),o=dataset.get(i);if(o)return o[r]}function setData(i,n,r){const o=camelCase$1(n),a=dataset.get(i);a?a[o]=r:dataset.set(i,{[o]:r})}function data(i,n,r){if(!n){const o={};return Object.keys(dataset).forEach(a=>{o[a]=getData(i,a)}),o}if(typeof n=="string"){if(r===void 0)return getData(i,n);setData(i,n,r);return}for(const o in n)data(i,o,n[o])}const propMap={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function prop(i,n,r){if(n){if(typeof n=="string"){if(n=propMap[n]||n,arguments.length<3)return i[n];i[n]=r;return}for(const o in n)prop(i,o,n[o])}}class Vector{get[Symbol.toStringTag](){return Vector.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(n){this.node.id=n}constructor(n,r,o){if(!n)throw new TypeError("Invalid element to create vector");let a;if(Vector.isVector(n))a=n.node;else if(typeof n=="string")if(n.toLowerCase()==="svg")a=createSvgDocument();else if(n[0]==="<"){const l=createSvgDocument(n);a=document.importNode(l.firstChild,!0)}else a=document.createElementNS(ns.svg,n);else a=n;this.node=a,r&&this.setAttributes(r),o&&this.append(o)}transform(n,r){return n==null?transform(this.node):(transform(this.node,n,r),this)}translate(n,r=0,o={}){return n==null?translate(this.node):(translate(this.node,n,r,o),this)}rotate(n,r,o,a={}){return n==null?rotate$1(this.node):(rotate$1(this.node,n,r,o,a),this)}scale(n,r){return n==null?scale(this.node):(scale(this.node,n,r),this)}getTransformToElement(n){const r=Vector.toNode(n);return getTransformToElement(this.node,r)}removeAttribute(n){return removeAttribute(this.node,n),this}getAttribute(n){return getAttribute(this.node,n)}setAttribute(n,r){return setAttribute(this.node,n,r),this}setAttributes(n){return setAttributes(this.node,n),this}attr(n,r){return n==null?attr(this.node):typeof n=="string"&&r===void 0?attr(this.node,n):(typeof n=="object"?attr(this.node,n):attr(this.node,n,r),this)}svg(){return this.node instanceof SVGSVGElement?this:Vector.create(this.node.ownerSVGElement)}defs(){const n=this.svg()||this,r=n.node.getElementsByTagName("defs")[0];return r?Vector.create(r):Vector.create("defs").appendTo(n)}text(n,r={}){return text$1(this.node,n,r),this}tagName(){return tagName(this.node)}clone(){return Vector.create(this.node.cloneNode(!0))}remove(){return remove(this.node),this}empty(){return empty(this.node),this}append(n){return append(this.node,Vector.toNodes(n)),this}appendTo(n){return appendTo(this.node,Vector.isVector(n)?n.node:n),this}prepend(n){return prepend(this.node,Vector.toNodes(n)),this}before(n){return before(this.node,Vector.toNodes(n)),this}replace(n){return this.node.parentNode&&this.node.parentNode.replaceChild(Vector.toNode(n),this.node),Vector.create(n)}first(){return this.node.firstChild?Vector.create(this.node.firstChild):null}last(){return this.node.lastChild?Vector.create(this.node.lastChild):null}get(n){const r=this.node.childNodes[n];return r?Vector.create(r):null}indexOf(n){return Array.prototype.slice.call(this.node.childNodes).indexOf(Vector.toNode(n))}find(n){const r=[],o=find(this.node,n);if(o)for(let a=0,l=o.length;a<l;a+=1)r.push(Vector.create(o[a]));return r}findOne(n){const r=findOne(this.node,n);return r?Vector.create(r):null}findParentByClass(n,r){const o=findParentByClass(this.node,n,r);return o?Vector.create(o):null}matches(n){const r=this.node;this.node.matches;const o=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||null;return o&&o.call(r,n)}contains(n){return contains(this.node,Vector.isVector(n)?n.node:n)}wrap(n){const r=Vector.create(n),o=this.node.parentNode;return o!=null&&o.insertBefore(r.node,this.node),r.append(this)}parent(n){let r=this;if(r.node.parentNode==null)return null;if(r=Vector.create(r.node.parentNode),n==null)return r;do if(typeof n=="string"?r.matches(n):r instanceof n)return r;while(r=Vector.create(r.node.parentNode));return r}children(){const n=this.node.childNodes,r=[];for(let o=0;o<n.length;o+=1)n[o].nodeType===1&&r.push(Vector.create(n[o]));return r}eachChild(n,r){const o=this.children();for(let a=0,l=o.length;a<l;a+=1)n.call(o[a],o[a],a,o),r&&o[a].eachChild(n,r);return this}index(){return index$1(this.node)}hasClass(n){return hasClass(this.node,n)}addClass(n){return addClass(this.node,n),this}removeClass(n){return removeClass(this.node,n),this}toggleClass(n,r){return toggleClass(this.node,n,r),this}toLocalPoint(n,r){return toLocalPoint(this.node,n,r)}sample(n=1){return this.node instanceof SVGPathElement?sample(this.node,n):[]}toPath(){return Vector.create(toPath(this.node))}toPathData(){return toPathData(this.node)}}(function(i){i.toStringTag=`X6.${i.name}`;function n(s){if(s==null)return!1;if(s instanceof i)return!0;const u=s[Symbol.toStringTag],c=s;return(u==null||u===i.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}i.isVector=n;function r(s,u,c){return new i(s,u,c)}i.create=r;function o(s){if(s[0]==="<"){const u=createSvgDocument(s),c=[];for(let d=0,f=u.childNodes.length;d<f;d+=1){const p=u.childNodes[d];c.push(r(document.importNode(p,!0)))}return c}return[r(s)]}i.createVectors=o;function a(s){return n(s)?s.node:s}i.toNode=a;function l(s){return Array.isArray(s)?s.map(u=>a(u)):[a(s)]}i.toNodes=l})(Vector||(Vector={}));function createTextPathNode(i,n){const r=Vector.create(n),o=Vector.create("textPath"),a=i.d;if(a&&i["xlink:href"]===void 0){const l=Vector.create("path").attr("d",a).appendTo(r.defs());o.attr("xlink:href",`#${l.id}`)}return typeof i=="object"&&o.attr(i),o.node}function annotateTextLine(i,n,r){const o=r.eol,a=r.baseSize,l=r.lineHeight;let s=0,u;const c={},d=n.length-1;for(let f=0;f<=d;f+=1){let p=n[f],v=null;if(typeof p=="object"){const m=p.attrs,g=Vector.create("tspan",m);u=g.node;let _=p.t;o&&f===d&&(_+=o),u.textContent=_;const y=m.class;y&&g.addClass(y),r.includeAnnotationIndices&&g.attr("annotations",p.annotations.join(",")),v=parseFloat(m["font-size"]),v===void 0&&(v=a),v&&v>s&&(s=v)}else o&&f===d&&(p+=o),u=document.createTextNode(p||" "),a&&a>s&&(s=a);i.appendChild(u)}return s&&(c.maxFontSize=s),l?c.lineHeight=l:s&&(c.lineHeight=s*1.2),c}const emRegex=/em$/;function emToPx(i,n){const r=parseFloat(i);return emRegex.test(i)?r*n:r}function calculateDY(i,n,r,o){if(!Array.isArray(n))return 0;const a=n.length;if(!a)return 0;let l=n[0];const s=emToPx(l.maxFontSize,r)||r;let u=0;const c=emToPx(o,r);for(let p=1;p<a;p+=1){l=n[p];const v=emToPx(l.lineHeight,r)||c;u+=v}const d=emToPx(l.maxFontSize,r)||r;let f;switch(i){case"middle":f=s/2-.15*d-u/2;break;case"bottom":f=-(.25*d)-u;break;case"top":default:f=.8*s;break}return f}function text$1(i,n,r={}){n=sanitize(n);const o=r.eol;let a=r.textPath;const l=r.textVerticalAnchor,s=l==="middle"||l==="bottom"||l==="top";let u=r.x;u===void 0&&(u=i.getAttribute("x")||0);const c=r.includeAnnotationIndices;let d=r.annotations;d&&!Array.isArray(d)&&(d=[d]);const f=r.lineHeight,p=f==="auto",v=p?"1.5em":f||"1em";let m=!0;const g=i.childNodes;if(g.length===1){const k=g[0];k&&k.tagName.toUpperCase()==="TITLE"&&(m=!1)}m&&empty(i),attr(i,{"xml:space":"preserve",display:n||r.displayEmpty?null:"none"});const _=attr(i,"font-size");let y=parseFloat(_);y||(y=16,(s||d)&&!_&&attr(i,"font-size",`${y}`));let b;a?(typeof a=="string"&&(a={d:a}),b=createTextPathNode(a,i)):b=document.createDocumentFragment();let x,C=0,w;const E=n.split(`
683
+ }`},null,8,["modelValue","disabled"])])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"是否缓存结果",required:""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElSwitch),{modelValue:vue.unref(s).isCacheResult,"onUpdate:modelValue":b[10]||(b[10]=C=>vue.unref(s).isCacheResult=C),"active-value":1,"inactive-value":0,disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"缓存key"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).cacheKey,"onUpdate:modelValue":b[11]||(b[11]=C=>vue.unref(s).cacheKey=C),placeholder:"请输入缓存key",disabled:vue.unref(f)},null,8,["modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),{label:"缓存时长"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElInput),{modelValue:vue.unref(s).cacheTime,"onUpdate:modelValue":b[12]||(b[12]=C=>vue.unref(s).cacheTime=C),placeholder:"请输入缓存时长",disabled:vue.unref(f)},{append:vue.withCtx(()=>[vue.createTextVNode("秒")]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{type:"success",onClick:_,disabled:vue.unref(v)},{default:vue.withCtx(()=>[_hoisted_11$3,vue.createTextVNode(" 调试接口 ")]),_:1},8,["disabled"])]),_:1}),vue.createVNode(vue.unref(elementPlus.ElFormItem),null,{default:vue.withCtx(()=>[vue.unref(p)?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElAlert),{key:0,type:"success",description:"接口调试成功","show-icon":"",closable:!1})):vue.createCommentVNode("",!0)]),_:1})])])])]),_:2},[vue.unref(f)?void 0:{name:"footer",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",disabled:vue.unref(v),type:"primary",onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(" 保存 ")]),_:1},8,["disabled"]),vue.createVNode(vue.unref(elementPlus.ElButton),{class:"ml-3",onClick:b[13]||(b[13]=C=>l.value=!1)},{default:vue.withCtx(()=>[vue.createTextVNode("取消")]),_:1})]),key:"0"}]),1032,["modelValue"])}}}),preView_vue_vue_type_style_index_0_scoped_04d83cd1_lang="",PreView=_export_sfc$2(_sfc_main$f,[["__scopeId","data-v-04d83cd1"]]),_sfc_main$e=vue.defineComponent({__name:"pre",setup(i){const{proxy:n}=vue.getCurrentInstance(),r=vue.ref(null),o=vue.ref(null),a=vue.reactive([{name:"新增",key:"add",type:"primary",icon:"ri-add-line"}]),l=vue.reactive([{name:"api名称",type:FieldType.Text,fieldName:"apiName",value:""}]),s=vue.reactive([{label:"接口名称",prop:"apiName"},{label:"接口方式",prop:"requestType"},{label:"是否缓存接口",prop:"isCacheResult",dict:"status"},{label:"依赖前置接口",prop:"preApiName"},{label:"返回对象编码",prop:"responseObjectCode"},{label:"接口操作",prop:"htmlButton",fixed:"right",width:"200px"}]),u=d=>{d.data.forEach(f=>{f.htmlButton=[],f.htmlButton.push({name:"查看",key:"view",type:"warning",icon:"ri-eye-line"}),f.htmlButton.push({name:"编辑",key:"edit",type:"primary",icon:"ri-edit-line"}),f.htmlButton.push({name:"删除",key:"remove",type:"danger",icon:"ri-delete-bin-6-line"})})},c=async d=>{const{type:f,row:p}=d;switch(f){case"add":vue.unref(o).init();break;case"view":case"edit":vue.unref(o).init(p.id,f==="view");break;case"remove":n.$baseConfirm({content:"是否确定删除",callConfirm:async()=>{await n.$baseHttp.post(`/api/ace-data-center/invoke-pre-api/remove?ids=${p.id}`,{},{headers:{loading:!0}})&&(n.$message.success("操作成功"),vue.unref(r).getData())}});break}};return(d,f)=>{const p=vue.resolveComponent("AppList");return vue.openBlock(),vue.createBlock(p,{ref_key:"appRef",ref:r,searchForm:vue.unref(l),tableData:vue.unref(s),searchBtns:vue.unref(a),url:"/api/ace-data-center/invoke-pre-api/page",onSuccess:u,onBtnClick:c},{invokeStatus:vue.withCtx(({row:v})=>[vue.createVNode(vue.unref(elementPlus.ElTag),{type:v.invokeStatus?"success":"warning"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(v.invokeStatus?"启用":"禁用"),1)]),_:2},1032,["type"])]),modelId:vue.withCtx(({row:v})=>[v.modelId?(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElTag),{key:0,type:"success"},{default:vue.withCtx(()=>[vue.createTextVNode("已创建")]),_:1})):(vue.openBlock(),vue.createBlock(vue.unref(elementPlus.ElButton),{key:1,type:"primary",size:"small",plain:""},{default:vue.withCtx(()=>[vue.createTextVNode("创建模型")]),_:1}))]),default:vue.withCtx(()=>[vue.createVNode(PreView,{ref_key:"preViewRef",ref:o,onSuccess:f[0]||(f[0]=v=>vue.unref(r).getData())},null,512)]),_:1},8,["searchForm","tableData","searchBtns"])}}}),_hoisted_1$c={class:"flex flex-col flex-1 gap-2 overflow-hidden"},_sfc_main$d=vue.defineComponent({__name:"index",setup(i){const n=vue.ref("server"),r=vue.ref([{label:"数据接口",value:"server"},{label:"前置接口",value:"pre"}]);return(o,a)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.createElementVNode("div",null,[vue.createVNode(vue.unref(elementPlus.ElSegmented),{modelValue:vue.unref(n),"onUpdate:modelValue":a[0]||(a[0]=l=>vue.isRef(n)?n.value=l:null),options:vue.unref(r)},null,8,["modelValue","options"])]),vue.unref(n)=="server"?(vue.openBlock(),vue.createBlock(_sfc_main$g,{key:0})):vue.createCommentVNode("",!0),vue.unref(n)=="pre"?(vue.openBlock(),vue.createBlock(_sfc_main$e,{key:1})):vue.createCommentVNode("",!0)]))}});typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window<"u"&&function(i){i.forEach(n=>{Object.prototype.hasOwnProperty.call(n,"append")||Object.defineProperty(n,"append",{configurable:!0,enumerable:!0,writable:!0,value(...r){const o=document.createDocumentFragment();r.forEach(a=>{const l=a instanceof Node;o.appendChild(l?a:document.createTextNode(String(a)))}),this.appendChild(o)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class Disposable{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(i){function n(){return(r,o,a)=>{const l=a.value,s=r.__proto__;a.value=function(...u){this.disposed||(l.call(this,...u),s.dispose.call(this))}}}i.dispose=n})(Disposable||(Disposable={}));class DisposableSet{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(n=>{n.dispose()}),this.items.clear())}contains(n){return this.items.has(n)}add(n){this.items.add(n)}remove(n){this.items.delete(n)}clear(){this.items.clear()}}(function(i){function n(r){const o=new i;return r.forEach(a=>{o.add(a)}),o}i.from=n})(DisposableSet||(DisposableSet={}));var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;const freeGlobal$1=freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal$1||freeSelf||Function("return this")();const root$1=root;var Symbol$1=root$1.Symbol;const Symbol$2=Symbol$1;var objectProto$j=Object.prototype,hasOwnProperty$g=objectProto$j.hasOwnProperty,nativeObjectToString$1=objectProto$j.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(i){var n=hasOwnProperty$g.call(i,symToStringTag$1),r=i[symToStringTag$1];try{i[symToStringTag$1]=void 0;var o=!0}catch{}var a=nativeObjectToString$1.call(i);return o&&(n?i[symToStringTag$1]=r:delete i[symToStringTag$1]),a}var objectProto$i=Object.prototype,nativeObjectToString=objectProto$i.toString;function objectToString(i){return nativeObjectToString.call(i)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(i){return i==null?i===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(i)?getRawTag(i):objectToString(i)}function isObjectLike(i){return i!=null&&typeof i=="object"}var symbolTag$3="[object Symbol]";function isSymbol(i){return typeof i=="symbol"||isObjectLike(i)&&baseGetTag(i)==symbolTag$3}function arrayMap(i,n){for(var r=-1,o=i==null?0:i.length,a=Array(o);++r<o;)a[r]=n(i[r],r,i);return a}var isArray=Array.isArray;const isArray$1=isArray;var INFINITY$2=1/0,symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(i){if(typeof i=="string")return i;if(isArray$1(i))return arrayMap(i,baseToString)+"";if(isSymbol(i))return symbolToString?symbolToString.call(i):"";var n=i+"";return n=="0"&&1/i==-INFINITY$2?"-0":n}var reWhitespace=/\s/;function trimmedEndIndex(i){for(var n=i.length;n--&&reWhitespace.test(i.charAt(n)););return n}var reTrimStart=/^\s+/;function baseTrim(i){return i&&i.slice(0,trimmedEndIndex(i)+1).replace(reTrimStart,"")}function isObject(i){var n=typeof i;return i!=null&&(n=="object"||n=="function")}var NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(i){if(typeof i=="number")return i;if(isSymbol(i))return NAN;if(isObject(i)){var n=typeof i.valueOf=="function"?i.valueOf():i;i=isObject(n)?n+"":n}if(typeof i!="string")return i===0?i:+i;i=baseTrim(i);var r=reIsBinary.test(i);return r||reIsOctal.test(i)?freeParseInt(i.slice(2),r?2:8):reIsBadHex.test(i)?NAN:+i}function identity(i){return i}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(i){if(!isObject(i))return!1;var n=baseGetTag(i);return n==funcTag$2||n==genTag$1||n==asyncTag||n==proxyTag}var coreJsData=root$1["__core-js_shared__"];const coreJsData$1=coreJsData;var maskSrcKey=function(){var i=/[^.]+$/.exec(coreJsData$1&&coreJsData$1.keys&&coreJsData$1.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function isMasked(i){return!!maskSrcKey&&maskSrcKey in i}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(i){if(i!=null){try{return funcToString$2.call(i)}catch{}try{return i+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$h=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$f=objectProto$h.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$f).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(i){if(!isObject(i)||isMasked(i))return!1;var n=isFunction(i)?reIsNative:reIsHostCtor;return n.test(toSource(i))}function getValue(i,n){return i==null?void 0:i[n]}function getNative(i,n){var r=getValue(i,n);return baseIsNative(r)?r:void 0}var WeakMap$1=getNative(root$1,"WeakMap");const WeakMap$2=WeakMap$1;var objectCreate=Object.create,baseCreate=function(){function i(){}return function(n){if(!isObject(n))return{};if(objectCreate)return objectCreate(n);i.prototype=n;var r=new i;return i.prototype=void 0,r}}();const baseCreate$1=baseCreate;function apply$1(i,n,r){switch(r.length){case 0:return i.call(n);case 1:return i.call(n,r[0]);case 2:return i.call(n,r[0],r[1]);case 3:return i.call(n,r[0],r[1],r[2])}return i.apply(n,r)}function noop$1(){}function copyArray(i,n){var r=-1,o=i.length;for(n||(n=Array(o));++r<o;)n[r]=i[r];return n}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(i){var n=0,r=0;return function(){var o=nativeNow(),a=HOT_SPAN-(o-r);if(r=o,a>0){if(++n>=HOT_COUNT)return arguments[0]}else n=0;return i.apply(void 0,arguments)}}function constant(i){return function(){return i}}var defineProperty=function(){try{var i=getNative(Object,"defineProperty");return i({},"",{}),i}catch{}}();const defineProperty$1=defineProperty;var baseSetToString=defineProperty$1?function(i,n){return defineProperty$1(i,"toString",{configurable:!0,enumerable:!1,value:constant(n),writable:!0})}:identity;const baseSetToString$1=baseSetToString;var setToString=shortOut(baseSetToString$1);const setToString$1=setToString;function arrayEach(i,n){for(var r=-1,o=i==null?0:i.length;++r<o&&n(i[r],r,i)!==!1;);return i}function baseFindIndex(i,n,r,o){for(var a=i.length,l=r+(o?1:-1);o?l--:++l<a;)if(n(i[l],l,i))return l;return-1}function baseIsNaN(i){return i!==i}function strictIndexOf(i,n,r){for(var o=r-1,a=i.length;++o<a;)if(i[o]===n)return o;return-1}function baseIndexOf(i,n,r){return n===n?strictIndexOf(i,n,r):baseFindIndex(i,baseIsNaN,r)}function arrayIncludes(i,n){var r=i==null?0:i.length;return!!r&&baseIndexOf(i,n,0)>-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(i,n){var r=typeof i;return n=n??MAX_SAFE_INTEGER$1,!!n&&(r=="number"||r!="symbol"&&reIsUint.test(i))&&i>-1&&i%1==0&&i<n}function baseAssignValue(i,n,r){n=="__proto__"&&defineProperty$1?defineProperty$1(i,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):i[n]=r}function eq(i,n){return i===n||i!==i&&n!==n}var objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function assignValue(i,n,r){var o=i[n];(!(hasOwnProperty$e.call(i,n)&&eq(o,r))||r===void 0&&!(n in i))&&baseAssignValue(i,n,r)}function copyObject(i,n,r,o){var a=!r;r||(r={});for(var l=-1,s=n.length;++l<s;){var u=n[l],c=o?o(r[u],i[u],u,r,i):void 0;c===void 0&&(c=i[u]),a?baseAssignValue(r,u,c):assignValue(r,u,c)}return r}var nativeMax$1=Math.max;function overRest(i,n,r){return n=nativeMax$1(n===void 0?i.length-1:n,0),function(){for(var o=arguments,a=-1,l=nativeMax$1(o.length-n,0),s=Array(l);++a<l;)s[a]=o[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=o[a];return u[n]=r(s),apply$1(i,this,u)}}function baseRest(i,n){return setToString$1(overRest(i,n,identity),i+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=MAX_SAFE_INTEGER}function isArrayLike(i){return i!=null&&isLength(i.length)&&!isFunction(i)}function isIterateeCall(i,n,r){if(!isObject(r))return!1;var o=typeof n;return(o=="number"?isArrayLike(r)&&isIndex(n,r.length):o=="string"&&n in r)?eq(r[n],i):!1}function createAssigner(i){return baseRest(function(n,r){var o=-1,a=r.length,l=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(l=i.length>3&&typeof l=="function"?(a--,l):void 0,s&&isIterateeCall(r[0],r[1],s)&&(l=a<3?void 0:l,a=1),n=Object(n);++o<a;){var u=r[o];u&&i(n,u,o,l)}return n})}var objectProto$f=Object.prototype;function isPrototype(i){var n=i&&i.constructor,r=typeof n=="function"&&n.prototype||objectProto$f;return i===r}function baseTimes(i,n){for(var r=-1,o=Array(i);++r<i;)o[r]=n(r);return o}var argsTag$3="[object Arguments]";function baseIsArguments(i){return isObjectLike(i)&&baseGetTag(i)==argsTag$3}var objectProto$e=Object.prototype,hasOwnProperty$d=objectProto$e.hasOwnProperty,propertyIsEnumerable$1=objectProto$e.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(i){return isObjectLike(i)&&hasOwnProperty$d.call(i,"callee")&&!propertyIsEnumerable$1.call(i,"callee")};const isArguments$1=isArguments;function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$1=moduleExports$2?root$1.Buffer:void 0,nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;const isBuffer$1=isBuffer;var argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$6="[object Map]",numberTag$4="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$6="[object Set]",stringTag$3="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$6]=typedArrayTags[numberTag$4]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$6]=typedArrayTags[stringTag$3]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(i){return isObjectLike(i)&&isLength(i.length)&&!!typedArrayTags[baseGetTag(i)]}function baseUnary(i){return function(n){return i(n)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal$1.process,nodeUtil=function(){try{var i=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return i||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}();const nodeUtil$1=nodeUtil;var nodeIsTypedArray=nodeUtil$1&&nodeUtil$1.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;const isTypedArray$1=isTypedArray;var objectProto$d=Object.prototype,hasOwnProperty$c=objectProto$d.hasOwnProperty;function arrayLikeKeys(i,n){var r=isArray$1(i),o=!r&&isArguments$1(i),a=!r&&!o&&isBuffer$1(i),l=!r&&!o&&!a&&isTypedArray$1(i),s=r||o||a||l,u=s?baseTimes(i.length,String):[],c=u.length;for(var d in i)(n||hasOwnProperty$c.call(i,d))&&!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||l&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||isIndex(d,c)))&&u.push(d);return u}function overArg(i,n){return function(r){return i(n(r))}}var nativeKeys=overArg(Object.keys,Object);const nativeKeys$1=nativeKeys;var objectProto$c=Object.prototype,hasOwnProperty$b=objectProto$c.hasOwnProperty;function baseKeys(i){if(!isPrototype(i))return nativeKeys$1(i);var n=[];for(var r in Object(i))hasOwnProperty$b.call(i,r)&&r!="constructor"&&n.push(r);return n}function keys(i){return isArrayLike(i)?arrayLikeKeys(i):baseKeys(i)}function nativeKeysIn(i){var n=[];if(i!=null)for(var r in Object(i))n.push(r);return n}var objectProto$b=Object.prototype,hasOwnProperty$a=objectProto$b.hasOwnProperty;function baseKeysIn(i){if(!isObject(i))return nativeKeysIn(i);var n=isPrototype(i),r=[];for(var o in i)o=="constructor"&&(n||!hasOwnProperty$a.call(i,o))||r.push(o);return r}function keysIn(i){return isArrayLike(i)?arrayLikeKeys(i,!0):baseKeysIn(i)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(i,n){if(isArray$1(i))return!1;var r=typeof i;return r=="number"||r=="symbol"||r=="boolean"||i==null||isSymbol(i)?!0:reIsPlainProp.test(i)||!reIsDeepProp.test(i)||n!=null&&i in Object(n)}var nativeCreate=getNative(Object,"create");const nativeCreate$1=nativeCreate;function hashClear(){this.__data__=nativeCreate$1?nativeCreate$1(null):{},this.size=0}function hashDelete(i){var n=this.has(i)&&delete this.__data__[i];return this.size-=n?1:0,n}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$a=Object.prototype,hasOwnProperty$9=objectProto$a.hasOwnProperty;function hashGet(i){var n=this.__data__;if(nativeCreate$1){var r=n[i];return r===HASH_UNDEFINED$2?void 0:r}return hasOwnProperty$9.call(n,i)?n[i]:void 0}var objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function hashHas(i){var n=this.__data__;return nativeCreate$1?n[i]!==void 0:hasOwnProperty$8.call(n,i)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(i,n){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=nativeCreate$1&&n===void 0?HASH_UNDEFINED$1:n,this}function Hash(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(i,n){for(var r=i.length;r--;)if(eq(i[r][0],n))return r;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(i){var n=this.__data__,r=assocIndexOf(n,i);if(r<0)return!1;var o=n.length-1;return r==o?n.pop():splice.call(n,r,1),--this.size,!0}function listCacheGet(i){var n=this.__data__,r=assocIndexOf(n,i);return r<0?void 0:n[r][1]}function listCacheHas(i){return assocIndexOf(this.__data__,i)>-1}function listCacheSet(i,n){var r=this.__data__,o=assocIndexOf(r,i);return o<0?(++this.size,r.push([i,n])):r[o][1]=n,this}function ListCache(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map");const Map$2=Map$1;function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$2||ListCache),string:new Hash}}function isKeyable(i){var n=typeof i;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?i!=="__proto__":i===null}function getMapData(i,n){var r=i.__data__;return isKeyable(n)?r[typeof n=="string"?"string":"hash"]:r.map}function mapCacheDelete(i){var n=getMapData(this,i).delete(i);return this.size-=n?1:0,n}function mapCacheGet(i){return getMapData(this,i).get(i)}function mapCacheHas(i){return getMapData(this,i).has(i)}function mapCacheSet(i,n){var r=getMapData(this,i),o=r.size;return r.set(i,n),this.size+=r.size==o?0:1,this}function MapCache(i){var n=-1,r=i==null?0:i.length;for(this.clear();++n<r;){var o=i[n];this.set(o[0],o[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$2="Expected a function";function memoize(i,n){if(typeof i!="function"||n!=null&&typeof n!="function")throw new TypeError(FUNC_ERROR_TEXT$2);var r=function(){var o=arguments,a=n?n.apply(this,o):o[0],l=r.cache;if(l.has(a))return l.get(a);var s=i.apply(this,o);return r.cache=l.set(a,s)||l,s};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(i){var n=memoize(i,function(o){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),o}),r=n.cache;return n}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(i){var n=[];return i.charCodeAt(0)===46&&n.push(""),i.replace(rePropName,function(r,o,a,l){n.push(a?l.replace(reEscapeChar,"$1"):o||r)}),n});const stringToPath$1=stringToPath;function toString(i){return i==null?"":baseToString(i)}function castPath(i,n){return isArray$1(i)?i:isKey(i,n)?[i]:stringToPath$1(toString(i))}var INFINITY$1=1/0;function toKey(i){if(typeof i=="string"||isSymbol(i))return i;var n=i+"";return n=="0"&&1/i==-INFINITY$1?"-0":n}function baseGet(i,n){n=castPath(n,i);for(var r=0,o=n.length;i!=null&&r<o;)i=i[toKey(n[r++])];return r&&r==o?i:void 0}function get(i,n,r){var o=i==null?void 0:baseGet(i,n);return o===void 0?r:o}function arrayPush(i,n){for(var r=-1,o=n.length,a=i.length;++r<o;)i[a+r]=n[r];return i}var spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable(i){return isArray$1(i)||isArguments$1(i)||!!(spreadableSymbol&&i&&i[spreadableSymbol])}function baseFlatten(i,n,r,o,a){var l=-1,s=i.length;for(r||(r=isFlattenable),a||(a=[]);++l<s;){var u=i[l];n>0&&r(u)?n>1?baseFlatten(u,n-1,r,o,a):arrayPush(a,u):o||(a[a.length]=u)}return a}function flatten(i){var n=i==null?0:i.length;return n?baseFlatten(i,1):[]}function flatRest(i){return setToString$1(overRest(i,void 0,flatten),i+"")}var getPrototype=overArg(Object.getPrototypeOf,Object);const getPrototype$1=getPrototype;var objectTag$3="[object Object]",funcProto=Function.prototype,objectProto$8=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$7=objectProto$8.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(i){if(!isObjectLike(i)||baseGetTag(i)!=objectTag$3)return!1;var n=getPrototype$1(i);if(n===null)return!0;var r=hasOwnProperty$7.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&funcToString.call(r)==objectCtorString}function baseSlice(i,n,r){var o=-1,a=i.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(a);++o<a;)l[o]=i[o+n];return l}function castSlice(i,n,r){var o=i.length;return r=r===void 0?o:r,!n&&r>=o?i:baseSlice(i,n,r)}var rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode(i){return reHasUnicode.test(i)}function asciiToArray(i){return i.split("")}var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray(i){return i.match(reUnicode)||[]}function stringToArray(i){return hasUnicode(i)?unicodeToArray(i):asciiToArray(i)}function createCaseFirst(i){return function(n){n=toString(n);var r=hasUnicode(n)?stringToArray(n):void 0,o=r?r[0]:n.charAt(0),a=r?castSlice(r,1).join(""):n.slice(1);return o[i]()+a}}var upperFirst=createCaseFirst("toUpperCase");const upperFirst$1=upperFirst;function capitalize(i){return upperFirst$1(toString(i).toLowerCase())}function arrayReduce(i,n,r,o){var a=-1,l=i==null?0:i.length;for(o&&l&&(r=i[++a]);++a<l;)r=n(r,i[a],a,i);return r}function basePropertyOf(i){return function(n){return i==null?void 0:i[n]}}var deburredLetters={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter=basePropertyOf(deburredLetters);const deburrLetter$1=deburrLetter;var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr(i){return i=toString(i),i&&i.replace(reLatin,deburrLetter$1).replace(reComboMark,"")}var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords(i){return i.match(reAsciiWord)||[]}var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord(i){return reHasUnicodeWord.test(i)}var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords(i){return i.match(reUnicodeWord)||[]}function words(i,n,r){return i=toString(i),n=r?void 0:n,n===void 0?hasUnicodeWord(i)?unicodeWords(i):asciiWords(i):i.match(n)||[]}var rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder(i){return function(n){return arrayReduce(words(deburr(n).replace(reApos,"")),i,"")}}var camelCase=createCompounder(function(i,n,r){return n=n.toLowerCase(),i+(r?capitalize(n):n)});const camelCase$1=camelCase;function baseClamp(i,n,r){return i===i&&(r!==void 0&&(i=i<=r?i:r),n!==void 0&&(i=i>=n?i:n)),i}function clamp(i,n,r){return r===void 0&&(r=n,n=void 0),r!==void 0&&(r=toNumber(r),r=r===r?r:0),n!==void 0&&(n=toNumber(n),n=n===n?n:0),baseClamp(toNumber(i),n,r)}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(i){var n=this.__data__,r=n.delete(i);return this.size=n.size,r}function stackGet(i){return this.__data__.get(i)}function stackHas(i){return this.__data__.has(i)}var LARGE_ARRAY_SIZE$2=200;function stackSet(i,n){var r=this.__data__;if(r instanceof ListCache){var o=r.__data__;if(!Map$2||o.length<LARGE_ARRAY_SIZE$2-1)return o.push([i,n]),this.size=++r.size,this;r=this.__data__=new MapCache(o)}return r.set(i,n),this.size=r.size,this}function Stack(i){var n=this.__data__=new ListCache(i);this.size=n.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function baseAssign(i,n){return i&&copyObject(n,keys(n),i)}function baseAssignIn(i,n){return i&&copyObject(n,keysIn(n),i)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root$1.Buffer:void 0,allocUnsafe=Buffer?Buffer.allocUnsafe:void 0;function cloneBuffer(i,n){if(n)return i.slice();var r=i.length,o=allocUnsafe?allocUnsafe(r):new i.constructor(r);return i.copy(o),o}function arrayFilter(i,n){for(var r=-1,o=i==null?0:i.length,a=0,l=[];++r<o;){var s=i[r];n(s,r,i)&&(l[a++]=s)}return l}function stubArray(){return[]}var objectProto$7=Object.prototype,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols$1?function(i){return i==null?[]:(i=Object(i),arrayFilter(nativeGetSymbols$1(i),function(n){return propertyIsEnumerable.call(i,n)}))}:stubArray;const getSymbols$1=getSymbols;function copySymbols(i,n){return copyObject(i,getSymbols$1(i),n)}var nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn=nativeGetSymbols?function(i){for(var n=[];i;)arrayPush(n,getSymbols$1(i)),i=getPrototype$1(i);return n}:stubArray;const getSymbolsIn$1=getSymbolsIn;function copySymbolsIn(i,n){return copyObject(i,getSymbolsIn$1(i),n)}function baseGetAllKeys(i,n,r){var o=n(i);return isArray$1(i)?o:arrayPush(o,r(i))}function getAllKeys(i){return baseGetAllKeys(i,keys,getSymbols$1)}function getAllKeysIn(i){return baseGetAllKeys(i,keysIn,getSymbolsIn$1)}var DataView$1=getNative(root$1,"DataView");const DataView$2=DataView$1;var Promise$1=getNative(root$1,"Promise");const Promise$2=Promise$1;var Set$1=getNative(root$1,"Set");const Set$2=Set$1;var mapTag$5="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$5="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$3="[object DataView]",dataViewCtorString=toSource(DataView$2),mapCtorString=toSource(Map$2),promiseCtorString=toSource(Promise$2),setCtorString=toSource(Set$2),weakMapCtorString=toSource(WeakMap$2),getTag=baseGetTag;(DataView$2&&getTag(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$3||Map$2&&getTag(new Map$2)!=mapTag$5||Promise$2&&getTag(Promise$2.resolve())!=promiseTag||Set$2&&getTag(new Set$2)!=setTag$5||WeakMap$2&&getTag(new WeakMap$2)!=weakMapTag$1)&&(getTag=function(i){var n=baseGetTag(i),r=n==objectTag$2?i.constructor:void 0,o=r?toSource(r):"";if(o)switch(o){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$5;case promiseCtorString:return promiseTag;case setCtorString:return setTag$5;case weakMapCtorString:return weakMapTag$1}return n});const getTag$1=getTag;var objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function initCloneArray(i){var n=i.length,r=new i.constructor(n);return n&&typeof i[0]=="string"&&hasOwnProperty$6.call(i,"index")&&(r.index=i.index,r.input=i.input),r}var Uint8Array$1=root$1.Uint8Array;const Uint8Array$2=Uint8Array$1;function cloneArrayBuffer(i){var n=new i.constructor(i.byteLength);return new Uint8Array$2(n).set(new Uint8Array$2(i)),n}function cloneDataView(i,n){var r=n?cloneArrayBuffer(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.byteLength)}var reFlags=/\w*$/;function cloneRegExp(i){var n=new i.constructor(i.source,reFlags.exec(i));return n.lastIndex=i.lastIndex,n}var symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(i){return symbolValueOf$1?Object(symbolValueOf$1.call(i)):{}}function cloneTypedArray(i,n){var r=n?cloneArrayBuffer(i.buffer):i.buffer;return new i.constructor(r,i.byteOffset,i.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$4="[object Map]",numberTag$3="[object Number]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(i,n,r){var o=i.constructor;switch(n){case arrayBufferTag$2:return cloneArrayBuffer(i);case boolTag$2:case dateTag$2:return new o(+i);case dataViewTag$2:return cloneDataView(i,r);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(i,r);case mapTag$4:return new o;case numberTag$3:case stringTag$2:return new o(i);case regexpTag$2:return cloneRegExp(i);case setTag$4:return new o;case symbolTag$2:return cloneSymbol(i)}}function initCloneObject(i){return typeof i.constructor=="function"&&!isPrototype(i)?baseCreate$1(getPrototype$1(i)):{}}var mapTag$3="[object Map]";function baseIsMap(i){return isObjectLike(i)&&getTag$1(i)==mapTag$3}var nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;const isMap$1=isMap;var setTag$3="[object Set]";function baseIsSet(i){return isObjectLike(i)&&getTag$1(i)==setTag$3}var nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;const isSet$1=isSet;var CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$2="[object Map]",numberTag$2="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$2]=cloneableTags[numberTag$2]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$2]=cloneableTags[stringTag$1]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(i,n,r,o,a,l){var s,u=n&CLONE_DEEP_FLAG$1,c=n&CLONE_FLAT_FLAG,d=n&CLONE_SYMBOLS_FLAG$2;if(r&&(s=a?r(i,o,a,l):r(i)),s!==void 0)return s;if(!isObject(i))return i;var f=isArray$1(i);if(f){if(s=initCloneArray(i),!u)return copyArray(i,s)}else{var p=getTag$1(i),v=p==funcTag||p==genTag;if(isBuffer$1(i))return cloneBuffer(i,u);if(p==objectTag$1||p==argsTag$1||v&&!a){if(s=c||v?{}:initCloneObject(i),!u)return c?copySymbolsIn(i,baseAssignIn(s,i)):copySymbols(i,baseAssign(s,i))}else{if(!cloneableTags[p])return a?i:{};s=initCloneByTag(i,p,u)}}l||(l=new Stack);var m=l.get(i);if(m)return m;l.set(i,s),isSet$1(i)?i.forEach(function(y){s.add(baseClone(y,n,r,y,i,l))}):isMap$1(i)&&i.forEach(function(y,b){s.set(b,baseClone(y,n,r,b,i,l))});var g=d?c?getAllKeysIn:getAllKeys:c?keysIn:keys,_=f?void 0:g(i);return arrayEach(_||i,function(y,b){_&&(b=y,y=i[b]),assignValue(s,b,baseClone(y,n,r,b,i,l))}),s}var CLONE_SYMBOLS_FLAG$1=4;function clone(i){return baseClone(i,CLONE_SYMBOLS_FLAG$1)}var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(i){return baseClone(i,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(i){return this.__data__.set(i,HASH_UNDEFINED),this}function setCacheHas(i){return this.__data__.has(i)}function SetCache(i){var n=-1,r=i==null?0:i.length;for(this.__data__=new MapCache;++n<r;)this.add(i[n])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;function arraySome(i,n){for(var r=-1,o=i==null?0:i.length;++r<o;)if(n(i[r],r,i))return!0;return!1}function cacheHas(i,n){return i.has(n)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(i,n,r,o,a,l){var s=r&COMPARE_PARTIAL_FLAG$5,u=i.length,c=n.length;if(u!=c&&!(s&&c>u))return!1;var d=l.get(i),f=l.get(n);if(d&&f)return d==n&&f==i;var p=-1,v=!0,m=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(l.set(i,n),l.set(n,i);++p<u;){var g=i[p],_=n[p];if(o)var y=s?o(_,g,p,n,i,l):o(g,_,p,i,n,l);if(y!==void 0){if(y)continue;v=!1;break}if(m){if(!arraySome(n,function(b,x){if(!cacheHas(m,x)&&(g===b||a(g,b,r,o,l)))return m.push(x)})){v=!1;break}}else if(!(g===_||a(g,_,r,o,l))){v=!1;break}}return l.delete(i),l.delete(n),v}function mapToArray(i){var n=-1,r=Array(i.size);return i.forEach(function(o,a){r[++n]=[a,o]}),r}function setToArray(i){var n=-1,r=Array(i.size);return i.forEach(function(o){r[++n]=o}),r}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(i,n,r,o,a,l,s){switch(r){case dataViewTag:if(i.byteLength!=n.byteLength||i.byteOffset!=n.byteOffset)return!1;i=i.buffer,n=n.buffer;case arrayBufferTag:return!(i.byteLength!=n.byteLength||!l(new Uint8Array$2(i),new Uint8Array$2(n)));case boolTag:case dateTag:case numberTag$1:return eq(+i,+n);case errorTag:return i.name==n.name&&i.message==n.message;case regexpTag:case stringTag:return i==n+"";case mapTag$1:var u=mapToArray;case setTag$1:var c=o&COMPARE_PARTIAL_FLAG$4;if(u||(u=setToArray),i.size!=n.size&&!c)return!1;var d=s.get(i);if(d)return d==n;o|=COMPARE_UNORDERED_FLAG$2,s.set(i,n);var f=equalArrays(u(i),u(n),o,a,l,s);return s.delete(i),f;case symbolTag:if(symbolValueOf)return symbolValueOf.call(i)==symbolValueOf.call(n)}return!1}var COMPARE_PARTIAL_FLAG$3=1,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function equalObjects(i,n,r,o,a,l){var s=r&COMPARE_PARTIAL_FLAG$3,u=getAllKeys(i),c=u.length,d=getAllKeys(n),f=d.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var v=u[p];if(!(s?v in n:hasOwnProperty$5.call(n,v)))return!1}var m=l.get(i),g=l.get(n);if(m&&g)return m==n&&g==i;var _=!0;l.set(i,n),l.set(n,i);for(var y=s;++p<c;){v=u[p];var b=i[v],x=n[v];if(o)var C=s?o(x,b,v,n,i,l):o(b,x,v,i,n,l);if(!(C===void 0?b===x||a(b,x,r,o,l):C)){_=!1;break}y||(y=v=="constructor")}if(_&&!y){var w=i.constructor,E=n.constructor;w!=E&&"constructor"in i&&"constructor"in n&&!(typeof w=="function"&&w instanceof w&&typeof E=="function"&&E instanceof E)&&(_=!1)}return l.delete(i),l.delete(n),_}var COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function baseIsEqualDeep(i,n,r,o,a,l){var s=isArray$1(i),u=isArray$1(n),c=s?arrayTag:getTag$1(i),d=u?arrayTag:getTag$1(n);c=c==argsTag?objectTag:c,d=d==argsTag?objectTag:d;var f=c==objectTag,p=d==objectTag,v=c==d;if(v&&isBuffer$1(i)){if(!isBuffer$1(n))return!1;s=!0,f=!1}if(v&&!f)return l||(l=new Stack),s||isTypedArray$1(i)?equalArrays(i,n,r,o,a,l):equalByTag(i,n,c,r,o,a,l);if(!(r&COMPARE_PARTIAL_FLAG$2)){var m=f&&hasOwnProperty$4.call(i,"__wrapped__"),g=p&&hasOwnProperty$4.call(n,"__wrapped__");if(m||g){var _=m?i.value():i,y=g?n.value():n;return l||(l=new Stack),a(_,y,r,o,l)}}return v?(l||(l=new Stack),equalObjects(i,n,r,o,a,l)):!1}function baseIsEqual(i,n,r,o,a){return i===n?!0:i==null||n==null||!isObjectLike(i)&&!isObjectLike(n)?i!==i&&n!==n:baseIsEqualDeep(i,n,r,o,baseIsEqual,a)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(i,n,r,o){var a=r.length,l=a,s=!o;if(i==null)return!l;for(i=Object(i);a--;){var u=r[a];if(s&&u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<l;){u=r[a];var c=u[0],d=i[c],f=u[1];if(s&&u[2]){if(d===void 0&&!(c in i))return!1}else{var p=new Stack;if(o)var v=o(d,f,c,i,n,p);if(!(v===void 0?baseIsEqual(f,d,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,o,p):v))return!1}}return!0}function isStrictComparable(i){return i===i&&!isObject(i)}function getMatchData(i){for(var n=keys(i),r=n.length;r--;){var o=n[r],a=i[o];n[r]=[o,a,isStrictComparable(a)]}return n}function matchesStrictComparable(i,n){return function(r){return r==null?!1:r[i]===n&&(n!==void 0||i in Object(r))}}function baseMatches(i){var n=getMatchData(i);return n.length==1&&n[0][2]?matchesStrictComparable(n[0][0],n[0][1]):function(r){return r===i||baseIsMatch(r,i,n)}}function baseHasIn(i,n){return i!=null&&n in Object(i)}function hasPath(i,n,r){n=castPath(n,i);for(var o=-1,a=n.length,l=!1;++o<a;){var s=toKey(n[o]);if(!(l=i!=null&&r(i,s)))break;i=i[s]}return l||++o!=a?l:(a=i==null?0:i.length,!!a&&isLength(a)&&isIndex(s,a)&&(isArray$1(i)||isArguments$1(i)))}function hasIn(i,n){return i!=null&&hasPath(i,n,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(i,n){return isKey(i)&&isStrictComparable(n)?matchesStrictComparable(toKey(i),n):function(r){var o=get(r,i);return o===void 0&&o===n?hasIn(r,i):baseIsEqual(n,o,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(i){return function(n){return n==null?void 0:n[i]}}function basePropertyDeep(i){return function(n){return baseGet(n,i)}}function property(i){return isKey(i)?baseProperty(toKey(i)):basePropertyDeep(i)}function baseIteratee(i){return typeof i=="function"?i:i==null?identity:typeof i=="object"?isArray$1(i)?baseMatchesProperty(i[0],i[1]):baseMatches(i):property(i)}function arrayAggregator(i,n,r,o){for(var a=-1,l=i==null?0:i.length;++a<l;){var s=i[a];n(o,s,r(s),i)}return o}function createBaseFor(i){return function(n,r,o){for(var a=-1,l=Object(n),s=o(n),u=s.length;u--;){var c=s[i?u:++a];if(r(l[c],c,l)===!1)break}return n}}var baseFor=createBaseFor();const baseFor$1=baseFor;function baseForOwn(i,n){return i&&baseFor$1(i,n,keys)}function createBaseEach(i,n){return function(r,o){if(r==null)return r;if(!isArrayLike(r))return i(r,o);for(var a=r.length,l=n?a:-1,s=Object(r);(n?l--:++l<a)&&o(s[l],l,s)!==!1;);return r}}var baseEach=createBaseEach(baseForOwn);const baseEach$1=baseEach;function baseAggregator(i,n,r,o){return baseEach$1(i,function(a,l,s){n(o,a,r(a),s)}),o}function createAggregator(i,n){return function(r,o){var a=isArray$1(r)?arrayAggregator:baseAggregator,l=n?n():{};return a(r,i,baseIteratee(o),l)}}var now=function(){return root$1.Date.now()};const now$1=now;var FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin$1=Math.min;function debounce$1(i,n,r){var o,a,l,s,u,c,d=0,f=!1,p=!1,v=!0;if(typeof i!="function")throw new TypeError(FUNC_ERROR_TEXT$1);n=toNumber(n)||0,isObject(r)&&(f=!!r.leading,p="maxWait"in r,l=p?nativeMax(toNumber(r.maxWait)||0,n):l,v="trailing"in r?!!r.trailing:v);function m($){var S=o,V=a;return o=a=void 0,d=$,s=i.apply(V,S),s}function g($){return d=$,u=setTimeout(b,n),f?m($):s}function _($){var S=$-c,V=$-d,k=n-S;return p?nativeMin$1(k,l-V):k}function y($){var S=$-c,V=$-d;return c===void 0||S>=n||S<0||p&&V>=l}function b(){var $=now$1();if(y($))return x($);u=setTimeout(b,_($))}function x($){return u=void 0,v&&o?m($):(o=a=void 0,s)}function C(){u!==void 0&&clearTimeout(u),d=0,o=c=a=u=void 0}function w(){return u===void 0?s:x(now$1())}function E(){var $=now$1(),S=y($);if(o=arguments,a=this,c=$,S){if(u===void 0)return g(c);if(p)return clearTimeout(u),u=setTimeout(b,n),m(c)}return u===void 0&&(u=setTimeout(b,n)),s}return E.cancel=C,E.flush=w,E}var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty,defaults$3=baseRest(function(i,n){i=Object(i);var r=-1,o=n.length,a=o>2?n[2]:void 0;for(a&&isIterateeCall(n[0],n[1],a)&&(o=1);++r<o;)for(var l=n[r],s=keysIn(l),u=-1,c=s.length;++u<c;){var d=s[u],f=i[d];(f===void 0||eq(f,objectProto$3[d])&&!hasOwnProperty$3.call(i,d))&&(i[d]=l[d])}return i});const defaults$4=defaults$3;function assignMergeValue(i,n,r){(r!==void 0&&!eq(i[n],r)||r===void 0&&!(n in i))&&baseAssignValue(i,n,r)}function isArrayLikeObject(i){return isObjectLike(i)&&isArrayLike(i)}function safeGet(i,n){if(!(n==="constructor"&&typeof i[n]=="function")&&n!="__proto__")return i[n]}function toPlainObject(i){return copyObject(i,keysIn(i))}function baseMergeDeep(i,n,r,o,a,l,s){var u=safeGet(i,r),c=safeGet(n,r),d=s.get(c);if(d){assignMergeValue(i,r,d);return}var f=l?l(u,c,r+"",i,n,s):void 0,p=f===void 0;if(p){var v=isArray$1(c),m=!v&&isBuffer$1(c),g=!v&&!m&&isTypedArray$1(c);f=c,v||m||g?isArray$1(u)?f=u:isArrayLikeObject(u)?f=copyArray(u):m?(p=!1,f=cloneBuffer(c,!0)):g?(p=!1,f=cloneTypedArray(c,!0)):f=[]:isPlainObject(c)||isArguments$1(c)?(f=u,isArguments$1(u)?f=toPlainObject(u):(!isObject(u)||isFunction(u))&&(f=initCloneObject(c))):p=!1}p&&(s.set(c,f),a(f,c,o,l,s),s.delete(c)),assignMergeValue(i,r,f)}function baseMerge(i,n,r,o,a){i!==n&&baseFor$1(n,function(l,s){if(a||(a=new Stack),isObject(l))baseMergeDeep(i,n,s,r,baseMerge,o,a);else{var u=o?o(safeGet(i,s),l,s+"",i,n,a):void 0;u===void 0&&(u=l),assignMergeValue(i,s,u)}},keysIn)}function customDefaultsMerge(i,n,r,o,a,l){return isObject(i)&&isObject(n)&&(l.set(n,i),baseMerge(i,n,void 0,customDefaultsMerge,l),l.delete(n)),i}var mergeWith=createAssigner(function(i,n,r,o){baseMerge(i,n,r,o)});const mergeWith$1=mergeWith;var defaultsDeep=baseRest(function(i){return i.push(void 0,customDefaultsMerge),apply$1(mergeWith$1,void 0,i)});const defaultsDeep$1=defaultsDeep;function arrayIncludesWith(i,n,r){for(var o=-1,a=i==null?0:i.length;++o<a;)if(r(n,i[o]))return!0;return!1}var LARGE_ARRAY_SIZE$1=200;function baseDifference(i,n,r,o){var a=-1,l=arrayIncludes,s=!0,u=i.length,c=[],d=n.length;if(!u)return c;r&&(n=arrayMap(n,baseUnary(r))),o?(l=arrayIncludesWith,s=!1):n.length>=LARGE_ARRAY_SIZE$1&&(l=cacheHas,s=!1,n=new SetCache(n));e:for(;++a<u;){var f=i[a],p=r==null?f:r(f);if(f=o||f!==0?f:0,s&&p===p){for(var v=d;v--;)if(n[v]===p)continue e;c.push(f)}else l(n,p,o)||c.push(f)}return c}var difference=baseRest(function(i,n){return isArrayLikeObject(i)?baseDifference(i,baseFlatten(n,1,isArrayLikeObject,!0)):[]});const difference$1=difference;function baseMap(i,n){var r=-1,o=isArrayLike(i)?Array(i.length):[];return baseEach$1(i,function(a,l,s){o[++r]=n(a,l,s)}),o}var objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty,groupBy=createAggregator(function(i,n,r){hasOwnProperty$2.call(i,r)?i[r].push(n):baseAssignValue(i,r,[n])});const groupBy$1=groupBy;function baseGt(i,n){return i>n}var objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseHas(i,n){return i!=null&&hasOwnProperty$1.call(i,n)}function has(i,n){return i!=null&&hasPath(i,n,baseHas)}var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(i){if(i==null)return!0;if(isArrayLike(i)&&(isArray$1(i)||typeof i=="string"||typeof i.splice=="function"||isBuffer$1(i)||isTypedArray$1(i)||isArguments$1(i)))return!i.length;var n=getTag$1(i);if(n==mapTag||n==setTag)return!i.size;if(isPrototype(i))return!baseKeys(i).length;for(var r in i)if(hasOwnProperty.call(i,r))return!1;return!0}function isEqual(i,n){return baseIsEqual(i,n)}var numberTag="[object Number]";function isNumber(i){return typeof i=="number"||isObjectLike(i)&&baseGetTag(i)==numberTag}var lowerFirst=createCaseFirst("toLowerCase");const lowerFirst$1=lowerFirst;function baseExtremum(i,n,r){for(var o=-1,a=i.length;++o<a;){var l=i[o],s=n(l);if(s!=null&&(u===void 0?s===s&&!isSymbol(s):r(s,u)))var u=s,c=l}return c}function max(i){return i&&i.length?baseExtremum(i,identity,baseGt):void 0}var merge=createAssigner(function(i,n,r){baseMerge(i,n,r)});const merge$1=merge;function baseSet(i,n,r,o){if(!isObject(i))return i;n=castPath(n,i);for(var a=-1,l=n.length,s=l-1,u=i;u!=null&&++a<l;){var c=toKey(n[a]),d=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return i;if(a!=s){var f=u[c];d=o?o(f,c,u):void 0,d===void 0&&(d=isObject(f)?f:isIndex(n[a+1])?[]:{})}assignValue(u,c,d),u=u[c]}return i}function basePickBy(i,n,r){for(var o=-1,a=n.length,l={};++o<a;){var s=n[o],u=baseGet(i,s);r(u,s)&&baseSet(l,castPath(s,i),u)}return l}function baseSortBy(i,n){var r=i.length;for(i.sort(n);r--;)i[r]=i[r].value;return i}function compareAscending(i,n){if(i!==n){var r=i!==void 0,o=i===null,a=i===i,l=isSymbol(i),s=n!==void 0,u=n===null,c=n===n,d=isSymbol(n);if(!u&&!d&&!l&&i>n||l&&s&&c&&!u&&!d||o&&s&&c||!r&&c||!a)return 1;if(!o&&!l&&!d&&i<n||d&&r&&a&&!o&&!l||u&&r&&a||!s&&a||!c)return-1}return 0}function compareMultiple(i,n,r){for(var o=-1,a=i.criteria,l=n.criteria,s=a.length,u=r.length;++o<s;){var c=compareAscending(a[o],l[o]);if(c){if(o>=u)return c;var d=r[o];return c*(d=="desc"?-1:1)}}return i.index-n.index}function baseOrderBy(i,n,r){n.length?n=arrayMap(n,function(l){return isArray$1(l)?function(s){return baseGet(s,l.length===1?l[0]:l)}:l}):n=[identity];var o=-1;n=arrayMap(n,baseUnary(baseIteratee));var a=baseMap(i,function(l,s,u){var c=arrayMap(n,function(d){return d(l)});return{criteria:c,index:++o,value:l}});return baseSortBy(a,function(l,s){return compareMultiple(l,s,r)})}function basePick(i,n){return basePickBy(i,n,function(r,o){return hasIn(i,o)})}var pick=flatRest(function(i,n){return i==null?{}:basePick(i,n)});const pick$1=pick;var sortBy=baseRest(function(i,n){if(i==null)return[];var r=n.length;return r>1&&isIterateeCall(i,n[0],n[1])?n=[]:r>2&&isIterateeCall(n[0],n[1],n[2])&&(n=[n[0]]),baseOrderBy(i,baseFlatten(n,1),[])});const sortBy$1=sortBy;var MAX_ARRAY_LENGTH$1=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH$1-1,nativeFloor=Math.floor,nativeMin=Math.min;function baseSortedIndexBy(i,n,r,o){var a=0,l=i==null?0:i.length;if(l===0)return 0;n=r(n);for(var s=n!==n,u=n===null,c=isSymbol(n),d=n===void 0;a<l;){var f=nativeFloor((a+l)/2),p=r(i[f]),v=p!==void 0,m=p===null,g=p===p,_=isSymbol(p);if(s)var y=o||g;else d?y=g&&(o||v):u?y=g&&v&&(o||!m):c?y=g&&v&&!m&&(o||!_):m||_?y=!1:y=o?p<=n:p<n;y?a=f+1:l=f}return nativeMin(l,MAX_ARRAY_INDEX)}var MAX_ARRAY_LENGTH=4294967295,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;function baseSortedIndex(i,n,r){var o=0,a=i==null?o:i.length;if(typeof n=="number"&&n===n&&a<=HALF_MAX_ARRAY_LENGTH){for(;o<a;){var l=o+a>>>1,s=i[l];s!==null&&!isSymbol(s)&&(r?s<=n:s<n)?o=l+1:a=l}return a}return baseSortedIndexBy(i,n,identity,r)}function sortedIndex(i,n){return baseSortedIndex(i,n)}function sortedIndexBy(i,n,r){return baseSortedIndexBy(i,n,baseIteratee(r))}var startCase=createCompounder(function(i,n,r){return i+(r?" ":"")+upperFirst$1(n)});const startCase$1=startCase;var FUNC_ERROR_TEXT="Expected a function";function throttle(i,n,r){var o=!0,a=!0;if(typeof i!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),debounce$1(i,n,{leading:o,maxWait:n,trailing:a})}var INFINITY=1/0,createSet=Set$2&&1/setToArray(new Set$2([,-0]))[1]==INFINITY?function(i){return new Set$2(i)}:noop$1;const createSet$1=createSet;var LARGE_ARRAY_SIZE=200;function baseUniq(i,n,r){var o=-1,a=arrayIncludes,l=i.length,s=!0,u=[],c=u;if(r)s=!1,a=arrayIncludesWith;else if(l>=LARGE_ARRAY_SIZE){var d=n?null:createSet$1(i);if(d)return setToArray(d);s=!1,a=cacheHas,c=new SetCache}else c=n?[]:u;e:for(;++o<l;){var f=i[o],p=n?n(f):f;if(f=r||f!==0?f:0,s&&p===p){for(var v=c.length;v--;)if(c[v]===p)continue e;n&&c.push(p),u.push(f)}else a(c,p,r)||(c!==u&&c.push(p),u.push(f))}return u}var union=baseRest(function(i){return baseUniq(baseFlatten(i,1,isArrayLikeObject,!0))});const union$1=union;function uniq(i){return i&&i.length?baseUniq(i):[]}function apply(i,n,r){if(r)switch(r.length){case 0:return i.call(n);case 1:return i.call(n,r[0]);case 2:return i.call(n,r[0],r[1]);case 3:return i.call(n,r[0],r[1],r[2]);case 4:return i.call(n,r[0],r[1],r[2],r[3]);case 5:return i.call(n,r[0],r[1],r[2],r[3],r[4]);case 6:return i.call(n,r[0],r[1],r[2],r[3],r[4],r[5]);default:return i.apply(n,r)}return i.call(n)}function call$1(i,n,...r){return apply(i,n,r)}function isAsyncLike(i){return typeof i=="object"&&i.then&&typeof i.then=="function"}function isAsync(i){return i!=null&&(i instanceof Promise||isAsyncLike(i))}function toAsyncBoolean(...i){const n=[];if(i.forEach(o=>{Array.isArray(o)?n.push(...o):n.push(o)}),n.some(o=>isAsync(o))){const o=n.map(a=>isAsync(a)?a:Promise.resolve(a!==!1));return Promise.all(o).then(a=>a.reduce((l,s)=>s!==!1&&l,!0))}return n.every(o=>o!==!1)}function toDeferredBoolean(...i){const n=toAsyncBoolean(i);return typeof n=="boolean"?Promise.resolve(n):n}function call(i,n){const r=[];for(let o=0;o<i.length;o+=2){const a=i[o],l=i[o+1],s=Array.isArray(n)?n:[n],u=apply(a,l,s);r.push(u)}return toAsyncBoolean(r)}class Events{constructor(){this.listeners={}}on(n,r,o){return r==null?this:(this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(r,o),this)}once(n,r,o){const a=(...l)=>(this.off(n,a),call([r,o],l));return this.on(n,a,this)}off(n,r,o){if(!(n||r||o))return this.listeners={},this;const a=this.listeners;return(n?[n]:Object.keys(a)).forEach(s=>{const u=a[s];if(u){if(!(r||o)){delete a[s];return}for(let c=u.length-2;c>=0;c-=2)r&&u[c]!==r||o&&u[c+1]!==o||u.splice(c,2)}}),this}trigger(n,...r){let o=!0;if(n!=="*"){const l=this.listeners[n];l!=null&&(o=call([...l],r))}const a=this.listeners["*"];return a!=null?toAsyncBoolean([o,call([...a],[n,...r])]):o}emit(n,...r){return this.trigger(n,...r)}}function applyMixins(i,...n){n.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(o=>{o!=="constructor"&&Object.defineProperty(i.prototype,o,Object.getOwnPropertyDescriptor(r.prototype,o))})})}const extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=n[r])};function inherit(i,n){extendStatics(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}class A{}const isNativeClass=/^\s*class\s+/.test(`${A}`)||/^\s*class\s*\{/.test(`${class{}}`);function createClass(i,n){let r;return isNativeClass?r=class extends n{}:(r=function(){return n.apply(this,arguments)},inherit(r,n)),Object.defineProperty(r,"name",{value:i}),r}function isMaliciousProp(i){return i==="__proto__"}function getByPath(i,n,r="/"){let o;const a=Array.isArray(n)?n:n.split(r);if(a.length)for(o=i;a.length;){const l=a.shift();if(Object(o)===o&&l&&l in o)o=o[l];else return}return o}function setByPath(i,n,r,o="/"){const a=Array.isArray(n)?n:n.split(o),l=a.pop();if(l&&!isMaliciousProp(l)){let s=i;a.forEach(u=>{isMaliciousProp(u)||(s[u]==null&&(s[u]={}),s=s[u])}),s[l]=r}return i}function unsetByPath(i,n,r="/"){const o=Array.isArray(n)?n.slice():n.split(r),a=o.pop();if(a)if(o.length>0){const l=getByPath(i,o);l&&delete l[a]}else delete i[a];return i}var __decorate$u=globalThis&&globalThis.__decorate||function(i,n,r,o){var a=arguments.length,l=a<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,n,r,o);else for(var u=i.length-1;u>=0;u--)(s=i[u])&&(l=(a<3?s(l):a>3?s(n,r,l):s(n,r))||l);return a>3&&l&&Object.defineProperty(n,r,l),l};class Basecoat extends Events{dispose(){this.off()}}__decorate$u([Disposable.dispose()],Basecoat.prototype,"dispose",null),function(i){i.dispose=Disposable.dispose}(Basecoat||(Basecoat={})),applyMixins(Basecoat,Disposable);const cacheStringFunction=i=>{const n=Object.create(null);return r=>n[r]||(n[r]=i(r))},kebabCase=cacheStringFunction(i=>i.replace(/\B([A-Z])/g,"-$1").toLowerCase()),pascalCase=cacheStringFunction(i=>startCase$1(camelCase$1(i)).replace(/ /g,""));function hashcode(i){let n=2166136261,r=!1,o=i;for(let a=0,l=o.length;a<l;a+=1){let s=o.charCodeAt(a);s>127&&!r&&(o=unescape(encodeURIComponent(o)),s=o.charCodeAt(a),r=!0),n^=s,n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24)}return n>>>0}function uuid(){let i="";const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let r=0,o=n.length;r<o;r+=1){const a=n[r],l=Math.random()*16|0,s=a==="x"?l:a==="y"?l&3|8:a;i+=s.toString(16)}return i}function getSpellingSuggestion(i,n,r){const o=Math.min(2,Math.floor(i.length*.34));let a=Math.floor(i.length*.4)+1,l,s=!1;const u=i.toLowerCase();for(const c of n){const d=r(c);if(d!==void 0&&Math.abs(d.length-u.length)<=o){const f=d.toLowerCase();if(f===u){if(d===i)continue;return c}if(s||d.length<3)continue;const p=levenshteinWithMax(u,f,a-1);if(p===void 0)continue;p<3?(s=!0,l=c):(a=p,l=c)}}return l}function levenshteinWithMax(i,n,r){let o=new Array(n.length+1),a=new Array(n.length+1);const l=r+1;for(let u=0;u<=n.length;u+=1)o[u]=u;for(let u=1;u<=i.length;u+=1){const c=i.charCodeAt(u-1),d=u>r?u-r:1,f=n.length>r+u?r+u:n.length;a[0]=u;let p=u;for(let m=1;m<d;m+=1)a[m]=l;for(let m=d;m<=f;m+=1){const g=c===n.charCodeAt(m-1)?o[m-1]:Math.min(o[m]+1,a[m-1]+1,o[m-1]+2);a[m]=g,p=Math.min(p,g)}for(let m=f+1;m<=n.length;m+=1)a[m]=l;if(p>r)return;const v=o;o=a,a=v}const s=o[n.length];return s>r?void 0:s}function isPercentage(i){return typeof i=="string"&&i.slice(-1)==="%"}function normalizePercentage(i,n){if(i==null)return 0;let r;if(typeof i=="string"){if(r=parseFloat(i),isPercentage(i)&&(r/=100,Number.isFinite(r)))return r*n}else r=i;return Number.isFinite(r)?r>0&&r<1?r*n:r:0}function normalizeSides(i){if(typeof i=="object"){let r=0,o=0,a=0,l=0;return i.vertical!=null&&Number.isFinite(i.vertical)&&(o=l=i.vertical),i.horizontal!=null&&Number.isFinite(i.horizontal)&&(a=r=i.horizontal),i.left!=null&&Number.isFinite(i.left)&&(r=i.left),i.top!=null&&Number.isFinite(i.top)&&(o=i.top),i.right!=null&&Number.isFinite(i.right)&&(a=i.right),i.bottom!=null&&Number.isFinite(i.bottom)&&(l=i.bottom),{top:o,right:a,bottom:l,left:r}}let n=0;return i!=null&&Number.isFinite(i)&&(n=i),{top:n,right:n,bottom:n,left:n}}let _IS_MAC=!1,_IS_IOS=!1,_IS_WINDOWS=!1,_IS_IE=!1,_IS_IE11=!1,_IS_EDGE=!1,_IS_NETSCAPE=!1,_IS_CHROME_APP=!1,_IS_CHROME=!1,_IS_OPERA=!1,_IS_FIREFOX=!1,_IS_SAFARI=!1,_SUPPORT_TOUCH=!1,_SUPPORT_POINTER=!1,_SUPPORT_PASSIVE=!1,_NO_FOREIGNOBJECT=!1;if(typeof navigator=="object"){const i=navigator.userAgent;_IS_MAC=i.indexOf("Macintosh")>=0,_IS_IOS=!!i.match(/(iPad|iPhone|iPod)/g),_IS_WINDOWS=i.indexOf("Windows")>=0,_IS_IE=i.indexOf("MSIE")>=0,_IS_IE11=!!i.match(/Trident\/7\./),_IS_EDGE=!!i.match(/Edge\//),_IS_NETSCAPE=i.indexOf("Mozilla/")>=0&&i.indexOf("MSIE")<0&&i.indexOf("Edge/")<0,_IS_CHROME=i.indexOf("Chrome/")>=0&&i.indexOf("Edge/")<0,_IS_OPERA=i.indexOf("Opera/")>=0||i.indexOf("OPR/")>=0,_IS_FIREFOX=i.indexOf("Firefox/")>=0,_IS_SAFARI=i.indexOf("AppleWebKit/")>=0&&i.indexOf("Chrome/")<0&&i.indexOf("Edge/")<0,typeof document=="object"&&(_NO_FOREIGNOBJECT=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||i.indexOf("Opera/")>=0)}if(typeof window=="object"&&(_IS_CHROME_APP=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,_SUPPORT_POINTER=window.PointerEvent!=null&&!_IS_MAC),typeof document=="object"){_SUPPORT_TOUCH="ontouchstart"in document.documentElement;try{const i=Object.defineProperty({},"passive",{get(){_SUPPORT_PASSIVE=!0}}),n=document.createElement("div");n.addEventListener&&n.addEventListener("click",()=>{},i)}catch{}}var Platform;(function(i){i.IS_MAC=_IS_MAC,i.IS_IOS=_IS_IOS,i.IS_WINDOWS=_IS_WINDOWS,i.IS_IE=_IS_IE,i.IS_IE11=_IS_IE11,i.IS_EDGE=_IS_EDGE,i.IS_NETSCAPE=_IS_NETSCAPE,i.IS_CHROME_APP=_IS_CHROME_APP,i.IS_CHROME=_IS_CHROME,i.IS_OPERA=_IS_OPERA,i.IS_FIREFOX=_IS_FIREFOX,i.IS_SAFARI=_IS_SAFARI,i.SUPPORT_TOUCH=_SUPPORT_TOUCH,i.SUPPORT_POINTER=_SUPPORT_POINTER,i.SUPPORT_PASSIVE=_SUPPORT_PASSIVE,i.NO_FOREIGNOBJECT=_NO_FOREIGNOBJECT,i.SUPPORT_FOREIGNOBJECT=!i.NO_FOREIGNOBJECT})(Platform||(Platform={})),function(i){function n(){const l=window.module;return l!=null&&l.hot!=null&&l.hot.status!=null?l.hot.status():"unkonwn"}i.getHMRStatus=n;function r(){return n()==="apply"}i.isApplyingHMR=r;const o={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function a(l){const s=document.createElement(o[l]||"div"),u=`on${l}`;let c=u in s;return c||(s.setAttribute(u,"return;"),c=typeof s[u]=="function"),c}i.isEventSupported=a}(Platform||(Platform={}));const rclass=/[\t\r\n\f]/g,rnotwhite=/\S+/g,fillSpaces=i=>` ${i} `;function getClass(i){return i&&i.getAttribute&&i.getAttribute("class")||""}function hasClass(i,n){if(i==null||n==null)return!1;const r=fillSpaces(getClass(i)),o=fillSpaces(n);return i.nodeType===1?r.replace(rclass," ").includes(o):!1}function addClass(i,n){if(!(i==null||n==null)){if(typeof n=="function")return addClass(i,n(getClass(i)));if(typeof n=="string"&&i.nodeType===1){const r=n.match(rnotwhite)||[],o=fillSpaces(getClass(i)).replace(rclass," ");let a=r.reduce((l,s)=>l.indexOf(fillSpaces(s))<0?`${l}${s} `:l,o);a=a.trim(),o!==a&&i.setAttribute("class",a)}}}function removeClass(i,n){if(i!=null){if(typeof n=="function")return removeClass(i,n(getClass(i)));if((!n||typeof n=="string")&&i.nodeType===1){const r=(n||"").match(rnotwhite)||[],o=fillSpaces(getClass(i)).replace(rclass," ");let a=r.reduce((l,s)=>{const u=fillSpaces(s);return l.indexOf(u)>-1?l.replace(u," "):l},o);a=n?a.trim():"",o!==a&&i.setAttribute("class",a)}}}function toggleClass(i,n,r){if(!(i==null||n==null)){if(r!=null&&typeof n=="string"){r?addClass(i,n):removeClass(i,n);return}if(typeof n=="function")return toggleClass(i,n(getClass(i),r),r);typeof n=="string"&&(n.match(rnotwhite)||[]).forEach(a=>{hasClass(i,a)?removeClass(i,a):addClass(i,a)})}}let idCounter=0;function uniqueId(){return idCounter+=1,`v${idCounter}`}function ensureId(i){return(i.id==null||i.id==="")&&(i.id=uniqueId()),i.id}function isSVGGraphicsElement(i){return i==null?!1:typeof i.getScreenCTM=="function"&&i instanceof SVGElement}const ns={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},svgVersion="1.1";function createElement(i,n=document){return n.createElement(i)}function createElementNS(i,n=ns.xhtml,r=document){return r.createElementNS(n,i)}function createSvgElement(i,n=document){return createElementNS(i,ns.svg,n)}function createSvgDocument(i){if(i){const r=`<svg xmlns="${ns.svg}" xmlns:xlink="${ns.xlink}" version="${svgVersion}">${i}</svg>`,{documentElement:o}=parseXML(r,{async:!1});return o}const n=document.createElementNS(ns.svg,"svg");return n.setAttributeNS(ns.xmlns,"xmlns:xlink",ns.xlink),n.setAttribute("version",svgVersion),n}function parseXML(i,n={}){let r;try{const o=new DOMParser;if(n.async!=null){const a=o;a.async=n.async}r=o.parseFromString(i,n.mimeType||"text/xml")}catch{r=void 0}if(!r||r.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${i}`);return r}function tagName(i,n=!0){const r=i.nodeName;return n?r.toLowerCase():r.toUpperCase()}function index$1(i){let n=0,r=i.previousSibling;for(;r;)r.nodeType===1&&(n+=1),r=r.previousSibling;return n}function find(i,n){return i.querySelectorAll(n)}function findOne(i,n){return i.querySelector(n)}function findParentByClass(i,n,r){const o=i.ownerSVGElement;let a=i.parentNode;for(;a&&a!==r&&a!==o;){if(hasClass(a,n))return a;a=a.parentNode}return null}function contains(i,n){const r=n&&n.parentNode;return i===r||!!(r&&r.nodeType===1&&i.compareDocumentPosition(r)&16)}function remove(i){i&&(Array.isArray(i)?i:[i]).forEach(r=>{r.parentNode&&r.parentNode.removeChild(r)})}function empty(i){for(;i.firstChild;)i.removeChild(i.firstChild)}function append(i,n){(Array.isArray(n)?n:[n]).forEach(o=>{o!=null&&i.appendChild(o)})}function prepend(i,n){const r=i.firstChild;return r?before(r,n):append(i,n)}function before(i,n){const r=i.parentNode;r&&(Array.isArray(n)?n:[n]).forEach(a=>{a!=null&&r.insertBefore(a,i)})}function after(i,n){const r=i.parentNode;r&&(Array.isArray(n)?n:[n]).forEach(a=>{a!=null&&r.insertBefore(a,i.nextSibling)})}function appendTo(i,n){n!=null&&n.appendChild(i)}function isHTMLElement(i){try{return i instanceof HTMLElement}catch{return typeof i=="object"&&i.nodeType===1&&typeof i.style=="object"&&typeof i.ownerDocument=="object"}}function children(i,n){const r=[];let o=i.firstChild;for(;o;o=o.nextSibling)o.nodeType===1&&(!n||hasClass(o,n))&&r.push(o);return r}const CASE_SENSITIVE_ATTR=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust","gradientUnits"];function getAttribute(i,n){return i.getAttribute(n)}function removeAttribute(i,n){const r=qualifyAttr(n);r.ns?i.hasAttributeNS(r.ns,r.local)&&i.removeAttributeNS(r.ns,r.local):i.hasAttribute(n)&&i.removeAttribute(n)}function setAttribute(i,n,r){if(r==null)return removeAttribute(i,n);const o=qualifyAttr(n);o.ns&&typeof r=="string"?i.setAttributeNS(o.ns,n,r):n==="id"?i.id=`${r}`:i.setAttribute(n,`${r}`)}function setAttributes(i,n){Object.keys(n).forEach(r=>{setAttribute(i,r,n[r])})}function attr(i,n,r){if(n==null){const o=i.attributes,a={};for(let l=0;l<o.length;l+=1)a[o[l].name]=o[l].value;return a}if(typeof n=="string"&&r===void 0)return i.getAttribute(n);typeof n=="object"?setAttributes(i,n):setAttribute(i,n,r)}function qualifyAttr(i){if(i.indexOf(":")!==-1){const n=i.split(":");return{ns:ns[n[0]],local:n[1]}}return{ns:null,local:i}}function kebablizeAttrs(i){const n={};return Object.keys(i).forEach(r=>{const o=CASE_SENSITIVE_ATTR.includes(r)?r:kebabCase(r);n[o]=i[r]}),n}function styleToObject(i){const n={};return i.split(";").forEach(o=>{const a=o.trim();if(a){const l=a.split("=");l.length&&(n[l[0].trim()]=l[1]?l[1].trim():"")}}),n}function mergeAttrs(i,n){return Object.keys(n).forEach(r=>{if(r==="class")i[r]=i[r]?`${i[r]} ${n[r]}`:n[r];else if(r==="style"){const o=typeof i[r]=="object",a=typeof n[r]=="object";let l,s;o&&a?(l=i[r],s=n[r]):o?(l=i[r],s=styleToObject(n[r])):a?(l=styleToObject(i[r]),s=n[r]):(l=styleToObject(i[r]),s=styleToObject(n[r])),i[r]=mergeAttrs(l,s)}else i[r]=n[r]}),i}function annotate(i,n,r={}){const o=r.offset||0,a=[],l=[];let s,u,c=null;for(let d=0;d<i.length;d+=1){s=l[d]=i[d];for(let f=0,p=n.length;f<p;f+=1){const v=n[f],m=v.start+o,g=v.end+o;d>=m&&d<g&&(typeof s=="string"?s=l[d]={t:i[d],attrs:v.attrs}:s.attrs=mergeAttrs(mergeAttrs({},s.attrs),v.attrs),r.includeAnnotationIndices&&(s.annotations==null&&(s.annotations=[]),s.annotations.push(f)))}u=l[d-1],u?isObject(s)&&isObject(u)?(c=c,JSON.stringify(s.attrs)===JSON.stringify(u.attrs)?c.t+=s.t:(a.push(c),c=s)):isObject(s)||isObject(u)?(c=c,a.push(c),c=s):c=(c||"")+s:c=s}return c!=null&&a.push(c),a}function sanitize(i){return i.replace(/ /g," ")}var DataUri;(function(i){function n(d){const f="data:";return d.substr(0,f.length)===f}i.isDataUrl=n;function r(d,f){if(!d||n(d)){setTimeout(()=>f(null,d));return}const p=()=>{f(new Error(`Failed to load image: ${d}`))},v=window.FileReader?g=>{if(g.status===200){const _=new FileReader;_.onload=y=>{const b=y.target.result;f(null,b)},_.onerror=p,_.readAsDataURL(g.response)}else p()}:g=>{const _=y=>{const x=[];for(let C=0;C<y.length;C+=32768)x.push(String.fromCharCode.apply(null,y.subarray(C,C+32768)));return x.join("")};if(g.status===200){let y=d.split(".").pop()||"png";y==="svg"&&(y="svg+xml");const b=`data:image/${y};base64,`,x=new Uint8Array(g.response),C=b+btoa(_(x));f(null,C)}else p()},m=new XMLHttpRequest;m.responseType=window.FileReader?"blob":"arraybuffer",m.open("GET",d,!0),m.addEventListener("error",p),m.addEventListener("load",()=>v(m)),m.send()}i.imageToDataUri=r;function o(d){let f=d.replace(/\s/g,"");f=decodeURIComponent(f);const p=f.indexOf(","),v=f.slice(0,p),m=v.split(":")[1].split(";")[0],g=f.slice(p+1);let _;v.indexOf("base64")>=0?_=atob(g):_=unescape(encodeURIComponent(g));const y=new Uint8Array(_.length);for(let b=0;b<_.length;b+=1)y[b]=_.charCodeAt(b);return new Blob([y],{type:m})}i.dataUriToBlob=o;function a(d,f){const p=window.navigator.msSaveBlob;if(p)p(d,f);else{const v=window.URL.createObjectURL(d),m=document.createElement("a");m.href=v,m.download=f,document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(v)}}i.downloadBlob=a;function l(d,f){const p=o(d);a(p,f)}i.downloadDataUri=l;function s(d){const f=d.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return f&&f[2]?f[2].replace(/\s+/," ").split(" "):null}function u(d){const f=parseFloat(d);return Number.isNaN(f)?null:f}function c(d,f={}){let p=null;const v=C=>(p==null&&(p=s(d)),p!=null?u(p[C]):null),m=C=>{const w=d.match(C);return w&&w[2]?u(w[2]):null};let g=f.width;if(g==null&&(g=m(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=v(2)),g==null)throw new Error("Can not parse width from svg string");let _=f.height;if(_==null&&(_=m(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),_==null&&(_=v(3)),_==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(d).replace(/'/g,"%27").replace(/"/g,"%22")}`}i.svgToDataUrl=c})(DataUri||(DataUri={}));let millimeterSize;const supportedUnits={px(i){return i},mm(i){return millimeterSize*i},cm(i){return millimeterSize*i*10},in(i){return millimeterSize*i*25.4},pt(i){return millimeterSize*(25.4*i/72)},pc(i){return millimeterSize*(25.4*i/6)}};var Unit;(function(i){function n(o,a,l){const s=document.createElement("div"),u=s.style;u.display="inline-block",u.position="absolute",u.left="-15000px",u.top="-15000px",u.width=o+(l||"px"),u.height=a+(l||"px"),document.body.appendChild(s);const c=s.getBoundingClientRect(),d={width:c.width||0,height:c.height||0};return document.body.removeChild(s),d}i.measure=n;function r(o,a){millimeterSize==null&&(millimeterSize=n("1","1","mm").width);const l=a?supportedUnits[a]:null;return l?l(o):o}i.toPx=r})(Unit||(Unit={}));const hyphenPattern=/-(.)/g;function camelize(i){return i.replace(hyphenPattern,(n,r)=>r.toUpperCase())}const memoized={},prefixes=["webkit","ms","moz","o"],testStyle=typeof document<"u"?document.createElement("div").style:{};function getWithPrefix(i){for(let n=0;n<prefixes.length;n+=1){const r=prefixes[n]+i;if(r in testStyle)return r}return null}function getVendorPrefixedName(i){const n=camelize(i);if(memoized[n]==null){const r=n.charAt(0).toUpperCase()+n.slice(1);memoized[n]=n in testStyle?n:getWithPrefix(r)}return memoized[n]}function getComputedStyle$1(i,n){const r=i.ownerDocument&&i.ownerDocument.defaultView&&i.ownerDocument.defaultView.opener?i.ownerDocument.defaultView.getComputedStyle(i,null):window.getComputedStyle(i,null);return r&&n?r.getPropertyValue(n)||r[n]:r}const numericProps={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function isCSSVariable(i){return/^--/.test(i)}function computeStyle(i,n,r){const o=window.getComputedStyle(i,null);return r?o.getPropertyValue(n)||void 0:o[n]||i.style[n]}function getSuffixedValue(i,n){return!numericProps[i]&&typeof n=="number"?`${n}px`:n}function css(i,n,r){if(typeof n=="string"){const o=isCSSVariable(n);if(o||(n=getVendorPrefixedName(n)),r===void 0)return computeStyle(i,n,o);o||(r=getSuffixedValue(n,r));const a=i.style;o?a.setProperty(n,r):a[n]=r;return}for(const o in n)css(i,o,n[o])}const dataset=new WeakMap;function getData(i,n){const r=camelCase$1(n),o=dataset.get(i);if(o)return o[r]}function setData(i,n,r){const o=camelCase$1(n),a=dataset.get(i);a?a[o]=r:dataset.set(i,{[o]:r})}function data(i,n,r){if(!n){const o={};return Object.keys(dataset).forEach(a=>{o[a]=getData(i,a)}),o}if(typeof n=="string"){if(r===void 0)return getData(i,n);setData(i,n,r);return}for(const o in n)data(i,o,n[o])}const propMap={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function prop(i,n,r){if(n){if(typeof n=="string"){if(n=propMap[n]||n,arguments.length<3)return i[n];i[n]=r;return}for(const o in n)prop(i,o,n[o])}}class Vector{get[Symbol.toStringTag](){return Vector.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(n){this.node.id=n}constructor(n,r,o){if(!n)throw new TypeError("Invalid element to create vector");let a;if(Vector.isVector(n))a=n.node;else if(typeof n=="string")if(n.toLowerCase()==="svg")a=createSvgDocument();else if(n[0]==="<"){const l=createSvgDocument(n);a=document.importNode(l.firstChild,!0)}else a=document.createElementNS(ns.svg,n);else a=n;this.node=a,r&&this.setAttributes(r),o&&this.append(o)}transform(n,r){return n==null?transform(this.node):(transform(this.node,n,r),this)}translate(n,r=0,o={}){return n==null?translate(this.node):(translate(this.node,n,r,o),this)}rotate(n,r,o,a={}){return n==null?rotate$1(this.node):(rotate$1(this.node,n,r,o,a),this)}scale(n,r){return n==null?scale(this.node):(scale(this.node,n,r),this)}getTransformToElement(n){const r=Vector.toNode(n);return getTransformToElement(this.node,r)}removeAttribute(n){return removeAttribute(this.node,n),this}getAttribute(n){return getAttribute(this.node,n)}setAttribute(n,r){return setAttribute(this.node,n,r),this}setAttributes(n){return setAttributes(this.node,n),this}attr(n,r){return n==null?attr(this.node):typeof n=="string"&&r===void 0?attr(this.node,n):(typeof n=="object"?attr(this.node,n):attr(this.node,n,r),this)}svg(){return this.node instanceof SVGSVGElement?this:Vector.create(this.node.ownerSVGElement)}defs(){const n=this.svg()||this,r=n.node.getElementsByTagName("defs")[0];return r?Vector.create(r):Vector.create("defs").appendTo(n)}text(n,r={}){return text$1(this.node,n,r),this}tagName(){return tagName(this.node)}clone(){return Vector.create(this.node.cloneNode(!0))}remove(){return remove(this.node),this}empty(){return empty(this.node),this}append(n){return append(this.node,Vector.toNodes(n)),this}appendTo(n){return appendTo(this.node,Vector.isVector(n)?n.node:n),this}prepend(n){return prepend(this.node,Vector.toNodes(n)),this}before(n){return before(this.node,Vector.toNodes(n)),this}replace(n){return this.node.parentNode&&this.node.parentNode.replaceChild(Vector.toNode(n),this.node),Vector.create(n)}first(){return this.node.firstChild?Vector.create(this.node.firstChild):null}last(){return this.node.lastChild?Vector.create(this.node.lastChild):null}get(n){const r=this.node.childNodes[n];return r?Vector.create(r):null}indexOf(n){return Array.prototype.slice.call(this.node.childNodes).indexOf(Vector.toNode(n))}find(n){const r=[],o=find(this.node,n);if(o)for(let a=0,l=o.length;a<l;a+=1)r.push(Vector.create(o[a]));return r}findOne(n){const r=findOne(this.node,n);return r?Vector.create(r):null}findParentByClass(n,r){const o=findParentByClass(this.node,n,r);return o?Vector.create(o):null}matches(n){const r=this.node;this.node.matches;const o=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||null;return o&&o.call(r,n)}contains(n){return contains(this.node,Vector.isVector(n)?n.node:n)}wrap(n){const r=Vector.create(n),o=this.node.parentNode;return o!=null&&o.insertBefore(r.node,this.node),r.append(this)}parent(n){let r=this;if(r.node.parentNode==null)return null;if(r=Vector.create(r.node.parentNode),n==null)return r;do if(typeof n=="string"?r.matches(n):r instanceof n)return r;while(r=Vector.create(r.node.parentNode));return r}children(){const n=this.node.childNodes,r=[];for(let o=0;o<n.length;o+=1)n[o].nodeType===1&&r.push(Vector.create(n[o]));return r}eachChild(n,r){const o=this.children();for(let a=0,l=o.length;a<l;a+=1)n.call(o[a],o[a],a,o),r&&o[a].eachChild(n,r);return this}index(){return index$1(this.node)}hasClass(n){return hasClass(this.node,n)}addClass(n){return addClass(this.node,n),this}removeClass(n){return removeClass(this.node,n),this}toggleClass(n,r){return toggleClass(this.node,n,r),this}toLocalPoint(n,r){return toLocalPoint(this.node,n,r)}sample(n=1){return this.node instanceof SVGPathElement?sample(this.node,n):[]}toPath(){return Vector.create(toPath(this.node))}toPathData(){return toPathData(this.node)}}(function(i){i.toStringTag=`X6.${i.name}`;function n(s){if(s==null)return!1;if(s instanceof i)return!0;const u=s[Symbol.toStringTag],c=s;return(u==null||u===i.toStringTag)&&c.node instanceof SVGElement&&typeof c.sample=="function"&&typeof c.toPath=="function"}i.isVector=n;function r(s,u,c){return new i(s,u,c)}i.create=r;function o(s){if(s[0]==="<"){const u=createSvgDocument(s),c=[];for(let d=0,f=u.childNodes.length;d<f;d+=1){const p=u.childNodes[d];c.push(r(document.importNode(p,!0)))}return c}return[r(s)]}i.createVectors=o;function a(s){return n(s)?s.node:s}i.toNode=a;function l(s){return Array.isArray(s)?s.map(u=>a(u)):[a(s)]}i.toNodes=l})(Vector||(Vector={}));function createTextPathNode(i,n){const r=Vector.create(n),o=Vector.create("textPath"),a=i.d;if(a&&i["xlink:href"]===void 0){const l=Vector.create("path").attr("d",a).appendTo(r.defs());o.attr("xlink:href",`#${l.id}`)}return typeof i=="object"&&o.attr(i),o.node}function annotateTextLine(i,n,r){const o=r.eol,a=r.baseSize,l=r.lineHeight;let s=0,u;const c={},d=n.length-1;for(let f=0;f<=d;f+=1){let p=n[f],v=null;if(typeof p=="object"){const m=p.attrs,g=Vector.create("tspan",m);u=g.node;let _=p.t;o&&f===d&&(_+=o),u.textContent=_;const y=m.class;y&&g.addClass(y),r.includeAnnotationIndices&&g.attr("annotations",p.annotations.join(",")),v=parseFloat(m["font-size"]),v===void 0&&(v=a),v&&v>s&&(s=v)}else o&&f===d&&(p+=o),u=document.createTextNode(p||" "),a&&a>s&&(s=a);i.appendChild(u)}return s&&(c.maxFontSize=s),l?c.lineHeight=l:s&&(c.lineHeight=s*1.2),c}const emRegex=/em$/;function emToPx(i,n){const r=parseFloat(i);return emRegex.test(i)?r*n:r}function calculateDY(i,n,r,o){if(!Array.isArray(n))return 0;const a=n.length;if(!a)return 0;let l=n[0];const s=emToPx(l.maxFontSize,r)||r;let u=0;const c=emToPx(o,r);for(let p=1;p<a;p+=1){l=n[p];const v=emToPx(l.lineHeight,r)||c;u+=v}const d=emToPx(l.maxFontSize,r)||r;let f;switch(i){case"middle":f=s/2-.15*d-u/2;break;case"bottom":f=-(.25*d)-u;break;case"top":default:f=.8*s;break}return f}function text$1(i,n,r={}){n=sanitize(n);const o=r.eol;let a=r.textPath;const l=r.textVerticalAnchor,s=l==="middle"||l==="bottom"||l==="top";let u=r.x;u===void 0&&(u=i.getAttribute("x")||0);const c=r.includeAnnotationIndices;let d=r.annotations;d&&!Array.isArray(d)&&(d=[d]);const f=r.lineHeight,p=f==="auto",v=p?"1.5em":f||"1em";let m=!0;const g=i.childNodes;if(g.length===1){const k=g[0];k&&k.tagName.toUpperCase()==="TITLE"&&(m=!1)}m&&empty(i),attr(i,{"xml:space":"preserve",display:n||r.displayEmpty?null:"none"});const _=attr(i,"font-size");let y=parseFloat(_);y||(y=16,(s||d)&&!_&&attr(i,"font-size",`${y}`));let b;a?(typeof a=="string"&&(a={d:a}),b=createTextPathNode(a,i)):b=document.createDocumentFragment();let x,C=0,w;const E=n.split(`
684
684
  `),$=[],S=E.length-1;for(let k=0;k<=S;k+=1){x=v;let P="v-line";const B=createSvgElement("tspan");let T,N=E[k];if(N)if(d){const O=annotate(N,d,{offset:-C,includeAnnotationIndices:c});T=annotateTextLine(B,O,{eol:k!==S&&o,baseSize:y,lineHeight:p?null:v,includeAnnotationIndices:c});const I=T.lineHeight;I&&p&&k!==0&&(x=I),k===0&&(w=T.maxFontSize*.8)}else o&&k!==S&&(N+=o),B.textContent=N;else{B.textContent="-",P+=" v-empty-line";const O=B.style;O.fillOpacity=0,O.strokeOpacity=0,d&&(T={})}T&&$.push(T),k>0&&B.setAttribute("dy",x),(k>0||a)&&B.setAttribute("x",u),B.className.baseVal=P,b.appendChild(B),C+=N.length+1}if(s)if(d)x=calculateDY(l,$,y,v);else if(l==="top")x="0.8em";else{let k;switch(S>0?(k=parseFloat(v)||1,k*=S,emRegex.test(v)||(k/=y)):k=0,l){case"middle":x=`${.3-k/2}em`;break;case"bottom":x=`${-k-.3}em`;break}}else l===0?x="0em":l?x=l:(x=0,i.getAttribute("y")==null&&i.setAttribute("y",`${w||"0.8em"}`));b.firstChild.setAttribute("dy",x),i.appendChild(b)}function measureText(i,n={}){const r=document.createElement("canvas").getContext("2d");if(!i)return{width:0};const o=[],a=n["font-size"]?`${parseFloat(n["font-size"])}px`:"14px";return o.push(n["font-style"]||"normal"),o.push(n["font-variant"]||"normal"),o.push(n["font-weight"]||400),o.push(a),o.push(n["font-family"]||"sans-serif"),r.font=o.join(" "),r.measureText(i)}function splitTextByLength(i,n,r,o={}){if(n>=r)return[i,""];const a=i.length,l={};let s=Math.round(n/r*a-1);for(s<0&&(s=0);s>=0&&s<a;){const u=i.slice(0,s),c=l[u]||measureText(u,o).width,d=i.slice(0,s+1),f=l[d]||measureText(d,o).width;if(l[u]=c,l[d]=f,c>n)s-=1;else if(f<=n)s+=1;else break}return[i.slice(0,s),i.slice(s)]}function breakText(i,n,r={},o={}){const a=n.width,l=n.height,s=o.eol||`
685
685
  `,u=r.fontSize||14,c=r.lineHeight?parseFloat(r.lineHeight):Math.ceil(u*1.4),d=Math.floor(l/c);if(i.indexOf(s)>-1){const y=uuid(),b=[];return i.split(s).map(x=>{const C=breakText(x,Object.assign(Object.assign({},n),{height:Number.MAX_SAFE_INTEGER}),r,Object.assign(Object.assign({},o),{eol:y}));C&&b.push(...C.split(y))}),b.slice(0,d).join(s)}const{width:f}=measureText(i,r);if(f<a)return i;const p=[];let v=i,m=f,g=o.ellipsis,_=0;g&&(typeof g!="string"&&(g="…"),_=measureText(g,r).width);for(let y=0;y<d;y+=1)if(m>a)if(y===d-1){const[x]=splitTextByLength(v,a-_,m,r);p.push(g?`${x}${g}`:x)}else{const[x,C]=splitTextByLength(v,a,m,r);p.push(x),v=C,m=measureText(v,r).width}else{p.push(v);break}return p.join(s)}const KAPPA=.551784;function getNumbericAttribute(i,n,r=NaN){const o=i.getAttribute(n);if(o==null)return r;const a=parseFloat(o);return Number.isNaN(a)?r:a}function sample(i,n=1){const r=i.getTotalLength(),o=[];let a=0,l;for(;a<r;)l=i.getPointAtLength(a),o.push({distance:a,x:l.x,y:l.y}),a+=n;return o}function lineToPathData(i){return["M",getNumbericAttribute(i,"x1"),getNumbericAttribute(i,"y1"),"L",getNumbericAttribute(i,"x2"),getNumbericAttribute(i,"y2")].join(" ")}function polygonToPathData(i){const n=getPointsFromSvgElement(i);return n.length===0?null:`${svgPointsToPath(n)} Z`}function polylineToPathData(i){const n=getPointsFromSvgElement(i);return n.length===0?null:svgPointsToPath(n)}function svgPointsToPath(i){return`M ${i.map(r=>`${r.x} ${r.y}`).join(" L")}`}function getPointsFromSvgElement(i){const n=[],r=i.points;if(r)for(let o=0,a=r.numberOfItems;o<a;o+=1)n.push(r.getItem(o));return n}function circleToPathData(i){const n=getNumbericAttribute(i,"cx",0),r=getNumbericAttribute(i,"cy",0),o=getNumbericAttribute(i,"r"),a=o*KAPPA;return["M",n,r-o,"C",n+a,r-o,n+o,r-a,n+o,r,"C",n+o,r+a,n+a,r+o,n,r+o,"C",n-a,r+o,n-o,r+a,n-o,r,"C",n-o,r-a,n-a,r-o,n,r-o,"Z"].join(" ")}function ellipseToPathData(i){const n=getNumbericAttribute(i,"cx",0),r=getNumbericAttribute(i,"cy",0),o=getNumbericAttribute(i,"rx"),a=getNumbericAttribute(i,"ry")||o,l=o*KAPPA,s=a*KAPPA;return["M",n,r-a,"C",n+l,r-a,n+o,r-s,n+o,r,"C",n+o,r+s,n+l,r+a,n,r+a,"C",n-l,r+a,n-o,r+s,n-o,r,"C",n-o,r-s,n-l,r-a,n,r-a,"Z"].join(" ")}function rectangleToPathData(i){return rectToPathData({x:getNumbericAttribute(i,"x",0),y:getNumbericAttribute(i,"y",0),width:getNumbericAttribute(i,"width",0),height:getNumbericAttribute(i,"height",0),rx:getNumbericAttribute(i,"rx",0),ry:getNumbericAttribute(i,"ry",0)})}function rectToPathData(i){let n;const r=i.x,o=i.y,a=i.width,l=i.height,s=Math.min(i.rx||i["top-rx"]||0,a/2),u=Math.min(i.rx||i["bottom-rx"]||0,a/2),c=Math.min(i.ry||i["top-ry"]||0,l/2),d=Math.min(i.ry||i["bottom-ry"]||0,l/2);return s||u||c||d?n=["M",r,o+c,"v",l-c-d,"a",u,d,0,0,0,u,d,"h",a-2*u,"a",u,d,0,0,0,u,-d,"v",-(l-d-c),"a",s,c,0,0,0,-s,-c,"h",-(a-2*s),"a",s,c,0,0,0,-s,c,"Z"]:n=["M",r,o,"H",r+a,"V",o+l,"H",r,"V",o,"Z"],n.join(" ")}function toPath(i){const n=createSvgElement("path");attr(n,attr(i));const r=toPathData(i);return r&&n.setAttribute("d",r),n}function toPathData(i){const n=i.tagName.toLowerCase();switch(n){case"path":return i.getAttribute("d");case"line":return lineToPathData(i);case"polygon":return polygonToPathData(i);case"polyline":return polylineToPathData(i);case"ellipse":return ellipseToPathData(i);case"circle":return circleToPathData(i);case"rect":return rectangleToPathData(i)}throw new Error(`"${n}" cannot be converted to svg path element.`)}const transformRegex=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,transformSeparatorRegex=/[ ,]+/,transformationListRegex=/^(\w+)\((.*)\)/;function createSVGPoint(i,n){const o=createSvgElement("svg").createSVGPoint();return o.x=i,o.y=n,o}function createSVGMatrix(i){const r=createSvgElement("svg").createSVGMatrix();if(i!=null){const o=i,a=r;for(const l in o)a[l]=o[l]}return r}function createSVGTransform(i){const n=createSvgElement("svg");return i!=null?(i instanceof DOMMatrix||(i=createSVGMatrix(i)),n.createSVGTransformFromMatrix(i)):n.createSVGTransform()}function transformStringToMatrix(i){let n=createSVGMatrix();const r=i!=null&&i.match(transformRegex);if(!r)return n;for(let o=0,a=r.length;o<a;o+=1){const s=r[o].match(transformationListRegex);if(s){let u,c,d,f,p,v=createSVGMatrix();const m=s[2].split(transformSeparatorRegex);switch(s[1].toLowerCase()){case"scale":u=parseFloat(m[0]),c=m[1]===void 0?u:parseFloat(m[1]),v=v.scaleNonUniform(u,c);break;case"translate":d=parseFloat(m[0]),f=parseFloat(m[1]),v=v.translate(d,f);break;case"rotate":p=parseFloat(m[0]),d=parseFloat(m[1])||0,f=parseFloat(m[2])||0,d!==0||f!==0?v=v.translate(d,f).rotate(p).translate(-d,-f):v=v.rotate(p);break;case"skewx":p=parseFloat(m[0]),v=v.skewX(p);break;case"skewy":p=parseFloat(m[0]),v=v.skewY(p);break;case"matrix":v.a=parseFloat(m[0]),v.b=parseFloat(m[1]),v.c=parseFloat(m[2]),v.d=parseFloat(m[3]),v.e=parseFloat(m[4]),v.f=parseFloat(m[5]);break;default:continue}n=n.multiply(v)}}return n}function matrixToTransformString(i){const n=i||{},r=n.a!=null?n.a:1,o=n.b!=null?n.b:0,a=n.c!=null?n.c:0,l=n.d!=null?n.d:1,s=n.e!=null?n.e:0,u=n.f!=null?n.f:0;return`matrix(${r},${o},${a},${l},${s},${u})`}function parseTransformString(i){let n,r,o;if(i){const l=transformSeparatorRegex;if(i.trim().indexOf("matrix")>=0){const s=transformStringToMatrix(i),u=decomposeMatrix(s);n=[u.translateX,u.translateY],r=[u.rotation],o=[u.scaleX,u.scaleY];const c=[];(n[0]!==0||n[1]!==0)&&c.push(`translate(${n.join(",")})`),(o[0]!==1||o[1]!==1)&&c.push(`scale(${o.join(",")})`),r[0]!==0&&c.push(`rotate(${r[0]})`),i=c.join(" ")}else{const s=i.match(/translate\((.*?)\)/);s&&(n=s[1].split(l));const u=i.match(/rotate\((.*?)\)/);u&&(r=u[1].split(l));const c=i.match(/scale\((.*?)\)/);c&&(o=c[1].split(l))}}const a=o&&o[0]?parseFloat(o[0]):1;return{raw:i||"",translation:{tx:n&&n[0]?parseInt(n[0],10):0,ty:n&&n[1]?parseInt(n[1],10):0},rotation:{angle:r&&r[0]?parseInt(r[0],10):0,cx:r&&r[1]?parseInt(r[1],10):void 0,cy:r&&r[2]?parseInt(r[2],10):void 0},scale:{sx:a,sy:o&&o[1]?parseFloat(o[1]):a}}}function deltaTransformPoint(i,n){const r=n.x*i.a+n.y*i.c+0,o=n.x*i.b+n.y*i.d+0;return{x:r,y:o}}function decomposeMatrix(i){const n=deltaTransformPoint(i,{x:0,y:1}),r=deltaTransformPoint(i,{x:1,y:0}),o=180/Math.PI*Math.atan2(n.y,n.x)-90,a=180/Math.PI*Math.atan2(r.y,r.x);return{skewX:o,skewY:a,translateX:i.e,translateY:i.f,scaleX:Math.sqrt(i.a*i.a+i.b*i.b),scaleY:Math.sqrt(i.c*i.c+i.d*i.d),rotation:o}}function matrixToScale(i){let n,r,o,a;return i?(n=i.a==null?1:i.a,a=i.d==null?1:i.d,r=i.b,o=i.c):n=a=1,{sx:r?Math.sqrt(n*n+r*r):n,sy:o?Math.sqrt(o*o+a*a):a}}function matrixToRotation(i){let n={x:0,y:1};i&&(n=deltaTransformPoint(i,n));const r=180*Math.atan2(n.y,n.x)/Math.PI%360-90;return{angle:r%360+(r<0?360:0)}}function matrixToTranslation(i){return{tx:i&&i.e||0,ty:i&&i.f||0}}function transform(i,n,r={}){if(n==null)return transformStringToMatrix(attr(i,"transform"));if(r.absolute){i.setAttribute("transform",matrixToTransformString(n));return}const o=i.transform,a=createSVGTransform(n);o.baseVal.appendItem(a)}function translate(i,n,r=0,o={}){let a=attr(i,"transform");const l=parseTransformString(a);if(n==null)return l.translation;a=l.raw,a=a.replace(/translate\([^)]*\)/g,"").trim();const s=o.absolute?n:l.translation.tx+n,u=o.absolute?r:l.translation.ty+r,c=`translate(${s},${u})`;i.setAttribute("transform",`${c} ${a}`.trim())}function rotate$1(i,n,r,o,a={}){let l=attr(i,"transform");const s=parseTransformString(l);if(n==null)return s.rotation;l=s.raw,l=l.replace(/rotate\([^)]*\)/g,"").trim(),n%=360;const u=a.absolute?n:s.rotation.angle+n,c=r!=null&&o!=null?`,${r},${o}`:"",d=`rotate(${u}${c})`;i.setAttribute("transform",`${l} ${d}`.trim())}function scale(i,n,r){let o=attr(i,"transform");const a=parseTransformString(o);if(n==null)return a.scale;r=r??n,o=a.raw,o=o.replace(/scale\([^)]*\)/g,"").trim();const l=`scale(${n},${r})`;i.setAttribute("transform",`${o} ${l}`.trim())}function getTransformToElement(i,n){if(isSVGGraphicsElement(n)&&isSVGGraphicsElement(i)){const r=n.getScreenCTM(),o=i.getScreenCTM();if(r&&o)return r.inverse().multiply(o)}return createSVGMatrix()}function getTransformToParentElement(i,n){let r=createSVGMatrix();if(isSVGGraphicsElement(n)&&isSVGGraphicsElement(i)){let o=i;const a=[];for(;o&&o!==n;){const l=o.getAttribute("transform")||null,s=transformStringToMatrix(l);a.push(s),o=o.parentNode}a.reverse().forEach(l=>{r=r.multiply(l)})}return r}function toLocalPoint(i,n,r){const o=i instanceof SVGSVGElement?i:i.ownerSVGElement,a=o.createSVGPoint();a.x=n,a.y=r;try{const l=o.getScreenCTM(),s=a.matrixTransform(l.inverse()),u=getTransformToElement(i,o).inverse();return s.matrixTransform(u)}catch{return a}}var EventHook;(function(i){const n={};function r(l){return n[l]||{}}i.get=r;function o(l,s){n[l]=s}i.register=o;function a(l){delete n[l]}i.unregister=a})(EventHook||(EventHook={}));var Store$1;(function(i){const n=new WeakMap;function r(l){return n.has(l)||n.set(l,{events:Object.create(null)}),n.get(l)}i.ensure=r;function o(l){return n.get(l)}i.get=o;function a(l){return n.delete(l)}i.remove=a})(Store$1||(Store$1={}));var Util$2;(function(i){i.returnTrue=()=>!0,i.returnFalse=()=>!1;function n(a){a.stopPropagation()}i.stopPropagationCallback=n;function r(a,l,s){a.addEventListener!=null&&a.addEventListener(l,s)}i.addEventListener=r;function o(a,l,s){a.removeEventListener!=null&&a.removeEventListener(l,s)}i.removeEventListener=o})(Util$2||(Util$2={})),function(i){const n=/[^\x20\t\r\n\f]+/g,r=/^([^.]*)(?:\.(.+)|)/;function o(u){return(u||"").match(n)||[""]}i.splitType=o;function a(u){const c=r.exec(u)||[];return{originType:c[1]?c[1].trim():c[1],namespaces:c[2]?c[2].split(".").map(d=>d.trim()).sort():[]}}i.normalizeType=a;function l(u){return u.nodeType===1||u.nodeType===9||!+u.nodeType}i.isValidTarget=l;function s(u,c){if(c){const d=u;return d.querySelector!=null&&d.querySelector(c)!=null}return!0}i.isValidSelector=s}(Util$2||(Util$2={})),function(i){let n=0;const r=new WeakMap;function o(u){return r.has(u)||(r.set(u,n),n+=1),r.get(u)}i.ensureHandlerId=o;function a(u){return r.get(u)}i.getHandlerId=a;function l(u){return r.delete(u)}i.removeHandlerId=l;function s(u,c){return r.set(u,c)}i.setHandlerId=s}(Util$2||(Util$2={})),function(i){function n(r,o){const a=[],l=Store$1.get(r),s=l&&l.events&&l.events[o.type],u=s&&s.handlers||[],c=s?s.delegateCount:0;if(c>0&&!(o.type==="click"&&typeof o.button=="number"&&o.button>=1)){for(let d=o.target;d!==r;d=d.parentNode||r)if(d.nodeType===1&&!(o.type==="click"&&d.disabled===!0)){const f=[],p={};for(let v=0;v<c;v+=1){const m=u[v],g=m.selector;if(g!=null&&p[g]==null){const _=r,y=[];_.querySelectorAll(g).forEach(b=>{y.push(b)}),p[g]=y.includes(d)}p[g]&&f.push(m)}f.length&&a.push({elem:d,handlers:f})}}return c<u.length&&a.push({elem:r,handlers:u.slice(c)}),a}i.getHandlerQueue=n}(Util$2||(Util$2={})),function(i){function n(r){return r!=null&&r===r.window}i.isWindow=n}(Util$2||(Util$2={})),function(i){function n(r,o){const a=r.nodeType===9?r.documentElement:r,l=o&&o.parentNode;return r===l||!!(l&&l.nodeType===1&&(a.contains?a.contains(l):r.compareDocumentPosition&&r.compareDocumentPosition(l)&16))}i.contains=n}(Util$2||(Util$2={}));class EventObject{constructor(n,r){this.isDefaultPrevented=Util$2.returnFalse,this.isPropagationStopped=Util$2.returnFalse,this.isImmediatePropagationStopped=Util$2.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const o=this.originalEvent;this.isDefaultPrevented=Util$2.returnTrue,o&&!this.isSimulated&&o.preventDefault()},this.stopPropagation=()=>{const o=this.originalEvent;this.isPropagationStopped=Util$2.returnTrue,o&&!this.isSimulated&&o.stopPropagation()},this.stopImmediatePropagation=()=>{const o=this.originalEvent;this.isImmediatePropagationStopped=Util$2.returnTrue,o&&!this.isSimulated&&o.stopImmediatePropagation(),this.stopPropagation()},typeof n=="string"?this.type=n:n.type&&(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented?Util$2.returnTrue:Util$2.returnFalse,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.timeStamp=n.timeStamp),r&&Object.assign(this,r),this.timeStamp||(this.timeStamp=Date.now())}}(function(i){function n(r){return r instanceof i?r:new i(r)}i.create=n})(EventObject||(EventObject={})),function(i){function n(r,o){Object.defineProperty(i.prototype,r,{enumerable:!0,configurable:!0,get:typeof o=="function"?function(){if(this.originalEvent)return o(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[r]},set(a){Object.defineProperty(this,r,{enumerable:!0,configurable:!0,writable:!0,value:a})}})}i.addProperty=n}(EventObject||(EventObject={})),function(i){const n={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(n).forEach(r=>i.addProperty(r,n[r]))}(EventObject||(EventObject={})),function(i){EventHook.register("load",{noBubble:!0})}(),function(i){EventHook.register("beforeunload",{postDispatch(n,r){r.result!==void 0&&r.originalEvent&&(r.originalEvent.returnValue=r.result)}})}(),function(i){EventHook.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(n,r){let o;const a=r.relatedTarget,l=r.handleObj;return(!a||a!==n&&!Util$2.contains(n,a))&&(r.type=l.originType,o=l.handler.call(n,r),r.type="mouseover"),o}}),EventHook.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(n,r){let o;const a=r.relatedTarget,l=r.handleObj;return(!a||a!==n&&!Util$2.contains(n,a))&&(r.type=l.originType,o=l.handler.call(n,r),r.type="mouseout"),o}})}();var __rest$u=globalThis&&globalThis.__rest||function(i,n){var r={};for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&n.indexOf(o)<0&&(r[o]=i[o]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(i);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(i,o[a])&&(r[o[a]]=i[o[a]]);return r},Core;(function(i){let n;function r(s,u,c,d,f){if(!Util$2.isValidTarget(s))return;let p;if(typeof c!="function"){const{handler:_,selector:y}=c,b=__rest$u(c,["handler","selector"]);c=_,f=y,p=b}const v=Store$1.ensure(s);let m=v.handler;m==null&&(m=v.handler=function(_,...y){return n!==_.type?a(s,_,...y):void 0});const g=Util$2.ensureHandlerId(c);Util$2.splitType(u).forEach(_=>{const{originType:y,namespaces:b}=Util$2.normalizeType(_);if(!y)return;let x=y,C=EventHook.get(x);x=(f?C.delegateType:C.bindType)||x,C=EventHook.get(x);const w=Object.assign({type:x,originType:y,data:d,selector:f,guid:g,handler:c,namespace:b.join(".")},p),E=v.events;let $=E[x];$||($=E[x]={handlers:[],delegateCount:0},(!C.setup||C.setup(s,d,b,m)===!1)&&Util$2.addEventListener(s,x,m)),C.add&&(Util$2.removeHandlerId(w.handler),C.add(s,w),Util$2.setHandlerId(w.handler,g)),f?($.handlers.splice($.delegateCount,0,w),$.delegateCount+=1):$.handlers.push(w)})}i.on=r;function o(s,u,c,d,f){const p=Store$1.get(s);if(!p)return;const v=p.events;v&&(Util$2.splitType(u).forEach(m=>{const{originType:g,namespaces:_}=Util$2.normalizeType(m);if(!g){Object.keys(v).forEach(E=>{o(s,E+m,c,d,!0)});return}let y=g;const b=EventHook.get(y);y=(d?b.delegateType:b.bindType)||y;const x=v[y];if(!x)return;const C=_.length>0?new RegExp(`(^|\\.)${_.join("\\.(?:.*\\.|)")}(\\.|$)`):null,w=x.handlers.length;for(let E=x.handlers.length-1;E>=0;E-=1){const $=x.handlers[E];(f||g===$.originType)&&(!c||Util$2.getHandlerId(c)===$.guid)&&(C==null||$.namespace&&C.test($.namespace))&&(d==null||d===$.selector||d==="**"&&$.selector)&&(x.handlers.splice(E,1),$.selector&&(x.delegateCount-=1),b.remove&&b.remove(s,$))}w&&x.handlers.length===0&&((!b.teardown||b.teardown(s,_,p.handler)===!1)&&Util$2.removeEventListener(s,y,p.handler),delete v[y])}),Object.keys(v).length===0&&Store$1.remove(s))}i.off=o;function a(s,u,...c){const d=EventObject.create(u);d.delegateTarget=s;const f=EventHook.get(d.type);if(f.preDispatch&&f.preDispatch(s,d)===!1)return;const p=Util$2.getHandlerQueue(s,d);for(let v=0,m=p.length;v<m&&!d.isPropagationStopped();v+=1){const g=p[v];d.currentTarget=g.elem;for(let _=0,y=g.handlers.length;_<y&&!d.isImmediatePropagationStopped();_+=1){const b=g.handlers[_];if(d.rnamespace==null||b.namespace&&d.rnamespace.test(b.namespace)){d.handleObj=b,d.data=b.data;const x=EventHook.get(b.originType).handle,C=x?x(g.elem,d,...c):b.handler.call(g.elem,d,...c);C!==void 0&&(d.result=C,C===!1&&(d.preventDefault(),d.stopPropagation()))}}}return f.postDispatch&&f.postDispatch(s,d),d.result}i.dispatch=a;function l(s,u,c,d){let f=s,p=typeof s=="string"?s:s.type,v=typeof s=="string"||f.namespace==null?[]:f.namespace.split(".");const m=c;if(m.nodeType===3||m.nodeType===8)return;p.indexOf(".")>-1&&(v=p.split("."),p=v.shift(),v.sort());const g=p.indexOf(":")<0&&`on${p}`;f=s instanceof EventObject?s:new EventObject(p,typeof s=="object"?s:null),f.namespace=v.join("."),f.rnamespace=f.namespace?new RegExp(`(^|\\.)${v.join("\\.(?:.*\\.|)")}(\\.|$)`):null,f.result=void 0,f.target||(f.target=m);const _=[f];Array.isArray(u)?_.push(...u):_.push(u);const y=EventHook.get(p);if(!d&&y.trigger&&y.trigger(m,f,u)===!1)return;let b;const x=[m];if(!d&&!y.noBubble&&!Util$2.isWindow(m)){b=y.delegateType||p;let w=m,E=m.parentNode;for(;E!=null;)x.push(E),w=E,E=E.parentNode;const $=m.ownerDocument||document;if(w===$){const S=w.defaultView||w.parentWindow||window;x.push(S)}}let C=m;for(let w=0,E=x.length;w<E&&!f.isPropagationStopped();w+=1){const $=x[w];C=$,f.type=w>1?b:y.bindType||p;const S=Store$1.get($);S&&S.events[f.type]&&S.handler&&S.handler.call($,..._);const V=g&&$[g]||null;V&&Util$2.isValidTarget($)&&(f.result=V.call($,..._),f.result===!1&&f.preventDefault())}if(f.type=p,!d&&!f.isDefaultPrevented()){const w=y.preventDefault;if((w==null||w(x.pop(),f,u)===!1)&&Util$2.isValidTarget(m)&&g&&typeof m[p]=="function"&&!Util$2.isWindow(m)){const E=m[g];E&&(m[g]=null),n=p,f.isPropagationStopped()&&C.addEventListener(p,Util$2.stopPropagationCallback),m[p](),f.isPropagationStopped()&&C.removeEventListener(p,Util$2.stopPropagationCallback),n=void 0,E&&(m[g]=E)}}return f.result}i.trigger=l})(Core||(Core={}));var Event$1;(function(i){function n(l,s,u,c,d){return Private$4.on(l,s,u,c,d),l}i.on=n;function r(l,s,u,c,d){return Private$4.on(l,s,u,c,d,!0),l}i.once=r;function o(l,s,u,c){return Private$4.off(l,s,u,c),l}i.off=o;function a(l,s,u,c){return Core.trigger(s,u,l,c),l}i.trigger=a})(Event$1||(Event$1={}));var Private$4;(function(i){function n(o,a,l,s,u,c){if(typeof a=="object"){typeof l!="string"&&(s=s||l,l=void 0),Object.keys(a).forEach(d=>n(o,d,l,s,a[d],c));return}if(s==null&&u==null?(u=l,s=l=void 0):u==null&&(typeof l=="string"?(u=s,s=void 0):(u=s,s=l,l=void 0)),u===!1)u=Util$2.returnFalse;else if(!u)return;if(c){const d=u;u=function(f,...p){return i.off(o,f),d.call(this,f,...p)},Util$2.setHandlerId(u,Util$2.ensureHandlerId(d))}Core.on(o,a,u,s,l)}i.on=n;function r(o,a,l,s){const u=a;if(u&&u.preventDefault!=null&&u.handleObj!=null){const c=u.handleObj;r(u.delegateTarget,c.namespace?`${c.originType}.${c.namespace}`:c.originType,c.selector,c.handler);return}if(typeof a=="object"){const c=a;Object.keys(c).forEach(d=>r(o,d,l,c[d]));return}(l===!1||typeof l=="function")&&(s=l,l=void 0),s===!1&&(s=Util$2.returnFalse),Core.off(o,a,s,l)}i.off=r})(Private$4||(Private$4={}));class MouseWheelHandle{constructor(n,r,o){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=Platform.isEventSupported("wheel")?"wheel":"mousewheel",this.target=n,this.onWheelCallback=r,this.onWheelGuard=o,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(n){if(this.onWheelGuard!=null&&!this.onWheelGuard(n))return;this.deltaX+=n.deltaX,this.deltaY+=n.deltaY,n.preventDefault();let r;(this.deltaX!==0||this.deltaY!==0)&&(n.stopPropagation(),r=!0),r===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(n)}))}didWheel(n){this.animationFrameId=0,this.onWheelCallback(n,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function offset$1(i){const n=i.getBoundingClientRect(),r=i.ownerDocument.defaultView;return{top:n.top+r.pageYOffset,left:n.left+r.pageXOffset}}function width(i){return i.getBoundingClientRect().width}function height(i){return i.getBoundingClientRect().height}function debounce(i,n=60){let r=null;return(...o)=>{r&&clearTimeout(r),r=window.setTimeout(()=>{i.apply(this,o)},n)}}function createSensor$2(i){let n=null,r=[];const o=()=>{if(getComputedStyle(i).position==="static"){const d=i.style;d.position="relative"}const c=document.createElement("object");return c.onload=()=>{c.contentDocument.defaultView.addEventListener("resize",a),a()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("tabindex","-1"),c.type="text/html",i.appendChild(c),c.data="about:blank",c},a=debounce(()=>{r.forEach(c=>c(i))}),l=c=>{n||(n=o()),r.indexOf(c)===-1&&r.push(c)},s=()=>{n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",a),n.parentNode.removeChild(n),n=null,r=[])};return{element:i,bind:l,destroy:s,unbind:c=>{const d=r.indexOf(c);d!==-1&&r.splice(d,1),r.length===0&&n&&s()}}}function createSensor$1(i){let n=null,r=[];const o=debounce(()=>{r.forEach(c=>{c(i)})}),a=()=>{const c=new ResizeObserver(o);return c.observe(i),o(),c},l=c=>{n||(n=a()),r.indexOf(c)===-1&&r.push(c)},s=()=>{n&&(n.disconnect(),r=[],n=null)};return{element:i,bind:l,destroy:s,unbind:c=>{const d=r.indexOf(c);d!==-1&&r.splice(d,1),r.length===0&&n&&s()}}}const createSensor=typeof ResizeObserver<"u"?createSensor$1:createSensor$2;var SizeSensor;(function(i){const n=new WeakMap;function r(a){let l=n.get(a);return l||(l=createSensor(a),n.set(a,l),l)}function o(a){a.destroy(),n.delete(a.element)}i.bind=(a,l)=>{const s=r(a);return s.bind(l),()=>s.unbind(l)},i.clear=a=>{const l=r(a);o(l)}})(SizeSensor||(SizeSensor={}));class PriorityQueue{constructor(n={}){this.comparator=n.comparator||PriorityQueue.defaultComparator,this.index={},this.data=n.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(n,r,o){const a={priority:n,value:r},l=this.data.length;return o&&(a.id=o,this.index[o]=l),this.data.push(a),this.bubbleUp(l),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(n,r){const o=this.index[n];if(typeof o>"u")throw new Error(`Node with id '${n}' was not found in the heap.`);const a=this.data,l=a[o].priority,s=this.comparator(r,l);s<0?(a[o].priority=r,this.bubbleUp(o)):s>0&&(a[o].priority=r,this.bubbleDown(o))}remove(){const n=this.data,r=n[0],o=n.pop();return r.id&&delete this.index[r.id],n.length>0&&(n[0]=o,o.id&&(this.index[o.id]=0),this.bubbleDown(0)),r?r.value:null}heapify(){for(let n=0;n<this.data.length;n+=1)this.bubbleUp(n)}bubbleUp(n){const r=this.data;let o,a,l=n;for(;l>0&&(a=l-1>>>1,this.comparator(r[l].priority,r[a].priority)<0);){o=r[a],r[a]=r[l];let s=r[l].id;s!=null&&(this.index[s]=a),r[l]=o,s=r[l].id,s!=null&&(this.index[s]=l),l=a}}bubbleDown(n){const r=this.data,o=r.length-1;let a=n;for(;;){const l=(a<<1)+1,s=l+1;let u=a;if(l<=o&&this.comparator(r[l].priority,r[u].priority)<0&&(u=l),s<=o&&this.comparator(r[s].priority,r[u].priority)<0&&(u=s),u!==a){const c=r[u];r[u]=r[a];let d=r[a].id;d!=null&&(this.index[d]=u),r[a]=c,d=r[a].id,d!=null&&(this.index[d]=a),a=u}else break}}}(function(i){i.defaultComparator=(n,r)=>n-r})(PriorityQueue||(PriorityQueue={}));var Dijkstra;(function(i){function n(r,o,a=(l,s)=>1){const l={},s={},u={},c=new PriorityQueue;for(l[o]=0,Object.keys(r).forEach(d=>{d!==o&&(l[d]=1/0),c.insert(l[d],d,d)});!c.isEmpty();){const d=c.remove();u[d]=!0;const f=r[d]||[];for(let p=0;p<f.length;p+=1){const v=f[p];if(!u[v]){const m=l[d]+a(d,v);m<l[v]&&(l[v]=m,s[v]=d,c.updatePriority(v,m))}}}return s}i.run=n})(Dijkstra||(Dijkstra={}));class Color{constructor(n,r,o,a){if(n==null)return this.set(255,255,255,1);if(typeof n=="number")return this.set(n,r,o,a);if(typeof n=="string")return Color.fromString(n)||this;if(Array.isArray(n))return this.set(n);this.set(n.r,n.g,n.b,n.a==null?1:n.a)}blend(n,r,o){this.set(n.r+(r.r-n.r)*o,n.g+(r.g-n.g)*o,n.b+(r.b-n.b)*o,n.a+(r.a-n.a)*o)}lighten(n){const r=Color.lighten(this.toArray(),n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}darken(n){this.lighten(-n)}set(n,r,o,a){const l=Array.isArray(n)?n[0]:n,s=Array.isArray(n)?n[1]:r,u=Array.isArray(n)?n[2]:o,c=Array.isArray(n)?n[3]:a;return this.r=Math.round(clamp(l,0,255)),this.g=Math.round(clamp(s,0,255)),this.b=Math.round(clamp(u,0,255)),this.a=c==null?1:clamp(c,0,1),this}toHex(){return`#${["r","g","b"].map(r=>{const o=this[r].toString(16);return o.length<2?`0${o}`:o}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return Color.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(n){const r=`${this.r},${this.g},${this.b},`;return n?`rgb(${r})`:`rgba(${r},${this.a})`}toGrey(){return Color.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(i){function n(C){return new i(C)}i.fromArray=n;function r(C){return new i([...g(C),1])}i.fromHex=r;function o(C){const w=C.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(w){const E=w[1].split(/\s*,\s*/).map($=>parseInt($,10));return new i(E)}return null}i.fromRGBA=o;function a(C,w,E){E<0&&++E,E>1&&--E;const $=6*E;return $<1?C+(w-C)*$:2*E<1?w:3*E<2?C+(w-C)*(2/3-E)*6:C}function l(C){const w=C.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(w){const E=w[2].split(/\s*,\s*/),$=(parseFloat(E[0])%360+360)%360/360,S=parseFloat(E[1])/100,V=parseFloat(E[2])/100,k=E[3]==null?1:parseInt(E[3],10);return new i(d($,S,V,k))}return null}i.fromHSLA=l;function s(C){if(C.startsWith("#"))return r(C);if(C.startsWith("rgb"))return o(C);const w=i.named[C];return w?r(w):l(C)}i.fromString=s;function u(C,w){return i.fromArray([C,C,C,w])}i.makeGrey=u;function c(C,w,E,$){const S=Array.isArray(C)?C[0]:C,V=Array.isArray(C)?C[1]:w,k=Array.isArray(C)?C[2]:E,P=Array.isArray(C)?C[3]:$,B=Math.max(S,V,k),T=Math.min(S,V,k),N=(B+T)/2;let O=0,I=0;if(T!==B){const L=B-T;switch(I=N>.5?L/(2-B-T):L/(B+T),B){case S:O=(V-k)/L+(V<k?6:0);break;case V:O=(k-S)/L+2;break;case k:O=(S-V)/L+4;break}O/=6}return[O,I,N,P??1]}i.rgba2hsla=c;function d(C,w,E,$){const S=Array.isArray(C)?C[0]:C,V=Array.isArray(C)?C[1]:w,k=Array.isArray(C)?C[2]:E,P=Array.isArray(C)?C[3]:$,B=k<=.5?k*(V+1):k+V-k*V,T=2*k-B;return[a(T,B,S+1/3)*256,a(T,B,S)*256,a(T,B,S-1/3)*256,P??1]}i.hsla2rgba=d;function f(C){return new i(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),C?void 0:parseFloat(Math.random().toFixed(2)))}i.random=f;function p(){const C="0123456789ABCDEF";let w="#";for(let E=0;E<6;E+=1)w+=C[Math.floor(Math.random()*16)];return w}i.randomHex=p;function v(C){return f(C).toString()}i.randomRGBA=v;function m(C,w){if(typeof C=="string"){const k=C[0]==="#",[P,B,T]=g(C);return w?P*.299+B*.587+T*.114>186?"#000000":"#ffffff":`${k?"#":""}${_(255-P,255-B,255-T)}`}const E=C[0],$=C[1],S=C[2],V=C[3];return w?E*.299+$*.587+S*.114>186?[0,0,0,V]:[255,255,255,V]:[255-E,255-$,255-S,V]}i.invert=m;function g(C){const w=C.indexOf("#")===0?C:`#${C}`;let E=+`0x${w.substr(1)}`;if(!(w.length===4||w.length===7)||Number.isNaN(E))throw new Error("Invalid hex color.");const $=w.length===4?4:8,S=(1<<$)-1,V=["b","g","r"].map(()=>{const k=E&S;return E>>=$,$===4?17*k:k});return[V[2],V[1],V[0]]}function _(C,w,E){const $=S=>S.length<2?`0${S}`:S;return`${$(C.toString(16))}${$(w.toString(16))}${$(E.toString(16))}`}function y(C,w){return x(C,w)}i.lighten=y;function b(C,w){return x(C,-w)}i.darken=b;function x(C,w){if(typeof C=="string"){const S=C[0]==="#",V=parseInt(S?C.substr(1):C,16),k=clamp((V>>16)+w,0,255),P=clamp((V>>8&255)+w,0,255),B=clamp((V&255)+w,0,255);return`${S?"#":""}${(B|P<<8|k<<16).toString(16)}`}const E=_(C[0],C[1],C[2]),$=g(x(E,w));return[$[0],$[1],$[2],C[3]]}})(Color||(Color={})),function(i){i.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(Color||(Color={}));class Dictionary{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(n){return this.map.has(n)}get(n){return this.map.get(n)}set(n,r){this.map.set(n,r),this.arr.push(n)}delete(n){const r=this.arr.indexOf(n);r>=0&&this.arr.splice(r,1);const o=this.map.get(n);return this.map.delete(n),o}each(n){this.arr.forEach(r=>{const o=this.map.get(r);n(o,r)})}dispose(){this.clear()}}var ModifierKey;(function(i){function n(a){const l=[],s=[];return Array.isArray(a)?l.push(...a):a.split("|").forEach(u=>{u.indexOf("&")===-1?l.push(u):s.push(...u.split("&"))}),{or:l,and:s}}i.parse=n;function r(a,l){if(a!=null&&l!=null){const s=n(a),u=n(l),c=s.or.sort(),d=u.or.sort(),f=s.and.sort(),p=u.and.sort(),v=(m,g)=>m.length===g.length&&(m.length===0||m.every((_,y)=>_===g[y]));return v(c,d)&&v(f,p)}return a==null&&l==null}i.equals=r;function o(a,l,s){if(l==null||Array.isArray(l)&&l.length===0)return s?a.altKey!==!0&&a.ctrlKey!==!0&&a.metaKey!==!0&&a.shiftKey!==!0:!0;const{or:u,and:c}=n(l),d=f=>{const p=`${f.toLowerCase()}Key`;return a[p]===!0};return u.some(f=>d(f))&&c.every(f=>d(f))}i.isMatch=o})(ModifierKey||(ModifierKey={}));var Timing;(function(i){i.linear=n=>n,i.quad=n=>n*n,i.cubic=n=>n*n*n,i.inout=n=>{if(n<=0)return 0;if(n>=1)return 1;const r=n*n,o=r*n;return 4*(n<.5?o:3*(n-r)+o-.75)},i.exponential=n=>Math.pow(2,10*(n-1)),i.bounce=n=>{for(let r=0,o=1;;r+=o,o/=2)if(n>=(7-4*r)/11){const a=(11-6*r-11*n)/4;return-a*a+o*o}}})(Timing||(Timing={})),function(i){i.decorators={reverse(n){return r=>1-n(1-r)},reflect(n){return r=>.5*(r<.5?n(2*r):2-n(2-2*r))},clamp(n,r=0,o=1){return a=>{const l=n(a);return l<r?r:l>o?o:l}},back(n=1.70158){return r=>r*r*((n+1)*r-n)},elastic(n=1.5){return r=>Math.pow(2,10*(r-1))*Math.cos(20*Math.PI*n/3*r)}}}(Timing||(Timing={})),function(i){function n(I){return-1*Math.cos(I*(Math.PI/2))+1}i.easeInSine=n;function r(I){return Math.sin(I*(Math.PI/2))}i.easeOutSine=r;function o(I){return-.5*(Math.cos(Math.PI*I)-1)}i.easeInOutSine=o;function a(I){return I*I}i.easeInQuad=a;function l(I){return I*(2-I)}i.easeOutQuad=l;function s(I){return I<.5?2*I*I:-1+(4-2*I)*I}i.easeInOutQuad=s;function u(I){return I*I*I}i.easeInCubic=u;function c(I){const L=I-1;return L*L*L+1}i.easeOutCubic=c;function d(I){return I<.5?4*I*I*I:(I-1)*(2*I-2)*(2*I-2)+1}i.easeInOutCubic=d;function f(I){return I*I*I*I}i.easeInQuart=f;function p(I){const L=I-1;return 1-L*L*L*L}i.easeOutQuart=p;function v(I){const L=I-1;return I<.5?8*I*I*I*I:1-8*L*L*L*L}i.easeInOutQuart=v;function m(I){return I*I*I*I*I}i.easeInQuint=m;function g(I){const L=I-1;return 1+L*L*L*L*L}i.easeOutQuint=g;function _(I){const L=I-1;return I<.5?16*I*I*I*I*I:1+16*L*L*L*L*L}i.easeInOutQuint=_;function y(I){return I===0?0:Math.pow(2,10*(I-1))}i.easeInExpo=y;function b(I){return I===1?1:-Math.pow(2,-10*I)+1}i.easeOutExpo=b;function x(I){if(I===0||I===1)return I;const L=I*2,D=L-1;return L<1?.5*Math.pow(2,10*D):.5*(-Math.pow(2,-10*D)+2)}i.easeInOutExpo=x;function C(I){const L=I/1;return-1*(Math.sqrt(1-L*I)-1)}i.easeInCirc=C;function w(I){const L=I-1;return Math.sqrt(1-L*L)}i.easeOutCirc=w;function E(I){const L=I*2,D=L-2;return L<1?-.5*(Math.sqrt(1-L*L)-1):.5*(Math.sqrt(1-D*D)+1)}i.easeInOutCirc=E;function $(I,L=1.70158){return I*I*((L+1)*I-L)}i.easeInBack=$;function S(I,L=1.70158){const D=I/1-1;return D*D*((L+1)*D+L)+1}i.easeOutBack=S;function V(I,L=1.70158){const D=I*2,F=D-2,M=L*1.525;return D<1?.5*D*D*((M+1)*D-M):.5*(F*F*((M+1)*F+M)+2)}i.easeInOutBack=V;function k(I,L=.7){if(I===0||I===1)return I;const F=I/1-1,M=1-L,R=M/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*F)*Math.sin((F-R)*(2*Math.PI)/M))}i.easeInElastic=k;function P(I,L=.7){const D=1-L,F=I*2;if(I===0||I===1)return I;const M=D/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*F)*Math.sin((F-M)*(2*Math.PI)/D)+1}i.easeOutElastic=P;function B(I,L=.65){const D=1-L;if(I===0||I===1)return I;const F=I*2,M=F-1,R=D/(2*Math.PI)*Math.asin(1);return F<1?-.5*(Math.pow(2,10*M)*Math.sin((M-R)*(2*Math.PI)/D)):Math.pow(2,-10*M)*Math.sin((M-R)*(2*Math.PI)/D)*.5+1}i.easeInOutElastic=B;function T(I){const L=I/1;if(L<1/2.75)return 7.5625*L*L;if(L<2/2.75){const D=L-.5454545454545454;return 7.5625*D*D+.75}if(L<2.5/2.75){const D=L-.8181818181818182;return 7.5625*D*D+.9375}{const D=L-.9545454545454546;return 7.5625*D*D+.984375}}i.easeOutBounce=T;function N(I){return 1-T(1-I)}i.easeInBounce=N;function O(I){return I<.5?N(I*2)*.5:T(I*2-1)*.5+.5}i.easeInOutBounce=O}(Timing||(Timing={}));var Interp;(function(i){i.number=(n,r)=>{const o=r-n;return a=>n+o*a},i.object=(n,r)=>{const o=Object.keys(n);return a=>{const l={};for(let s=o.length-1;s!==-1;s-=1){const u=o[s];l[u]=n[u]+(r[u]-n[u])*a}return l}},i.unit=(n,r)=>{const o=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,a=o.exec(n),l=o.exec(r),s=l?l[1]:"",u=a?+a[1]:0,c=l?+l[1]:0,d=s.indexOf("."),f=d>0?s[1].length-d-1:0,p=c-u,v=a?a[2]:"";return m=>(u+p*m).toFixed(f)+v},i.color=(n,r)=>{const o=parseInt(n.slice(1),16),a=parseInt(r.slice(1),16),l=o&255,s=(a&255)-l,u=o&65280,c=(a&65280)-u,d=o&16711680,f=(a&16711680)-d;return p=>{const v=l+s*p&255,m=u+c*p&65280,g=d+f*p&16711680;return`#${(1<<24|v|m|g).toString(16).slice(1)}`}}})(Interp||(Interp={}));const cssModules=[];function ensure(i,n){const r=cssModules.find(o=>o.name===i);if(!(r&&(r.loadTimes+=1,r.loadTimes>1))&&!Platform.isApplyingHMR()){const o=document.createElement("style");o.setAttribute("type","text/css"),o.textContent=n;const a=document.querySelector("head");a&&a.insertBefore(o,a.firstChild),cssModules.push({name:i,loadTimes:1,styleElement:o})}}function clean(i){const n=cssModules.findIndex(r=>r.name===i);if(n>-1){const r=cssModules[n];if(r.loadTimes-=1,r.loadTimes>0)return;let o=r.styleElement;o&&o.parentNode&&o.parentNode.removeChild(o),o=null,cssModules.splice(n,1)}}var Angle;(function(i){function n(o){return 180*o/Math.PI%360}i.toDeg=n,i.toRad=function(o,a=!1){return(a?o:o%360)*Math.PI/180};function r(o){return o%360+(o<0?360:0)}i.normalize=r})(Angle||(Angle={}));var GeometryUtil;(function(i){function n(u,c=0){return Number.isInteger(u)?u:+u.toFixed(c)}i.round=n;function r(u,c){let d,f;if(c==null?(f=u??1,d=0):(f=c,d=u??0),f<d){const p=d;d=f,f=p}return Math.floor(Math.random()*(f-d+1)+d)}i.random=r;function o(u,c,d){return Number.isNaN(u)?NaN:Number.isNaN(c)||Number.isNaN(d)?0:c<d?u<c?c:u>d?d:u:u<d?d:u>c?c:u}i.clamp=o;function a(u,c){return c*Math.round(u/c)}i.snapToGrid=a;function l(u,c){return c!=null&&u!=null&&c.x>=u.x&&c.x<=u.x+u.width&&c.y>=u.y&&c.y<=u.y+u.height}i.containsPoint=l;function s(u,c){const d=u.x-c.x,f=u.y-c.y;return d*d+f*f}i.squaredLength=s})(GeometryUtil||(GeometryUtil={}));class Geometry{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class Point extends Geometry{constructor(n,r){super(),this.x=n??0,this.y=r??0}round(n=0){return this.x=GeometryUtil.round(this.x,n),this.y=GeometryUtil.round(this.y,n),this}add(n,r){const o=Point.create(n,r);return this.x+=o.x,this.y+=o.y,this}update(n,r){const o=Point.create(n,r);return this.x=o.x,this.y=o.y,this}translate(n,r){const o=Point.create(n,r);return this.x+=o.x,this.y+=o.y,this}rotate(n,r){const o=Point.rotate(this,n,r);return this.x=o.x,this.y=o.y,this}scale(n,r,o=new Point){const a=Point.create(o);return this.x=a.x+n*(this.x-a.x),this.y=a.y+r*(this.y-a.y),this}closest(n){if(n.length===1)return Point.create(n[0]);let r=null,o=1/0;return n.forEach(a=>{const l=this.squaredDistance(a);l<o&&(r=a,o=l)}),r?Point.create(r):null}distance(n){return Math.sqrt(this.squaredDistance(n))}squaredDistance(n){const r=Point.create(n),o=this.x-r.x,a=this.y-r.y;return o*o+a*a}manhattanDistance(n){const r=Point.create(n);return Math.abs(r.x-this.x)+Math.abs(r.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(n=new Point){const r=Point.create(n),o=-(r.y-this.y),a=r.x-this.x;let l=Math.atan2(o,a);return l<0&&(l=2*Math.PI+l),180*l/Math.PI}angleBetween(n,r){if(this.equals(n)||this.equals(r))return NaN;let o=this.theta(r)-this.theta(n);return o<0&&(o+=360),o}vectorAngle(n){return new Point(0,0).angleBetween(this,n)}toPolar(n){return this.update(Point.toPolar(this,n)),this}changeInAngle(n,r,o=new Point){return this.clone().translate(-n,-r).theta(o)-this.theta(o)}adhereToRect(n){return GeometryUtil.containsPoint(n,this)||(this.x=Math.min(Math.max(this.x,n.x),n.x+n.width),this.y=Math.min(Math.max(this.y,n.y),n.y+n.height)),this}bearing(n){const r=Point.create(n),o=Angle.toRad(this.y),a=Angle.toRad(r.y),l=this.x,s=r.x,u=Angle.toRad(s-l),c=Math.sin(u)*Math.cos(a),d=Math.cos(o)*Math.sin(a)-Math.sin(o)*Math.cos(a)*Math.cos(u),f=Angle.toDeg(Math.atan2(c,d)),p=["NE","E","SE","S","SW","W","NW","N"];let v=f-22.5;return v<0&&(v+=360),v=parseInt(v/45,10),p[v]}cross(n,r){if(n!=null&&r!=null){const o=Point.create(n),a=Point.create(r);return(a.x-this.x)*(o.y-this.y)-(a.y-this.y)*(o.x-this.x)}return NaN}dot(n){const r=Point.create(n);return this.x*r.x+this.y*r.y}diff(n,r){if(typeof n=="number")return new Point(this.x-n,this.y-r);const o=Point.create(n);return new Point(this.x-o.x,this.y-o.y)}lerp(n,r){const o=Point.create(n);return new Point((1-r)*this.x+r*o.x,(1-r)*this.y+r*o.y)}normalize(n=1){const r=n/this.magnitude();return this.scale(r,r)}move(n,r){const o=Point.create(n),a=Angle.toRad(o.theta(this));return this.translate(Math.cos(a)*r,-Math.sin(a)*r)}reflection(n){return Point.create(n).move(this,this.distance(n))}snapToGrid(n,r){return this.x=GeometryUtil.snapToGrid(this.x,n),this.y=GeometryUtil.snapToGrid(this.y,r??n),this}equals(n){const r=Point.create(n);return r!=null&&r.x===this.x&&r.y===this.y}clone(){return Point.clone(this)}toJSON(){return Point.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(i){function n(r){return r!=null&&r instanceof i}i.isPoint=n})(Point||(Point={})),function(i){function n(o){return o!=null&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"}i.isPointLike=n;function r(o){return o!=null&&Array.isArray(o)&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"}i.isPointData=r}(Point||(Point={})),function(i){function n(p,v){return p==null||typeof p=="number"?new i(p,v):r(p)}i.create=n;function r(p){return i.isPoint(p)?new i(p.x,p.y):Array.isArray(p)?new i(p[0],p[1]):new i(p.x,p.y)}i.clone=r;function o(p){return i.isPoint(p)?{x:p.x,y:p.y}:Array.isArray(p)?{x:p[0],y:p[1]}:{x:p.x,y:p.y}}i.toJSON=o;function a(p,v,m=new i){let g=Math.abs(p*Math.cos(v)),_=Math.abs(p*Math.sin(v));const y=r(m),b=Angle.normalize(Angle.toDeg(v));return b<90?_=-_:b<180?(g=-g,_=-_):b<270&&(g=-g),new i(y.x+g,y.y+_)}i.fromPolar=a;function l(p,v=new i){const m=r(p),g=r(v),_=m.x-g.x,y=m.y-g.y;return new i(Math.sqrt(_*_+y*y),Angle.toRad(g.theta(m)))}i.toPolar=l;function s(p,v){return p===v?!0:p!=null&&v!=null?p.x===v.x&&p.y===v.y:!1}i.equals=s;function u(p,v){if(p==null&&v!=null||p!=null&&v==null||p!=null&&v!=null&&p.length!==v.length)return!1;if(p!=null&&v!=null){for(let m=0,g=p.length;m<g;m+=1)if(!s(p[m],v[m]))return!1}return!0}i.equalPoints=u;function c(p,v,m,g){return new i(GeometryUtil.random(p,v),GeometryUtil.random(m,g))}i.random=c;function d(p,v,m){const g=Angle.toRad(Angle.normalize(-v)),_=Math.sin(g),y=Math.cos(g);return f(p,y,_,m)}i.rotate=d;function f(p,v,m,g=new i){const _=r(p),y=r(g),b=_.x-y.x,x=_.y-y.y,C=b*v-x*m,w=x*v+b*m;return new i(C+y.x,w+y.y)}i.rotateEx=f}(Point||(Point={}));class Rectangle extends Geometry{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new Point(this.x,this.y)}get topLeft(){return new Point(this.x,this.y)}get topCenter(){return new Point(this.x+this.width/2,this.y)}get topRight(){return new Point(this.x+this.width,this.y)}get center(){return new Point(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new Point(this.x,this.y+this.height)}get bottomCenter(){return new Point(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new Point(this.x+this.width,this.y+this.height)}get corner(){return new Point(this.x+this.width,this.y+this.height)}get rightMiddle(){return new Point(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new Point(this.x,this.y+this.height/2)}get topLine(){return new Line(this.topLeft,this.topRight)}get rightLine(){return new Line(this.topRight,this.bottomRight)}get bottomLine(){return new Line(this.bottomLeft,this.bottomRight)}get leftLine(){return new Line(this.topLeft,this.bottomLeft)}constructor(n,r,o,a){super(),this.x=n??0,this.y=r??0,this.width=o??0,this.height=a??0}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(n){if(!n)return this.clone();const r=Angle.toRad(n),o=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r)),l=this.width*a+this.height*o,s=this.width*o+this.height*a;return new Rectangle(this.x+(this.width-l)/2,this.y+(this.height-s)/2,l,s)}round(n=0){return this.x=GeometryUtil.round(this.x,n),this.y=GeometryUtil.round(this.y,n),this.width=GeometryUtil.round(this.width,n),this.height=GeometryUtil.round(this.height,n),this}add(n,r,o,a){const l=Rectangle.create(n,r,o,a),s=Math.min(this.x,l.x),u=Math.min(this.y,l.y),c=Math.max(this.x+this.width,l.x+l.width),d=Math.max(this.y+this.height,l.y+l.height);return this.x=s,this.y=u,this.width=c-s,this.height=d-u,this}update(n,r,o,a){const l=Rectangle.create(n,r,o,a);return this.x=l.x,this.y=l.y,this.width=l.width,this.height=l.height,this}inflate(n,r){const o=n,a=r??n;return this.x-=o,this.y-=a,this.width+=2*o,this.height+=2*a,this}snapToGrid(n,r){const o=this.origin.snapToGrid(n,r),a=this.corner.snapToGrid(n,r);return this.x=o.x,this.y=o.y,this.width=a.x-o.x,this.height=a.y-o.y,this}translate(n,r){const o=Point.create(n,r);return this.x+=o.x,this.y+=o.y,this}scale(n,r,o=new Point){const a=this.origin.scale(n,r,o);return this.x=a.x,this.y=a.y,this.width*=n,this.height*=r,this}rotate(n,r=this.getCenter()){if(n!==0){const o=Angle.toRad(n),a=Math.cos(o),l=Math.sin(o);let s=this.getOrigin(),u=this.getTopRight(),c=this.getBottomRight(),d=this.getBottomLeft();s=Point.rotateEx(s,a,l,r),u=Point.rotateEx(u,a,l,r),c=Point.rotateEx(c,a,l,r),d=Point.rotateEx(d,a,l,r);const f=new Rectangle(s.x,s.y,0,0);f.add(u.x,u.y,0,0),f.add(c.x,c.y,0,0),f.add(d.x,d.y,0,0),this.update(f)}return this}rotate90(){const n=(this.width-this.height)/2;this.x+=n,this.y-=n;const r=this.width;return this.width=this.height,this.height=r,this}moveAndExpand(n){const r=Rectangle.clone(n);return this.x+=r.x||0,this.y+=r.y||0,this.width+=r.width||0,this.height+=r.height||0,this}getMaxScaleToFit(n,r=this.center){const o=Rectangle.clone(n),a=r.x,l=r.y;let s=1/0,u=1/0,c=1/0,d=1/0,f=1/0,p=1/0,v=1/0,m=1/0;const g=o.topLeft;g.x<a&&(s=(this.x-a)/(g.x-a)),g.y<l&&(f=(this.y-l)/(g.y-l));const _=o.bottomRight;_.x>a&&(u=(this.x+this.width-a)/(_.x-a)),_.y>l&&(p=(this.y+this.height-l)/(_.y-l));const y=o.topRight;y.x>a&&(c=(this.x+this.width-a)/(y.x-a)),y.y<l&&(v=(this.y-l)/(y.y-l));const b=o.bottomLeft;return b.x<a&&(d=(this.x-a)/(b.x-a)),b.y>l&&(m=(this.y+this.height-l)/(b.y-l)),{sx:Math.min(s,u,c,d),sy:Math.min(f,p,v,m)}}getMaxUniformScaleToFit(n,r=this.center){const o=this.getMaxScaleToFit(n,r);return Math.min(o.sx,o.sy)}containsPoint(n,r){return GeometryUtil.containsPoint(this,Point.create(n,r))}containsRect(n,r,o,a){const l=Rectangle.create(n,r,o,a),s=this.x,u=this.y,c=this.width,d=this.height,f=l.x,p=l.y,v=l.width,m=l.height;return c===0||d===0||v===0||m===0?!1:f>=s&&p>=u&&f+v<=s+c&&p+m<=u+d}intersectsWithLine(n){const r=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],o=[],a=[];return r.forEach(l=>{const s=n.intersectsWithLine(l);s!==null&&a.indexOf(s.toString())<0&&(o.push(s),a.push(s.toString()))}),o.length>0?o:null}intersectsWithLineFromCenterToPoint(n,r){const o=Point.clone(n),a=this.center;let l=null;r!=null&&r!==0&&o.rotate(r,a);const s=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],u=new Line(a,o);for(let c=s.length-1;c>=0;c-=1){const d=s[c].intersectsWithLine(u);if(d!==null){l=d;break}}return l&&r!=null&&r!==0&&l.rotate(-r,a),l}intersectsWithRect(n,r,o,a){const l=Rectangle.create(n,r,o,a);if(!this.isIntersectWithRect(l))return null;const s=this.origin,u=this.corner,c=l.origin,d=l.corner,f=Math.max(s.x,c.x),p=Math.max(s.y,c.y);return new Rectangle(f,p,Math.min(u.x,d.x)-f,Math.min(u.y,d.y)-p)}isIntersectWithRect(n,r,o,a){const l=Rectangle.create(n,r,o,a),s=this.origin,u=this.corner,c=l.origin,d=l.corner;return!(d.x<=s.x||d.y<=s.y||c.x>=u.x||c.y>=u.y)}normalize(){let n=this.x,r=this.y,o=this.width,a=this.height;return this.width<0&&(n=this.x+this.width,o=-this.width),this.height<0&&(r=this.y+this.height,a=-this.height),this.x=n,this.y=r,this.width=o,this.height=a,this}union(n){const r=Rectangle.clone(n),o=this.origin,a=this.corner,l=r.origin,s=r.corner,u=Math.min(o.x,l.x),c=Math.min(o.y,l.y),d=Math.max(a.x,s.x),f=Math.max(a.y,s.y);return new Rectangle(u,c,d-u,f-c)}getNearestSideToPoint(n){const r=Point.clone(n),o=r.x-this.x,a=this.x+this.width-r.x,l=r.y-this.y,s=this.y+this.height-r.y;let u=o,c="left";return a<u&&(u=a,c="right"),l<u&&(u=l,c="top"),s<u&&(c="bottom"),c}getNearestPointToPoint(n){const r=Point.clone(n);if(this.containsPoint(r)){const o=this.getNearestSideToPoint(r);if(o==="left")return new Point(this.x,r.y);if(o==="top")return new Point(r.x,this.y);if(o==="right")return new Point(this.x+this.width,r.y);if(o==="bottom")return new Point(r.x,this.y+this.height)}return r.adhereToRect(this)}equals(n){return n!=null&&n.x===this.x&&n.y===this.y&&n.width===this.width&&n.height===this.height}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(i){function n(r){return r!=null&&r instanceof i}i.isRectangle=n})(Rectangle||(Rectangle={})),function(i){function n(r){return r!=null&&typeof r=="object"&&typeof r.x=="number"&&typeof r.y=="number"&&typeof r.width=="number"&&typeof r.height=="number"}i.isRectangleLike=n}(Rectangle||(Rectangle={})),function(i){function n(s,u,c,d){return s==null||typeof s=="number"?new i(s,u,c,d):r(s)}i.create=n;function r(s){return i.isRectangle(s)?s.clone():Array.isArray(s)?new i(s[0],s[1],s[2],s[3]):new i(s.x,s.y,s.width,s.height)}i.clone=r;function o(s){return new i(s.x-s.a,s.y-s.b,2*s.a,2*s.b)}i.fromEllipse=o;function a(s){return new i(0,0,s.width,s.height)}i.fromSize=a;function l(s,u){return new i(s.x,s.y,u.width,u.height)}i.fromPositionAndSize=l}(Rectangle||(Rectangle={}));class Line extends Geometry{get center(){return new Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(n,r,o,a){super(),typeof n=="number"&&typeof r=="number"?(this.start=new Point(n,r),this.end=new Point(o,a)):(this.start=Point.create(n),this.end=Point.create(r))}getCenter(){return this.center}round(n=0){return this.start.round(n),this.end.round(n),this}translate(n,r){return typeof n=="number"?(this.start.translate(n,r),this.end.translate(n,r)):(this.start.translate(n),this.end.translate(n)),this}rotate(n,r){return this.start.rotate(n,r),this.end.rotate(n,r),this}scale(n,r,o){return this.start.scale(n,r,o),this.end.scale(n,r,o),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const n=this.start.x-this.end.x,r=this.start.y-this.end.y;return n*n+r*r}setLength(n){const r=this.length();if(!r)return this;const o=n/r;return this.scale(o,o,this.start)}parallel(n){const r=this.clone();if(!r.isDifferentiable())return r;const{start:o,end:a}=r,l=o.clone().rotate(270,a),s=a.clone().rotate(90,o);return o.move(s,n),a.move(l,n),r}vector(){return new Point(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const n=new Point(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,n)}bbox(){const n=Math.min(this.start.x,this.end.x),r=Math.min(this.start.y,this.end.y),o=Math.max(this.start.x,this.end.x),a=Math.max(this.start.y,this.end.y);return new Rectangle(n,r,o-n,a-r)}bearing(){return this.start.bearing(this.end)}closestPoint(n){return this.pointAt(this.closestPointNormalizedLength(n))}closestPointLength(n){return this.closestPointNormalizedLength(n)*this.length()}closestPointTangent(n){return this.tangentAt(this.closestPointNormalizedLength(n))}closestPointNormalizedLength(n){const r=this.vector().dot(new Line(this.start,n).vector()),o=Math.min(1,Math.max(0,r/this.squaredLength()));return Number.isNaN(o)?0:o}pointAt(n){const r=this.start,o=this.end;return n<=0?r.clone():n>=1?o.clone():r.lerp(o,n)}pointAtLength(n){const r=this.start,o=this.end;let a=!0;n<0&&(a=!1,n=-n);const l=this.length();if(n>=l)return a?o.clone():r.clone();const s=(a?n:l-n)/l;return this.pointAt(s)}divideAt(n){const r=this.pointAt(n);return[new Line(this.start,r),new Line(r,this.end)]}divideAtLength(n){const r=this.pointAtLength(n);return[new Line(this.start,r),new Line(r,this.end)]}containsPoint(n){const r=this.start,o=this.end;if(r.cross(n,o)!==0)return!1;const a=this.length();return!(new Line(r,n).length()>a||new Line(n,o).length()>a)}intersect(n,r){const o=n.intersectsWithLine(this,r);return o?Array.isArray(o)?o:[o]:null}intersectsWithLine(n){const r=new Point(this.end.x-this.start.x,this.end.y-this.start.y),o=new Point(n.end.x-n.start.x,n.end.y-n.start.y),a=r.x*o.y-r.y*o.x,l=new Point(n.start.x-this.start.x,n.start.y-this.start.y),s=l.x*o.y-l.y*o.x,u=l.x*r.y-l.y*r.x;if(a===0||s*a<0||u*a<0)return null;if(a>0){if(s>a||u>a)return null}else if(s<a||u<a)return null;return new Point(this.start.x+s*r.x/a,this.start.y+s*r.y/a)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(n){const r=Point.clone(n),o=this.start,a=this.end;return((a.x-o.x)*(r.y-o.y)-(a.y-o.y)*(r.x-o.x))/this.length()}pointSquaredDistance(n,r){const o=Point.create(n,r);return this.closestPoint(o).squaredDistance(o)}pointDistance(n,r){const o=Point.create(n,r);return this.closestPoint(o).distance(o)}tangentAt(n){if(!this.isDifferentiable())return null;const r=this.start,o=this.end,a=this.pointAt(n),l=new Line(r,o);return l.translate(a.x-r.x,a.y-r.y),l}tangentAtLength(n){if(!this.isDifferentiable())return null;const r=this.start,o=this.end,a=this.pointAtLength(n),l=new Line(r,o);return l.translate(a.x-r.x,a.y-r.y),l}relativeCcw(n,r){const o=Point.create(n,r);let a=o.x-this.start.x,l=o.y-this.start.y;const s=this.end.x-this.start.x,u=this.end.y-this.start.y;let c=a*u-l*s;return c===0&&(c=a*s+l*u,c>0&&(a-=s,l-=u,c=a*s+l*u,c<0&&(c=0))),c<0?-1:c>0?1:0}equals(n){return n!=null&&this.start.x===n.start.x&&this.start.y===n.start.y&&this.end.x===n.end.x&&this.end.y===n.end.y}clone(){return new Line(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(i){function n(r){return r!=null&&r instanceof i}i.isLine=n})(Line||(Line={}));class Ellipse extends Geometry{get center(){return new Point(this.x,this.y)}constructor(n,r,o,a){super(),this.x=n??0,this.y=r??0,this.a=o??0,this.b=a??0}bbox(){return Rectangle.fromEllipse(this)}getCenter(){return this.center}inflate(n,r){const o=n,a=r??n;return this.a+=2*o,this.b+=2*a,this}normalizedDistance(n,r){const o=Point.create(n,r),a=o.x-this.x,l=o.y-this.y,s=this.a,u=this.b;return a*a/(s*s)+l*l/(u*u)}containsPoint(n,r){return this.normalizedDistance(n,r)<=1}intersectsWithLine(n){const r=[],o=this.a,a=this.b,l=n.start,s=n.end,u=n.vector(),c=l.diff(new Point(this.x,this.y)),d=new Point(u.x/(o*o),u.y/(a*a)),f=new Point(c.x/(o*o),c.y/(a*a)),p=u.dot(d),v=u.dot(f),m=c.dot(f)-1,g=v*v-p*m;if(g<0)return null;if(g>0){const _=Math.sqrt(g),y=(-v-_)/p,b=(-v+_)/p;if((y<0||y>1)&&(b<0||b>1))return null;y>=0&&y<=1&&r.push(l.lerp(s,y)),b>=0&&b<=1&&r.push(l.lerp(s,b))}else{const _=-v/p;if(_>=0&&_<=1)r.push(l.lerp(s,_));else return null}return r}intersectsWithLineFromCenterToPoint(n,r=0){const o=Point.clone(n);r&&o.rotate(r,this.getCenter());const a=o.x-this.x,l=o.y-this.y;let s;if(a===0)return s=this.bbox().getNearestPointToPoint(o),r?s.rotate(-r,this.getCenter()):s;const u=l/a,c=u*u,d=this.a*this.a,f=this.b*this.b;let p=Math.sqrt(1/(1/d+c/f));p=a<0?-p:p;const v=u*p;return s=new Point(this.x+p,this.y+v),r?s.rotate(-r,this.getCenter()):s}tangentTheta(n){const r=Point.clone(n),o=r.x,a=r.y,l=this.a,s=this.b,u=this.bbox().center,c=u.x,d=u.y,f=30,p=o>u.x+l/2,v=o<u.x-l/2;let m,g;return p||v?(g=o>u.x?a-f:a+f,m=l*l/(o-c)-l*l*(a-d)*(g-d)/(s*s*(o-c))+c):(m=a>u.y?o+f:o-f,g=s*s/(a-d)-s*s*(o-c)*(m-c)/(l*l*(a-d))+d),new Point(m,g).theta(r)}scale(n,r){return this.a*=n,this.b*=r,this}rotate(n,r){const o=Rectangle.fromEllipse(this);o.rotate(n,r);const a=Ellipse.fromRect(o);return this.a=a.a,this.b=a.b,this.x=a.x,this.y=a.y,this}translate(n,r){const o=Point.create(n,r);return this.x+=o.x,this.y+=o.y,this}equals(n){return n!=null&&n.x===this.x&&n.y===this.y&&n.a===this.a&&n.b===this.b}clone(){return new Ellipse(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(i){function n(r){return r!=null&&r instanceof i}i.isEllipse=n})(Ellipse||(Ellipse={})),function(i){function n(a,l,s,u){return a==null||typeof a=="number"?new i(a,l,s,u):r(a)}i.create=n;function r(a){return i.isEllipse(a)?a.clone():Array.isArray(a)?new i(a[0],a[1],a[2],a[3]):new i(a.x,a.y,a.a,a.b)}i.parse=r;function o(a){const l=a.center;return new i(l.x,l.y,a.width/2,a.height/2)}i.fromRect=o}(Ellipse||(Ellipse={}));const regexSupportedData=new RegExp("^[\\s\\dLMCZz,.]*$");function isValid(i){return typeof i!="string"?!1:regexSupportedData.test(i)}function mod(i,n){return(i%n+n)%n}function draw(i,n,r,o,a){const l=[],s=i[i.length-1],u=n!=null&&n>0,c=n||0;if(o&&u){i=i.slice();const p=i[0],v=new Point(s.x+(p.x-s.x)/2,s.y+(p.y-s.y)/2);i.splice(0,0,v)}let d=i[0],f=1;for(r?l.push("M",d.x,d.y):l.push("L",d.x,d.y);f<(o?i.length:i.length-1);){let p=i[mod(f,i.length)],v=d.x-p.x,m=d.y-p.y;if(u&&(v!==0||m!==0)&&(a==null||a.indexOf(f-1)<0)){let g=Math.sqrt(v*v+m*m);const _=v*Math.min(c,g/2)/g,y=m*Math.min(c,g/2)/g,b=p.x+_,x=p.y+y;l.push("L",b,x);let C=i[mod(f+1,i.length)];for(;f<i.length-2&&Math.round(C.x-p.x)===0&&Math.round(C.y-p.y)===0;)C=i[mod(f+2,i.length)],f+=1;v=C.x-p.x,m=C.y-p.y,g=Math.max(1,Math.sqrt(v*v+m*m));const w=v*Math.min(c,g/2)/g,E=m*Math.min(c,g/2)/g,$=p.x+w,S=p.y+E;l.push("Q",p.x,p.y,$,S),p=new Point($,S)}else l.push("L",p.x,p.y);d=p,f+=1}return o?l.push("Z"):l.push("L",s.x,s.y),l.map(p=>typeof p=="string"?p:+p.toFixed(3)).join(" ")}function drawPoints(i,n={}){const r=[];return i&&i.length&&i.forEach(o=>{Array.isArray(o)?r.push({x:o[0],y:o[1]}):r.push({x:o.x,y:o.y})}),draw(r,n.round,n.initialMove==null||n.initialMove,n.close,n.exclude)}function arcToCurves(i,n,r,o,a=0,l=0,s=0,u,c){if(r===0||o===0)return[];u-=i,c-=n,r=Math.abs(r),o=Math.abs(o);const d=-u/2,f=-c/2,p=Math.cos(a*Math.PI/180),v=Math.sin(a*Math.PI/180),m=p*d+v*f,g=-1*v*d+p*f,_=m*m,y=g*g,b=r*r,x=o*o,C=_/b+y/x;let w;if(C>1)r=Math.sqrt(C)*r,o=Math.sqrt(C)*o,w=0;else{let j=1;l===s&&(j=-1),w=j*Math.sqrt((b*x-b*y-x*_)/(b*y+x*_))}const E=w*r*g/o,$=-1*w*o*m/r,S=p*E-v*$+u/2,V=v*E+p*$+c/2;let k=Math.atan2((g-$)/o,(m-E)/r)-Math.atan2(0,1),P=k>=0?k:2*Math.PI+k;k=Math.atan2((-g-$)/o,(-m-E)/r)-Math.atan2((g-$)/o,(m-E)/r);let B=k>=0?k:2*Math.PI+k;s===0&&B>0?B-=2*Math.PI:s!==0&&B<0&&(B+=2*Math.PI);const T=B*2/Math.PI,N=Math.ceil(T<0?-1*T:T),O=B/N,I=8/3*Math.sin(O/4)*Math.sin(O/4)/Math.sin(O/2),L=p*r,D=p*o,F=v*r,M=v*o;let R=Math.cos(P),z=Math.sin(P),U=-I*(L*z+M*R),G=-I*(F*z-D*R),J=0,te=0;const ae=[];for(let j=0;j<N;j+=1){P+=O,R=Math.cos(P),z=Math.sin(P),J=L*R-M*z+S,te=F*R+D*z+V;const ee=-I*(L*z+M*R),le=-I*(F*z-D*R),se=j*6;ae[se]=Number(U+i),ae[se+1]=Number(G+n),ae[se+2]=Number(J-ee+i),ae[se+3]=Number(te-le+n),ae[se+4]=Number(J+i),ae[se+5]=Number(te+n),U=J+ee,G=te+le}return ae.map(j=>+j.toFixed(2))}function drawArc(i,n,r,o,a=0,l=0,s=0,u,c){const d=[],f=arcToCurves(i,n,r,o,a,l,s,u,c);if(f!=null)for(let p=0,v=f.length;p<v;p+=6)d.push("C",f[p],f[p+1],f[p+2],f[p+3],f[p+4],f[p+5]);return d.join(" ")}class Polyline extends Geometry{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(n){if(super(),n!=null){if(typeof n=="string")return Polyline.parse(n);this.points=n.map(r=>Point.create(r))}else this.points=[]}scale(n,r,o=new Point){return this.points.forEach(a=>a.scale(n,r,o)),this}rotate(n,r){return this.points.forEach(o=>o.rotate(n,r)),this}translate(n,r){const o=Point.create(n,r);return this.points.forEach(a=>a.translate(o.x,o.y)),this}round(n=0){return this.points.forEach(r=>r.round(n)),this}bbox(){if(this.points.length===0)return new Rectangle;let n=1/0,r=-1/0,o=1/0,a=-1/0;const l=this.points;for(let s=0,u=l.length;s<u;s+=1){const c=l[s],d=c.x,f=c.y;d<n&&(n=d),d>r&&(r=d),f<o&&(o=f),f>a&&(a=f)}return new Rectangle(n,o,r-n,a-o)}closestPoint(n){const r=this.closestPointLength(n);return this.pointAtLength(r)}closestPointLength(n){const r=this.points,o=r.length;if(o===0||o===1)return 0;let a=0,l=0,s=1/0;for(let u=0,c=o-1;u<c;u+=1){const d=new Line(r[u],r[u+1]),f=d.length(),p=d.closestPointNormalizedLength(n),m=d.pointAt(p).squaredDistance(n);m<s&&(s=m,l=a+p*f),a+=f}return l}closestPointNormalizedLength(n){const r=this.length();return r===0?0:this.closestPointLength(n)/r}closestPointTangent(n){const r=this.closestPointLength(n);return this.tangentAtLength(r)}containsPoint(n){if(this.points.length===0)return!1;const r=Point.clone(n),o=r.x,a=r.y,l=this.points,s=l.length;let u=s-1,c=0;for(let d=0;d<s;d+=1){const f=l[u],p=l[d];if(r.equals(f))return!0;const v=new Line(f,p);if(v.containsPoint(n))return!0;if(a<=f.y&&a>p.y||a>f.y&&a<=p.y){const m=f.x-o>p.x-o?f.x-o:p.x-o;if(m>=0){const g=new Point(o+m,a),_=new Line(n,g);v.intersectsWithLine(_)&&(c+=1)}}u=d}return c%2===1}intersectsWithLine(n){const r=[];for(let o=0,a=this.points.length-1;o<a;o+=1){const l=this.points[o],s=this.points[o+1],u=n.intersectsWithLine(new Line(l,s));u&&r.push(u)}return r.length>0?r:null}isDifferentiable(){for(let n=0,r=this.points.length-1;n<r;n+=1){const o=this.points[n],a=this.points[n+1];if(new Line(o,a).isDifferentiable())return!0}return!1}length(){let n=0;for(let r=0,o=this.points.length-1;r<o;r+=1){const a=this.points[r],l=this.points[r+1];n+=a.distance(l)}return n}pointAt(n){const r=this.points,o=r.length;if(o===0)return null;if(o===1||n<=0)return r[0].clone();if(n>=1)return r[o-1].clone();const l=this.length()*n;return this.pointAtLength(l)}pointAtLength(n){const r=this.points,o=r.length;if(o===0)return null;if(o===1)return r[0].clone();let a=!0;n<0&&(a=!1,n=-n);let l=0;for(let u=0,c=o-1;u<c;u+=1){const d=a?u:c-1-u,f=r[d],p=r[d+1],v=new Line(f,p),m=f.distance(p);if(n<=l+m)return v.pointAtLength((a?1:-1)*(n-l));l+=m}return(a?r[o-1]:r[0]).clone()}tangentAt(n){const o=this.points.length;if(o===0||o===1)return null;n<0&&(n=0),n>1&&(n=1);const l=this.length()*n;return this.tangentAtLength(l)}tangentAtLength(n){const r=this.points,o=r.length;if(o===0||o===1)return null;let a=!0;n<0&&(a=!1,n=-n);let l,s=0;for(let u=0,c=o-1;u<c;u+=1){const d=a?u:c-1-u,f=r[d],p=r[d+1],v=new Line(f,p),m=f.distance(p);if(v.isDifferentiable()){if(n<=s+m)return v.tangentAtLength((a?1:-1)*(n-s));l=v}s+=m}if(l){const u=a?1:0;return l.tangentAt(u)}return null}simplify(n={}){const r=this.points;if(r.length<3)return this;const o=n.threshold||0;let a=0;for(;r[a+2];){const l=a,s=a+1,u=a+2,c=r[l],d=r[s],f=r[u];new Line(c,f).closestPoint(d).distance(d)<=o?r.splice(s,1):a+=1}return this}toHull(){const n=this.points,r=n.length;if(r===0)return new Polyline;let o=n[0];for(let v=1;v<r;v+=1)(n[v].y<o.y||n[v].y===o.y&&n[v].x>o.x)&&(o=n[v]);const a=[];for(let v=0;v<r;v+=1){let m=o.theta(n[v]);m===0&&(m=360),a.push([n[v],v,m])}if(a.sort((v,m)=>{let g=v[2]-m[2];return g===0&&(g=m[1]-v[1]),g}),a.length>2){const v=a[a.length-1];a.unshift(v)}const l={},s=[],u=v=>`${v[0].toString()}@${v[1]}`;for(;a.length!==0;){const v=a.pop(),m=v[0];if(l[u(v)])continue;let g=!1;for(;!g;)if(s.length<2)s.push(v),g=!0;else{const _=s.pop(),y=_[0],b=s.pop(),x=b[0],C=x.cross(y,m);if(C<0)s.push(b),s.push(_),s.push(v),g=!0;else if(C===0){const E=y.angleBetween(x,m);Math.abs(E-180)<1e-10||y.equals(m)||x.equals(y)?(l[u(_)]=y,s.push(b)):Math.abs((E+1)%360-1)<1e-10&&(s.push(b),a.push(_))}else l[u(_)]=y,s.push(b)}}s.length>2&&s.pop();let c,d=-1;for(let v=0,m=s.length;v<m;v+=1){const g=s[v][1];(c===void 0||g<c)&&(c=g,d=v)}let f=[];if(d>0){const v=s.slice(d),m=s.slice(0,d);f=v.concat(m)}else f=s;const p=[];for(let v=0,m=f.length;v<m;v+=1)p.push(f[v][0]);return new Polyline(p)}equals(n){return n==null||n.points.length!==this.points.length?!1:n.points.every((r,o)=>r.equals(this.points[o]))}clone(){return new Polyline(this.points.map(n=>n.clone()))}toJSON(){return this.points.map(n=>n.toJSON())}serialize(){return this.points.map(n=>`${n.serialize()}`).join(" ")}}(function(i){function n(r){return r!=null&&r instanceof i}i.isPolyline=n})(Polyline||(Polyline={})),function(i){function n(r){const o=r.trim();if(o==="")return new i;const a=[],l=o.split(/\s*,\s*|\s+/);for(let s=0,u=l.length;s<u;s+=2)a.push({x:+l[s],y:+l[s+1]});return new i(a)}i.parse=n}(Polyline||(Polyline={}));class Curve extends Geometry{constructor(n,r,o,a){super(),this.PRECISION=3,this.start=Point.create(n),this.controlPoint1=Point.create(r),this.controlPoint2=Point.create(o),this.end=Point.create(a)}bbox(){const n=this.start,r=this.controlPoint1,o=this.controlPoint2,a=this.end,l=n.x,s=n.y,u=r.x,c=r.y,d=o.x,f=o.y,p=a.x,v=a.y,m=[],g=[[],[]];let _,y,b,x,C,w,E,$;for(let L=0;L<2;L+=1){if(L===0?(y=6*l-12*u+6*d,_=-3*l+9*u-9*d+3*p,b=3*u-3*l):(y=6*s-12*c+6*f,_=-3*s+9*c-9*f+3*v,b=3*c-3*s),Math.abs(_)<1e-12){if(Math.abs(y)<1e-12)continue;x=-b/y,x>0&&x<1&&m.push(x);continue}E=y*y-4*b*_,$=Math.sqrt(E),!(E<0)&&(C=(-y+$)/(2*_),C>0&&C<1&&m.push(C),w=(-y-$)/(2*_),w>0&&w<1&&m.push(w))}let S,V,k,P=m.length;const B=P;for(;P;)P-=1,x=m[P],k=1-x,S=k*k*k*l+3*k*k*x*u+3*k*x*x*d+x*x*x*p,g[0][P]=S,V=k*k*k*s+3*k*k*x*c+3*k*x*x*f+x*x*x*v,g[1][P]=V;m[B]=0,m[B+1]=1,g[0][B]=l,g[1][B]=s,g[0][B+1]=p,g[1][B+1]=v,m.length=B+2,g[0].length=B+2,g[1].length=B+2;const T=Math.min.apply(null,g[0]),N=Math.min.apply(null,g[1]),O=Math.max.apply(null,g[0]),I=Math.max.apply(null,g[1]);return new Rectangle(T,N,O-T,I-N)}closestPoint(n,r={}){return this.pointAtT(this.closestPointT(n,r))}closestPointLength(n,r={}){const o=this.getOptions(r);return this.lengthAtT(this.closestPointT(n,o),o)}closestPointNormalizedLength(n,r={}){const o=this.getOptions(r),a=this.closestPointLength(n,o);if(!a)return 0;const l=this.length(o);return l===0?0:a/l}closestPointT(n,r={}){const o=this.getPrecision(r),a=this.getDivisions(r),l=Math.pow(10,-o);let s=null,u=0,c=0,d=0,f=0,p=0,v=null;const m=a.length;let g=m>0?1/m:0;for(a.forEach((_,y)=>{const b=_.start.distance(n),x=_.end.distance(n),C=b+x;(v==null||C<v)&&(s=_,u=y*g,c=(y+1)*g,d=b,f=x,v=C,p=_.endpointDistance())});;){const _=d?Math.abs(d-f)/d:0,y=f!=null?Math.abs(d-f)/f:0,b=_<l||y<l,x=d?d<p*l:!0,C=f?f<p*l:!0;if(b||(x||C))return d<=f?u:c;const E=s.divide(.5);g/=2;const $=E[0].start.distance(n),S=E[0].end.distance(n),V=$+S,k=E[1].start.distance(n),P=E[1].end.distance(n),B=k+P;V<=B?(s=E[0],c-=g,d=$,f=S):(s=E[1],u+=g,d=k,f=P)}}closestPointTangent(n,r={}){return this.tangentAtT(this.closestPointT(n,r))}containsPoint(n,r={}){return this.toPolyline(r).containsPoint(n)}divideAt(n,r={}){if(n<=0)return this.divideAtT(0);if(n>=1)return this.divideAtT(1);const o=this.tAt(n,r);return this.divideAtT(o)}divideAtLength(n,r={}){const o=this.tAtLength(n,r);return this.divideAtT(o)}divide(n){return this.divideAtT(n)}divideAtT(n){const r=this.start,o=this.controlPoint1,a=this.controlPoint2,l=this.end;if(n<=0)return[new Curve(r,r,r,r),new Curve(r,o,a,l)];if(n>=1)return[new Curve(r,o,a,l),new Curve(l,l,l,l)];const s=this.getSkeletonPoints(n),u=s.startControlPoint1,c=s.startControlPoint2,d=s.divider,f=s.dividerControlPoint1,p=s.dividerControlPoint2;return[new Curve(r,u,c,d),new Curve(d,f,p,l)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(n){const r=this.start,o=this.controlPoint1,a=this.controlPoint2,l=this.end;if(n<=0)return{startControlPoint1:r.clone(),startControlPoint2:r.clone(),divider:r.clone(),dividerControlPoint1:o.clone(),dividerControlPoint2:a.clone()};if(n>=1)return{startControlPoint1:o.clone(),startControlPoint2:a.clone(),divider:l.clone(),dividerControlPoint1:l.clone(),dividerControlPoint2:l.clone()};const s=new Line(r,o).pointAt(n),u=new Line(o,a).pointAt(n),c=new Line(a,l).pointAt(n),d=new Line(s,u).pointAt(n),f=new Line(u,c).pointAt(n),p=new Line(d,f).pointAt(n);return{startControlPoint1:s,startControlPoint2:d,divider:p,dividerControlPoint1:f,dividerControlPoint2:c}}getSubdivisions(n={}){const r=this.getPrecision(n);let o=[new Curve(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(r===0)return o;let a=this.endpointDistance();const l=Math.pow(10,-r);let s=0;for(;;){s+=1;const u=[];o.forEach(f=>{const p=f.divide(.5);u.push(p[0],p[1])});const c=u.reduce((f,p)=>f+p.endpointDistance(),0),d=c!==0?(c-a)/c:0;if(s>1&&d<l)return u;o=u,a=c}}length(n={}){return this.getDivisions(n).reduce((o,a)=>o+a.endpointDistance(),0)}lengthAtT(n,r={}){if(n<=0)return 0;const o=r.precision===void 0?this.PRECISION:r.precision;return this.divide(n)[0].length({precision:o})}pointAt(n,r={}){if(n<=0)return this.start.clone();if(n>=1)return this.end.clone();const o=this.tAt(n,r);return this.pointAtT(o)}pointAtLength(n,r={}){const o=this.tAtLength(n,r);return this.pointAtT(o)}pointAtT(n){return n<=0?this.start.clone():n>=1?this.end.clone():this.getSkeletonPoints(n).divider}isDifferentiable(){const n=this.start,r=this.controlPoint1,o=this.controlPoint2,a=this.end;return!(n.equals(r)&&r.equals(o)&&o.equals(a))}tangentAt(n,r={}){if(!this.isDifferentiable())return null;n<0?n=0:n>1&&(n=1);const o=this.tAt(n,r);return this.tangentAtT(o)}tangentAtLength(n,r={}){if(!this.isDifferentiable())return null;const o=this.tAtLength(n,r);return this.tangentAtT(o)}tangentAtT(n){if(!this.isDifferentiable())return null;n<0&&(n=0),n>1&&(n=1);const r=this.getSkeletonPoints(n),o=r.startControlPoint2,a=r.dividerControlPoint1,l=r.divider,s=new Line(o,a);return s.translate(l.x-o.x,l.y-o.y),s}getPrecision(n={}){return n.precision==null?this.PRECISION:n.precision}getDivisions(n={}){if(n.subdivisions!=null)return n.subdivisions;const r=this.getPrecision(n);return this.getSubdivisions({precision:r})}getOptions(n={}){const r=this.getPrecision(n),o=this.getDivisions(n);return{precision:r,subdivisions:o}}tAt(n,r={}){if(n<=0)return 0;if(n>=1)return 1;const o=this.getOptions(r),l=this.length(o)*n;return this.tAtLength(l,o)}tAtLength(n,r={}){let o=!0;n<0&&(o=!1,n=-n);const a=this.getPrecision(r),l=this.getDivisions(r),s={precision:a,subdivisions:l};let u=null,c,d,f=0,p=0,v=0;const m=l.length;let g=m>0?1/m:0;for(let b=0;b<m;b+=1){const x=o?b:m-1-b,C=l[b],w=C.endpointDistance();if(n<=v+w){u=C,c=x*g,d=(x+1)*g,f=o?n-v:w+v-n,p=o?w+v-n:n-v;break}v+=w}if(u==null)return o?1:0;const _=this.length(s),y=Math.pow(10,-a);for(;;){let b;if(b=_!==0?f/_:0,b<y)return c;if(b=_!==0?p/_:0,b<y)return d;let x,C;const w=u.divide(.5);g/=2;const E=w[0].endpointDistance(),$=w[1].endpointDistance();f<=E?(u=w[0],d-=g,x=f,C=E-x):(u=w[1],c+=g,x=f-E,C=$-x),f=x,p=C}}toPoints(n={}){const r=this.getDivisions(n),o=[r[0].start.clone()];return r.forEach(a=>o.push(a.end.clone())),o}toPolyline(n={}){return new Polyline(this.toPoints(n))}scale(n,r,o){return this.start.scale(n,r,o),this.controlPoint1.scale(n,r,o),this.controlPoint2.scale(n,r,o),this.end.scale(n,r,o),this}rotate(n,r){return this.start.rotate(n,r),this.controlPoint1.rotate(n,r),this.controlPoint2.rotate(n,r),this.end.rotate(n,r),this}translate(n,r){return typeof n=="number"?(this.start.translate(n,r),this.controlPoint1.translate(n,r),this.controlPoint2.translate(n,r),this.end.translate(n,r)):(this.start.translate(n),this.controlPoint1.translate(n),this.controlPoint2.translate(n),this.end.translate(n)),this}equals(n){return n!=null&&this.start.equals(n.start)&&this.controlPoint1.equals(n.controlPoint1)&&this.controlPoint2.equals(n.controlPoint2)&&this.end.equals(n.end)}clone(){return new Curve(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(i){function n(r){return r!=null&&r instanceof i}i.isCurve=n})(Curve||(Curve={})),function(i){function n(a){const l=a.length,s=[],u=[];let c=2;s[0]=a[0]/c;for(let d=1;d<l;d+=1)u[d]=1/c,c=(d<l-1?4:3.5)-u[d],s[d]=(a[d]-s[d-1])/c;for(let d=1;d<l;d+=1)s[l-d-1]-=u[l-d]*s[l-d];return s}function r(a){const l=a.map(v=>Point.clone(v)),s=[],u=[],c=l.length-1;if(c===1)return s[0]=new Point((2*l[0].x+l[1].x)/3,(2*l[0].y+l[1].y)/3),u[0]=new Point(2*s[0].x-l[0].x,2*s[0].y-l[0].y),[s,u];const d=[];for(let v=1;v<c-1;v+=1)d[v]=4*l[v].x+2*l[v+1].x;d[0]=l[0].x+2*l[1].x,d[c-1]=(8*l[c-1].x+l[c].x)/2;const f=n(d);for(let v=1;v<c-1;v+=1)d[v]=4*l[v].y+2*l[v+1].y;d[0]=l[0].y+2*l[1].y,d[c-1]=(8*l[c-1].y+l[c].y)/2;const p=n(d);for(let v=0;v<c;v+=1)s.push(new Point(f[v],p[v])),v<c-1?u.push(new Point(2*l[v+1].x-f[v+1],2*l[v+1].y-p[v+1])):u.push(new Point((l[c].x+f[c-1])/2,(l[c].y+p[c-1])/2));return[s,u]}function o(a){if(a==null||Array.isArray(a)&&a.length<2)throw new Error("At least 2 points are required");const l=r(a),s=[];for(let u=0,c=l[0].length;u<c;u+=1){const d=new Point(l[0][u].x,l[0][u].y),f=new Point(l[1][u].x,l[1][u].y);s.push(new i(a[u],d,f,a[u+1]))}return s}i.throughPoints=o}(Curve||(Curve={}));class Segment extends Geometry{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(n,r){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(n);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(n,r){if(n<=0)return 0;const o=this.length();return n>=1?o:o*n}divideAtT(n){if(this.divideAt)return this.divideAt(n);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(n){if(this.pointAt)return this.pointAt(n);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(n){if(this.tangentAt)return this.tangentAt(n);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class LineTo extends Segment{constructor(n,r){super(),Line.isLine(n)?this.endPoint=n.end.clone().round(2):this.endPoint=Point.create(n,r).round(2)}get type(){return"L"}get line(){return new Line(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(n){return this.line.closestPoint(n)}closestPointLength(n){return this.line.closestPointLength(n)}closestPointNormalizedLength(n){return this.line.closestPointNormalizedLength(n)}closestPointTangent(n){return this.line.closestPointTangent(n)}length(){return this.line.length()}divideAt(n){const r=this.line.divideAt(n);return[new LineTo(r[0]),new LineTo(r[1])]}divideAtLength(n){const r=this.line.divideAtLength(n);return[new LineTo(r[0]),new LineTo(r[1])]}getSubdivisions(){return[]}pointAt(n){return this.line.pointAt(n)}pointAtLength(n){return this.line.pointAtLength(n)}tangentAt(n){return this.line.tangentAt(n)}tangentAtLength(n){return this.line.tangentAtLength(n)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new LineTo(this.end)}scale(n,r,o){return this.end.scale(n,r,o),this}rotate(n,r){return this.end.rotate(n,r),this}translate(n,r){return typeof n=="number"?this.end.translate(n,r):this.end.translate(n),this}equals(n){return this.type===n.type&&this.start.equals(n.start)&&this.end.equals(n.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const n=this.end;return`${this.type} ${n.x} ${n.y}`}}(function(i){function n(...r){const o=r.length,a=r[0];if(Line.isLine(a))return new i(a);if(Point.isPointLike(a))return o===1?new i(a):r.map(s=>new i(s));if(o===2)return new i(+r[0],+r[1]);const l=[];for(let s=0;s<o;s+=2){const u=+r[s],c=+r[s+1];l.push(new i(u,c))}return l}i.create=n})(LineTo||(LineTo={}));class Close extends Segment{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new Line(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(n){return this.line.closestPoint(n)}closestPointLength(n){return this.line.closestPointLength(n)}closestPointNormalizedLength(n){return this.line.closestPointNormalizedLength(n)}closestPointTangent(n){return this.line.closestPointTangent(n)}length(){return this.line.length()}divideAt(n){const r=this.line.divideAt(n);return[r[1].isDifferentiable()?new LineTo(r[0]):this.clone(),new LineTo(r[1])]}divideAtLength(n){const r=this.line.divideAtLength(n);return[r[1].isDifferentiable()?new LineTo(r[0]):this.clone(),new LineTo(r[1])]}getSubdivisions(){return[]}pointAt(n){return this.line.pointAt(n)}pointAtLength(n){return this.line.pointAtLength(n)}tangentAt(n){return this.line.tangentAt(n)}tangentAtLength(n){return this.line.tangentAtLength(n)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(n){return this.type===n.type&&this.start.equals(n.start)&&this.end.equals(n.end)}clone(){return new Close}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(i){function n(){return new i}i.create=n})(Close||(Close={}));class MoveTo extends Segment{constructor(n,r){super(),this.isVisible=!1,this.isSubpathStart=!0,Line.isLine(n)||Curve.isCurve(n)?this.endPoint=n.end.clone().round(2):this.endPoint=Point.create(n,r).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(n,r,o){return this.end.scale(n,r,o),this}rotate(n,r){return this.end.rotate(n,r),this}translate(n,r){return typeof n=="number"?this.end.translate(n,r):this.end.translate(n),this}clone(){return new MoveTo(this.end)}equals(n){return this.type===n.type&&this.end.equals(n.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const n=this.end;return`${this.type} ${n.x} ${n.y}`}}(function(i){function n(...r){const o=r.length,a=r[0];if(Line.isLine(a))return new i(a);if(Curve.isCurve(a))return new i(a);if(Point.isPointLike(a)){if(o===1)return new i(a);const s=[];for(let u=0;u<o;u+=1)u===0?s.push(new i(r[u])):s.push(new LineTo(r[u]));return s}if(o===2)return new i(+r[0],+r[1]);const l=[];for(let s=0;s<o;s+=2){const u=+r[s],c=+r[s+1];s===0?l.push(new i(u,c)):l.push(new LineTo(u,c))}return l}i.create=n})(MoveTo||(MoveTo={}));class CurveTo extends Segment{constructor(n,r,o,a,l,s){super(),Curve.isCurve(n)?(this.controlPoint1=n.controlPoint1.clone().round(2),this.controlPoint2=n.controlPoint2.clone().round(2),this.endPoint=n.end.clone().round(2)):typeof n=="number"?(this.controlPoint1=new Point(n,r).round(2),this.controlPoint2=new Point(o,a).round(2),this.endPoint=new Point(l,s).round(2)):(this.controlPoint1=Point.create(n).round(2),this.controlPoint2=Point.create(r).round(2),this.endPoint=Point.create(o).round(2))}get type(){return"C"}get curve(){return new Curve(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(n){return this.curve.closestPoint(n)}closestPointLength(n){return this.curve.closestPointLength(n)}closestPointNormalizedLength(n){return this.curve.closestPointNormalizedLength(n)}closestPointTangent(n){return this.curve.closestPointTangent(n)}length(){return this.curve.length()}divideAt(n,r={}){const o=this.curve.divideAt(n,r);return[new CurveTo(o[0]),new CurveTo(o[1])]}divideAtLength(n,r={}){const o=this.curve.divideAtLength(n,r);return[new CurveTo(o[0]),new CurveTo(o[1])]}divideAtT(n){const r=this.curve.divideAtT(n);return[new CurveTo(r[0]),new CurveTo(r[1])]}getSubdivisions(){return[]}pointAt(n){return this.curve.pointAt(n)}pointAtLength(n){return this.curve.pointAtLength(n)}tangentAt(n){return this.curve.tangentAt(n)}tangentAtLength(n){return this.curve.tangentAtLength(n)}isDifferentiable(){if(!this.previousSegment)return!1;const n=this.start,r=this.controlPoint1,o=this.controlPoint2,a=this.end;return!(n.equals(r)&&r.equals(o)&&o.equals(a))}scale(n,r,o){return this.controlPoint1.scale(n,r,o),this.controlPoint2.scale(n,r,o),this.end.scale(n,r,o),this}rotate(n,r){return this.controlPoint1.rotate(n,r),this.controlPoint2.rotate(n,r),this.end.rotate(n,r),this}translate(n,r){return typeof n=="number"?(this.controlPoint1.translate(n,r),this.controlPoint2.translate(n,r),this.end.translate(n,r)):(this.controlPoint1.translate(n),this.controlPoint2.translate(n),this.end.translate(n)),this}equals(n){return this.start.equals(n.start)&&this.end.equals(n.end)&&this.controlPoint1.equals(n.controlPoint1)&&this.controlPoint2.equals(n.controlPoint2)}clone(){return new CurveTo(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const n=this.controlPoint1,r=this.controlPoint2,o=this.end;return[this.type,n.x,n.y,r.x,r.y,o.x,o.y].join(" ")}}(function(i){function n(...r){const o=r.length,a=r[0];if(Curve.isCurve(a))return new i(a);if(Point.isPointLike(a)){if(o===3)return new i(r[0],r[1],r[2]);const s=[];for(let u=0;u<o;u+=3)s.push(new i(r[u],r[u+1],r[u+2]));return s}if(o===6)return new i(r[0],r[1],r[2],r[3],r[4],r[5]);const l=[];for(let s=0;s<o;s+=6)l.push(new i(r[s],r[s+1],r[s+2],r[s+3],r[s+4],r[s+5]));return l}i.create=n})(CurveTo||(CurveTo={}));function rotate(i,n,r){return{x:i*Math.cos(r)-n*Math.sin(r),y:i*Math.sin(r)+n*Math.cos(r)}}function q2c(i,n,r,o,a,l){const s=.3333333333333333,u=2/3;return[s*i+u*r,s*n+u*o,s*a+u*r,s*l+u*o,a,l]}function a2c(i,n,r,o,a,l,s,u,c,d){const f=Math.PI*120/180,p=Math.PI/180*(+a||0);let v=[],m,g,_,y,b;if(d)g=d[0],_=d[1],y=d[2],b=d[3];else{m=rotate(i,n,-p),i=m.x,n=m.y,m=rotate(u,c,-p),u=m.x,c=m.y;const O=(i-u)/2,I=(n-c)/2;let L=O*O/(r*r)+I*I/(o*o);L>1&&(L=Math.sqrt(L),r=L*r,o=L*o);const D=r*r,F=o*o,M=(l===s?-1:1)*Math.sqrt(Math.abs((D*F-D*I*I-F*O*O)/(D*I*I+F*O*O)));y=M*r*I/o+(i+u)/2,b=M*-o*O/r+(n+c)/2,g=Math.asin((n-b)/o),_=Math.asin((c-b)/o),g=i<y?Math.PI-g:g,_=u<y?Math.PI-_:_,g<0&&(g=Math.PI*2+g),_<0&&(_=Math.PI*2+_),s&&g>_&&(g-=Math.PI*2),!s&&_>g&&(_-=Math.PI*2)}let x=_-g;if(Math.abs(x)>f){const O=_,I=u,L=c;_=g+f*(s&&_>g?1:-1),u=y+r*Math.cos(_),c=b+o*Math.sin(_),v=a2c(u,c,r,o,a,0,s,I,L,[_,O,y,b])}x=_-g;const C=Math.cos(g),w=Math.sin(g),E=Math.cos(_),$=Math.sin(_),S=Math.tan(x/4),V=4/3*(r*S),k=4/3*(o*S),P=[i,n],B=[i+V*w,n-k*C],T=[u+V*$,c-k*E],N=[u,c];if(B[0]=2*P[0]-B[0],B[1]=2*P[1]-B[1],d)return[B,T,N].concat(v);{v=[B,T,N].concat(v).join().split(",");const O=[],I=v.length;for(let L=0;L<I;L+=1)O[L]=L%2?rotate(+v[L-1],+v[L],p).y:rotate(+v[L],+v[L+1],p).x;return O}}function parse(i){if(!i)return null;const n=`
686
686
  \v\f\r   ᠎              \u2028\u2029`,r=new RegExp(`([a-z])[${n},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${n}]*,?[${n}]*)+)`,"ig"),o=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${n}]*,?[${n}]*`,"ig"),a={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},l=[];return i.replace(r,(s,u,c)=>{const d=[];let f=u.toLowerCase();c.replace(o,(v,m)=>(m&&d.push(+m),v)),f==="m"&&d.length>2&&(l.push([u,...d.splice(0,2)]),f="l",u=u==="m"?"l":"L");const p=a[f];for(;d.length>=p&&(l.push([u,...d.splice(0,p)]),!!p););return s}),l}function abs(i){const n=parse(i);if(!n||!n.length)return[["M",0,0]];let r=0,o=0,a=0,l=0;const s=[];for(let u=0,c=n.length;u<c;u+=1){const d=[];s.push(d);const f=n[u],p=f[0];if(p!==p.toUpperCase())switch(d[0]=p.toUpperCase(),d[0]){case"A":d[1]=f[1],d[2]=f[2],d[3]=f[3],d[4]=f[4],d[5]=f[5],d[6]=+f[6]+r,d[7]=+f[7]+o;break;case"V":d[1]=+f[1]+o;break;case"H":d[1]=+f[1]+r;break;case"M":a=+f[1]+r,l=+f[2]+o;for(let v=1,m=f.length;v<m;v+=1)d[v]=+f[v]+(v%2?r:o);break;default:for(let v=1,m=f.length;v<m;v+=1)d[v]=+f[v]+(v%2?r:o);break}else for(let v=0,m=f.length;v<m;v+=1)d[v]=f[v];switch(d[0]){case"Z":r=+a,o=+l;break;case"H":r=d[1];break;case"V":o=d[1];break;case"M":a=d[d.length-2],l=d[d.length-1],r=d[d.length-2],o=d[d.length-1];break;default:r=d[d.length-2],o=d[d.length-1];break}}return s}function normalize$1(i){const n=abs(i),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function o(c,d,f){let p,v;if(!c)return["C",d.x,d.y,d.x,d.y,d.x,d.y];switch(c[0]in{T:1,Q:1}||(d.qx=null,d.qy=null),c[0]){case"M":d.X=c[1],d.Y=c[2];break;case"A":return parseFloat(c[1])===0||parseFloat(c[2])===0?["L",c[6],c[7]]:["C"].concat(a2c.apply(0,[d.x,d.y].concat(c.slice(1))));case"S":return f==="C"||f==="S"?(p=d.x*2-d.bx,v=d.y*2-d.by):(p=d.x,v=d.y),["C",p,v].concat(c.slice(1));case"T":return f==="Q"||f==="T"?(d.qx=d.x*2-d.qx,d.qy=d.y*2-d.qy):(d.qx=d.x,d.qy=d.y),["C"].concat(q2c(d.x,d.y,d.qx,d.qy,c[1],c[2]));case"Q":return d.qx=c[1],d.qy=c[2],["C"].concat(q2c(d.x,d.y,c[1],c[2],c[3],c[4]));case"H":return["L"].concat(c[1],d.y);case"V":return["L"].concat(d.x,c[1])}return c}function a(c,d){if(c[d].length>7){c[d].shift();const f=c[d];for(;f.length;)l[d]="A",d+=1,c.splice(d,0,["C"].concat(f.splice(0,6)));c.splice(d,1),u=n.length}}const l=[];let s="",u=n.length;for(let c=0;c<u;c+=1){let d="";n[c]&&(d=n[c][0]),d!=="C"&&(l[c]=d,c>0&&(s=l[c-1])),n[c]=o(n[c],r,s),l[c]!=="A"&&d==="C"&&(l[c]="C"),a(n,c);const f=n[c],p=f.length;r.x=f[p-2],r.y=f[p-1],r.bx=parseFloat(f[p-4])||r.x,r.by=parseFloat(f[p-3])||r.y}return(!n[0][0]||n[0][0]!=="M")&&n.unshift(["M",0,0]),n}function normalizePathData(i){return normalize$1(i).map(n=>n.map(r=>typeof r=="string"?r:GeometryUtil.round(r,2))).join(",").split(",").join(" ")}class Path extends Geometry{constructor(n){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(n))if(Line.isLine(n[0])||Curve.isCurve(n[0])){let r=null;n.forEach((a,l)=>{l===0&&this.appendSegment(Path.createSegment("M",a.start)),r!=null&&!r.end.equals(a.start)&&this.appendSegment(Path.createSegment("M",a.start)),Line.isLine(a)?this.appendSegment(Path.createSegment("L",a.end)):Curve.isCurve(a)&&this.appendSegment(Path.createSegment("C",a.controlPoint1,a.controlPoint2,a.end)),r=a})}else n.forEach(o=>{o.isSegment&&this.appendSegment(o)});else n!=null&&(Line.isLine(n)?(this.appendSegment(Path.createSegment("M",n.start)),this.appendSegment(Path.createSegment("L",n.end))):Curve.isCurve(n)?(this.appendSegment(Path.createSegment("M",n.start)),this.appendSegment(Path.createSegment("C",n.controlPoint1,n.controlPoint2,n.end))):Polyline.isPolyline(n)?n.points&&n.points.length&&n.points.forEach((r,o)=>{const a=o===0?Path.createSegment("M",r):Path.createSegment("L",r);this.appendSegment(a)}):n.isSegment&&this.appendSegment(n))}get start(){const n=this.segments,r=n.length;if(r===0)return null;for(let o=0;o<r;o+=1){const a=n[o];if(a.isVisible)return a.start}return n[r-1].end}get end(){const n=this.segments,r=n.length;if(r===0)return null;for(let o=r-1;o>=0;o-=1){const a=n[o];if(a.isVisible)return a.end}return n[r-1].end}moveTo(...n){return this.appendSegment(MoveTo.create.call(null,...n))}lineTo(...n){return this.appendSegment(LineTo.create.call(null,...n))}curveTo(...n){return this.appendSegment(CurveTo.create.call(null,...n))}arcTo(n,r,o,a,l,s,u){const c=this.end||new Point,d=typeof s=="number"?arcToCurves(c.x,c.y,n,r,o,a,l,s,u):arcToCurves(c.x,c.y,n,r,o,a,l,s.x,s.y);if(d!=null)for(let f=0,p=d.length;f<p;f+=6)this.curveTo(d[f],d[f+1],d[f+2],d[f+3],d[f+4],d[f+5]);return this}quadTo(n,r,o,a){const l=this.end||new Point,s=["M",l.x,l.y];if(typeof n=="number")s.push("Q",n,r,o,a);else{const c=r;s.push("Q",n.x,n.y,c.x,c.y)}const u=Path.parse(s.join(" "));return this.appendSegment(u.segments.slice(1)),this}close(){return this.appendSegment(Close.create())}drawPoints(n,r={}){const o=drawPoints(n,r),a=Path.parse(o);a&&a.segments&&this.appendSegment(a.segments)}bbox(){const n=this.segments,r=n.length;if(r===0)return null;let o;for(let l=0;l<r;l+=1){const s=n[l];if(s.isVisible){const u=s.bbox();u!=null&&(o=o?o.union(u):u)}}if(o!=null)return o;const a=n[r-1];return new Rectangle(a.end.x,a.end.y,0,0)}appendSegment(n){const r=this.segments.length;let o=r!==0?this.segments[r-1]:null,a;const l=null;if(Array.isArray(n))for(let s=0,u=n.length;s<u;s+=1){const c=n[s];a=this.prepareSegment(c,o,l),this.segments.push(a),o=a}else n!=null&&n.isSegment&&(a=this.prepareSegment(n,o,l),this.segments.push(a));return this}insertSegment(n,r){const o=this.segments.length;if(n<0&&(n=o+n+1),n>o||n<0)throw new Error("Index out of range.");let a,l=null,s=null;if(o!==0&&(n>=1?(l=this.segments[n-1],s=l.nextSegment):(l=null,s=this.segments[0])),!Array.isArray(r))a=this.prepareSegment(r,l,s),this.segments.splice(n,0,a);else for(let u=0,c=r.length;u<c;u+=1){const d=r[u];a=this.prepareSegment(d,l,s),this.segments.splice(n+u,0,a),l=a}return this}removeSegment(n){const r=this.fixIndex(n),o=this.segments.splice(r,1)[0],a=o.previousSegment,l=o.nextSegment;return a&&(a.nextSegment=l),l&&(l.previousSegment=a),o.isSubpathStart&&l&&this.updateSubpathStartSegment(l),o}replaceSegment(n,r){const o=this.fixIndex(n);let a;const l=this.segments[o];let s=l.previousSegment;const u=l.nextSegment;let c=l.isSubpathStart;if(!Array.isArray(r))a=this.prepareSegment(r,s,u),this.segments.splice(o,1,a),c&&a.isSubpathStart&&(c=!1);else{this.segments.splice(n,1);for(let d=0,f=r.length;d<f;d+=1){const p=r[d];a=this.prepareSegment(p,s,u),this.segments.splice(n+d,0,a),s=a,c&&a.isSubpathStart&&(c=!1)}}c&&u&&this.updateSubpathStartSegment(u)}getSegment(n){const r=this.fixIndex(n);return this.segments[r]}fixIndex(n){const r=this.segments.length;if(r===0)throw new Error("Path has no segments.");let o=n;for(;o<0;)o=r+o;if(o>=r||o<0)throw new Error("Index out of range.");return o}segmentAt(n,r={}){const o=this.segmentIndexAt(n,r);return o?this.getSegment(o):null}segmentAtLength(n,r={}){const o=this.segmentIndexAtLength(n,r);return o?this.getSegment(o):null}segmentIndexAt(n,r={}){if(this.segments.length===0)return null;const o=GeometryUtil.clamp(n,0,1),a=this.getOptions(r),s=this.length(a)*o;return this.segmentIndexAtLength(s,a)}segmentIndexAtLength(n,r={}){const o=this.segments.length;if(o===0)return null;let a=!0;n<0&&(a=!1,n=-n);const l=this.getPrecision(r),s=this.getSubdivisions(r);let u=0,c=null;for(let d=0;d<o;d+=1){const f=a?d:o-1-d,p=this.segments[f],v=s[f],m=p.length({precision:l,subdivisions:v});if(p.isVisible){if(n<=u+m)return f;c=f}u+=m}return c}getSegmentSubdivisions(n={}){const r=this.getPrecision(n),o=[];for(let a=0,l=this.segments.length;a<l;a+=1){const u=this.segments[a].getSubdivisions({precision:r});o.push(u)}return o}updateSubpathStartSegment(n){let r=n.previousSegment,o=n;for(;o&&!o.isSubpathStart;)r!=null?o.subpathStartSegment=r.subpathStartSegment:o.subpathStartSegment=null,r=o,o=o.nextSegment}prepareSegment(n,r,o){n.previousSegment=r,n.nextSegment=o,r!=null&&(r.nextSegment=n),o!=null&&(o.previousSegment=n);let a=n;return n.isSubpathStart&&(n.subpathStartSegment=n,a=o),a!=null&&this.updateSubpathStartSegment(a),n}closestPoint(n,r={}){const o=this.closestPointT(n,r);return o?this.pointAtT(o):null}closestPointLength(n,r={}){const o=this.getOptions(r),a=this.closestPointT(n,o);return a?this.lengthAtT(a,o):0}closestPointNormalizedLength(n,r={}){const o=this.getOptions(r),a=this.closestPointLength(n,o);if(a===0)return 0;const l=this.length(o);return l===0?0:a/l}closestPointT(n,r={}){if(this.segments.length===0)return null;const o=this.getPrecision(r),a=this.getSubdivisions(r);let l,s=1/0;for(let u=0,c=this.segments.length;u<c;u+=1){const d=this.segments[u],f=a[u];if(d.isVisible){const p=d.closestPointT(n,{precision:o,subdivisions:f}),v=d.pointAtT(p),m=GeometryUtil.squaredLength(v,n);m<s&&(l={segmentIndex:u,value:p},s=m)}}return l||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(n,r={}){if(this.segments.length===0)return null;const o=this.getPrecision(r),a=this.getSubdivisions(r);let l,s=1/0;for(let u=0,c=this.segments.length;u<c;u+=1){const d=this.segments[u],f=a[u];if(d.isDifferentiable()){const p=d.closestPointT(n,{precision:o,subdivisions:f}),v=d.pointAtT(p),m=GeometryUtil.squaredLength(v,n);m<s&&(l=d.tangentAtT(p),s=m)}}return l||null}containsPoint(n,r={}){const o=this.toPolylines(r);if(!o)return!1;let a=0;for(let l=0,s=o.length;l<s;l+=1)o[l].containsPoint(n)&&(a+=1);return a%2===1}pointAt(n,r={}){if(this.segments.length===0)return null;if(n<=0)return this.start.clone();if(n>=1)return this.end.clone();const o=this.getOptions(r),l=this.length(o)*n;return this.pointAtLength(l,o)}pointAtLength(n,r={}){if(this.segments.length===0)return null;if(n===0)return this.start.clone();let o=!0;n<0&&(o=!1,n=-n);const a=this.getPrecision(r),l=this.getSubdivisions(r);let s,u=0;for(let d=0,f=this.segments.length;d<f;d+=1){const p=o?d:f-1-d,v=this.segments[p],m=l[p],g=v.length({precision:a,subdivisions:m});if(v.isVisible){if(n<=u+g)return v.pointAtLength((o?1:-1)*(n-u),{precision:a,subdivisions:m});s=v}u+=g}return s?o?s.end:s.start:this.segments[this.segments.length-1].end.clone()}pointAtT(n){const r=this.segments,o=r.length;if(o===0)return null;const a=n.segmentIndex;if(a<0)return r[0].pointAtT(0);if(a>=o)return r[o-1].pointAtT(1);const l=GeometryUtil.clamp(n.value,0,1);return r[a].pointAtT(l)}divideAt(n,r={}){if(this.segments.length===0)return null;const o=GeometryUtil.clamp(n,0,1),a=this.getOptions(r),s=this.length(a)*o;return this.divideAtLength(s,a)}divideAtLength(n,r={}){if(this.segments.length===0)return null;let o=!0;n<0&&(o=!1,n=-n);const a=this.getPrecision(r),l=this.getSubdivisions(r);let s=0,u,c,d,f,p;for(let E=0,$=this.segments.length;E<$;E+=1){const S=o?E:$-1-E,V=this.getSegment(S),k=l[S],P={precision:a,subdivisions:k},B=V.length(P);if(V.isDifferentiable()&&(d=V,f=S,n<=s+B)){c=S,u=V.divideAtLength((o?1:-1)*(n-s),P);break}s+=B}if(!d)return null;u||(c=f,p=o?1:0,u=d.divideAtT(p));const v=this.clone(),m=c;v.replaceSegment(m,u);const g=m;let _=m+1,y=m+2;u[0].isDifferentiable()||(v.removeSegment(g),_-=1,y-=1);const b=v.getSegment(_).start;v.insertSegment(_,Path.createSegment("M",b)),y+=1,u[1].isDifferentiable()||(v.removeSegment(y-1),y-=1);const x=y-g-1;for(let E=y,$=v.segments.length;E<$;E+=1){const S=this.getSegment(E-x),V=v.getSegment(E);if(V.type==="Z"&&!S.subpathStartSegment.end.equals(V.subpathStartSegment.end)){const k=Path.createSegment("L",S.end);v.replaceSegment(E,k)}}const C=new Path(v.segments.slice(0,_)),w=new Path(v.segments.slice(_));return[C,w]}intersectsWithLine(n,r={}){const o=this.toPolylines(r);if(o==null)return null;let a=null;for(let l=0,s=o.length;l<s;l+=1){const u=o[l],c=n.intersect(u);c&&(a==null&&(a=[]),Array.isArray(c)?a.push(...c):a.push(c))}return a}isDifferentiable(){for(let n=0,r=this.segments.length;n<r;n+=1)if(this.segments[n].isDifferentiable())return!0;return!1}isValid(){const n=this.segments;return n.length===0||n[0].type==="M"}length(n={}){if(this.segments.length===0)return 0;const r=this.getSubdivisions(n);let o=0;for(let a=0,l=this.segments.length;a<l;a+=1){const s=this.segments[a],u=r[a];o+=s.length({subdivisions:u})}return o}lengthAtT(n,r={}){const o=this.segments.length;if(o===0)return 0;let a=n.segmentIndex;if(a<0)return 0;let l=GeometryUtil.clamp(n.value,0,1);a>=o&&(a=o-1,l=1);const s=this.getPrecision(r),u=this.getSubdivisions(r);let c=0;for(let p=0;p<a;p+=1){const v=this.segments[p],m=u[p];c+=v.length({precision:s,subdivisions:m})}const d=this.segments[a],f=u[a];return c+=d.lengthAtT(l,{precision:s,subdivisions:f}),c}tangentAt(n,r={}){if(this.segments.length===0)return null;const o=GeometryUtil.clamp(n,0,1),a=this.getOptions(r),s=this.length(a)*o;return this.tangentAtLength(s,a)}tangentAtLength(n,r={}){if(this.segments.length===0)return null;let o=!0;n<0&&(o=!1,n=-n);const a=this.getPrecision(r),l=this.getSubdivisions(r);let s,u=0;for(let c=0,d=this.segments.length;c<d;c+=1){const f=o?c:d-1-c,p=this.segments[f],v=l[f],m=p.length({precision:a,subdivisions:v});if(p.isDifferentiable()){if(n<=u+m)return p.tangentAtLength((o?1:-1)*(n-u),{precision:a,subdivisions:v});s=p}u+=m}if(s){const c=o?1:0;return s.tangentAtT(c)}return null}tangentAtT(n){const r=this.segments.length;if(r===0)return null;const o=n.segmentIndex;if(o<0)return this.segments[0].tangentAtT(0);if(o>=r)return this.segments[r-1].tangentAtT(1);const a=GeometryUtil.clamp(n.value,0,1);return this.segments[o].tangentAtT(a)}getPrecision(n={}){return n.precision==null?this.PRECISION:n.precision}getSubdivisions(n={}){if(n.segmentSubdivisions==null){const r=this.getPrecision(n);return this.getSegmentSubdivisions({precision:r})}return n.segmentSubdivisions}getOptions(n={}){const r=this.getPrecision(n),o=this.getSubdivisions(n);return{precision:r,segmentSubdivisions:o}}toPoints(n={}){const r=this.segments,o=r.length;if(o===0)return null;const a=this.getSubdivisions(n),l=[];let s=[];for(let u=0;u<o;u+=1){const c=r[u];if(c.isVisible){const d=a[u];d.length>0?d.forEach(f=>s.push(f.start)):s.push(c.start)}else s.length>0&&(s.push(r[u-1].end),l.push(s),s=[])}return s.length>0&&(s.push(this.end),l.push(s)),l}toPolylines(n={}){const r=this.toPoints(n);return r?r.map(o=>new Polyline(o)):null}scale(n,r,o){return this.segments.forEach(a=>a.scale(n,r,o)),this}rotate(n,r){return this.segments.forEach(o=>o.rotate(n,r)),this}translate(n,r){return typeof n=="number"?this.segments.forEach(o=>o.translate(n,r)):this.segments.forEach(o=>o.translate(n)),this}clone(){const n=new Path;return this.segments.forEach(r=>n.appendSegment(r.clone())),n}equals(n){if(n==null)return!1;const r=this.segments,o=n.segments,a=r.length;if(o.length!==a)return!1;for(let l=0;l<a;l+=1){const s=r[l],u=o[l];if(s.type!==u.type||!s.equals(u))return!1}return!0}toJSON(){return this.segments.map(n=>n.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(n=>n.serialize()).join(" ")}toString(){return this.serialize()}}(function(i){function n(r){return r!=null&&r instanceof i}i.isPath=n})(Path||(Path={})),function(i){function n(o){if(!o)return new i;const a=new i,l=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,s=i.normalize(o).match(l);if(s!=null)for(let u=0,c=s.length;u<c;u+=1){const d=s[u],f=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,p=d.match(f);if(p!=null){const v=p[0],m=p.slice(1).map(_=>+_),g=r.call(null,v,...m);a.appendSegment(g)}}return a}i.parse=n;function r(o,...a){if(o==="M")return MoveTo.create.call(null,...a);if(o==="L")return LineTo.create.call(null,...a);if(o==="C")return CurveTo.create.call(null,...a);if(o==="z"||o==="Z")return Close.create();throw new Error(`Invalid path segment type "${o}"`)}i.createSegment=r}(Path||(Path={})),function(i){i.normalize=normalizePathData,i.isValid=isValid,i.drawArc=drawArc,i.drawPoints=drawPoints,i.arcToCurves=arcToCurves}(Path||(Path={}));class Registry{constructor(n){this.options=Object.assign({},n),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(n,r,o=!1){if(typeof n=="object"){Object.entries(n).forEach(([s,u])=>{this.register(s,u,r)});return}this.exist(n)&&!o&&!Platform.isApplyingHMR()&&this.onDuplicated(n);const a=this.options.process,l=a?call$1(a,this,n,r):r;return this.data[n]=l,l}unregister(n){const r=n?this.data[n]:null;return delete this.data[n],r}get(n){return n?this.data[n]:null}exist(n){return n?this.data[n]!=null:!1}onDuplicated(n){try{throw this.options.onConflict&&call$1(this.options.onConflict,this,n),new Error(`${upperFirst$1(this.options.type)} with name '${n}' already registered.`)}catch(r){throw r}}onNotFound(n,r){throw new Error(this.getSpellingSuggestion(n,r))}getSpellingSuggestion(n,r){const o=this.getSpellingSuggestionForName(n),a=r?`${r} ${lowerFirst$1(this.options.type)}`:this.options.type;return`${upperFirst$1(a)} with name '${n}' does not exist.${o?` Did you mean '${o}'?`:""}`}getSpellingSuggestionForName(n){return getSpellingSuggestion(n,Object.keys(this.data),r=>r)}}(function(i){function n(r){return new i(r)}i.create=n})(Registry||(Registry={}));const dot={color:"#aaaaaa",thickness:1,markup:"rect",update(i,n){const r=n.thickness*n.sx,o=n.thickness*n.sy;attr(i,{width:r,height:o,rx:r,ry:o,fill:n.color})}},fixedDot={color:"#aaaaaa",thickness:1,markup:"rect",update(i,n){const r=n.sx<=1?n.thickness*n.sx:n.thickness;attr(i,{width:r,height:r,rx:r,ry:r,fill:n.color})}},mesh={color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(i,n){let r;const o=n.width,a=n.height,l=n.thickness;o-l>=0&&a-l>=0?r=["M",o,0,"H0 M0 0 V0",a].join(" "):r="M 0 0 0 0",attr(i,{d:r,stroke:n.color,"stroke-width":n.thickness})}},doubleMesh=[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(i,n){let r;const o=n.width,a=n.height,l=n.thickness;o-l>=0&&a-l>=0?r=["M",o,0,"H0 M0 0 V0",a].join(" "):r="M 0 0 0 0",attr(i,{d:r,stroke:n.color,"stroke-width":n.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(i,n){let r;const o=n.factor||1,a=n.width*o,l=n.height*o,s=n.thickness;a-s>=0&&l-s>=0?r=["M",a,0,"H0 M0 0 V0",l].join(" "):r="M 0 0 0 0",n.width=a,n.height=l,attr(i,{d:r,stroke:n.color,"stroke-width":n.thickness})}}],patterns$1=Object.freeze(Object.defineProperty({__proto__:null,dot,doubleMesh,fixedDot,mesh},Symbol.toStringTag,{value:"Module"}));class Grid{constructor(){this.patterns={},this.root=Vector.create(createSvgDocument(),{width:"100%",height:"100%"},[createSvgElement("defs")]).node}add(n,r){const o=this.root.childNodes[0];o&&o.appendChild(r),this.patterns[n]=r,Vector.create("rect",{width:"100%",height:"100%",fill:`url(#${n})`}).appendTo(this.root)}get(n){return this.patterns[n]}has(n){return this.patterns[n]!=null}}(function(i){i.presets=patterns$1,i.registry=Registry.create({type:"grid"}),i.registry.register(i.presets,!0)})(Grid||(Grid={}));const flipX=function(i){const n=document.createElement("canvas"),r=i.width,o=i.height;n.width=r*2,n.height=o;const a=n.getContext("2d");return a.drawImage(i,0,0,r,o),a.translate(2*r,0),a.scale(-1,1),a.drawImage(i,0,0,r,o),n},flipY=function(i){const n=document.createElement("canvas"),r=i.width,o=i.height;n.width=r,n.height=o*2;const a=n.getContext("2d");return a.drawImage(i,0,0,r,o),a.translate(0,2*o),a.scale(1,-1),a.drawImage(i,0,0,r,o),n},flipXY=function(i){const n=document.createElement("canvas"),r=i.width,o=i.height;n.width=2*r,n.height=2*o;const a=n.getContext("2d");return a.drawImage(i,0,0,r,o),a.setTransform(-1,0,0,-1,n.width,n.height),a.drawImage(i,0,0,r,o),a.setTransform(-1,0,0,1,n.width,0),a.drawImage(i,0,0,r,o),a.setTransform(1,0,0,-1,0,n.height),a.drawImage(i,0,0,r,o),n},watermark=function(i,n){const r=i.width,o=i.height,a=document.createElement("canvas");a.width=r*3,a.height=o*3;const l=a.getContext("2d"),s=n.angle!=null?-n.angle:-20,u=Angle.toRad(s),c=a.width/4,d=a.height/4;for(let f=0;f<4;f+=1)for(let p=0;p<4;p+=1)(f+p)%2>0&&(l.setTransform(1,0,0,1,(2*f-1)*c,(2*p-1)*d),l.rotate(u),l.drawImage(i,-r/2,-o/2,r,o));return a},patterns=Object.freeze(Object.defineProperty({__proto__:null,flipX,flipXY,flipY,watermark},Symbol.toStringTag,{value:"Module"}));var Background;(function(i){i.presets=Object.assign({},patterns),i.presets["flip-x"]=flipX,i.presets["flip-y"]=flipY,i.presets["flip-xy"]=flipXY,i.registry=Registry.create({type:"background pattern"}),i.registry.register(i.presets,!0)})(Background||(Background={}));function getString(i,n){return i??n}function getNumber(i,n){return i!=null&&Number.isFinite(i)?i:n}function outline(i={}){const n=getString(i.color,"blue"),r=getNumber(i.width,1),o=getNumber(i.margin,2),a=getNumber(i.opacity,1),l=o,s=o+r;return`