@ecan-bi/indicator-library 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! @ecan-bi/indicator-library@1.0.32 */
2
- (function(ce,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(ce=typeof globalThis<"u"?globalThis:ce||self,e(ce["@ecan-bi/indicator-library"]={},ce.Vue,ce.LodashEs,ce.AntDesignVue,ce.Draggable,null,null,ce.Dayjs,null,ce.MonacoEditor,null,ce.Echarts))})(this,function(ce,e,oe,j,at,Ip,vp,ne,$p,xa,Fp,ka){var Ca;"use strict";function _a(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Sa=_a(ka),Do=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Ae="$request",ke=((Ca=window==null?void 0:window.config)==null?void 0:Ca.indicatorURL)||"",Ne="INDICATOR_TOKEN",Po="DATA_LIST",Pe="SELECTED_COMPONENT",de="GRAPHIC_CONFIG",Oe="UPDATE_GRAPHIC_CONFIG",Mo="SHOW_STYLE_CONFIG",jo="REFRESH_DATA",wt="CHARTS_OPTIONS",Ro="TABLE_OPTIONS",Aa=18,Ut="UPDATE_CHARTS_OPTIONS",Gt="UPDATE_TABLE_OPTIONS",zt="SOURCE_TYPE",Uo="CHANGE_CONDITION",Go="DATA_VIEW_COLUMNS",Me="RENDER_USED_COMPONENTS",Ht="UPDATE_USED_COMPONENT",zo="MAP_ATTRIBUTE_PROPS",Ho={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},Na={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Ta=e.defineComponent({name:"DataViewList",components:{ASpin:j.Spin,ATreeSelect:j.TreeSelect,Draggable:at},setup(){var N;const t=e.inject(Ae),o=e.unref(e.inject(Ne)),n=e.inject(de),a=e.inject(Oe),r=e.computed(()=>{var L;return((L=e.unref(n))==null?void 0:L.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(N=window==null?void 0:window.config)==null?void 0:N.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var O,k;const L=r.value;l.value=!0;try{const{data:I}=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,I.success&&((O=i.value)==null||O.push(s),i.value=(k=i.value)==null?void 0:k.concat(p([I.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(L=[],O)=>{const k=[];return L.forEach(I=>{k.push({id:I.id,pId:O??I.parentId,value:I.id,title:I.name,isLeaf:I.leaf||!1,nature:I.nature,selectable:I.leaf||!1})}),k},u=async(L,O)=>{var S;let k=0;if(L){const{value:_}=L.dataRef;k=_}const{data:I}=await t.post(`${ke}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:k},{headers:{Authentication:o,operateContext:"ygt"}});I.success&&(i.value=(S=e.unref(i))==null?void 0:S.concat(p(I.data)),O&&e.unref(r)&&await c())},f=L=>{b(L),a({dataViewId:L,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(Po,{setDataList:L=>L}),C=e.ref(!1),m=e.ref([]),b=async L=>{if(L){m.value=[],C.value=!0;try{const O=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:k,data:I={}}=O.data;if(C.value=!1,k){const{rows:S=[]}=I;S==null||S.forEach(_=>{var w;const V=((w=_==null?void 0:_.dataViewColumns)==null?void 0:w.map($=>({...$,show:!0})))||[];m.value=[...e.unref(m),...V]}),h(e.unref(m))}}catch{C.value=!1}}},y=L=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[L],x=(L,O)=>{const k=O[L.oldIndex];if(k){const I={...k,label:k.name,name:k.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(I))}};return e.onMounted(async()=>{await u(void 0,!0),b(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:m,dataViewLoading:C,onDataViewIdChange:f,mapGenericType:y,onDragStart:x}}}),Up="",Z=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},La={class:"data-view-list"},Ea={class:"columns"},Ba={class:"column-item"},Oa={class:"column-item-name"};function Va(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",La,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Ea,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ba,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Oa,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ia=Z(Ta,[["render",Va],["__scopeId","data-v-4a66f7d2"]]);function ye(t,o){va(t)&&(t="100%");var n=$a(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function va(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function $a(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Fa(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function xt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Wt(t){return t.length===1?"0"+t:String(t)}function Da(t,o,n){return{r:ye(t,255)*255,g:ye(o,255)*255,b:ye(n,255)*255}}function qt(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function Pa(t,o,n){var a,r,l;if(t=ye(t,360),o=ye(o,100),n=ye(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=qt(d,i,t+1/3),r=qt(d,i,t),l=qt(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ma(t,o,n){t=ye(t,255),o=ye(o,255),n=ye(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function ja(t,o,n){t=ye(t,360)*6,o=ye(o,100),n=ye(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:u*255}}function Ra(t,o,n,a){var r=[Wt(Math.round(t).toString(16)),Wt(Math.round(o).toString(16)),Wt(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Wo(t){return fe(t)/255}function fe(t){return parseInt(t,16)}var qo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rt(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=za(t)),typeof t=="object"&&(Ve(t.r)&&Ve(t.g)&&Ve(t.b)?(o=Da(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ve(t.h)&&Ve(t.s)&&Ve(t.v)?(a=xt(t.s),r=xt(t.v),o=ja(t.h,a,r),i=!0,d="hsv"):Ve(t.h)&&Ve(t.s)&&Ve(t.l)&&(a=xt(t.s),l=xt(t.l),o=Pa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Fa(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Ua="[-\\+]?\\d+%?",Ga="[-\\+]?\\d*\\.\\d+%?",Fe="(?:".concat(Ga,")|(?:").concat(Ua,")"),Yt="[\\s|\\(]+(".concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")\\s*\\)?"),Kt="[\\s|\\(]+(".concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")\\s*\\)?"),_e={CSS_UNIT:new RegExp(Fe),rgb:new RegExp("rgb"+Yt),rgba:new RegExp("rgba"+Kt),hsl:new RegExp("hsl"+Yt),hsla:new RegExp("hsla"+Kt),hsv:new RegExp("hsv"+Yt),hsva:new RegExp("hsva"+Kt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(qo[t])t=qo[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=_e.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=_e.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_e.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=_e.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_e.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=_e.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_e.hex8.exec(t),n?{r:fe(n[1]),g:fe(n[2]),b:fe(n[3]),a:Wo(n[4]),format:o?"name":"hex8"}:(n=_e.hex6.exec(t),n?{r:fe(n[1]),g:fe(n[2]),b:fe(n[3]),format:o?"name":"hex"}:(n=_e.hex4.exec(t),n?{r:fe(n[1]+n[1]),g:fe(n[2]+n[2]),b:fe(n[3]+n[3]),a:Wo(n[4]+n[4]),format:o?"name":"hex8"}:(n=_e.hex3.exec(t),n?{r:fe(n[1]+n[1]),g:fe(n[2]+n[2]),b:fe(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Ve(t){return!!_e.CSS_UNIT.exec(String(t))}var kt=2,Yo=.16,Ha=.05,Wa=.05,qa=.15,Ko=5,Xo=4,Ya=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Qo(t){var o=t.r,n=t.g,a=t.b,r=Ma(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function _t(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Ra(o,n,a,!1))}function Ka(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function Jo(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-kt*o:Math.round(t.h)+kt*o:a=n?Math.round(t.h)+kt*o:Math.round(t.h)-kt*o,a<0?a+=360:a>=360&&(a-=360),a}function Zo(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-Yo*o:o===Xo?a=t.s+Yo:a=t.s+Ha*o,a>1&&(a=1),n&&o===Ko&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function en(t,o,n){var a;return n?a=t.v+Wa*o:a=t.v-qa*o,a>1&&(a=1),Number(a.toFixed(2))}function Xt(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=rt(t),r=Ko;r>0;r-=1){var l=Qo(a),i=_t(rt({h:Jo(l,r,!0),s:Zo(l,r,!0),v:en(l,r,!0)}));n.push(i)}n.push(_t(a));for(var d=1;d<=Xo;d+=1){var s=Qo(a),c=_t(rt({h:Jo(s,d),s:Zo(s,d),v:en(s,d)}));n.push(c)}return o.theme==="dark"?Ya.map(function(p){var u=p.index,f=p.opacity,h=_t(Ka(rt(o.backgroundColor||"#141414"),rt(n[u]),f*100));return h}):n}var Qt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jt={},Zt={};Object.keys(Qt).forEach(function(t){Jt[t]=Xt(Qt[t]),Jt[t].primary=Jt[t][5],Zt[t]=Xt(Qt[t],{theme:"dark",backgroundColor:"#141414"}),Zt[t].primary=Zt[t][5]});var tn=[],lt=[],Xa="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Qa(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ja(t,o){if(o=o||{},t===void 0)throw new Error(Xa);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=tn.indexOf(a);r===-1&&(r=tn.push(a)-1,lt[r]={});var l;return lt[r]!==void 0&&lt[r][n]!==void 0?l=lt[r][n]:(l=lt[r][n]=Qa(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function on(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Za(t,r,n[r])})}return t}function Za(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function er(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function tr(t,o){er(t,"[@ant-design/icons-vue] ".concat(o))}function nn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function eo(t,o,n){return n?e.h(t.tag,on({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,on({key:o},t.attrs),(t.children||[]).map(function(a,r){return eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function an(t){return Xt(t)[0]}function rn(t){return t?Array.isArray(t)?t:[t]:[]}var or=`
1
+ /*! @ecan-bi/indicator-library@1.0.33 */
2
+ (function(ce,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(ce=typeof globalThis<"u"?globalThis:ce||self,e(ce["@ecan-bi/indicator-library"]={},ce.Vue,ce.LodashEs,ce.AntDesignVue,ce.Draggable,null,null,ce.Dayjs,null,ce.MonacoEditor,null,ce.Echarts))})(this,function(ce,e,ne,U,at,Ip,vp,oe,$p,xa,Fp,ka){var Ca;"use strict";function _a(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Sa=_a(ka),Dn=(t,n)=>{if(t.install=o=>{for(const a of[t,...Object.values(n??{})])o.component(a.name,a)},n)for(const[o,a]of Object.entries(n))t[o]=a;return t},_e="$request",ye=((Ca=window==null?void 0:window.config)==null?void 0:Ca.indicatorURL)||"",Se="INDICATOR_TOKEN",Pn="DATA_LIST",Pe="SELECTED_COMPONENT",de="GRAPHIC_CONFIG",Oe="UPDATE_GRAPHIC_CONFIG",Mn="SHOW_STYLE_CONFIG",jn="REFRESH_DATA",wt="CHARTS_OPTIONS",Rn="TABLE_OPTIONS",Aa=18,Ut="UPDATE_CHARTS_OPTIONS",Gt="UPDATE_TABLE_OPTIONS",zt="SOURCE_TYPE",Un="CHANGE_CONDITION",Gn="DATA_VIEW_COLUMNS",Me="RENDER_USED_COMPONENTS",Ht="UPDATE_USED_COMPONENT",zn="MAP_ATTRIBUTE_PROPS",Hn={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},Na={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Ta=e.defineComponent({name:"DataViewList",components:{ASpin:U.Spin,ATreeSelect:U.TreeSelect,Draggable:at},setup(){var T;const t=e.inject(_e),n=e.unref(e.inject(Se)),o=e.inject(de),a=e.inject(Oe),r=e.computed(()=>{var L;return((L=e.unref(o))==null?void 0:L.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(T=window==null?void 0:window.config)==null?void 0:T.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var C,b;const L=r.value;l.value=!0;try{const{data:V}=await t.post(`${ye}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});l.value=!1,V.success&&((C=i.value)==null||C.push(s),i.value=(b=i.value)==null?void 0:b.concat(p([V.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(L=[],C)=>{const b=[];return L.forEach(V=>{b.push({id:V.id,pId:C??V.parentId,value:V.id,title:V.name,isLeaf:V.leaf||!1,nature:V.nature,selectable:V.leaf||!1})}),b},u=async(L,C)=>{var A;let b=0;if(L){const{value:S}=L.dataRef;b=S}const{data:V}=await t.post(`${ye}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:b},{headers:{Authentication:n,operateContext:"ygt"}});V.success&&(i.value=(A=e.unref(i))==null?void 0:A.concat(p(V.data)),C&&e.unref(r)&&await c())},f=L=>{k(L),a({dataViewId:L,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:m}=e.inject(Pn,{setDataList:L=>L}),w=e.ref(!1),h=e.ref([]),k=async L=>{if(L){h.value=[],w.value=!0;try{const C=await t.post(`${ye}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:L,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:b,data:V={}}=C.data;if(w.value=!1,b){const{rows:A=[]}=V;A==null||A.forEach(S=>{var x;const I=((x=S==null?void 0:S.dataViewColumns)==null?void 0:x.map(v=>({...v,show:!0})))||[];h.value=[...e.unref(h),...I]}),m(e.unref(h))}}catch{w.value=!1}}},y=L=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[L],_=(L,C)=>{const b=C[L.oldIndex];if(b){const V={...b,label:b.name,name:b.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(V))}};return e.onMounted(async()=>{await u(void 0,!0),k(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:h,dataViewLoading:w,onDataViewIdChange:f,mapGenericType:y,onDragStart:_}}}),Up="",Z=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},La={class:"data-view-list"},Ea={class:"columns"},Ba={class:"column-item"},Oa={class:"column-item-name"};function Va(t,n,o,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",La,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Ea,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":n[0]||(n[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:n[1]||(n[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ba,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Oa,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ia=Z(Ta,[["render",Va],["__scopeId","data-v-4a66f7d2"]]);function ge(t,n){va(t)&&(t="100%");var o=$a(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function va(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function $a(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Fa(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function xt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Wt(t){return t.length===1?"0"+t:String(t)}function Da(t,n,o){return{r:ge(t,255)*255,g:ge(n,255)*255,b:ge(o,255)*255}}function qt(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function Pa(t,n,o){var a,r,l;if(t=ge(t,360),n=ge(n,100),o=ge(o,100),n===0)r=o,l=o,a=o;else{var i=o<.5?o*(1+n):o+n-o*n,d=2*o-i;a=qt(d,i,t+1/3),r=qt(d,i,t),l=qt(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ma(t,n,o){t=ge(t,255),n=ge(n,255),o=ge(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(n-o)/d+(n<o?6:0);break;case n:l=(o-t)/d+2;break;case o:l=(t-n)/d+4;break}l/=6}return{h:l,s,v:i}}function ja(t,n,o){t=ge(t,360)*6,n=ge(n,100),o=ge(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:c*255,g:p*255,b:u*255}}function Ra(t,n,o,a){var r=[Wt(Math.round(t).toString(16)),Wt(Math.round(n).toString(16)),Wt(Math.round(o).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Wn(t){return fe(t)/255}function fe(t){return parseInt(t,16)}var qn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rt(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=za(t)),typeof t=="object"&&(Ve(t.r)&&Ve(t.g)&&Ve(t.b)?(n=Da(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Ve(t.h)&&Ve(t.s)&&Ve(t.v)?(a=xt(t.s),r=xt(t.v),n=ja(t.h,a,r),i=!0,d="hsv"):Ve(t.h)&&Ve(t.s)&&Ve(t.l)&&(a=xt(t.s),l=xt(t.l),n=Pa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=Fa(o),{ok:i,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var Ua="[-\\+]?\\d+%?",Ga="[-\\+]?\\d*\\.\\d+%?",Fe="(?:".concat(Ga,")|(?:").concat(Ua,")"),Yt="[\\s|\\(]+(".concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")\\s*\\)?"),Kt="[\\s|\\(]+(".concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")[,|\\s]+(").concat(Fe,")\\s*\\)?"),Ae={CSS_UNIT:new RegExp(Fe),rgb:new RegExp("rgb"+Yt),rgba:new RegExp("rgba"+Kt),hsl:new RegExp("hsl"+Yt),hsla:new RegExp("hsla"+Kt),hsv:new RegExp("hsv"+Yt),hsva:new RegExp("hsva"+Kt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(qn[t])t=qn[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=Ae.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=Ae.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=Ae.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=Ae.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=Ae.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=Ae.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=Ae.hex8.exec(t),o?{r:fe(o[1]),g:fe(o[2]),b:fe(o[3]),a:Wn(o[4]),format:n?"name":"hex8"}:(o=Ae.hex6.exec(t),o?{r:fe(o[1]),g:fe(o[2]),b:fe(o[3]),format:n?"name":"hex"}:(o=Ae.hex4.exec(t),o?{r:fe(o[1]+o[1]),g:fe(o[2]+o[2]),b:fe(o[3]+o[3]),a:Wn(o[4]+o[4]),format:n?"name":"hex8"}:(o=Ae.hex3.exec(t),o?{r:fe(o[1]+o[1]),g:fe(o[2]+o[2]),b:fe(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function Ve(t){return!!Ae.CSS_UNIT.exec(String(t))}var kt=2,Yn=.16,Ha=.05,Wa=.05,qa=.15,Kn=5,Xn=4,Ya=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Qn(t){var n=t.r,o=t.g,a=t.b,r=Ma(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function _t(t){var n=t.r,o=t.g,a=t.b;return"#".concat(Ra(n,o,a,!1))}function Ka(t,n,o){var a=o/100,r={r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b};return r}function Jn(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-kt*n:Math.round(t.h)+kt*n:a=o?Math.round(t.h)+kt*n:Math.round(t.h)-kt*n,a<0?a+=360:a>=360&&(a-=360),a}function Zn(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-Yn*n:n===Xn?a=t.s+Yn:a=t.s+Ha*n,a>1&&(a=1),o&&n===Kn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function eo(t,n,o){var a;return o?a=t.v+Wa*n:a=t.v-qa*n,a>1&&(a=1),Number(a.toFixed(2))}function Xt(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=rt(t),r=Kn;r>0;r-=1){var l=Qn(a),i=_t(rt({h:Jn(l,r,!0),s:Zn(l,r,!0),v:eo(l,r,!0)}));o.push(i)}o.push(_t(a));for(var d=1;d<=Xn;d+=1){var s=Qn(a),c=_t(rt({h:Jn(s,d),s:Zn(s,d),v:eo(s,d)}));o.push(c)}return n.theme==="dark"?Ya.map(function(p){var u=p.index,f=p.opacity,m=_t(Ka(rt(n.backgroundColor||"#141414"),rt(o[u]),f*100));return m}):o}var Qt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jt={},Zt={};Object.keys(Qt).forEach(function(t){Jt[t]=Xt(Qt[t]),Jt[t].primary=Jt[t][5],Zt[t]=Xt(Qt[t],{theme:"dark",backgroundColor:"#141414"}),Zt[t].primary=Zt[t][5]});var to=[],lt=[],Xa="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Qa(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ja(t,n){if(n=n||{},t===void 0)throw new Error(Xa);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=to.indexOf(a);r===-1&&(r=to.push(a)-1,lt[r]={});var l;return lt[r]!==void 0&&lt[r][o]!==void 0?l=lt[r][o]:(l=lt[r][o]=Qa(),o==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function no(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Za(t,r,o[r])})}return t}function Za(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function er(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function tr(t,n){er(t,"[@ant-design/icons-vue] ".concat(n))}function oo(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function en(t,n,o){return o?e.h(t.tag,no({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return en(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,no({key:n},t.attrs),(t.children||[]).map(function(a,r){return en(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function ao(t){return Xt(t)[0]}function ro(t){return t?Array.isArray(t)?t:[t]:[]}var nr=`
3
3
  .anticon {
4
4
  display: inline-block;
5
5
  color: inherit;
@@ -53,12 +53,12 @@
53
53
  transform: rotate(360deg);
54
54
  }
55
55
  }
56
- `,ln=!1,nr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:or;e.nextTick(function(){ln||(typeof window<"u"&&window.document&&window.document.documentElement&&Ja(o,{prepend:!0}),ln=!0)})},ar=["icon","primaryColor","secondaryColor"];function rr(t,o){if(t==null)return{};var n=lr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function lr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function St(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ir(t,r,n[r])})}return t}function ir(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var it={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function sr(t){var o=t.primaryColor,n=t.secondaryColor;it.primaryColor=o,it.secondaryColor=n||an(o),it.calculated=!!n}function cr(){return St({},it)}var We=function(o,n){var a=St({},o,n.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=rr(a,ar),s=it;if(l&&(s={primaryColor:l,secondaryColor:i||an(l)}),nr(),tr(nn(r),"icon should be icon definiton, but got ".concat(r)),!nn(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=St({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),eo(c.icon,"svg-".concat(c.name),St({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};We.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},We.inheritAttrs=!1,We.displayName="IconBase",We.getTwoToneColors=cr,We.setTwoToneColors=sr;const to=We;function dr(t,o){return mr(t)||fr(t,o)||ur(t,o)||pr()}function pr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ur(t,o){if(t){if(typeof t=="string")return sn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sn(t,o)}}function sn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function fr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function mr(t){if(Array.isArray(t))return t}function cn(t){var o=rn(t),n=dr(o,2),a=n[0],r=n[1];return to.setTwoToneColors({primaryColor:a,secondaryColor:r})}function hr(){var t=to.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var yr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function gr(t,o){return xr(t)||wr(t,o)||Cr(t,o)||br()}function br(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cr(t,o){if(t){if(typeof t=="string")return dn(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dn(t,o)}}function dn(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function wr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function xr(t){if(Array.isArray(t))return t}function pn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){oo(t,r,n[r])})}return t}function oo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function kr(t,o){if(t==null)return{};var n=_r(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function _r(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}cn("#1890ff");var qe=function(o,n){var a,r=pn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=kr(r,yr),h=(a={anticon:!0},oo(a,"anticon-".concat(i.name),!!i.name),oo(a,l,l),a),C=d===""||d||i.name==="loading"?"anticon-spin":"",m=c;m===void 0&&u&&(m=-1,f.tabindex=m);var b=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,y=rn(p),x=gr(y,2),N=x[0],L=x[1];return e.createVNode("span",pn({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(to,{class:C,icon:i,primaryColor:N,secondaryColor:L,style:b},null)])};qe.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},qe.displayName="AntdIcon",qe.inheritAttrs=!1,qe.getTwoToneColor=hr,qe.setTwoToneColor=cn;const ge=qe;var Sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Ar=Sr;function un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Nr(t,r,n[r])})}return t}function Nr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=function(o,n){var a=un({},o,n.attrs);return e.createVNode(ge,un({},a,{icon:Ar}),null)};no.displayName="AppstoreAddOutlined",no.inheritAttrs=!1;const fn=no;var Tr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Lr=Tr;function mn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Er(t,r,n[r])})}return t}function Er(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ao=function(o,n){var a=mn({},o,n.attrs);return e.createVNode(ge,mn({},a,{icon:Lr}),null)};ao.displayName="CaretDownOutlined",ao.inheritAttrs=!1;const Br=ao;var Or={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const Vr=Or;function hn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ir(t,r,n[r])})}return t}function Ir(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ro=function(o,n){var a=hn({},o,n.attrs);return e.createVNode(ge,hn({},a,{icon:Vr}),null)};ro.displayName="CaretRightOutlined",ro.inheritAttrs=!1;const vr=ro;var $r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const Fr=$r;function yn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Dr(t,r,n[r])})}return t}function Dr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var lo=function(o,n){var a=yn({},o,n.attrs);return e.createVNode(ge,yn({},a,{icon:Fr}),null)};lo.displayName="CloseOutlined",lo.inheritAttrs=!1;const io=lo;var Pr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Mr=Pr;function gn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){jr(t,r,n[r])})}return t}function jr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var so=function(o,n){var a=gn({},o,n.attrs);return e.createVNode(ge,gn({},a,{icon:Mr}),null)};so.displayName="CopyOutlined",so.inheritAttrs=!1;const Rr=so;var Ur={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Gr=Ur;function bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){zr(t,r,n[r])})}return t}function zr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var co=function(o,n){var a=bn({},o,n.attrs);return e.createVNode(ge,bn({},a,{icon:Gr}),null)};co.displayName="DeleteOutlined",co.inheritAttrs=!1;const Hr=co;var Wr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const qr=Wr;function Cn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Yr(t,r,n[r])})}return t}function Yr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var po=function(o,n){var a=Cn({},o,n.attrs);return e.createVNode(ge,Cn({},a,{icon:qr}),null)};po.displayName="DoubleRightOutlined",po.inheritAttrs=!1;const Kr=po;var Xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const Qr=Xr;function wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Jr(t,r,n[r])})}return t}function Jr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var uo=function(o,n){var a=wn({},o,n.attrs);return e.createVNode(ge,wn({},a,{icon:Qr}),null)};uo.displayName="DownOutlined",uo.inheritAttrs=!1;const Zr=uo;var el={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const tl=el;function xn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ol(t,r,n[r])})}return t}function ol(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var fo=function(o,n){var a=xn({},o,n.attrs);return e.createVNode(ge,xn({},a,{icon:tl}),null)};fo.displayName="MinusCircleOutlined",fo.inheritAttrs=!1;const nl=fo;var al={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const rl=al;function kn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ll(t,r,n[r])})}return t}function ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var mo=function(o,n){var a=kn({},o,n.attrs);return e.createVNode(ge,kn({},a,{icon:rl}),null)};mo.displayName="PlusCircleOutlined",mo.inheritAttrs=!1;const il=mo;var sl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const cl=sl;function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){dl(t,r,n[r])})}return t}function dl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ho=function(o,n){var a=_n({},o,n.attrs);return e.createVNode(ge,_n({},a,{icon:cl}),null)};ho.displayName="PlusOutlined",ho.inheritAttrs=!1;const pl=ho;var ul={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const fl=ul;function Sn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ml(t,r,n[r])})}return t}function ml(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var yo=function(o,n){var a=Sn({},o,n.attrs);return e.createVNode(ge,Sn({},a,{icon:fl}),null)};yo.displayName="SettingOutlined",yo.inheritAttrs=!1;const hl=yo,yl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:vr,CaretDownOutlined:Br,AInputSearch:j.InputSearch,ASpin:j.Spin,APagination:j.Pagination,Draggable:at},setup(){var L;const t=(L=window==null?void 0:window.config)==null?void 0:L.pageId,o=e.inject(Ae),n=e.unref(e.inject(Ne)),a=e.inject(Pe),r=e.computed(()=>{var O;return(O=e.unref(a))==null?void 0:O.graphicConfig}),l=e.computed(()=>{var O;return(O=e.unref(r))==null?void 0:O.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const O={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const k=await o.post(`${ke}/diagram/sourceList`,O,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:I,data:S={}}=k.data;if(I){const{rows:_=[],total:V=0}=S;_==null||_.forEach(w=>{var $;w.show=!1,($=w.dataViewColumns)==null||$.forEach(B=>{B.show=!0,B.edit=!1,B.title&&(B.label=B.title)})}),i.value=_,s.totalResult=+V}}catch{d.value=!1}},u=O=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[O],f=O=>{i.value[O].show=!i.value[O].show},h=()=>{s.currentPage=1,p()},C=oe.debounce(()=>{s.currentPage=1,p()},200),m=(O,k)=>{s.pageSize=k,s.currentPage=O,p()};e.onMounted(()=>{p()});const b=e.inject(de),y=e.computed(()=>{const O=["classificationList","rowHeaderList"];let k=[];for(const I in e.unref(b))if(Object.prototype.hasOwnProperty.call(e.unref(b),I)&&O.includes(I)){const S=e.unref(b)[I];Array.isArray(S)&&(k=k.concat(S))}return k});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:C,onPaginationChange:m,searchText:c,setItemDisabled:(O=[])=>{let k=!1;for(const I of e.unref(y))if(!O.find(_=>_.typeGuid===I.typeGuid)){k=!0;break}return k},onDragStart:(O,k)=>{const I=k[O.oldIndex];I&&sessionStorage.setItem("indicator-list-item",JSON.stringify(I))}}}}),Gp="",gl={class:"data-source-list"},bl={class:"columns"},Cl={class:"column-item"},wl=["onClick"],xl={key:0},kl={class:"column-child-item"},_l={class:"column-child-item-name"};function Sl(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",gl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",bl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Cl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:C=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,wl)]),f.show?(e.openBlock(),e.createElementBlock("div",xl,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":C=>f.dataViewColumns=C,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:C=>t.onDragStart(C,f.dataViewColumns)},{item:e.withCtx(({element:C})=>[e.createElementVNode("div",kl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(C.scope))+"】 ",1),e.createElementVNode("span",_l,e.toDisplayString(C.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Al=Z(yl,[["render",Sl],["__scopeId","data-v-b23ce142"]]),Nl=e.defineComponent({name:"DataList",components:{DataSourceList:Al,DataViewList:Ia},setup(){return{source:e.inject(zt)}}});function Tl(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Ll=Z(Nl,[["render",Tl]]),An={mounted(t){t.focus()}},El=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:at,AModal:j.Modal,AButton:j.Button},setup(t,{expose:o}){var N;const n=(N=window==null?void 0:window.config)==null?void 0:N.pageId,a=e.inject(Ae),r=e.unref(e.inject(Ne)),l=e.inject(de),i=e.inject(Oe),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const L=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:k=[]}=L.data;O&&(c.value=k==null?void 0:k.slice(0,200))}catch(L){console.error(L)}},u=()=>{var S;const L=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],O=L[t.index],{label:k,name:I}=t.item;O.sort={label:k,columnName:I,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:L})};let f=!1;const h=()=>{f=!0},C=e.ref(!1),m=()=>{C.value=!0},b=()=>{C.value=!1},y=()=>{f&&u(),f=!1,b()};return o({showModal:m}),e.watch(C,L=>{var O,k;if(L){const I=(k=(O=t.item)==null?void 0:O.sort)==null?void 0:k.customOrderColumns;I==null?p():c.value=I}else c.value=[];window.changeShowTable&&window.changeShowTable(!L)},{flush:"post"}),{visible:C,onCancel:y,customSortList:c,onChange:h,onDeleteConfig:()=>{var S;const L=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],O=L[t.index],{label:k,name:I}=t.item;O.sort={label:k,columnName:I},i({[t.type]:L}),b()}}}}),zp="",Bl={class:"button-wrapper"},Ol={class:"sort-item"};function Vl(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Bl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ol,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Il=Z(El,[["render",Vl],["__scopeId","data-v-8e16d201"]]),vl=e.defineComponent({name:"CustomGroupModal",directives:{focus:An},components:{CloseOutlined:io,AModal:j.Modal,ASelect:j.Select,ASelectOption:j.SelectOption,AButton:j.Button,AInput:j.Input,ACheckbox:j.Checkbox,ACollapse:j.Collapse,ACollapsePanel:j.CollapsePanel,ATag:j.Tag,ACheckableTag:j.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var z;const n=e.inject(Ae),a=(z=window==null?void 0:window.config)==null?void 0:z.pageId,r=e.unref(e.inject(Ne));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const g=e.unref(c).map(A=>A.title);return new Set(g)}),u=e.ref([]);e.watch(()=>e.unref(c).length,g=>{u.value=new Array(g).fill(!1)});const f=e.computed(()=>{let g=0;return e.unref(c).forEach(A=>{var E;(E=A.data)==null||E.forEach(U=>{U.checked&&g++})}),g}),h=()=>{const g=e.unref(d);if(!g){j.message.error("创建分组名不能空");return}e.unref(p).has(g)?j.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:g,data:[]}),l=!0)},C=g=>{e.unref(c).splice(g,1),l=!0},m=e.ref(null),b=()=>{if(e.unref(f)===0){j.message.error("当前移入分组已选个数为0");return}const g=e.unref(m);if(g==null){j.message.error("请选择移入分组");return}if(!e.unref(c)[g]){j.message.error("移入分组不存在,请重新选择");return}const A=[],E=e.unref(c).length;for(let U=0;U<E;U++){const G=e.unref(c)[U];e.unref(c)[U].data=G.data.filter(q=>(q.checked&&A.push({...q,checked:!1}),!q.checked))}e.unref(c)[g].data=[...A,...e.unref(c)[g].data],l=!0},y=g=>{e.unref(u)[g]=!0},x=g=>{e.unref(u)[g]=!1},N=(g,A)=>{const E=g.target.value;e.unref(p).has(E)&&j.message.error("组名不能相同,请修改"),e.unref(c)[A].title=E,l=!0},L=e.inject(de),O=e.inject(Oe),k=e.computed(()=>e.unref(L).source),I=e.computed(()=>e.unref(L).dataViewId),S=e.ref(!1),_=()=>{var Y,ee;const g=e.unref(c);let A="";e.unref(S)&&(A=(Y=g[0])==null?void 0:Y.title);const E=g==null?void 0:g.length,U={};for(let te=1;te<E;te++){const ae=g[te]||{},{title:ie,data:le}=ae;U[ie]=(le==null?void 0:le.map(Se=>Se.label))||[]}const G=((ee=e.unref(L)[t.type])==null?void 0:ee.slice())||[],q=G[t.index];q.customGroup={groupInfoMap:U,otherGroupName:A},O({[t.type]:G})},V=e.ref(!1),w=()=>{V.value=!0},$=()=>{V.value=!1},B=()=>{$(),l&&_(),l=!1},F=()=>{l=!0},M=new Set,D=async()=>{const g=t.item.customGroup||{},A=g.otherGroupName,E=g.groupInfoMap;(A===""||A==null)&&(S.value=!1),e.unref(c)[0]={title:A||"未分组",data:[]};let U=1;for(const G in E)if(Object.prototype.hasOwnProperty.call(E,G)){const Y=E[G].map(ee=>(M.add(ee),{label:ee,checked:!1}));e.unref(c)[U]={title:G,data:Y},U++}await R()},R=async()=>{var g;try{const A=await n.post(`${ke}/diagram/groupvalue`,{source:e.unref(k),dataViewId:e.unref(I),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:U=[]}=A.data;if(E){const G=[];(g=U==null?void 0:U.slice(0,200))==null||g.forEach(q=>{M.has(q)||G.push({label:q,checked:!1})}),e.unref(c)[0].data=G}}catch(A){console.error(A)}};return e.watch(V,g=>{g&&D(),window.changeShowTable&&window.changeShowTable(!g)},{flush:"post"}),o({showModal:w}),{visible:V,title:i,activeKey:s,customGroupList:c,onCancel:B,useOtherGroup:S,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:C,onMoveInGroup:b,selectGroupIndex:m,onEditTitle:y,onTitleChange:N,onFinishEditTitle:x,onUseOtherGroup:F,customGroupEditTitleList:u}}}),Hp="",Wp="",$l={class:"custom-group-header"},Fl={class:"move-and-create"},Dl={class:"select-tip"},Pl={class:"select-count"},Ml={class:"create-group"},jl={class:"custom-group-content"},Rl=["onClick"],Ul={class:"extra"},Gl={class:"custom-group-list"},zl={class:"text"};function Hl(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),C=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("a-collapse"),b=e.resolveComponent("a-modal"),y=e.resolveDirective("focus");return e.openBlock(),e.createBlock(b,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$l,[e.createElementVNode("div",Fl,[e.createElementVNode("div",null,[e.createElementVNode("span",Dl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Pl,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=x=>t.selectGroupIndex=x),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,N)=>(e.openBlock(),e.createBlock(i,{key:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ml,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=x=>t.createGroupTitle=x),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=x=>t.useOtherGroup=x),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",jl,[e.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=x=>t.activeKey=x),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,N)=>(e.openBlock(),e.createBlock(C,{key:N},{header:e.withCtx(()=>[t.customGroupEditTitleList[N]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:x.title,size:"small",onChange:L=>t.onTitleChange(L,N),onBlur:L=>t.onFinishEditTitle(N),onPressEnter:L=>t.onFinishEditTitle(N)},null,8,["value","onChange","onBlur","onPressEnter"])),[[y]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(L=>t.onEditTitle(N),["prevent","stop"])},e.toDisplayString(x.title),9,Rl))]),extra:e.withCtx(()=>[e.createElementVNode("div",Ul,[N===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),N!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(L=>t.onDeleteGroup(N),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.data,(L,O)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:L.checked,"onUpdate:checked":k=>L.checked=k,class:"custom-group",key:O},{default:e.withCtx(()=>[e.createElementVNode("span",zl,e.toDisplayString(L.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Wl=Z(vl,[["render",Hl],["__scopeId","data-v-7e3049d2"]]);var ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},go={},Yl={get exports(){return go},set exports(t){go=t}};(function(t,o){(function(n,a){t.exports=a()})(ql,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(Yl);const Kl=go;ne.extend(Kl);const Xl=e.defineComponent({name:"Condition",components:{CloseOutlined:io,DownOutlined:Zr,AppstoreAddOutlined:fn,ASelect:j.Select,AInput:j.Input,ADatePicker:j.DatePicker,AButton:j.Button,ADropdown:j.Dropdown,AMenu:j.Menu,AMenuItem:j.MenuItem,ASubMenu:j.SubMenu,APopover:j.Popover,ATabs:j.Tabs,ATabPane:j.TabPane,ARadioGroup:j.RadioGroup,ARadio:j.Radio,AInputNumber:j.InputNumber,ASelectOption:j.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var ie,le,Se,Ge,ze,tt,ot,$e,He;const o=(ie=window==null?void 0:window.config)==null?void 0:ie.pageId,n=e.inject(de),a=e.inject(Ae),r=e.unref(e.inject(Ne)),l=e.inject(Go),i=e.inject(Me),d=e.computed(()=>{var T;const H=[];return(T=e.unref(i))==null||T.forEach(v=>{const{keyName:P="",id:W="",type:K}=v;K==="ecanRangePicker"?H.push({value:`${W}-startTime`,label:`${P||W}-开始时间值`,keyName:`${P||W}-startTime`},{value:`${W}-endTime`,label:`${P||W}-结束时间值`,keyName:`${P||W}-endTime`}):H.push({value:W,label:`${P||W}`,keyName:`${P||W}`})}),console.log("result",H),H}),s=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.dataViewId}),c=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.source}),p=e.ref(!1),u={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},f=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],h=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),C=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],m=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],b=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],y=e.ref({fieldName:(le=t.data)==null?void 0:le.fieldName,fieldType:(Se=t.data)==null?void 0:Se.fieldType,rule:(Ge=t.data)==null?void 0:Ge.rule,id:(ze=t.data)==null?void 0:ze.id,fieldValue:x(),label:(tt=t.data)==null?void 0:tt.label,targetSource:"",typeGuid:(ot=t.data)==null?void 0:ot.typeGuid,dataType:(($e=t.data)==null?void 0:$e.dataType)||"",componentId:((He=t.data)==null?void 0:He.componentId)||""});function x(){const{fieldType:H="",dataType:T="",fieldValue:v=""}=t.data;if(H==="DATE"&&T==="time")return ne(v);if(T==="component"){const P=e.unref(d).find(W=>W.keyName===v);return P?P.value:v}else return v}const N=e.ref(!1),L=e.computed(()=>y.value.fieldType==="DATE"),O=e.computed(()=>{const H=t.type;let T=[];if(["classificationList","seriesList","rowHeaderList"].includes(H)){let v=[];for(const P in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),P)&&!["controlList","sqlConditions"].includes(P)){const W=e.unref(n)[P];Array.isArray(W)&&(["classificationList","seriesList","rowHeaderList"].includes(P)?v=v.concat(W.filter(K=>K.show)):v=v.concat(W))}T=v}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(H)&&(T=e.unref(l));return T.map(v=>({...v,label:v.title||v.label,value:v.name}))}),{updateCondition:k,deleteCondition:I}=e.inject(Uo,{updateCondition:(H,T,v)=>{},deleteCondition:(H,T)=>{}}),S=()=>{I(t.level,t.index)};e.watch(y,H=>{const T=oe.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(T.fieldValue=H.fieldValue.format(H.dateFormat)),k(T,t.level,t.index)},{deep:!0});const _=H=>{const T=e.unref(O).find(J=>J.value===H)||{},{name:v,genericType:P,id:W,label:K,typeGuid:X}=T;y.value={id:W,fieldName:v,fieldType:P,label:K,rule:"",fieldValue:P==="DATE"?null:void 0,targetSource:"",typeGuid:X,dataType:""}},V=H=>{const T=e.unref(d).find(v=>v.value===H)||{};e.unref(y).componentId=T.id||""},w=e.computed(()=>{const H=e.unref(y).fieldType;return H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),$=e.computed(()=>{let H="";const T=e.unref(w).find(v=>v.value===e.unref(y).rule);return T&&(H=T.label),H}),B=e.computed(()=>{let H={fontSize:"12px"};return e.unref($)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),F=e.ref([]),M=async()=>{var H;if(!(e.unref(F).length>0))try{const T=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(y).fieldName,hrpIndexTypeGuid:e.unref(y).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:v,data:P=[]}=T.data;v&&(F.value=(H=P==null?void 0:P.slice(0,200))==null?void 0:H.map(W=>({label:W,value:W})))}catch(T){console.error(T)}},D=H=>{e.unref(y).rule=H,e.unref(y).fieldValue=e.unref(y).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&M()},R=H=>{e.unref(y).dataType=H,e.unref(y).fieldValue=""},z=e.ref(),g=H=>{z.value=H,e.unref(y).fieldValue=(H==null?void 0:H.join(","))||""},A=H=>{const{keyPath:T}=H;e.unref(y).rule=T[0],e.unref(y).dataType=T[1],e.unref(y).dateFormat=T[2],e.unref(y).fieldValue=""};e.onMounted(()=>{var P,W,K,X,J,se,he,Q,re;if(y.value.dataType=((P=t.data)==null?void 0:P.dataType)||"",y.value.componentId=((W=t.data)==null?void 0:W.componentId)||"",e.unref(y).fieldType==="DATE"){e.unref(y).dateFormat=(K=t.data)==null?void 0:K.dateFormat,e.unref(y).activeKey=(X=t.data)==null?void 0:X.activeKey,e.unref(y).radioValue=((J=t.data)==null?void 0:J.radioValue)||"",e.unref(y).calcWays=((se=t.data)==null?void 0:se.calcWays)||[],e.unref(y).dateCalcTypes=((he=t.data)==null?void 0:he.dateCalcTypes)||[];const nt=e.unref(h).find(Vp=>{var wa;return Vp.key===((wa=t.data)==null?void 0:wa.activeKey)});nt&&ee(nt,t.data)}else z.value=((re=(Q=t.data)==null?void 0:Q.fieldValue)==null?void 0:re.split(","))||[];const{fieldType:H,fieldName:T,rule:v}=y.value;H!=="DATE"&&T&&v&&["IN","NOT_IN"].includes(v)&&M()});const E=H=>{if(e.unref(y).activeKey===H){e.unref(h)[H].radioValue=e.unref(y).radioValue,e.unref(h)[e.unref(y).activeKey]&&(e.unref(h)[e.unref(y).activeKey].radioValue=e.unref(y).radioValue,e.unref(y).radioValue==="1"?e.unref(h)[H].beforeNum=e.unref(y).calcWays[0]:e.unref(y).radioValue==="2"&&(e.unref(h)[H].afterNum=e.unref(y).calcWays[0]));return}e.unref(h).forEach(T=>{T.beforeNum=0,T.afterNum=0,T.radioValue="1",T.value=""})},U=(H,T)=>{p.value=!0;const v=H.target.value,P=T.type,W=e.unref(y).dateFormat,K=Math.abs(T.beforeNum),X=T.afterNum;T.value=te(v,P,W,K,X)},G=H=>{const T=e.unref(y).activeKey;if(H!==T)return;let v="";T===0?v="years":T===1?v="quarters":T===2?v="months":T===3?v="weeks":T===4&&(v="days");const P=e.unref(y).dateFormat,W=e.unref(y).radioValue;let K=0,X=0;return W==="1"?K=Math.abs(e.unref(y).calcWays[0]):W==="2"&&(X=e.unref(y).calcWays[0]),te(W,v,P,K,X)},q=(H,T,v,P)=>{if(p.value=!0,T.radioValue===P){const W=H.target.value;v==="+"?T.value=ne().add(W,T.type).format(e.unref(y).dateFormat):T.value=ne().subtract(W,T.type).format(e.unref(y).dateFormat)}},Y=(H,T)=>{(e.unref(y).fieldType!=="DATE"||e.unref(y).dataType!=="component")&&(y.value.fieldValue=ne(H.value,e.unref(y).dateFormat)),e.unref(y).calcWays||(e.unref(y).calcWays=[]),e.unref(y).activeKey=T,e.unref(y).radioValue=H.radioValue,H.radioValue==="1"?e.unref(y).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(y).calcWays[0]=H.afterNum:H.radioValue==="3"?T===4?e.unref(y).calcWays[0]="0":e.unref(y).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(y).calcWays[0]="END"),T===0?e.unref(y).dateCalcTypes=["YEAR"]:T===1?e.unref(y).dateCalcTypes=["QUARTER"]:T===2?e.unref(y).dateCalcTypes=["MONTH"]:T===3?e.unref(y).dateCalcTypes=["WEEK"]:T===4&&(e.unref(y).dateCalcTypes=["DAY"]),N.value=!1};function ee(H,T){const{radioValue:v="",calcWays:P=[]}=T;H.radioValue=v,P!=null&&P.length&&(v==="1"?H.beforeNum=Math.abs(P[0]):v==="2"&&(H.afterNum=P[0]))}function te(H,T,v,P,W){if(H==="1")return ne().subtract(P,T).format(v);if(H==="2")return ne().add(W,T).format(v);if(H==="3"){if(T==="years")return ne().startOf("year").format(v);if(T==="quarters")return ne().startOf("quarter").format(v);if(T==="months")return ne().startOf("month").format(v);if(T==="days")return ne().format(v)}else if(H==="4"){if(T==="years")return ne().endOf("year").format(v);if(T==="quarters")return ne().endOf("quarter").format(v);if(T==="months")return ne().endOf("month").format(v)}return""}return{fieldOptions:O,ruleOptions:w,onFieldChange:_,condition:y,valueOptions:F,onRuleChange:D,onDataTypeChange:R,onFieldValueSelectChange:g,fieldValues:z,onDelete:S,isDateType:L,formatList:f,tabDateList:h,compareList:C,menuRule:m,dateBtnLabel:$,downIconStyle:B,popoverVisible:N,dateRadioStyle:u,showTime:p,controlList:d,dataTypeList:b,handleMenuClick:A,changeTabInitDate:E,changeRadioValue:U,getFieldValue:G,blurCompare:q,okDatePickConfig:Y,onChangeComponent:V,filterOption:(H,T)=>T.label.toLowerCase().indexOf(H.toLowerCase())>=0}}}),qp="",Yp="",Ql={class:"condition"},Jl=["title"],Zl={class:"rule"},ei={class:"data-type"},ti={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},oi={class:"popover-content-wrap"},ni={class:"tabFilterRadio"},ai={key:0},ri={key:1},li={style:{"margin-left":"10px"}},ii={style:{"margin-left":"10px"}},si={style:{position:"absolute",bottom:"10px"}};function ci(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),C=e.resolveComponent("a-date-picker"),m=e.resolveComponent("a-input-number"),b=e.resolveComponent("a-radio"),y=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),N=e.resolveComponent("a-tabs"),L=e.resolveComponent("appstore-add-outlined"),O=e.resolveComponent("a-popover"),k=e.resolveComponent("a-input"),I=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(S,_)=>(e.openBlock(),e.createBlock(i,{key:_,value:S.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:S.label},e.toDisplayString(S.label),9,Jl)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Zl,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,S=>(e.openBlock(),e.createBlock(c,{key:S.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,_=>{var V;return e.openBlock(),e.createBlock(c,{key:_.value,disabled:_.value==="component"&&!((V=t.controlList)!=null&&V.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===_.value?"color: #1890FF;":"")},e.toDisplayString(_.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,w=>(e.openBlock(),e.createBlock(s,{key:w.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===_.value&&t.condition.dateFormat===w.value?"color: #1890FF;":"")},e.toDisplayString(w.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",ei,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(S,_)=>(e.openBlock(),e.createBlock(i,{key:_,value:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",ti,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(C,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=S=>t.condition.fieldValue=S),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(O,{visible:t.popoverVisible,"onUpdate:visible":o[4]||(o[4]=S=>t.popoverVisible=S),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",oi,[e.createVNode(N,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(S,_)=>(e.openBlock(),e.createBlock(x,{key:_,tab:S.label},{default:e.withCtx(()=>[e.createElementVNode("div",ni,[e.createVNode(y,{value:S.radioValue,"onUpdate:value":V=>S.radioValue=V,onChange:V=>t.changeRadioValue(V,S)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ai,"相对当前时间:"+e.toDisplayString(S.value),1)):(e.openBlock(),e.createElementBlock("div",ri,"相对当前时间:"+e.toDisplayString(t.getFieldValue(_)),1)),e.createVNode(b,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(m,{value:S.beforeNum,"onUpdate:value":V=>S.beforeNum=V,min:0,onBlur:V=>t.blurCompare(V,S,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",li,e.toDisplayString(S.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(b,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(m,{value:S.afterNum,"onUpdate:value":V=>S.afterNum=V,min:0,onBlur:V=>t.blurCompare(V,S,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ii,e.toDisplayString(S.afterLabel),1)]),_:2},1032,["style"]),S.beforeText?(e.openBlock(),e.createBlock(b,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),S.afterText?(e.openBlock(),e.createBlock(b,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",si,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[2]||(o[2]=V=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:V=>t.okDatePickConfig(S,_)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[3]||(o[3]=S=>{t.popoverVisible=!0})},[e.createVNode(L)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[5]||(o[5]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(k,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[6]||(o[6]=S=>t.condition.fieldValue=S)},null,8,["value"])),e.createVNode(I,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const di=Z(Xl,[["render",ci],["__scopeId","data-v-93bdd4f0"]]),pi=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:di}}),Kp="",ui={key:0,class:"condition-list"},fi={key:0,class:"condition-container"},mi={key:0,class:"condition-text"},hi={key:1,class:"condition-text"},yi={class:"conditions"};function gi(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",fi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",mi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",hi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",yi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const bi=Z(pi,[["render",gi],["__scopeId","data-v-86c0c5aa"]]),Ci=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:j.Select,AInput:j.Input,AInputNumber:j.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=oe.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Xp="",Nn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),wi={class:"truncations"},xi={class:"rule"},ki={class:"field-value"},_i={class:"field-value"},Si=Nn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ai=Nn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ni=["onClick"];function Ti(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",xi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ki,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",_i,[Si,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ai]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ni)]))),128))])}const Li=Z(Ci,[["render",Ti],["__scopeId","data-v-f543c690"]]),Te=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},Ei=t=>t.replace(/\\n/g,`
59
- `),bo=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),At=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...At(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},Tn=(t,o)=>{var m;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],seriesList:l=[],leftAxisList:i=[],rightAxisList:d=[],queryColumnList:s=[],indicators:c=[]}=t,p=[],u=[...a,...r,...l,...i,...d,...s,...c],f=[];for(const b of u){const y=At((b==null?void 0:b.conditions)||[]);if(y!=null&&y.length){const x=y.filter(N=>Ln(N,o)?(N==null?void 0:N.dataType)==="component":!1).map(N=>{const L=Ln(N,o);return{conditionKey:N.fieldName,conditionLabel:N.fieldName,conditionName:N.fieldName,conditionValueType:N.fieldType,id:L.id,keyName:N.fieldValue,rule:N.rule,notGlobal:!0}});if(x!=null&&x.length)for(const N of x)f.find(L=>L.keyName===N.keyName)||f.push(N)}}const h=n.concat(f),C=h.length;for(let b=0;b<C;b++){const y=h[b];if(y&&!((m=Object.keys(y))!=null&&m.length))continue;const{id:x,keyName:N,conditionLabel:L,conditionKey:O,conditionValueType:k,prop:I,rule:S="NONE",notGlobal:_=!1,format:V}=y;let w=N||x;w&&I&&(w+=`-${I}`);const $=o.find(g=>g.id===x),B={rule:S,label:L,fieldName:O,fieldValue:"",valueType:k,alias:w,globalCondition:!_},{value:F,format:M="YYYY-MM-DD",operate:D,type:R="",useCurrentTime:z}=$||{};if(Te(R,"date")){let g;if(z?g=ne():g=ne(F),D&&F){const{mode:A,type:E,value:U}=D;if(U)switch(E){case"add":g=g.add(U,A);break;case"minus":g=g.subtract(U,A);break}}B.fieldValue=(g==null?void 0:g.format(M))||"",B.dateFormat=V||M}else if(R==="ecanRangePicker"&&I){const{interval:g,intervalUnit:A}=$||{};I==="startTime"?B.rule="GREATER_EQUAL":I==="endTime"&&(B.rule="LESS_EQUAL");let E=null;if(z&&(I==="startTime"?E=ne().subtract(g,A):I==="endTime"&&(E=ne())),$[I]&&(E=ne($[I])),D){const{type:U,value:G,mode:q}=D;switch(U){case"add":E=E&&E.add(G,q);break;case"minus":E=E&&E.subtract(G,q)}}E&&(B.fieldValue=E==null?void 0:E.format(M)),B.dateFormat=V||M}else B.fieldValue=F;p.push(B)}for(let b=p.length-1;b>=0;b--){const y=p[b];y.globalCondition||p.find(N=>N.alias===y.alias&&N.globalCondition)&&p.splice(b,1)}return p},Co=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break}return o};function Ln(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let wo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const Bi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:bi,TruncationList:Li,AModal:j.Modal,AButton:j.Button,ATabs:j.Tabs,ATabPane:j.TabPane},setup(t,{expose:o}){var $;const n=e.ref("1"),a=()=>{var B;return`添加过滤条件-${((B=t.item)==null?void 0:B.label)||""}`},r=e.inject(de),l=e.inject(Oe),i=e.inject(Me),d=e.computed(()=>{var B;return(B=e.unref(r))==null?void 0:B.dataSourceId}),s=e.inject(Pe),c=e.inject(Ht),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,B=>{var F,M,D,R;B&&(Array.isArray((F=t.item)==null?void 0:F.conditions)&&(p.value=oe.cloneDeep((M=t.item)==null?void 0:M.conditions)||[]),Array.isArray((D=t.item)==null?void 0:D.truncations)?u.value=oe.cloneDeep((R=t.item)==null?void 0:R.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!B)},{flush:"post"});let h=!1;const C=B=>{var F;h=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==B?p.value=[{join:B,conditions:[e.unref(p)[0],{keyValue:wo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===B&&p.value[0].conditions.push({keyValue:wo()}))};e.provide(Uo,{updateCondition(B,F,M){var R;h=!0;let D=e.unref(p);for(let z=0;z<F&&D[0];z++)D=(R=D[0])==null?void 0:R.conditions;Array.isArray(D)&&D[M]&&(D[M]=B)},deleteCondition(B,F){var D,R;h=!0;let M=e.unref(p);for(let z=0;z<B&&M[0];z++)M=(D=M[0])==null?void 0:D.conditions;if(Array.isArray(M)&&M[F]&&(M.splice(F,1),M.length===1)){let z=e.unref(p);const g=B-2>0?B-2:0;for(let A=0;A<g&&z[0];A++)z=(R=z[0])==null?void 0:R.conditions;z[0].join===M[0].join?z[0].conditions=[...M[0].conditions,...z[0].conditions.slice(1)]:z[0]=M[0]}}});const m=B=>{h=!0,u.value=B},b=e.computed(()=>{var F;const B=[];return(F=e.unref(i))==null||F.forEach(M=>{const{keyName:D="",id:R="",type:z}=M;z==="ecanRangePicker"?B.push({value:`${R}-startTime`,label:`${D||R}-开始时间值`,keyName:`${D||R}-startTime`},{value:`${R}-endTime`,label:`${D||R}-结束时间值`,keyName:`${D||R}-endTime`}):B.push({value:R,label:`${D||R}`,keyName:`${D||R}`})}),B}),y=()=>{var g,A;const{controlList:B=[]}=e.unref(r),F=((g=e.unref(r)[t.type])==null?void 0:g.slice())||[],M=At(oe.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList"].includes(t.type)&&((A=e.unref(u))!=null&&A.length)&&(F[t.index].truncations=e.unref(u));const D=At(e.unref(p));for(const E of D)if(E.dataType==="component"&&E.fieldValue){const U=e.unref(b).find(G=>G.value===E.fieldValue);U&&(E.fieldValue=U.keyName)}const R=M.filter(E=>!D.find(U=>U.componentId===E.componentId)).filter(E=>!B.find(U=>U.id===E.componentId)),z=D.filter(E=>!M.find(U=>U.componentId===E.componentId));x(R,z),console.log("list",F),l({[t.type]:F,sqlConditions:Tn({...e.unref(r),[t.type]:F},e.unref(i))})};function x(B,F){var D;const M=B.map(R=>({...R,delete:!0})).concat(F.map(R=>({...R,add:!0})));for(const R of M){const z=e.unref(i).find(g=>g.id===R.componentId);if(z){const{type:g,id:A,events:E=[]}=z,U=Co(g);if(R.add)E.find(G=>{var q;return G.on===U&&G.target===((q=e.unref(s))==null?void 0:q.id)&&G.emit==="refreshData"})||c({id:A,events:[...E,{on:U,target:(D=e.unref(s))==null?void 0:D.id,emit:"refreshData"}].reverse()});else if(R.delete){const G=E.findIndex(q=>{var Y;return q.on===U&&q.target===((Y=e.unref(s))==null?void 0:Y.id)&&q.emit==="refreshData"});G!==-1&&(E.splice(G,1),c({id:A,events:E}))}}}}const N=()=>{f.value=!0},L=()=>{p.value=[],f.value=!1},O=()=>{h&&y(),h=!1,L()},k=()=>{L()},I=e.inject(Ae),S=e.unref(e.inject(Ne)),_=($=window==null?void 0:window.config)==null?void 0:$.pageId,V=e.ref([]);e.provide(Go,V);const w=async B=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const M=await I.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:_,dataSourceId:e.unref(d),hrpIndexGuid:B,indexGuid:B},{headers:{Authentication:S,operateContext:"ygt"}}),{success:D,data:R=[]}=M.data;D&&((F=R==null?void 0:R.dataViewColumns)!=null&&F.length)&&(V.value=R.dataViewColumns)}catch(M){console.error(M)}};return e.watch(()=>t.item,B=>{B&&f.value&&w(B.id)}),o({showModal:N}),{visible:f,onOk:O,onCancel:k,handleTitle:a,conditionList:p,truncationList:u,addCondition:C,onUpdatetruncation:m,activeKey:n}}}),Qp="",Oi={class:"header"},Vi={class:"header"};function Ii(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Oi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Vi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const vi=Z(Bi,[["render",Ii],["__scopeId","data-v-777020cc"]]),xo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:xo(t,r.children)&&(n=xo(t,r.children)))}return n},$i=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:j.Row,ACol:j.Col,ATextarea:j.Textarea,APopover:j.Popover,AInputSearch:j.InputSearch,ATree:j.Tree,DoubleRightOutlined:Kr},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Ae),a=e.unref(e.inject(Ne)),r=e.inject(de),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const k=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(k==null?void 0:k.filter(I=>I.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:k=>{o("update:value",k),o("change",k)}}),u=e.ref(""),f=k=>{const I=document.getElementById("calTextArea");let S=p.value;if(document.selection){const _=document.selection.createRange();_.text=k}else if(typeof I.selectionStart=="number"&&typeof I.selectionEnd=="number"){const _=I.selectionStart,V=I.selectionEnd;let w=_;S=S.substring(0,_)+k+S.substring(V,S.length),w+=k.length,I.selectionStart=I.selectionEnd=w}else S+=k;p.value=S},h=["+","-","*","/","(",")"],C=(k,I)=>{let S="";switch(I){case"name":{S="${"+k+"}";break}case"function":{S=k+"()";break}default:S=k}f(S)},m=[],b=e.ref([]),y=e.ref(!0),x=e.ref([]),N=k=>{var I;for(const S of k)(I=S==null?void 0:S.children)!=null&&I.length?N(S.children):m.push({key:S.key,title:S.title})},L=async()=>{try{const k=await n.get(`${ke}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:I,data:S=[]}=k.data;I&&(S!=null&&S.length)&&(N(S),x.value=S)}catch(k){console.error(k)}},O=k=>{b.value=k,y.value=!1};return e.watch(u,k=>{const I=m.map(S=>S.title.indexOf(k)>-1?xo(S.key,x.value):null).filter((S,_,V)=>S&&V.indexOf(S)===_);b.value=I,u.value=k,y.value=!0}),e.onMounted(()=>{L()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:x,searchFuncValue:u,expandedKeys:b,autoExpandParent:y,selectedElem:C,onExpand:O}}}),Jp="",Zp="",Fi={class:"formula-calculation"},Di={class:"field-area"},Pi=["onClick"],Mi={class:"cal_right_bottom"},ji={class:"cal_fu"},Ri=["onClick"],Ui={class:"function-wrap"},Gi={class:"wrap-search"},zi={class:"tree-box"},Hi={key:0},Wi={style:{color:"#f50"}},qi={key:1},Yi=["onClick"],Ki={class:"cal_a"};function Xi(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Fi,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:m=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,Pi))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Mi,[e.createElementVNode("ul",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,C)=>(e.openBlock(),e.createElementBlock("li",{onClick:m=>t.selectedElem(h,"symbol"),key:C},e.toDisplayString(h),9,Ri))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Ui,[e.createElementVNode("div",Gi,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",zi,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:C})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Hi,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Wi,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",qi,e.toDisplayString(h),1)),C?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:m=>t.selectedElem(h,"function")},"插入",8,Yi)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Ki,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Qi=Z($i,[["render",Xi],["__scopeId","data-v-1e6dd439"]]),Ji=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Qi,AForm:j.Form,AModal:j.Modal,AFormItem:j.FormItem,AInput:j.Input,ASelect:j.Select,ASelectOption:j.SelectOption,ATextarea:j.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(Me),a=e.inject(de),r=e.inject(Oe),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const V=["leftAxisList","rightAxisList","queryColumnList","indicators"];let w=[];for(const $ of V)Object.prototype.hasOwnProperty.call(e.unref(a),$)&&(w=w.concat(e.unref(a)[$]));return w}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u=e.ref(),f=e.ref(!1),h=e.ref();e.watch(f,V=>{if(V)if(t.mode==="edit"){const{label:w,calcType:$,formula:B,builtInValueSource:F,builtInFormula:M,builtInCalcWay:D}=t.item;h.value={label:w,calcType:$,formula:B,builtInValueSource:F,builtInFormula:M,builtInCalcWay:D}}else t.mode==="add"&&(h.value=oe.cloneDeep(p));else h.value=oe.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!V)},{immediate:!0,deep:!0});let C=!1;const m=()=>{C=!0},b=V=>{const w=e.unref(l).find($=>$.id===V);w&&(h.value.builtInCalcWay=w.keyName),C=!0},y=()=>{var $;const V=(($=e.unref(a)[t.type])==null?void 0:$.slice())||[],{label:w}=e.unref(h)||{};if(t.mode==="add"){const B=wo();V.push({...e.unref(h),id:B,show:!0,name:w})}else t.mode==="edit"&&(V[t.index]={...V[t.index],...e.unref(h),name:w});r({[t.type]:V})},x=()=>{f.value=!0},N=()=>{f.value=!1},L=async(V,w)=>{if(w==="")return Promise.reject(new Error("请输入指标名"));{const $=e.unref(d).find(B=>B.label===w);return $?$.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},O=e.computed(()=>{let V={label:[{required:!0,validator:L,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&(V={...V,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),V}),k=()=>{u.value.validate().then(()=>{C&&y(),C=!1,N()})},I=()=>{u.value.clearValidate(),N()},S=()=>{C=!0,e.unref(h).builtInCalcWay=""},_=e.computed(()=>{let V="";const w=e.unref(h).builtInCalcWay,$=e.unref(h).builtInValueSource;if(!$||!w)return V;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{w==="ASC"?V="【"+$+"】由小到大在所有值中的排名":V="【"+$+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{V=`所有【】的
60
- `,w==="ASC"?V=V+"【"+$+"】由小到大的组内的排名":V=V+"【"+$+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let B="";switch(w){case"SUM":{B="求和";break}case"AVG":{B="求平均值";break}case"MIN":{B="求最小值";break}case"MAX":{B="求最大值";break}}V="将所有【"+$+"】"+B;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let B="";switch(V=`所有【】的
61
- `,w){case"SUM":{B="求和";break}case"AVG":{B="求平均值";break}case"MIN":{B="求最小值";break}case"MAX":{B="求最大值";break}}V=V+"将所有【"+$+"】"+B;break}}return V});return o({showModal:x}),{visible:f,onCancel:I,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:k,onChange:m,formRules:O,accessLogic:_,formRef:u,onChangeBuiltInFormula:S,componentList:l,onChangeComponent:b}}}),eu="",Zi={key:0,class:"accesstip"};function es(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(f,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=C=>t.formState.label=C),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=C=>t.formState.calcType=C),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=C=>t.formState.formula=C),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=C=>t.formState.builtInFormula=C),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=C=>t.formState.builtInValueSource=C),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(C,m)=>(e.openBlock(),e.createBlock(s,{key:m,value:C.label,disabled:t.item.label===C.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=C=>t.formState.builtInCalcWay=C),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Zi," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=C=>t.formState.builtInValueSource=C),onChange:t.onChangeComponent},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.componentList,(C,m)=>(e.openBlock(),e.createBlock(s,{key:m,value:C.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.keyName),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const ts=Z(Ji,[["render",es],["__scopeId","data-v-d21823c3"]]),os=e.defineComponent({name:"DataConfigCard",directives:{focus:An},components:{CalculationModal:ts,FilterModal:vi,CustomGroupModal:Wl,SettingOutlined:hl,DeleteOutlined:Hr,CopyOutlined:Rr,CustomSortModal:Il,PlusOutlined:pl,ACard:j.Card,ACheckbox:j.Checkbox,AInput:j.Input,ADropdown:j.Dropdown,AMenu:j.Menu,ASubMenu:j.SubMenu,AMenuItem:j.MenuItem,AMenuDivider:j.MenuDivider,ASelect:j.Select,Draggable:at},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(de),a=e.inject(Oe),r=["leftAxisList","rightAxisList","indicators","queryColumnList"],l=["classificationList","seriesList","rowHeaderList","queryColumnList"],i=e.inject(zt),d=(T={})=>{if(e.unref(i)==="SQL_VIEW")return!0;let v=!1;return T.scope==="IDX"?r.includes(t.type)&&(v=!0):["DIM","BUILT_IN_DIM"].includes(T.scope)&&l.includes(t.type)&&(v=!0),v},s=(T="{}")=>{var v;try{const P=JSON.parse(T);if(!d(P))return;const W=((v=e.unref(n)[t.type])==null?void 0:v.slice())||[];["classificationList","seriesList"].includes(t.type)&&W.forEach(K=>{K.show=!1}),p(W,P),W.push(P),a({[t.type]:W}),sessionStorage.setItem("indicator-list-item","")}catch(P){console.error(P)}},c=(T="{}")=>{var v;try{const{cardItem:P,type:W,index:K}=JSON.parse(T);if(!d(P)||W===t.type)return;const X=((v=e.unref(n)[t.type])==null?void 0:v.slice())||[];p(X,P),X.push(P);const J=e.unref(n)[W].slice()||[];J.splice(K,1),a({[t.type]:X,[W]:J})}catch(P){console.error(P)}};function p(T,v){const P=[];if(T.forEach(W=>{W.label.includes(v.label)&&P.push(W.label.split(v.label)[1])}),P.length>=1){for(let W=1;W<=P.length;W++)if(!P.includes(W+"")){v.label=v.label+W;break}}}const u=(T,v)=>{var K,X;const P=(K=T.target)==null?void 0:K.checked,W=((X=e.unref(n)[t.type])==null?void 0:X.slice())||[];["classificationList","seriesList"].includes(t.type)&&W.forEach(J=>{J.show=!1}),W[v].show=P,a({[t.type]:W})},f=T=>{var P;const v=((P=e.unref(n)[t.type])==null?void 0:P.slice())||[];v.splice(T,1),a({[t.type]:v})},h=()=>{sessionStorage.setItem("indicator-card-item","")},C=()=>{const T=sessionStorage.getItem("indicator-list-item"),v=sessionStorage.getItem("indicator-card-item");T?s(T):v&&c(v)},m=T=>{var se,he;const{newIndex:v,oldIndex:P,from:W,to:K}=T,X=W.id,J=K.id;if(v>=0&&P>=0){if(X===J){const Q=((se=e.unref(n)[t.type])==null?void 0:se.slice())||[],re=Q.splice(P,1)[0];re&&(Q.splice(v,0,re),a({[t.type]:Q}))}else if(t.type===J){const Q=((he=e.unref(n)[J])==null?void 0:he.slice())||[];if(Q!=null&&Q.length){const re=Q.splice(Q.length-1,1)[0];re&&(Q.splice(v,0,re),a({[t.type]:Q}))}}}},b=(T,v)=>{const P=T.oldIndex,W=v[P];W&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:W,type:t.type,index:P}))},y=e.computed(()=>e.unref(n)[t.type]||[]),x=e.ref([]);let N=!1;e.watch(()=>e.unref(y).length,T=>{x.value=new Array(T).fill(!1)},{flush:"post",immediate:!0});const L=T=>{var P;const v=((P=e.unref(n)[t.type])==null?void 0:P.slice())||[];v.splice(T,1),a({[t.type]:v})},O=T=>{x.value[T]=!0},k=()=>{N=!0},I=(T,v,P)=>{var W,K;if(x.value[v]=!1,N){const X=(W=T.target)==null?void 0:W.value,J=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[],se=J.filter(Q=>{var re;return(re=Q==null?void 0:Q.formula)==null?void 0:re.includes(P)}).map(Q=>Q.id),he=J.filter(Q=>{var re;return(re=Q==null?void 0:Q.builtInValueSource)==null?void 0:re.includes(P)}).map(Q=>Q.id);if(se!=null&&se.length)for(const Q of se){const re=J.find(nt=>nt.id===Q);re.formula=re.formula.replaceAll(P,X)}if(he!=null&&he.length)for(const Q of he){const re=J.find(nt=>nt.id===Q);re.builtInValueSource=re.builtInValueSource.replaceAll(P,X)}J[v].label=X,a({[t.type]:J})}N=!1},S="DEFAULT",_=e.computed(()=>{const T=e.unref(n)[t.type]||[],{leftAxisList:v=[],rightAxisList:P=[],indicators:W=[]}=e.unref(n)||{};return[{id:S,label:"默认",name:"默认"},...T,...v,...P,...W]}),V=(T={},v,P="ASC")=>{var se;const{label:W,name:K,id:X}=T,J=((se=e.unref(n)[t.type])==null?void 0:se.slice())||[];X===S?delete J[v].sort:J[v].sort={label:W,columnName:K,type:"NORMAL",order:P},a({[t.type]:J})},w=(T={},v="ASC")=>{const W={ASC:"升序",DESC:"降序"}[v],{sort:K}=T,{label:X,order:J}=K||{};return X&&J===v?`${W}(${X})`:W},$=e.ref(),B=e.ref(),F=e.ref(),M=e.ref(),D=(T={},v)=>{var P;$.value=T,B.value=v,(P=e.unref(F))==null||P.showModal()},R=T=>{var v;return"自定义排序"+(((v=T==null?void 0:T.sort)==null?void 0:v.type)==="CUSTOM"?"(已配置)":"")},z=(T={},v)=>{var P;$.value=T,B.value=v,(P=e.unref(M))==null||P.showModal()},g=T=>"自定义分组"+((T==null?void 0:T.customGroup)!=null?"(已配置)":""),A=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],E=(T,v)=>{var W;const P=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];P[v].aggregate=T,a({[t.type]:P})},U=(T,v)=>{var W;const P=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];P[v].dateFormat=T,a({[t.type]:P})},G=(T="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[T]})`,q=(T={})=>{var v;return"过滤"+(T!=null&&T.conditions&&((v=T==null?void 0:T.conditions)==null?void 0:v.length)>0?"(已配置)":"")},Y=e.ref(),ee=(T={},v)=>{$.value=T,B.value=v,e.unref(Y).showModal()},te=e.ref(),ae=e.ref("add"),ie=(T,v,P)=>{var W;ae.value=T,T==="edit"&&($.value=v,B.value=P),(W=e.unref(te))==null||W.showModal()},le=e.inject(Ae),Se=e.unref(e.inject(Ne)),Ge=e.ref([]),ze=e.computed(()=>e.unref(n)[t.type]||{}),tt=async()=>{try{const T=await le.post(`${ke}/diagram/dimFields`,{},{headers:{Authentication:Se,operateContext:"ygt"}}),{success:v,data:P=[]}=T.data;v&&(Ge.value=P)}catch(T){console.error(T)}},ot=(T,v)=>{const P=e.unref(n)[t.type]||{};P[v]=T,a({[t.type]:P})},$e=e.ref({}),He=async(T,v)=>{var W;const{name:P}=v;if(T&&bo(v,"indexCode")&&!bo(e.unref($e),P)){const K=await le.post(`${ke}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:v.id,pageId:(W=window==null?void 0:window.config)==null?void 0:W.pageId},{headers:{Authentication:Se,operateContext:"ygt"}}),{success:X,data:J=[]}=K.data;X&&($e.value[P]={name:J.name,code:J.indexCode})}},H=T=>{const v=document.createElement("input");document.body.appendChild(v),v.setAttribute("value",T),v.select(),document.execCommand("copy"),document.body.removeChild(v),j.message.success("复制成功")};return e.onMounted(()=>{t.type==="formFields"&&tt()}),{onCheckboxChange:u,onDropEnd:f,onDragItemEnd:h,onDragItemAdd:C,onDragItemSort:m,onDragItemStart:b,cardItemList:y,onDelete:L,onEdit:O,onCommitLabelChange:I,sortList:_,onSort:V,handleSortTitle:w,showCustomSortModal:D,customSortModalRef:F,currentItem:$,currentIndex:B,handleCustomSortTitle:R,handleCustomGroupTitle:g,customGroupModalRef:M,showCustomGroupModal:z,editLabelList:x,onLabelChange:k,aggregateList:A,onAggregateChange:E,onDateFormatChange:U,handleAggregateTitle:G,onShowCalculationModal:ie,handleFilterTitle:q,filterModalRef:Y,showFilterModal:ee,calculationModalRef:te,calculationModalMode:ae,formatList:o,fieldOptions:Ge,fieldData:ze,onFieldChange:ot,onVisibleChange:He,copyDataViewName:H,dataViewMap:$e}}}),tu="",ou="",st=t=>(e.pushScopeId("data-v-69d21ca5"),t=t(),e.popScopeId(),t),ns={class:"title"},as={class:"title-text"},rs={class:"field-wrap"},ls={class:"field-item"},is=st(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),ss={class:"field-item"},cs=st(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),ds={class:"title"},ps={class:"title-text"},us=st(()=>e.createElementVNode("span",null,"添加计算指标",-1)),fs={class:"card-item-wrap"},ms={class:"card-item-inner"},hs=["onClick"],ys=["onClick"],gs=["onClick"],bs={style:{display:"flex","align-items":"center"}},Cs=["title"],ws=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),xs={style:{display:"flex","align-items":"center"}},ks=["title"],_s=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Ss(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),p=e.resolveComponent("setting-outlined"),u=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-sub-menu"),h=e.resolveComponent("a-menu-divider"),C=e.resolveComponent("copy-outlined"),m=e.resolveComponent("a-menu"),b=e.resolveComponent("a-dropdown"),y=e.resolveComponent("delete-outlined"),x=e.resolveComponent("a-checkbox"),N=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),k=e.resolveComponent("filter-modal"),I=e.resolveComponent("calculation-modal"),S=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createElementVNode("div",as,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",rs,[e.createElementVNode("div",ls,[is,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=_=>t.onFieldChange(_,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",ss,[cs,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=_=>t.onFieldChange(_,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createElementVNode("div",ps,e.toDisplayString(t.title),1),["classificationList","seriesList","rowHeaderList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(_=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),us]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(N,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=_=>t.cardItemList=_),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=_=>t.onDragItemStart(_,t.cardItemList))},{item:e.withCtx(({element:_,index:V})=>[e.createElementVNode("div",fs,[e.createVNode(x,{class:"card-item",checked:_.show,onChange:w=>t.onCheckboxChange(w,V)},{default:e.withCtx(()=>[e.createElementVNode("div",ms,[!t.editLabelList[V]&&_.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(w=>t.onEdit(V),["prevent","stop"])},e.toDisplayString(_.label),9,hs)):e.createCommentVNode("",!0),!t.editLabelList[V]&&!_.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(w=>t.onEdit(V),["prevent","stop"])}," 请点击填入名字 ",8,ys)):e.createCommentVNode("",!0),t.editLabelList[V]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:2,"default-value":_.label,size:"small",onBlur:w=>t.onCommitLabelChange(w,V,_.label),onPressEnter:w=>t.onCommitLabelChange(w,V,_.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[S]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(_.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(w=>t.onShowCalculationModal("edit",_,V),["prevent","stop"])}," fx ",8,gs)):e.createCommentVNode("",!0),e.createVNode(b,{trigger:["click"],onVisibleChange:w=>t.onVisibleChange(w,_)},{overlay:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[["classificationList","seriesList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:t.handleSortTitle(_,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,w=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:w.id,onClick:$=>t.onSort(w,V,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f,{title:t.handleSortTitle(_,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,w=>(e.openBlock(),e.createBlock(u,{class:"menu-item",style:{"white-space":"nowrap"},key:w.id,onClick:$=>t.onSort(w,V,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(u,{onClick:w=>t.showCustomSortModal(_,V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(_)),1)]),_:2},1032,["onClick"]),e.createVNode(h),e.createVNode(u,{onClick:w=>t.showCustomGroupModal(_,V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(_)),1)]),_:2},1032,["onClick"]),e.createVNode(h),_.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,w=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:w.value,onClick:$=>t.onDateFormatChange(w.value,V)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(_.dateFormat===w.value||!_.dateFormat&&w.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(w.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(h)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(u,{onClick:w=>t.showFilterModal(_,V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(_)),1)]),_:2},1032,["onClick"]),e.createVNode(h),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{title:t.handleAggregateTitle(_.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,w=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:w.value,onClick:$=>t.onAggregateChange(w.value,V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h)],64)),t.dataViewMap[_.name]?(e.openBlock(),e.createBlock(u,{key:2,onClick:w=>t.copyDataViewName(t.dataViewMap[_.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[_.name].name},[ws,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[_.name].name),1)],8,Cs),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[_.name]?(e.openBlock(),e.createBlock(u,{key:3,onClick:w=>t.copyDataViewName(t.dataViewMap[_.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[_.name].code},[_s,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[_.name].code),1)],8,ks),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(p,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(y,{class:"delete-icon",onClick:e.withModifiers(w=>t.onDelete(V),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(k,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(I,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const As=Z(os,[["render",Ss],["__scopeId","data-v-69d21ca5"]]),Ns={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"}},Ts=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:As},setup(){const t=e.inject(Pe),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Oe),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var b,y;const s=oe.cloneDeep((b=e.unref(t))==null?void 0:b.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList"],text:["indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const x=u.length;f=((y=f.slice(x,x+1))==null?void 0:y.toLowerCase())+f.slice(x+1)}const h=p[f],C=Ns,m=(h==null?void 0:h.length)||0;for(let x=0;x<m;x++){const N=h[x];if(!N)break;r.push({...C[N],type:N})}for(const x of c)i(s,x)&&!h.find(N=>N===x)&&(s[x]=[]);l(s)})(),{cardsMap:a,cards:r}}}),nu="",au="",Ls={class:"data-group"};function Es(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Bs=Z(Ts,[["render",Es],["__scopeId","data-v-603b1b70"]]),Os=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Vs={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},Is=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:j.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function vs(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const $s=Z(Is,[["render",vs]]),Fs=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:j.InputNumber,ASelect:j.Select,ASelectOption:j.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?o("change",u):o("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Ds(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const En=Z(Fs,[["render",Ds]]),Ps=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:j.RadioGroup,ARadioButton:j.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function Ms(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const js=Z(Ps,[["render",Ms]]),Rs=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:j.Select,ASelectOption:j.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function Us(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const Gs=Z(Rs,[["render",Us]]),zs=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:j.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function Hs(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Ws=Z(zs,[["render",Hs]]);var pe="top",be="bottom",Ce="right",ue="left",ko="auto",ct=[pe,be,Ce,ue],Ye="start",dt="end",qs="clippingParents",Bn="viewport",pt="popper",Ys="reference",On=ct.reduce(function(t,o){return t.concat([o+"-"+Ye,o+"-"+dt])},[]),Vn=[].concat(ct,[ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ye,o+"-"+dt])},[]),Ks="beforeRead",Xs="read",Qs="afterRead",Js="beforeMain",Zs="main",ec="afterMain",tc="beforeWrite",oc="write",nc="afterWrite",ac=[Ks,Xs,Qs,Js,Zs,ec,tc,oc,nc];function Le(t){return t?(t.nodeName||"").toLowerCase():null}function me(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function je(t){var o=me(t).Element;return t instanceof o||t instanceof Element}function we(t){var o=me(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function _o(t){if(typeof ShadowRoot>"u")return!1;var o=me(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function rc(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!we(l)||!Le(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function lc(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!we(r)||!Le(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const ic={name:"applyStyles",enabled:!0,phase:"write",fn:rc,effect:lc,requires:["computeStyles"]};function Ee(t){return t.split("-")[0]}var Re=Math.max,Nt=Math.min,Ke=Math.round;function So(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function In(){return!/^((?!chrome|android).)*safari/i.test(So())}function Xe(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&we(t)&&(r=t.offsetWidth>0&&Ke(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&Ke(a.height)/t.offsetHeight||1);var i=je(t)?me(t):window,d=i.visualViewport,s=!In()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Ao(t){var o=Xe(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function vn(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&_o(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Ie(t){return me(t).getComputedStyle(t)}function sc(t){return["table","td","th"].indexOf(Le(t))>=0}function De(t){return((je(t)?t.ownerDocument:t.document)||window.document).documentElement}function Tt(t){return Le(t)==="html"?t:t.assignedSlot||t.parentNode||(_o(t)?t.host:null)||De(t)}function $n(t){return!we(t)||Ie(t).position==="fixed"?null:t.offsetParent}function cc(t){var o=/firefox/i.test(So()),n=/Trident/i.test(So());if(n&&we(t)){var a=Ie(t);if(a.position==="fixed")return null}var r=Tt(t);for(_o(r)&&(r=r.host);we(r)&&["html","body"].indexOf(Le(r))<0;){var l=Ie(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function ut(t){for(var o=me(t),n=$n(t);n&&sc(n)&&Ie(n).position==="static";)n=$n(n);return n&&(Le(n)==="html"||Le(n)==="body"&&Ie(n).position==="static")?o:n||cc(t)||o}function No(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ft(t,o,n){return Re(t,Nt(o,n))}function dc(t,o,n){var a=ft(t,o,n);return a>n?n:a}function Fn(){return{top:0,right:0,bottom:0,left:0}}function Dn(t){return Object.assign({},Fn(),t)}function Pn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var pc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,Dn(typeof o!="number"?o:Pn(o,ct))};function uc(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=Ee(n.placement),s=No(d),c=[ue,Ce].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=pc(r.padding,n),f=Ao(l),h=s==="y"?pe:ue,C=s==="y"?be:Ce,m=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],b=i[s]-n.rects.reference[s],y=ut(l),x=y?s==="y"?y.clientHeight||0:y.clientWidth||0:0,N=m/2-b/2,L=u[h],O=x-f[p]-u[C],k=x/2-f[p]/2+N,I=ft(L,k,O),S=s;n.modifiersData[a]=(o={},o[S]=I,o.centerOffset=I-k,o)}}function fc(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||vn(o.elements.popper,r)&&(o.elements.arrow=r))}const mc={name:"arrow",enabled:!0,phase:"main",fn:uc,effect:fc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qe(t){return t.split("-")[1]}var hc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:Ke(n*r)/r||0,y:Ke(a*r)/r||0}}function Mn(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,C=i.y,m=C===void 0?0:C,b=typeof p=="function"?p({x:h,y:m}):{x:h,y:m};h=b.x,m=b.y;var y=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),N=ue,L=pe,O=window;if(c){var k=ut(n),I="clientHeight",S="clientWidth";if(k===me(n)&&(k=De(n),Ie(k).position!=="static"&&d==="absolute"&&(I="scrollHeight",S="scrollWidth")),k=k,r===pe||(r===ue||r===Ce)&&l===dt){L=be;var _=u&&k===O&&O.visualViewport?O.visualViewport.height:k[I];m-=_-a.height,m*=s?1:-1}if(r===ue||(r===pe||r===be)&&l===dt){N=Ce;var V=u&&k===O&&O.visualViewport?O.visualViewport.width:k[S];h-=V-a.width,h*=s?1:-1}}var w=Object.assign({position:d},c&&hc),$=p===!0?yc({x:h,y:m},me(n)):{x:h,y:m};if(h=$.x,m=$.y,s){var B;return Object.assign({},w,(B={},B[L]=x?"0":"",B[N]=y?"0":"",B.transform=(O.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",B))}return Object.assign({},w,(o={},o[L]=x?m+"px":"",o[N]=y?h+"px":"",o.transform="",o))}function gc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:Ee(o.placement),variation:Qe(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,Mn(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Mn(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const bc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gc,data:{}};var Lt={passive:!0};function Cc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=me(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,Lt)}),d&&s.addEventListener("resize",n.update,Lt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Lt)}),d&&s.removeEventListener("resize",n.update,Lt)}}const wc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cc,data:{}};var xc={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(t){return t.replace(/left|right|bottom|top/g,function(o){return xc[o]})}var kc={start:"end",end:"start"};function jn(t){return t.replace(/start|end/g,function(o){return kc[o]})}function To(t){var o=me(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Lo(t){return Xe(De(t)).left+To(t).scrollLeft}function _c(t,o){var n=me(t),a=De(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=In();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Lo(t),y:s}}function Sc(t){var o,n=De(t),a=To(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=Re(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Re(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Lo(t),s=-a.scrollTop;return Ie(r||n).direction==="rtl"&&(d+=Re(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Eo(t){var o=Ie(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Rn(t){return["html","body","#document"].indexOf(Le(t))>=0?t.ownerDocument.body:we(t)&&Eo(t)?t:Rn(Tt(t))}function mt(t,o){var n;o===void 0&&(o=[]);var a=Rn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=me(a),i=r?[l].concat(l.visualViewport||[],Eo(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(mt(Tt(i)))}function Bo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ac(t,o){var n=Xe(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Un(t,o,n){return o===Bn?Bo(_c(t,n)):je(o)?Ac(o,n):Bo(Sc(De(t)))}function Nc(t){var o=mt(Tt(t)),n=["absolute","fixed"].indexOf(Ie(t).position)>=0,a=n&&we(t)?ut(t):t;return je(a)?o.filter(function(r){return je(r)&&vn(r,a)&&Le(r)!=="body"}):[]}function Tc(t,o,n,a){var r=o==="clippingParents"?Nc(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=Un(t,c,a);return s.top=Re(p.top,s.top),s.right=Nt(p.right,s.right),s.bottom=Nt(p.bottom,s.bottom),s.left=Re(p.left,s.left),s},Un(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Gn(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ee(a):null,l=a?Qe(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case pe:s={x:i,y:o.y-n.height};break;case be:s={x:i,y:o.y+o.height};break;case Ce:s={x:o.x+o.width,y:d};break;case ue:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?No(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case Ye:s[c]=s[c]-(o[p]/2-n[p]/2);break;case dt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function ht(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?qs:d,c=n.rootBoundary,p=c===void 0?Bn:c,u=n.elementContext,f=u===void 0?pt:u,h=n.altBoundary,C=h===void 0?!1:h,m=n.padding,b=m===void 0?0:m,y=Dn(typeof b!="number"?b:Pn(b,ct)),x=f===pt?Ys:pt,N=t.rects.popper,L=t.elements[C?x:f],O=Tc(je(L)?L:L.contextElement||De(t.elements.popper),s,p,i),k=Xe(t.elements.reference),I=Gn({reference:k,element:N,strategy:"absolute",placement:r}),S=Bo(Object.assign({},N,I)),_=f===pt?S:k,V={top:O.top-_.top+y.top,bottom:_.bottom-O.bottom+y.bottom,left:O.left-_.left+y.left,right:_.right-O.right+y.right},w=t.modifiersData.offset;if(f===pt&&w){var $=w[r];Object.keys(V).forEach(function(B){var F=[Ce,be].indexOf(B)>=0?1:-1,M=[pe,be].indexOf(B)>=0?"y":"x";V[B]+=$[M]*F})}return V}function Lc(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?Vn:s,p=Qe(a),u=p?d?On:On.filter(function(C){return Qe(C)===p}):ct,f=u.filter(function(C){return c.indexOf(C)>=0});f.length===0&&(f=u);var h=f.reduce(function(C,m){return C[m]=ht(t,{placement:m,boundary:r,rootBoundary:l,padding:i})[Ee(m)],C},{});return Object.keys(h).sort(function(C,m){return h[C]-h[m]})}function Ec(t){if(Ee(t)===ko)return[];var o=Et(t);return[jn(t),o,jn(o)]}function Bc(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,C=h===void 0?!0:h,m=n.allowedAutoPlacements,b=o.options.placement,y=Ee(b),x=y===b,N=s||(x||!C?[Et(b)]:Ec(b)),L=[b].concat(N).reduce(function(q,Y){return q.concat(Ee(Y)===ko?Lc(o,{placement:Y,boundary:p,rootBoundary:u,padding:c,flipVariations:C,allowedAutoPlacements:m}):Y)},[]),O=o.rects.reference,k=o.rects.popper,I=new Map,S=!0,_=L[0],V=0;V<L.length;V++){var w=L[V],$=Ee(w),B=Qe(w)===Ye,F=[pe,be].indexOf($)>=0,M=F?"width":"height",D=ht(o,{placement:w,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),R=F?B?Ce:ue:B?be:pe;O[M]>k[M]&&(R=Et(R));var z=Et(R),g=[];if(l&&g.push(D[$]<=0),d&&g.push(D[R]<=0,D[z]<=0),g.every(function(q){return q})){_=w,S=!1;break}I.set(w,g)}if(S)for(var A=C?3:1,E=function(Y){var ee=L.find(function(te){var ae=I.get(te);if(ae)return ae.slice(0,Y).every(function(ie){return ie})});if(ee)return _=ee,"break"},U=A;U>0;U--){var G=E(U);if(G==="break")break}o.placement!==_&&(o.modifiersData[a]._skip=!0,o.placement=_,o.reset=!0)}}const Oc={name:"flip",enabled:!0,phase:"main",fn:Bc,requiresIfExists:["offset"],data:{_skip:!1}};function zn(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function Hn(t){return[pe,Ce,be,ue].some(function(o){return t[o]>=0})}function Vc(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=ht(o,{elementContext:"reference"}),d=ht(o,{altBoundary:!0}),s=zn(i,a),c=zn(d,r,l),p=Hn(s),u=Hn(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const Ic={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Vc};function vc(t,o,n){var a=Ee(t),r=[ue,pe].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ue,Ce].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function $c(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=Vn.reduce(function(p,u){return p[u]=vc(u,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const Fc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$c};function Dc(t){var o=t.state,n=t.name;o.modifiersData[n]=Gn({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const Pc={name:"popperOffsets",enabled:!0,phase:"read",fn:Dc,data:{}};function Mc(t){return t==="x"?"y":"x"}function jc(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,h=f===void 0?!0:f,C=n.tetherOffset,m=C===void 0?0:C,b=ht(o,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),y=Ee(o.placement),x=Qe(o.placement),N=!x,L=No(y),O=Mc(L),k=o.modifiersData.popperOffsets,I=o.rects.reference,S=o.rects.popper,_=typeof m=="function"?m(Object.assign({},o.rects,{placement:o.placement})):m,V=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),w=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,$={x:0,y:0};if(k){if(l){var B,F=L==="y"?pe:ue,M=L==="y"?be:Ce,D=L==="y"?"height":"width",R=k[L],z=R+b[F],g=R-b[M],A=h?-S[D]/2:0,E=x===Ye?I[D]:S[D],U=x===Ye?-S[D]:-I[D],G=o.elements.arrow,q=h&&G?Ao(G):{width:0,height:0},Y=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Fn(),ee=Y[F],te=Y[M],ae=ft(0,I[D],q[D]),ie=N?I[D]/2-A-ae-ee-V.mainAxis:E-ae-ee-V.mainAxis,le=N?-I[D]/2+A+ae+te+V.mainAxis:U+ae+te+V.mainAxis,Se=o.elements.arrow&&ut(o.elements.arrow),Ge=Se?L==="y"?Se.clientTop||0:Se.clientLeft||0:0,ze=(B=w==null?void 0:w[L])!=null?B:0,tt=R+ie-ze-Ge,ot=R+le-ze,$e=ft(h?Nt(z,tt):z,R,h?Re(g,ot):g);k[L]=$e,$[L]=$e-R}if(d){var He,H=L==="x"?pe:ue,T=L==="x"?be:Ce,v=k[O],P=O==="y"?"height":"width",W=v+b[H],K=v-b[T],X=[pe,ue].indexOf(y)!==-1,J=(He=w==null?void 0:w[O])!=null?He:0,se=X?W:v-I[P]-S[P]-J+V.altAxis,he=X?v+I[P]+S[P]-J-V.altAxis:K,Q=h&&X?dc(se,v,he):ft(h?se:W,v,h?he:K);k[O]=Q,$[O]=Q-v}o.modifiersData[a]=$}}const Rc={name:"preventOverflow",enabled:!0,phase:"main",fn:jc,requiresIfExists:["offset"]};function Uc(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Gc(t){return t===me(t)||!we(t)?To(t):Uc(t)}function zc(t){var o=t.getBoundingClientRect(),n=Ke(o.width)/t.offsetWidth||1,a=Ke(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Hc(t,o,n){n===void 0&&(n=!1);var a=we(o),r=we(o)&&zc(o),l=De(o),i=Xe(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((Le(o)!=="body"||Eo(l))&&(d=Gc(o)),we(o)?(s=Xe(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=Lo(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Wc(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function qc(t){var o=Wc(t);return ac.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Yc(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Kc(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var Wn={placement:"bottom",modifiers:[],strategy:"absolute"};function qn(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Xc(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?Wn:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wn,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(y){var x=typeof y=="function"?y(p.options):y;m(),p.options=Object.assign({},l,p.options,x),p.scrollParents={reference:je(d)?mt(d):d.contextElement?mt(d.contextElement):[],popper:mt(s)};var N=qc(Kc([].concat(a,p.options.modifiers)));return p.orderedModifiers=N.filter(function(L){return L.enabled}),C(),h.update()},forceUpdate:function(){if(!f){var y=p.elements,x=y.reference,N=y.popper;if(qn(x,N)){p.rects={reference:Hc(x,ut(N),p.options.strategy==="fixed"),popper:Ao(N)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(V){return p.modifiersData[V.name]=Object.assign({},V.data)});for(var L=0;L<p.orderedModifiers.length;L++){if(p.reset===!0){p.reset=!1,L=-1;continue}var O=p.orderedModifiers[L],k=O.fn,I=O.options,S=I===void 0?{}:I,_=O.name;typeof k=="function"&&(p=k({state:p,options:S,name:_,instance:h})||p)}}}},update:Yc(function(){return new Promise(function(b){h.forceUpdate(),b(p)})}),destroy:function(){m(),f=!0}};if(!qn(d,s))return h;h.setOptions(c).then(function(b){!f&&c.onFirstUpdate&&c.onFirstUpdate(b)});function C(){p.orderedModifiers.forEach(function(b){var y=b.name,x=b.options,N=x===void 0?{}:x,L=b.effect;if(typeof L=="function"){var O=L({state:p,name:y,instance:h,options:N}),k=function(){};u.push(O||k)}})}function m(){u.forEach(function(b){return b()}),u=[]}return h}}var Qc=[wc,Pc,bc,ic,Fc,Oc,Rc,mc,Ic],Jc=Xc({defaultModifiers:Qc});function Oo(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Yn(t,o){if(t){if(typeof t=="string")return Oo(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oo(t,o):void 0}}function Zc(t){return function(o){if(Array.isArray(o))return Oo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Yn(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Je(t){return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Je(t)}function Kn(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function Xn(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){Kn(l,a,r,i,d,"next",s)}function d(s){Kn(l,a,r,i,d,"throw",s)}i(void 0)})}}var Qn={exports:{}},Jn={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(Jn),function(t){var o=Jn.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(g,A,E){g[A]=E.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(g,A,E){return Object.defineProperty(g,A,{value:E,enumerable:!0,configurable:!0,writable:!0}),g[A]}try{f({},"")}catch{f=function(A,E,U){return A[E]=U}}function h(g,A,E,U){var G=A&&A.prototype instanceof L?A:L,q=Object.create(G.prototype),Y=new R(U||[]);return d(q,"_invoke",{value:B(g,E,Y)}),q}function C(g,A,E){try{return{type:"normal",arg:g.call(A,E)}}catch(U){return{type:"throw",arg:U}}}r.wrap=h;var m="suspendedStart",b="suspendedYield",y="executing",x="completed",N={};function L(){}function O(){}function k(){}var I={};f(I,c,function(){return this});var S=Object.getPrototypeOf,_=S&&S(S(z([])));_&&_!==l&&i.call(_,c)&&(I=_);var V=k.prototype=L.prototype=Object.create(I);function w(g){["next","throw","return"].forEach(function(A){f(g,A,function(E){return this._invoke(A,E)})})}function $(g,A){function E(G,q,Y,ee){var te=C(g[G],g,q);if(te.type!=="throw"){var ae=te.arg,ie=ae.value;return ie&&o(ie)=="object"&&i.call(ie,"__await")?A.resolve(ie.__await).then(function(le){E("next",le,Y,ee)},function(le){E("throw",le,Y,ee)}):A.resolve(ie).then(function(le){ae.value=le,Y(ae)},function(le){return E("throw",le,Y,ee)})}ee(te.arg)}var U;d(this,"_invoke",{value:function(G,q){function Y(){return new A(function(ee,te){E(G,q,ee,te)})}return U=U?U.then(Y,Y):Y()}})}function B(g,A,E){var U=m;return function(G,q){if(U===y)throw new Error("Generator is already running");if(U===x){if(G==="throw")throw q;return{value:a,done:!0}}for(E.method=G,E.arg=q;;){var Y=E.delegate;if(Y){var ee=F(Y,E);if(ee){if(ee===N)continue;return ee}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(U===m)throw U=x,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);U=y;var te=C(g,A,E);if(te.type==="normal"){if(U=E.done?x:b,te.arg===N)continue;return{value:te.arg,done:E.done}}te.type==="throw"&&(U=x,E.method="throw",E.arg=te.arg)}}}function F(g,A){var E=A.method,U=g.iterator[E];if(U===a)return A.delegate=null,E==="throw"&&g.iterator.return&&(A.method="return",A.arg=a,F(g,A),A.method==="throw")||E!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+E+"' method")),N;var G=C(U,g.iterator,A.arg);if(G.type==="throw")return A.method="throw",A.arg=G.arg,A.delegate=null,N;var q=G.arg;return q?q.done?(A[g.resultName]=q.value,A.next=g.nextLoc,A.method!=="return"&&(A.method="next",A.arg=a),A.delegate=null,N):q:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,N)}function M(g){var A={tryLoc:g[0]};1 in g&&(A.catchLoc=g[1]),2 in g&&(A.finallyLoc=g[2],A.afterLoc=g[3]),this.tryEntries.push(A)}function D(g){var A=g.completion||{};A.type="normal",delete A.arg,g.completion=A}function R(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(M,this),this.reset(!0)}function z(g){if(g||g===""){var A=g[c];if(A)return A.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var E=-1,U=function G(){for(;++E<g.length;)if(i.call(g,E))return G.value=g[E],G.done=!1,G;return G.value=a,G.done=!0,G};return U.next=U}}throw new TypeError(o(g)+" is not iterable")}return O.prototype=k,d(V,"constructor",{value:k,configurable:!0}),d(k,"constructor",{value:O,configurable:!0}),O.displayName=f(k,u,"GeneratorFunction"),r.isGeneratorFunction=function(g){var A=typeof g=="function"&&g.constructor;return!!A&&(A===O||(A.displayName||A.name)==="GeneratorFunction")},r.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,k):(g.__proto__=k,f(g,u,"GeneratorFunction")),g.prototype=Object.create(V),g},r.awrap=function(g){return{__await:g}},w($.prototype),f($.prototype,p,function(){return this}),r.AsyncIterator=$,r.async=function(g,A,E,U,G){G===void 0&&(G=Promise);var q=new $(h(g,A,E,U),G);return r.isGeneratorFunction(A)?q:q.next().then(function(Y){return Y.done?Y.value:q.next()})},w(V),f(V,u,"Generator"),f(V,c,function(){return this}),f(V,"toString",function(){return"[object Generator]"}),r.keys=function(g){var A=Object(g),E=[];for(var U in A)E.push(U);return E.reverse(),function G(){for(;E.length;){var q=E.pop();if(q in A)return G.value=q,G.done=!1,G}return G.done=!0,G}},r.values=z,R.prototype={constructor:R,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(D),!g)for(var A in this)A.charAt(0)==="t"&&i.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=a)},stop:function(){this.done=!0;var g=this.tryEntries[0].completion;if(g.type==="throw")throw g.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var A=this;function E(te,ae){return q.type="throw",q.arg=g,A.next=te,ae&&(A.method="next",A.arg=a),!!ae}for(var U=this.tryEntries.length-1;U>=0;--U){var G=this.tryEntries[U],q=G.completion;if(G.tryLoc==="root")return E("end");if(G.tryLoc<=this.prev){var Y=i.call(G,"catchLoc"),ee=i.call(G,"finallyLoc");if(Y&&ee){if(this.prev<G.catchLoc)return E(G.catchLoc,!0);if(this.prev<G.finallyLoc)return E(G.finallyLoc)}else if(Y){if(this.prev<G.catchLoc)return E(G.catchLoc,!0)}else{if(!ee)throw new Error("try statement without catch or finally");if(this.prev<G.finallyLoc)return E(G.finallyLoc)}}}},abrupt:function(g,A){for(var E=this.tryEntries.length-1;E>=0;--E){var U=this.tryEntries[E];if(U.tryLoc<=this.prev&&i.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var G=U;break}}G&&(g==="break"||g==="continue")&&G.tryLoc<=A&&A<=G.finallyLoc&&(G=null);var q=G?G.completion:{};return q.type=g,q.arg=A,G?(this.method="next",this.next=G.finallyLoc,N):this.complete(q)},complete:function(g,A){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&A&&(this.next=A),N},finish:function(g){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.finallyLoc===g)return this.complete(E.completion,E.afterLoc),D(E),N}},catch:function(g){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.tryLoc===g){var U=E.completion;if(U.type==="throw"){var G=U.arg;D(E)}return G}}throw new Error("illegal catch attempt")},delegateYield:function(g,A,E){return this.delegate={iterator:z(g),resultName:A,nextLoc:E},this.method==="next"&&(this.arg=a),N}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Qn);var Bt=Qn.exports(),Ot=Bt;try{regeneratorRuntime=Bt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Bt:Function("r","regeneratorRuntime = r")(Bt)}function ed(t){var o=function(n,a){if(Je(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(Je(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return Je(o)==="symbol"?o:String(o)}function Vo(t,o,n){return(o=ed(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var C=f/t.size*100,m=100-h/t.size*100;n("change",C,m)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Zn=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},td=Zn(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),od=Zn(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function ve(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}ve(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Vt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[td,od,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Vt.__scopeId="data-v-24517fec",Vt.__file="src/picker/Saturation.vue";var It=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),nd={ref:"canvas"};ve(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),It.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",nd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},It.__scopeId="data-v-78b9f4f0",It.__file="src/picker/Hue.vue";var vt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ad={ref:"canvas"};ve(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),vt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",ad,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},vt.__scopeId="data-v-24dc9656",vt.__file="src/picker/Alpha.vue";var $t=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),rd={class:"input"},ld={class:"label"},id=[".value"];function yt(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,o)||Yn(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
63
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ea(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function xe(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?ea(Object(n),!0).forEach(function(a){Vo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ea(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}ve(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),$t.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",rd,[e.createElementVNode("span",ld,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,id)])},$t.__scopeId="data-v-d52a4d02",$t.__file="src/picker/InputValue.vue";var ta=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},oa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ft=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(oa[o]||o).concat(oa[n]||n)},na=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Ft(o)).concat(Ft(n)).concat(Ft(a))},Ze=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},gt=function(t,o,n){t=6*Ze(t,360),o=Ze(o,100),n=Ze(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},aa=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=ta(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=gt(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(na(gt(a,r,l))).concat(Ft(255*i))}else switch(o){case"hsl":var f=ta(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=gt(a,r,l),C=h.r,m=h.g,b=h.b;return"rgb(".concat(C,", ").concat(m,", ").concat(b,")");default:return na(gt(a,r,l))}},Dt=function(t){var o=t.r,n=t.g,a=t.b;o=Ze(o,255),n=Ze(n,255),a=Ze(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ra=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},la=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},Io=function(t,o,n){if(typeof t=="string"&&t!==""){var a=vo(t,$o(t),n),r=da(a);return aa(r,o,n)}return""},ia=function(t){var o=yt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},sa=function(t){var o=yt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},ca=function(t){var o=yt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},vo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=ia(t),a=n.r,r=n.g,l=n.b,i=n.a;return xe(xe({},Dt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=ca(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=sa(t),c=s.h,p=s.s,u=s.l,f=s.a;return xe(xe({},ra({h:c,s:p,l:u})),{},{a:+f});default:var h=la(t),C=h.r,m=h.g,b=h.b,y=h.a;return xe(xe({},Dt({r:C,g:m,b})),{},{a:y/255})}else switch(o){case"rgb":return xe(xe({},Dt(ia(t))),{},{a:1});case"hsv":var x=ca(t);return{h:x.h,s:x.s,v:x.v,a:1};case"hsl":return xe(xe({},ra(sa(t))),{},{a:1});default:return xe(xe({},Dt(la(t))),{},{a:1})}},$o=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},da=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},bt=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),sd=["draggable"];ve(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),bt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,sd)},bt.__scopeId="data-v-02da71fd",bt.__file="src/color-item/ColorItem.vue";var Pt=e.defineComponent({name:"Colors",components:{ColorItem:bt},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return Io(a,"hex",!0)})})}}}),cd={class:"colors"};function pa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Be(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?pa(Object(n),!0).forEach(function(a){Vo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}ve(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Pt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Pt.__scopeId="data-v-0f8b52a8",Pt.__file="src/picker/Colors.vue";var Mt=e.defineComponent({name:"Picker",components:{Colors:Pt,Saturation:Vt,Hue:It,Alpha:vt,InputValue:$t},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return Be(Be({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var x,N=(x=t.value)===null||x===void 0?void 0:x.trim();if(N!=null&&N!==""){var L=$o(N);return da(vo(N,L,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(x,N){var L="";x!=null?(L=aa(Be({},x),t.format,t.showAlpha),i.value=Be({},x)):i.value=null,d.value=L;var O=s();JSON.stringify(x)!==JSON.stringify(O)&&JSON.stringify(x)!==JSON.stringify(N)&&n("change",L)},{immediate:!0});var c=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.h)||0}),p=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.s)||0}),u=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.v)||0}),f=e.computed(function(){var x,N;return((x=e.unref(l))===null||x===void 0?void 0:x.a)!=null?(N=e.unref(l))===null||N===void 0?void 0:N.a:1}),h=e.computed(function(){return gt(e.unref(c),e.unref(p),e.unref(u))}),C=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),m=e.computed(function(){var x=t.format;if(t.showAlpha)switch(x){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(x){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),b=e.ref(-1),y=function(x,N,L){if(x.length!==0){var O=vo(x,N,L),k=O.h,I=O.s,S=O.v;if(!(isNaN(k)||isNaN(I)||isNaN(S))){var _=1,V=O.a;isNaN(V)||(_=V),l.value={h:k,s:I,v:S,a:_}}}};return{h:c,s:p,v:u,a:f,rgbStr:C,onSelectSaturation:function(x,N){b.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:x,v:N,a:e.unref(f)}:l.value=Be(Be({},e.unref(l)),{},{s:x,v:N})},onSelectHue:function(x){b.value=-1,e.unref(l)==null&&(l.value={h:x,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=Be(Be({},e.unref(l)),{},{h:x})},onSelectAlpha:function(x){b.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:x}:l.value=Be(Be({},e.unref(l)),{},{a:x})},label:m,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(x){b.value=-1,d.value=x},handleChange:function(){var x,N=(x=e.unref(d))===null||x===void 0?void 0:x.trim();if(N!==""){var L=t.showAlpha,O=t.format,k=function(I,S,_){if(_)switch(S){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(I);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(I);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(I);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(I)}else switch(S){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(I);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(I);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(I);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(I)}}(N,O,L);k?y(N,O,L):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:b,onSelectColor:function(x,N){if(b.value=N,(x=x.trim())==="")l.value=null;else{var L=$o(x);L?y(x,L,!0):l.value=null}}}}}),dd={class:"picker-inner"},pd={class:"picker-header"};ve(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),Mt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",dd,[e.createElementVNode("div",pd,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Mt.__scopeId="data-v-6ceadec6",Mt.__file="src/picker/Picker.vue";var jt=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),ud=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function ua(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Fo(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?ua(Object(n),!0).forEach(function(a){Vo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}ve(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),jt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(ud),4)},jt.__scopeId="data-v-ceb1719c",jt.__file="src/add-color-item/AddColorItem.vue";var Ue=null,et=e.defineComponent({name:"ColorPicker",components:{ColorItem:bt,Picker:Mt,AddColorItem:jt},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(F){return Io(F,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var F=t.value||"",M=Array.isArray(F)?F:[F];a.value=M.map(function(D){return Io(D,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,C,m=e.ref(null),b=e.ref(null),y=(s=m,c=b,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Ue.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(F){var M=F.state,D=M.styles,R=M.placement,z=D.popper;u.value=Fo(Fo(Fo({},z),p),{},{transformOrigin:R==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(F,M){var D,R=yt(F,2),z=R[0],g=R[1],A=yt(M,2),E=A[0],U=A[1];if(z&&g&&(E!==z||U!==E)){(D=Ue)===null||D===void 0||D.destroy();var G=z.$el||z,q=g.$el||g;e.nextTick(function(){Ue=Jc(G,q,f)})}}),e.onBeforeUnmount(function(){var F;Ue&&((F=Ue)===null||F===void 0||F.destroy(),Ue=null)}),{instance:Ue,style:u}),x=y.style,N=function(){e.unref(m)==null&&(m.value=e.unref(B)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},L=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},O=e.ref(),k=function(){var F=Xn(Ot.mark(function M(D){var R,z,g,A;return Ot.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(z=D.target,(g=(R=z.dataset)===null||R===void 0?void 0:R.index)!=null&&g!==""){E.next=4;break}return E.abrupt("return");case 4:if(A=+g,e.unref(l)!==A){E.next=7;break}return E.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==A?(L(),h&&clearTimeout(h),h=setTimeout(function(){N(),clearTimeout(h)},100)):N(),l.value=A,m.value=z;case 10:case"end":return E.stop()}},M)}));return function(M){return F.apply(this,arguments)}}(),I=function(){var F=Xn(Ot.mark(function M(D){var R,z,g,A,E;return Ot.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(A=D.target,!(!((R=e.unref(O))!==null&&R!==void 0&&R.isEqualNode(A))&&(!((z=e.unref(O))===null||z===void 0)&&z.contains(A)))){U.next=4;break}return U.abrupt("return");case 4:if(E=(g=e.unref(b))===null||g===void 0?void 0:g.$el,!(E!=null&&E.contains(A))){U.next=8;break}return U.abrupt("return");case 8:C&&clearTimeout(C),C=setTimeout(function(){e.unref(d)&&L()},0);case 10:case"end":return U.stop()}},M)}));return function(M){return F.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(N(),clearTimeout(C))});var S,_=e.ref(t.max>e.unref(a).length),V=e.computed(function(){return typeof t.popupContainer=="string"||Je(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),w=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),$=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(b)]},function(){e.nextTick(function(){var F,M;(F=e.unref(O))===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref($)),(M=e.unref(b))===null||M===void 0||(M=M.$el)===null||M===void 0||M.setAttribute("pick-colors-theme",e.unref($))})},{immediate:!0}),e.provide("theme",{theme:$});var B=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",I,!1),t.showPicker&&N()}),e.onUnmounted(function(){document.removeEventListener("mouseup",I,!1),h&&(clearTimeout(h),h=null),C&&(clearTimeout(C),C=null)}),{valueList:a,colorItemSelected:function(F){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===F},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:_,onPickerChange:function(F){var M=e.unref(l),D=e.unref(a).slice(),R=e.unref(a).length;if(M!=null){M>=0?D[M]=F:(l.value=R,D.push(F));var z="";z=Array.isArray(t.value)||t.addColor?D:F,t.value===void 0?a.value=Array.isArray(z)?z:[z]:(n("update:value",z),n("change",z,F,M)),t.addColor&&R>=t.max&&(_.value=!1,n("overflowMax"))}},colorPicker:O,onColorClick:k,pickerRef:b,onColorItemDragStart:function(F){F.dataTransfer.effectAllowed="move";var M=F.target;S=+M.dataset.index},onColorItemDragOver:function(F){},onColorItemDrop:function(F){var M=+F.target.dataset.index,D=Zc(e.unref(a)),R=D[S];D.splice(S,1);var z=D.slice(0,M),g=D.splice(M),A=z.concat([R]).concat(g);n("update:value",A),n("change",A,A[S],S)},colorItemsRef:B,pickerStyle:x,values:r,teleportDisabled:w,toPopupContainer:V}}});ve(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),et.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},et.__scopeId="data-v-3c43ade8",et.__file="src/ColorPicker.vue";const fd=e.defineComponent({name:"ColorPick",components:{PickColors:et,AInput:j.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),ru="",md={class:"color-pick"};function hd(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",md,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const yd=Z(fd,[["render",hd],["__scopeId","data-v-e2113f43"]]),gd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:et},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{j.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),lu="",bd={class:"color-group-pick"};function Cd(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",bd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const wd=Z(gd,[["render",Cd],["__scopeId","data-v-b2be8322"]]),xd=e.defineComponent({name:"FormGroup",components:{Draggable:at,AppstoreAddOutlined:fn,MinusCircleOutlined:nl,PickColors:et,InputNumber:En,PlusCircleOutlined:il},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),C={};h.forEach(m=>{C[m]=""}),c.push(C)}else typeof f=="string"&&c.push(f);n.value=c}else j.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const C=c==null?void 0:c.target,m=(C==null?void 0:C.value)!=null?C==null?void 0:C.value:c;u?f[p][u]=m:f[p]=m,n.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){j.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),iu="",kd={class:"form-group"},_d={class:"form-row"},Sd={key:0,class:"label"},Ad={key:1,class:"label"},Nd={class:"icon-group"};function Td(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",kd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",_d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Sd,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Nd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Ld=Z(xd,[["render",Td],["__scopeId","data-v-f0c0ab4d"]]),Ed=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:j.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Bd(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Od=Z(Ed,[["render",Bd]]),Vd=e.defineComponent({name:"PropsToForm",components:{Input:$s,InputNumber:En,RadioGroup:js,Select:Gs,Switch:Ws,ColorPick:yd,ColorGroupPick:wd,FormGroup:Ld,Textarea:Od},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(wt),n=e.inject(Ut),a=e.inject(Gt),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:C="change",events:m}=p;c[u]={...p,valueProp:h,value:f,events:{[C]:(b,y=!0)=>{l(y?{[u]:b}:{})},...m}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:oe.reduce(s,(c,p,u)=>{const f=Vs[u];if(Array.isArray(f)){const h=f.find(C=>{const{onlyType:m,excludeType:b}=C;return m==null&&b==null?!0:m?Te(e.unref(r),m):b?!Te(e.unref(r),b):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Te}}}),su="",Id={class:"props-to-form"},vd={class:"label"},$d={class:"component-wrapper"};function Fd(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Id,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",vd,e.toDisplayString(i.label),1),e.createElementVNode("div",$d,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Dd=Z(Vd,[["render",Fd],["__scopeId","data-v-c6fb2484"]]);function Pd(){return new Worker("/assets/editor.worker-02df2e61.js")}function Md(){return new Worker("/assets/json.worker-867823a6.js")}function jd(){return new Worker("/assets/ts.worker-7254b425.js")}const Rd=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new Md:i==="typescript"||i==="javascript"?new jd:new Pd}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=xa.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(oe.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),cu="",Ud={class:"editor",ref:"dom"};function Gd(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Ud,null,512)}const fa=Z(Rd,[["render",Gd],["__scopeId","data-v-71e88372"]]),zd=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],Hd=e.defineComponent({name:"TableColumnConfig",components:{ATable:j.Table,AModal:j.Modal,ACheckbox:j.Checkbox,AInput:j.Input,AInputNumber:j.InputNumber,ASelect:j.Select,ASelectOption:j.SelectOption,Editor:fa},setup(){const t=e.inject(Pe),o=e.computed(()=>{var m;return!!((m=e.unref(t))!=null&&m.isGroupTable)}),n=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.graphicConfig)||{}}),a=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var b,y,x;let m=[];if(r.value=[],!o.value)m=((b=e.unref(n))==null?void 0:b.queryColumnList)||[];else{const N=((y=e.unref(n))==null?void 0:y.rowHeaderList)||[],L=((x=e.unref(n))==null?void 0:x.indicators)||[];m=[...N,...L]}m.forEach(N=>{var O;let L=(O=e.unref(a))==null?void 0:O.find(k=>k.prop===N.name);L||(L={label:N.label,prop:N.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(L)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:zd,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(m,b,y)=>{m&&b&&(l=m,i=b,d.value=m[b]||"",c.value=!0,s.value=y)},onEditorChange:m=>{try{d.value=m}catch(b){console.error(b)}},changeRenderBool:(m,b)=>{m.style=b.target.checked,m.style?m.renderBool===void 0&&(m.renderBool=!1):delete m.renderBool}}}}),du="",Wd={class:"table-column-config"};function qd(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Wd,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:C,text:m,record:b})=>[C.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:y=>t.changeRenderBool(b,y),checked:b.style},null,8,["onChange","checked"])):C.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:b.width,"onUpdate:value":y=>b.width=y,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):C.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[b.style?(e.openBlock(),e.createBlock(d,{key:1,value:b.renderText,"onUpdate:value":y=>b.renderText=y,readOnly:!0,onClick:y=>t.renderSave(b,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):C.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[b.style?(e.openBlock(),e.createBlock(d,{key:1,value:b.headerTemplate,"onUpdate:value":y=>b.headerTemplate=y,readOnly:!0,onClick:y=>t.renderSave(b,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):C.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:b.headerAlign,"onUpdate:value":y=>b.headerAlign=y},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:b.align,"onUpdate:value":y=>b.align=y},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:b.fixed,"onUpdate:value":y=>b.fixed=y},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:b.dataFormat,"onUpdate:value":y=>b.dataFormat=y,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[b.dataFormat&&b.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:b.retentiondigit,"onUpdate:value":y=>b.retentiondigit=y,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=C=>t.editorVisible=C),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const Yd=Z(Hd,[["render",qd],["__scopeId","data-v-afebddc0"]]),Kd=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Dd,TableColumnConfig:Yd,Editor:fa,AFormItem:j.FormItem,ASelect:j.Select,ASelectOption:j.SelectOption,ACollapse:j.Collapse,ACollapsePanel:j.CollapsePanel,ASwitch:j.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(wt),r=e.inject(Ro),l=e.inject(Ut),i=e.inject(Gt),d=e.inject(jo),s=O=>{l({...Ho[O]},!1),d()},c=e.computed(()=>{var O;return(O=e.unref(a))==null?void 0:O.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Os.map(O=>{const{props:k,title:I,enableProps:S,onlyType:_,excludeType:V}=O,w=[];k.forEach(F=>{typeof F=="string"&&(p.includes(F)?t.isGroupTable&&w.push(F):w.push(F))});let $,B;return t.componentType&&(_!=null&&_.includes(t.componentType))?($=typeof S=="string"&&r.value?r.value[S]:void 0,B=oe.pick(e.unref(r),w)):($=typeof S=="string"&&a.value?a.value[S]:void 0,B=oe.pick(e.unref(a),w)),{title:I,enableProps:$,enablePropsName:S,onlyType:_,excludeType:V,props:B}}).filter(({props:O})=>Object.keys(O).length>0)),f=(O,k)=>{const{onlyType:I,excludeType:S}=O;return I==null&&S==null?!0:I?Te(k,I):S?!Te(k,S):!1},h=(O,k)=>(k==null||k.stopPropagation(),O),C=(O,k)=>{k!=null&&l({[k]:O})},m=e.computed(()=>JSON.stringify(e.unref(a),null,2)),b=O=>{try{const k=JSON.parse(O||"{}");l(k,!1)}catch(k){console.error(k)}},y=e.ref(""),x=O=>{try{y.value=O}catch(k){console.error(k)}},N=(O,k)=>{try{i({[k]:O})}catch(I){console.error(I)}},L=e.computed(()=>{var O;return["customGraph"].includes((O=e.unref(a))==null?void 0:O.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:m,updateComponentOptions:b,tableOptions:r,optionCode:y,onEditorChange:x,tableEditorChange:N,onSwitchClick:h,onSwitchChange:C,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:L}}}),pu="",uu="",Xd={class:"style-group"};function Qd(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),C=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Xd,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=m=>t.type=m),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=m=>t.activePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[t.isRenderForm(m,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.title?(e.openBlock(),e.createBlock(u,{header:m.title,key:m.title},{extra:e.withCtx(()=>[typeof m.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:m.enableProps,onChange:b=>t.onSwitchChange(b,m.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:m.props,disabled:typeof m.enableProps=="boolean"?!m.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=m=>t.tablePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>{var b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[m.title&&((b=m.onlyType)!=null&&b.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:m.title,key:m.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:m.props,disabled:typeof m.enableProps=="boolean"?!m.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(C)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=m=>t.tableEditorChange(m,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=m=>t.tableEditorChange(m,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Jd=Z(Kd,[["render",Qd],["__scopeId","data-v-14fce418"]]),Zd=e.defineComponent({name:"Card",components:{CloseOutlined:io},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(Me),a=e.inject(Ht),r=e.inject(zo),l=e.computed(()=>{var w;return(w=e.unref(n))==null?void 0:w.filter($=>$.keyName!=="")}),i=e.computed(()=>{var B,F;const w=[],$=(B=e.unref(l))==null?void 0:B.find(M=>{var D;return M.id===((D=t.control)==null?void 0:D.id)});if($){const M=$.type,D=oe.pick($,["value","startTime","endTime"]);(F=Object.keys(D))!=null&&F.length||(D.value="");for(const R in D)if(Object.prototype.hasOwnProperty.call(D,R)){const z=e.unref(r)[R];if(Array.isArray(z)){const g=z.find(A=>Te(M,A.onlyType));g&&w.push({label:g.label,value:R})}else w.push({label:z.label,value:R})}}return w}),d=()=>{o("delete",t.index),s(t.control.id)};function s(w){const $=e.unref(l).find(B=>B.id===w);if($){const{type:B,id:F,events:M=[]}=$,D=Co(B),R=M.findIndex(z=>{var g;return z.on===D&&z.target===((g=e.unref(m))==null?void 0:g.id)&&z.emit==="refreshData"});R!==-1&&(M.splice(R,1),a({id:F,events:M}))}}const c=w=>{const $={...t.control};if($.id=w,w){const B=e.unref(l).find(F=>F.id===w);B&&($.keyName=B.keyName,x(B,w))}delete $.prop,o("update",$,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=w=>{o("update",{...t.control,prop:w},t.index)},h=w=>{o("update",{...t.control,rule:w},t.index)},C=w=>{const $={...t.control};w==null?delete $.mode:$.mode=w,delete $.conditionLabel,delete $.conditionName,delete $.conditionKey,delete $.conditionValueType,o("update",$,t.index)},m=e.inject(Pe),b=e.inject(de),y=e.computed(()=>{const{classificationList:w=[],seriesList:$=[],leftAxisList:B=[],rightAxisList:F=[],indicators:M=[],rowHeaderList:D=[],queryColumnList:R=[]}=e.unref(b),z=oe.cloneDeep([...w,...$,...B,...F,...M,...D,...R]);if(z!=null&&z.length)for(const G of z)G.id=G.name;const g=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...z],A=new Map,E=g.length;for(let G=0;G<E;G++){const q=g[G],{id:Y}=q||{};A.set(Y,q)}const U=[...A];return console.log("optionsMapArr.map(([_id, option]) => option)",U.map(([G,q])=>q)),U.map(([G,q])=>q)});function x(w,$){var R;const{type:B,id:F,events:M=[]}=w,D=Co(B);if(e.unref(p)&&$!==e.unref(p)){const{controlList:z=[]}=e.unref(b);z.find(g=>g.id===e.unref(p))||s(e.unref(p))}M.find(z=>{var g;return z.on===D&&z.target===((g=e.unref(m))==null?void 0:g.id)&&z.emit==="refreshData"})||a({id:F,events:[...M,{on:D,target:(R=e.unref(m))==null?void 0:R.id,emit:"refreshData"}].reverse()})}const N=(w,$)=>{if(w){const{label:B,name:F,id:M,genericType:D}=$||{};o("update",{...t.control,conditionKey:M,conditionLabel:B,conditionName:F,conditionValueType:D},t.index)}else{const B={...t.control};delete B.conditionLabel,delete B.conditionName,delete B.conditionKey,delete B.conditionValueType,o("update",B,t.index)}},L=(w,$)=>{var B;return(B=$==null?void 0:$.keyName)==null?void 0:B.toLowerCase().includes(w==null?void 0:w.toLowerCase())},O=(w,$)=>{var B;return(B=$==null?void 0:$.label)==null?void 0:B.toLowerCase().includes(w==null?void 0:w.toLowerCase())},k=e.computed(()=>{const w=e.unref(y).find(B=>B.id===t.control.conditionKey);let $="";return w&&($=(w==null?void 0:w.genericType)||""),$==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:$==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:$==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),I=e.computed(()=>{let w=!1;const{id:$=""}=t.control;if($){const B=e.unref(l).find(F=>F.id===$);(B==null?void 0:B.type)==="ecanRangePicker"&&(w=!0)}return w}),S=e.computed(()=>{let w=!1;const{id:$=""}=t.control;if($){const B=e.unref(l).find(F=>F.id===$);["ecanDatePicker","ecanRangePicker"].includes(B==null?void 0:B.type)&&(w=!0)}return w});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:C,onRuleChange:h,conditionKeyOptions:y,onConditionKeyChange:N,idFilterOption:L,filterOption:O,onFormatChange:w=>{o("update",{...t.control,format:w},t.index)},ruleOption:k,isShowProp:I,isShowFormat:S,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),fu="",mu="",ep={class:"control-card"};function tp(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ep,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:0,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const op=Z(Zd,[["render",tp],["__scopeId","data-v-6d286cb1"]]),np=e.defineComponent({name:"ControlGroup",components:{ControlCard:op,AButton:j.Button},setup(t,{expose:o}){const n=e.inject(Me),a=e.inject(de),r=e.inject(Oe),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&!bo(h,"rule")&&(h.rule="EQUAL");return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:Tn({...e.unref(a),...u},e.unref(n))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var C;const h=(C=e.unref(l))==null?void 0:C.slice();h[f]=u,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),hu="",ap={class:"control-group"},rp={class:"control-group-header"},lp={class:"control-group-content"};function ip(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",ap,[e.createElementVNode("div",rp,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",lp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","onDelete","onUpdate"]))),128))])])}const sp=Z(np,[["render",ip],["__scopeId","data-v-1585a93c"]]),cp=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:C,builtInCalcWay:m,formula:b,conditions:y,aggregate:x}=i;let N;return y&&(N=r(y)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:x,builtInFormula:h,builtInValueSource:C,builtInCalcWay:m,formula:b,conditions:N}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:C=[],seriesList:m=[],leftAxisList:b=[],rightAxisList:y=[],queryColumnList:x=[],indicators:N=[],dataSourceId:L,idxLibMode:O,preview:k=!1}=i||{};f==null&&(Te(d,"table")?f="1":f="2");let I;if(Array.isArray(C)&&C.length>0){const w=C.length;for(let $=0;$<w;$++){const B=C[$]||{},{label:F="",name:M="",show:D=!1,sort:R,customGroup:z,conditions:g}=B;if(D||w===1){I={label:F.trim(),columnName:M,show:D,sort:R,customGroup:z,conditions:r(g)};break}}}let S;if(Array.isArray(m)&&m.length>0){const w=m.length;for(let $=0;$<w;$++){const B=m[$]||{},{label:F="",name:M="",show:D=!1,sort:R,customGroup:z,conditions:g}=B;if(D||w===1){S={label:F.trim(),columnName:M,show:D,sort:R,customGroup:z,conditions:r(g)};break}}}const _=[];x==null||x.forEach(w=>{_.push(o(w))});const V=[];if(b==null||b.forEach(w=>{w.location="LEFT",V.push(l(w))}),y==null||y.forEach(w=>{w.location="RIGHT",V.push(l(w))}),N==null||N.forEach(w=>{w.location="LEFT",V.push(l(w))}),!(f==="1"&&_.length===0)&&!(f==="2"&&V.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:I,series:S,indicatorList:V,queryColumns:_,pageFlag:!0,sqlConditions:[],dataSourceId:L,idxLibMode:O,preview:k})}catch(w){console.error(w)}}},ma=(t,o)=>{const n={dayjs:ne,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Rt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],C=l[h];C!=null&&(c=c.replace(h,C))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=ma(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),t},Ct=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=ma(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},dp=(t,o,n)=>{switch(t.type){case"bar":return pp(t,o,n);case"line":return up(t,o,n);case"pie":return fp(t,o,n);case"comboGraph":return mp(t,o,n);default:return{}}},pp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:C,seriesName:m,name:b,value:y,data:x}=c[h]||{};h===0&&(u+=`${b}<br/>`),u+=Rt(f,{textData:{marker:C,name:b,value:y,a:m,b,c:y,...x}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ct(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Ct(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},up=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:C,seriesName:m,name:b,value:y,data:x}=c[h]||{};h===0&&(u+=`${b}<br/>`),u+=Rt(f,{textData:{marker:C,name:b,value:y,a:m,b,c:y,...x}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ct(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return Ct(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},fp=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return Rt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:Ei(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},mp=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ct(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const C=f[h],{tooltipFormatter:m}=C||{},{marker:b,seriesName:y,name:x,value:N,data:L}=s[h]||{};h===0&&(p+=`${x}<br/>`),p+=Rt(m||u,{textData:{marker:b,name:x,value:N,seriesName:y,a:y,b:x,c:N,...L}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},hp=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:C,value:m}=h,b={...t[0],value:t[0][m]};r.add(C),p.push(b)}const u=t[0][n]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[n];r.add(f);for(let h=0;h<d;h++){const C=a[h],{label:m,value:b}=C,y={...u,value:u[b]};if(l.has(m)){const x=l.get(m);x.push(y),l.set(m,x)}else l.set(m,[y])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},yp=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",h=u[a]||"",C=u[r]||"";if(l.add(f),i.has(C)){const m=i.get(C);m.push({name:f,value:h,...u}),i.set(C,m)}else i.set(C,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},gp=e.defineComponent({name:"ChartGraph",components:{ASpin:j.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Ae);let l=null;const i=e.inject(Ne)||"",d=e.inject(de)||{},s=e.inject(wt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),C=e.computed(()=>h.value?Aa:12),m=e.ref({}),b=e.ref(),y=e.computed(()=>{const _=e.unref(n.value);if((_==null?void 0:_.type)==="customGraph")return b.value;const V=dp(_,e.unref(m),C.value);return{toolbox:{show:_.toolboxShow,left:_.toolboxLeft,top:_.toolboxTop,itemSize:_.toolboxItemSize,itemGap:_.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:_.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:_.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:_.titleText,subtext:_.titleSubtext,left:"center"},grid:{top:_.gridTop,bottom:_.gridBottom,left:_.gridLeft,right:_.gridRight,containLabel:_.gridContainLabel},color:_.colors,...V}}),x=(_=[],V,w=!1)=>{const $=w?V:null;m.value=hp(_,$)},N=(_=[],V)=>{m.value=yp(_,V)},L=async()=>{var _,V,w;try{const $=cp({graphicConfig:e.unref(a.value),type:(_=e.unref(n.value))==null?void 0:_.type,request:r,indicatorToken:i});f.value=!0;const B=await $(),{columns:F=[],rows:M=[]}=((V=B==null?void 0:B.data)==null?void 0:V.data)??{};if(((w=e.unref(n.value))==null?void 0:w.type)==="pie"){let D=[];if(F.length>0){const R=F[0],z=F[1];D=M.map(g=>({name:g[R],value:g[z]}))}N(D)}else{let D;F.length>0&&(D={name:F[0],types:F.slice(1).map(R=>({label:R,value:R}))}),x(M,D,!0)}}catch($){console.error($)}finally{f.value=!1}},O={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},k=()=>{e.unref(m).dataset.length===0?u.value.setOption(O):u.value.setOption(y.value)},I=()=>{e.unref(n.value).type!=="customGraph"&&L()},S=()=>{var _;(_=u.value)==null||_.resize()};return e.watch(y,()=>{k()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,_=>{try{const V=eval;b.value=V(_)}catch(V){console.error(V)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(S),l.observe(p.value)),u.value=Sa.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:I}),{echartRef:c,loading:f}}}),yu="",bp={class:"ecan-chart-graph",ref:"chartWrapRef"},Cp={style:{width:"100%",height:"100%"},ref:"echartRef"};function wp(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",Cp,null,512)]),_:1},8,["spinning"])],512)}const ha=Z(gp,[["render",wp],["__scopeId","data-v-8049fed2"]]),xp=e.defineComponent({name:"DataConfig",components:{DataGroup:Bs,StyleGroup:Jd,ChartGraph:ha,ATabs:j.Tabs,ATabPane:j.TabPane,ControlGroup:sp},setup(){const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Pe),r=e.inject(Mo),l=e.inject(de),i=e.inject(Me),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const m=oe.cloneDeep(e.unref(a));c(m);const b=oe.pick(m,oe.without(Object.keys(m),"position","top","left","width","height"));Te(m.type,d)?(b.height=m.height,b.width=m.width):b.height="290px";const y=oe.cloneDeep(e.unref(l));return y.pageMode="design",y.preview=!0,{...b,graphicConfig:y,toolboxShow:!1}});function c(m){var b,y,x,N;["#ffffff","#fff"].includes((b=m==null?void 0:m.color)==null?void 0:b.toLowerCase())&&(m.color="#000"),["#ffffff","#fff"].includes((y=m==null?void 0:m.variableColor)==null?void 0:y.toLowerCase())&&(m.variableColor="#000"),["#ffffff","#fff"].includes((x=m==null?void 0:m.increaseColor)==null?void 0:x.toLowerCase())&&(m.increaseColor="#000"),["#ffffff","#fff"].includes((N=m==null?void 0:m.declineColor)==null?void 0:N.toLowerCase())&&(m.declineColor="#000")}const p=e.computed(()=>{let m=!0;return Te(e.unref(s).type,d)&&(m=!1),m}),u=e.computed(()=>{var m;return(m=e.unref(s))==null?void 0:m.type}),f=e.computed(()=>{var m;return!!((m=e.unref(s))!=null&&m.isGroupTable)}),h=m=>{const b=m==="1";b&&u.value==="table"&&C(),window.changeShowTable&&window.changeShowTable(b)},C=()=>{var b;let m;r&&u.value==="table"?m=window.updateConfig:m=(b=e.unref(n))==null?void 0:b.refreshData,typeof m=="function"&&m()};return e.provide(jo,C),e.watch(l,()=>{C()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:u,isGroupTable:f,onChange:h,component:s,fullWidth:p,renderUsedComponents:i}}}),gu="",kp={class:"data-config"},_p={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Sp(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup"},null,512)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",_p,null,512)):e.withDirectives((e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Ap=Z(xp,[["render",Sp],["__scopeId","data-v-49a32221"]]),Np=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Ll,DataConfig:Ap},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var k;return((k=e.unref(i))==null?void 0:k.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?oe.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?oe.cloneDeep(e.unref(i).chartsOptions):e.ref(oe.cloneDeep(Ho.line));p=e.ref(p);let u=e.unref(i).tableOptions?oe.cloneDeep(e.unref(i).tableOptions):e.ref(oe.cloneDeep(Na));u=e.ref(u);const f=e.ref([]),h=k=>{f.value=k},C=k=>{c.value={...e.unref(c),...e.unref(k)}},m=(k,I=!0)=>{I?p.value={...e.unref(p),...e.unref(k)}:p.value={...e.unref(k)}},b=k=>{u.value={...e.unref(u),...e.unref(k)}},y=()=>f,x=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=oe.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=oe.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},N=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=N,t.request&&e.provide(Ae,t.request),e.provide(Po,{setDataList:h,getDataList:y});const L=k=>{n("updateUsedComponent",k)},O=e.computed(()=>{const{renderUsedComponentList:k}=t;let I=null;return k!=null&&k.length&&(I=k.filter(S=>{var _;return S.id!==((_=e.unref(i))==null?void 0:_.id)})),I});return e.provide(Pe,i),e.provide(de,c),e.provide(wt,p),e.provide(Ro,u),e.provide(zt,r),e.provide(Mo,s),e.provide(Ne,l),e.provide(Oe,C),e.provide(Ut,m),e.provide(Gt,b),e.provide(Me,O),e.provide(Ht,L),e.provide(zo,t.mapAttributeProps),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:x}),{isUpdate:a}}}),bu="",Tp={key:0,class:"config-modal"},Lp={class:"config-modal-left"},Ep={class:"config-modal-right"};function Bp(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tp,[e.createElementVNode("div",Lp,[e.createVNode(i)]),e.createElementVNode("div",Ep,[e.createVNode(d)])]))}const ya=Do(Z(Np,[["render",Bp],["__scopeId","data-v-9bdadbc5"]])),ga=Do(ha),ba=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:ga,EcanIndicatorLibrary:ya},Symbol.toStringTag,{value:"Module"})),Op={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(ba).forEach(a=>{const r=ba[a];r.install&&t.use(r)})}};ce.EcanChartGraph=ga,ce.EcanIndicatorLibrary=ya,ce.default=Op,Object.defineProperties(ce,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
56
+ `,lo=!1,or=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nr;e.nextTick(function(){lo||(typeof window<"u"&&window.document&&window.document.documentElement&&Ja(n,{prepend:!0}),lo=!0)})},ar=["icon","primaryColor","secondaryColor"];function rr(t,n){if(t==null)return{};var o=lr(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function lr(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}function St(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ir(t,r,o[r])})}return t}function ir(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var it={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function sr(t){var n=t.primaryColor,o=t.secondaryColor;it.primaryColor=n,it.secondaryColor=o||ao(n),it.calculated=!!o}function cr(){return St({},it)}var We=function(n,o){var a=St({},n,o.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=rr(a,ar),s=it;if(l&&(s={primaryColor:l,secondaryColor:i||ao(l)}),or(),tr(oo(r),"icon should be icon definiton, but got ".concat(r)),!oo(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=St({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),en(c.icon,"svg-".concat(c.name),St({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};We.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},We.inheritAttrs=!1,We.displayName="IconBase",We.getTwoToneColors=cr,We.setTwoToneColors=sr;const tn=We;function dr(t,n){return mr(t)||fr(t,n)||ur(t,n)||pr()}function pr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ur(t,n){if(t){if(typeof t=="string")return io(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return io(t,n)}}function io(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function fr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function mr(t){if(Array.isArray(t))return t}function so(t){var n=ro(t),o=dr(n,2),a=o[0],r=o[1];return tn.setTwoToneColors({primaryColor:a,secondaryColor:r})}function hr(){var t=tn.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var yr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function gr(t,n){return xr(t)||wr(t,n)||Cr(t,n)||br()}function br(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cr(t,n){if(t){if(typeof t=="string")return co(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return co(t,n)}}function co(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function wr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function xr(t){if(Array.isArray(t))return t}function po(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){nn(t,r,o[r])})}return t}function nn(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function kr(t,n){if(t==null)return{};var o=_r(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function _r(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}so("#1890ff");var qe=function(n,o){var a,r=po({},n,o.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=kr(r,yr),m=(a={anticon:!0},nn(a,"anticon-".concat(i.name),!!i.name),nn(a,l,l),a),w=d===""||d||i.name==="loading"?"anticon-spin":"",h=c;h===void 0&&u&&(h=-1,f.tabindex=h);var k=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,y=ro(p),_=gr(y,2),T=_[0],L=_[1];return e.createVNode("span",po({role:"img","aria-label":i.name},f,{onClick:u,class:m}),[e.createVNode(tn,{class:w,icon:i,primaryColor:T,secondaryColor:L,style:k},null)])};qe.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},qe.displayName="AntdIcon",qe.inheritAttrs=!1,qe.getTwoToneColor=hr,qe.setTwoToneColor=so;const be=qe;var Sr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Ar=Sr;function uo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Nr(t,r,o[r])})}return t}function Nr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var on=function(n,o){var a=uo({},n,o.attrs);return e.createVNode(be,uo({},a,{icon:Ar}),null)};on.displayName="AppstoreAddOutlined",on.inheritAttrs=!1;const fo=on;var Tr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Lr=Tr;function mo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Er(t,r,o[r])})}return t}function Er(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var an=function(n,o){var a=mo({},n,o.attrs);return e.createVNode(be,mo({},a,{icon:Lr}),null)};an.displayName="CaretDownOutlined",an.inheritAttrs=!1;const Br=an;var Or={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const Vr=Or;function ho(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ir(t,r,o[r])})}return t}function Ir(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var rn=function(n,o){var a=ho({},n,o.attrs);return e.createVNode(be,ho({},a,{icon:Vr}),null)};rn.displayName="CaretRightOutlined",rn.inheritAttrs=!1;const vr=rn;var $r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const Fr=$r;function yo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Dr(t,r,o[r])})}return t}function Dr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var ln=function(n,o){var a=yo({},n,o.attrs);return e.createVNode(be,yo({},a,{icon:Fr}),null)};ln.displayName="CloseOutlined",ln.inheritAttrs=!1;const sn=ln;var Pr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Mr=Pr;function go(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){jr(t,r,o[r])})}return t}function jr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var cn=function(n,o){var a=go({},n,o.attrs);return e.createVNode(be,go({},a,{icon:Mr}),null)};cn.displayName="CopyOutlined",cn.inheritAttrs=!1;const Rr=cn;var Ur={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Gr=Ur;function bo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){zr(t,r,o[r])})}return t}function zr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var dn=function(n,o){var a=bo({},n,o.attrs);return e.createVNode(be,bo({},a,{icon:Gr}),null)};dn.displayName="DeleteOutlined",dn.inheritAttrs=!1;const Hr=dn;var Wr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const qr=Wr;function Co(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Yr(t,r,o[r])})}return t}function Yr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var pn=function(n,o){var a=Co({},n,o.attrs);return e.createVNode(be,Co({},a,{icon:qr}),null)};pn.displayName="DoubleRightOutlined",pn.inheritAttrs=!1;const Kr=pn;var Xr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const Qr=Xr;function wo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Jr(t,r,o[r])})}return t}function Jr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var un=function(n,o){var a=wo({},n,o.attrs);return e.createVNode(be,wo({},a,{icon:Qr}),null)};un.displayName="DownOutlined",un.inheritAttrs=!1;const Zr=un;var el={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const tl=el;function xo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){nl(t,r,o[r])})}return t}function nl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var fn=function(n,o){var a=xo({},n,o.attrs);return e.createVNode(be,xo({},a,{icon:tl}),null)};fn.displayName="MinusCircleOutlined",fn.inheritAttrs=!1;const ol=fn;var al={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const rl=al;function ko(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ll(t,r,o[r])})}return t}function ll(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var mn=function(n,o){var a=ko({},n,o.attrs);return e.createVNode(be,ko({},a,{icon:rl}),null)};mn.displayName="PlusCircleOutlined",mn.inheritAttrs=!1;const il=mn;var sl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const cl=sl;function _o(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){dl(t,r,o[r])})}return t}function dl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var hn=function(n,o){var a=_o({},n,o.attrs);return e.createVNode(be,_o({},a,{icon:cl}),null)};hn.displayName="PlusOutlined",hn.inheritAttrs=!1;const pl=hn;var ul={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const fl=ul;function So(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ml(t,r,o[r])})}return t}function ml(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var yn=function(n,o){var a=So({},n,o.attrs);return e.createVNode(be,So({},a,{icon:fl}),null)};yn.displayName="SettingOutlined",yn.inheritAttrs=!1;const hl=yn,yl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:vr,CaretDownOutlined:Br,AInputSearch:U.InputSearch,ASpin:U.Spin,APagination:U.Pagination,Draggable:at},setup(){var L;const t=(L=window==null?void 0:window.config)==null?void 0:L.pageId,n=e.inject(_e),o=e.unref(e.inject(Se)),a=e.inject(Pe),r=e.computed(()=>{var C;return(C=e.unref(a))==null?void 0:C.graphicConfig}),l=e.computed(()=>{var C;return(C=e.unref(r))==null?void 0:C.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const C={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const b=await n.post(`${ye}/diagram/sourceList`,C,{headers:{Authentication:o,operateContext:"ygt"}});d.value=!1;const{success:V,data:A={}}=b.data;if(V){const{rows:S=[],total:I=0}=A;S==null||S.forEach(x=>{var v;x.show=!1,(v=x.dataViewColumns)==null||v.forEach(E=>{E.show=!0,E.edit=!1,E.title&&(E.label=E.title)})}),i.value=S,s.totalResult=+I}}catch{d.value=!1}},u=C=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[C],f=C=>{i.value[C].show=!i.value[C].show},m=()=>{s.currentPage=1,p()},w=ne.debounce(()=>{s.currentPage=1,p()},200),h=(C,b)=>{s.pageSize=b,s.currentPage=C,p()};e.onMounted(()=>{p()});const k=e.inject(de),y=e.computed(()=>{const C=["classificationList","rowHeaderList"];let b=[];for(const V in e.unref(k))if(Object.prototype.hasOwnProperty.call(e.unref(k),V)&&C.includes(V)){const A=e.unref(k)[V];Array.isArray(A)&&(b=b.concat(A))}return b});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:m,onChange:w,onPaginationChange:h,searchText:c,setItemDisabled:(C=[])=>{let b=!1;for(const V of e.unref(y))if(!C.find(S=>S.typeGuid===V.typeGuid)){b=!0;break}return b},onDragStart:(C,b)=>{const V=b[C.oldIndex];V&&sessionStorage.setItem("indicator-list-item",JSON.stringify(V))}}}}),Gp="",gl={class:"data-source-list"},bl={class:"columns"},Cl={class:"column-item"},wl=["onClick"],xl={key:0},kl={class:"column-child-item"},_l={class:"column-child-item-name"};function Sl(t,n,o,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",gl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",bl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,m)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Cl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(m)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,wl)]),f.show?(e.openBlock(),e.createElementBlock("div",xl,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":w=>f.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:w=>t.onDragStart(w,f.dataViewColumns)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",kl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",_l,e.toDisplayString(w.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":n[1]||(n[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Al=Z(yl,[["render",Sl],["__scopeId","data-v-b23ce142"]]),Nl=e.defineComponent({name:"DataList",components:{DataSourceList:Al,DataViewList:Ia},setup(){return{source:e.inject(zt)}}});function Tl(t,n,o,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Ll=Z(Nl,[["render",Tl]]),Ao={mounted(t){t.focus()}},El=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:at,AModal:U.Modal,AButton:U.Button},setup(t,{expose:n}){var T;const o=(T=window==null?void 0:window.config)==null?void 0:T.pageId,a=e.inject(_e),r=e.unref(e.inject(Se)),l=e.inject(de),i=e.inject(Oe),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const L=await a.post(`${ye}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:C,data:b=[]}=L.data;C&&(c.value=b==null?void 0:b.slice(0,200))}catch(L){console.error(L)}},u=()=>{var A;const L=((A=e.unref(l)[t.type])==null?void 0:A.slice())||[],C=L[t.index],{label:b,name:V}=t.item;C.sort={label:b,columnName:V,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:L})};let f=!1;const m=()=>{f=!0},w=e.ref(!1),h=()=>{w.value=!0},k=()=>{w.value=!1},y=()=>{f&&u(),f=!1,k()};return n({showModal:h}),e.watch(w,L=>{var C,b;if(L){const V=(b=(C=t.item)==null?void 0:C.sort)==null?void 0:b.customOrderColumns;V==null?p():c.value=V}else c.value=[];window.changeShowTable&&window.changeShowTable(!L)},{flush:"post"}),{visible:w,onCancel:y,customSortList:c,onChange:m,onDeleteConfig:()=>{var A;const L=((A=e.unref(l)[t.type])==null?void 0:A.slice())||[],C=L[t.index],{label:b,name:V}=t.item;C.sort={label:b,columnName:V},i({[t.type]:L}),k()}}}}),zp="",Bl={class:"button-wrapper"},Ol={class:"sort-item"};function Vl(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Bl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ol,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Il=Z(El,[["render",Vl],["__scopeId","data-v-8e16d201"]]),vl=e.defineComponent({name:"CustomGroupModal",directives:{focus:Ao},components:{CloseOutlined:sn,AModal:U.Modal,ASelect:U.Select,ASelectOption:U.SelectOption,AButton:U.Button,AInput:U.Input,ACheckbox:U.Checkbox,ACollapse:U.Collapse,ACollapsePanel:U.CollapsePanel,ATag:U.Tag,ACheckableTag:U.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){var z;const o=e.inject(_e),a=(z=window==null?void 0:window.config)==null?void 0:z.pageId,r=e.unref(e.inject(Se));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const g=e.unref(c).map(N=>N.title);return new Set(g)}),u=e.ref([]);e.watch(()=>e.unref(c).length,g=>{u.value=new Array(g).fill(!1)});const f=e.computed(()=>{let g=0;return e.unref(c).forEach(N=>{var O;(O=N.data)==null||O.forEach(G=>{G.checked&&g++})}),g}),m=()=>{const g=e.unref(d);if(!g){U.message.error("创建分组名不能空");return}e.unref(p).has(g)?U.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:g,data:[]}),l=!0)},w=g=>{e.unref(c).splice(g,1),l=!0},h=e.ref(null),k=()=>{if(e.unref(f)===0){U.message.error("当前移入分组已选个数为0");return}const g=e.unref(h);if(g==null){U.message.error("请选择移入分组");return}if(!e.unref(c)[g]){U.message.error("移入分组不存在,请重新选择");return}const N=[],O=e.unref(c).length;for(let G=0;G<O;G++){const R=e.unref(c)[G];e.unref(c)[G].data=R.data.filter(q=>(q.checked&&N.push({...q,checked:!1}),!q.checked))}e.unref(c)[g].data=[...N,...e.unref(c)[g].data],l=!0},y=g=>{e.unref(u)[g]=!0},_=g=>{e.unref(u)[g]=!1},T=(g,N)=>{const O=g.target.value;e.unref(p).has(O)&&U.message.error("组名不能相同,请修改"),e.unref(c)[N].title=O,l=!0},L=e.inject(de),C=e.inject(Oe),b=e.computed(()=>e.unref(L).source),V=e.computed(()=>e.unref(L).dataViewId),A=e.ref(!1),S=()=>{var Y,ee;const g=e.unref(c);let N="";e.unref(A)&&(N=(Y=g[0])==null?void 0:Y.title);const O=g==null?void 0:g.length,G={};for(let te=1;te<O;te++){const ae=g[te]||{},{title:ie,data:le}=ae;G[ie]=(le==null?void 0:le.map(Ne=>Ne.label))||[]}const R=((ee=e.unref(L)[t.type])==null?void 0:ee.slice())||[],q=R[t.index];q.customGroup={groupInfoMap:G,otherGroupName:N},C({[t.type]:R})},I=e.ref(!1),x=()=>{I.value=!0},v=()=>{I.value=!1},E=()=>{v(),l&&S(),l=!1},F=()=>{l=!0},P=new Set,D=async()=>{const g=t.item.customGroup||{},N=g.otherGroupName,O=g.groupInfoMap;(N===""||N==null)&&(A.value=!1),e.unref(c)[0]={title:N||"未分组",data:[]};let G=1;for(const R in O)if(Object.prototype.hasOwnProperty.call(O,R)){const Y=O[R].map(ee=>(P.add(ee),{label:ee,checked:!1}));e.unref(c)[G]={title:R,data:Y},G++}await M()},M=async()=>{var g;try{const N=await o.post(`${ye}/diagram/groupvalue`,{source:e.unref(b),dataViewId:e.unref(V),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:G=[]}=N.data;if(O){const R=[];(g=G==null?void 0:G.slice(0,200))==null||g.forEach(q=>{P.has(q)||R.push({label:q,checked:!1})}),e.unref(c)[0].data=R}}catch(N){console.error(N)}};return e.watch(I,g=>{g&&D(),window.changeShowTable&&window.changeShowTable(!g)},{flush:"post"}),n({showModal:x}),{visible:I,title:i,activeKey:s,customGroupList:c,onCancel:E,useOtherGroup:A,selectCount:f,createGroupTitle:d,onAddGroup:m,onDeleteGroup:w,onMoveInGroup:k,selectGroupIndex:h,onEditTitle:y,onTitleChange:T,onFinishEditTitle:_,onUseOtherGroup:F,customGroupEditTitleList:u}}}),Hp="",Wp="",$l={class:"custom-group-header"},Fl={class:"move-and-create"},Dl={class:"select-tip"},Pl={class:"select-count"},Ml={class:"create-group"},jl={class:"custom-group-content"},Rl=["onClick"],Ul={class:"extra"},Gl={class:"custom-group-list"},zl={class:"text"};function Hl(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),m=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),h=e.resolveComponent("a-collapse"),k=e.resolveComponent("a-modal"),y=e.resolveDirective("focus");return e.openBlock(),e.createBlock(k,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$l,[e.createElementVNode("div",Fl,[e.createElementVNode("div",null,[e.createElementVNode("span",Dl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Pl,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[0]=_=>t.selectGroupIndex=_),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(_,T)=>(e.openBlock(),e.createBlock(i,{key:T},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ml,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[1]=_=>t.createGroupTitle=_),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":n[2]||(n[2]=_=>t.useOtherGroup=_),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",jl,[e.createVNode(h,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=_=>t.activeKey=_),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(_,T)=>(e.openBlock(),e.createBlock(w,{key:T},{header:e.withCtx(()=>[t.customGroupEditTitleList[T]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:_.title,size:"small",onChange:L=>t.onTitleChange(L,T),onBlur:L=>t.onFinishEditTitle(T),onPressEnter:L=>t.onFinishEditTitle(T)},null,8,["value","onChange","onBlur","onPressEnter"])),[[y]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(L=>t.onEditTitle(T),["prevent","stop"])},e.toDisplayString(_.title),9,Rl))]),extra:e.withCtx(()=>[e.createElementVNode("div",Ul,[T===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),T!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(L=>t.onDeleteGroup(T),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.data,(L,C)=>(e.openBlock(),e.createBlock(m,{color:"red",checked:L.checked,"onUpdate:checked":b=>L.checked=b,class:"custom-group",key:C},{default:e.withCtx(()=>[e.createElementVNode("span",zl,e.toDisplayString(L.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Wl=Z(vl,[["render",Hl],["__scopeId","data-v-7e3049d2"]]);var ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gn={},Yl={get exports(){return gn},set exports(t){gn=t}};(function(t,n){(function(o,a){t.exports=a()})(ql,function(){var o="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,o):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var m=this.quarter()-1;return f?this.month(3*m).startOf(o).startOf("day"):this.month(3*m+2).endOf(o).endOf("day")}return s.bind(this)(c,p)}}})})(Yl);const Kl=gn;oe.extend(Kl);const Xl=e.defineComponent({name:"Condition",components:{CloseOutlined:sn,DownOutlined:Zr,AppstoreAddOutlined:fo,ASelect:U.Select,AInput:U.Input,ADatePicker:U.DatePicker,AButton:U.Button,ADropdown:U.Dropdown,AMenu:U.Menu,AMenuItem:U.MenuItem,ASubMenu:U.SubMenu,APopover:U.Popover,ATabs:U.Tabs,ATabPane:U.TabPane,ARadioGroup:U.RadioGroup,ARadio:U.Radio,AInputNumber:U.InputNumber,ASelectOption:U.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var ie,le,Ne,Ge,ze,tt,nt,$e,He;const n=(ie=window==null?void 0:window.config)==null?void 0:ie.pageId,o=e.inject(de),a=e.inject(_e),r=e.unref(e.inject(Se)),l=e.inject(Gn),i=e.inject(Me),d=e.computed(()=>{var B;const H=[];return(B=e.unref(i))==null||B.forEach($=>{const{keyName:j="",id:W="",type:K}=$;K==="ecanRangePicker"?H.push({value:`${W}-startTime`,label:`${j||W}-开始时间值`,keyName:`${j||W}-startTime`,id:W},{value:`${W}-endTime`,label:`${j||W}-结束时间值`,keyName:`${j||W}-endTime`,id:W}):H.push({value:W,label:`${j||W}`,keyName:`${j||W}`,id:W})}),H}),s=e.computed(()=>{var H;return(H=e.unref(o))==null?void 0:H.dataViewId}),c=e.computed(()=>{var H;return(H=e.unref(o))==null?void 0:H.source}),p=e.ref(!1),u={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},f=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],m=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),w=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],h=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],k=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],y=e.ref({fieldName:(le=t.data)==null?void 0:le.fieldName,fieldType:(Ne=t.data)==null?void 0:Ne.fieldType,rule:(Ge=t.data)==null?void 0:Ge.rule,id:(ze=t.data)==null?void 0:ze.id,fieldValue:_(),label:(tt=t.data)==null?void 0:tt.label,targetSource:"",typeGuid:(nt=t.data)==null?void 0:nt.typeGuid,dataType:(($e=t.data)==null?void 0:$e.dataType)||"",componentId:((He=t.data)==null?void 0:He.componentId)||""});function _(){const{fieldType:H="",dataType:B="",fieldValue:$=""}=t.data;if(H==="DATE"&&B==="time")return oe($);if(B==="component"){const j=e.unref(d).find(W=>W.keyName===$);return j?j.value:$}else return $}const T=e.ref(!1),L=e.computed(()=>y.value.fieldType==="DATE"),C=e.computed(()=>{const H=t.type;let B=[];if(["classificationList","seriesList","rowHeaderList"].includes(H)){let $=[];for(const j in e.unref(o))if(Object.prototype.hasOwnProperty.call(e.unref(o),j)&&!["controlList","sqlConditions"].includes(j)){const W=e.unref(o)[j];Array.isArray(W)&&(["classificationList","seriesList","rowHeaderList"].includes(j)?$=$.concat(W.filter(K=>K.show)):$=$.concat(W))}B=$}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(H)&&(B=e.unref(l));return B.map($=>({...$,label:$.title||$.label,value:$.name}))}),{updateCondition:b,deleteCondition:V}=e.inject(Un,{updateCondition:(H,B,$)=>{},deleteCondition:(H,B)=>{}}),A=()=>{V(t.level,t.index)};e.watch(y,H=>{const B=ne.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(B.fieldValue=H.fieldValue.format(H.dateFormat)),b(B,t.level,t.index)},{deep:!0});const S=H=>{const B=e.unref(C).find(J=>J.value===H)||{},{name:$,genericType:j,id:W,label:K,typeGuid:X}=B;y.value={id:W,fieldName:$,fieldType:j,label:K,rule:"",fieldValue:j==="DATE"?null:void 0,targetSource:"",typeGuid:X,dataType:""}},I=H=>{const B=e.unref(d).find($=>$.value===H)||{};e.unref(y).componentId=B.id||""},x=e.computed(()=>{const H=e.unref(y).fieldType;return H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),v=e.computed(()=>{let H="";const B=e.unref(x).find($=>$.value===e.unref(y).rule);return B&&(H=B.label),H}),E=e.computed(()=>{let H={fontSize:"12px"};return e.unref(v)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),F=e.ref([]),P=async()=>{var H;if(!(e.unref(F).length>0))try{const B=await a.post(`${ye}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(y).fieldName,hrpIndexTypeGuid:e.unref(y).typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:$,data:j=[]}=B.data;$&&(F.value=(H=j==null?void 0:j.slice(0,200))==null?void 0:H.map(W=>({label:W,value:W})))}catch(B){console.error(B)}},D=H=>{e.unref(y).rule=H,e.unref(y).fieldValue=e.unref(y).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&P()},M=H=>{e.unref(y).dataType=H,e.unref(y).fieldValue=""},z=e.ref(),g=H=>{z.value=H,e.unref(y).fieldValue=(H==null?void 0:H.join(","))||""},N=H=>{const{keyPath:B}=H;e.unref(y).rule=B[0],e.unref(y).dataType=B[1],e.unref(y).dateFormat=B[2],e.unref(y).fieldValue=""};e.onMounted(()=>{var j,W,K,X,J,se,he,Q,re;if(y.value.dataType=((j=t.data)==null?void 0:j.dataType)||"",y.value.componentId=((W=t.data)==null?void 0:W.componentId)||"",e.unref(y).fieldType==="DATE"){e.unref(y).dateFormat=(K=t.data)==null?void 0:K.dateFormat,e.unref(y).activeKey=(X=t.data)==null?void 0:X.activeKey,e.unref(y).radioValue=((J=t.data)==null?void 0:J.radioValue)||"",e.unref(y).calcWays=((se=t.data)==null?void 0:se.calcWays)||[],e.unref(y).dateCalcTypes=((he=t.data)==null?void 0:he.dateCalcTypes)||[];const ot=e.unref(m).find(Vp=>{var wa;return Vp.key===((wa=t.data)==null?void 0:wa.activeKey)});ot&&ee(ot,t.data)}else z.value=((re=(Q=t.data)==null?void 0:Q.fieldValue)==null?void 0:re.split(","))||[];const{fieldType:H,fieldName:B,rule:$}=y.value;H!=="DATE"&&B&&$&&["IN","NOT_IN"].includes($)&&P()});const O=H=>{if(e.unref(y).activeKey===H){e.unref(m)[H].radioValue=e.unref(y).radioValue,e.unref(m)[e.unref(y).activeKey]&&(e.unref(m)[e.unref(y).activeKey].radioValue=e.unref(y).radioValue,e.unref(y).radioValue==="1"?e.unref(m)[H].beforeNum=e.unref(y).calcWays[0]:e.unref(y).radioValue==="2"&&(e.unref(m)[H].afterNum=e.unref(y).calcWays[0]));return}e.unref(m).forEach(B=>{B.beforeNum=0,B.afterNum=0,B.radioValue="1",B.value=""})},G=(H,B)=>{p.value=!0;const $=H.target.value,j=B.type,W=e.unref(y).dateFormat,K=Math.abs(B.beforeNum),X=B.afterNum;B.value=te($,j,W,K,X)},R=H=>{const B=e.unref(y).activeKey;if(H!==B)return;let $="";B===0?$="years":B===1?$="quarters":B===2?$="months":B===3?$="weeks":B===4&&($="days");const j=e.unref(y).dateFormat,W=e.unref(y).radioValue;let K=0,X=0;return W==="1"?K=Math.abs(e.unref(y).calcWays[0]):W==="2"&&(X=e.unref(y).calcWays[0]),te(W,$,j,K,X)},q=(H,B,$,j)=>{if(p.value=!0,B.radioValue===j){const W=H.target.value;$==="+"?B.value=oe().add(W,B.type).format(e.unref(y).dateFormat):B.value=oe().subtract(W,B.type).format(e.unref(y).dateFormat)}},Y=(H,B)=>{(e.unref(y).fieldType!=="DATE"||e.unref(y).dataType!=="component")&&(y.value.fieldValue=oe(H.value,e.unref(y).dateFormat)),e.unref(y).calcWays||(e.unref(y).calcWays=[]),e.unref(y).activeKey=B,e.unref(y).radioValue=H.radioValue,H.radioValue==="1"?e.unref(y).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(y).calcWays[0]=H.afterNum:H.radioValue==="3"?B===4?e.unref(y).calcWays[0]="0":e.unref(y).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(y).calcWays[0]="END"),B===0?e.unref(y).dateCalcTypes=["YEAR"]:B===1?e.unref(y).dateCalcTypes=["QUARTER"]:B===2?e.unref(y).dateCalcTypes=["MONTH"]:B===3?e.unref(y).dateCalcTypes=["WEEK"]:B===4&&(e.unref(y).dateCalcTypes=["DAY"]),T.value=!1};function ee(H,B){const{radioValue:$="",calcWays:j=[]}=B;H.radioValue=$,j!=null&&j.length&&($==="1"?H.beforeNum=Math.abs(j[0]):$==="2"&&(H.afterNum=j[0]))}function te(H,B,$,j,W){if(H==="1")return oe().subtract(j,B).format($);if(H==="2")return oe().add(W,B).format($);if(H==="3"){if(B==="years")return oe().startOf("year").format($);if(B==="quarters")return oe().startOf("quarter").format($);if(B==="months")return oe().startOf("month").format($);if(B==="days")return oe().format($)}else if(H==="4"){if(B==="years")return oe().endOf("year").format($);if(B==="quarters")return oe().endOf("quarter").format($);if(B==="months")return oe().endOf("month").format($)}return""}return{fieldOptions:C,ruleOptions:x,onFieldChange:S,condition:y,valueOptions:F,onRuleChange:D,onDataTypeChange:M,onFieldValueSelectChange:g,fieldValues:z,onDelete:A,isDateType:L,formatList:f,tabDateList:m,compareList:w,menuRule:h,dateBtnLabel:v,downIconStyle:E,popoverVisible:T,dateRadioStyle:u,showTime:p,controlList:d,dataTypeList:k,handleMenuClick:N,changeTabInitDate:O,changeRadioValue:G,getFieldValue:R,blurCompare:q,okDatePickConfig:Y,onChangeComponent:I,filterOption:(H,B)=>B.label.toLowerCase().indexOf(H.toLowerCase())>=0}}}),qp="",Yp="",Ql={class:"condition"},Jl=["title"],Zl={class:"rule"},ei={class:"data-type"},ti={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},ni={class:"popover-content-wrap"},oi={class:"tabFilterRadio"},ai={key:0},ri={key:1},li={style:{"margin-left":"10px"}},ii={style:{"margin-left":"10px"}},si={style:{position:"absolute",bottom:"10px"}};function ci(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),m=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),h=e.resolveComponent("a-input-number"),k=e.resolveComponent("a-radio"),y=e.resolveComponent("a-radio-group"),_=e.resolveComponent("a-tab-pane"),T=e.resolveComponent("a-tabs"),L=e.resolveComponent("appstore-add-outlined"),C=e.resolveComponent("a-popover"),b=e.resolveComponent("a-input"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(A,S)=>(e.openBlock(),e.createBlock(i,{key:S,value:A.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:A.label},e.toDisplayString(A.label),9,Jl)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Zl,[t.isDateType?(e.openBlock(),e.createBlock(m,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,A=>(e.openBlock(),e.createBlock(c,{key:A.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,S=>{var I;return e.openBlock(),e.createBlock(c,{key:S.value,disabled:S.value==="component"&&!((I=t.controlList)!=null&&I.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value&&t.condition.dataType===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,x=>(e.openBlock(),e.createBlock(s,{key:x.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===A.value&&t.condition.dataType===S.value&&t.condition.dateFormat===x.value?"color: #1890FF;":"")},e.toDisplayString(x.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",ei,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(A,S)=>(e.openBlock(),e.createBlock(i,{key:S,value:A.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",ti,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(w,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[0]||(n[0]=A=>t.condition.fieldValue=A),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[1]||(n[1]=A=>t.condition.fieldValue=A),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(C,{visible:t.popoverVisible,"onUpdate:visible":n[4]||(n[4]=A=>t.popoverVisible=A),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",ni,[e.createVNode(T,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(A,S)=>(e.openBlock(),e.createBlock(_,{key:S,tab:A.label},{default:e.withCtx(()=>[e.createElementVNode("div",oi,[e.createVNode(y,{value:A.radioValue,"onUpdate:value":I=>A.radioValue=I,onChange:I=>t.changeRadioValue(I,A)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ai,"相对当前时间:"+e.toDisplayString(A.value),1)):(e.openBlock(),e.createElementBlock("div",ri,"相对当前时间:"+e.toDisplayString(t.getFieldValue(S)),1)),e.createVNode(k,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(h,{value:A.beforeNum,"onUpdate:value":I=>A.beforeNum=I,min:0,onBlur:I=>t.blurCompare(I,A,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",li,e.toDisplayString(A.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(k,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(h,{value:A.afterNum,"onUpdate:value":I=>A.afterNum=I,min:0,onBlur:I=>t.blurCompare(I,A,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ii,e.toDisplayString(A.afterLabel),1)]),_:2},1032,["style"]),A.beforeText?(e.openBlock(),e.createBlock(k,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),A.afterText?(e.openBlock(),e.createBlock(k,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",si,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:n[2]||(n[2]=I=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:I=>t.okDatePickConfig(A,S)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:n[3]||(n[3]=A=>{t.popoverVisible=!0})},[e.createVNode(L)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":n[5]||(n[5]=A=>t.condition.fieldValue=A),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(b,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[6]||(n[6]=A=>t.condition.fieldValue=A)},null,8,["value"])),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const di=Z(Xl,[["render",ci],["__scopeId","data-v-fe7f785d"]]),pi=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:di}}),Kp="",ui={key:0,class:"condition-list"},fi={key:0,class:"condition-container"},mi={key:0,class:"condition-text"},hi={key:1,class:"condition-text"},yi={class:"conditions"};function gi(t,n,o,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",fi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",mi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",hi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",yi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const bi=Z(pi,[["render",gi],["__scopeId","data-v-86c0c5aa"]]),Ci=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:U.Select,AInput:U.Input,AInputNumber:U.InputNumber},setup(t,{emit:n}){const o=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&n("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=ne.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:o,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Xp="",No=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),wi={class:"truncations"},xi={class:"rule"},ki={class:"field-value"},_i={class:"field-value"},Si=No(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ai=No(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ni=["onClick"];function Ti(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",xi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ki,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",_i,[Si,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ai]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ni)]))),128))])}const Li=Z(Ci,[["render",Ti],["__scopeId","data-v-f543c690"]]),Te=(t,n)=>{if(typeof t=="string"&&typeof n=="string")return t.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(n)){const o=n.length;for(let a=0;a<o;a++){const r=n[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},Ei=t=>t.replace(/\\n/g,`
59
+ `),bn=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),At=t=>{const n=[];if(t!=null&&t.length)for(const o of t)o.conditions?n.push(...At(o.conditions)):(o==null?void 0:o.dataType)==="component"&&n.push(o);return n},To=(t,n)=>{var h;const{controlList:o=[],classificationList:a=[],rowHeaderList:r=[],seriesList:l=[],leftAxisList:i=[],rightAxisList:d=[],queryColumnList:s=[],indicators:c=[]}=t,p=[],u=[...a,...r,...l,...i,...d,...s,...c],f=[];for(const k of u){const y=At((k==null?void 0:k.conditions)||[]);if(y!=null&&y.length){const _=y.filter(T=>Lo(T,n)?(T==null?void 0:T.dataType)==="component":!1).map(T=>{const L=Lo(T,n);return{conditionKey:T.fieldName,conditionLabel:T.fieldName,conditionName:T.fieldName,conditionValueType:T.fieldType,id:L.id,keyName:T.fieldValue,rule:T.rule,notGlobal:!0}});if(_!=null&&_.length)for(const T of _)f.find(L=>L.keyName===T.keyName)||f.push(T)}}const m=o.concat(f),w=m.length;for(let k=0;k<w;k++){const y=m[k];if(y&&!((h=Object.keys(y))!=null&&h.length))continue;const{id:_,keyName:T,conditionLabel:L,conditionKey:C,conditionValueType:b,prop:V,rule:A="NONE",notGlobal:S=!1,format:I}=y;let x=T||_;x&&V&&(x+=`-${V}`);const v=n.find(g=>g.id===_),E={rule:A,label:L,fieldName:C,fieldValue:"",valueType:b,alias:x,globalCondition:!S},{value:F,format:P="YYYY-MM-DD",operate:D,type:M="",useCurrentTime:z}=v||{};if(Te(M,"date")){let g;if(z?g=oe():g=oe(F),D&&F){const{mode:N,type:O,value:G}=D;if(G)switch(O){case"add":g=g.add(G,N);break;case"minus":g=g.subtract(G,N);break}}E.fieldValue=(g==null?void 0:g.format(P))||"",E.dateFormat=I||P}else if(M==="ecanRangePicker"&&V){const{interval:g,intervalUnit:N}=v||{};V==="startTime"?E.rule="GREATER_EQUAL":V==="endTime"&&(E.rule="LESS_EQUAL");let O=null;if(z&&(V==="startTime"?O=oe().subtract(g,N):V==="endTime"&&(O=oe())),v[V]&&(O=oe(v[V])),D){const{type:G,value:R,mode:q}=D;switch(G){case"add":O=O&&O.add(R,q);break;case"minus":O=O&&O.subtract(R,q)}}O&&(E.fieldValue=O==null?void 0:O.format(P)),E.dateFormat=I||P}else E.fieldValue=F;p.push(E)}for(let k=p.length-1;k>=0;k--){const y=p[k];y.globalCondition||p.find(T=>T.alias===y.alias&&T.globalCondition)&&p.splice(k,1)}return p},Cn=t=>{let n="";switch(t){case"ecanDatePicker":case"ecanRangePicker":n="dateChange";break;case"ecanTimeDisplay":n="timeChange";break;case"ecanSelect":case"ecanTreeSelect":n="selectChange";break;case"ecanTabs":n="tabChange";break;case"ecanInput":n="inputChange";break;case"ecanCheckbox":case"ecanRadio":n="checkboxChange";break;case"ecanText":n="valueChange";break}return n};function Lo(t,n){var o;if(t.componentId)return n.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(o=t.fieldValue)==null?void 0:o.split("-");return a!=null&&a.length?a[0]:null}else return n.find(a=>a.keyName===t.fieldValue);else return null}let wn=(t=21)=>{let n="",o=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=o[t]&63;a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a<63?n+="_":n+="-"}return n};const Bi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:bi,TruncationList:Li,AModal:U.Modal,AButton:U.Button,ATabs:U.Tabs,ATabPane:U.TabPane},setup(t,{expose:n}){var v;const o=e.ref("1"),a=()=>{var E;return`添加过滤条件-${((E=t.item)==null?void 0:E.label)||""}`},r=e.inject(de),l=e.inject(Oe),i=e.inject(Me),d=e.computed(()=>{var E;return(E=e.unref(r))==null?void 0:E.dataSourceId}),s=e.inject(Pe),c=e.inject(Ht),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,E=>{var F,P,D,M;E&&(Array.isArray((F=t.item)==null?void 0:F.conditions)&&(p.value=ne.cloneDeep((P=t.item)==null?void 0:P.conditions)||[]),Array.isArray((D=t.item)==null?void 0:D.truncations)?u.value=ne.cloneDeep((M=t.item)==null?void 0:M.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!E)},{flush:"post"});let m=!1;const w=E=>{var F;m=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==E?p.value=[{join:E,conditions:[e.unref(p)[0],{keyValue:wn()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===E&&p.value[0].conditions.push({keyValue:wn()}))};e.provide(Un,{updateCondition(E,F,P){var M;m=!0;let D=e.unref(p);for(let z=0;z<F&&D[0];z++)D=(M=D[0])==null?void 0:M.conditions;Array.isArray(D)&&D[P]&&(D[P]=E)},deleteCondition(E,F){var D,M;m=!0;let P=e.unref(p);for(let z=0;z<E&&P[0];z++)P=(D=P[0])==null?void 0:D.conditions;if(Array.isArray(P)&&P[F]&&(P.splice(F,1),P.length===1)){let z=e.unref(p);const g=E-2>0?E-2:0;for(let N=0;N<g&&z[0];N++)z=(M=z[0])==null?void 0:M.conditions;z[0].join===P[0].join?z[0].conditions=[...P[0].conditions,...z[0].conditions.slice(1)]:z[0]=P[0]}}});const h=E=>{m=!0,u.value=E},k=e.computed(()=>{var F;const E=[];return(F=e.unref(i))==null||F.forEach(P=>{const{keyName:D="",id:M="",type:z}=P;z==="ecanRangePicker"?E.push({value:`${M}-startTime`,label:`${D||M}-开始时间值`,keyName:`${D||M}-startTime`},{value:`${M}-endTime`,label:`${D||M}-结束时间值`,keyName:`${D||M}-endTime`}):E.push({value:M,label:`${D||M}`,keyName:`${D||M}`})}),E}),y=()=>{var g,N;const{controlList:E=[]}=e.unref(r),F=((g=e.unref(r)[t.type])==null?void 0:g.slice())||[],P=At(ne.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList"].includes(t.type)&&((N=e.unref(u))!=null&&N.length)&&(F[t.index].truncations=e.unref(u));const D=At(e.unref(p));for(const O of D)if(O.dataType==="component"&&O.fieldValue){const G=e.unref(k).find(R=>R.value===O.fieldValue);G&&(O.fieldValue=G.keyName)}const M=P.filter(O=>!D.find(G=>G.componentId===O.componentId)).filter(O=>!E.find(G=>G.id===O.componentId)),z=D.filter(O=>!P.find(G=>G.componentId===O.componentId));_(M,z),l({[t.type]:F,sqlConditions:To({...e.unref(r),[t.type]:F},e.unref(i))})};function _(E,F){var D;const P=E.map(M=>({...M,delete:!0})).concat(F.map(M=>({...M,add:!0})));for(const M of P){const z=e.unref(i).find(g=>g.id===M.componentId);if(z){const{type:g,id:N,events:O=[]}=z,G=Cn(g);if(M.add)O.find(R=>{var q;return R.on===G&&R.target===((q=e.unref(s))==null?void 0:q.id)&&R.emit==="refreshData"})||c({id:N,events:[...O,{on:G,target:(D=e.unref(s))==null?void 0:D.id,emit:"refreshData"}].reverse()});else if(M.delete){const R=O.findIndex(q=>{var Y;return q.on===G&&q.target===((Y=e.unref(s))==null?void 0:Y.id)&&q.emit==="refreshData"});R!==-1&&(O.splice(R,1),c({id:N,events:O}))}}}}const T=()=>{f.value=!0},L=()=>{p.value=[],f.value=!1},C=()=>{m&&y(),m=!1,L()},b=()=>{L()},V=e.inject(_e),A=e.unref(e.inject(Se)),S=(v=window==null?void 0:window.config)==null?void 0:v.pageId,I=e.ref([]);e.provide(Gn,I);const x=async E=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const P=await V.post(`${ye}/diagram/hrpIndexWithComplex`,{pageId:S,dataSourceId:e.unref(d),hrpIndexGuid:E,indexGuid:E},{headers:{Authentication:A,operateContext:"ygt"}}),{success:D,data:M=[]}=P.data;D&&((F=M==null?void 0:M.dataViewColumns)!=null&&F.length)&&(I.value=M.dataViewColumns)}catch(P){console.error(P)}};return e.watch(()=>t.item,E=>{E&&f.value&&x(E.id)}),n({showModal:T}),{visible:f,onOk:C,onCancel:b,handleTitle:a,conditionList:p,truncationList:u,addCondition:w,onUpdatetruncation:h,activeKey:o}}}),Qp="",Oi={class:"header"},Vi={class:"header"};function Ii(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Oi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[0]||(n[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[1]||(n[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[2]||(n[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Vi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[4]||(n[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[5]||(n[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[6]||(n[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const vi=Z(Bi,[["render",Ii],["__scopeId","data-v-07befcd3"]]),xn=(t,n)=>{let o;for(let a=0;a<n.length;a++){const r=n[a];r.children&&(r.children.some(l=>l.key===t)?o=r.key:xn(t,r.children)&&(o=xn(t,r.children)))}return o},$i=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:U.Row,ACol:U.Col,ATextarea:U.Textarea,APopover:U.Popover,AInputSearch:U.InputSearch,ATree:U.Tree,DoubleRightOutlined:Kr},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(_e),a=e.unref(e.inject(Se)),r=e.inject(de),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const b=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(b==null?void 0:b.filter(V=>V.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:b=>{n("update:value",b),n("change",b)}}),u=e.ref(""),f=b=>{const V=document.getElementById("calTextArea");let A=p.value;if(document.selection){const S=document.selection.createRange();S.text=b}else if(typeof V.selectionStart=="number"&&typeof V.selectionEnd=="number"){const S=V.selectionStart,I=V.selectionEnd;let x=S;A=A.substring(0,S)+b+A.substring(I,A.length),x+=b.length,V.selectionStart=V.selectionEnd=x}else A+=b;p.value=A},m=["+","-","*","/","(",")"],w=(b,V)=>{let A="";switch(V){case"name":{A="${"+b+"}";break}case"function":{A=b+"()";break}default:A=b}f(A)},h=[],k=e.ref([]),y=e.ref(!0),_=e.ref([]),T=b=>{var V;for(const A of b)(V=A==null?void 0:A.children)!=null&&V.length?T(A.children):h.push({key:A.key,title:A.title})},L=async()=>{try{const b=await o.get(`${ye}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:V,data:A=[]}=b.data;V&&(A!=null&&A.length)&&(T(A),_.value=A)}catch(b){console.error(b)}},C=b=>{k.value=b,y.value=!1};return e.watch(u,b=>{const V=h.map(A=>A.title.indexOf(b)>-1?xn(A.key,_.value):null).filter((A,S,I)=>A&&I.indexOf(A)===S);k.value=V,u.value=b,y.value=!0}),e.onMounted(()=>{L()}),{fieldList:c,myValue:p,calculMethods:m,funcDescsData:_,searchFuncValue:u,expandedKeys:k,autoExpandParent:y,selectedElem:w,onExpand:C}}}),Jp="",Zp="",Fi={class:"formula-calculation"},Di={class:"field-area"},Pi=["onClick"],Mi={class:"cal_right_bottom"},ji={class:"cal_fu"},Ri=["onClick"],Ui={class:"function-wrap"},Gi={class:"wrap-search"},zi={class:"tree-box"},Hi={key:0},Wi={style:{color:"#f50"}},qi={key:1},Yi=["onClick"],Ki={class:"cal_a"};function Xi(t,n,o,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Fi,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:h=>t.selectedElem(m.label,"name")},e.toDisplayString(m.label),9,Pi))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":n[0]||(n[0]=m=>t.myValue=m),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Mi,[e.createElementVNode("ul",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(m,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:h=>t.selectedElem(m,"symbol"),key:w},e.toDisplayString(m),9,Ri))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Ui,[e.createElementVNode("div",Gi,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":n[1]||(n[1]=m=>t.searchFuncValue=m),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",zi,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:m,leaf:w})=>[m.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Hi,[e.createTextVNode(e.toDisplayString(m.substr(0,m.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Wi,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(m.substr(m.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",qi,e.toDisplayString(m),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:h=>t.selectedElem(m,"function")},"插入",8,Yi)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Ki,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Qi=Z($i,[["render",Xi],["__scopeId","data-v-1e6dd439"]]),Ji=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Qi,AForm:U.Form,AModal:U.Modal,AFormItem:U.FormItem,AInput:U.Input,ASelect:U.Select,ASelectOption:U.SelectOption,ATextarea:U.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:n}){const o=e.inject(Me),a=e.inject(de),r=e.inject(Oe),l=e.computed(()=>e.unref(o)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const I=["leftAxisList","rightAxisList","queryColumnList","indicators"];let x=[];for(const v of I)Object.prototype.hasOwnProperty.call(e.unref(a),v)&&(x=x.concat(e.unref(a)[v]));return x}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u=e.ref(),f=e.ref(!1),m=e.ref();e.watch(f,I=>{if(I)if(t.mode==="edit"){const{label:x,calcType:v,formula:E,builtInValueSource:F,builtInFormula:P,builtInCalcWay:D}=t.item;m.value={label:x,calcType:v,formula:E,builtInValueSource:F,builtInFormula:P,builtInCalcWay:D}}else t.mode==="add"&&(m.value=ne.cloneDeep(p));else m.value=ne.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!I)},{immediate:!0,deep:!0});let w=!1;const h=()=>{w=!0},k=I=>{const x=e.unref(l).find(v=>v.id===I);x&&(m.value.builtInCalcWay=x.keyName),w=!0},y=()=>{var v;const I=((v=e.unref(a)[t.type])==null?void 0:v.slice())||[],{label:x}=e.unref(m)||{};if(t.mode==="add"){const E=wn();I.push({...e.unref(m),id:E,show:!0,name:x})}else t.mode==="edit"&&(I[t.index]={...I[t.index],...e.unref(m),name:x});r({[t.type]:I})},_=()=>{f.value=!0},T=()=>{f.value=!1},L=async(I,x)=>{if(x==="")return Promise.reject(new Error("请输入指标名"));{const v=e.unref(d).find(E=>E.label===x);return v?v.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},C=e.computed(()=>{let I={label:[{required:!0,validator:L,trigger:"change"}]};return m.value.calcType==="BUILT_IN"&&(I={...I,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),I}),b=()=>{u.value.validate().then(()=>{w&&y(),w=!1,T()})},V=()=>{u.value.clearValidate(),T()},A=()=>{w=!0,e.unref(m).builtInCalcWay=""},S=e.computed(()=>{let I="";const x=e.unref(m).builtInCalcWay,v=e.unref(m).builtInValueSource;if(!v||!x)return I;switch(e.unref(m).builtInFormula){case"BUILT_IN_RANK":{x==="ASC"?I="【"+v+"】由小到大在所有值中的排名":I="【"+v+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{I=`所有【】的
60
+ `,x==="ASC"?I=I+"【"+v+"】由小到大的组内的排名":I=I+"【"+v+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let E="";switch(x){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}I="将所有【"+v+"】"+E;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let E="";switch(I=`所有【】的
61
+ `,x){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}I=I+"将所有【"+v+"】"+E;break}}return I});return n({showModal:_}),{visible:f,onCancel:V,labelCol:s,wrapperCol:c,formState:m,builtInValueSourceList:i,onOK:b,onChange:h,formRules:C,accessLogic:S,formRef:u,onChangeBuiltInFormula:A,componentList:l,onChangeComponent:k}}}),eu="",Zi={key:0,class:"accesstip"};function es(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-form"),m=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(m,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(f,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":n[0]||(n[0]=w=>t.formState.label=w),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":n[2]||(n[2]=w=>t.formState.formula=w),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":n[3]||(n[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":n[4]||(n[4]=w=>t.formState.builtInValueSource=w),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(w,h)=>(e.openBlock(),e.createBlock(s,{key:h,value:w.label,disabled:t.item.label===w.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":n[5]||(n[5]=w=>t.formState.builtInCalcWay=w),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Zi," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":n[6]||(n[6]=w=>t.formState.builtInValueSource=w),onChange:t.onChangeComponent},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.componentList,(w,h)=>(e.openBlock(),e.createBlock(s,{key:h,value:w.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.keyName),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const ts=Z(Ji,[["render",es],["__scopeId","data-v-d21823c3"]]),ns=e.defineComponent({name:"DataConfigCard",directives:{focus:Ao},components:{CalculationModal:ts,FilterModal:vi,CustomGroupModal:Wl,SettingOutlined:hl,DeleteOutlined:Hr,CopyOutlined:Rr,CustomSortModal:Il,PlusOutlined:pl,ACard:U.Card,ACheckbox:U.Checkbox,AInput:U.Input,ADropdown:U.Dropdown,AMenu:U.Menu,ASubMenu:U.SubMenu,AMenuItem:U.MenuItem,AMenuDivider:U.MenuDivider,ASelect:U.Select,Draggable:at},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const n=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],o=e.inject(de),a=e.inject(Oe),r=["leftAxisList","rightAxisList","indicators","queryColumnList"],l=["classificationList","seriesList","rowHeaderList","queryColumnList"],i=e.inject(zt),d=(B={})=>{if(e.unref(i)==="SQL_VIEW")return!0;let $=!1;return B.scope==="IDX"?r.includes(t.type)&&($=!0):["DIM","BUILT_IN_DIM"].includes(B.scope)&&l.includes(t.type)&&($=!0),$},s=(B="{}")=>{var $;try{const j=JSON.parse(B);if(!d(j))return;const W=(($=e.unref(o)[t.type])==null?void 0:$.slice())||[];["classificationList","seriesList"].includes(t.type)&&W.forEach(K=>{K.show=!1}),p(W,j),W.push(j),a({[t.type]:W}),sessionStorage.setItem("indicator-list-item","")}catch(j){console.error(j)}},c=(B="{}")=>{var $;try{const{cardItem:j,type:W,index:K}=JSON.parse(B);if(!d(j)||W===t.type)return;const X=(($=e.unref(o)[t.type])==null?void 0:$.slice())||[];p(X,j),X.push(j);const J=e.unref(o)[W].slice()||[];J.splice(K,1),a({[t.type]:X,[W]:J})}catch(j){console.error(j)}};function p(B,$){const j=[];if(B.forEach(W=>{W.label.includes($.label)&&j.push(W.label.split($.label)[1])}),j.length>=1){for(let W=1;W<=j.length;W++)if(!j.includes(W+"")){$.label=$.label+W;break}}}const u=(B,$)=>{var K,X;const j=(K=B.target)==null?void 0:K.checked,W=((X=e.unref(o)[t.type])==null?void 0:X.slice())||[];["classificationList","seriesList"].includes(t.type)&&W.forEach(J=>{J.show=!1}),W[$].show=j,a({[t.type]:W})},f=B=>{var j;const $=((j=e.unref(o)[t.type])==null?void 0:j.slice())||[];$.splice(B,1),a({[t.type]:$})},m=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const B=sessionStorage.getItem("indicator-list-item"),$=sessionStorage.getItem("indicator-card-item");B?s(B):$&&c($)},h=B=>{var se,he;const{newIndex:$,oldIndex:j,from:W,to:K}=B,X=W.id,J=K.id;if($>=0&&j>=0){if(X===J){const Q=((se=e.unref(o)[t.type])==null?void 0:se.slice())||[],re=Q.splice(j,1)[0];re&&(Q.splice($,0,re),a({[t.type]:Q}))}else if(t.type===J){const Q=((he=e.unref(o)[J])==null?void 0:he.slice())||[];if(Q!=null&&Q.length){const re=Q.splice(Q.length-1,1)[0];re&&(Q.splice($,0,re),a({[t.type]:Q}))}}}},k=(B,$)=>{const j=B.oldIndex,W=$[j];W&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:W,type:t.type,index:j}))},y=e.computed(()=>e.unref(o)[t.type]||[]),_=e.ref([]);let T=!1;e.watch(()=>e.unref(y).length,B=>{_.value=new Array(B).fill(!1)},{flush:"post",immediate:!0});const L=B=>{var j;const $=((j=e.unref(o)[t.type])==null?void 0:j.slice())||[];$.splice(B,1),a({[t.type]:$})},C=B=>{_.value[B]=!0},b=()=>{T=!0},V=(B,$,j)=>{var W,K;if(_.value[$]=!1,T){const X=(W=B.target)==null?void 0:W.value,J=((K=e.unref(o)[t.type])==null?void 0:K.slice())||[],se=J.filter(Q=>{var re;return(re=Q==null?void 0:Q.formula)==null?void 0:re.includes(j)}).map(Q=>Q.id),he=J.filter(Q=>{var re;return(re=Q==null?void 0:Q.builtInValueSource)==null?void 0:re.includes(j)}).map(Q=>Q.id);if(se!=null&&se.length)for(const Q of se){const re=J.find(ot=>ot.id===Q);re.formula=re.formula.replaceAll(j,X)}if(he!=null&&he.length)for(const Q of he){const re=J.find(ot=>ot.id===Q);re.builtInValueSource=re.builtInValueSource.replaceAll(j,X)}J[$].label=X,a({[t.type]:J})}T=!1},A="DEFAULT",S=e.computed(()=>{const B=e.unref(o)[t.type]||[],{leftAxisList:$=[],rightAxisList:j=[],indicators:W=[]}=e.unref(o)||{};return[{id:A,label:"默认",name:"默认"},...B,...$,...j,...W]}),I=(B={},$,j="ASC")=>{var se;const{label:W,name:K,id:X}=B,J=((se=e.unref(o)[t.type])==null?void 0:se.slice())||[];X===A?delete J[$].sort:J[$].sort={label:W,columnName:K,type:"NORMAL",order:j},a({[t.type]:J})},x=(B={},$="ASC")=>{const W={ASC:"升序",DESC:"降序"}[$],{sort:K}=B,{label:X,order:J}=K||{};return X&&J===$?`${W}(${X})`:W},v=e.ref(),E=e.ref(),F=e.ref(),P=e.ref(),D=(B={},$)=>{var j;v.value=B,E.value=$,(j=e.unref(F))==null||j.showModal()},M=B=>{var $;return"自定义排序"+((($=B==null?void 0:B.sort)==null?void 0:$.type)==="CUSTOM"?"(已配置)":"")},z=(B={},$)=>{var j;v.value=B,E.value=$,(j=e.unref(P))==null||j.showModal()},g=B=>"自定义分组"+((B==null?void 0:B.customGroup)!=null?"(已配置)":""),N=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],O=(B,$)=>{var W;const j=((W=e.unref(o)[t.type])==null?void 0:W.slice())||[];j[$].aggregate=B,a({[t.type]:j})},G=(B,$)=>{var W;const j=((W=e.unref(o)[t.type])==null?void 0:W.slice())||[];j[$].dateFormat=B,a({[t.type]:j})},R=(B="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[B]})`,q=(B={})=>{var $;return"过滤"+(B!=null&&B.conditions&&(($=B==null?void 0:B.conditions)==null?void 0:$.length)>0?"(已配置)":"")},Y=e.ref(),ee=(B={},$)=>{v.value=B,E.value=$,e.unref(Y).showModal()},te=e.ref(),ae=e.ref("add"),ie=(B,$,j)=>{var W;ae.value=B,B==="edit"&&(v.value=$,E.value=j),(W=e.unref(te))==null||W.showModal()},le=e.inject(_e),Ne=e.unref(e.inject(Se)),Ge=e.ref([]),ze=e.computed(()=>e.unref(o)[t.type]||{}),tt=async()=>{try{const B=await le.post(`${ye}/diagram/dimFields`,{},{headers:{Authentication:Ne,operateContext:"ygt"}}),{success:$,data:j=[]}=B.data;$&&(Ge.value=j)}catch(B){console.error(B)}},nt=(B,$)=>{const j=e.unref(o)[t.type]||{};j[$]=B,a({[t.type]:j})},$e=e.ref({}),He=async(B,$)=>{var W;const{name:j}=$;if(B&&bn($,"indexCode")&&!bn(e.unref($e),j)){const K=await le.post(`${ye}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:$.id,pageId:(W=window==null?void 0:window.config)==null?void 0:W.pageId},{headers:{Authentication:Ne,operateContext:"ygt"}}),{success:X,data:J=[]}=K.data;X&&($e.value[j]={name:J.name,code:J.indexCode})}},H=B=>{const $=document.createElement("input");document.body.appendChild($),$.setAttribute("value",B),$.select(),document.execCommand("copy"),document.body.removeChild($),U.message.success("复制成功")};return e.onMounted(()=>{t.type==="formFields"&&tt()}),{onCheckboxChange:u,onDropEnd:f,onDragItemEnd:m,onDragItemAdd:w,onDragItemSort:h,onDragItemStart:k,cardItemList:y,onDelete:L,onEdit:C,onCommitLabelChange:V,sortList:S,onSort:I,handleSortTitle:x,showCustomSortModal:D,customSortModalRef:F,currentItem:v,currentIndex:E,handleCustomSortTitle:M,handleCustomGroupTitle:g,customGroupModalRef:P,showCustomGroupModal:z,editLabelList:_,onLabelChange:b,aggregateList:N,onAggregateChange:O,onDateFormatChange:G,handleAggregateTitle:R,onShowCalculationModal:ie,handleFilterTitle:q,filterModalRef:Y,showFilterModal:ee,calculationModalRef:te,calculationModalMode:ae,formatList:n,fieldOptions:Ge,fieldData:ze,onFieldChange:nt,onVisibleChange:He,copyDataViewName:H,dataViewMap:$e}}}),tu="",nu="",st=t=>(e.pushScopeId("data-v-20b15da6"),t=t(),e.popScopeId(),t),os={class:"title"},as={class:"title-text"},rs={class:"field-wrap"},ls={class:"field-item"},is=st(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),ss={class:"field-item"},cs=st(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),ds={class:"title"},ps={class:"title-text"},us=st(()=>e.createElementVNode("span",null,"添加计算指标",-1)),fs={class:"card-item-wrap"},ms={class:"card-item-inner"},hs=["onClick"],ys=["onClick"],gs=["onClick"],bs={style:{display:"flex","align-items":"center"}},Cs=["title"],ws=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),xs={style:{display:"flex","align-items":"center"}},ks=["title"],_s=st(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Ss(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("plus-outlined"),c=e.resolveComponent("a-input"),p=e.resolveComponent("setting-outlined"),u=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-sub-menu"),m=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("copy-outlined"),h=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),y=e.resolveComponent("delete-outlined"),_=e.resolveComponent("a-checkbox"),T=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),C=e.resolveComponent("custom-group-modal"),b=e.resolveComponent("filter-modal"),V=e.resolveComponent("calculation-modal"),A=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",os,[e.createElementVNode("div",as,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",rs,[e.createElementVNode("div",ls,[is,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:n[0]||(n[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",ss,[cs,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:n[1]||(n[1]=S=>t.onFieldChange(S,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createElementVNode("div",ps,e.toDisplayString(t.title),1),["classificationList","seriesList","rowHeaderList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[2]||(n[2]=e.withModifiers(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(s,{class:"add-calculation-icon"}),us]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(T,{modelValue:t.cardItemList,"onUpdate:modelValue":n[3]||(n[3]=S=>t.cardItemList=S),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:n[4]||(n[4]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:I})=>[e.createElementVNode("div",fs,[e.createVNode(_,{class:"card-item",checked:S.show,onChange:x=>t.onCheckboxChange(x,I)},{default:e.withCtx(()=>[e.createElementVNode("div",ms,[!t.editLabelList[I]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(x=>t.onEdit(I),["prevent","stop"])},e.toDisplayString(S.label),9,hs)):e.createCommentVNode("",!0),!t.editLabelList[I]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(x=>t.onEdit(I),["prevent","stop"])}," 请点击填入名字 ",8,ys)):e.createCommentVNode("",!0),t.editLabelList[I]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:2,"default-value":S.label,size:"small",onBlur:x=>t.onCommitLabelChange(x,I,S.label),onPressEnter:x=>t.onCommitLabelChange(x,I,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[A]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(x=>t.onShowCalculationModal("edit",S,I),["prevent","stop"])}," fx ",8,gs)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:x=>t.onVisibleChange(x,S)},{overlay:e.withCtx(()=>[e.createVNode(h,null,{default:e.withCtx(()=>[["classificationList","seriesList","rowHeaderList"].includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,x=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:x.id,onClick:v=>t.onSort(x,I,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,x=>(e.openBlock(),e.createBlock(u,{class:"menu-item",style:{"white-space":"nowrap"},key:x.id,onClick:v=>t.onSort(x,I,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(u,{onClick:x=>t.showCustomSortModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(m),e.createVNode(u,{onClick:x=>t.showCustomGroupModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(m),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,x=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:x.value,onClick:v=>t.onDateFormatChange(x.value,I)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===x.value||!S.dateFormat&&x.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(x.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(m)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(u,{onClick:x=>t.showFilterModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(m),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,x=>(e.openBlock(),e.createBlock(u,{style:{"white-space":"nowrap"},key:x.value,onClick:v=>t.onAggregateChange(x.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(m)],64)),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(u,{key:2,onClick:x=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[ws,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,Cs),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(u,{key:3,onClick:x=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[_s,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,ks),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(p,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(y,{class:"delete-icon",onClick:e.withModifiers(x=>t.onDelete(I),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(C,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(b,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const As=Z(ns,[["render",Ss],["__scopeId","data-v-20b15da6"]]),Ns={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"数据"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"}},Ts=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:As},setup(){const t=e.inject(Pe),n=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),o=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Oe),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var k,y;const s=ne.cloneDeep((k=e.unref(t))==null?void 0:k.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:o.value?["rowHeaderList","indicators"]:["queryColumnList"],text:["indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"]},u="ecan";let f=e.unref(n);if(f.startsWith(u)){const _=u.length;f=((y=f.slice(_,_+1))==null?void 0:y.toLowerCase())+f.slice(_+1)}const m=p[f],w=Ns,h=(m==null?void 0:m.length)||0;for(let _=0;_<h;_++){const T=m[_];if(!T)break;r.push({...w[T],type:T})}for(const _ of c)i(s,_)&&!m.find(T=>T===_)&&(s[_]=[]);l(s)})(),{cardsMap:a,cards:r}}}),ou="",au="",Ls={class:"data-group"};function Es(t,n,o,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Bs=Z(Ts,[["render",Es],["__scopeId","data-v-603b1b70"]]),Os=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Vs={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},Is=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:U.Input},emits:["change"],setup(t,{emit:n}){return{onInputChange:a=>{n("change",a.target.value)}}}});function vs(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const $s=Z(Is,[["render",vs]]),Fs=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:U.InputNumber,ASelect:U.Select,ASelectOption:U.SelectOption},emits:["change"],setup(t,{emit:n}){const o=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:o,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?n("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?n("change",u):n("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&n("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Ds(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":n[0]||(n[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":n[1]||(n[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Eo=Z(Fs,[["render",Ds]]),Ps=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:U.RadioGroup,ARadioButton:U.RadioButton},emits:["change"],setup(t,{emit:n}){return{onRadioChange:a=>{n("change",a.target.value)}}}});function Ms(t,n,o,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const js=Z(Ps,[["render",Ms]]),Rs=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:U.Select,ASelectOption:U.SelectOption},emits:["change"],setup(t,{emit:n}){return{onSelectChange:a=>{n("change",a)}}}});function Us(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const Gs=Z(Rs,[["render",Us]]),zs=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:U.Switch},emit:["change"],setup(t,{emit:n}){return{onSwitchChange:a=>{n("change",a)}}}});function Hs(t,n,o,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Ws=Z(zs,[["render",Hs]]);var pe="top",Ce="bottom",we="right",ue="left",kn="auto",ct=[pe,Ce,we,ue],Ye="start",dt="end",qs="clippingParents",Bo="viewport",pt="popper",Ys="reference",Oo=ct.reduce(function(t,n){return t.concat([n+"-"+Ye,n+"-"+dt])},[]),Vo=[].concat(ct,[kn]).reduce(function(t,n){return t.concat([n,n+"-"+Ye,n+"-"+dt])},[]),Ks="beforeRead",Xs="read",Qs="afterRead",Js="beforeMain",Zs="main",ec="afterMain",tc="beforeWrite",nc="write",oc="afterWrite",ac=[Ks,Xs,Qs,Js,Zs,ec,tc,nc,oc];function Le(t){return t?(t.nodeName||"").toLowerCase():null}function me(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function je(t){var n=me(t).Element;return t instanceof n||t instanceof Element}function xe(t){var n=me(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function _n(t){if(typeof ShadowRoot>"u")return!1;var n=me(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function rc(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},l=n.elements[o];!xe(l)||!Le(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function lc(t){var n=t.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(a){var r=n.elements[a],l=n.attributes[a]||{},i=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!xe(r)||!Le(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const ic={name:"applyStyles",enabled:!0,phase:"write",fn:rc,effect:lc,requires:["computeStyles"]};function Ee(t){return t.split("-")[0]}var Re=Math.max,Nt=Math.min,Ke=Math.round;function Sn(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Io(){return!/^((?!chrome|android).)*safari/i.test(Sn())}function Xe(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,l=1;n&&xe(t)&&(r=t.offsetWidth>0&&Ke(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&Ke(a.height)/t.offsetHeight||1);var i=je(t)?me(t):window,d=i.visualViewport,s=!Io()&&o,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function An(t){var n=Xe(t),o=t.offsetWidth,a=t.offsetHeight;return Math.abs(n.width-o)<=1&&(o=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:a}}function vo(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&_n(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Ie(t){return me(t).getComputedStyle(t)}function sc(t){return["table","td","th"].indexOf(Le(t))>=0}function De(t){return((je(t)?t.ownerDocument:t.document)||window.document).documentElement}function Tt(t){return Le(t)==="html"?t:t.assignedSlot||t.parentNode||(_n(t)?t.host:null)||De(t)}function $o(t){return!xe(t)||Ie(t).position==="fixed"?null:t.offsetParent}function cc(t){var n=/firefox/i.test(Sn()),o=/Trident/i.test(Sn());if(o&&xe(t)){var a=Ie(t);if(a.position==="fixed")return null}var r=Tt(t);for(_n(r)&&(r=r.host);xe(r)&&["html","body"].indexOf(Le(r))<0;){var l=Ie(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||n&&l.willChange==="filter"||n&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function ut(t){for(var n=me(t),o=$o(t);o&&sc(o)&&Ie(o).position==="static";)o=$o(o);return o&&(Le(o)==="html"||Le(o)==="body"&&Ie(o).position==="static")?n:o||cc(t)||n}function Nn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ft(t,n,o){return Re(t,Nt(n,o))}function dc(t,n,o){var a=ft(t,n,o);return a>o?o:a}function Fo(){return{top:0,right:0,bottom:0,left:0}}function Do(t){return Object.assign({},Fo(),t)}function Po(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var pc=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,Do(typeof n!="number"?n:Po(n,ct))};function uc(t){var n,o=t.state,a=t.name,r=t.options,l=o.elements.arrow,i=o.modifiersData.popperOffsets,d=Ee(o.placement),s=Nn(d),c=[ue,we].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=pc(r.padding,o),f=An(l),m=s==="y"?pe:ue,w=s==="y"?Ce:we,h=o.rects.reference[p]+o.rects.reference[s]-i[s]-o.rects.popper[p],k=i[s]-o.rects.reference[s],y=ut(l),_=y?s==="y"?y.clientHeight||0:y.clientWidth||0:0,T=h/2-k/2,L=u[m],C=_-f[p]-u[w],b=_/2-f[p]/2+T,V=ft(L,b,C),A=s;o.modifiersData[a]=(n={},n[A]=V,n.centerOffset=V-b,n)}}function fc(t){var n=t.state,o=t.options,a=o.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||vo(n.elements.popper,r)&&(n.elements.arrow=r))}const mc={name:"arrow",enabled:!0,phase:"main",fn:uc,effect:fc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qe(t){return t.split("-")[1]}var hc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yc(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:Ke(o*r)/r||0,y:Ke(a*r)/r||0}}function Mo(t){var n,o=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,m=f===void 0?0:f,w=i.y,h=w===void 0?0:w,k=typeof p=="function"?p({x:m,y:h}):{x:m,y:h};m=k.x,h=k.y;var y=i.hasOwnProperty("x"),_=i.hasOwnProperty("y"),T=ue,L=pe,C=window;if(c){var b=ut(o),V="clientHeight",A="clientWidth";if(b===me(o)&&(b=De(o),Ie(b).position!=="static"&&d==="absolute"&&(V="scrollHeight",A="scrollWidth")),b=b,r===pe||(r===ue||r===we)&&l===dt){L=Ce;var S=u&&b===C&&C.visualViewport?C.visualViewport.height:b[V];h-=S-a.height,h*=s?1:-1}if(r===ue||(r===pe||r===Ce)&&l===dt){T=we;var I=u&&b===C&&C.visualViewport?C.visualViewport.width:b[A];m-=I-a.width,m*=s?1:-1}}var x=Object.assign({position:d},c&&hc),v=p===!0?yc({x:m,y:h},me(o)):{x:m,y:h};if(m=v.x,h=v.y,s){var E;return Object.assign({},x,(E={},E[L]=_?"0":"",E[T]=y?"0":"",E.transform=(C.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",E))}return Object.assign({},x,(n={},n[L]=_?h+"px":"",n[T]=y?m+"px":"",n.transform="",n))}function gc(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,l=o.adaptive,i=l===void 0?!0:l,d=o.roundOffsets,s=d===void 0?!0:d,c={placement:Ee(n.placement),variation:Qe(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Mo(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:s})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Mo(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const bc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gc,data:{}};var Lt={passive:!0};function Cc(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=me(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",o.update,Lt)}),d&&s.addEventListener("resize",o.update,Lt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",o.update,Lt)}),d&&s.removeEventListener("resize",o.update,Lt)}}const wc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cc,data:{}};var xc={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(t){return t.replace(/left|right|bottom|top/g,function(n){return xc[n]})}var kc={start:"end",end:"start"};function jo(t){return t.replace(/start|end/g,function(n){return kc[n]})}function Tn(t){var n=me(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function Ln(t){return Xe(De(t)).left+Tn(t).scrollLeft}function _c(t,n){var o=me(t),a=De(t),r=o.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Io();(c||!c&&n==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Ln(t),y:s}}function Sc(t){var n,o=De(t),a=Tn(t),r=(n=t.ownerDocument)==null?void 0:n.body,l=Re(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Re(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Ln(t),s=-a.scrollTop;return Ie(r||o).direction==="rtl"&&(d+=Re(o.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function En(t){var n=Ie(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function Ro(t){return["html","body","#document"].indexOf(Le(t))>=0?t.ownerDocument.body:xe(t)&&En(t)?t:Ro(Tt(t))}function mt(t,n){var o;n===void 0&&(n=[]);var a=Ro(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),l=me(a),i=r?[l].concat(l.visualViewport||[],En(a)?a:[]):a,d=n.concat(i);return r?d:d.concat(mt(Tt(i)))}function Bn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ac(t,n){var o=Xe(t,!1,n==="fixed");return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}function Uo(t,n,o){return n===Bo?Bn(_c(t,o)):je(n)?Ac(n,o):Bn(Sc(De(t)))}function Nc(t){var n=mt(Tt(t)),o=["absolute","fixed"].indexOf(Ie(t).position)>=0,a=o&&xe(t)?ut(t):t;return je(a)?n.filter(function(r){return je(r)&&vo(r,a)&&Le(r)!=="body"}):[]}function Tc(t,n,o,a){var r=n==="clippingParents"?Nc(t):[].concat(n),l=[].concat(r,[o]),i=l[0],d=l.reduce(function(s,c){var p=Uo(t,c,a);return s.top=Re(p.top,s.top),s.right=Nt(p.right,s.right),s.bottom=Nt(p.bottom,s.bottom),s.left=Re(p.left,s.left),s},Uo(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Go(t){var n=t.reference,o=t.element,a=t.placement,r=a?Ee(a):null,l=a?Qe(a):null,i=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,s;switch(r){case pe:s={x:i,y:n.y-o.height};break;case Ce:s={x:i,y:n.y+n.height};break;case we:s={x:n.x+n.width,y:d};break;case ue:s={x:n.x-o.width,y:d};break;default:s={x:n.x,y:n.y}}var c=r?Nn(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case Ye:s[c]=s[c]-(n[p]/2-o[p]/2);break;case dt:s[c]=s[c]+(n[p]/2-o[p]/2);break}}return s}function ht(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,l=o.strategy,i=l===void 0?t.strategy:l,d=o.boundary,s=d===void 0?qs:d,c=o.rootBoundary,p=c===void 0?Bo:c,u=o.elementContext,f=u===void 0?pt:u,m=o.altBoundary,w=m===void 0?!1:m,h=o.padding,k=h===void 0?0:h,y=Do(typeof k!="number"?k:Po(k,ct)),_=f===pt?Ys:pt,T=t.rects.popper,L=t.elements[w?_:f],C=Tc(je(L)?L:L.contextElement||De(t.elements.popper),s,p,i),b=Xe(t.elements.reference),V=Go({reference:b,element:T,strategy:"absolute",placement:r}),A=Bn(Object.assign({},T,V)),S=f===pt?A:b,I={top:C.top-S.top+y.top,bottom:S.bottom-C.bottom+y.bottom,left:C.left-S.left+y.left,right:S.right-C.right+y.right},x=t.modifiersData.offset;if(f===pt&&x){var v=x[r];Object.keys(I).forEach(function(E){var F=[we,Ce].indexOf(E)>=0?1:-1,P=[pe,Ce].indexOf(E)>=0?"y":"x";I[E]+=v[P]*F})}return I}function Lc(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,l=o.rootBoundary,i=o.padding,d=o.flipVariations,s=o.allowedAutoPlacements,c=s===void 0?Vo:s,p=Qe(a),u=p?d?Oo:Oo.filter(function(w){return Qe(w)===p}):ct,f=u.filter(function(w){return c.indexOf(w)>=0});f.length===0&&(f=u);var m=f.reduce(function(w,h){return w[h]=ht(t,{placement:h,boundary:r,rootBoundary:l,padding:i})[Ee(h)],w},{});return Object.keys(m).sort(function(w,h){return m[w]-m[h]})}function Ec(t){if(Ee(t)===kn)return[];var n=Et(t);return[jo(t),n,jo(n)]}function Bc(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!0:i,s=o.fallbackPlacements,c=o.padding,p=o.boundary,u=o.rootBoundary,f=o.altBoundary,m=o.flipVariations,w=m===void 0?!0:m,h=o.allowedAutoPlacements,k=n.options.placement,y=Ee(k),_=y===k,T=s||(_||!w?[Et(k)]:Ec(k)),L=[k].concat(T).reduce(function(q,Y){return q.concat(Ee(Y)===kn?Lc(n,{placement:Y,boundary:p,rootBoundary:u,padding:c,flipVariations:w,allowedAutoPlacements:h}):Y)},[]),C=n.rects.reference,b=n.rects.popper,V=new Map,A=!0,S=L[0],I=0;I<L.length;I++){var x=L[I],v=Ee(x),E=Qe(x)===Ye,F=[pe,Ce].indexOf(v)>=0,P=F?"width":"height",D=ht(n,{placement:x,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),M=F?E?we:ue:E?Ce:pe;C[P]>b[P]&&(M=Et(M));var z=Et(M),g=[];if(l&&g.push(D[v]<=0),d&&g.push(D[M]<=0,D[z]<=0),g.every(function(q){return q})){S=x,A=!1;break}V.set(x,g)}if(A)for(var N=w?3:1,O=function(Y){var ee=L.find(function(te){var ae=V.get(te);if(ae)return ae.slice(0,Y).every(function(ie){return ie})});if(ee)return S=ee,"break"},G=N;G>0;G--){var R=O(G);if(R==="break")break}n.placement!==S&&(n.modifiersData[a]._skip=!0,n.placement=S,n.reset=!0)}}const Oc={name:"flip",enabled:!0,phase:"main",fn:Bc,requiresIfExists:["offset"],data:{_skip:!1}};function zo(t,n,o){return o===void 0&&(o={x:0,y:0}),{top:t.top-n.height-o.y,right:t.right-n.width+o.x,bottom:t.bottom-n.height+o.y,left:t.left-n.width-o.x}}function Ho(t){return[pe,we,Ce,ue].some(function(n){return t[n]>=0})}function Vc(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,l=n.modifiersData.preventOverflow,i=ht(n,{elementContext:"reference"}),d=ht(n,{altBoundary:!0}),s=zo(i,a),c=zo(d,r,l),p=Ho(s),u=Ho(c);n.modifiersData[o]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const Ic={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Vc};function vc(t,n,o){var a=Ee(t),r=[ue,pe].indexOf(a)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ue,we].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function $c(t){var n=t.state,o=t.options,a=t.name,r=o.offset,l=r===void 0?[0,0]:r,i=Vo.reduce(function(p,u){return p[u]=vc(u,n.rects,l),p},{}),d=i[n.placement],s=d.x,c=d.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=s,n.modifiersData.popperOffsets.y+=c),n.modifiersData[a]=i}const Fc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$c};function Dc(t){var n=t.state,o=t.name;n.modifiersData[o]=Go({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const Pc={name:"popperOffsets",enabled:!0,phase:"read",fn:Dc,data:{}};function Mc(t){return t==="x"?"y":"x"}function jc(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!1:i,s=o.boundary,c=o.rootBoundary,p=o.altBoundary,u=o.padding,f=o.tether,m=f===void 0?!0:f,w=o.tetherOffset,h=w===void 0?0:w,k=ht(n,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),y=Ee(n.placement),_=Qe(n.placement),T=!_,L=Nn(y),C=Mc(L),b=n.modifiersData.popperOffsets,V=n.rects.reference,A=n.rects.popper,S=typeof h=="function"?h(Object.assign({},n.rects,{placement:n.placement})):h,I=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),x=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,v={x:0,y:0};if(b){if(l){var E,F=L==="y"?pe:ue,P=L==="y"?Ce:we,D=L==="y"?"height":"width",M=b[L],z=M+k[F],g=M-k[P],N=m?-A[D]/2:0,O=_===Ye?V[D]:A[D],G=_===Ye?-A[D]:-V[D],R=n.elements.arrow,q=m&&R?An(R):{width:0,height:0},Y=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:Fo(),ee=Y[F],te=Y[P],ae=ft(0,V[D],q[D]),ie=T?V[D]/2-N-ae-ee-I.mainAxis:O-ae-ee-I.mainAxis,le=T?-V[D]/2+N+ae+te+I.mainAxis:G+ae+te+I.mainAxis,Ne=n.elements.arrow&&ut(n.elements.arrow),Ge=Ne?L==="y"?Ne.clientTop||0:Ne.clientLeft||0:0,ze=(E=x==null?void 0:x[L])!=null?E:0,tt=M+ie-ze-Ge,nt=M+le-ze,$e=ft(m?Nt(z,tt):z,M,m?Re(g,nt):g);b[L]=$e,v[L]=$e-M}if(d){var He,H=L==="x"?pe:ue,B=L==="x"?Ce:we,$=b[C],j=C==="y"?"height":"width",W=$+k[H],K=$-k[B],X=[pe,ue].indexOf(y)!==-1,J=(He=x==null?void 0:x[C])!=null?He:0,se=X?W:$-V[j]-A[j]-J+I.altAxis,he=X?$+V[j]+A[j]-J-I.altAxis:K,Q=m&&X?dc(se,$,he):ft(m?se:W,$,m?he:K);b[C]=Q,v[C]=Q-$}n.modifiersData[a]=v}}const Rc={name:"preventOverflow",enabled:!0,phase:"main",fn:jc,requiresIfExists:["offset"]};function Uc(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Gc(t){return t===me(t)||!xe(t)?Tn(t):Uc(t)}function zc(t){var n=t.getBoundingClientRect(),o=Ke(n.width)/t.offsetWidth||1,a=Ke(n.height)/t.offsetHeight||1;return o!==1||a!==1}function Hc(t,n,o){o===void 0&&(o=!1);var a=xe(n),r=xe(n)&&zc(n),l=De(n),i=Xe(t,r,o),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!o)&&((Le(n)!=="body"||En(l))&&(d=Gc(n)),xe(n)?(s=Xe(n,!0),s.x+=n.clientLeft,s.y+=n.clientTop):l&&(s.x=Ln(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Wc(t){var n=new Map,o=new Set,a=[];t.forEach(function(l){n.set(l.name,l)});function r(l){o.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!o.has(d)){var s=n.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){o.has(l.name)||r(l)}),a}function qc(t){var n=Wc(t);return ac.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function Yc(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function Kc(t){var n=t.reduce(function(o,a){var r=o[a.name];return o[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,o},{});return Object.keys(n).map(function(o){return n[o]})}var Wo={placement:"bottom",modifiers:[],strategy:"absolute"};function qo(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Xc(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,l=r===void 0?Wo:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wo,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,m={state:p,setOptions:function(y){var _=typeof y=="function"?y(p.options):y;h(),p.options=Object.assign({},l,p.options,_),p.scrollParents={reference:je(d)?mt(d):d.contextElement?mt(d.contextElement):[],popper:mt(s)};var T=qc(Kc([].concat(a,p.options.modifiers)));return p.orderedModifiers=T.filter(function(L){return L.enabled}),w(),m.update()},forceUpdate:function(){if(!f){var y=p.elements,_=y.reference,T=y.popper;if(qo(_,T)){p.rects={reference:Hc(_,ut(T),p.options.strategy==="fixed"),popper:An(T)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(I){return p.modifiersData[I.name]=Object.assign({},I.data)});for(var L=0;L<p.orderedModifiers.length;L++){if(p.reset===!0){p.reset=!1,L=-1;continue}var C=p.orderedModifiers[L],b=C.fn,V=C.options,A=V===void 0?{}:V,S=C.name;typeof b=="function"&&(p=b({state:p,options:A,name:S,instance:m})||p)}}}},update:Yc(function(){return new Promise(function(k){m.forceUpdate(),k(p)})}),destroy:function(){h(),f=!0}};if(!qo(d,s))return m;m.setOptions(c).then(function(k){!f&&c.onFirstUpdate&&c.onFirstUpdate(k)});function w(){p.orderedModifiers.forEach(function(k){var y=k.name,_=k.options,T=_===void 0?{}:_,L=k.effect;if(typeof L=="function"){var C=L({state:p,name:y,instance:m,options:T}),b=function(){};u.push(C||b)}})}function h(){u.forEach(function(k){return k()}),u=[]}return m}}var Qc=[wc,Pc,bc,ic,Fc,Oc,Rc,mc,Ic],Jc=Xc({defaultModifiers:Qc});function On(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function Yo(t,n){if(t){if(typeof t=="string")return On(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?On(t,n):void 0}}function Zc(t){return function(n){if(Array.isArray(n))return On(n)}(t)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(t)||Yo(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Je(t){return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Je(t)}function Ko(t,n,o,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void o(c)}d.done?n(s):Promise.resolve(s).then(a,r)}function Xo(t){return function(){var n=this,o=arguments;return new Promise(function(a,r){var l=t.apply(n,o);function i(s){Ko(l,a,r,i,d,"next",s)}function d(s){Ko(l,a,r,i,d,"throw",s)}i(void 0)})}}var Qo={exports:{}},Jo={exports:{}};(function(t){function n(o){return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(Jo),function(t){var n=Jo.exports.default;function o(){t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(g,N,O){g[N]=O.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(g,N,O){return Object.defineProperty(g,N,{value:O,enumerable:!0,configurable:!0,writable:!0}),g[N]}try{f({},"")}catch{f=function(N,O,G){return N[O]=G}}function m(g,N,O,G){var R=N&&N.prototype instanceof L?N:L,q=Object.create(R.prototype),Y=new M(G||[]);return d(q,"_invoke",{value:E(g,O,Y)}),q}function w(g,N,O){try{return{type:"normal",arg:g.call(N,O)}}catch(G){return{type:"throw",arg:G}}}r.wrap=m;var h="suspendedStart",k="suspendedYield",y="executing",_="completed",T={};function L(){}function C(){}function b(){}var V={};f(V,c,function(){return this});var A=Object.getPrototypeOf,S=A&&A(A(z([])));S&&S!==l&&i.call(S,c)&&(V=S);var I=b.prototype=L.prototype=Object.create(V);function x(g){["next","throw","return"].forEach(function(N){f(g,N,function(O){return this._invoke(N,O)})})}function v(g,N){function O(R,q,Y,ee){var te=w(g[R],g,q);if(te.type!=="throw"){var ae=te.arg,ie=ae.value;return ie&&n(ie)=="object"&&i.call(ie,"__await")?N.resolve(ie.__await).then(function(le){O("next",le,Y,ee)},function(le){O("throw",le,Y,ee)}):N.resolve(ie).then(function(le){ae.value=le,Y(ae)},function(le){return O("throw",le,Y,ee)})}ee(te.arg)}var G;d(this,"_invoke",{value:function(R,q){function Y(){return new N(function(ee,te){O(R,q,ee,te)})}return G=G?G.then(Y,Y):Y()}})}function E(g,N,O){var G=h;return function(R,q){if(G===y)throw new Error("Generator is already running");if(G===_){if(R==="throw")throw q;return{value:a,done:!0}}for(O.method=R,O.arg=q;;){var Y=O.delegate;if(Y){var ee=F(Y,O);if(ee){if(ee===T)continue;return ee}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(G===h)throw G=_,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);G=y;var te=w(g,N,O);if(te.type==="normal"){if(G=O.done?_:k,te.arg===T)continue;return{value:te.arg,done:O.done}}te.type==="throw"&&(G=_,O.method="throw",O.arg=te.arg)}}}function F(g,N){var O=N.method,G=g.iterator[O];if(G===a)return N.delegate=null,O==="throw"&&g.iterator.return&&(N.method="return",N.arg=a,F(g,N),N.method==="throw")||O!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+O+"' method")),T;var R=w(G,g.iterator,N.arg);if(R.type==="throw")return N.method="throw",N.arg=R.arg,N.delegate=null,T;var q=R.arg;return q?q.done?(N[g.resultName]=q.value,N.next=g.nextLoc,N.method!=="return"&&(N.method="next",N.arg=a),N.delegate=null,T):q:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,T)}function P(g){var N={tryLoc:g[0]};1 in g&&(N.catchLoc=g[1]),2 in g&&(N.finallyLoc=g[2],N.afterLoc=g[3]),this.tryEntries.push(N)}function D(g){var N=g.completion||{};N.type="normal",delete N.arg,g.completion=N}function M(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(P,this),this.reset(!0)}function z(g){if(g||g===""){var N=g[c];if(N)return N.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var O=-1,G=function R(){for(;++O<g.length;)if(i.call(g,O))return R.value=g[O],R.done=!1,R;return R.value=a,R.done=!0,R};return G.next=G}}throw new TypeError(n(g)+" is not iterable")}return C.prototype=b,d(I,"constructor",{value:b,configurable:!0}),d(b,"constructor",{value:C,configurable:!0}),C.displayName=f(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(g){var N=typeof g=="function"&&g.constructor;return!!N&&(N===C||(N.displayName||N.name)==="GeneratorFunction")},r.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,b):(g.__proto__=b,f(g,u,"GeneratorFunction")),g.prototype=Object.create(I),g},r.awrap=function(g){return{__await:g}},x(v.prototype),f(v.prototype,p,function(){return this}),r.AsyncIterator=v,r.async=function(g,N,O,G,R){R===void 0&&(R=Promise);var q=new v(m(g,N,O,G),R);return r.isGeneratorFunction(N)?q:q.next().then(function(Y){return Y.done?Y.value:q.next()})},x(I),f(I,u,"Generator"),f(I,c,function(){return this}),f(I,"toString",function(){return"[object Generator]"}),r.keys=function(g){var N=Object(g),O=[];for(var G in N)O.push(G);return O.reverse(),function R(){for(;O.length;){var q=O.pop();if(q in N)return R.value=q,R.done=!1,R}return R.done=!0,R}},r.values=z,M.prototype={constructor:M,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(D),!g)for(var N in this)N.charAt(0)==="t"&&i.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=a)},stop:function(){this.done=!0;var g=this.tryEntries[0].completion;if(g.type==="throw")throw g.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var N=this;function O(te,ae){return q.type="throw",q.arg=g,N.next=te,ae&&(N.method="next",N.arg=a),!!ae}for(var G=this.tryEntries.length-1;G>=0;--G){var R=this.tryEntries[G],q=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var Y=i.call(R,"catchLoc"),ee=i.call(R,"finallyLoc");if(Y&&ee){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(Y){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!ee)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(g,N){for(var O=this.tryEntries.length-1;O>=0;--O){var G=this.tryEntries[O];if(G.tryLoc<=this.prev&&i.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var R=G;break}}R&&(g==="break"||g==="continue")&&R.tryLoc<=N&&N<=R.finallyLoc&&(R=null);var q=R?R.completion:{};return q.type=g,q.arg=N,R?(this.method="next",this.next=R.finallyLoc,T):this.complete(q)},complete:function(g,N){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&N&&(this.next=N),T},finish:function(g){for(var N=this.tryEntries.length-1;N>=0;--N){var O=this.tryEntries[N];if(O.finallyLoc===g)return this.complete(O.completion,O.afterLoc),D(O),T}},catch:function(g){for(var N=this.tryEntries.length-1;N>=0;--N){var O=this.tryEntries[N];if(O.tryLoc===g){var G=O.completion;if(G.type==="throw"){var R=G.arg;D(O)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(g,N,O){return this.delegate={iterator:z(g),resultName:N,nextLoc:O},this.method==="next"&&(this.arg=a),T}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}(Qo);var Bt=Qo.exports(),Ot=Bt;try{regeneratorRuntime=Bt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Bt:Function("r","regeneratorRuntime = r")(Bt)}function ed(t){var n=function(o,a){if(Je(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var l=r.call(o,a||"default");if(Je(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}(t,"string");return Je(n)==="symbol"?n:String(n)}function Vn(t,n,o){return(n=ed(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Vt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,m=u-d;f<0&&(f=0),m<0&&(m=0),f>t.size&&(f=t.size),m>t.size&&(m=t.size);var w=f/t.size*100,h=100-m/t.size*100;o("change",w,h)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Zo=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},td=Zo(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),nd=Zo(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function ve(t,n){n===void 0&&(n={});var o=n.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",o==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}ve(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Vt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[td,nd,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Vt.__scopeId="data-v-24517fec",Vt.__file="src/picker/Saturation.vue";var It=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;o("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),od={ref:"canvas"};ve(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),It.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",od,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},It.__scopeId="data-v-78b9f4f0",It.__file="src/picker/Hue.vue";var vt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));o("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ad={ref:"canvas"};ve(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),vt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",ad,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},vt.__scopeId="data-v-24dc9656",vt.__file="src/picker/Alpha.vue";var $t=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,n){var o=n.emit;return{onInput:function(a){var r;o("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){o("focus")},onBlur:function(){o("blur")},onEnter:function(){o("enter")}}}}),rd={class:"input"},ld={class:"label"},id=[".value"];function yt(t,n){return function(o){if(Array.isArray(o))return o}(t)||function(o,a){var r=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(o)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,n)||Yo(t,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
63
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ea(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function ke(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ea(Object(o),!0).forEach(function(a){Vn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ea(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}ve(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),$t.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",rd,[e.createElementVNode("span",ld,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:n[0]||(n[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:n[1]||(n[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:n[2]||(n[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:n[3]||(n[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,id)])},$t.__scopeId="data-v-d52a4d02",$t.__file="src/picker/InputValue.vue";var ta=function(t,n,o){return[t,n*o/((t=(2-n)*o)<1?t:2-t)||0,t/2]},na={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ft=function(t){t=Math.min(Math.round(t),255);var n=Math.floor(t/16),o=t%16;return"".concat(na[n]||n).concat(na[o]||o)},oa=function(t){var n=t.r,o=t.g,a=t.b;return isNaN(n)||isNaN(o)||isNaN(a)?"":"#".concat(Ft(n)).concat(Ft(o)).concat(Ft(a))},Ze=function(t,n){var o;typeof(o=t)=="string"&&o.indexOf(".")!==-1&&parseFloat(o)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(n,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*n),10)/100),Math.abs(t-n)<1e-6?1:t%n/parseFloat(n)},gt=function(t,n,o){t=6*Ze(t,360),n=Ze(n,100),o=Ze(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},aa=function(t,n,o){var a=t.h,r=t.s,l=t.v,i=t.a;if(o)switch(n){case"hsl":var d=ta(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=gt(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(oa(gt(a,r,l))).concat(Ft(255*i))}else switch(n){case"hsl":var f=ta(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var m=gt(a,r,l),w=m.r,h=m.g,k=m.b;return"rgb(".concat(w,", ").concat(h,", ").concat(k,")");default:return oa(gt(a,r,l))}},Dt=function(t){var n=t.r,o=t.g,a=t.b;n=Ze(n,255),o=Ze(o,255),a=Ze(a,255);var r,l=Math.max(n,o,a),i=Math.min(n,o,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case n:r=(o-a)/s+(o<a?6:0);break;case o:r=(a-n)/s+2;break;case a:r=(n-o)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ra=function(t){var n=t.h,o=t.s,a=t.l;a/=100;var r=o/=100,l=Math.max(a,.01);return o*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+n,s:100*(a===0?2*r/(l+r):2*o/(a+o)),v:100*((a+o)/2)}},la=function(t){var n=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var o=1;o<t.length;o++)n.push(parseInt("0x"+t[o].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)n.push(parseInt("0x"+t.slice(a,a+2)));return{r:n[0],g:n[1],b:n[2],a:n[3]}},In=function(t,n,o){if(typeof t=="string"&&t!==""){var a=vn(t,$n(t),o),r=da(a);return aa(r,n,o)}return""},ia=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4);return{r:n[0],g:n[1],b:n[2],a:n[3]}},sa=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:o,s:parseFloat(a),l:parseFloat(r),a:l}},ca=function(t){var n=yt(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:parseFloat(o),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},vn=function(t,n){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(n){case"rgb":var o=ia(t),a=o.r,r=o.g,l=o.b,i=o.a;return ke(ke({},Dt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=ca(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=sa(t),c=s.h,p=s.s,u=s.l,f=s.a;return ke(ke({},ra({h:c,s:p,l:u})),{},{a:+f});default:var m=la(t),w=m.r,h=m.g,k=m.b,y=m.a;return ke(ke({},Dt({r:w,g:h,b:k})),{},{a:y/255})}else switch(n){case"rgb":return ke(ke({},Dt(ia(t))),{},{a:1});case"hsv":var _=ca(t);return{h:_.h,s:_.s,v:_.v,a:1};case"hsl":return ke(ke({},ra(sa(t))),{},{a:1});default:return ke(ke({},Dt(la(t))),{},{a:1})}},$n=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},da=function(t){var n=t.h,o=t.s,a=t.v,r=t.a;return isNaN(n)&&(n=0),isNaN(o)&&(o=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:n,s:o,v:a,a:r}},bt=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var n=e.ref(),o=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(o)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=n.value.getContext("2d");n.value.width=e.unref(a),n.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:n,colorItemStyle:l}}}),sd=["draggable"];ve(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),bt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,sd)},bt.__scopeId="data-v-02da71fd",bt.__file="src/color-item/ColorItem.vue";var Pt=e.defineComponent({name:"Colors",components:{ColorItem:bt},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,n){var o=n.emit;return{onSelectColor:function(a,r){o("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return In(a,"hex",!0)})})}}}),cd={class:"colors"};function pa(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Be(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?pa(Object(o),!0).forEach(function(a){Vn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):pa(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}ve(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Pt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Pt.__scopeId="data-v-0f8b52a8",Pt.__file="src/picker/Colors.vue";var Mt=e.defineComponent({name:"Picker",components:{Colors:Pt,Saturation:Vt,Hue:It,Alpha:vt,InputValue:$t},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return Be(Be({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var _,T=(_=t.value)===null||_===void 0?void 0:_.trim();if(T!=null&&T!==""){var L=$n(T);return da(vn(T,L,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(_,T){var L="";_!=null?(L=aa(Be({},_),t.format,t.showAlpha),i.value=Be({},_)):i.value=null,d.value=L;var C=s();JSON.stringify(_)!==JSON.stringify(C)&&JSON.stringify(_)!==JSON.stringify(T)&&o("change",L)},{immediate:!0});var c=e.computed(function(){var _;return((_=e.unref(l))===null||_===void 0?void 0:_.h)||0}),p=e.computed(function(){var _;return((_=e.unref(l))===null||_===void 0?void 0:_.s)||0}),u=e.computed(function(){var _;return((_=e.unref(l))===null||_===void 0?void 0:_.v)||0}),f=e.computed(function(){var _,T;return((_=e.unref(l))===null||_===void 0?void 0:_.a)!=null?(T=e.unref(l))===null||T===void 0?void 0:T.a:1}),m=e.computed(function(){return gt(e.unref(c),e.unref(p),e.unref(u))}),w=e.computed(function(){return"rgb(".concat(e.unref(m).r,", ").concat(e.unref(m).g,", ").concat(e.unref(m).b,")")}),h=e.computed(function(){var _=t.format;if(t.showAlpha)switch(_){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(_){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),k=e.ref(-1),y=function(_,T,L){if(_.length!==0){var C=vn(_,T,L),b=C.h,V=C.s,A=C.v;if(!(isNaN(b)||isNaN(V)||isNaN(A))){var S=1,I=C.a;isNaN(I)||(S=I),l.value={h:b,s:V,v:A,a:S}}}};return{h:c,s:p,v:u,a:f,rgbStr:w,onSelectSaturation:function(_,T){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:_,v:T,a:e.unref(f)}:l.value=Be(Be({},e.unref(l)),{},{s:_,v:T})},onSelectHue:function(_){k.value=-1,e.unref(l)==null&&(l.value={h:_,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=Be(Be({},e.unref(l)),{},{h:_})},onSelectAlpha:function(_){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:_}:l.value=Be(Be({},e.unref(l)),{},{a:_})},label:h,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(_){k.value=-1,d.value=_},handleChange:function(){var _,T=(_=e.unref(d))===null||_===void 0?void 0:_.trim();if(T!==""){var L=t.showAlpha,C=t.format,b=function(V,A,S){if(S)switch(A){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(V);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(V);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(V);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(V)}else switch(A){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(V);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(V);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(V);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(V)}}(T,C,L);b?y(T,C,L):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:k,onSelectColor:function(_,T){if(k.value=T,(_=_.trim())==="")l.value=null;else{var L=$n(_);L?y(_,L,!0):l.value=null}}}}}),dd={class:"picker-inner"},pd={class:"picker-header"};ve(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),Mt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",dd,[e.createElementVNode("div",pd,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Mt.__scopeId="data-v-6ceadec6",Mt.__file="src/picker/Picker.vue";var jt=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var n=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}})}}}),ud=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function ua(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Fn(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ua(Object(o),!0).forEach(function(a){Vn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ua(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}ve(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),jt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(ud),4)},jt.__scopeId="data-v-ceb1719c",jt.__file="src/add-color-item/AddColorItem.vue";var Ue=null,et=e.defineComponent({name:"ColorPicker",components:{ColorItem:bt,Picker:Mt,AddColorItem:jt},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,n){var o=n.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(F){return In(F,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var F=t.value||"",P=Array.isArray(F)?F:[F];a.value=P.map(function(D){return In(D,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,m,w,h=e.ref(null),k=e.ref(null),y=(s=h,c=k,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Ue.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(F){var P=F.state,D=P.styles,M=P.placement,z=D.popper;u.value=Fn(Fn(Fn({},z),p),{},{transformOrigin:M==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(F,P){var D,M=yt(F,2),z=M[0],g=M[1],N=yt(P,2),O=N[0],G=N[1];if(z&&g&&(O!==z||G!==O)){(D=Ue)===null||D===void 0||D.destroy();var R=z.$el||z,q=g.$el||g;e.nextTick(function(){Ue=Jc(R,q,f)})}}),e.onBeforeUnmount(function(){var F;Ue&&((F=Ue)===null||F===void 0||F.destroy(),Ue=null)}),{instance:Ue,style:u}),_=y.style,T=function(){e.unref(h)==null&&(h.value=e.unref(E)[0],l.value=0),t.showPicker===void 0?d.value=!0:o("update:showPicker",!0)},L=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:o("update:showPicker",!1),o("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},C=e.ref(),b=function(){var F=Xo(Ot.mark(function P(D){var M,z,g,N;return Ot.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(z=D.target,(g=(M=z.dataset)===null||M===void 0?void 0:M.index)!=null&&g!==""){O.next=4;break}return O.abrupt("return");case 4:if(N=+g,e.unref(l)!==N){O.next=7;break}return O.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==N?(L(),m&&clearTimeout(m),m=setTimeout(function(){T(),clearTimeout(m)},100)):T(),l.value=N,h.value=z;case 10:case"end":return O.stop()}},P)}));return function(P){return F.apply(this,arguments)}}(),V=function(){var F=Xo(Ot.mark(function P(D){var M,z,g,N,O;return Ot.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(N=D.target,!(!((M=e.unref(C))!==null&&M!==void 0&&M.isEqualNode(N))&&(!((z=e.unref(C))===null||z===void 0)&&z.contains(N)))){G.next=4;break}return G.abrupt("return");case 4:if(O=(g=e.unref(k))===null||g===void 0?void 0:g.$el,!(O!=null&&O.contains(N))){G.next=8;break}return G.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&L()},0);case 10:case"end":return G.stop()}},P)}));return function(P){return F.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(T(),clearTimeout(w))});var A,S=e.ref(t.max>e.unref(a).length),I=e.computed(function(){return typeof t.popupContainer=="string"||Je(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),x=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),v=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(k)]},function(){e.nextTick(function(){var F,P;(F=e.unref(C))===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref(v)),(P=e.unref(k))===null||P===void 0||(P=P.$el)===null||P===void 0||P.setAttribute("pick-colors-theme",e.unref(v))})},{immediate:!0}),e.provide("theme",{theme:v});var E=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",V,!1),t.showPicker&&T()}),e.onUnmounted(function(){document.removeEventListener("mouseup",V,!1),m&&(clearTimeout(m),m=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(F){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===F},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:S,onPickerChange:function(F){var P=e.unref(l),D=e.unref(a).slice(),M=e.unref(a).length;if(P!=null){P>=0?D[P]=F:(l.value=M,D.push(F));var z="";z=Array.isArray(t.value)||t.addColor?D:F,t.value===void 0?a.value=Array.isArray(z)?z:[z]:(o("update:value",z),o("change",z,F,P)),t.addColor&&M>=t.max&&(S.value=!1,o("overflowMax"))}},colorPicker:C,onColorClick:b,pickerRef:k,onColorItemDragStart:function(F){F.dataTransfer.effectAllowed="move";var P=F.target;A=+P.dataset.index},onColorItemDragOver:function(F){},onColorItemDrop:function(F){var P=+F.target.dataset.index,D=Zc(e.unref(a)),M=D[A];D.splice(A,1);var z=D.slice(0,P),g=D.splice(P),N=z.concat([M]).concat(g);o("update:value",N),o("change",N,N[A],A)},colorItemsRef:E,pickerStyle:_,values:r,teleportDisabled:x,toPopupContainer:I}}});ve(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),et.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:n[0]||(n[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:n[1]||(n[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:n[2]||(n[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:n[3]||(n[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},et.__scopeId="data-v-3c43ade8",et.__file="src/ColorPicker.vue";const fd=e.defineComponent({name:"ColorPick",components:{PickColors:et,AInput:U.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,n){const o=e.computed({get:()=>t.value,set:r=>{n.emit("change",r)}});return{colorValue:o,onChangColor:r=>{o.value=r.hex}}}}),ru="",md={class:"color-pick"};function hd(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",md,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":n[0]||(n[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":n[1]||(n[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const yd=Z(fd,[["render",hd],["__scopeId","data-v-e2113f43"]]),gd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:et},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:n}){const o=l=>{n("change",l)},a=e.ref(13);return{onColorsChange:o,max:a,onOverflowMax:()=>{U.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),lu="",bd={class:"color-group-pick"};function Cd(t,n,o,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",bd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const wd=Z(gd,[["render",Cd],["__scopeId","data-v-b2be8322"]]),xd=e.defineComponent({name:"FormGroup",components:{Draggable:at,AppstoreAddOutlined:fo,MinusCircleOutlined:ol,PickColors:et,InputNumber:Eo,PlusCircleOutlined:il},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:n}){const o=e.computed({get:()=>t.value,set:c=>{n("change",c)}});return{myValue:o,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const m=Object.keys(f),w={};m.forEach(h=>{w[h]=""}),c.push(w)}else typeof f=="string"&&c.push(f);o.value=c}else U.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var m;const f=(m=t.value)==null?void 0:m.slice();if(Array.isArray(f)){const w=c==null?void 0:c.target,h=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;u?f[p][u]=h:f[p]=h,o.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){U.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),o.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),iu="",kd={class:"form-group"},_d={class:"form-row"},Sd={key:0,class:"label"},Ad={key:1,class:"label"},Nd={class:"icon-group"};function Td(t,n,o,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",kd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":n[0]||(n[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",_d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Sd,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:m=>t.onValueChange(m,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Nd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Ld=Z(xd,[["render",Td],["__scopeId","data-v-f0c0ab4d"]]),Ed=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:U.Textarea},emits:["change"],setup(t,{emit:n}){return{onTextareaChange:a=>{n("change",a.target.value)}}}});function Bd(t,n,o,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Od=Z(Ed,[["render",Bd]]),Vd=e.defineComponent({name:"PropsToForm",components:{Input:$s,InputNumber:Eo,RadioGroup:js,Select:Gs,Switch:Ws,ColorPick:yd,ColorGroupPick:wd,FormGroup:Ld,Textarea:Od},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const n=e.inject(wt),o=e.inject(Ut),a=e.inject(Gt),r=e.computed(()=>{var s;return(s=e.unref(n))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):o(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:m="value",changeValueEventName:w="change",events:h}=p;c[u]={...p,valueProp:m,value:f,events:{[w]:(k,y=!0)=>{l(y?{[u]:k}:{})},...h}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:ne.reduce(s,(c,p,u)=>{const f=Vs[u];if(Array.isArray(f)){const m=f.find(w=>{const{onlyType:h,excludeType:k}=w;return h==null&&k==null?!0:h?Te(e.unref(r),h):k?!Te(e.unref(r),k):!1});m&&i({result:c,value:p,key:u,mapAttributeProp:m})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Te}}}),su="",Id={class:"props-to-form"},vd={class:"label"},$d={class:"component-wrapper"};function Fd(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",Id,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",vd,e.toDisplayString(i.label),1),e.createElementVNode("div",$d,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Dd=Z(Vd,[["render",Fd],["__scopeId","data-v-c6fb2484"]]);function Pd(){return new Worker("/assets/editor.worker-02df2e61.js")}function Md(){return new Worker("/assets/json.worker-867823a6.js")}function jd(){return new Worker("/assets/ts.worker-7254b425.js")}const Rd=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:n}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new Md:i==="typescript"||i==="javascript"?new jd:new Pd}};const o=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=xa.editor.create(o.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(ne.debounce(()=>{const l=a==null?void 0:a.getValue();n("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();n("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:o}}}),cu="",Ud={class:"editor",ref:"dom"};function Gd(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",Ud,null,512)}const fa=Z(Rd,[["render",Gd],["__scopeId","data-v-71e88372"]]),zd=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],Hd=e.defineComponent({name:"TableColumnConfig",components:{ATable:U.Table,AModal:U.Modal,ACheckbox:U.Checkbox,AInput:U.Input,AInputNumber:U.InputNumber,ASelect:U.Select,ASelectOption:U.SelectOption,Editor:fa},setup(){const t=e.inject(Pe),n=e.computed(()=>{var h;return!!((h=e.unref(t))!=null&&h.isGroupTable)}),o=e.computed(()=>{var h;return((h=e.unref(t))==null?void 0:h.graphicConfig)||{}}),a=e.computed(()=>{var h;return((h=e.unref(t))==null?void 0:h.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(o,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var k,y,_;let h=[];if(r.value=[],!n.value)h=((k=e.unref(o))==null?void 0:k.queryColumnList)||[];else{const T=((y=e.unref(o))==null?void 0:y.rowHeaderList)||[],L=((_=e.unref(o))==null?void 0:_.indicators)||[];h=[...T,...L]}h.forEach(T=>{var C;let L=(C=e.unref(a))==null?void 0:C.find(b=>b.prop===T.name);L||(L={label:T.label,prop:T.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(L)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:zd,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(h,k,y)=>{h&&k&&(l=h,i=k,d.value=h[k]||"",c.value=!0,s.value=y)},onEditorChange:h=>{try{d.value=h}catch(k){console.error(k)}},changeRenderBool:(h,k)=>{h.style=k.target.checked,h.style?h.renderBool===void 0&&(h.renderBool=!1):delete h.renderBool}}}}),du="",Wd={class:"table-column-config"};function qd(t,n,o,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),m=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Wd,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:w,text:h,record:k})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:y=>t.changeRenderBool(k,y),checked:k.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:k.width,"onUpdate:value":y=>k.width=y,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.renderText,"onUpdate:value":y=>k.renderText=y,readOnly:!0,onClick:y=>t.renderSave(k,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(h),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.headerTemplate,"onUpdate:value":y=>k.headerTemplate=y,readOnly:!0,onClick:y=>t.renderSave(k,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(h),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:k.headerAlign,"onUpdate:value":y=>k.headerAlign=y},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:k.align,"onUpdate:value":y=>k.align=y},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:k.fixed,"onUpdate:value":y=>k.fixed=y},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:k.dataFormat,"onUpdate:value":y=>k.dataFormat=y,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[k.dataFormat&&k.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:k.retentiondigit,"onUpdate:value":y=>k.retentiondigit=y,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(m,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":n[0]||(n[0]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const Yd=Z(Hd,[["render",qd],["__scopeId","data-v-afebddc0"]]),Kd=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Dd,TableColumnConfig:Yd,Editor:fa,AFormItem:U.FormItem,ASelect:U.Select,ASelectOption:U.SelectOption,ACollapse:U.Collapse,ACollapsePanel:U.CollapsePanel,ASwitch:U.Switch},setup(t){const n=e.ref([]),o=e.ref(["表格"]),a=e.inject(wt),r=e.inject(Rn),l=e.inject(Ut),i=e.inject(Gt),d=e.inject(jn),s=C=>{l({...Hn[C]},!1),d()},c=e.computed(()=>{var C;return(C=e.unref(a))==null?void 0:C.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Os.map(C=>{const{props:b,title:V,enableProps:A,onlyType:S,excludeType:I}=C,x=[];b.forEach(F=>{typeof F=="string"&&(p.includes(F)?t.isGroupTable&&x.push(F):x.push(F))});let v,E;return t.componentType&&(S!=null&&S.includes(t.componentType))?(v=typeof A=="string"&&r.value?r.value[A]:void 0,E=ne.pick(e.unref(r),x)):(v=typeof A=="string"&&a.value?a.value[A]:void 0,E=ne.pick(e.unref(a),x)),{title:V,enableProps:v,enablePropsName:A,onlyType:S,excludeType:I,props:E}}).filter(({props:C})=>Object.keys(C).length>0)),f=(C,b)=>{const{onlyType:V,excludeType:A}=C;return V==null&&A==null?!0:V?Te(b,V):A?!Te(b,A):!1},m=(C,b)=>(b==null||b.stopPropagation(),C),w=(C,b)=>{b!=null&&l({[b]:C})},h=e.computed(()=>JSON.stringify(e.unref(a),null,2)),k=C=>{try{const b=JSON.parse(C||"{}");l(b,!1)}catch(b){console.error(b)}},y=e.ref(""),_=C=>{try{y.value=C}catch(b){console.error(b)}},T=(C,b)=>{try{i({[b]:C})}catch(V){console.error(V)}},L=e.computed(()=>{var C;return["customGraph"].includes((C=e.unref(a))==null?void 0:C.type)});return{type:c,handleChangeType:s,activePanel:n,tablePanel:o,ComponentString:h,updateComponentOptions:k,tableOptions:r,optionCode:y,onEditorChange:_,tableEditorChange:T,onSwitchClick:m,onSwitchChange:w,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:L}}}),pu="",uu="",Xd={class:"style-group"};function Qd(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),m=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Xd,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":n[0]||(n[0]=h=>t.type=h),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(m,{activeKey:t.activePanel,"onUpdate:activeKey":n[1]||(n[1]=h=>t.activePanel=h)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h.title},[t.isRenderForm(h,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[h.title?(e.openBlock(),e.createBlock(u,{header:h.title,key:h.title},{extra:e.withCtx(()=>[typeof h.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:h.enableProps,onChange:k=>t.onSwitchChange(k,h.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:h.props,disabled:typeof h.enableProps=="boolean"?!h.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(m,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":n[4]||(n[4]=h=>t.tablePanel=h)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,h=>{var k;return e.openBlock(),e.createElementBlock(e.Fragment,{key:h.title},[h.title&&((k=h.onlyType)!=null&&k.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:h.title,key:h.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:h.props,disabled:typeof h.enableProps=="boolean"?!h.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(w)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:n[2]||(n[2]=h=>t.tableEditorChange(h,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:n[3]||(n[3]=h=>t.tableEditorChange(h,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Jd=Z(Kd,[["render",Qd],["__scopeId","data-v-14fce418"]]),Zd=e.defineComponent({name:"Card",components:{CloseOutlined:sn},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:n}){const o=e.inject(Me),a=e.inject(Ht),r=e.inject(zn),l=e.computed(()=>{var x;return(x=e.unref(o))==null?void 0:x.filter(v=>v.keyName!=="")}),i=e.computed(()=>{var E,F;const x=[],v=(E=e.unref(l))==null?void 0:E.find(P=>{var D;return P.id===((D=t.control)==null?void 0:D.id)});if(v){const P=v.type,D=ne.pick(v,["value","startTime","endTime"]);(F=Object.keys(D))!=null&&F.length||(D.value="");for(const M in D)if(Object.prototype.hasOwnProperty.call(D,M)){const z=e.unref(r)[M];if(Array.isArray(z)){const g=z.find(N=>Te(P,N.onlyType));g&&x.push({label:g.label,value:M})}else x.push({label:z.label,value:M})}}return x}),d=()=>{n("delete",t.index),s(t.control.id)};function s(x){const v=e.unref(l).find(E=>E.id===x);if(v){const{type:E,id:F,events:P=[]}=v,D=Cn(E),M=P.findIndex(z=>{var g;return z.on===D&&z.target===((g=e.unref(h))==null?void 0:g.id)&&z.emit==="refreshData"});M!==-1&&(P.splice(M,1),a({id:F,events:P}))}}const c=x=>{const v={...t.control};if(v.id=x,x){const E=e.unref(l).find(F=>F.id===x);E&&(v.keyName=E.keyName,_(E,x))}delete v.prop,n("update",v,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=x=>{n("update",{...t.control,prop:x},t.index)},m=x=>{n("update",{...t.control,rule:x},t.index)},w=x=>{const v={...t.control};x==null?delete v.mode:v.mode=x,delete v.conditionLabel,delete v.conditionName,delete v.conditionKey,delete v.conditionValueType,n("update",v,t.index)},h=e.inject(Pe),k=e.inject(de),y=e.computed(()=>{const{classificationList:x=[],seriesList:v=[],leftAxisList:E=[],rightAxisList:F=[],indicators:P=[],rowHeaderList:D=[],queryColumnList:M=[]}=e.unref(k),z=ne.cloneDeep([...x,...v,...E,...F,...P,...D,...M]);if(z!=null&&z.length)for(const R of z)R.id=R.name;const g=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...t.intersection.map(R=>({...R,id:R.name,label:R.title||R.label})),...z],N=new Map,O=g.length;for(let R=0;R<O;R++){const q=g[R],{id:Y}=q||{};N.set(Y,q)}return[...N].map(([R,q])=>q)});function _(x,v){var M;const{type:E,id:F,events:P=[]}=x,D=Cn(E);if(e.unref(p)&&v!==e.unref(p)){const{controlList:z=[]}=e.unref(k);z.find(g=>g.id===e.unref(p))||s(e.unref(p))}P.find(z=>{var g;return z.on===D&&z.target===((g=e.unref(h))==null?void 0:g.id)&&z.emit==="refreshData"})||a({id:F,events:[...P,{on:D,target:(M=e.unref(h))==null?void 0:M.id,emit:"refreshData"}].reverse()})}const T=(x,v)=>{if(x){const{label:E,name:F,id:P,genericType:D}=v||{};n("update",{...t.control,conditionKey:P,conditionLabel:E,conditionName:F,conditionValueType:D},t.index)}else{const E={...t.control};delete E.conditionLabel,delete E.conditionName,delete E.conditionKey,delete E.conditionValueType,n("update",E,t.index)}},L=(x,v)=>{var E;return(E=v==null?void 0:v.keyName)==null?void 0:E.toLowerCase().includes(x==null?void 0:x.toLowerCase())},C=(x,v)=>{var E;return(E=v==null?void 0:v.label)==null?void 0:E.toLowerCase().includes(x==null?void 0:x.toLowerCase())},b=e.computed(()=>{const x=e.unref(y).find(E=>E.id===t.control.conditionKey);let v="";return x&&(v=(x==null?void 0:x.genericType)||""),v==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:v==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:v==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),V=e.computed(()=>{let x=!1;const{id:v=""}=t.control;if(v){const E=e.unref(l).find(F=>F.id===v);(E==null?void 0:E.type)==="ecanRangePicker"&&(x=!0)}return x}),A=e.computed(()=>{let x=!1;const{id:v=""}=t.control;if(v){const E=e.unref(l).find(F=>F.id===v);["ecanDatePicker","ecanRangePicker"].includes(E==null?void 0:E.type)&&(x=!0)}return x});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:w,onRuleChange:m,conditionKeyOptions:y,onConditionKeyChange:T,idFilterOption:L,filterOption:C,onFormatChange:x=>{n("update",{...t.control,format:x},t.index)},ruleOption:b,isShowProp:V,isShowFormat:A,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),fu="",mu="",ep={class:"control-card"};function tp(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ep,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:0,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const np=Z(Zd,[["render",tp],["__scopeId","data-v-143981a4"]]),op=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:np,AButton:U.Button},setup(t,{expose:n}){const o=e.inject(Me),a=e.inject(de),r=e.inject(Oe),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const m of u)m.conditionKey&&!bn(m,"rule")&&(m.rule="EQUAL");return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:To({...e.unref(a),...u},e.unref(o))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var m;const f=(m=e.unref(l))==null?void 0:m.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var w;const m=(w=e.unref(l))==null?void 0:w.slice();m[f]=u,d({controlList:m})};return n({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),hu="",ap={class:"control-group"},rp={class:"control-group-header"},lp={class:"control-group-content"};function ip(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",ap,[e.createElementVNode("div",rp,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",lp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const sp=Z(op,[["render",ip],["__scopeId","data-v-c5c03257"]]),cp=(t={})=>{const n=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},o=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{o(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),o(i,"activeKey")&&delete i.activeKey,o(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:m,builtInValueSource:w,builtInCalcWay:h,formula:k,conditions:y,aggregate:_}=i;let T;return y&&(T=r(y)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:_,builtInFormula:m,builtInValueSource:w,builtInCalcWay:h,formula:k,conditions:T}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:m,classificationList:w=[],seriesList:h=[],leftAxisList:k=[],rightAxisList:y=[],queryColumnList:_=[],indicators:T=[],dataSourceId:L,idxLibMode:C,preview:b=!1}=i||{};f==null&&(Te(d,"table")?f="1":f="2");let V;if(Array.isArray(w)&&w.length>0){const x=w.length;for(let v=0;v<x;v++){const E=w[v]||{},{label:F="",name:P="",show:D=!1,sort:M,customGroup:z,conditions:g}=E;if(D||x===1){V={label:F.trim(),columnName:P,show:D,sort:M,customGroup:z,conditions:r(g)};break}}}let A;if(Array.isArray(h)&&h.length>0){const x=h.length;for(let v=0;v<x;v++){const E=h[v]||{},{label:F="",name:P="",show:D=!1,sort:M,customGroup:z,conditions:g}=E;if(D||x===1){A={label:F.trim(),columnName:P,show:D,sort:M,customGroup:z,conditions:r(g)};break}}}const S=[];_==null||_.forEach(x=>{S.push(n(x))});const I=[];if(k==null||k.forEach(x=>{x.location="LEFT",I.push(l(x))}),y==null||y.forEach(x=>{x.location="RIGHT",I.push(l(x))}),T==null||T.forEach(x=>{x.location="LEFT",I.push(l(x))}),!(f==="1"&&S.length===0)&&!(f==="2"&&I.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:m,classification:V,series:A,indicatorList:I,queryColumns:S,pageFlag:!0,sqlConditions:[],dataSourceId:L,idxLibMode:C,preview:b})}catch(x){console.error(x)}}},ma=(t,n)=>{const o={dayjs:oe,...n};let a="";const r=[];for(const d in o)a+=`${d},`,r.push(o[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Rt=(t="",{textData:n,codeData:o}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...n},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const m=u[f],w=l[m];w!=null&&(c=c.replace(m,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=ma(c,o)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),t},Ct=(t,n)=>{var r;if(t==null)return n;const o=t.match(/\{.*\}/g);if(o==null||o.length===0)return n;const a=o.length;for(let l=0;l<a;l++){const i=o[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,n);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=ma(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},dp=(t,n,o)=>{switch(t.type){case"bar":return pp(t,n,o);case"line":return up(t,n,o);case"pie":return fp(t,n,o);case"comboGraph":return mp(t,n,o);default:return{}}},pp=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const m={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(m.stack="stack"),m.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(m)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let m=0;m<p;m++){const{marker:w,seriesName:h,name:k,value:y,data:_}=c[m]||{};m===0&&(u+=`${k}<br/>`),u+=Rt(f,{textData:{marker:w,name:k,value:y,a:h,b:k,c:y,..._}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ct(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Ct(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},up=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:o},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let m=0;m<p;m++){const{marker:w,seriesName:h,name:k,value:y,data:_}=c[m]||{};m===0&&(u+=`${k}<br/>`),u+=Rt(f,{textData:{marker:w,name:k,value:y,a:h,b:k,c:y,..._}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Ct(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(c){return Ct(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:o}},series:e.unref(s)}},fp=(t,n,o)=>{const{dataset:a=[]}=n;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return Rt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o===18?o:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:o===18?o:t.labelFontSize,position:t.labelPosition,formatter:Ei(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},mp=(t,n,o)=>{const{dimensions:a=[],dataset:r=[]}=n,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:o}}:c={value:s,textStyle:{fontSize:o}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(p){return Ct(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let m=0;m<c;m++){const w=f[m],{tooltipFormatter:h}=w||{},{marker:k,seriesName:y,name:_,value:T,data:L}=s[m]||{};m===0&&(p+=`${_}<br/>`),p+=Rt(h||u,{textData:{marker:k,name:_,value:T,seriesName:y,a:y,b:_,c:T,...L}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},hp=(t=[],n)=>{let{name:o="name",types:a=[]}=n||{};o=(o==null?void 0:o.trim())||o;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const m=a[f],{label:w,value:h}=m,k={...t[0],value:t[0][h]};r.add(w),p.push(k)}const u=t[0][o]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[o];r.add(f);for(let m=0;m<d;m++){const w=a[m],{label:h,value:k}=w,y={...u,value:u[k]};if(l.has(h)){const _=l.get(h);_.push(y),l.set(h,_)}else l.set(h,[y])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},yp=(t,n)=>{let{name:o="name",value:a="value",type:r="type"}=n||{};o=o==null?void 0:o.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[o]||"",m=u[a]||"",w=u[r]||"";if(l.add(f),i.has(w)){const h=i.get(w);h.push({name:f,value:m,...u}),i.set(w,h)}else i.set(w,[{name:f,value:m,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},gp=e.defineComponent({name:"ChartGraph",components:{ASpin:U.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:n}){const o=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(_e);let l=null;const i=e.inject(Se)||"",d=e.inject(de)||{},s=e.inject(wt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),m=e.ref(!1),w=e.computed(()=>m.value?Aa:12),h=e.ref({}),k=e.ref(),y=e.computed(()=>{const S=e.unref(o.value);if((S==null?void 0:S.type)==="customGraph")return k.value;const I=dp(S,e.unref(h),w.value);return{toolbox:{show:S.toolboxShow,left:S.toolboxLeft,top:S.toolboxTop,itemSize:S.toolboxItemSize,itemGap:S.toolboxItemGap,feature:{myDataZoom:{show:m.value?!1:S.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:S.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:S.titleText,subtext:S.titleSubtext,left:"center"},grid:{top:S.gridTop,bottom:S.gridBottom,left:S.gridLeft,right:S.gridRight,containLabel:S.gridContainLabel},color:S.colors,...I}}),_=(S=[],I,x=!1)=>{const v=x?I:null;h.value=hp(S,v)},T=(S=[],I)=>{h.value=yp(S,I)},L=async()=>{var S,I,x;try{const v=cp({graphicConfig:e.unref(a.value),type:(S=e.unref(o.value))==null?void 0:S.type,request:r,indicatorToken:i});f.value=!0;const E=await v(),{columns:F=[],rows:P=[]}=((I=E==null?void 0:E.data)==null?void 0:I.data)??{};if(((x=e.unref(o.value))==null?void 0:x.type)==="pie"){let D=[];if(F.length>0){const M=F[0],z=F[1];D=P.map(g=>({name:g[M],value:g[z]}))}T(D)}else{let D;F.length>0&&(D={name:F[0],types:F.slice(1).map(M=>({label:M,value:M}))}),_(P,D,!0)}}catch(v){console.error(v)}finally{f.value=!1}},C={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},b=()=>{e.unref(h).dataset.length===0?u.value.setOption(C):u.value.setOption(y.value)},V=()=>{e.unref(o.value).type!=="customGraph"&&L()},A=()=>{var S;(S=u.value)==null||S.resize()};return e.watch(y,()=>{b()},{deep:!0}),e.watch(()=>e.unref(o.value).optionCode,S=>{try{const I=eval;k.value=I(S)}catch(I){console.error(I)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(A),l.observe(p.value)),u.value=Sa.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),n({refreshData:V}),{echartRef:c,loading:f}}}),yu="",bp={class:"ecan-chart-graph",ref:"chartWrapRef"},Cp={style:{width:"100%",height:"100%"},ref:"echartRef"};function wp(t,n,o,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",Cp,null,512)]),_:1},8,["spinning"])],512)}const ha=Z(gp,[["render",wp],["__scopeId","data-v-8049fed2"]]),xp=e.defineComponent({name:"DataConfig",components:{DataGroup:Bs,StyleGroup:Jd,ChartGraph:ha,ATabs:U.Tabs,ATabPane:U.TabPane,ControlGroup:sp},setup(){var L;const t=e.ref("1"),n=e.ref([0,1,2]),o=e.ref(),a=e.inject(Pe),r=e.inject(Mn),l=e.inject(de),i=e.inject(Me),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const C=ne.cloneDeep(e.unref(a));c(C);const b=ne.pick(C,ne.without(Object.keys(C),"position","top","left","width","height"));Te(C.type,d)?(b.height=C.height,b.width=C.width):b.height="290px";const V=ne.cloneDeep(e.unref(l));return V.pageMode="design",V.preview=!0,{...b,graphicConfig:V,toolboxShow:!1}});function c(C){var b,V,A,S;["#ffffff","#fff"].includes((b=C==null?void 0:C.color)==null?void 0:b.toLowerCase())&&(C.color="#000"),["#ffffff","#fff"].includes((V=C==null?void 0:C.variableColor)==null?void 0:V.toLowerCase())&&(C.variableColor="#000"),["#ffffff","#fff"].includes((A=C==null?void 0:C.increaseColor)==null?void 0:A.toLowerCase())&&(C.increaseColor="#000"),["#ffffff","#fff"].includes((S=C==null?void 0:C.declineColor)==null?void 0:S.toLowerCase())&&(C.declineColor="#000")}const p=e.computed(()=>{let C=!0;return Te(e.unref(s).type,d)&&(C=!1),C}),u=e.computed(()=>{var C;return(C=e.unref(s))==null?void 0:C.type}),f=e.computed(()=>{var C;return!!((C=e.unref(s))!=null&&C.isGroupTable)}),m=C=>{const b=C==="1";b&&u.value==="table"&&T(),window.changeShowTable&&window.changeShowTable(b),C==="3"&&_()},w=e.ref(),h=e.inject(_e),k=e.unref(e.inject(Se)),y=(L=window==null?void 0:window.config)==null?void 0:L.pageId;function _(){const{leftAxisList:C=[],rightAxisList:b=[],queryColumnList:V=[],indicators:A=[]}=e.unref(l),S=[...C,...b,...V,...A],I=[];for(const x of S){const{id:v=""}=x;v&&!I.includes(v)&&x.indexCode&&I.push(v)}if(I!=null&&I.length){const x=[];for(const v of I)x.push(new Promise((E,F)=>{h.post(`${ye}/diagram/hrpIndexWithComplex`,{pageId:y,indexGuid:v,dataSourceId:""},{headers:{Authentication:k,operateContext:"ygt"}}).then(P=>{var z;const{success:D,data:M=[]}=P.data;D&&((z=M==null?void 0:M.dataViewColumns)!=null&&z.length)?E(M.dataViewColumns):F(M)}).catch(P=>{F(P)})}));Promise.all(x).then(v=>{if(v!=null&&v.length){const E=v.reduce((F,P)=>F.filter(D=>P.find(M=>M.typeGuid===D.typeGuid)));w.value=E.filter(F=>F.typeGuid)}})}}const T=()=>{var b;let C;r&&u.value==="table"?C=window.updateConfig:C=(b=e.unref(o))==null?void 0:b.refreshData,typeof C=="function"&&C()};return e.provide(jn,T),e.watch(l,()=>{T()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:n,componentRef:o,type:u,isGroupTable:f,onChange:m,component:s,fullWidth:p,renderUsedComponents:i,intersection:w}}}),gu="",kp={class:"data-config"},_p={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Sp(t,n,o,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=f=>t.activeKey=f),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",_p,null,512)):e.withDirectives((e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Ap=Z(xp,[["render",Sp],["__scopeId","data-v-daafaca1"]]),Np=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Ll,DataConfig:Ap},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:n,emit:o}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var b;return((b=e.unref(i))==null?void 0:b.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?ne.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?ne.cloneDeep(e.unref(i).chartsOptions):e.ref(ne.cloneDeep(Hn.line));p=e.ref(p);let u=e.unref(i).tableOptions?ne.cloneDeep(e.unref(i).tableOptions):e.ref(ne.cloneDeep(Na));u=e.ref(u);const f=e.ref([]),m=b=>{f.value=b},w=b=>{c.value={...e.unref(c),...e.unref(b)}},h=(b,V=!0)=>{V?p.value={...e.unref(p),...e.unref(b)}:p.value={...e.unref(b)}},k=b=>{u.value={...e.unref(u),...e.unref(b)}},y=()=>f,_=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=ne.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=ne.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},T=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=T,t.request&&e.provide(_e,t.request),e.provide(Pn,{setDataList:m,getDataList:y});const L=b=>{o("updateUsedComponent",b)},C=e.computed(()=>{const{renderUsedComponentList:b}=t;let V=null;return b!=null&&b.length&&(V=b.filter(A=>{var S;return A.id!==((S=e.unref(i))==null?void 0:S.id)})),V});return e.provide(Pe,i),e.provide(de,c),e.provide(wt,p),e.provide(Rn,u),e.provide(zt,r),e.provide(Mn,s),e.provide(Se,l),e.provide(Oe,w),e.provide(Ut,h),e.provide(Gt,k),e.provide(Me,C),e.provide(Ht,L),e.provide(zn,t.mapAttributeProps),n({graphicConfig:c,chartsOptions:p,updateIndicatorData:_}),{isUpdate:a}}}),bu="",Tp={key:0,class:"config-modal"},Lp={class:"config-modal-left"},Ep={class:"config-modal-right"};function Bp(t,n,o,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Tp,[e.createElementVNode("div",Lp,[e.createVNode(i)]),e.createElementVNode("div",Ep,[e.createVNode(d)])]))}const ya=Dn(Z(Np,[["render",Bp],["__scopeId","data-v-9bdadbc5"]])),ga=Dn(ha),ba=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:ga,EcanIndicatorLibrary:ya},Symbol.toStringTag,{value:"Module"})),Op={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(ba).forEach(a=>{const r=ba[a];r.install&&t.use(r)})}};ce.EcanChartGraph=ga,ce.EcanIndicatorLibrary=ya,ce.default=Op,Object.defineProperties(ce,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
64
64
  //# sourceMappingURL=index.umd.js.map