@ecan-bi/indicator-library 1.0.68 → 1.0.69

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.68 */
2
- (function(we,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):(we=typeof globalThis<"u"?globalThis:we||self,e(we["@ecan-bi/indicator-library"]={},we.Vue,we.LodashEs,we.AntDesignVue,we.Draggable,null,null,we.Dayjs,null,we.MonacoEditor,null,we.Echarts))})(this,function(we,e,Z,M,Tt,Cf,wf,se,kf,er,_f,tr){var Za;"use strict";function or(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 nr=or(tr),dn=(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},Me="$request",Be=((Za=window==null?void 0:window.config)==null?void 0:Za.indicatorURL)||"",ve="INDICATOR_TOKEN",pn="DATA_LIST",Ye="SELECTED_COMPONENT",fe="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",un="SHOW_STYLE_CONFIG",fn="REFRESH_DATA",Ut="CHARTS_OPTIONS",mn="TABLE_OPTIONS",ar=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",hn="CHANGE_CONDITION",yn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",Gt="UPDATE_USED_COMPONENT",gn="MAP_ATTRIBUTE_PROPS",bn="PAGE_CONFIG",Cn={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%"}},rr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},lr=e.defineComponent({name:"DataViewList",components:{ASpin:M.Spin,ATreeSelect:M.TreeSelect,Draggable:Tt},setup(){var x;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(fe),a=e.inject(Se),r=e.computed(()=>{var y;return((y=e.unref(n))==null?void 0:y.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(x=window==null?void 0:window.config)==null?void 0:x.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var E,k;const y=r.value;i.value=!0;try{const{data:L}=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:y,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,L.success&&((E=s.value)==null||E.push(l),s.value=(k=s.value)==null?void 0:k.concat(p([L.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(y=[],E)=>{const k=[];return y.forEach(L=>{k.push({id:L.id,pId:E??L.parentId,value:L.id,title:L.name,isLeaf:L.leaf||!1,nature:L.nature,selectable:L.leaf||!1})}),k},u=async(y,E)=>{var I;let k=0;if(y){const{value:V}=y.dataRef;k=V}const{data:L}=await t.post(`${Be}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:k},{headers:{Authentication:o,operateContext:"ygt"}});L.success&&(s.value=(I=e.unref(s))==null?void 0:I.concat(p(L.data)),E&&e.unref(r)&&await c())},f=y=>{w(y),a({dataViewId:y,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(pn,{setDataList:y=>y}),_=e.ref(!1),m=e.ref([]),w=async y=>{if(y){m.value=[],_.value=!0;try{const E=await t.post(`${Be}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:y,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:k,data:L={}}=E.data;if(_.value=!1,k){const{rows:I=[]}=L;I==null||I.forEach(V=>{var F;const B=((F=V==null?void 0:V.dataViewColumns)==null?void 0:F.map(H=>({...H,show:!0})))||[];m.value=[...e.unref(m),...B]}),g(e.unref(m))}}catch{_.value=!1}}},N=y=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[y],C=(y,E)=>{const k=E[y.oldIndex];if(k){const L={...k,label:k.name,name:k.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(L))}};return e.onMounted(async()=>{await u(void 0,!0),w(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:m,dataViewLoading:_,onDataViewIdChange:f,mapGenericType:N,onDragStart:C}}}),Ef="",ne=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ir={class:"data-view-list"},sr={class:"columns"},cr={class:"column-item"},dr={class:"column-item-name"};function pr(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{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",sr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{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",cr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",dr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ur=ne(lr,[["render",pr],["__scopeId","data-v-4a66f7d2"]]);function Ve(t,o){fr(t)&&(t="100%");var n=mr(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 fr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function mr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function zt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function yr(t,o,n){return{r:Ve(t,255)*255,g:Ve(o,255)*255,b:Ve(n,255)*255}}function Co(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 gr(t,o,n){var a,r,i;if(t=Ve(t,360),o=Ve(o,100),n=Ve(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function br(t,o,n){t=Ve(t,255),o=Ve(o,255),n=Ve(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function Cr(t,o,n){t=Ve(t,360)*6,o=Ve(o,100),n=Ve(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function wr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(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 wn(t){return Ne(t)/255}function Ne(t){return parseInt(t,16)}var kn={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 Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=xr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=yr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=zt(t.s),r=zt(t.v),o=Cr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=zt(t.s),i=zt(t.l),o=gr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=hr(n),{ok:s,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 kr="[-\\+]?\\d+%?",_r="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(_r,")|(?:").concat(kr,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),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 xr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(kn[t])t=kn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),a:wn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),a:wn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Ne(n[1]+n[1]),g:Ne(n[2]+n[2]),b:Ne(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Ht=2,_n=.16,Sr=.05,Nr=.05,Ar=.15,xn=5,Sn=4,Tr=[{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 Nn(t){var o=t.r,n=t.g,a=t.b,r=br(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Yt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(wr(o,n,a,!1))}function Er(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 An(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Ht*o:Math.round(t.h)+Ht*o:a=n?Math.round(t.h)+Ht*o:Math.round(t.h)-Ht*o,a<0?a+=360:a>=360&&(a-=360),a}function Tn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-_n*o:o===Sn?a=t.s+_n:a=t.s+Sr*o,a>1&&(a=1),n&&o===xn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function En(t,o,n){var a;return n?a=t.v+Nr*o:a=t.v-Ar*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=xn;r>0;r-=1){var i=Nn(a),s=Yt(Et({h:An(i,r,!0),s:Tn(i,r,!0),v:En(i,r,!0)}));n.push(s)}n.push(Yt(a));for(var d=1;d<=Sn;d+=1){var l=Nn(a),c=Yt(Et({h:An(l,d),s:Tn(l,d),v:En(l,d)}));n.push(c)}return o.theme==="dark"?Tr.map(function(p){var u=p.index,f=p.opacity,g=Yt(Er(Et(o.backgroundColor||"#141414"),Et(n[u]),f*100));return g}):n}var xo={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"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Ln=[],Lt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Br(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Vr(t,o){if(o=o||{},t===void 0)throw new Error(Lr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Ln.indexOf(a);r===-1&&(r=Ln.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][n]!==void 0?i=Lt[r][n]:(i=Lt[r][n]=Br(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}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){Or(t,r,n[r])})}return t}function Or(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Ir(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Fr(t,o){Ir(t,"[@ant-design/icons-vue] ".concat(o))}function Vn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function On(t){return _o(t)[0]}function In(t){return t?Array.isArray(t)?t:[t]:[]}var Dr=`
1
+ /*! @ecan-bi/indicator-library@1.0.69 */
2
+ (function(we,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):(we=typeof globalThis<"u"?globalThis:we||self,e(we["@ecan-bi/indicator-library"]={},we.Vue,we.LodashEs,we.AntDesignVue,we.Draggable,null,null,we.Dayjs,null,we.MonacoEditor,null,we.Echarts))})(this,function(we,e,Z,$,Tt,kf,_f,se,xf,er,Sf,tr){var Za;"use strict";function or(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 nr=or(tr),pn=(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},Me="$request",Ve=((Za=window==null?void 0:window.config)==null?void 0:Za.indicatorURL)||"",ve="INDICATOR_TOKEN",un="DATA_LIST",Ye="SELECTED_COMPONENT",fe="GRAPHIC_CONFIG",xe="UPDATE_GRAPHIC_CONFIG",fn="SHOW_STYLE_CONFIG",mn="REFRESH_DATA",Gt="CHARTS_OPTIONS",hn="TABLE_OPTIONS",ar=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",yn="CHANGE_CONDITION",gn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",zt="UPDATE_USED_COMPONENT",bn="MAP_ATTRIBUTE_PROPS",Cn="PAGE_CONFIG",wn={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%"}},rr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},lr=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:Tt},setup(){var x;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(fe),a=e.inject(xe),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(x=window==null?void 0:window.config)==null?void 0:x.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var A,L;const h=r.value;i.value=!0;try{const{data:O}=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,O.success&&((A=s.value)==null||A.push(l),s.value=(L=s.value)==null?void 0:L.concat(p([O.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],A)=>{const L=[];return h.forEach(O=>{L.push({id:O.id,pId:A??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),L},u=async(h,A)=>{var N;let L=0;if(h){const{value:V}=h.dataRef;L=V}const{data:O}=await t.post(`${Ve}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:L},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(s.value=(N=e.unref(s))==null?void 0:N.concat(p(O.data)),A&&e.unref(r)&&await c())},m=h=>{C(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(un,{setDataList:h=>h}),w=e.ref(!1),f=e.ref([]),C=async h=>{if(h){f.value=[],w.value=!0;try{const A=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:L,data:O={}}=A.data;if(w.value=!1,L){const{rows:N=[]}=O;N==null||N.forEach(V=>{var F;const B=((F=V==null?void 0:V.dataViewColumns)==null?void 0:F.map(H=>({...H,show:!0})))||[];f.value=[...e.unref(f),...B]}),g(e.unref(f))}}catch{w.value=!1}}},_=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,A)=>{const L=A[h.oldIndex];if(L){const O={...L,label:L.name,name:L.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await u(void 0,!0),C(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:w,onDataViewIdChange:m,mapGenericType:_,onDragStart:k}}}),Vf="",oe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ir={class:"data-view-list"},sr={class:"columns"},cr={class:"column-item"},dr={class:"column-item-name"};function pr(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{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",sr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{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",cr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",dr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ur=oe(lr,[["render",pr],["__scopeId","data-v-4a66f7d2"]]);function Be(t,o){fr(t)&&(t="100%");var n=mr(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 fr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function mr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ht(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function yr(t,o,n){return{r:Be(t,255)*255,g:Be(o,255)*255,b:Be(n,255)*255}}function Co(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 gr(t,o,n){var a,r,i;if(t=Be(t,360),o=Be(o,100),n=Be(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function br(t,o,n){t=Be(t,255),o=Be(o,255),n=Be(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function Cr(t,o,n){t=Be(t,360)*6,o=Be(o,100),n=Be(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function wr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(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 kn(t){return Ae(t)/255}function Ae(t){return parseInt(t,16)}var _n={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 Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=xr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=yr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=Ht(t.s),r=Ht(t.v),o=Cr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=Ht(t.s),i=Ht(t.l),o=gr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=hr(n),{ok:s,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 kr="[-\\+]?\\d+%?",_r="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(_r,")|(?:").concat(kr,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),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 xr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(_n[t])t=_n[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),a:kn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),a:kn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Yt=2,xn=.16,Sr=.05,Nr=.05,Ar=.15,Sn=5,Nn=4,Tr=[{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 An(t){var o=t.r,n=t.g,a=t.b,r=br(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Wt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(wr(o,n,a,!1))}function Er(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 Tn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Yt*o:Math.round(t.h)+Yt*o:a=n?Math.round(t.h)+Yt*o:Math.round(t.h)-Yt*o,a<0?a+=360:a>=360&&(a-=360),a}function En(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-xn*o:o===Nn?a=t.s+xn:a=t.s+Sr*o,a>1&&(a=1),n&&o===Sn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Ln(t,o,n){var a;return n?a=t.v+Nr*o:a=t.v-Ar*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=Sn;r>0;r-=1){var i=An(a),s=Wt(Et({h:Tn(i,r,!0),s:En(i,r,!0),v:Ln(i,r,!0)}));n.push(s)}n.push(Wt(a));for(var d=1;d<=Nn;d+=1){var l=An(a),c=Wt(Et({h:Tn(l,d),s:En(l,d),v:Ln(l,d)}));n.push(c)}return o.theme==="dark"?Tr.map(function(p){var u=p.index,m=p.opacity,g=Wt(Er(Et(o.backgroundColor||"#141414"),Et(n[u]),m*100));return g}):n}var xo={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"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Vn=[],Lt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Vr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Br(t,o){if(o=o||{},t===void 0)throw new Error(Lr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Vn.indexOf(a);r===-1&&(r=Vn.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][n]!==void 0?i=Lt[r][n]:(i=Lt[r][n]=Vr(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}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){Or(t,r,n[r])})}return t}function Or(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Ir(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Fr(t,o){Ir(t,"[@ant-design/icons-vue] ".concat(o))}function On(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return _o(t)[0]}function Fn(t){return t?Array.isArray(t)?t:[t]:[]}var Dr=`
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
- `,Fn=!1,$r=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dr;e.nextTick(function(){Fn||(typeof window<"u"&&window.document&&window.document.documentElement&&Vr(o,{prepend:!0}),Fn=!0)})},Mr=["icon","primaryColor","secondaryColor"];function vr(t,o){if(t==null)return{};var n=Pr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Pr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Wt(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 Bt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Rr(t){var o=t.primaryColor,n=t.secondaryColor;Bt.primaryColor=o,Bt.secondaryColor=n||On(o),Bt.calculated=!!n}function Ur(){return Wt({},Bt)}var mt=function(o,n){var a=Wt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=vr(a,Mr),l=Bt;if(i&&(l={primaryColor:i,secondaryColor:s||On(i)}),$r(),Fr(Vn(r),"icon should be icon definiton, but got ".concat(r)),!Vn(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Wt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),Wt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};mt.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},mt.inheritAttrs=!1,mt.displayName="IconBase",mt.getTwoToneColors=Ur,mt.setTwoToneColors=Rr;const To=mt;function Gr(t,o){return Wr(t)||Yr(t,o)||Hr(t,o)||zr()}function zr(){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 Hr(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 Yr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function Wr(t){if(Array.isArray(t))return t}function $n(t){var o=In(t),n=Gr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function qr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Kr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Qr(t,o){return el(t)||Zr(t,o)||Jr(t,o)||Xr()}function Xr(){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 Jr(t,o){if(t){if(typeof t=="string")return Mn(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 Mn(t,o)}}function Mn(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 Zr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function el(t){if(Array.isArray(t))return t}function vn(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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function tl(t,o){if(t==null)return{};var n=ol(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ol(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}$n("#1890ff");var ht=function(o,n){var a,r=vn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=tl(r,Kr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),_=d===""||d||s.name==="loading"?"anticon-spin":"",m=c;m===void 0&&u&&(m=-1,f.tabindex=m);var w=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,N=In(p),C=Qr(N,2),x=C[0],y=C[1];return e.createVNode("span",vn({role:"img","aria-label":s.name},f,{onClick:u,class:g}),[e.createVNode(To,{class:_,icon:s,primaryColor:x,secondaryColor:y,style:w},null)])};ht.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},ht.displayName="AntdIcon",ht.inheritAttrs=!1,ht.getTwoToneColor=qr,ht.setTwoToneColor=$n;const ye=ht;var nl={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 al=nl;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){rl(t,r,n[r])})}return t}function rl(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=Pn({},o,n.attrs);return e.createVNode(ye,Pn({},a,{icon:al}),null)};Lo.displayName="AppstoreAddOutlined",Lo.inheritAttrs=!1;const jn=Lo;var ll={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 il=ll;function Rn(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){sl(t,r,n[r])})}return t}function sl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:il}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const cl=Bo;var dl={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 pl=dl;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){ul(t,r,n[r])})}return t}function ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:pl}),null)};Vo.displayName="CaretRightOutlined",Vo.inheritAttrs=!1;const fl=Vo;var ml={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 hl=ml;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){yl(t,r,n[r])})}return t}function yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:hl}),null)};Oo.displayName="CloseOutlined",Oo.inheritAttrs=!1;const qt=Oo;var gl={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 bl=gl;function zn(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){Cl(t,r,n[r])})}return t}function Cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Io=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:bl}),null)};Io.displayName="CopyOutlined",Io.inheritAttrs=!1;const wl=Io;var kl={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 _l=kl;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){xl(t,r,n[r])})}return t}function xl(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=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:_l}),null)};Fo.displayName="DeleteOutlined",Fo.inheritAttrs=!1;const Sl=Fo;var Nl={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 Al=Nl;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){Tl(t,r,n[r])})}return t}function Tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(ye,Yn({},a,{icon:Al}),null)};Do.displayName="DoubleRightOutlined",Do.inheritAttrs=!1;const El=Do;var Ll={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 Bl=Ll;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){Vl(t,r,n[r])})}return t}function Vl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:Bl}),null)};$o.displayName="DownOutlined",$o.inheritAttrs=!1;const Ol=$o;var Il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const Fl=Il;function qn(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 Mo=function(o,n){var a=qn({},o,n.attrs);return e.createVNode(ye,qn({},a,{icon:Fl}),null)};Mo.displayName="InfoCircleOutlined",Mo.inheritAttrs=!1;const $l=Mo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;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){Pl(t,r,n[r])})}return t}function Pl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var vo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(ye,Kn({},a,{icon:vl}),null)};vo.displayName="MenuOutlined",vo.inheritAttrs=!1;const Qn=vo;var jl={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 Rl=jl;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){Ul(t,r,n[r])})}return t}function Ul(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=Xn({},o,n.attrs);return e.createVNode(ye,Xn({},a,{icon:Rl}),null)};Po.displayName="MinusCircleOutlined",Po.inheritAttrs=!1;const Gl=Po;var zl={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 Hl=zl;function Jn(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){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(ye,Jn({},a,{icon:Hl}),null)};jo.displayName="PlusCircleOutlined",jo.inheritAttrs=!1;const Wl=jo;var ql={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 Kl=ql;function Zn(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){Ql(t,r,n[r])})}return t}function Ql(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=Zn({},o,n.attrs);return e.createVNode(ye,Zn({},a,{icon:Kl}),null)};Ro.displayName="PlusOutlined",Ro.inheritAttrs=!1;const Xl=Ro;var Jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ea(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){ei(t,r,n[r])})}return t}function ei(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=ea({},o,n.attrs);return e.createVNode(ye,ea({},a,{icon:Zl}),null)};Uo.displayName="QuestionCircleOutlined",Uo.inheritAttrs=!1;const ti=Uo;var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const ni=oi;function ta(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Go=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(ye,ta({},a,{icon:ni}),null)};Go.displayName="ReloadOutlined",Go.inheritAttrs=!1;const ri=Go;var li={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 ii=li;function oa(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){si(t,r,n[r])})}return t}function si(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(ye,oa({},a,{icon:ii}),null)};zo.displayName="SettingOutlined",zo.inheritAttrs=!1;const ci=zo,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:fl,CaretDownOutlined:cl,AInputSearch:M.InputSearch,ASpin:M.Spin,APagination:M.Pagination,Draggable:Tt},setup(){var E;const t=(E=window==null?void 0:window.config)==null?void 0:E.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var k;return(k=e.unref(a))==null?void 0:k.graphicConfig}),i=e.computed(()=>{var k;return(k=e.unref(r))==null?void 0:k.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const k={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const L=await o.post(`${Be}/diagram/sourceList`,k,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:I,data:V={}}=L.data;if(I){const{rows:B=[],total:F=0}=V;B==null||B.forEach(H=>{var P;H.show=!1,(P=H.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),s.value=B,l.totalResult=+F}}catch{d.value=!1}},u=k=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[k],f=k=>{s.value[k].show=!s.value[k].show},g=()=>{l.currentPage=1,p()},_=Z.debounce(()=>{l.currentPage=1,p()},200),m=(k,L)=>{l.pageSize=L,l.currentPage=k,p()};e.onMounted(()=>{p()});const w=e.inject(fe),N=e.computed(()=>{const k=["classificationList","rowHeaderList","dimensionList"];let L=[];for(const I in e.unref(w))if(Object.prototype.hasOwnProperty.call(e.unref(w),I)&&k.includes(I)){const V=e.unref(w)[I];Array.isArray(V)&&(L=L.concat(V))}return L});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:f,mapScope:u,onSearch:g,onChange:_,onPaginationChange:m,searchText:c,setItemDisabled:(k=[])=>{let L=!1;for(const I of e.unref(N))if(!k.find(B=>B.typeGuid===I.typeGuid)){L=!0;break}return L},onDragStart:(k,L)=>{const I=L.dataViewColumns[k.oldIndex];I&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...I,dataTo:L.dataTo})),L!=null&&L.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(L.hrpIndexVariates)))},getSourceType:k=>k==="0"?"【指标库】":k==="1"?"【视图】":"【其他】"}}}),Lf="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=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",pi,[e.createVNode(s,{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",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:_=>t.onToggleGroup(g)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name)+e.toDisplayString(t.getSourceType(f.dataTo)),1)],8,mi)]),f.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":_=>f.dataViewColumns=_,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:_=>t.onDragStart(_,f)},{item:e.withCtx(({element:_})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(_.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(_.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 Ci=ne(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:ur},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=ne(wi,[["render",ki]]),na={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Tt,AModal:M.Modal,AButton:M.Button},setup(t,{expose:o}){var x;const n=(x=window==null?void 0:window.config)==null?void 0:x.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(fe),s=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=async()=>{try{const y=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:k=[]}=y.data;E&&(c.value=k==null?void 0:k.slice(0,200))}catch(y){console.error(y)}},u=()=>{var I;const y=((I=e.unref(i)[t.type])==null?void 0:I.slice())||[],E=y[t.index],{label:k,name:L}=t.item;E.sort={label:k,columnName:L,type:"CUSTOM",customOrderColumns:e.unref(c)},s({[t.type]:y})};let f=!1;const g=()=>{f=!0},_=e.ref(!1),m=()=>{_.value=!0},w=()=>{_.value=!1},N=()=>{f&&u(),f=!1,w()};return o({showModal:m}),e.watch(_,y=>{var E,k;if(y){const L=(k=(E=t.item)==null?void 0:E.sort)==null?void 0:k.customOrderColumns;L==null?p():c.value=L}else c.value=[];window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),{visible:_,onCancel:N,customSortList:c,onChange:g,onDeleteConfig:()=>{var I;const y=((I=e.unref(i)[t.type])==null?void 0:I.slice())||[],E=y[t.index],{label:k,name:L}=t.item;E.sort={label:k,columnName:L},s({[t.type]:y}),w()}}}}),Bf="",Si={class:"button-wrapper"},Ni={class:"sort-item"};function Ai(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),l=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(l,{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",Si,[e.createVNode(s,{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",Ni,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Ti=ne(xi,[["render",Ai],["__scopeId","data-v-8e16d201"]]),Ei=e.defineComponent({name:"CustomGroupModal",directives:{focus:na},components:{CloseOutlined:qt,AModal:M.Modal,ASelect:M.Select,ASelectOption:M.SelectOption,AButton:M.Button,AInput:M.Input,ACheckbox:M.Checkbox,ACollapse:M.Collapse,ACollapsePanel:M.CollapsePanel,ATag:M.Tag,ACheckableTag:M.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var U;const n=e.inject(Me),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const h=e.unref(c).map(b=>b.title);return new Set(h)}),u=e.ref([]);e.watch(()=>e.unref(c).length,h=>{u.value=new Array(h).fill(!1)});const f=e.computed(()=>{let h=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&h++})}),h}),g=()=>{const h=e.unref(d);if(!h){M.message.error("创建分组名不能空");return}e.unref(p).has(h)?M.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:h,data:[]}),i=!0)},_=h=>{e.unref(c).splice(h,1),i=!0},m=e.ref(null),w=()=>{if(e.unref(f)===0){M.message.error("当前移入分组已选个数为0");return}const h=e.unref(m);if(h==null){M.message.error("请选择移入分组");return}if(!e.unref(c)[h]){M.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const $=e.unref(c)[D];e.unref(c)[D].data=$.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(c)[h].data=[...b,...e.unref(c)[h].data],i=!0},N=h=>{e.unref(u)[h]=!0},C=h=>{e.unref(u)[h]=!1},x=(h,b)=>{const T=h.target.value;e.unref(p).has(T)&&M.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},y=e.inject(fe),E=e.inject(Se),k=e.computed(()=>e.unref(y).source),L=e.computed(()=>e.unref(y).dataViewId),I=e.ref(!1),V=()=>{var K,Q;const h=e.unref(c);let b="";e.unref(I)&&(b=(K=h[0])==null?void 0:K.title);const T=h==null?void 0:h.length,D={};for(let ee=1;ee<T;ee++){const re=h[ee]||{},{title:he,data:me}=re;D[he]=(me==null?void 0:me.map(Te=>Te.label))||[]}const $=((Q=e.unref(y)[t.type])==null?void 0:Q.slice())||[],G=$[t.index];G.customGroup={groupInfoMap:D,otherGroupName:b},E({[t.type]:$})},B=e.ref(!1),F=()=>{B.value=!0},H=()=>{B.value=!1},P=()=>{H(),i&&V(),i=!1},S=()=>{i=!0},O=new Set,A=async()=>{const h=t.item.customGroup||{},b=h.otherGroupName,T=h.groupInfoMap;(b===""||b==null)&&(I.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const $ in T)if(Object.prototype.hasOwnProperty.call(T,$)){const K=T[$].map(Q=>(O.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:$,data:K},D++}await v()},v=async()=>{var h;try{const b=await n.post(`${Be}/diagram/groupvalue`,{source:e.unref(k),dataViewId:e.unref(L),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const $=[];(h=D==null?void 0:D.slice(0,200))==null||h.forEach(G=>{O.has(G)||$.push({label:G,checked:!1})}),e.unref(c)[0].data=$}}catch(b){console.error(b)}};return e.watch(B,h=>{h&&A(),window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),o({showModal:F}),{visible:B,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:I,selectCount:f,createGroupTitle:d,onAddGroup:g,onDeleteGroup:_,onMoveInGroup:w,selectGroupIndex:m,onEditTitle:N,onTitleChange:x,onFinishEditTitle:C,onUseOtherGroup:S,customGroupEditTitleList:u}}}),Vf="",Of="",Li={class:"custom-group-header"},Bi={class:"move-and-create"},Vi={class:"select-tip"},Oi={class:"select-count"},Ii={class:"create-group"},Fi={class:"custom-group-content"},Di=["onClick"],$i={class:"extra"},Mi={class:"custom-group-list"},vi={class:"text"};function Pi(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),_=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("a-collapse"),w=e.resolveComponent("a-modal"),N=e.resolveDirective("focus");return e.openBlock(),e.createBlock(w,{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",Li,[e.createElementVNode("div",Bi,[e.createElementVNode("div",null,[e.createElementVNode("span",Vi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Oi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=C=>t.selectGroupIndex=C),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(C,x)=>(e.openBlock(),e.createBlock(s,{key:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ii,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=C=>t.createGroupTitle=C),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=C=>t.useOtherGroup=C),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Fi,[e.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=C=>t.activeKey=C),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(C,x)=>(e.openBlock(),e.createBlock(_,{key:x},{header:e.withCtx(()=>[t.customGroupEditTitleList[x]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:C.title,size:"small",onChange:y=>t.onTitleChange(y,x),onBlur:y=>t.onFinishEditTitle(x),onPressEnter:y=>t.onFinishEditTitle(x)},null,8,["value","onChange","onBlur","onPressEnter"])),[[N]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(y=>t.onEditTitle(x),["prevent","stop"])},e.toDisplayString(C.title),9,Di))]),extra:e.withCtx(()=>[e.createElementVNode("div",$i,[x===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),x!==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(y=>t.onDeleteGroup(x),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.data,(y,E)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:y.checked,"onUpdate:checked":k=>y.checked=k,class:"custom-group",key:E},{default:e.withCtx(()=>[e.createElementVNode("span",vi,e.toDisplayString(y.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ji=ne(Ei,[["render",Pi],["__scopeId","data-v-7e3049d2"]]);let ke=(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};var Ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ho={},Ui={get exports(){return Ho},set exports(t){Ho=t}};(function(t,o){(function(n,a){t.exports=a()})(Ri,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return f?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Ui);const Gi=Ho;se.extend(Gi);const zi=e.defineComponent({name:"Condition",components:{CloseOutlined:qt,DownOutlined:Ol,AppstoreAddOutlined:jn,ASelect:M.Select,AInput:M.Input,ADatePicker:M.DatePicker,AButton:M.Button,ADropdown:M.Dropdown,AMenu:M.Menu,AMenuItem:M.MenuItem,ASubMenu:M.SubMenu,APopover:M.Popover,ATabs:M.Tabs,ATabPane:M.TabPane,ARadioGroup:M.RadioGroup,ARadio:M.Radio,AInputNumber:M.InputNumber,ASelectOption:M.SelectOption,MenuOutlined:Qn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var it,st,Nt,ct,Ee,Qe,tt,ot,ze,dt,pt,ut,nt;const o=(it=window==null?void 0:window.config)==null?void 0:it.pageId,n=e.inject(fe),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(yn),s=e.inject(Pe),d=e.ref(!1),l=se(),c=e.computed(()=>{var Y;const z=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:J="",id:te="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${te}-startTime`,label:`${J||te}-开始时间值`,keyName:`${J||te}-startTime`,id:te},{value:`${te}-endTime`,label:`${J||te}-结束时间值`,keyName:`${J||te}-endTime`,id:te}):z.push({value:te,label:`${J||te}`,keyName:`${J||te}`,id:te})}),z}),p=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.source}),f=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},_=[{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({expression:"rangeValue",unit:"YEAR",around:"before"}),w=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:""}]),N=[{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"}],C=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],x=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],y=e.ref({fieldName:(st=t.data)==null?void 0:st.fieldName,fieldType:(Nt=t.data)==null?void 0:Nt.fieldType,rule:(ct=t.data)==null?void 0:ct.rule,id:(Ee=t.data)==null?void 0:Ee.id,fieldValue:E(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((dt=t.data)==null?void 0:dt.dataType)||"",componentId:((pt=t.data)==null?void 0:pt.componentId)||"",useCurrentTime:!!((ut=t.data)!=null&&ut.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function E(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const J=e.unref(c).find(te=>te.keyName===X);return J?J.value:X}else return X}const k=e.ref(!1),L=e.computed(()=>y.value.fieldType==="DATE"),I=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"];if(X.includes(z)){let J=[];for(const te in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),te)&&!["controlList","sqlConditions"].includes(te)){const ce=e.unref(n)[te];Array.isArray(ce)&&(X.includes(te)?J=J.concat(ce.filter(Le=>Le.show)):J=J.concat(ce))}Y=J}else["leftAxisList","rightAxisList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:V,deleteCondition:B,addCondition:F}=e.inject(hn,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),H=()=>{B(t.index,t.path)};e.watch(y,z=>{const Y=Z.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{y.value.fieldValue="",y.value.useCurrentTime=z});const P=z=>{var R;const Y=e.unref(I).find(W=>W.value===z)||{},{name:X,genericType:J,id:te,label:ce,typeGuid:Le,indexCode:At,indexCodeNum:j}=Y;y.value={id:te,fieldName:X,fieldType:J,label:ce,rule:"",fieldValue:J==="DATE"?null:void 0,targetSource:"",typeGuid:Le,indexCode:At,indexCodeNum:j,dataType:"",useCurrentTime:!1,keyValue:((R=e.unref(y))==null?void 0:R.keyValue)||ke()}},S=z=>{const Y=e.unref(c).find(X=>X.value===z)||{};e.unref(y).componentId=Y.id||""},O=e.computed(()=>{const z=e.unref(y).fieldType;return console.log("unref(condition)",e.unref(y)),z==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),A=e.computed(()=>{let z="";const Y=e.unref(O).find(X=>X.value===e.unref(y).rule);return Y&&(z=Y.label),z}),v=e.computed(()=>{let z={fontSize:"12px"};return e.unref(A)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),U=e.ref([]),h=async()=>{var z;if(!(e.unref(U).length>0))try{const Y=await a.post(`${Be}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(y).fieldName,hrpIndexTypeGuid:e.unref(y).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:J=[]}=Y.data;X&&(U.value=(z=J==null?void 0:J.slice(0,200))==null?void 0:z.map(te=>({label:te,value:te})))}catch(Y){console.error(Y)}},b=z=>{e.unref(y).rule=z,e.unref(y).fieldValue=e.unref(y).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&h()},T=z=>{e.unref(y).dataType=z,e.unref(y).fieldValue=""},D=e.ref(),$=z=>{D.value=z,e.unref(y).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(y).rule=Y[0],e.unref(y).dataType=Y[1],e.unref(y).dateFormat=Y[2],e.unref(y).fieldValue=""};e.onMounted(()=>{var J,te,ce,Le,At,j,R,W;if(y.value.dataType=((J=t.data)==null?void 0:J.dataType)||"",y.value.componentId=((te=t.data)==null?void 0:te.componentId)||"",y.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(y).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(y).dateFormat=(Le=t.data)==null?void 0:Le.dateFormat,e.unref(y).activeKey=q,e.unref(y).calcWays=((At=t.data)==null?void 0:At.calcWays)||[],e.unref(y).dateCalcTypes=ie,e.unref(y).useCurrentTime&&e.unref(y).dataType!=="component"&&(d.value=!0),q===5){const ae=e.unref(y).calcWays[0];if(ae){const oe=ae.split("-");e.unref(m).expression=oe[0],e.unref(m).around=oe[1]}e.unref(m).unit=ie[0]||"YEAR"}else{e.unref(y).radioValue=((j=t.data)==null?void 0:j.radioValue)||"";const ae=e.unref(w).find(oe=>{var le;return oe.key===((le=t.data)==null?void 0:le.activeKey)});ae&&Te(ae,t.data)}}else D.value=((W=(R=t.data)==null?void 0:R.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=y.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&h()});const K=z=>{if(e.unref(y).activeKey===z){e.unref(w)[z].radioValue=e.unref(y).radioValue,e.unref(w)[e.unref(y).activeKey]&&(e.unref(w)[e.unref(y).activeKey].radioValue=e.unref(y).radioValue,e.unref(y).radioValue==="1"?e.unref(w)[z].beforeNum=e.unref(y).calcWays[0]:e.unref(y).radioValue==="2"&&(e.unref(w)[z].afterNum=e.unref(y).calcWays[0]));return}e.unref(w).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{f.value=!0;const X=z.target.value,J=Y.type,te=e.unref(y).dateFormat,ce=Math.abs(Y.beforeNum),Le=Y.afterNum;Y.value=de(X,J,te,ce,Le)},ee=z=>{const Y=e.unref(y).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const J=e.unref(y).dateFormat,te=e.unref(y).radioValue;let ce=0,Le=0;return te==="1"?ce=Math.abs(e.unref(y).calcWays[0]):te==="2"&&(Le=e.unref(y).calcWays[0]),de(te,X,J,ce,Le)},re=(z,Y,X,J)=>{if(f.value=!0,Y.radioValue===J){const te=z.target.value;X==="+"?Y.value=se().add(te,Y.type).format(e.unref(y).dateFormat):Y.value=se().subtract(te,Y.type).format(e.unref(y).dateFormat)}},he=(z,Y)=>{e.unref(y).calcWays||(e.unref(y).calcWays=[]),e.unref(y).activeKey=Y,e.unref(y).radioValue=z.radioValue,z.radioValue==="1"?e.unref(y).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(y).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(y).calcWays[0]="0":e.unref(y).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(y).calcWays[0]="END"),Y===0?e.unref(y).dateCalcTypes=["YEAR"]:Y===1?e.unref(y).dateCalcTypes=["QUARTER"]:Y===2?e.unref(y).dateCalcTypes=["MONTH"]:Y===3?e.unref(y).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(y).dateCalcTypes=["DAY"]),k.value=!1},me=()=>{e.unref(y).activeKey=5,e.unref(y).dateCalcTypes=[e.unref(m).unit],e.unref(y).calcWays[0]=`${e.unref(m).expression}-${e.unref(m).around}`,k.value=!1};function Te(z,Y){const{radioValue:X="",calcWays:J=[]}=Y;z.radioValue=X,J!=null&&J.length&&(X==="1"?z.beforeNum=Math.abs(J[0]):X==="2"&&(z.afterNum=J[0]))}function de(z,Y,X,J,te){if(z==="1")return se().subtract(J,Y).format(X);if(z==="2")return se().add(te,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(y).rule));return{fieldOptions:I,ruleOptions:O,onFieldChange:P,condition:y,valueOptions:U,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:$,fieldValues:D,onDelete:H,isDateType:L,formatList:_,tabDateList:w,compareList:N,menuRule:C,dateBtnLabel:A,downIconStyle:v,popoverVisible:k,dateRadioStyle:g,showTime:f,controlList:c,dataTypeList:x,customTabData:m,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:re,okDatePickConfig:he,onChangeComponent:S,filterOption:$e,okCustomConfig:me,clickConditionMenu:({key:z})=>{F(t.path,t.index,z==="2"?"||":"&&")}}}}),If="",Ff="",Hi={class:"condition"},Yi=["title"],Wi={class:"rule"},qi={class:"data-type"},Ki={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Qi={class:"popover-content-wrap"},Xi={key:0,class:"use-current-time"},Ji={class:"tabFilterRadio"},Zi={key:0},es={key:1},ts={style:{"margin-left":"10px"}},os={style:{"margin-left":"10px"}},ns={style:{position:"absolute",bottom:"10px"}},as={style:{display:"flex"}},rs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ls(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=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"),g=e.resolveComponent("a-dropdown"),_=e.resolveComponent("a-date-picker"),m=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-input-number"),N=e.resolveComponent("a-radio"),C=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),y=e.resolveComponent("a-tabs"),E=e.resolveComponent("appstore-add-outlined"),k=e.resolveComponent("a-popover"),L=e.resolveComponent("a-input"),I=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:B.label},e.toDisplayString(B.label),9,Yi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Wi,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,B=>(e.openBlock(),e.createBlock(c,{key:B.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,F=>{var H;return e.openBlock(),e.createBlock(c,{key:F.value,disabled:F.value==="component"&&!((H=t.controlList)!=null&&H.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value?"color: #1890FF;":"")},e.toDisplayString(F.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.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",qi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ki,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(_,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(_,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=B=>t.condition.fieldValue=B),format:t.condition.dateFormat},null,8,["value","format"]))],64)):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]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(k,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=B=>t.popoverVisible=B),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Qi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(m,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=B=>t.isUseCurrentTime=B)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(y,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(B,F)=>(e.openBlock(),e.createBlock(x,{key:F,tab:B.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(C,{value:B.radioValue,"onUpdate:value":H=>B.radioValue=H,onChange:H=>t.changeRadioValue(H,B)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Zi,"相对当前时间:"+e.toDisplayString(B.value),1)):(e.openBlock(),e.createElementBlock("div",es,"相对当前时间:"+e.toDisplayString(t.getFieldValue(F)),1)),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(w,{value:B.beforeNum,"onUpdate:value":H=>B.beforeNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ts,e.toDisplayString(B.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(w,{value:B.afterNum,"onUpdate:value":H=>B.afterNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",os,e.toDisplayString(B.afterLabel),1)]),_:2},1032,["style"]),B.beforeText?(e.openBlock(),e.createBlock(N,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),B.afterText?(e.openBlock(),e.createBlock(N,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ns,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=H=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:H=>t.okDatePickConfig(B,F)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(x,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=B=>t.customTabData.expression=B),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=B=>t.customTabData.unit=B),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=B=>t.customTabData.around=B)},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",rs,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=B=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=B=>{t.popoverVisible=!0})},[e.createVNode(E)])]),_: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"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(L,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=B=>t.condition.fieldValue=B)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(I,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const is=ne(zi,[["render",ls],["__scopeId","data-v-072e575a"]]),ss=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:is}}),Df="",cs={key:0,class:"condition-list"},ds={key:0,class:"condition-container"},ps={key:0,class:"condition-text"},us={key:1,class:"condition-text"},fs={class:"conditions"};function ms(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",ds,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",ps,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",us,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",fs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const hs=ne(ss,[["render",ms],["__scopeId","data-v-553c1496"]]),ys=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:M.Select,AInput:M.Input,AInputNumber:M.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=Z.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),$f="",aa=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),gs={class:"truncations"},bs={class:"rule"},Cs={class:"field-value"},ws={class:"field-value"},ks=aa(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),_s=aa(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),xs=["onClick"];function Ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",gs,[(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",bs,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Cs,[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",ws,[ks,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),_s]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,xs)]))),128))])}const Ns=ne(ys,[["render",Ss],["__scopeId","data-v-f543c690"]]),ge=(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},As=t=>t.replace(/\\n/g,`
59
- `),yt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},ra=(t,o)=>{var m;const n=Z.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;ia(n,o);const u=n,f=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const w of f){const N=Je((w==null?void 0:w.conditions)||[]);if(N!=null&&N.length){const C=N.filter(x=>sa(x,o)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const y=sa(x,o),E={};return x!=null&&x.dateFormat&&(E.format=x.dateFormat),{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:y.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0,indexCode:x.indexCode,typeGuid:x.typeGuid,indexCodeNum:x.indexCodeNum,...E}});if(C!=null&&C.length)for(const x of C)g.find(y=>y.keyName===x.keyName)||g.push(x)}}const _=g.length;for(let w=0;w<_;w++){const N=g[w];if(N&&!((m=Object.keys(N))!=null&&m.length)||(N==null?void 0:N.conditionKey)==="parentCode")continue;const{id:C,keyName:x,prop:y,format:E,dataType:k="component",customValue:L}=N,I=la(N);Yo({sqlCondition:I,renderUsedComponents:o,id:C,dateFormat:E,prop:y,keyName:x,dataType:k,customValue:L}),u.push(I)}for(let w=u.length-1;w>=0;w--){const N=u[w];N.globalCondition||Je(u).find(x=>x.alias===N.alias&&x.globalCondition)&&u.splice(w,1)}return u},Kt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Yo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function la(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:f="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:f}}const Ts=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function ia(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)ia(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=la(n);Yo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Ts)delete n[p]}}function Yo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,f=n.find(x=>x.id===a),{value:g,format:_="YYYY-MM-DD",operate:m,type:w="",useCurrentTime:N}=f||{},C=r||_;if(ge(w,"date")){let x;if(N?x=se():x=se(g),m&&g){const{mode:y,type:E,value:k}=m;if(k)switch(E){case"add":x=x.add(k,y);break;case"minus":x=x.subtract(k,y);break}}if(c&&p&&u)switch(u){case"add":x=x.add(c,p);break;case"minus":x=x.subtract(c,p);break}o.fieldValue=(x==null?void 0:x.format(C))||"",o.dateFormat=C}else if(w==="ecanRangePicker"){const{interval:x,intervalUnit:y,startTime:E,endTime:k}=f||{};let L=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(L=V[V.length-1])}if(!L)return;let I=null;if(N&&(L==="startTime"?I=se().subtract(x,y):L==="endTime"&&(I=se())),f[L]&&(I=se(f[L])),m){const{type:V,value:B,mode:F}=m;switch(V){case"add":I=I&&I.add(B,F);break;case"minus":I=I&&I.subtract(B,F)}}if(c&&p&&u)switch(u){case"add":I=I&&I.add(c,p);break;case"minus":I=I&&I.subtract(c,p)}if(I&&(o.fieldValue=I==null?void 0:I.format(C)),L==="rangeValue"&&E&&k){const V=Es(C);V&&(o.fieldValue=se(k).diff(se(E),V)+1)}o.dateFormat=C}else{const x=g&&g.match(/\{(.+?)\}/g);x!=null&&x.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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;case"ecanImage":o="click";break}return o};function sa(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}function Es(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:hs,TruncationList:Ns,AModal:M.Modal,AButton:M.Button,ATabs:M.Tabs,ATabPane:M.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(fe),i=e.inject(Se),s=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),c=e.inject(Gt),p=e.ref([]),u=e.ref([]),f=e.ref(!1),g=S=>{var O;for(const A of S)(O=A.conditions)!=null&&O.length?g(A.conditions):A.keyValue=ke()};e.watch(f,S=>{var O,A,v,U;if(S){if(Array.isArray((O=t.item)==null?void 0:O.conditions)){const h=Z.cloneDeep(((A=t.item)==null?void 0:A.conditions)||[]);g(h),p.value=h}Array.isArray((v=t.item)==null?void 0:v.truncations)?u.value=Z.cloneDeep((U=t.item)==null?void 0:U.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let _=!1;const m=S=>{var O;_=!0,e.unref(p)==null||((O=e.unref(p))==null?void 0:O.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:ke()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:ke()}))};e.provide(hn,{updateCondition(S,O,A){var h;_=!0;let v=e.unref(p);const U=A.split("-");if(U!=null&&U.length)for(const b of U)if(v[b])v=(h=v[b])==null?void 0:h.conditions;else break;Array.isArray(v)&&v[O]&&(v[O]=S)},deleteCondition(S,O){var U,h,b;_=!0;let A=e.unref(p);const v=O.split("-");if(v!=null&&v.length){for(const T of v)if(A[T])A=(U=A[T])==null?void 0:U.conditions;else break;if(Array.isArray(A)&&A[S])if(A.splice(S,1),A.length===1){if(v.length>0){const T=v.length-1,D=v[T],$=v.slice(0,T);let G=e.unref(p),K="";for(const Q of $)if(G[Q])K=(h=G[Q])==null?void 0:h.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===A[0].join){if(Array.isArray(A[0].conditions)){const Q=Z.cloneDeep(A[0].conditions);G.splice(+D,1),G.splice(+D,0,...Q)}}else G[D]=A[0]}}else A.length===0&&(p.value=[])}},addCondition(S,O,A){var b,T;_=!0;let v=e.unref(p),U="";const h=S.split("-");if(h!=null&&h.length){for(const D of h)if(v[D])U=(b=v[D])==null?void 0:b.join,v=(T=v[D])==null?void 0:T.conditions;else break;if(U===A)v.splice(O+1,0,{keyValue:ke()});else{const D=Z.cloneDeep(v[O]);v[O]={join:A,conditions:[D,{keyValue:ke()}]}}}}});const w=S=>{_=!0,u.value=S},N=e.computed(()=>{var O;const S=[];return(O=e.unref(s))==null||O.forEach(A=>{const{keyName:v="",id:U="",type:h}=A;h==="ecanRangePicker"?S.push({value:`${U}-startTime`,label:`${v||U}-开始时间值`,keyName:`${v||U}-startTime`},{value:`${U}-endTime`,label:`${v||U}-结束时间值`,keyName:`${v||U}-endTime`}):S.push({value:U,label:`${v||U}`,keyName:`${v||U}`})}),S}),C=()=>{var b,T,D;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),O=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],A=Je(Z.cloneDeep(O[t.index].conditions));O[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(O[t.index].truncations=e.unref(u));const v=Je(e.unref(p));for(const $ of v)if($.dataType==="component"&&$.fieldValue){const G=e.unref(N).find(K=>K.value===$.fieldValue);G&&($.fieldValue=G.keyName)}const U=A.filter($=>!v.find(G=>G.componentId===$.componentId)).filter($=>!S.find(G=>G.id===$.componentId)),h=v.filter($=>!A.find(G=>G.componentId===$.componentId));x(U,h),i({[t.type]:O,sqlConditions:ra({...e.unref(r),[t.type]:O},e.unref(s))})};function x(S,O){var v;const A=S.map(U=>({...U,delete:!0})).concat(O.map(U=>({...U,add:!0})));for(const U of A){const h=e.unref(s).find(b=>b.id===U.componentId);if(h){const{type:b,id:T,events:D=[]}=h,$=Qt(b);if(U.add)D.find(G=>{var K;return G.on===$&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||c({id:T,events:[...D,{on:$,target:(v=e.unref(l))==null?void 0:v.id,emit:"refreshData"}].reverse()});else if(U.delete){const G=D.findIndex(K=>{var Q;return K.on===$&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(D.splice(G,1),c({id:T,events:D}))}}}}const y=()=>{f.value=!0},E=()=>{p.value=[],f.value=!1},k=()=>{_&&C(),_=!1,E()},L=()=>{E()},I=e.inject(Me),V=e.unref(e.inject(ve)),B=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(yn,F);const H=async S=>{var O;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:A,indexCode:v}=S,U=await I.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:B,dataSourceId:e.unref(d),indexGuid:A,indexCode:v},{headers:{Authentication:V,operateContext:"ygt"}}),{success:h,data:b=[]}=U.data;h&&((O=b==null?void 0:b.dataViewColumns)!=null&&O.length)&&(F.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(A){console.error(A)}};return e.watch(()=>t.item,S=>{S&&f.value&&H(S)}),o({showModal:y}),{visible:f,onOk:k,onCancel:L,handleTitle:a,conditionList:p,truncationList:u,addCondition:m,onUpdatetruncation:w,activeKey:n}}}),Mf="",Bs={class:"header"},Vs={class:"header"};function Os(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=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:"55%",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","dimensionList"].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(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Bs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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(l,{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",Vs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{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 Is=ne(Ls,[["render",Os],["__scopeId","data-v-498bb1e7"]]),Fs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:M.Input,AModal:M.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.ref(),s=p=>{const{showLabel:u="",label:f=""}=p;i.value=u||f||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),vf="",Ds=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),$s={class:"config-name"},Ms=Ds(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function vs(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[Ms,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ps=ne(Fs,[["render",vs],["__scopeId","data-v-de6a1755"]]),js=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:M.Select,AModal:M.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(Gt),l=e.ref(),c=e.computed(()=>{var N;return(N=e.unref(i))==null?void 0:N.filter(C=>C.keyName!=="")});let p=[];const u=N=>{const{sortCpnts:C=[]}=N;p=Z.cloneDeep(C),l.value=Z.cloneDeep(C),n.value=!0},f=()=>{n.value=!1},g=()=>{var E,k;const N=Je(((E=e.unref(a))==null?void 0:E.controlList)||[]),C=p.filter(L=>!e.unref(l).includes(L)).filter(L=>!N.find(I=>I.id===L)),x=e.unref(l).filter(L=>!p.includes(L)).filter(L=>!N.find(I=>I.id===L)),y=C.map(L=>({componentId:L,delete:!0})).concat(x.map(L=>({componentId:L,add:!0})));for(const L of y){const I=e.unref(i).find(V=>V.id===L.componentId);if(I){const{type:V,id:B,events:F=[]}=I,H=Qt(V);if(L.add)F.find(P=>{var S;return P.on===H&&P.target===((S=e.unref(s))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:B,events:[...F,{on:H,target:(k=e.unref(s))==null?void 0:k.id,emit:"refreshData"}].reverse()});else if(L.delete){const P=F.findIndex(S=>{var O;return S.on===H&&S.target===((O=e.unref(s))==null?void 0:O.id)&&S.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:B,events:F}))}}}},_=()=>{var C;g();const N=((C=e.unref(a)[t.type])==null?void 0:C.slice())||[];N[t.index].sortCpnts=l.value,r({[t.type]:N}),f()},m=()=>{f()},w=(N,C)=>{var x;return(x=C==null?void 0:C.keyName)==null?void 0:x.toLowerCase().includes(N==null?void 0:N.toLowerCase())};return o({showModal:u}),{visible:n,onOk:_,onCancel:m,idFilterOption:w,fieldName:l,usedComponentList:c}}}),Pf="",Rs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Us={class:"sort-by-cpnt"},Gs=Rs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function zs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[Gs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Hs=ne(js,[["render",zs],["__scopeId","data-v-08af1ef8"]]),Ys=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:M.Select,AModal:M.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(Se),i=e.ref(),s=e.ref([]),d=(f,g)=>{const{dimByCount:_=""}=f;i.value=_,s.value=g.filter(m=>["DIM","BUILT_IN_DIM"].includes(m.scope)).map(m=>({label:m.title||m.name,value:m.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const f=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];f[t.index].dimByCount=i.value,r({[t.type]:f}),l()},p=()=>{l()},u=(f,g)=>{var _;return(_=g==null?void 0:g.label)==null?void 0:_.toLowerCase().includes(f==null?void 0:f.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),jf="",Ws=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),qs={class:"dim-by-count"},Ks=Ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Qs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[Ks,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Xs=ne(Ys,[["render",Qs],["__scopeId","data-v-e8608437"]]),Wo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:Wo(t,r.children)&&(n=Wo(t,r.children)))}return n},Js=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:M.Row,ACol:M.Col,ATextarea:M.Textarea,APopover:M.Popover,AInputSearch:M.InputSearch,ATree:M.Tree,ARadioGroup:M.RadioGroup,ARadioButton:M.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(fe),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(B=>{var F;return B.id!==((F=t.item)==null?void 0:F.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),f=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),_=e.ref(""),m=V=>{const B=document.getElementById("calTextArea");let F=f.value;if(document.selection){const H=document.selection.createRange();H.text=V}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const H=B.selectionStart,P=B.selectionEnd;let S=H;F=F.substring(0,H)+V+F.substring(P,F.length),S+=V.length,B.selectionStart=B.selectionEnd=S}else F+=V;f.value=F},w=["+","-","*","/","(",")"],N=(V,B)=>{let F="";switch(B){case"name":{F="${"+V+"}";break}case"function":{F=V+"()";break}default:F=V}m(F)},C=[],x=e.ref([]),y=e.ref(!0),E=e.ref([]),k=V=>{var B;for(const F of V)(B=F==null?void 0:F.children)!=null&&B.length?k(F.children):C.push({key:F.key,title:F.title})},L=async()=>{try{const V=await n.get(`${Be}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:F=[]}=V.data;B&&(F!=null&&F.length)&&(k(F),E.value=F)}catch(V){console.error(V)}},I=V=>{x.value=V,y.value=!1};return e.watch(_,V=>{const B=C.map(F=>F.title.indexOf(V)>-1?Wo(F.key,E.value):null).filter((F,H,P)=>F&&P.indexOf(F)===H);x.value=B,_.value=V,y.value=!0}),e.onMounted(()=>{L()}),{fieldList:p,varList:u,myValue:f,calculMethods:w,funcDescsData:E,searchFuncValue:_,expandedKeys:x,autoExpandParent:y,activeKey:g,selectedElem:N,onExpand:I}}}),Rf="",Uf="",Zs={class:"formula-calculation"},ec={class:"field-area"},tc={style:{"text-align":"center",padding:"10px 0"}},oc=["onClick"],nc=["onClick"],ac={class:"cal_right_bottom"},rc={class:"cal_fu"},lc=["onClick"],ic={class:"function-wrap"},sc={class:"wrap-search"},cc={class:"tree-box"},dc={key:0},pc={style:{color:"#f50"}},uc={key:1},fc=["onClick"],mc={class:"cal_a"};function hc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),f=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),_=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Zs,[e.createVNode(_,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=m=>t.activeKey=m),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:N=>t.selectedElem(m.label,"name")},e.toDisplayString(m.label),9,oc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:N=>t.selectedElem(m.variableName,"name")},e.toDisplayString(m.variableName),9,nc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=m=>t.myValue=m),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ac,[e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(m,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:N=>t.selectedElem(m,"symbol"),key:w},e.toDisplayString(m),9,lc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=m=>t.searchFuncValue=m),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",cc,[e.createVNode(u,{"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",dc,[e.createTextVNode(e.toDisplayString(m.substr(0,m.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",pc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(m.substr(m.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",uc,e.toDisplayString(m),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:N=>t.selectedElem(m,"function")},"插入",8,fc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createTextVNode(" 更多函数 "),e.createVNode(f,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const yc=ne(Js,[["render",hc],["__scopeId","data-v-ba051d9b"]]),gc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:yc,AForm:M.Form,AModal:M.Modal,AFormItem:M.FormItem,AInput:M.Input,ASelect:M.Select,ASelectOption:M.SelectOption,ATextarea:M.Textarea,AInputNumber:M.InputNumber,ATooltip:M.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(fe),r=e.inject(Se),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const O of P)Object.prototype.hasOwnProperty.call(e.unref(a),O)&&(S=S.concat(e.unref(a)[O]));return S}),l={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},f=e.ref({}),g=e.ref(),_=e.ref(!1),m=e.ref();e.watch(_,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:O,formula:A,builtInValueSource:v,builtInFormula:U,builtInCalcWay:h}=t.item;if(m.value={label:S,calcType:O,formula:A,builtInValueSource:v,builtInFormula:U,builtInCalcWay:h},U==="DATE_OFFSET"){const b=h.split("-");(b==null?void 0:b.length)===3&&(f.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(m.value=Z.cloneDeep(p),f.value=Z.cloneDeep(u));else m.value=Z.cloneDeep(p),f.value=Z.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let w=!1;const N=()=>{w=!0},C=P=>{const S=e.unref(i).find(O=>O.id===P);S&&(m.value.builtInCalcWay=S.keyName),w=!0},x=()=>{var v;const P=((v=e.unref(a)[t.type])==null?void 0:v.slice())||[],{label:S,builtInFormula:O}=e.unref(m)||{},A={};if(O==="DATE_OFFSET"&&(A.builtInCalcWay=`${e.unref(f).value}-${e.unref(f).unit}-${e.unref(f).around}`),t.mode==="add"){const U=ke();P.push({...e.unref(m),...A,id:U,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(m),...A,name:S});r({[t.type]:P})},y=()=>{_.value=!0},E=()=>{_.value=!1},k=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const O=e.unref(d).find(A=>A.label===S);return O?O.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},L=e.computed(()=>{let P={label:[{required:!0,validator:k,trigger:"change"}]};return m.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),I=()=>{g.value.validate().then(()=>{w&&x(),w=!1,E()})},V=()=>{g.value.clearValidate(),E()},B=()=>{w=!0,e.unref(m).builtInCalcWay=""},F=e.computed(()=>{let P="";const S=e.unref(m).builtInCalcWay,O=e.unref(m).builtInValueSource;if(!O||!S)return P;switch(e.unref(m).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+O+"】由小到大在所有值中的排名":P="【"+O+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
60
- `,S==="ASC"?P=P+"【"+O+"】由小到大的组内的排名":P=P+"【"+O+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let A="";switch(S){case"SUM":{A="求和";break}case"AVG":{A="求平均值";break}case"MIN":{A="求最小值";break}case"MAX":{A="求最大值";break}}P="将所有【"+O+"】"+A;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let A="";switch(P=`所有【】的
61
- `,S){case"SUM":{A="求和";break}case"AVG":{A="求平均值";break}case"MIN":{A="求最小值";break}case"MAX":{A="求最大值";break}}P=P+"将所有【"+O+"】"+A;break}}return P}),H=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:y}),{visible:_,onCancel:V,labelCol:l,wrapperCol:c,formState:m,builtInValueSourceList:s,onOK:I,onChange:N,formRules:L,accessLogic:F,formRef:g,onChangeBuiltInFormula:B,componentList:i,onChangeComponent:C,filterOption:H,offsetConfig:f}}}),Gf="",zf="",bc={key:0,class:"accesstip"},Cc={style:{display:"flex","align-items":"center"}};function wc(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),_=e.resolveComponent("a-tooltip"),m=e.resolveComponent("a-form"),w=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(w,{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(m,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=N=>t.formState.label=N),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]=N=>t.formState.calcType=N),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=N=>t.formState.formula=N),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","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]=N=>t.formState.builtInFormula=N),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{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]=N=>t.formState.builtInValueSource=N),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(N,C)=>(e.openBlock(),e.createBlock(l,{key:C,value:N.label,disabled:t.mode==="edit"&&t.item.label===N.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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]=N=>t.formState.builtInCalcWay=N),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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",bc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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"]))],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,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=N=>t.formState.builtInValueSource=N),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",Cc,[e.createVNode(f,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=N=>t.offsetConfig.value=N),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=N=>t.offsetConfig.unit=N),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=N=>t.offsetConfig.around=N),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(_,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const kc=ne(gc,[["render",wc],["__scopeId","data-v-33575cd9"]]),_c=e.defineComponent({name:"DataConfigCard",directives:{focus:na},components:{CalculationModal:kc,FilterModal:Is,CustomGroupModal:ji,SettingOutlined:ci,DeleteOutlined:Sl,CopyOutlined:wl,InfoCircleOutlined:$l,CustomSortModal:Ti,PlusOutlined:Xl,ACard:M.Card,ACheckbox:M.Checkbox,AInput:M.Input,ADropdown:M.Dropdown,AMenu:M.Menu,ASubMenu:M.SubMenu,AMenuItem:M.MenuItem,AMenuDivider:M.MenuDivider,ASelect:M.Select,APopover:M.Popover,Draggable:Tt,ConfigName:Ps,SortByCpnt:Hs,DimByCount:Xs},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(fe),a=e.inject(Se),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(j={})=>{var q;const{type:R}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(j.scope)?i.includes(R)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(j.scope)&&s.includes(R)&&(W=!0),R==="dimensionList"){const ie=((q=e.unref(n)[R])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(j="{}")=>{var R,W;try{const q=JSON.parse(j);if(!c(q))return;const ie=((R=e.unref(n)[t.type])==null?void 0:R.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(oe=>{oe.show=!1}),g(ie,q),q.randomKey=ke(),ie.push(q);let ae=[];if(["IDX","BUILT_IN_IDX"].includes(q.scope)){const oe=sessionStorage.getItem("indicator-variates");if(oe){const le=JSON.parse(oe);if(le!=null&&le.length){ae=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of le)ae.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:ke()})}}}a({[t.type]:ie,variableList:ae,variableConditions:Kt(ae,r)}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},f=(j="{}")=>{var R;try{const{cardItem:W,type:q,index:ie}=JSON.parse(j);if(!c(W)||q===t.type)return;const ae=((R=e.unref(n)[t.type])==null?void 0:R.slice())||[];g(ae,W),ae.push(W);const oe=e.unref(n)[q].slice()||[];oe.splice(ie,1),a({[t.type]:ae,[q]:oe})}catch(W){console.error(W)}};function g(j,R){const W=[];if(j.forEach(q=>{q.label.includes(R.label)&&W.push(q.label.split(R.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){R.label=R.label+q;break}}}const _=(j,R)=>{var ie,ae;const W=(ie=j.target)==null?void 0:ie.checked,q=((ae=e.unref(n)[t.type])==null?void 0:ae.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(oe=>{oe.show=!1}),q[R].show=W,a({[t.type]:q})},m=j=>{var W;const R=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];R.splice(j,1),a({[t.type]:R})},w=()=>{sessionStorage.setItem("indicator-card-item","")},N=()=>{const j=sessionStorage.getItem("indicator-list-item"),R=sessionStorage.getItem("indicator-card-item");j?u(j):R&&f(R)},C=j=>{var le,pe;const{newIndex:R,oldIndex:W,from:q,to:ie}=j,ae=q.id,oe=ie.id;if(R>=0&&W>=0){if(ae===oe){const be=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=be.splice(W,1)[0];He&&(be.splice(R,0,He),a({[t.type]:be}))}else if(t.type===oe){const be=((pe=e.unref(n)[oe])==null?void 0:pe.slice())||[];if(be!=null&&be.length){const He=be.splice(be.length-1,1)[0];He&&(be.splice(R,0,He),a({[t.type]:be}))}}}},x=(j,R)=>{const W=j.oldIndex,q=R[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},y=e.computed(()=>e.unref(n)[t.type]||[]),E=e.ref([]);let k=!1;e.watch(()=>e.unref(y).length,j=>{E.value=new Array(j).fill(!1)},{flush:"post",immediate:!0});const L=j=>{var W,q,ie;const R=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=R[j])!=null&&q.randomKey){const ae=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let oe=ae.length-1;oe>=0;oe--)ae[oe].randomKey===R[j].randomKey&&ae.splice(oe,1);a({variableConditions:Kt(ae,r),variableList:ae})}R.splice(j,1),a({[t.type]:R})},I=j=>{E.value[j]=!0},V=()=>{k=!0},B=(j,R,W)=>{var q,ie,ae,oe;if(E.value[R]=!1,k){const le=(q=j.target)==null?void 0:q.value,pe=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],be=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.formula)==null?void 0:Ce.includes(W)}).map(ue=>ue.id),He=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.builtInValueSource)==null?void 0:Ce.includes(W)}).map(ue=>ue.id);if(be!=null&&be.length)for(const ue of be){const Ce=pe.find(ft=>ft.id===ue);Ce.formula=Ce.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const ue of He){const Ce=pe.find(ft=>ft.id===ue);Ce.builtInValueSource=Ce.builtInValueSource.replaceAll(W,le)}if(pe[R].label=le,(ae=pe[R])!=null&&ae.randomKey){const ue=((oe=e.unref(n))==null?void 0:oe.variableList)||[],Ce=ue.filter(ft=>ft.randomKey===pe[R].randomKey);Ce!=null&&Ce.length&&Ce.forEach(ft=>{ft.label=le}),a({variableConditions:Kt(ue,r),variableList:ue})}a({[t.type]:pe})}k=!1},F="DEFAULT",H=e.computed(()=>{const j=[],{scope:R,label:W}=e.unref(l);let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(R)&&(q=q.filter(le=>le.label===W)),R==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=Z.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,j.push(le)}const{leftAxisList:ie=[],rightAxisList:ae=[],indicators:oe=[]}=e.unref(n)||{};return[{id:F,label:"默认",name:"默认"},...q,...j,...ie,...ae,...oe]}),P=(j={},R,W="ASC")=>{var pe;const{label:q,name:ie,id:ae,defaultCode:oe}=j,le=((pe=e.unref(n)[t.type])==null?void 0:pe.slice())||[];ae===F?delete le[R].sort:le[R].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:oe},a({[t.type]:le})},S=(j={},R="ASC")=>{const q={ASC:"升序",DESC:"降序"}[R],{sort:ie}=j,{label:ae,order:oe}=ie||{};return ae&&oe===R?`${q}(${ae})`:q},O=e.ref(),A=e.ref(),v=e.ref(),U=e.ref(),h=(j={},R)=>{var W;O.value=j,A.value=R,(W=e.unref(v))==null||W.showModal()},b=j=>{var R;return"自定义排序"+(((R=j==null?void 0:j.sort)==null?void 0:R.type)==="CUSTOM"?"(已配置)":"")},T=(j={},R)=>{var W;O.value=j,A.value=R,(W=e.unref(U))==null||W.showModal()},D=j=>"自定义分组"+((j==null?void 0:j.customGroup)!=null?"(已配置)":""),$=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(j,R)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[R].aggregate=j,a({[t.type]:W})},Q=(j,R)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[R].distinct=j,a({[t.type]:W})},ee=(j,R)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[R].dateFormat=j,a({[t.type]:W})},re=(j="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[j]})`,he=j=>`是否去重(${{0:"否",1:"是"}[j]||"否"})`,me=(j={})=>{var R;return"过滤"+(j!=null&&j.conditions&&((R=j==null?void 0:j.conditions)==null?void 0:R.length)>0?"(已配置)":"")},Te=e.ref(),de=e.ref(),$e=e.ref(),et=e.ref(),mo=(j={},R)=>{O.value=j,A.value=R,e.unref(Te).showModal()},it=(j={},R)=>{O.value=j,A.value=R,e.unref(de).showModal(j)},st=(j={},R)=>{O.value=j,A.value=R,e.unref($e).showModal(j)},Nt=(j={},R)=>{O.value=j,A.value=R,e.unref(et).showModal(j,e.unref(Y))},ct=e.ref(),Ee=e.ref("add"),Qe=(j,R,W)=>{var q;Ee.value=j,j==="edit"&&(O.value=R,A.value=W),(q=e.unref(ct))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),ze=e.ref([]),dt=e.computed(()=>e.unref(n)[t.type]||{}),pt=async()=>{try{const j=await tt.post(`${Be}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:R,data:W=[]}=j.data;R&&(ze.value=W)}catch(j){console.error(j)}},ut=(j,R)=>{const W=e.unref(n)[t.type]||{};W[R]=j,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(j,R)=>{var q;const{name:W}=R;if(!nt.includes(t.type)&&j&&yt(R,"indexCode")){const ie=await tt.post(`${Be}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:R.id,indexCode:R.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:ae,data:oe}=ie.data;ae&&oe&&(Y.value=(oe==null?void 0:oe.dataViewColumns)||[],z.value[W]={name:oe.name,code:oe.indexCode})}},J=j=>{l.value=j},te=j=>{const R=document.createElement("input");document.body.appendChild(R),R.setAttribute("value",j),R.select(),document.execCommand("copy"),document.body.removeChild(R),M.message.success("复制成功")},ce=e.inject(Ye),Le=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),At=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:pt())}),{onCheckboxChange:_,onDropEnd:m,onDragItemEnd:w,onDragItemAdd:N,onDragItemSort:C,onDragItemStart:x,cardItemList:y,onDelete:L,onEdit:I,onCommitLabelChange:B,sortList:H,onSort:P,handleSortTitle:S,showCustomSortModal:h,customSortModalRef:v,currentItem:O,currentIndex:A,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:U,showCustomGroupModal:T,editLabelList:E,onLabelChange:V,aggregateList:$,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:re,handleDistinctTitle:he,onShowCalculationModal:Qe,handleFilterTitle:me,filterModalRef:Te,configNameRef:de,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mo,calculationModalRef:ct,calculationModalMode:Ee,formatList:o,fieldOptions:ze,fieldData:dt,onFieldChange:ut,onVisibleChange:X,onClickSetting:J,copyDataViewName:te,dataViewMap:z,isShowConfigName:Le,showConfigNameModal:it,dimensionType:nt,isShowSortByCpnt:At,showSortByCpntModal:st,dataSelectIndicators:p,showDimByCountModal:Nt}}}),Hf="",Yf="",gt=t=>(e.pushScopeId("data-v-c2ca0016"),t=t(),e.popScopeId(),t),xc={class:"title"},Sc={class:"title-text"},Nc={class:"field-wrap"},Ac={class:"field-item"},Tc=gt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ec={class:"field-item"},Lc=gt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Bc={class:"title"},Vc={class:"title-text"},Oc=gt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Ic=gt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Fc={class:"card-item-wrap"},Dc={class:"card-item-inner"},$c=["onClick"],Mc=["onClick"],vc=["onClick"],Pc={style:{display:"flex","align-items":"center"}},jc=["title"],Rc=gt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Uc={style:{display:"flex","align-items":"center"}},Gc=["title"],zc=gt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),f=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),_=e.resolveComponent("a-sub-menu"),m=e.resolveComponent("a-menu-divider"),w=e.resolveComponent("copy-outlined"),N=e.resolveComponent("a-menu"),C=e.resolveComponent("a-dropdown"),x=e.resolveComponent("delete-outlined"),y=e.resolveComponent("a-checkbox"),E=e.resolveComponent("draggable"),k=e.resolveComponent("custom-sort-modal"),L=e.resolveComponent("custom-group-modal"),I=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),B=e.resolveComponent("sort-by-cpnt"),F=e.resolveComponent("dim-by-count"),H=e.resolveComponent("calculation-modal"),P=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",xc,[e.createElementVNode("div",Sc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[e.createElementVNode("div",Ac,[Tc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ec,[Lc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[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",Bc,[e.createElementVNode("div",Vc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Oc]),default:e.withCtx(()=>[e.createVNode(l,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Ic])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(E,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[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:o[4]||(o[4]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:O})=>[e.createElementVNode("div",Fc,[e.createVNode(y,{class:"card-item",checked:S.show,onChange:A=>t.onCheckboxChange(A,O)},{default:e.withCtx(()=>[e.createElementVNode("div",Dc,[!t.editLabelList[O]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(A=>t.onEdit(O),["prevent","stop"])},e.toDisplayString(S.label),9,$c)):e.createCommentVNode("",!0),!t.editLabelList[O]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(A=>t.onEdit(O),["prevent","stop"])}," 请点击填入名字 ",8,Mc)):e.createCommentVNode("",!0),t.editLabelList[O]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:A=>t.onCommitLabelChange(A,O,S.label),onPressEnter:A=>t.onCommitLabelChange(A,O,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(A=>t.onShowCalculationModal("edit",S,O),["prevent","stop"])}," fx ",8,vc)):e.createCommentVNode("",!0),e.createVNode(C,{trigger:["click"],onVisibleChange:A=>t.onVisibleChange(A,S)},{overlay:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:A.id,onClick:v=>t.onSort(A,O,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(_,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(g,{class:"menu-item",style:{"white-space":"nowrap"},key:A.id,onClick:v=>t.onSort(A,O,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g,{onClick:A=>t.showCustomSortModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(m),e.createVNode(g,{onClick:A=>t.showCustomGroupModal(S,O)},{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(_,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,A=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:A.value,onClick:v=>t.onDateFormatChange(A.value,O)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===A.value||!S.dateFormat&&A.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(m)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:A=>t.showFilterModal(S,O)},{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(_,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,A=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:A.value,onClick:v=>t.onAggregateChange(A.value,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(m)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:A=>t.showConfigNameModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(m)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:A=>t.showSortByCpntModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(m)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:A=>t.showDimByCountModal(S,O)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(m),e.createVNode(_,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,A=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:A.value,onClick:v=>t.onDistinctChange(A.value,O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(m)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:A=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Rc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,jc),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:A=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[zc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Gc),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(f,{class:"setting-icon",onClick:A=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(x,{class:"delete-icon",onClick:e.withModifiers(A=>t.onDelete(O),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(k,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(B,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(F,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(H,{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 Yc=ne(_c,[["render",Hc],["__scopeId","data-v-c2ca0016"]]),Wc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(Se),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var w,N;const l=Z.cloneDeep((w=e.unref(t))==null?void 0:w.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["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","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const C=u.length;f=((N=f.slice(C,C+1))==null?void 0:N.toLowerCase())+f.slice(C+1)}const g=p[f],_=Wc,m=(g==null?void 0:g.length)||0;for(let C=0;C<m;C++){const x=g[C];if(!x)break;r.push({..._[x],type:x})}for(const C of c)s(l,C)&&!g.find(x=>x===C)&&(l[C]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Wf="",qf="",Kc={class:"data-group"};function Qc(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Xc=ne(qc,[["render",Qc],["__scopeId","data-v-64cc2643"]]),Jc=[{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"]}],Zc={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"}},ed=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:M.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function td(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const od=ne(ed,[["render",td]]),nd=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:M.InputNumber,ASelect:M.Select,ASelectOption:M.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")),i=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(i)}):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:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ad(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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(s,{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(s,{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 ca=ne(nd,[["render",ad]]),rd=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:M.RadioGroup,ARadioButton:M.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function ld(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const id=ne(rd,[["render",ld]]),sd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:M.Select,ASelectOption:M.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function cd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dd=ne(sd,[["render",cd]]),pd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:M.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function ud(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const fd=ne(pd,[["render",ud]]);var _e="top",Oe="bottom",Ie="right",xe="left",qo="auto",Vt=[_e,Oe,Ie,xe],bt="start",Ot="end",md="clippingParents",da="viewport",It="popper",hd="reference",pa=Vt.reduce(function(t,o){return t.concat([o+"-"+bt,o+"-"+Ot])},[]),ua=[].concat(Vt,[qo]).reduce(function(t,o){return t.concat([o,o+"-"+bt,o+"-"+Ot])},[]),yd="beforeRead",gd="read",bd="afterRead",Cd="beforeMain",wd="main",kd="afterMain",_d="beforeWrite",xd="write",Sd="afterWrite",Nd=[yd,gd,bd,Cd,wd,kd,_d,xd,Sd];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Ae(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function at(t){var o=Ae(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Ae(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Ko(t){if(typeof ShadowRoot>"u")return!1;var o=Ae(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ad(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Td(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Ed={name:"applyStyles",enabled:!0,phase:"write",fn:Ad,effect:Td,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var rt=Math.max,Xt=Math.min,Ct=Math.round;function Qo(){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 fa(){return!/^((?!chrome|android).)*safari/i.test(Qo())}function wt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Fe(t)&&(r=t.offsetWidth>0&&Ct(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Ct(a.height)/t.offsetHeight||1);var s=at(t)?Ae(t):window,d=s.visualViewport,l=!fa()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,f=a.height/i;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Xo(t){var o=wt(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 ma(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Ko(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Ae(t).getComputedStyle(t)}function Ld(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((at(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Ko(t)?t.host:null)||Ze(t)}function ha(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Bd(t){var o=/firefox/i.test(Qo()),n=/Trident/i.test(Qo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Ko(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Ft(t){for(var o=Ae(t),n=ha(t);n&&Ld(n)&&qe(n).position==="static";)n=ha(n);return n&&(Re(n)==="html"||Re(n)==="body"&&qe(n).position==="static")?o:n||Bd(t)||o}function Jo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Dt(t,o,n){return rt(t,Xt(o,n))}function Vd(t,o,n){var a=Dt(t,o,n);return a>n?n:a}function ya(){return{top:0,right:0,bottom:0,left:0}}function ga(t){return Object.assign({},ya(),t)}function ba(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Od=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ga(typeof o!="number"?o:ba(o,Vt))};function Id(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ue(n.placement),l=Jo(d),c=[xe,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Od(r.padding,n),f=Xo(i),g=l==="y"?_e:xe,_=l==="y"?Oe:Ie,m=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],w=s[l]-n.rects.reference[l],N=Ft(i),C=N?l==="y"?N.clientHeight||0:N.clientWidth||0:0,x=m/2-w/2,y=u[g],E=C-f[p]-u[_],k=C/2-f[p]/2+x,L=Dt(y,k,E),I=l;n.modifiersData[a]=(o={},o[I]=L,o.centerOffset=L-k,o)}}function Fd(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)||ma(o.elements.popper,r)&&(o.elements.arrow=r))}const Dd={name:"arrow",enabled:!0,phase:"main",fn:Id,effect:Fd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function kt(t){return t.split("-")[1]}var $d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Md(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:Ct(n*r)/r||0,y:Ct(a*r)/r||0}}function Ca(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=s.x,g=f===void 0?0:f,_=s.y,m=_===void 0?0:_,w=typeof p=="function"?p({x:g,y:m}):{x:g,y:m};g=w.x,m=w.y;var N=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),x=xe,y=_e,E=window;if(c){var k=Ft(n),L="clientHeight",I="clientWidth";if(k===Ae(n)&&(k=Ze(n),qe(k).position!=="static"&&d==="absolute"&&(L="scrollHeight",I="scrollWidth")),k=k,r===_e||(r===xe||r===Ie)&&i===Ot){y=Oe;var V=u&&k===E&&E.visualViewport?E.visualViewport.height:k[L];m-=V-a.height,m*=l?1:-1}if(r===xe||(r===_e||r===Oe)&&i===Ot){x=Ie;var B=u&&k===E&&E.visualViewport?E.visualViewport.width:k[I];g-=B-a.width,g*=l?1:-1}}var F=Object.assign({position:d},c&&$d),H=p===!0?Md({x:g,y:m},Ae(n)):{x:g,y:m};if(g=H.x,m=H.y,l){var P;return Object.assign({},F,(P={},P[y]=C?"0":"",P[x]=N?"0":"",P.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",P))}return Object.assign({},F,(o={},o[y]=C?m+"px":"",o[x]=N?g+"px":"",o.transform="",o))}function vd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ue(o.placement),variation:kt(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,Ca(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Ca(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Pd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vd,data:{}};var Zt={passive:!0};function jd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Ae(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Rd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jd,data:{}};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Ud[o]})}var Gd={start:"end",end:"start"};function wa(t){return t.replace(/start|end/g,function(o){return Gd[o]})}function Zo(t){var o=Ae(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function en(t){return wt(Ze(t)).left+Zo(t).scrollLeft}function zd(t,o){var n=Ae(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=fa();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+en(t),y:l}}function Hd(t){var o,n=Ze(t),a=Zo(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=rt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=rt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+en(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=rt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function tn(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ka(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&tn(t)?t:ka(Jt(t))}function $t(t,o){var n;o===void 0&&(o=[]);var a=ka(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Ae(a),s=r?[i].concat(i.visualViewport||[],tn(a)?a:[]):a,d=o.concat(s);return r?d:d.concat($t(Jt(s)))}function on(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yd(t,o){var n=wt(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 _a(t,o,n){return o===da?on(zd(t,n)):at(o)?Yd(o,n):on(Hd(Ze(t)))}function Wd(t){var o=$t(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?Ft(t):t;return at(a)?o.filter(function(r){return at(r)&&ma(r,a)&&Re(r)!=="body"}):[]}function qd(t,o,n,a){var r=o==="clippingParents"?Wd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=_a(t,c,a);return l.top=rt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=rt(p.left,l.left),l},_a(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function xa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ue(a):null,i=a?kt(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case _e:l={x:s,y:o.y-n.height};break;case Oe:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case xe:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Jo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case bt:l[c]=l[c]-(o[p]/2-n[p]/2);break;case Ot:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function Mt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?md:d,c=n.rootBoundary,p=c===void 0?da:c,u=n.elementContext,f=u===void 0?It:u,g=n.altBoundary,_=g===void 0?!1:g,m=n.padding,w=m===void 0?0:m,N=ga(typeof w!="number"?w:ba(w,Vt)),C=f===It?hd:It,x=t.rects.popper,y=t.elements[_?C:f],E=qd(at(y)?y:y.contextElement||Ze(t.elements.popper),l,p,s),k=wt(t.elements.reference),L=xa({reference:k,element:x,strategy:"absolute",placement:r}),I=on(Object.assign({},x,L)),V=f===It?I:k,B={top:E.top-V.top+N.top,bottom:V.bottom-E.bottom+N.bottom,left:E.left-V.left+N.left,right:V.right-E.right+N.right},F=t.modifiersData.offset;if(f===It&&F){var H=F[r];Object.keys(B).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,O=[_e,Oe].indexOf(P)>=0?"y":"x";B[P]+=H[O]*S})}return B}function Kd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ua:l,p=kt(a),u=p?d?pa:pa.filter(function(_){return kt(_)===p}):Vt,f=u.filter(function(_){return c.indexOf(_)>=0});f.length===0&&(f=u);var g=f.reduce(function(_,m){return _[m]=Mt(t,{placement:m,boundary:r,rootBoundary:i,padding:s})[Ue(m)],_},{});return Object.keys(g).sort(function(_,m){return g[_]-g[m]})}function Qd(t){if(Ue(t)===qo)return[];var o=eo(t);return[wa(t),o,wa(o)]}function Xd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,_=g===void 0?!0:g,m=n.allowedAutoPlacements,w=o.options.placement,N=Ue(w),C=N===w,x=l||(C||!_?[eo(w)]:Qd(w)),y=[w].concat(x).reduce(function(G,K){return G.concat(Ue(K)===qo?Kd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:_,allowedAutoPlacements:m}):K)},[]),E=o.rects.reference,k=o.rects.popper,L=new Map,I=!0,V=y[0],B=0;B<y.length;B++){var F=y[B],H=Ue(F),P=kt(F)===bt,S=[_e,Oe].indexOf(H)>=0,O=S?"width":"height",A=Mt(o,{placement:F,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),v=S?P?Ie:xe:P?Oe:_e;E[O]>k[O]&&(v=eo(v));var U=eo(v),h=[];if(i&&h.push(A[H]<=0),d&&h.push(A[v]<=0,A[U]<=0),h.every(function(G){return G})){V=F,I=!1;break}L.set(F,h)}if(I)for(var b=_?3:1,T=function(K){var Q=y.find(function(ee){var re=L.get(ee);if(re)return re.slice(0,K).every(function(he){return he})});if(Q)return V=Q,"break"},D=b;D>0;D--){var $=T(D);if($==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const Jd={name:"flip",enabled:!0,phase:"main",fn:Xd,requiresIfExists:["offset"],data:{_skip:!1}};function Sa(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 Na(t){return[_e,Ie,Oe,xe].some(function(o){return t[o]>=0})}function Zd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=Mt(o,{elementContext:"reference"}),d=Mt(o,{altBoundary:!0}),l=Sa(s,a),c=Sa(d,r,i),p=Na(l),u=Na(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ep={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zd};function tp(t,o,n){var a=Ue(t),r=[xe,_e].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[xe,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function op(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ua.reduce(function(p,u){return p[u]=tp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const np={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:op};function ap(t){var o=t.state,n=t.name;o.modifiersData[n]=xa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const rp={name:"popperOffsets",enabled:!0,phase:"read",fn:ap,data:{}};function lp(t){return t==="x"?"y":"x"}function ip(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,g=f===void 0?!0:f,_=n.tetherOffset,m=_===void 0?0:_,w=Mt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),N=Ue(o.placement),C=kt(o.placement),x=!C,y=Jo(N),E=lp(y),k=o.modifiersData.popperOffsets,L=o.rects.reference,I=o.rects.popper,V=typeof m=="function"?m(Object.assign({},o.rects,{placement:o.placement})):m,B=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),F=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,H={x:0,y:0};if(k){if(i){var P,S=y==="y"?_e:xe,O=y==="y"?Oe:Ie,A=y==="y"?"height":"width",v=k[y],U=v+w[S],h=v-w[O],b=g?-I[A]/2:0,T=C===bt?L[A]:I[A],D=C===bt?-I[A]:-L[A],$=o.elements.arrow,G=g&&$?Xo($):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ya(),Q=K[S],ee=K[O],re=Dt(0,L[A],G[A]),he=x?L[A]/2-b-re-Q-B.mainAxis:T-re-Q-B.mainAxis,me=x?-L[A]/2+b+re+ee+B.mainAxis:D+re+ee+B.mainAxis,Te=o.elements.arrow&&Ft(o.elements.arrow),de=Te?y==="y"?Te.clientTop||0:Te.clientLeft||0:0,$e=(P=F==null?void 0:F[y])!=null?P:0,et=v+he-$e-de,mo=v+me-$e,it=Dt(g?Xt(U,et):U,v,g?rt(h,mo):h);k[y]=it,H[y]=it-v}if(d){var st,Nt=y==="x"?_e:xe,ct=y==="x"?Oe:Ie,Ee=k[E],Qe=E==="y"?"height":"width",tt=Ee+w[Nt],ot=Ee-w[ct],ze=[_e,xe].indexOf(N)!==-1,dt=(st=F==null?void 0:F[E])!=null?st:0,pt=ze?tt:Ee-L[Qe]-I[Qe]-dt+B.altAxis,ut=ze?Ee+L[Qe]+I[Qe]-dt-B.altAxis:ot,nt=g&&ze?Vd(pt,Ee,ut):Dt(g?pt:tt,Ee,g?ut:ot);k[E]=nt,H[E]=nt-Ee}o.modifiersData[a]=H}}const sp={name:"preventOverflow",enabled:!0,phase:"main",fn:ip,requiresIfExists:["offset"]};function cp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dp(t){return t===Ae(t)||!Fe(t)?Zo(t):cp(t)}function pp(t){var o=t.getBoundingClientRect(),n=Ct(o.width)/t.offsetWidth||1,a=Ct(o.height)/t.offsetHeight||1;return n!==1||a!==1}function up(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&pp(o),i=Ze(o),s=wt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Re(o)!=="body"||tn(i))&&(d=dp(o)),Fe(o)?(l=wt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=en(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function fp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function mp(t){var o=fp(t);return Nd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function hp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function yp(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 Aa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ta(){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 gp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Aa:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Aa,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],f=!1,g={state:p,setOptions:function(N){var C=typeof N=="function"?N(p.options):N;m(),p.options=Object.assign({},i,p.options,C),p.scrollParents={reference:at(d)?$t(d):d.contextElement?$t(d.contextElement):[],popper:$t(l)};var x=mp(yp([].concat(a,p.options.modifiers)));return p.orderedModifiers=x.filter(function(y){return y.enabled}),_(),g.update()},forceUpdate:function(){if(!f){var N=p.elements,C=N.reference,x=N.popper;if(Ta(C,x)){p.rects={reference:up(C,Ft(x),p.options.strategy==="fixed"),popper:Xo(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(B){return p.modifiersData[B.name]=Object.assign({},B.data)});for(var y=0;y<p.orderedModifiers.length;y++){if(p.reset===!0){p.reset=!1,y=-1;continue}var E=p.orderedModifiers[y],k=E.fn,L=E.options,I=L===void 0?{}:L,V=E.name;typeof k=="function"&&(p=k({state:p,options:I,name:V,instance:g})||p)}}}},update:hp(function(){return new Promise(function(w){g.forceUpdate(),w(p)})}),destroy:function(){m(),f=!0}};if(!Ta(d,l))return g;g.setOptions(c).then(function(w){!f&&c.onFirstUpdate&&c.onFirstUpdate(w)});function _(){p.orderedModifiers.forEach(function(w){var N=w.name,C=w.options,x=C===void 0?{}:C,y=w.effect;if(typeof y=="function"){var E=y({state:p,name:N,instance:g,options:x}),k=function(){};u.push(E||k)}})}function m(){u.forEach(function(w){return w()}),u=[]}return g}}var bp=[Rd,rp,Pd,Ed,np,Jd,sp,Dd,ep],Cp=gp({defaultModifiers:bp});function nn(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 Ea(t,o){if(t){if(typeof t=="string")return nn(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)?nn(t,o):void 0}}function wp(t){return function(o){if(Array.isArray(o))return nn(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Ea(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 _t(t){return _t=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},_t(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Ba(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Va={exports:{}},Oa={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})(Oa),function(t){var o=Oa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(h,b,T){h[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function f(h,b,T){return Object.defineProperty(h,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),h[b]}try{f({},"")}catch{f=function(b,T,D){return b[T]=D}}function g(h,b,T,D){var $=b&&b.prototype instanceof y?b:y,G=Object.create($.prototype),K=new v(D||[]);return d(G,"_invoke",{value:P(h,T,K)}),G}function _(h,b,T){try{return{type:"normal",arg:h.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var m="suspendedStart",w="suspendedYield",N="executing",C="completed",x={};function y(){}function E(){}function k(){}var L={};f(L,c,function(){return this});var I=Object.getPrototypeOf,V=I&&I(I(U([])));V&&V!==i&&s.call(V,c)&&(L=V);var B=k.prototype=y.prototype=Object.create(L);function F(h){["next","throw","return"].forEach(function(b){f(h,b,function(T){return this._invoke(b,T)})})}function H(h,b){function T($,G,K,Q){var ee=_(h[$],h,G);if(ee.type!=="throw"){var re=ee.arg,he=re.value;return he&&o(he)=="object"&&s.call(he,"__await")?b.resolve(he.__await).then(function(me){T("next",me,K,Q)},function(me){T("throw",me,K,Q)}):b.resolve(he).then(function(me){re.value=me,K(re)},function(me){return T("throw",me,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function($,G){function K(){return new b(function(Q,ee){T($,G,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(h,b,T){var D=m;return function($,G){if(D===N)throw new Error("Generator is already running");if(D===C){if($==="throw")throw G;return{value:a,done:!0}}for(T.method=$,T.arg=G;;){var K=T.delegate;if(K){var Q=S(K,T);if(Q){if(Q===x)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===m)throw D=C,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=N;var ee=_(h,b,T);if(ee.type==="normal"){if(D=T.done?C:w,ee.arg===x)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=C,T.method="throw",T.arg=ee.arg)}}}function S(h,b){var T=b.method,D=h.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&h.iterator.return&&(b.method="return",b.arg=a,S(h,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),x;var $=_(D,h.iterator,b.arg);if($.type==="throw")return b.method="throw",b.arg=$.arg,b.delegate=null,x;var G=$.arg;return G?G.done?(b[h.resultName]=G.value,b.next=h.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,x):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,x)}function O(h){var b={tryLoc:h[0]};1 in h&&(b.catchLoc=h[1]),2 in h&&(b.finallyLoc=h[2],b.afterLoc=h[3]),this.tryEntries.push(b)}function A(h){var b=h.completion||{};b.type="normal",delete b.arg,h.completion=b}function v(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(O,this),this.reset(!0)}function U(h){if(h||h===""){var b=h[c];if(b)return b.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var T=-1,D=function $(){for(;++T<h.length;)if(s.call(h,T))return $.value=h[T],$.done=!1,$;return $.value=a,$.done=!0,$};return D.next=D}}throw new TypeError(o(h)+" is not iterable")}return E.prototype=k,d(B,"constructor",{value:k,configurable:!0}),d(k,"constructor",{value:E,configurable:!0}),E.displayName=f(k,u,"GeneratorFunction"),r.isGeneratorFunction=function(h){var b=typeof h=="function"&&h.constructor;return!!b&&(b===E||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,k):(h.__proto__=k,f(h,u,"GeneratorFunction")),h.prototype=Object.create(B),h},r.awrap=function(h){return{__await:h}},F(H.prototype),f(H.prototype,p,function(){return this}),r.AsyncIterator=H,r.async=function(h,b,T,D,$){$===void 0&&($=Promise);var G=new H(g(h,b,T,D),$);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},F(B),f(B,u,"Generator"),f(B,c,function(){return this}),f(B,"toString",function(){return"[object Generator]"}),r.keys=function(h){var b=Object(h),T=[];for(var D in b)T.push(D);return T.reverse(),function $(){for(;T.length;){var G=T.pop();if(G in b)return $.value=G,$.done=!1,$}return $.done=!0,$}},r.values=U,v.prototype={constructor:v,reset:function(h){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(A),!h)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var h=this.tryEntries[0].completion;if(h.type==="throw")throw h.arg;return this.rval},dispatchException:function(h){if(this.done)throw h;var b=this;function T(ee,re){return G.type="throw",G.arg=h,b.next=ee,re&&(b.method="next",b.arg=a),!!re}for(var D=this.tryEntries.length-1;D>=0;--D){var $=this.tryEntries[D],G=$.completion;if($.tryLoc==="root")return T("end");if($.tryLoc<=this.prev){var K=s.call($,"catchLoc"),Q=s.call($,"finallyLoc");if(K&&Q){if(this.prev<$.catchLoc)return T($.catchLoc,!0);if(this.prev<$.finallyLoc)return T($.finallyLoc)}else if(K){if(this.prev<$.catchLoc)return T($.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return T($.finallyLoc)}}}},abrupt:function(h,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var $=D;break}}$&&(h==="break"||h==="continue")&&$.tryLoc<=b&&b<=$.finallyLoc&&($=null);var G=$?$.completion:{};return G.type=h,G.arg=b,$?(this.method="next",this.next=$.finallyLoc,x):this.complete(G)},complete:function(h,b){if(h.type==="throw")throw h.arg;return h.type==="break"||h.type==="continue"?this.next=h.arg:h.type==="return"?(this.rval=this.arg=h.arg,this.method="return",this.next="end"):h.type==="normal"&&b&&(this.next=b),x},finish:function(h){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===h)return this.complete(T.completion,T.afterLoc),A(T),x}},catch:function(h){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===h){var D=T.completion;if(D.type==="throw"){var $=D.arg;A(T)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(h,b,T){return this.delegate={iterator:U(h),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),x}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Va);var to=Va.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function kp(t){var o=function(n,a){if(_t(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(_t(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return _t(o)==="symbol"?o:String(o)}function an(t,o,n){return(o=kp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,f=p-s,g=u-d;f<0&&(f=0),g<0&&(g=0),f>t.size&&(f=t.size),g>t.size&&(g=t.size);var _=f/t.size*100,m=100-g/t.size*100;n("change",_,m)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},_p=Ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),xp=Ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[_p,xp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Sp={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=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);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=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)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Np={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Np,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Ap={class:"input"},Tp={class:"label"},Ep=[".value"];function vt(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 i,s,d,l,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=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(f){u=!0,s=f}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Ea(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 Fa(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 De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Fa(Object(n),!0).forEach(function(a){an(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("span",Tp,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,Ep)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var Da=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},$a={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat($a[o]||o).concat($a[n]||n)},Ma=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(a))},xt=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)},Pt=function(t,o,n){t=6*xt(t,360),o=xt(o,100),n=xt(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},va=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=Da(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=Pt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(Ma(Pt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var f=Da(a,r/100,i/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(i),"%)");case"rgb":var g=Pt(a,r,i),_=g.r,m=g.g,w=g.b;return"rgb(".concat(_,", ").concat(m,", ").concat(w,")");default:return Ma(Pt(a,r,i))}},so=function(t){var o=t.r,n=t.g,a=t.b;o=xt(o,255),n=xt(n,255),a=xt(a,255);var r,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Pa=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},ja=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]}},rn=function(t,o,n){if(typeof t=="string"&&t!==""){var a=ln(t,sn(t),n),r=za(a);return va(r,o,n)}return""},Ra=function(t){var o=vt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ua=function(t){var o=vt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},Ga=function(t){var o=vt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},ln=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ra(t),a=n.r,r=n.g,i=n.b,s=n.a;return De(De({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ua(t),c=l.h,p=l.s,u=l.l,f=l.a;return De(De({},Pa({h:c,s:p,l:u})),{},{a:+f});default:var g=ja(t),_=g.r,m=g.g,w=g.b,N=g.a;return De(De({},so({r:_,g:m,b:w})),{},{a:N/255})}else switch(o){case"rgb":return De(De({},so(Ra(t))),{},{a:1});case"hsv":var C=Ga(t);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return De(De({},Pa(Ua(t))),{},{a:1});default:return De(De({},so(ja(t))),{},{a:1})}},sn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},za=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}},jt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=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(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Lp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),jt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Lp)},jt.__scopeId="data-v-02da71fd",jt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:jt},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 rn(a,"hex",!0)})})}}}),Bp={class:"colors"};function Ha(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 Ge(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ha(Object(n),!0).forEach(function(a){an(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var C,x=(C=t.value)===null||C===void 0?void 0:C.trim();if(x!=null&&x!==""){var y=sn(x);return za(ln(x,y,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(C,x){var y="";C!=null?(y=va(Ge({},C),t.format,t.showAlpha),s.value=Ge({},C)):s.value=null,d.value=y;var E=l();JSON.stringify(C)!==JSON.stringify(E)&&JSON.stringify(C)!==JSON.stringify(x)&&n("change",y)},{immediate:!0});var c=e.computed(function(){var C;return((C=e.unref(i))===null||C===void 0?void 0:C.h)||0}),p=e.computed(function(){var C;return((C=e.unref(i))===null||C===void 0?void 0:C.s)||0}),u=e.computed(function(){var C;return((C=e.unref(i))===null||C===void 0?void 0:C.v)||0}),f=e.computed(function(){var C,x;return((C=e.unref(i))===null||C===void 0?void 0:C.a)!=null?(x=e.unref(i))===null||x===void 0?void 0:x.a:1}),g=e.computed(function(){return Pt(e.unref(c),e.unref(p),e.unref(u))}),_=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),m=e.computed(function(){var C=t.format;if(t.showAlpha)switch(C){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(C){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),w=e.ref(-1),N=function(C,x,y){if(C.length!==0){var E=ln(C,x,y),k=E.h,L=E.s,I=E.v;if(!(isNaN(k)||isNaN(L)||isNaN(I))){var V=1,B=E.a;isNaN(B)||(V=B),i.value={h:k,s:L,v:I,a:V}}}};return{h:c,s:p,v:u,a:f,rgbStr:_,onSelectSaturation:function(C,x){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:C,v:x,a:e.unref(f)}:i.value=Ge(Ge({},e.unref(i)),{},{s:C,v:x})},onSelectHue:function(C){w.value=-1,e.unref(i)==null&&(i.value={h:C,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),i.value=Ge(Ge({},e.unref(i)),{},{h:C})},onSelectAlpha:function(C){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:C}:i.value=Ge(Ge({},e.unref(i)),{},{a:C})},label:m,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(C){w.value=-1,d.value=C},handleChange:function(){var C,x=(C=e.unref(d))===null||C===void 0?void 0:C.trim();if(x!==""){var y=t.showAlpha,E=t.format,k=function(L,I,V){if(V)switch(I){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(L);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(L);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(L);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(L)}else switch(I){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(L);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(L);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(L);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(L)}}(x,E,y);k?N(x,E,y):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:w,onSelectColor:function(C,x){if(w.value=x,(C=C.trim())==="")i.value=null;else{var y=sn(C);y?N(C,y,!0):i.value=null}}}}}),Vp={class:"picker-inner"},Op={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Vp,[e.createElementVNode("div",Op,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Ip=[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 Ya(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 cn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){an(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Ip),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var lt=null,St=e.defineComponent({name:"ColorPicker",components:{ColorItem:jt,Picker:po,AddColorItem:uo},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(S){return rn(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",O=Array.isArray(S)?S:[S];a.value=O.map(function(A){return rn(A,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,f,g,_,m=e.ref(null),w=e.ref(null),N=(l=m,c=w,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){lt.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(S){var O=S.state,A=O.styles,v=O.placement,U=A.popper;u.value=cn(cn(cn({},U),p),{},{transformOrigin:v==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(S,O){var A,v=vt(S,2),U=v[0],h=v[1],b=vt(O,2),T=b[0],D=b[1];if(U&&h&&(T!==U||D!==T)){(A=lt)===null||A===void 0||A.destroy();var $=U.$el||U,G=h.$el||h;e.nextTick(function(){lt=Cp($,G,f)})}}),e.onBeforeUnmount(function(){var S;lt&&((S=lt)===null||S===void 0||S.destroy(),lt=null)}),{instance:lt,style:u}),C=N.style,x=function(){e.unref(m)==null&&(m.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},y=function(){i.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]))},E=e.ref(),k=function(){var S=Ba(oo.mark(function O(A){var v,U,h,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(U=A.target,(h=(v=U.dataset)===null||v===void 0?void 0:v.index)!=null&&h!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+h,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(y(),g&&clearTimeout(g),g=setTimeout(function(){x(),clearTimeout(g)},100)):x(),i.value=b,m.value=U;case 10:case"end":return T.stop()}},O)}));return function(O){return S.apply(this,arguments)}}(),L=function(){var S=Ba(oo.mark(function O(A){var v,U,h,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=A.target,!(!((v=e.unref(E))!==null&&v!==void 0&&v.isEqualNode(b))&&(!((U=e.unref(E))===null||U===void 0)&&U.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(h=e.unref(w))===null||h===void 0?void 0:h.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:_&&clearTimeout(_),_=setTimeout(function(){e.unref(d)&&y()},0);case 10:case"end":return D.stop()}},O)}));return function(O){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(x(),clearTimeout(_))});var I,V=e.ref(t.max>e.unref(a).length),B=e.computed(function(){return typeof t.popupContainer=="string"||_t(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),F=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),H=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(w)]},function(){e.nextTick(function(){var S,O;(S=e.unref(E))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(H)),(O=e.unref(w))===null||O===void 0||(O=O.$el)===null||O===void 0||O.setAttribute("pick-colors-theme",e.unref(H))})},{immediate:!0}),e.provide("theme",{theme:H});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",L,!1),t.showPicker&&x()}),e.onUnmounted(function(){document.removeEventListener("mouseup",L,!1),g&&(clearTimeout(g),g=null),_&&(clearTimeout(_),_=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(S){var O=e.unref(i),A=e.unref(a).slice(),v=e.unref(a).length;if(O!=null){O>=0?A[O]=S:(i.value=v,A.push(S));var U="";U=Array.isArray(t.value)||t.addColor?A:S,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,S,O)),t.addColor&&v>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:E,onColorClick:k,pickerRef:w,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var O=S.target;I=+O.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var O=+S.target.dataset.index,A=wp(e.unref(a)),v=A[I];A.splice(I,1);var U=A.slice(0,O),h=A.splice(O),b=U.concat([v]).concat(h);n("update:value",b),n("change",b,b[I],I)},colorItemsRef:P,pickerStyle:C,values:r,teleportDisabled:F,toPopupContainer:B}}});Ke(".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)}"),St.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{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(l,{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)},St.__scopeId="data-v-3c43ade8",St.__file="src/ColorPicker.vue";const Fp=e.defineComponent({name:"ColorPick",components:{PickColors:St,AInput:M.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}}}}),Kf="",Dp={class:"color-pick"};function $p(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Dp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Mp=ne(Fp,[["render",$p],["__scopeId","data-v-e2113f43"]]),vp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:St},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{M.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Qf="",Pp={class:"color-group-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rp=ne(vp,[["render",jp],["__scopeId","data-v-b2be8322"]]),Up=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:jn,MinusCircleOutlined:Gl,PickColors:St,InputNumber:ca,PlusCircleOutlined:Wl},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 g=Object.keys(f),_={};g.forEach(m=>{_[m]=""}),c.push(_)}else typeof f=="string"&&c.push(f);n.value=c}else M.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const f=(g=t.value)==null?void 0:g.slice();if(Array.isArray(f)){const _=c==null?void 0:c.target,m=(_==null?void 0:_.value)!=null?_==null?void 0:_.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){M.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Xf="",Gp={class:"form-group"},zp={class:"form-row"},Hp={key:0,class:"label"},Yp={key:1,class:"label"},Wp={class:"icon-group"};function qp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{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",zp,[(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",Hp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Yp,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:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Wp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kp=ne(Up,[["render",qp],["__scopeId","data-v-f0c0ab4d"]]),Qp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:M.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Xp(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jp=ne(Qp,[["render",Xp]]),Zp=e.defineComponent({name:"PropsToForm",components:{Input:od,InputNumber:ca,RadioGroup:id,Select:dd,Switch:fd,ColorPick:Mp,ColorGroupPick:Rp,FormGroup:Kp,Textarea:Jp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Ut),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:f}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:_="change",events:m}=p;c[u]={...p,valueProp:g,value:f,events:{[_]:(w,N=!0)=>{i(N?{[u]:w}:{})},...m}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:Z.reduce(l,(c,p,u)=>{const f=Zc[u];if(Array.isArray(f)){const g=f.find(_=>{const{onlyType:m,excludeType:w}=_;return m==null&&w==null?!0:m?ge(e.unref(r),m):w?!ge(e.unref(r),w):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:ge}}}),Jf="",eu={class:"props-to-form"},tu={class:"label"},ou={class:"component-wrapper"};function nu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tu,e.toDisplayString(s.label),1),e.createElementVNode("div",ou,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const au=ne(Zp,[["render",nu],["__scopeId","data-v-c6fb2484"]]);function ru(){return new Worker("/assets/editor.worker-02df2e61.js")}function lu(){return new Worker("/assets/json.worker-867823a6.js")}function iu(){return new Worker("/assets/ts.worker-7254b425.js")}const su=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(i,s){return s==="json"?new lu:s==="typescript"||s==="javascript"?new iu:new ru}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=er.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(Z.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),Zf="",cu={class:"editor",ref:"dom"};function du(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",cu,null,512)}const Wa=ne(su,[["render",du],["__scopeId","data-v-71e88372"]]),pu=[{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}],uu=e.defineComponent({name:"TableColumnConfig",components:{ATable:M.Table,AModal:M.Modal,ACheckbox:M.Checkbox,AInput:M.Input,AInputNumber:M.InputNumber,ASelect:M.Select,ASelectOption:M.SelectOption,Editor:Wa},setup(){const t=e.inject(Ye),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 i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var w,N,C;let m=[];if(r.value=[],!o.value)m=((w=e.unref(n))==null?void 0:w.queryColumnList)||[];else{const x=((N=e.unref(n))==null?void 0:N.rowHeaderList)||[],y=((C=e.unref(n))==null?void 0:C.indicators)||[];m=[...x,...y]}m.forEach(x=>{var E;let y=(E=e.unref(a))==null?void 0:E.find(k=>k.prop===x.name);y||(y={label:x.label,prop:x.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(y)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(m,w,N)=>{m&&w&&(i=m,s=w,d.value=m[w]||"",c.value=!0,l.value=N)},onEditorChange:m=>{try{d.value=m}catch(w){console.error(w)}},changeRenderBool:(m,w)=>{m.style=w.target.checked,m.style?m.renderBool===void 0&&(m.renderBool=!1):delete m.renderBool}}}}),em="",fu={class:"table-column-config"};function mu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=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"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",fu,[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:_,text:m,record:w})=>[_.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:N=>t.changeRenderBool(w,N),checked:w.style},null,8,["onChange","checked"])):_.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:w.width,"onUpdate:value":N=>w.width=N,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):_.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.renderText,"onUpdate:value":N=>w.renderText=N,readOnly:!0,onClick:N=>t.renderSave(w,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):_.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.headerTemplate,"onUpdate:value":N=>w.headerTemplate=N,readOnly:!0,onClick:N=>t.renderSave(w,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):_.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:w.headerAlign,"onUpdate:value":N=>w.headerAlign=N},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:w.align,"onUpdate:value":N=>w.align=N},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:w.fixed,"onUpdate:value":N=>w.fixed=N},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:w.dataFormat,"onUpdate:value":N=>w.dataFormat=N,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[w.dataFormat&&w.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:w.retentiondigit,"onUpdate:value":N=>w.retentiondigit=N,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=_=>t.editorVisible=_),"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 hu=ne(uu,[["render",mu],["__scopeId","data-v-afebddc0"]]),yu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:au,TableColumnConfig:hu,Editor:Wa,AFormItem:M.FormItem,ASelect:M.Select,ASelectOption:M.SelectOption,ACollapse:M.Collapse,ACollapsePanel:M.CollapsePanel,ASwitch:M.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Ut),r=e.inject(mn),i=e.inject(ho),s=e.inject(yo),d=e.inject(fn),l=E=>{i({...Cn[E]},!1),d()},c=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Jc.map(E=>{const{props:k,title:L,enableProps:I,onlyType:V,excludeType:B}=E,F=[];k.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&F.push(S):F.push(S))});let H,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(H=typeof I=="string"&&r.value?r.value[I]:void 0,P=Z.pick(e.unref(r),F)):(H=typeof I=="string"&&a.value?a.value[I]:void 0,P=Z.pick(e.unref(a),F)),{title:L,enableProps:H,enablePropsName:I,onlyType:V,excludeType:B,props:P}}).filter(({props:E})=>Object.keys(E).length>0)),f=(E,k)=>{const{onlyType:L,excludeType:I}=E;return L==null&&I==null?!0:L?ge(k,L):I?!ge(k,I):!1},g=(E,k)=>(k==null||k.stopPropagation(),E),_=(E,k)=>{k!=null&&i({[k]:E})},m=e.computed(()=>JSON.stringify(e.unref(a),null,2)),w=E=>{try{const k=JSON.parse(E||"{}");i(k,!1)}catch(k){console.error(k)}},N=e.ref(""),C=E=>{try{N.value=E}catch(k){console.error(k)}},x=(E,k)=>{try{s({[k]:E})}catch(L){console.error(L)}},y=e.computed(()=>{var E;return["customGraph"].includes((E=e.unref(a))==null?void 0:E.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:m,updateComponentOptions:w,tableOptions:r,optionCode:N,onEditorChange:C,tableEditorChange:x,onSwitchClick:g,onSwitchChange:_,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:y}}}),tm="",om="",gu={class:"style-group"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=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"),g=e.resolveComponent("a-collapse"),_=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{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(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{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:w=>t.onSwitchChange(w,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(g,{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 w;return e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[m.title&&((w=m.onlyType)!=null&&w.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(_)]),_: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 Cu=ne(yu,[["render",bu],["__scopeId","data-v-2fb3e2ad"]]),wu=e.defineComponent({name:"Card",components:{CloseOutlined:qt,MenuOutlined:Qn,ADropdown:M.Dropdown,AMenu:M.Menu,AMenuItem:M.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(Gt),a=e.inject(gn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:h=>{},onDeleteControl:h=>{},onAddMenuControl:(h,b,T)=>{}}),d=e.computed(()=>{var h;return(h=e.unref(o))==null?void 0:h.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const h=[],b=(T=e.unref(d))==null?void 0:T.find($=>{var G;return $.id===((G=t.control)==null?void 0:G.id)});if(b){const $=b.type,G=Z.pick(b,["value","startTime","endTime"]);(D=Object.keys(G))!=null&&D.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(re=>ge($,re.onlyType));ee&&h.push({label:ee.label,value:K})}else h.push({label:Q.label,value:K})}}return h}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:h})=>{s(t.path,t.index,h==="2"?"||":"&&")};function u(h){const b=e.unref(d).find(T=>T.id===h);if(b){const{type:T,id:D,events:$=[]}=b,G=Qt(T),K=$.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(y))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&($.splice(K,1),n({id:D,events:$}))}}const f=h=>{const b={...t.control};if(b.id=h,b.customValue="",h){const T=e.unref(d).find(D=>D.id===h);T&&(b.keyName=T.keyName,L(T,h))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),_=()=>{g.value=t.control.id},m=h=>{r({control:{...t.control,prop:h},index:t.index,path:t.path})},w=h=>{r({control:{...t.control,rule:h},index:t.index,path:t.path})},N=h=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:h,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},C=h=>{r({control:{...t.control,customValue:h.target.value},index:t.index,path:t.path})},x=h=>{const b={...t.control};h==null?delete b.mode:b.mode=h,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},y=e.inject(Ye),E=e.inject(fe),k=e.computed(()=>{var Te;const{classificationList:h=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:$=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(E),Q=Z.cloneDeep([...h,...b,...T,...D,...$,...G,...K]);if(Q!=null&&Q.length)for(const de of Q)de.id=de.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(de=>({...de,id:de.name,label:de.title||de.label})),...Q];((Te=e.unref(y))==null?void 0:Te.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const re=new Map,he=ee.length;for(let de=0;de<he;de++){const $e=ee[de],{id:et}=$e||{};re.set(et,$e)}return[...re].map(([de,$e])=>$e)});function L(h,b){var K,Q;const{type:T,id:D,events:$=[]}=h,G=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(E))==null?void 0:K.controlList)||[]).find(re=>re.id===e.unref(g))||u(e.unref(g))),$.find(ee=>{var re;return ee.on===G&&ee.target===((re=e.unref(y))==null?void 0:re.id)&&ee.emit==="refreshData"})||n({id:D,events:[...$,{on:G,target:(Q=e.unref(y))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const I=(h,b)=>{if(h){const{label:T,name:D,id:$,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},re={...t.control,conditionKey:$,conditionLabel:T,conditionName:D,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};yt(re,"rule")||(re.rule="EQUAL"),yt(re,"dataType")||(re.dataType="component"),r({control:re,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(h,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(h==null?void 0:h.toLowerCase())},B=(h,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(h==null?void 0:h.toLowerCase())},F=e.computed(()=>{const h=e.unref(k).find(T=>T.id===t.control.conditionKey);let b="";return h&&(b=(h==null?void 0:h.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),H=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let h=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(G=>G.id===b),$=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(D==null?void 0:D.type,$)&&(h=!0)}return h}),S=e.computed(()=>{let h=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find($=>$.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(h=!0)}return h}),O=e.computed(()=>{let h=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find($=>$.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(h=!0)}return h});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:f,onIdFocus:_,onPropChange:m,onModeChange:x,onRuleChange:w,onDataTypeChange:N,onCustomValueChange:C,conditionKeyOptions:k,onConditionKeyChange:I,idFilterOption:V,filterOption:B,onFormatChange:h=>{r({control:{...t.control,format:h},index:t.index,path:t.path})},onModelPropChange:h=>{r({control:{...t.control,modelKey:h.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:F,dataTypeOption:H,isShowProp:S,isShowFormat:O,isShowModelProp:P,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"}]}}}),nm="",am="",ku={class:"control-card"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),f=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(s,{key:3,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(s,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(f,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const xu=ne(wu,[["render",_u],["__scopeId","data-v-d25f813a"]]),Su=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:xu}}),rm="",Nu={key:0,class:"condition-list"},Au={key:0,class:"condition-container"},Tu={key:0,class:"condition-text"},Eu={key:1,class:"condition-text"},Lu={class:"conditions"};function Bu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Au,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Tu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Eu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Lu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Vu=ne(Su,[["render",Bu],["__scopeId","data-v-916ff9bd"]]),Ou=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Vu,AButton:M.Button},setup(){const t=e.inject(Pe),o=e.inject(fe),n=e.inject(Se),a=e.computed(()=>{var u,f;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(yt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),yt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((f=p[0])!=null&&f.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:ra({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var f;const u=(f=e.unref(a))==null?void 0:f.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:ke()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:ke()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:ke()}),i({controlList:u})))},d=p=>{var w,N,C,x;const{index:u,path:f}=p;let g=Z.cloneDeep((w=e.unref(a))==null?void 0:w.slice()),_=g;const m=f.split("-");if(m!=null&&m.length){for(const y of m)if(_[y])_=(N=_[y])==null?void 0:N.conditions;else break;if(Array.isArray(_)&&_[u])if(_.splice(u,1),_.length===1){if(m.length>0){const y=m.length-1,E=m[y],k=m.slice(0,y);let L=g,I="";for(const V of k)if(L[V])I=(C=L[V])==null?void 0:C.join,L=(x=L[V])==null?void 0:x.conditions;else break;if(I===_[0].join){if(Array.isArray(_[0].conditions)){const V=Z.cloneDeep(_[0].conditions);L.splice(+E,1),L.splice(+E,0,...V)}}else L[E]=_[0]}}else _.length===0&&(g=[]);i({controlList:g})}},l=p=>{var N,C;const{control:u,index:f,path:g}=p,_=Z.cloneDeep((N=e.unref(a))==null?void 0:N.slice());let m=_;const w=g.split("-");if(w!=null&&w.length)for(const x of w)if(m[x])m=(C=m[x])==null?void 0:C.conditions;else break;Array.isArray(m)&&m[f]&&(m[f]=u),i({controlList:_})},c=(p,u,f)=>{var N,C,x;const g=Z.cloneDeep((N=e.unref(a))==null?void 0:N.slice());let _=g,m="";const w=p.split("-");if(w!=null&&w.length){for(const y of w)if(_[y])m=(C=_[y])==null?void 0:C.join,_=(x=_[y])==null?void 0:x.conditions;else break;if(m===f)_.splice(u+1,0,{keyValue:ke()});else{const y=Z.cloneDeep(_[u]);_[u]={join:f,conditions:[y,{keyValue:ke()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),lm="",Iu={class:"control-group"},Fu={class:"control-group-header"},Du={class:"control-group-content"};function $u(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Iu,[e.createElementVNode("div",Fu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Du,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Mu=ne(Ou,[["render",$u],["__scopeId","data-v-1e37d2d3"]]),vu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:qt},setup(t,{emit:o}){const n=e.inject(Pe),a=e.computed(()=>{var C;return(C=e.unref(n))==null?void 0:C.filter(x=>x.keyName!=="")}),r=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],i=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],s=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],d=e.ref(Z.cloneDeep(t.item));e.watch(d,C=>{o("update",{...C,label:t.label},t.index)},{deep:!0});const l=e.computed(()=>{var x;let C=null;if(((x=e.unref(d))==null?void 0:x.dataType)==="component"){const y=e.unref(a).find(E=>{var k;return E.id===((k=e.unref(d))==null?void 0:k.id)});y&&(C=y)}return C}),c=e.computed(()=>{var x;let C=!1;return((x=e.unref(d))==null?void 0:x.variableType)==="DATE"&&(C=!0),C}),p=e.computed(()=>{let C=!1;return e.unref(l)&&(C=ge(e.unref(l).type,"range")),C}),u=e.computed(()=>{let C=!1;return e.unref(l)&&(ge(e.unref(l).type,"range")?["startTime","endTime"].includes(e.unref(d).dateTypeValue)&&(C=!0):ge(e.unref(l).type,"date")&&(C=!0)),C}),f=(C,x)=>{C&&(e.unref(d).keyName=x.keyName)},g=()=>{o("delete",t.index)},_=e.computed(()=>e.unref(c)?[{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.unref(d).id=null,e.unref(d).keyName="",e.unref(d).dateTypeValue=null,e.unref(d).variableValue=""},w=()=>{e.unref(d).format=null},N=(C,x)=>{var y;return(y=x==null?void 0:x.keyName)==null?void 0:y.toLowerCase().includes(C==null?void 0:C.toLowerCase())};return e.onMounted(()=>{e.unref(u)&&(e.unref(d).operateType||(e.unref(d).operateType="add"),e.unref(d).operateMode||(e.unref(d).operateMode="year"),e.unref(d).operateValue||(e.unref(d).operateValue=0))}),{variableData:d,typeOption:r,dataTypeOption:i,usedComponentList:a,formatOptions:_,rangeTypeOptions:s,isShowFormat:c,isDateRangeComponent:p,isShowDateOperate:u,idFilterOption:N,onChangeComponent:f,onDelete:g,onChangeDataType:m,onChangeVariableType:w}}}),im="",Pu={class:"variable-item"},ju=["title"];function Ru(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Pu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,ju)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=u=>t.variableData.variableName=u),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=u=>t.variableData.variableType=u),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=u=>t.variableData.dataType=u),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=u=>t.variableData.id=u),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=u=>t.variableData.variableValue=u),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=u=>t.variableData.dateTypeValue=u),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=u=>t.variableData.format=u),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(c,{key:4,class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=u=>t.variableData.operateValue=u),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=u=>t.variableData.operateType=u),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=u=>t.variableData.operateMode=u),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const Uu=ne(vu,[["render",Ru],["__scopeId","data-v-aebbb8db"]]),Gu=e.defineComponent({name:"VariableGroup",components:{VariableItem:Uu},setup(){const t=e.inject(fe),o=e.inject(Se),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Kt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=Z.cloneDeep(e.unref(a));l.push({keyValue:ke(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=Z.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=Z.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),sm="",zu={class:"variable-group"},Hu={class:"variable-group-header"},Yu={class:"variable-group-content"};function Wu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",zu,[e.createElementVNode("div",Hu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",Yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const qu=ne(Gu,[["render",Wu],["__scopeId","data-v-4700f222"]]),Ku=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:g,builtInValueSource:_,builtInCalcWay:m,formula:w,conditions:N,aggregate:C}=s;let x;return N&&(x=r(N)),{label:d.trim(),columnName:l,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:C,builtInFormula:g,builtInValueSource:_,builtInCalcWay:m,formula:w,conditions:x}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:g,classificationList:_=[],seriesList:m=[],leftAxisList:w=[],rightAxisList:N=[],queryColumnList:C=[],indicators:x=[],dataSourceId:y,idxLibMode:E,preview:k=!1}=s||{};f==null&&(ge(d,"table")?f="1":f="2");let L;if(Array.isArray(_)&&_.length>0){const F=_.length;for(let H=0;H<F;H++){const P=_[H]||{},{label:S="",name:O="",show:A=!1,sort:v,customGroup:U,conditions:h}=P;if(A||F===1){L={label:S.trim(),columnName:O,show:A,sort:v,customGroup:U,conditions:r(h)};break}}}let I;if(Array.isArray(m)&&m.length>0){const F=m.length;for(let H=0;H<F;H++){const P=m[H]||{},{label:S="",name:O="",show:A=!1,sort:v,customGroup:U,conditions:h}=P;if(A||F===1){I={label:S.trim(),columnName:O,show:A,sort:v,customGroup:U,conditions:r(h)};break}}}const V=[];C==null||C.forEach(F=>{V.push(o(F))});const B=[];if(w==null||w.forEach(F=>{F.location="LEFT",B.push(i(F))}),N==null||N.forEach(F=>{F.location="RIGHT",B.push(i(F))}),x==null||x.forEach(F=>{F.location="LEFT",B.push(i(F))}),!(f==="1"&&V.length===0)&&!(f==="2"&&B.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:g,classification:L,series:I,indicatorList:B,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:y,idxLibMode:E,preview:k})}catch(F){console.error(F)}}},qa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.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 g=u[f],_=i[g];_!=null&&(c=c.replace(g,_))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=qa(c,n)),t=t.replace(l,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},Rt=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=qa(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},Qu=(t,o,n)=>{switch(t.type){case"bar":return Xu(t,o,n);case"line":return Ju(t,o,n);case"pie":return Zu(t,o,n);case"comboGraph":return ef(t,o,n);default:return{}}},Xu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let f=0;f<p;f++){const g={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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 g=0;g<p;g++){const{marker:_,seriesName:m,name:w,value:N,data:C}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(f,{textData:{marker:_,name:w,value:N,a:m,b:w,c:N,...C}},{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(l),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 Rt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Rt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},Ju=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[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 g=0;g<p;g++){const{marker:_,seriesName:m,name:w,value:N,data:C}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(f,{textData:{marker:_,name:w,value:N,a:m,b:w,c:N,...C}},{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 Rt(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 Rt(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(l)}},Zu=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,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:As(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:{}}}]}},ef=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];l.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Rt(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let g=0;g<c;g++){const _=f[g],{tooltipFormatter:m}=_||{},{marker:w,seriesName:N,name:C,value:x,data:y}=l[g]||{};g===0&&(p+=`${C}<br/>`),p+=fo(m||u,{textData:{marker:w,name:C,value:x,seriesName:N,a:N,b:C,c:x,...y}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},tf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let f=0;f<d;f++){const g=a[f],{label:_,value:m}=g,w={...t[0],value:t[0][m]};r.add(_),p.push(w)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],f=u[n];r.add(f);for(let g=0;g<d;g++){const _=a[g],{label:m,value:w}=_,N={...u,value:u[w]};if(i.has(m)){const C=i.get(m);C.push(N),i.set(m,C)}else i.set(m,[N])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},of=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",g=u[a]||"",_=u[r]||"";if(i.add(f),s.has(_)){const m=s.get(_);m.push({name:f,value:g,...u}),s.set(_,m)}else s.set(_,[{name:f,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},nf=e.defineComponent({name:"ChartGraph",components:{ASpin:M.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(fe)||{},l=e.inject(Ut)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),g=e.ref(!1),_=e.computed(()=>g.value?ar:12),m=e.ref({}),w=e.ref(),N=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return w.value;const B=Qu(V,e.unref(m),_.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:V.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:V.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:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...B}}),C=(V=[],B,F=!1)=>{const H=F?B:null;m.value=tf(V,H)},x=(V=[],B)=>{m.value=of(V,B)},y=async()=>{var V,B,F;try{const H=Ku({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});f.value=!0;const P=await H(),{columns:S=[],rows:O=[]}=((B=P==null?void 0:P.data)==null?void 0:B.data)??{};if(((F=e.unref(n.value))==null?void 0:F.type)==="pie"){let A=[];if(S.length>0){const v=S[0],U=S[1];A=O.map(h=>({name:h[v],value:h[U]}))}x(A)}else{let A;S.length>0&&(A={name:S[0],types:S.slice(1).map(v=>({label:v,value:v}))}),C(O,A,!0)}}catch(H){console.error(H)}finally{f.value=!1}},E={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},k=()=>{e.unref(m).dataset.length===0?u.value.setOption(E):u.value.setOption(N.value)},L=()=>{e.unref(n.value).type!=="customGraph"&&y()},I=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(N,()=>{k()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const B=eval;w.value=B(V)}catch(B){console.error(B)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(I),i.observe(p.value)),u.value=nr.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:L}),{echartRef:c,loading:f}}}),cm="",af={class:"ecan-chart-graph",ref:"chartWrapRef"},rf={style:{width:"100%",height:"100%"},ref:"echartRef"};function lf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",af,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",rf,null,512)]),_:1},8,["spinning"])],512)}const Ka=ne(nf,[["render",lf],["__scopeId","data-v-8049fed2"]]),sf=e.defineComponent({name:"DataConfig",components:{DataGroup:Xc,StyleGroup:Cu,ChartGraph:Ka,ATabs:M.Tabs,ATabPane:M.TabPane,ControlGroup:Mu,VariableGroup:qu,AButton:M.Button,ReloadOutlined:ri},setup(){var E;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(un),i=e.inject(fe),s=e.inject(Pe),d=e.inject(bn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const k=Z.cloneDeep(e.unref(a));p(k);const L=Z.pick(k,Z.without(Object.keys(k),"position","top","left","width","height"));ge(k.type,l)?(L.height=k.height,L.width=k.width):L.height="290px";const I=Z.cloneDeep(e.unref(i));return I.pageMode="design",I.componentList=s,I.preview=!0,I.pageConfig=d,{...L,graphicConfig:I,toolboxShow:!1,sourceLeft:k.left,sourceTop:k.top}});function p(k){var L,I,V,B;["#ffffff","#fff"].includes((L=k==null?void 0:k.color)==null?void 0:L.toLowerCase())&&(k.color="#000"),["#ffffff","#fff"].includes((I=k==null?void 0:k.variableColor)==null?void 0:I.toLowerCase())&&(k.variableColor="#000"),["#ffffff","#fff"].includes((V=k==null?void 0:k.increaseColor)==null?void 0:V.toLowerCase())&&(k.increaseColor="#000"),["#ffffff","#fff"].includes((B=k==null?void 0:k.declineColor)==null?void 0:B.toLowerCase())&&(k.declineColor="#000")}const u=e.computed(()=>{let k=!0;return ge(e.unref(c).type,l)&&(k=!1),k}),f=e.computed(()=>{var k;return(k=e.unref(c))==null?void 0:k.type}),g=e.computed(()=>{var k;return!!((k=e.unref(c))!=null&&k.isGroupTable)}),_=k=>{const L=k==="1";L&&f.value==="table"&&y(),window.changeShowTable&&window.changeShowTable(L),k==="3"&&x()},m=e.ref(),w=e.inject(Me),N=e.unref(e.inject(ve)),C=(E=window==null?void 0:window.config)==null?void 0:E.pageId;function x(){var H;const{leftAxisList:k=[],rightAxisList:L=[],queryColumnList:I=[],indicators:V=[]}=e.unref(i),B=[...k,...L,...I,...V],F={};for(const P of B){const{id:S="",indexCode:O=""}=P;S&&!yt(P,"calcType")&&!F[S]&&(F[S]=O)}if((H=Object.keys(F))!=null&&H.length){const P=[];for(const S in F)P.push(new Promise((O,A)=>{w.post(`${Be}/diagram/hrpIndexWithComplex`,{pageId:C,indexGuid:S,indexCode:F[S],dataSourceId:""},{headers:{Authentication:N,operateContext:"ygt"}}).then(v=>{var b;const{success:U,data:h=[]}=v.data;U&&((b=h==null?void 0:h.dataViewColumns)!=null&&b.length)?O(h.dataViewColumns):A(h)}).catch(v=>{A(v)})}));Promise.all(P).then(S=>{if(S!=null&&S.length){const O=S.reduce((A,v)=>A.filter(U=>v.find(h=>h.typeGuid===U.typeGuid)));m.value=O.filter(A=>A.typeGuid)}})}}const y=()=>{var L;let k;r&&f.value==="table"?k=window.updateConfig:k=(L=e.unref(n))==null?void 0:L.refreshData,typeof k=="function"&&k()};return e.provide(fn,y),e.watch(i,()=>{y()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:g,onChange:_,component:c,fullWidth:u,renderUsedComponents:s,intersection:m,refreshData:y}}}),dm="",cf={class:"data-config"},df={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function pf(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),f=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),_=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=m=>t.activeKey=m),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(f,{onClick:t.refreshData},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",df,null,512)):e.withDirectives((e.openBlock(),e.createBlock(_,{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 uf=ne(sf,[["render",pf],["__scopeId","data-v-286c406e"]]),ff=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:uf},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:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var E;return((E=e.unref(s))==null?void 0:E.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?Z.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?Z.cloneDeep(e.unref(s).chartsOptions):e.ref(Z.cloneDeep(Cn.line));p=e.ref(p);let u=e.unref(s).tableOptions?Z.cloneDeep(e.unref(s).tableOptions):e.ref(Z.cloneDeep(rr));u=e.ref(u);const f=e.ref([]),g=E=>{f.value=E},_=E=>{c.value={...e.unref(c),...e.unref(E)}},m=(E,k=!0)=>{k?p.value={...e.unref(p),...e.unref(E)}:p.value={...e.unref(E)}},w=E=>{u.value={...e.unref(u),...e.unref(E)}},N=()=>f,C=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=Z.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=Z.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},x=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=x,t.request&&e.provide(Me,t.request),e.provide(pn,{setDataList:g,getDataList:N});const y=E=>{n("updateUsedComponent",E)};return e.provide(Ye,s),e.provide(fe,c),e.provide(Ut,p),e.provide(mn,u),e.provide(go,r),e.provide(un,l),e.provide(ve,i),e.provide(Se,_),e.provide(ho,m),e.provide(yo,w),e.provide(Pe,t.renderUsedComponentList),e.provide(Gt,y),e.provide(gn,t.mapAttributeProps),e.provide(bn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:C}),{isUpdate:a}}}),pm="",mf={key:0,class:"config-modal"},hf={class:"config-modal-left"},yf={class:"config-modal-right"};function gf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mf,[e.createElementVNode("div",hf,[e.createVNode(s)]),e.createElementVNode("div",yf,[e.createVNode(d)])]))}const Qa=dn(ne(ff,[["render",gf],["__scopeId","data-v-23d542ce"]])),Xa=dn(Ka),Ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Xa,EcanIndicatorLibrary:Qa},Symbol.toStringTag,{value:"Module"})),bf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Ja).forEach(a=>{const r=Ja[a];r.install&&t.use(r)})}};we.EcanChartGraph=Xa,we.EcanIndicatorLibrary=Qa,we.default=bf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
56
+ `,Dn=!1,$r=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dr;e.nextTick(function(){Dn||(typeof window<"u"&&window.document&&window.document.documentElement&&Br(o,{prepend:!0}),Dn=!0)})},Mr=["icon","primaryColor","secondaryColor"];function vr(t,o){if(t==null)return{};var n=Pr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Pr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function qt(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 Vt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Rr(t){var o=t.primaryColor,n=t.secondaryColor;Vt.primaryColor=o,Vt.secondaryColor=n||In(o),Vt.calculated=!!n}function Ur(){return qt({},Vt)}var ht=function(o,n){var a=qt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=vr(a,Mr),l=Vt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),$r(),Fr(On(r),"icon should be icon definiton, but got ".concat(r)),!On(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=qt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),qt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};ht.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},ht.inheritAttrs=!1,ht.displayName="IconBase",ht.getTwoToneColors=Ur,ht.setTwoToneColors=Rr;const To=ht;function Gr(t,o){return Wr(t)||Yr(t,o)||Hr(t,o)||zr()}function zr(){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 Hr(t,o){if(t){if(typeof t=="string")return $n(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 $n(t,o)}}function $n(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 Yr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function Wr(t){if(Array.isArray(t))return t}function Mn(t){var o=Fn(t),n=Gr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function qr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Kr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Qr(t,o){return el(t)||Zr(t,o)||Jr(t,o)||Xr()}function Xr(){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 Jr(t,o){if(t){if(typeof t=="string")return vn(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 vn(t,o)}}function vn(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 Zr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function el(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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function tl(t,o){if(t==null)return{};var n=ol(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ol(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Mn("#1890ff");var yt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=tl(r,Kr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),w=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var C=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Qr(_,2),x=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:w,icon:s,primaryColor:x,secondaryColor:h,style:C},null)])};yt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},yt.displayName="AntdIcon",yt.inheritAttrs=!1,yt.getTwoToneColor=qr,yt.setTwoToneColor=Mn;const ye=yt;var nl={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 al=nl;function jn(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){rl(t,r,n[r])})}return t}function rl(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=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:al}),null)};Lo.displayName="AppstoreAddOutlined",Lo.inheritAttrs=!1;const Vo=Lo;var ll={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 il=ll;function Rn(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){sl(t,r,n[r])})}return t}function sl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:il}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const cl=Bo;var dl={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 pl=dl;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){ul(t,r,n[r])})}return t}function ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:pl}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const fl=Oo;var ml={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 hl=ml;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){yl(t,r,n[r])})}return t}function yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Io=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:hl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var gl={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 bl=gl;function zn(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){Cl(t,r,n[r])})}return t}function Cl(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=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:bl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const wl=Fo;var kl={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 _l=kl;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){xl(t,r,n[r])})}return t}function xl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:_l}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Sl=Do;var Nl={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 Al=Nl;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){Tl(t,r,n[r])})}return t}function Tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var $o=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(ye,Yn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Ll={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 Vl=Ll;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){Bl(t,r,n[r])})}return t}function Bl(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=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:Vl}),null)};Mo.displayName="DownOutlined",Mo.inheritAttrs=!1;const Ol=Mo;var Il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const Fl=Il;function qn(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 vo=function(o,n){var a=qn({},o,n.attrs);return e.createVNode(ye,qn({},a,{icon:Fl}),null)};vo.displayName="InfoCircleOutlined",vo.inheritAttrs=!1;const $l=vo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;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){Pl(t,r,n[r])})}return t}function Pl(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=Kn({},o,n.attrs);return e.createVNode(ye,Kn({},a,{icon:vl}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Qn=Po;var jl={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 Rl=jl;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){Ul(t,r,n[r])})}return t}function Ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Xn({},o,n.attrs);return e.createVNode(ye,Xn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={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 Hl=zl;function Jn(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){Yl(t,r,n[r])})}return t}function Yl(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=Jn({},o,n.attrs);return e.createVNode(ye,Jn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={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 Kl=ql;function Zn(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){Ql(t,r,n[r])})}return t}function Ql(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=Zn({},o,n.attrs);return e.createVNode(ye,Zn({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Zl=Jl;function ea(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){ei(t,r,n[r])})}return t}function ei(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Go=function(o,n){var a=ea({},o,n.attrs);return e.createVNode(ye,ea({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const ni=oi;function ta(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(ye,ta({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={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 ii=li;function oa(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){si(t,r,n[r])})}return t}function si(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=oa({},o,n.attrs);return e.createVNode(ye,oa({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:fl,CaretDownOutlined:cl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var A;const t=(A=window==null?void 0:window.config)==null?void 0:A.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var L;return(L=e.unref(a))==null?void 0:L.graphicConfig}),i=e.computed(()=>{var L;return(L=e.unref(r))==null?void 0:L.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const L={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const O=await o.post(`${Ve}/diagram/sourceList`,L,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:N,data:V={}}=O.data;if(N){const{rows:B=[],total:F=0}=V;B==null||B.forEach(H=>{var P;H.show=!1,(P=H.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),s.value=B,l.totalResult=+F}}catch{d.value=!1}},u=L=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[L],m=L=>{s.value[L].show=!s.value[L].show},g=()=>{l.currentPage=1,p()},w=Z.debounce(()=>{l.currentPage=1,p()},200),f=(L,O)=>{l.pageSize=O,l.currentPage=L,p()};e.onMounted(()=>{p()});const C=e.inject(fe),_=e.computed(()=>{const L=["classificationList","rowHeaderList","dimensionList"];let O=[];for(const N in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),N)&&L.includes(N)){const V=e.unref(C)[N];Array.isArray(V)&&(O=O.concat(V))}return O});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:w,onPaginationChange:f,searchText:c,setItemDisabled:(L=[])=>{let O=!1;for(const N of e.unref(_))if(!L.find(B=>B.typeGuid===N.typeGuid)){O=!0;break}return O},onDragStart:(L,O)=>{const N=O.dataViewColumns[L.oldIndex];N&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...N,dataTo:O.dataTo})),O!=null&&O.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(O.hrpIndexVariates)))},getSourceType:L=>L==="0"?"【指标库】":L==="1"?"【视图】":"【其他】"}}}),Bf="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=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",pi,[e.createVNode(s,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":w=>m.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:w=>t.onDragStart(w,m)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",gi,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":o[1]||(o[1]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Ci=oe(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:ur},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),na={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button},setup(t,{expose:o}){var x;const n=(x=window==null?void 0:window.config)==null?void 0:x.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(fe),s=e.inject(xe),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=async()=>{try{const h=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:A,data:L=[]}=h.data;A&&(c.value=L==null?void 0:L.slice(0,200))}catch(h){console.error(h)}},u=()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},s({[t.type]:h})};let m=!1;const g=()=>{m=!0},w=e.ref(!1),f=()=>{w.value=!0},C=()=>{w.value=!1},_=()=>{m&&u(),m=!1,C()};return o({showModal:f}),e.watch(w,h=>{var A,L;if(h){const O=(L=(A=t.item)==null?void 0:A.sort)==null?void 0:L.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),{visible:w,onCancel:_,customSortList:c,onChange:g,onDeleteConfig:()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O},s({[t.type]:h}),C()}}}}),Of="",Si={class:"button-wrapper"},Ni={class:"sort-item"};function Ai(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),l=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(l,{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",Si,[e.createVNode(s,{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",Ni,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Ti=oe(xi,[["render",Ai],["__scopeId","data-v-8e16d201"]]),Ei=e.defineComponent({name:"CustomGroupModal",directives:{focus:na},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var j;const n=e.inject(Me),a=(j=window==null?void 0:window.config)==null?void 0:j.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},w=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),C=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const M=e.unref(c)[D];e.unref(c)[D].data=M.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},x=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(fe),A=e.inject(xe),L=e.computed(()=>e.unref(h).source),O=e.computed(()=>e.unref(h).dataViewId),N=e.ref(!1),V=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(N)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const re=y[ee]||{},{title:he,data:me}=re;D[he]=(me==null?void 0:me.map(Ee=>Ee.label))||[]}const M=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],G=M[t.index];G.customGroup={groupInfoMap:D,otherGroupName:b},A({[t.type]:M})},B=e.ref(!1),F=()=>{B.value=!0},H=()=>{B.value=!1},P=()=>{H(),i&&V(),i=!1},S=()=>{i=!0},I=new Set,E=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(N.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const M in T)if(Object.prototype.hasOwnProperty.call(T,M)){const K=T[M].map(Q=>(I.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:M,data:K},D++}await v()},v=async()=>{var y;try{const b=await n.post(`${Ve}/diagram/groupvalue`,{source:e.unref(L),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const M=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(G=>{I.has(G)||M.push({label:G,checked:!1})}),e.unref(c)[0].data=M}}catch(b){console.error(b)}};return e.watch(B,y=>{y&&E(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:F}),{visible:B,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:N,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:w,onMoveInGroup:C,selectGroupIndex:f,onEditTitle:_,onTitleChange:x,onFinishEditTitle:k,onUseOtherGroup:S,customGroupEditTitleList:u}}}),If="",Ff="",Li={class:"custom-group-header"},Vi={class:"move-and-create"},Bi={class:"select-tip"},Oi={class:"select-count"},Ii={class:"create-group"},Fi={class:"custom-group-content"},Di=["onClick"],$i={class:"extra"},Mi={class:"custom-group-list"},vi={class:"text"};function Pi(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),C=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(C,{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",Li,[e.createElementVNode("div",Vi,[e.createElementVNode("div",null,[e.createElementVNode("span",Bi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Oi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(s,{key:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ii,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Fi,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(w,{key:x},{header:e.withCtx(()=>[t.customGroupEditTitleList[x]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,x),onBlur:h=>t.onFinishEditTitle(x),onPressEnter:h=>t.onFinishEditTitle(x)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(x),["prevent","stop"])},e.toDisplayString(k.title),9,Di))]),extra:e.withCtx(()=>[e.createElementVNode("div",$i,[x===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),x!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(x),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,A)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":L=>h.checked=L,class:"custom-group",key:A},{default:e.withCtx(()=>[e.createElementVNode("span",vi,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ji=oe(Ei,[["render",Pi],["__scopeId","data-v-7e3049d2"]]);let ke=(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};var Ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},Ui={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Ri,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Ui);const Gi=Yo;se.extend(Gi);const zi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Vo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Qn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var st,ct,At,dt,Le,Qe,tt,ot,ze,pt,ut,ft,nt;const o=(st=window==null?void 0:window.config)==null?void 0:st.pageId,n=e.inject(fe),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=se(),c=e.computed(()=>{var Y;const z=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:J="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${J}-startTime`,label:`${ne||J}-开始时间值`,keyName:`${ne||J}-startTime`,id:J},{value:`${J}-endTime`,label:`${ne||J}-结束时间值`,keyName:`${ne||J}-endTime`,id:J}):z.push({value:J,label:`${ne||J}`,keyName:`${ne||J}`,id:J})}),z}),p=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},w=[{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"}],f=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),C=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:""}]),_=[{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"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],x=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(ct=t.data)==null?void 0:ct.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(dt=t.data)==null?void 0:dt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:A(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((pt=t.data)==null?void 0:pt.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((ft=t.data)!=null&&ft.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function A(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const ne=e.unref(c).find(J=>J.keyName===X);return ne?ne.value:X}else return X}const L=e.ref(!1),O=e.computed(()=>h.value.fieldType==="DATE"),N=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(z)){let J=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const _e=e.unref(n)[ce];Array.isArray(_e)&&(X.includes(ce)?J=J.concat(_e.filter(at=>at.show)):J=J.concat(_e))}Y=J}else["leftAxisList","rightAxisList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:V,deleteCondition:B,addCondition:F}=e.inject(yn,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),H=()=>{B(t.index,t.path)};e.watch(h,z=>{const Y=Z.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{h.value.fieldValue="",h.value.useCurrentTime=z});const P=z=>{var U;const Y=e.unref(N).find(W=>W.value===z)||{},{name:X,genericType:ne,id:J,label:ce,typeGuid:_e,indexCode:at,indexCodeNum:R}=Y;h.value={id:J,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:_e,indexCode:at,indexCodeNum:R,dataType:"",useCurrentTime:!1,keyValue:((U=e.unref(h))==null?void 0:U.keyValue)||ke()}},S=z=>{const Y=e.unref(c).find(X=>X.value===z)||{};e.unref(h).componentId=Y.id||""},I=e.computed(()=>{const z=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),z==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),E=e.computed(()=>{let z="";const Y=e.unref(I).find(X=>X.value===e.unref(h).rule);return Y&&(z=Y.label),z}),v=e.computed(()=>{let z={fontSize:"12px"};return e.unref(E)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),j=e.ref([]),y=async()=>{var z;if(!(e.unref(j).length>0))try{const Y=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(j.value=(z=ne==null?void 0:ne.slice(0,200))==null?void 0:z.map(J=>({label:J,value:J})))}catch(Y){console.error(Y)}},b=z=>{e.unref(h).rule=z,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&y()},T=z=>{e.unref(h).dataType=z,e.unref(h).fieldValue=""},D=e.ref(),M=z=>{D.value=z,e.unref(h).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,J,ce,_e,at,R,U,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((J=t.data)==null?void 0:J.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(_e=t.data)==null?void 0:_e.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const ae=e.unref(h).calcWays[0];if(ae){const te=ae.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((R=t.data)==null?void 0:R.radioValue)||"";const ae=e.unref(C).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});ae&&Ee(ae,t.data)}}else D.value=((W=(U=t.data)==null?void 0:U.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=h.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=z=>{if(e.unref(h).activeKey===z){e.unref(C)[z].radioValue=e.unref(h).radioValue,e.unref(C)[e.unref(h).activeKey]&&(e.unref(C)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(C)[z].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(C)[z].afterNum=e.unref(h).calcWays[0]));return}e.unref(C).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{m.value=!0;const X=z.target.value,ne=Y.type,J=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),_e=Y.afterNum;Y.value=de(X,ne,J,ce,_e)},ee=z=>{const Y=e.unref(h).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,J=e.unref(h).radioValue;let ce=0,_e=0;return J==="1"?ce=Math.abs(e.unref(h).calcWays[0]):J==="2"&&(_e=e.unref(h).calcWays[0]),de(J,X,ne,ce,_e)},re=(z,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const J=z.target.value;X==="+"?Y.value=se().add(J,Y.type).format(e.unref(h).dateFormat):Y.value=se().subtract(J,Y.type).format(e.unref(h).dateFormat)}},he=(z,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=z.radioValue,z.radioValue==="1"?e.unref(h).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(h).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),L.value=!1},me=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,L.value=!1};function Ee(z,Y){const{radioValue:X="",calcWays:ne=[]}=Y;z.radioValue=X,ne!=null&&ne.length&&(X==="1"?z.beforeNum=Math.abs(ne[0]):X==="2"&&(z.afterNum=ne[0]))}function de(z,Y,X,ne,J){if(z==="1")return se().subtract(ne,Y).format(X);if(z==="2")return se().add(J,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:N,ruleOptions:I,onFieldChange:P,condition:h,valueOptions:j,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:M,fieldValues:D,onDelete:H,isDateType:O,formatList:w,tabDateList:C,compareList:_,menuRule:k,dateBtnLabel:E,downIconStyle:v,popoverVisible:L,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:x,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:re,okDatePickConfig:he,onChangeComponent:S,filterOption:$e,okCustomConfig:me,clickConditionMenu:({key:z})=>{F(t.path,t.index,z==="2"?"||":"&&")}}}}),Df="",$f="",Hi={class:"condition"},Yi=["title"],Wi={class:"rule"},qi={class:"data-type"},Ki={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Qi={class:"popover-content-wrap"},Xi={key:0,class:"use-current-time"},Ji={class:"tabFilterRadio"},Zi={key:0},es={key:1},ts={style:{"margin-left":"10px"}},os={style:{"margin-left":"10px"}},ns={style:{position:"absolute",bottom:"10px"}},as={style:{display:"flex"}},rs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ls(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),C=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),A=e.resolveComponent("appstore-add-outlined"),L=e.resolveComponent("a-popover"),O=e.resolveComponent("a-input"),N=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:B.label},e.toDisplayString(B.label),9,Yi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Wi,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,B=>(e.openBlock(),e.createBlock(c,{key:B.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,F=>{var H;return e.openBlock(),e.createBlock(c,{key:F.value,disabled:F.value==="component"&&!((H=t.controlList)!=null&&H.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value?"color: #1890FF;":"")},e.toDisplayString(F.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,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",qi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ki,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(w,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(w,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=B=>t.condition.fieldValue=B),format:t.condition.dateFormat},null,8,["value","format"]))],64)):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]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(L,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=B=>t.popoverVisible=B),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Qi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=B=>t.isUseCurrentTime=B)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(B,F)=>(e.openBlock(),e.createBlock(x,{key:F,tab:B.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(k,{value:B.radioValue,"onUpdate:value":H=>B.radioValue=H,onChange:H=>t.changeRadioValue(H,B)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Zi,"相对当前时间:"+e.toDisplayString(B.value),1)):(e.openBlock(),e.createElementBlock("div",es,"相对当前时间:"+e.toDisplayString(t.getFieldValue(F)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.beforeNum,"onUpdate:value":H=>B.beforeNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ts,e.toDisplayString(B.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.afterNum,"onUpdate:value":H=>B.afterNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",os,e.toDisplayString(B.afterLabel),1)]),_:2},1032,["style"]),B.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),B.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ns,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=H=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:H=>t.okDatePickConfig(B,F)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(x,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=B=>t.customTabData.expression=B),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=B=>t.customTabData.unit=B),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=B=>t.customTabData.around=B)},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=B=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=B=>{t.popoverVisible=!0})},[e.createVNode(A)])]),_: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"])):(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(O,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=B=>t.condition.fieldValue=B)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(N,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const is=oe(zi,[["render",ls],["__scopeId","data-v-d10a7ca9"]]),ss=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:is}}),Mf="",cs={key:0,class:"condition-list"},ds={key:0,class:"condition-container"},ps={key:0,class:"condition-text"},us={key:1,class:"condition-text"},fs={class:"conditions"};function ms(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",ds,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",ps,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",us,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",fs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const hs=oe(ss,[["render",ms],["__scopeId","data-v-553c1496"]]),ys=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=Z.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),vf="",aa=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),gs={class:"truncations"},bs={class:"rule"},Cs={class:"field-value"},ws={class:"field-value"},ks=aa(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),_s=aa(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),xs=["onClick"];function Ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",gs,[(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",bs,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Cs,[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",ws,[ks,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),_s]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,xs)]))),128))])}const Ns=oe(ys,[["render",Ss],["__scopeId","data-v-f543c690"]]),ge=(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},As=t=>t.replace(/\\n/g,`
59
+ `),gt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},ra=(t,o)=>{var f;const n=Z.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;ia(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const C of m){const _=Je((C==null?void 0:C.conditions)||[]);if(_!=null&&_.length){const k=_.filter(x=>sa(x,o)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const h=sa(x,o),A={};return x!=null&&x.dateFormat&&(A.format=x.dateFormat),{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:h.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0,indexCode:x.indexCode,typeGuid:x.typeGuid,indexCodeNum:x.indexCodeNum,...A}});if(k!=null&&k.length)for(const x of k)g.find(h=>h.keyName===x.keyName)||g.push(x)}}const w=g.length;for(let C=0;C<w;C++){const _=g[C];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:x,prop:h,format:A,dataType:L="component",customValue:O}=_,N=la(_);Wo({sqlCondition:N,renderUsedComponents:o,id:k,dateFormat:A,prop:h,keyName:x,dataType:L,customValue:O}),u.push(N)}for(let C=u.length-1;C>=0;C--){const _=u[C];_.globalCondition||Je(u).find(x=>x.alias===_.alias&&x.globalCondition)&&u.splice(C,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function la(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Ts=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function ia(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)ia(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=la(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Ts)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(x=>x.id===a),{value:g,format:w="YYYY-MM-DD",operate:f,type:C="",useCurrentTime:_}=m||{},k=r||w;if(ge(C,"date")){let x;if(_?x=se():x=se(g),f&&g){const{mode:h,type:A,value:L}=f;if(L)switch(A){case"add":x=x.add(L,h);break;case"minus":x=x.subtract(L,h);break}}if(c&&p&&u)switch(u){case"add":x=x.add(c,p);break;case"minus":x=x.subtract(c,p);break}o.fieldValue=(x==null?void 0:x.format(k))||"",o.dateFormat=k}else if(C==="ecanRangePicker"){const{interval:x,intervalUnit:h,startTime:A,endTime:L}=m||{};let O=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(O=V[V.length-1])}if(!O)return;let N=null;if(_&&(O==="startTime"?N=se().subtract(x,h):O==="endTime"&&(N=se())),m[O]&&(N=se(m[O])),f){const{type:V,value:B,mode:F}=f;switch(V){case"add":N=N&&N.add(B,F);break;case"minus":N=N&&N.subtract(B,F)}}if(c&&p&&u){if(c==="rangeValue"){if(A&&L){const V=se(L).diff(se(A),p)+1;switch(u){case"add":N=N&&N.add(V,p);break;case"minus":N=N&&N.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":N=N&&N.add(c,p);break;case"minus":N=N&&N.subtract(c,p)}}if(N&&(o.fieldValue=N==null?void 0:N.format(k)),O==="rangeValue"&&A&&L){const V=Es(k);V&&(o.fieldValue=se(L).diff(se(A),V)+1)}o.dateFormat=k}else{const x=g&&g.match(/\{(.+?)\}/g);x!=null&&x.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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;case"ecanImage":o="click";break}return o};function sa(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}function Es(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:hs,TruncationList:Ns,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(fe),i=e.inject(xe),s=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=S=>{var I;for(const E of S)(I=E.conditions)!=null&&I.length?g(E.conditions):E.keyValue=ke()};e.watch(m,S=>{var I,E,v,j;if(S){if(Array.isArray((I=t.item)==null?void 0:I.conditions)){const y=Z.cloneDeep(((E=t.item)==null?void 0:E.conditions)||[]);g(y),p.value=y}Array.isArray((v=t.item)==null?void 0:v.truncations)?u.value=Z.cloneDeep((j=t.item)==null?void 0:j.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let w=!1;const f=S=>{var I;w=!0,e.unref(p)==null||((I=e.unref(p))==null?void 0:I.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:ke()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:ke()}))};e.provide(yn,{updateCondition(S,I,E){var y;w=!0;let v=e.unref(p);const j=E.split("-");if(j!=null&&j.length)for(const b of j)if(v[b])v=(y=v[b])==null?void 0:y.conditions;else break;Array.isArray(v)&&v[I]&&(v[I]=S)},deleteCondition(S,I){var j,y,b;w=!0;let E=e.unref(p);const v=I.split("-");if(v!=null&&v.length){for(const T of v)if(E[T])E=(j=E[T])==null?void 0:j.conditions;else break;if(Array.isArray(E)&&E[S])if(E.splice(S,1),E.length===1){if(v.length>0){const T=v.length-1,D=v[T],M=v.slice(0,T);let G=e.unref(p),K="";for(const Q of M)if(G[Q])K=(y=G[Q])==null?void 0:y.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===E[0].join){if(Array.isArray(E[0].conditions)){const Q=Z.cloneDeep(E[0].conditions);G.splice(+D,1),G.splice(+D,0,...Q)}}else G[D]=E[0]}}else E.length===0&&(p.value=[])}},addCondition(S,I,E){var b,T;w=!0;let v=e.unref(p),j="";const y=S.split("-");if(y!=null&&y.length){for(const D of y)if(v[D])j=(b=v[D])==null?void 0:b.join,v=(T=v[D])==null?void 0:T.conditions;else break;if(j===E)v.splice(I+1,0,{keyValue:ke()});else{const D=Z.cloneDeep(v[I]);v[I]={join:E,conditions:[D,{keyValue:ke()}]}}}}});const C=S=>{w=!0,u.value=S},_=e.computed(()=>{var I;const S=[];return(I=e.unref(s))==null||I.forEach(E=>{const{keyName:v="",id:j="",type:y}=E;y==="ecanRangePicker"?S.push({value:`${j}-startTime`,label:`${v||j}-开始时间值`,keyName:`${v||j}-startTime`},{value:`${j}-endTime`,label:`${v||j}-结束时间值`,keyName:`${v||j}-endTime`}):S.push({value:j,label:`${v||j}`,keyName:`${v||j}`})}),S}),k=()=>{var b,T,D;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),I=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],E=Je(Z.cloneDeep(I[t.index].conditions));I[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(I[t.index].truncations=e.unref(u));const v=Je(e.unref(p));for(const M of v)if(M.dataType==="component"&&M.fieldValue){const G=e.unref(_).find(K=>K.value===M.fieldValue);G&&(M.fieldValue=G.keyName)}const j=E.filter(M=>!v.find(G=>G.componentId===M.componentId)).filter(M=>!S.find(G=>G.id===M.componentId)),y=v.filter(M=>!E.find(G=>G.componentId===M.componentId));x(j,y),i({[t.type]:I,sqlConditions:ra({...e.unref(r),[t.type]:I},e.unref(s))})};function x(S,I){var v;const E=S.map(j=>({...j,delete:!0})).concat(I.map(j=>({...j,add:!0})));for(const j of E){const y=e.unref(s).find(b=>b.id===j.componentId);if(y){const{type:b,id:T,events:D=[]}=y,M=Qt(b);if(j.add)D.find(G=>{var K;return G.on===M&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||c({id:T,events:[...D,{on:M,target:(v=e.unref(l))==null?void 0:v.id,emit:"refreshData"}].reverse()});else if(j.delete){const G=D.findIndex(K=>{var Q;return K.on===M&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(D.splice(G,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},A=()=>{p.value=[],m.value=!1},L=()=>{w&&k(),w=!1,A()},O=()=>{A()},N=e.inject(Me),V=e.unref(e.inject(ve)),B=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(gn,F);const H=async S=>{var I;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:E,indexCode:v}=S,j=await N.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:B,dataSourceId:e.unref(d),indexGuid:E,indexCode:v},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=j.data;y&&((I=b==null?void 0:b.dataViewColumns)!=null&&I.length)&&(F.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(E){console.error(E)}};return e.watch(()=>t.item,S=>{S&&m.value&&H(S)}),o({showModal:h}),{visible:m,onOk:L,onCancel:O,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:C,activeKey:n}}}),Pf="",Vs={class:"header"},Bs={class:"header"};function Os(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=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:"55%",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","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=m=>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(l,{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",Bs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[6]||(o[6]=m=>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 Is=oe(Ls,[["render",Os],["__scopeId","data-v-498bb1e7"]]),Fs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),jf="",Ds=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),$s={class:"config-name"},Ms=Ds(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function vs(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[Ms,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ps=oe(Fs,[["render",vs],["__scopeId","data-v-de6a1755"]]),js=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=Z.cloneDeep(k),l.value=Z.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var A,L;const _=Je(((A=e.unref(a))==null?void 0:A.controlList)||[]),k=p.filter(O=>!e.unref(l).includes(O)).filter(O=>!_.find(N=>N.id===O)),x=e.unref(l).filter(O=>!p.includes(O)).filter(O=>!_.find(N=>N.id===O)),h=k.map(O=>({componentId:O,delete:!0})).concat(x.map(O=>({componentId:O,add:!0})));for(const O of h){const N=e.unref(i).find(V=>V.id===O.componentId);if(N){const{type:V,id:B,events:F=[]}=N,H=Qt(V);if(O.add)F.find(P=>{var S;return P.on===H&&P.target===((S=e.unref(s))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:B,events:[...F,{on:H,target:(L=e.unref(s))==null?void 0:L.id,emit:"refreshData"}].reverse()});else if(O.delete){const P=F.findIndex(S=>{var I;return S.on===H&&S.target===((I=e.unref(s))==null?void 0:I.id)&&S.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:B,events:F}))}}}},w=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},C=(_,k)=>{var x;return(x=k==null?void 0:k.keyName)==null?void 0:x.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:w,onCancel:f,idFilterOption:C,fieldName:l,usedComponentList:c}}}),Rf="",Rs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Us={class:"sort-by-cpnt"},Gs=Rs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function zs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[Gs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Hs=oe(js,[["render",zs],["__scopeId","data-v-08af1ef8"]]),Ys=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:w=""}=m;i.value=w,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var w;return(w=g==null?void 0:g.label)==null?void 0:w.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Uf="",Ws=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),qs={class:"dim-by-count"},Ks=Ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Qs(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[Ks,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Xs=oe(Ys,[["render",Qs],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},Js=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(fe),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(B=>{var F;return B.id!==((F=t.item)==null?void 0:F.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),w=e.ref(""),f=V=>{const B=document.getElementById("calTextArea");let F=m.value;if(document.selection){const H=document.selection.createRange();H.text=V}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const H=B.selectionStart,P=B.selectionEnd;let S=H;F=F.substring(0,H)+V+F.substring(P,F.length),S+=V.length,B.selectionStart=B.selectionEnd=S}else F+=V;m.value=F},C=["+","-","*","/","(",")"],_=(V,B)=>{let F="";switch(B){case"name":{F="${"+V+"}";break}case"function":{F=V+"()";break}default:F=V}f(F)},k=[],x=e.ref([]),h=e.ref(!0),A=e.ref([]),L=V=>{var B;for(const F of V)(B=F==null?void 0:F.children)!=null&&B.length?L(F.children):k.push({key:F.key,title:F.title})},O=async()=>{try{const V=await n.get(`${Ve}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:F=[]}=V.data;B&&(F!=null&&F.length)&&(L(F),A.value=F)}catch(V){console.error(V)}},N=V=>{x.value=V,h.value=!1};return e.watch(w,V=>{const B=k.map(F=>F.title.indexOf(V)>-1?qo(F.key,A.value):null).filter((F,H,P)=>F&&P.indexOf(F)===H);x.value=B,w.value=V,h.value=!0}),e.onMounted(()=>{O()}),{fieldList:p,varList:u,myValue:m,calculMethods:C,funcDescsData:A,searchFuncValue:w,expandedKeys:x,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:N}}}),Gf="",zf="",Zs={class:"formula-calculation"},ec={class:"field-area"},tc={style:{"text-align":"center",padding:"10px 0"}},oc=["onClick"],nc=["onClick"],ac={class:"cal_right_bottom"},rc={class:"cal_fu"},lc=["onClick"],ic={class:"function-wrap"},sc={class:"wrap-search"},cc={class:"tree-box"},dc={key:0},pc={style:{color:"#f50"}},uc={key:1},fc=["onClick"],mc={class:"cal_a"};function hc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Zs,[e.createVNode(w,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,oc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,nc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ac,[e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,C)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:C},e.toDisplayString(f),9,lc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",cc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:C})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",dc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",pc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",uc,e.toDisplayString(f),1)),C?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,fc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const yc=oe(Js,[["render",hc],["__scopeId","data-v-ba051d9b"]]),gc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:yc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(fe),r=e.inject(xe),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const I of P)Object.prototype.hasOwnProperty.call(e.unref(a),I)&&(S=S.concat(e.unref(a)[I]));return S}),l={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},m=e.ref({}),g=e.ref(),w=e.ref(!1),f=e.ref();e.watch(w,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y}=t.item;if(f.value={label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y},j==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u));else f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let C=!1;const _=()=>{C=!0},k=P=>{const S=e.unref(i).find(I=>I.id===P);S&&(f.value.builtInCalcWay=S.keyName),C=!0},x=()=>{var v;const P=((v=e.unref(a)[t.type])==null?void 0:v.slice())||[],{label:S,builtInFormula:I}=e.unref(f)||{},E={};if(I==="DATE_OFFSET"&&(E.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const j=ke();P.push({...e.unref(f),...E,id:j,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...E,name:S});r({[t.type]:P})},h=()=>{w.value=!0},A=()=>{w.value=!1},L=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const I=e.unref(d).find(E=>E.label===S);return I?I.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},O=e.computed(()=>{let P={label:[{required:!0,validator:L,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),N=()=>{g.value.validate().then(()=>{C&&x(),C=!1,A()})},V=()=>{g.value.clearValidate(),A()},B=()=>{C=!0,e.unref(f).builtInCalcWay=""},F=e.computed(()=>{let P="";const S=e.unref(f).builtInCalcWay,I=e.unref(f).builtInValueSource;if(!I||!S)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+I+"】由小到大在所有值中的排名":P="【"+I+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
60
+ `,S==="ASC"?P=P+"【"+I+"】由小到大的组内的排名":P=P+"【"+I+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let E="";switch(S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P="将所有【"+I+"】"+E;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let E="";switch(P=`所有【】的
61
+ `,S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P=P+"将所有【"+I+"】"+E;break}}return P}),H=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:h}),{visible:w,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:N,onChange:_,formRules:O,accessLogic:F,formRef:g,onChangeBuiltInFormula:B,componentList:i,onChangeComponent:k,filterOption:H,offsetConfig:m}}}),Hf="",Yf="",bc={key:0,class:"accesstip"},Cc={style:{display:"flex","align-items":"center"}};function wc(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),w=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),C=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(C,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),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]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=_=>t.formState.formula=_),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","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]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{value:"DATE_OFFSET"},{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]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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]=_=>t.formState.builtInCalcWay=_),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(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",bc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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"]))],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,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=_=>t.formState.builtInValueSource=_),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",Cc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(w,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const kc=oe(gc,[["render",wc],["__scopeId","data-v-33575cd9"]]),_c=e.defineComponent({name:"DataConfigCard",directives:{focus:na},components:{CalculationModal:kc,FilterModal:Is,CustomGroupModal:ji,SettingOutlined:ci,DeleteOutlined:Sl,CopyOutlined:wl,InfoCircleOutlined:$l,CustomSortModal:Ti,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Ps,SortByCpnt:Hs,DimByCount:Xs},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(fe),a=e.inject(xe),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(R={})=>{var q;const{type:U}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(R.scope)?i.includes(U)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(R.scope)&&s.includes(U)&&(W=!0),U==="dimensionList"){const ie=((q=e.unref(n)[U])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(R="{}")=>{var U,W;try{const q=JSON.parse(R);if(!c(q))return;const ie=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=ke(),ie.push(q);let ae=[];if(["IDX","BUILT_IN_IDX"].includes(q.scope)){const te=sessionStorage.getItem("indicator-variates");if(te){const le=JSON.parse(te);if(le!=null&&le.length){ae=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of le)ae.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:ke()})}}}a({[t.type]:ie,variableList:ae,variableConditions:Bt(ae,r)}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(R="{}")=>{var U;try{const{cardItem:W,type:q,index:ie}=JSON.parse(R);if(!c(W)||q===t.type)return;const ae=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];g(ae,W),ae.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:ae,[q]:te})}catch(W){console.error(W)}};function g(R,U){const W=[];if(R.forEach(q=>{q.label.includes(U.label)&&W.push(q.label.split(U.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){U.label=U.label+q;break}}}const w=(R,U)=>{var ie,ae;const W=(ie=R.target)==null?void 0:ie.checked,q=((ae=e.unref(n)[t.type])==null?void 0:ae.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[U].show=W,a({[t.type]:q})},f=R=>{var W;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];U.splice(R,1),a({[t.type]:U})},C=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const R=sessionStorage.getItem("indicator-list-item"),U=sessionStorage.getItem("indicator-card-item");R?u(R):U&&m(U)},k=R=>{var le,pe;const{newIndex:U,oldIndex:W,from:q,to:ie}=R,ae=q.id,te=ie.id;if(U>=0&&W>=0){if(ae===te){const be=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=be.splice(W,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}else if(t.type===te){const be=((pe=e.unref(n)[te])==null?void 0:pe.slice())||[];if(be!=null&&be.length){const He=be.splice(be.length-1,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}}}},x=(R,U)=>{const W=R.oldIndex,q=U[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),A=e.ref([]);let L=!1;e.watch(()=>e.unref(h).length,R=>{A.value=new Array(R).fill(!1)},{flush:"post",immediate:!0});const O=R=>{var W,q,ie;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=U[R])!=null&&q.randomKey){const ae=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=ae.length-1;te>=0;te--)ae[te].randomKey===U[R].randomKey&&ae.splice(te,1);a({variableConditions:Bt(ae,r),variableList:ae})}U.splice(R,1),a({[t.type]:U})},N=R=>{A.value[R]=!0},V=()=>{L=!0},B=(R,U,W)=>{var q,ie,ae,te;if(A.value[U]=!1,L){const le=(q=R.target)==null?void 0:q.value,pe=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],be=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.formula)==null?void 0:Ce.includes(W)}).map(ue=>ue.id),He=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.builtInValueSource)==null?void 0:Ce.includes(W)}).map(ue=>ue.id);if(be!=null&&be.length)for(const ue of be){const Ce=pe.find(mt=>mt.id===ue);Ce.formula=Ce.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const ue of He){const Ce=pe.find(mt=>mt.id===ue);Ce.builtInValueSource=Ce.builtInValueSource.replaceAll(W,le)}if(pe[U].label=le,(ae=pe[U])!=null&&ae.randomKey){const ue=((te=e.unref(n))==null?void 0:te.variableList)||[],Ce=ue.filter(mt=>mt.randomKey===pe[U].randomKey);Ce!=null&&Ce.length&&Ce.forEach(mt=>{mt.label=le}),a({variableConditions:Bt(ue,r),variableList:ue})}a({[t.type]:pe})}L=!1},F="DEFAULT",H=e.computed(()=>{const R=[],{scope:U,label:W}=e.unref(l);let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(U)&&(q=q.filter(le=>le.label===W)),U==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=Z.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,R.push(le)}const{leftAxisList:ie=[],rightAxisList:ae=[],indicators:te=[]}=e.unref(n)||{};return[{id:F,label:"默认",name:"默认"},...q,...R,...ie,...ae,...te]}),P=(R={},U,W="ASC")=>{var pe;const{label:q,name:ie,id:ae,defaultCode:te}=R,le=((pe=e.unref(n)[t.type])==null?void 0:pe.slice())||[];ae===F?delete le[U].sort:le[U].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},S=(R={},U="ASC")=>{const q={ASC:"升序",DESC:"降序"}[U],{sort:ie}=R,{label:ae,order:te}=ie||{};return ae&&te===U?`${q}(${ae})`:q},I=e.ref(),E=e.ref(),v=e.ref(),j=e.ref(),y=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(v))==null||W.showModal()},b=R=>{var U;return"自定义排序"+(((U=R==null?void 0:R.sort)==null?void 0:U.type)==="CUSTOM"?"(已配置)":"")},T=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(j))==null||W.showModal()},D=R=>"自定义分组"+((R==null?void 0:R.customGroup)!=null?"(已配置)":""),M=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].aggregate=R,a({[t.type]:W})},Q=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].distinct=R,a({[t.type]:W})},ee=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].dateFormat=R,a({[t.type]:W})},re=(R="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[R]})`,he=R=>`是否去重(${{0:"否",1:"是"}[R]||"否"})`,me=(R={})=>{var U;return"过滤"+(R!=null&&R.conditions&&((U=R==null?void 0:R.conditions)==null?void 0:U.length)>0?"(已配置)":"")},Ee=e.ref(),de=e.ref(),$e=e.ref(),et=e.ref(),mo=(R={},U)=>{I.value=R,E.value=U,e.unref(Ee).showModal()},st=(R={},U)=>{I.value=R,E.value=U,e.unref(de).showModal(R)},ct=(R={},U)=>{I.value=R,E.value=U,e.unref($e).showModal(R)},At=(R={},U)=>{I.value=R,E.value=U,e.unref(et).showModal(R,e.unref(Y))},dt=e.ref(),Le=e.ref("add"),Qe=(R,U,W)=>{var q;Le.value=R,R==="edit"&&(I.value=U,E.value=W),(q=e.unref(dt))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),ze=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{}),ut=async()=>{try{const R=await tt.post(`${Ve}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:U,data:W=[]}=R.data;U&&(ze.value=W)}catch(R){console.error(R)}},ft=(R,U)=>{const W=e.unref(n)[t.type]||{};W[U]=R,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(R,U)=>{var q;const{name:W}=U;if(!nt.includes(t.type)&&R&&gt(U,"indexCode")){const ie=await tt.post(`${Ve}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:U.id,indexCode:U.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:ae,data:te}=ie.data;ae&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],z.value[W]={name:te.name,code:te.indexCode})}},ne=R=>{l.value=R},J=R=>{const U=document.createElement("input");document.body.appendChild(U),U.setAttribute("value",R),U.select(),document.execCommand("copy"),document.body.removeChild(U),$.message.success("复制成功")},ce=e.inject(Ye),_e=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:w,onDropEnd:f,onDragItemEnd:C,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:x,cardItemList:h,onDelete:O,onEdit:N,onCommitLabelChange:B,sortList:H,onSort:P,handleSortTitle:S,showCustomSortModal:y,customSortModalRef:v,currentItem:I,currentIndex:E,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:j,showCustomGroupModal:T,editLabelList:A,onLabelChange:V,aggregateList:M,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:re,handleDistinctTitle:he,onShowCalculationModal:Qe,handleFilterTitle:me,filterModalRef:Ee,configNameRef:de,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mo,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:ze,fieldData:pt,onFieldChange:ft,onVisibleChange:X,onClickSetting:ne,copyDataViewName:J,dataViewMap:z,isShowConfigName:_e,showConfigNameModal:st,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:ct,dataSelectIndicators:p,showDimByCountModal:At}}}),Wf="",qf="",bt=t=>(e.pushScopeId("data-v-c2ca0016"),t=t(),e.popScopeId(),t),xc={class:"title"},Sc={class:"title-text"},Nc={class:"field-wrap"},Ac={class:"field-item"},Tc=bt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ec={class:"field-item"},Lc=bt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Vc={class:"title"},Bc={class:"title-text"},Oc=bt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Ic=bt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Fc={class:"card-item-wrap"},Dc={class:"card-item-inner"},$c=["onClick"],Mc=["onClick"],vc=["onClick"],Pc={style:{display:"flex","align-items":"center"}},jc=["title"],Rc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Uc={style:{display:"flex","align-items":"center"}},Gc=["title"],zc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),w=e.resolveComponent("a-sub-menu"),f=e.resolveComponent("a-menu-divider"),C=e.resolveComponent("copy-outlined"),_=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),x=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),A=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),N=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),B=e.resolveComponent("sort-by-cpnt"),F=e.resolveComponent("dim-by-count"),H=e.resolveComponent("calculation-modal"),P=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",xc,[e.createElementVNode("div",Sc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[e.createElementVNode("div",Ac,[Tc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ec,[Lc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[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",Vc,[e.createElementVNode("div",Bc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Oc]),default:e.withCtx(()=>[e.createVNode(l,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Ic])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(A,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[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:o[4]||(o[4]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:I})=>[e.createElementVNode("div",Fc,[e.createVNode(h,{class:"card-item",checked:S.show,onChange:E=>t.onCheckboxChange(E,I)},{default:e.withCtx(()=>[e.createElementVNode("div",Dc,[!t.editLabelList[I]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])},e.toDisplayString(S.label),9,$c)):e.createCommentVNode("",!0),!t.editLabelList[I]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])}," 请点击填入名字 ",8,Mc)):e.createCommentVNode("",!0),t.editLabelList[I]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:E=>t.onCommitLabelChange(E,I,S.label),onPressEnter:E=>t.onCommitLabelChange(E,I,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(E=>t.onShowCalculationModal("edit",S,I),["prevent","stop"])}," fx ",8,vc)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:E=>t.onVisibleChange(E,S)},{overlay:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{class:"menu-item",style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g,{onClick:E=>t.showCustomSortModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{onClick:E=>t.showCustomGroupModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDateFormatChange(E.value,I)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===E.value||!S.dateFormat&&E.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(E.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:E=>t.showFilterModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onAggregateChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:E=>t.showConfigNameModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:E=>t.showSortByCpntModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:E=>t.showDimByCountModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(w,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDistinctChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Rc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,jc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[zc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Gc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon",onClick:E=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(x,{class:"delete-icon",onClick:e.withModifiers(E=>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(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(N,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(B,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(F,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(H,{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 Yc=oe(_c,[["render",Hc],["__scopeId","data-v-c2ca0016"]]),Wc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(xe),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var C,_;const l=Z.cloneDeep((C=e.unref(t))==null?void 0:C.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["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","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],w=Wc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const x=g[k];if(!x)break;r.push({...w[x],type:x})}for(const k of c)s(l,k)&&!g.find(x=>x===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Kf="",Qf="",Kc={class:"data-group"};function Qc(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Xc=oe(qc,[["render",Qc],["__scopeId","data-v-64cc2643"]]),Jc=[{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"]}],Zc={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"}},ed=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function td(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const od=oe(ed,[["render",td]]),nd=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:$.InputNumber,ASelect:$.Select,ASelectOption:$.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")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},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:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ad(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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(s,{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(s,{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 ca=oe(nd,[["render",ad]]),rd=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:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function ld(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const id=oe(rd,[["render",ld]]),sd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function cd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dd=oe(sd,[["render",cd]]),pd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function ud(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const fd=oe(pd,[["render",ud]]);var Se="top",Oe="bottom",Ie="right",Ne="left",Ko="auto",Ot=[Se,Oe,Ie,Ne],Ct="start",It="end",md="clippingParents",da="viewport",Ft="popper",hd="reference",pa=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),ua=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),yd="beforeRead",gd="read",bd="afterRead",Cd="beforeMain",wd="main",kd="afterMain",_d="beforeWrite",xd="write",Sd="afterWrite",Nd=[yd,gd,bd,Cd,wd,kd,_d,xd,Sd];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Te(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function rt(t){var o=Te(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Te(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Te(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ad(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Td(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Ed={name:"applyStyles",enabled:!0,phase:"write",fn:Ad,effect:Td,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var lt=Math.max,Xt=Math.min,wt=Math.round;function Xo(){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 fa(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Fe(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=rt(t)?Te(t):window,d=s.visualViewport,l=!fa()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(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 ma(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Te(t).getComputedStyle(t)}function Ld(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((rt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ha(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Vd(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Te(t),n=ha(t);n&&Ld(n)&&qe(n).position==="static";)n=ha(n);return n&&(Re(n)==="html"||Re(n)==="body"&&qe(n).position==="static")?o:n||Vd(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return lt(t,Xt(o,n))}function Bd(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ya(){return{top:0,right:0,bottom:0,left:0}}function ga(t){return Object.assign({},ya(),t)}function ba(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Od=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ga(typeof o!="number"?o:ba(o,Ot))};function Id(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ue(n.placement),l=Zo(d),c=[Ne,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Od(r.padding,n),m=Jo(i),g=l==="y"?Se:Ne,w=l==="y"?Oe:Ie,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],C=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,x=f/2-C/2,h=u[g],A=k-m[p]-u[w],L=k/2-m[p]/2+x,O=$t(h,L,A),N=l;n.modifiersData[a]=(o={},o[N]=O,o.centerOffset=O-L,o)}}function Fd(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)||ma(o.elements.popper,r)&&(o.elements.arrow=r))}const Dd={name:"arrow",enabled:!0,phase:"main",fn:Id,effect:Fd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var $d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Md(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function Ca(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,w=s.y,f=w===void 0?0:w,C=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=C.x,f=C.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),x=Ne,h=Se,A=window;if(c){var L=Dt(n),O="clientHeight",N="clientWidth";if(L===Te(n)&&(L=Ze(n),qe(L).position!=="static"&&d==="absolute"&&(O="scrollHeight",N="scrollWidth")),L=L,r===Se||(r===Ne||r===Ie)&&i===It){h=Oe;var V=u&&L===A&&A.visualViewport?A.visualViewport.height:L[O];f-=V-a.height,f*=l?1:-1}if(r===Ne||(r===Se||r===Oe)&&i===It){x=Ie;var B=u&&L===A&&A.visualViewport?A.visualViewport.width:L[N];g-=B-a.width,g*=l?1:-1}}var F=Object.assign({position:d},c&&$d),H=p===!0?Md({x:g,y:f},Te(n)):{x:g,y:f};if(g=H.x,f=H.y,l){var P;return Object.assign({},F,(P={},P[h]=k?"0":"",P[x]=_?"0":"",P.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},F,(o={},o[h]=k?f+"px":"",o[x]=_?g+"px":"",o.transform="",o))}function vd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ue(o.placement),variation:_t(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,Ca(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Ca(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Pd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vd,data:{}};var Zt={passive:!0};function jd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Te(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Rd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jd,data:{}};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Ud[o]})}var Gd={start:"end",end:"start"};function wa(t){return t.replace(/start|end/g,function(o){return Gd[o]})}function en(t){var o=Te(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function zd(t,o){var n=Te(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=fa();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Hd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=lt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=lt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=lt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ka(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&on(t)?t:ka(Jt(t))}function Mt(t,o){var n;o===void 0&&(o=[]);var a=ka(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Te(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(Mt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yd(t,o){var n=kt(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 _a(t,o,n){return o===da?nn(zd(t,n)):rt(o)?Yd(o,n):nn(Hd(Ze(t)))}function Wd(t){var o=Mt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?Dt(t):t;return rt(a)?o.filter(function(r){return rt(r)&&ma(r,a)&&Re(r)!=="body"}):[]}function qd(t,o,n,a){var r=o==="clippingParents"?Wd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=_a(t,c,a);return l.top=lt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=lt(p.left,l.left),l},_a(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function xa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ue(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Se:l={x:s,y:o.y-n.height};break;case Oe:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case Ne:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function vt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?md:d,c=n.rootBoundary,p=c===void 0?da:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,w=g===void 0?!1:g,f=n.padding,C=f===void 0?0:f,_=ga(typeof C!="number"?C:ba(C,Ot)),k=m===Ft?hd:Ft,x=t.rects.popper,h=t.elements[w?k:m],A=qd(rt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),L=kt(t.elements.reference),O=xa({reference:L,element:x,strategy:"absolute",placement:r}),N=nn(Object.assign({},x,O)),V=m===Ft?N:L,B={top:A.top-V.top+_.top,bottom:V.bottom-A.bottom+_.bottom,left:A.left-V.left+_.left,right:V.right-A.right+_.right},F=t.modifiersData.offset;if(m===Ft&&F){var H=F[r];Object.keys(B).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,I=[Se,Oe].indexOf(P)>=0?"y":"x";B[P]+=H[I]*S})}return B}function Kd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ua:l,p=_t(a),u=p?d?pa:pa.filter(function(w){return _t(w)===p}):Ot,m=u.filter(function(w){return c.indexOf(w)>=0});m.length===0&&(m=u);var g=m.reduce(function(w,f){return w[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ue(f)],w},{});return Object.keys(g).sort(function(w,f){return g[w]-g[f]})}function Qd(t){if(Ue(t)===Ko)return[];var o=eo(t);return[wa(t),o,wa(o)]}function Xd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,w=g===void 0?!0:g,f=n.allowedAutoPlacements,C=o.options.placement,_=Ue(C),k=_===C,x=l||(k||!w?[eo(C)]:Qd(C)),h=[C].concat(x).reduce(function(G,K){return G.concat(Ue(K)===Ko?Kd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:w,allowedAutoPlacements:f}):K)},[]),A=o.rects.reference,L=o.rects.popper,O=new Map,N=!0,V=h[0],B=0;B<h.length;B++){var F=h[B],H=Ue(F),P=_t(F)===Ct,S=[Se,Oe].indexOf(H)>=0,I=S?"width":"height",E=vt(o,{placement:F,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),v=S?P?Ie:Ne:P?Oe:Se;A[I]>L[I]&&(v=eo(v));var j=eo(v),y=[];if(i&&y.push(E[H]<=0),d&&y.push(E[v]<=0,E[j]<=0),y.every(function(G){return G})){V=F,N=!1;break}O.set(F,y)}if(N)for(var b=w?3:1,T=function(K){var Q=h.find(function(ee){var re=O.get(ee);if(re)return re.slice(0,K).every(function(he){return he})});if(Q)return V=Q,"break"},D=b;D>0;D--){var M=T(D);if(M==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const Jd={name:"flip",enabled:!0,phase:"main",fn:Xd,requiresIfExists:["offset"],data:{_skip:!1}};function Sa(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 Na(t){return[Se,Ie,Oe,Ne].some(function(o){return t[o]>=0})}function Zd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=vt(o,{elementContext:"reference"}),d=vt(o,{altBoundary:!0}),l=Sa(s,a),c=Sa(d,r,i),p=Na(l),u=Na(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ep={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zd};function tp(t,o,n){var a=Ue(t),r=[Ne,Se].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ne,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function op(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ua.reduce(function(p,u){return p[u]=tp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const np={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:op};function ap(t){var o=t.state,n=t.name;o.modifiersData[n]=xa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const rp={name:"popperOffsets",enabled:!0,phase:"read",fn:ap,data:{}};function lp(t){return t==="x"?"y":"x"}function ip(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,w=n.tetherOffset,f=w===void 0?0:w,C=vt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ue(o.placement),k=_t(o.placement),x=!k,h=Zo(_),A=lp(h),L=o.modifiersData.popperOffsets,O=o.rects.reference,N=o.rects.popper,V=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,B=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),F=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,H={x:0,y:0};if(L){if(i){var P,S=h==="y"?Se:Ne,I=h==="y"?Oe:Ie,E=h==="y"?"height":"width",v=L[h],j=v+C[S],y=v-C[I],b=g?-N[E]/2:0,T=k===Ct?O[E]:N[E],D=k===Ct?-N[E]:-O[E],M=o.elements.arrow,G=g&&M?Jo(M):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ya(),Q=K[S],ee=K[I],re=$t(0,O[E],G[E]),he=x?O[E]/2-b-re-Q-B.mainAxis:T-re-Q-B.mainAxis,me=x?-O[E]/2+b+re+ee+B.mainAxis:D+re+ee+B.mainAxis,Ee=o.elements.arrow&&Dt(o.elements.arrow),de=Ee?h==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,$e=(P=F==null?void 0:F[h])!=null?P:0,et=v+he-$e-de,mo=v+me-$e,st=$t(g?Xt(j,et):j,v,g?lt(y,mo):y);L[h]=st,H[h]=st-v}if(d){var ct,At=h==="x"?Se:Ne,dt=h==="x"?Oe:Ie,Le=L[A],Qe=A==="y"?"height":"width",tt=Le+C[At],ot=Le-C[dt],ze=[Se,Ne].indexOf(_)!==-1,pt=(ct=F==null?void 0:F[A])!=null?ct:0,ut=ze?tt:Le-O[Qe]-N[Qe]-pt+B.altAxis,ft=ze?Le+O[Qe]+N[Qe]-pt-B.altAxis:ot,nt=g&&ze?Bd(ut,Le,ft):$t(g?ut:tt,Le,g?ft:ot);L[A]=nt,H[A]=nt-Le}o.modifiersData[a]=H}}const sp={name:"preventOverflow",enabled:!0,phase:"main",fn:ip,requiresIfExists:["offset"]};function cp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dp(t){return t===Te(t)||!Fe(t)?en(t):cp(t)}function pp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function up(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&pp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Re(o)!=="body"||on(i))&&(d=dp(o)),Fe(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function fp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function mp(t){var o=fp(t);return Nd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function hp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function yp(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 Aa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ta(){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 gp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Aa:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Aa,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:rt(d)?Mt(d):d.contextElement?Mt(d.contextElement):[],popper:Mt(l)};var x=mp(yp([].concat(a,p.options.modifiers)));return p.orderedModifiers=x.filter(function(h){return h.enabled}),w(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,x=_.popper;if(Ta(k,x)){p.rects={reference:up(k,Dt(x),p.options.strategy==="fixed"),popper:Jo(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(B){return p.modifiersData[B.name]=Object.assign({},B.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var A=p.orderedModifiers[h],L=A.fn,O=A.options,N=O===void 0?{}:O,V=A.name;typeof L=="function"&&(p=L({state:p,options:N,name:V,instance:g})||p)}}}},update:hp(function(){return new Promise(function(C){g.forceUpdate(),C(p)})}),destroy:function(){f(),m=!0}};if(!Ta(d,l))return g;g.setOptions(c).then(function(C){!m&&c.onFirstUpdate&&c.onFirstUpdate(C)});function w(){p.orderedModifiers.forEach(function(C){var _=C.name,k=C.options,x=k===void 0?{}:k,h=C.effect;if(typeof h=="function"){var A=h({state:p,name:_,instance:g,options:x}),L=function(){};u.push(A||L)}})}function f(){u.forEach(function(C){return C()}),u=[]}return g}}var bp=[Rd,rp,Pd,Ed,np,Jd,sp,Dd,ep],Cp=gp({defaultModifiers:bp});function an(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 Ea(t,o){if(t){if(typeof t=="string")return an(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)?an(t,o):void 0}}function wp(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Ea(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 xt(t){return xt=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},xt(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Va(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Ba={exports:{}},Oa={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})(Oa),function(t){var o=Oa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var M=b&&b.prototype instanceof h?b:h,G=Object.create(M.prototype),K=new v(D||[]);return d(G,"_invoke",{value:P(y,T,K)}),G}function w(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",C="suspendedYield",_="executing",k="completed",x={};function h(){}function A(){}function L(){}var O={};m(O,c,function(){return this});var N=Object.getPrototypeOf,V=N&&N(N(j([])));V&&V!==i&&s.call(V,c)&&(O=V);var B=L.prototype=h.prototype=Object.create(O);function F(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function H(y,b){function T(M,G,K,Q){var ee=w(y[M],y,G);if(ee.type!=="throw"){var re=ee.arg,he=re.value;return he&&o(he)=="object"&&s.call(he,"__await")?b.resolve(he.__await).then(function(me){T("next",me,K,Q)},function(me){T("throw",me,K,Q)}):b.resolve(he).then(function(me){re.value=me,K(re)},function(me){return T("throw",me,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(M,G){function K(){return new b(function(Q,ee){T(M,G,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(y,b,T){var D=f;return function(M,G){if(D===_)throw new Error("Generator is already running");if(D===k){if(M==="throw")throw G;return{value:a,done:!0}}for(T.method=M,T.arg=G;;){var K=T.delegate;if(K){var Q=S(K,T);if(Q){if(Q===x)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=w(y,b,T);if(ee.type==="normal"){if(D=T.done?k:C,ee.arg===x)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function S(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,S(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),x;var M=w(D,y.iterator,b.arg);if(M.type==="throw")return b.method="throw",b.arg=M.arg,b.delegate=null,x;var G=M.arg;return G?G.done?(b[y.resultName]=G.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,x):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,x)}function I(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function E(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function v(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(I,this),this.reset(!0)}function j(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function M(){for(;++T<y.length;)if(s.call(y,T))return M.value=y[T],M.done=!1,M;return M.value=a,M.done=!0,M};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return A.prototype=L,d(B,"constructor",{value:L,configurable:!0}),d(L,"constructor",{value:A,configurable:!0}),A.displayName=m(L,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===A||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,L):(y.__proto__=L,m(y,u,"GeneratorFunction")),y.prototype=Object.create(B),y},r.awrap=function(y){return{__await:y}},F(H.prototype),m(H.prototype,p,function(){return this}),r.AsyncIterator=H,r.async=function(y,b,T,D,M){M===void 0&&(M=Promise);var G=new H(g(y,b,T,D),M);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},F(B),m(B,u,"Generator"),m(B,c,function(){return this}),m(B,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function M(){for(;T.length;){var G=T.pop();if(G in b)return M.value=G,M.done=!1,M}return M.done=!0,M}},r.values=j,v.prototype={constructor:v,reset:function(y){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(E),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,re){return G.type="throw",G.arg=y,b.next=ee,re&&(b.method="next",b.arg=a),!!re}for(var D=this.tryEntries.length-1;D>=0;--D){var M=this.tryEntries[D],G=M.completion;if(M.tryLoc==="root")return T("end");if(M.tryLoc<=this.prev){var K=s.call(M,"catchLoc"),Q=s.call(M,"finallyLoc");if(K&&Q){if(this.prev<M.catchLoc)return T(M.catchLoc,!0);if(this.prev<M.finallyLoc)return T(M.finallyLoc)}else if(K){if(this.prev<M.catchLoc)return T(M.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return T(M.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var M=D;break}}M&&(y==="break"||y==="continue")&&M.tryLoc<=b&&b<=M.finallyLoc&&(M=null);var G=M?M.completion:{};return G.type=y,G.arg=b,M?(this.method="next",this.next=M.finallyLoc,x):this.complete(G)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),x},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),E(T),x}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var M=D.arg;E(T)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:j(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),x}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ba);var to=Ba.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function kp(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=kp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var w=m/t.size*100,f=100-g/t.size*100;n("change",w,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},_p=Ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),xp=Ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[_p,xp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Sp={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=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"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=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)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Np={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Np,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Ap={class:"input"},Tp={class:"label"},Ep=[".value"];function Pt(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 i,s,d,l,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=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Ea(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 Fa(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 De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Fa(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("span",Tp,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,Ep)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var Da=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},$a={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat($a[o]||o).concat($a[n]||n)},Ma=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(a))},St=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)},jt=function(t,o,n){t=6*St(t,360),o=St(o,100),n=St(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},va=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=Da(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(Ma(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=Da(a,r/100,i/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%)");case"rgb":var g=jt(a,r,i),w=g.r,f=g.g,C=g.b;return"rgb(".concat(w,", ").concat(f,", ").concat(C,")");default:return Ma(jt(a,r,i))}},so=function(t){var o=t.r,n=t.g,a=t.b;o=St(o,255),n=St(n,255),a=St(a,255);var r,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Pa=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},ja=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]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=za(a);return va(r,o,n)}return""},Ra=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ra(t),a=n.r,r=n.g,i=n.b,s=n.a;return De(De({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ua(t),c=l.h,p=l.s,u=l.l,m=l.a;return De(De({},Pa({h:c,s:p,l:u})),{},{a:+m});default:var g=ja(t),w=g.r,f=g.g,C=g.b,_=g.a;return De(De({},so({r:w,g:f,b:C})),{},{a:_/255})}else switch(o){case"rgb":return De(De({},so(Ra(t))),{},{a:1});case"hsv":var k=Ga(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return De(De({},Pa(Ua(t))),{},{a:1});default:return De(De({},so(ja(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},za=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}},Rt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Lp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Lp)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},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 ln(a,"hex",!0)})})}}}),Vp={class:"colors"};function Ha(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 Ge(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ha(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Vp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,x=(k=t.value)===null||k===void 0?void 0:k.trim();if(x!=null&&x!==""){var h=cn(x);return za(sn(x,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,x){var h="";k!=null?(h=va(Ge({},k),t.format,t.showAlpha),s.value=Ge({},k)):s.value=null,d.value=h;var A=l();JSON.stringify(k)!==JSON.stringify(A)&&JSON.stringify(k)!==JSON.stringify(x)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,x;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(x=e.unref(i))===null||x===void 0?void 0:x.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),w=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),C=e.ref(-1),_=function(k,x,h){if(k.length!==0){var A=sn(k,x,h),L=A.h,O=A.s,N=A.v;if(!(isNaN(L)||isNaN(O)||isNaN(N))){var V=1,B=A.a;isNaN(B)||(V=B),i.value={h:L,s:O,v:N,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:w,onSelectSaturation:function(k,x){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:x,a:e.unref(m)}:i.value=Ge(Ge({},e.unref(i)),{},{s:k,v:x})},onSelectHue:function(k){C.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=Ge(Ge({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=Ge(Ge({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){C.value=-1,d.value=k},handleChange:function(){var k,x=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(x!==""){var h=t.showAlpha,A=t.format,L=function(O,N,V){if(V)switch(N){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(O);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(O);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(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(N){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(O);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(O);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(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(x,A,h);L?_(x,A,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:C,onSelectColor:function(k,x){if(C.value=x,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Bp={class:"picker-inner"},Op={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Bp,[e.createElementVNode("div",Op,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Ip=[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 Ya(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 dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Ip),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var it=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},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(S){return ln(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",I=Array.isArray(S)?S:[S];a.value=I.map(function(E){return ln(E,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,w,f=e.ref(null),C=e.ref(null),_=(l=f,c=C,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){it.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(S){var I=S.state,E=I.styles,v=I.placement,j=E.popper;u.value=dn(dn(dn({},j),p),{},{transformOrigin:v==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(S,I){var E,v=Pt(S,2),j=v[0],y=v[1],b=Pt(I,2),T=b[0],D=b[1];if(j&&y&&(T!==j||D!==T)){(E=it)===null||E===void 0||E.destroy();var M=j.$el||j,G=y.$el||y;e.nextTick(function(){it=Cp(M,G,m)})}}),e.onBeforeUnmount(function(){var S;it&&((S=it)===null||S===void 0||S.destroy(),it=null)}),{instance:it,style:u}),k=_.style,x=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.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]))},A=e.ref(),L=function(){var S=Va(oo.mark(function I(E){var v,j,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(j=E.target,(y=(v=j.dataset)===null||v===void 0?void 0:v.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){x(),clearTimeout(g)},100)):x(),i.value=b,f.value=j;case 10:case"end":return T.stop()}},I)}));return function(I){return S.apply(this,arguments)}}(),O=function(){var S=Va(oo.mark(function I(E){var v,j,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=E.target,!(!((v=e.unref(A))!==null&&v!==void 0&&v.isEqualNode(b))&&(!((j=e.unref(A))===null||j===void 0)&&j.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(C))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},I)}));return function(I){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(x(),clearTimeout(w))});var N,V=e.ref(t.max>e.unref(a).length),B=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),F=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),H=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(C)]},function(){e.nextTick(function(){var S,I;(S=e.unref(A))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(H)),(I=e.unref(C))===null||I===void 0||(I=I.$el)===null||I===void 0||I.setAttribute("pick-colors-theme",e.unref(H))})},{immediate:!0}),e.provide("theme",{theme:H});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&x()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),g&&(clearTimeout(g),g=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(S){var I=e.unref(i),E=e.unref(a).slice(),v=e.unref(a).length;if(I!=null){I>=0?E[I]=S:(i.value=v,E.push(S));var j="";j=Array.isArray(t.value)||t.addColor?E:S,t.value===void 0?a.value=Array.isArray(j)?j:[j]:(n("update:value",j),n("change",j,S,I)),t.addColor&&v>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:A,onColorClick:L,pickerRef:C,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var I=S.target;N=+I.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var I=+S.target.dataset.index,E=wp(e.unref(a)),v=E[N];E.splice(N,1);var j=E.slice(0,I),y=E.splice(I),b=j.concat([v]).concat(y);n("update:value",b),n("change",b,b[N],N)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:F,toPopupContainer:B}}});Ke(".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)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{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(l,{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)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const Fp=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.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}}}}),Xf="",Dp={class:"color-pick"};function $p(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Dp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Mp=oe(Fp,[["render",$p],["__scopeId","data-v-e2113f43"]]),vp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Jf="",Pp={class:"color-group-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rp=oe(vp,[["render",jp],["__scopeId","data-v-b2be8322"]]),Up=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Vo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:ca,PlusCircleOutlined:Wl},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 m=c[0];if(Object.prototype.toString.call(m)==="[object Object]"){const g=Object.keys(m),w={};g.forEach(f=>{w[f]=""}),c.push(w)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const w=c==null?void 0:c.target,f=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Zf="",Gp={class:"form-group"},zp={class:"form-row"},Hp={key:0,class:"label"},Yp={key:1,class:"label"},Wp={class:"icon-group"};function qp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{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",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Hp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Yp,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:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Wp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kp=oe(Up,[["render",qp],["__scopeId","data-v-f0c0ab4d"]]),Qp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Xp(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jp=oe(Qp,[["render",Xp]]),Zp=e.defineComponent({name:"PropsToForm",components:{Input:od,InputNumber:ca,RadioGroup:id,Select:dd,Switch:fd,ColorPick:Mp,ColorGroupPick:Rp,FormGroup:Kp,Textarea:Jp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:w="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[w]:(C,_=!0)=>{i(_?{[u]:C}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:Z.reduce(l,(c,p,u)=>{const m=Zc[u];if(Array.isArray(m)){const g=m.find(w=>{const{onlyType:f,excludeType:C}=w;return f==null&&C==null?!0:f?ge(e.unref(r),f):C?!ge(e.unref(r),C):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:ge}}}),em="",eu={class:"props-to-form"},tu={class:"label"},ou={class:"component-wrapper"};function nu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tu,e.toDisplayString(s.label),1),e.createElementVNode("div",ou,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const au=oe(Zp,[["render",nu],["__scopeId","data-v-c6fb2484"]]);function ru(){return new Worker("/assets/editor.worker-02df2e61.js")}function lu(){return new Worker("/assets/json.worker-867823a6.js")}function iu(){return new Worker("/assets/ts.worker-7254b425.js")}const su=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(i,s){return s==="json"?new lu:s==="typescript"||s==="javascript"?new iu:new ru}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=er.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(Z.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),tm="",cu={class:"editor",ref:"dom"};function du(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",cu,null,512)}const Wa=oe(su,[["render",du],["__scopeId","data-v-71e88372"]]),pu=[{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}],uu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:Wa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var C,_,k;let f=[];if(r.value=[],!o.value)f=((C=e.unref(n))==null?void 0:C.queryColumnList)||[];else{const x=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...x,...h]}f.forEach(x=>{var A;let h=(A=e.unref(a))==null?void 0:A.find(L=>L.prop===x.name);h||(h={label:x.label,prop:x.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,C,_)=>{f&&C&&(i=f,s=C,d.value=f[C]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(C){console.error(C)}},changeRenderBool:(f,C)=>{f.style=C.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),om="",fu={class:"table-column-config"};function mu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",fu,[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:f,record:C})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(C,_),checked:C.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:C.width,"onUpdate:value":_=>C.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.renderText,"onUpdate:value":_=>C.renderText=_,readOnly:!0,onClick:_=>t.renderSave(C,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.headerTemplate,"onUpdate:value":_=>C.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(C,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:C.headerAlign,"onUpdate:value":_=>C.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{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:C.align,"onUpdate:value":_=>C.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{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:C.fixed,"onUpdate:value":_=>C.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:C.dataFormat,"onUpdate:value":_=>C.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[C.dataFormat&&C.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:C.retentiondigit,"onUpdate:value":_=>C.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[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(m,{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 hu=oe(uu,[["render",mu],["__scopeId","data-v-afebddc0"]]),yu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:au,TableColumnConfig:hu,Editor:Wa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=A=>{i({...wn[A]},!1),d()},c=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Jc.map(A=>{const{props:L,title:O,enableProps:N,onlyType:V,excludeType:B}=A,F=[];L.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&F.push(S):F.push(S))});let H,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(H=typeof N=="string"&&r.value?r.value[N]:void 0,P=Z.pick(e.unref(r),F)):(H=typeof N=="string"&&a.value?a.value[N]:void 0,P=Z.pick(e.unref(a),F)),{title:O,enableProps:H,enablePropsName:N,onlyType:V,excludeType:B,props:P}}).filter(({props:A})=>Object.keys(A).length>0)),m=(A,L)=>{const{onlyType:O,excludeType:N}=A;return O==null&&N==null?!0:O?ge(L,O):N?!ge(L,N):!1},g=(A,L)=>(L==null||L.stopPropagation(),A),w=(A,L)=>{L!=null&&i({[L]:A})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),C=A=>{try{const L=JSON.parse(A||"{}");i(L,!1)}catch(L){console.error(L)}},_=e.ref(""),k=A=>{try{_.value=A}catch(L){console.error(L)}},x=(A,L)=>{try{s({[L]:A})}catch(O){console.error(O)}},h=e.computed(()=>{var A;return["customGraph"].includes((A=e.unref(a))==null?void 0:A.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:C,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:x,onSwitchClick:g,onSwitchChange:w,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),nm="",am="",gu={class:"style-group"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:C=>t.onSwitchChange(C,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(m,{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(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var C;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((C=f.onlyType)!=null&&C.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Cu=oe(yu,[["render",bu],["__scopeId","data-v-2fb3e2ad"]]),wu=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Qn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(M=>{var G;return M.id===((G=t.control)==null?void 0:G.id)});if(b){const M=b.type,G=Z.pick(b,["value","startTime","endTime"]);(D=Object.keys(G))!=null&&D.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(re=>ge(M,re.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:M=[]}=b,G=Qt(T),K=M.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(M.splice(K,1),n({id:D,events:M}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,O(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),w=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},C=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},x=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),A=e.inject(fe),L=e.computed(()=>{var Ee;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:M=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(A),Q=Z.cloneDeep([...y,...b,...T,...D,...M,...G,...K]);if(Q!=null&&Q.length)for(const de of Q)de.id=de.name;const ee=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(de=>({...de,id:de.name,label:de.title||de.label})),...Q];((Ee=e.unref(h))==null?void 0:Ee.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const re=new Map,he=ee.length;for(let de=0;de<he;de++){const $e=ee[de],{id:et}=$e||{};re.set(et,$e)}return[...re].map(([de,$e])=>$e)});function O(y,b){var K,Q;const{type:T,id:D,events:M=[]}=y,G=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(A))==null?void 0:K.controlList)||[]).find(re=>re.id===e.unref(g))||u(e.unref(g))),M.find(ee=>{var re;return ee.on===G&&ee.target===((re=e.unref(h))==null?void 0:re.id)&&ee.emit==="refreshData"})||n({id:D,events:[...M,{on:G,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const N=(y,b)=>{if(y){const{label:T,name:D,id:M,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},re={...t.control,conditionKey:M,conditionLabel:T,conditionName:D,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};gt(re,"rule")||(re.rule="EQUAL"),gt(re,"dataType")||(re.dataType="component"),r({control:re,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},B=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},F=e.computed(()=>{const y=e.unref(L).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),H=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(G=>G.id===b),M=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(D==null?void 0:D.type,M)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),I=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:w,onPropChange:f,onModeChange:x,onRuleChange:C,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:L,onConditionKeyChange:N,idFilterOption:V,filterOption:B,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:F,dataTypeOption:H,isShowProp:S,isShowFormat:I,isShowModelProp:P,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"}]}}}),rm="",lm="",ku={class:"control-card"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(s,{key:3,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(s,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-d25f813a"]]),Su=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:xu}}),im="",Nu={key:0,class:"condition-list"},Au={key:0,class:"condition-container"},Tu={key:0,class:"condition-text"},Eu={key:1,class:"condition-text"},Lu={class:"conditions"};function Vu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Au,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Tu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Eu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Lu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Bu=oe(Su,[["render",Vu],["__scopeId","data-v-916ff9bd"]]),Ou=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Bu,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(fe),n=e.inject(xe),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(gt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),gt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:ra({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:ke()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:ke()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:ke()}),i({controlList:u})))},d=p=>{var C,_,k,x;const{index:u,path:m}=p;let g=Z.cloneDeep((C=e.unref(a))==null?void 0:C.slice()),w=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(w[h])w=(_=w[h])==null?void 0:_.conditions;else break;if(Array.isArray(w)&&w[u])if(w.splice(u,1),w.length===1){if(f.length>0){const h=f.length-1,A=f[h],L=f.slice(0,h);let O=g,N="";for(const V of L)if(O[V])N=(k=O[V])==null?void 0:k.join,O=(x=O[V])==null?void 0:x.conditions;else break;if(N===w[0].join){if(Array.isArray(w[0].conditions)){const V=Z.cloneDeep(w[0].conditions);O.splice(+A,1),O.splice(+A,0,...V)}}else O[A]=w[0]}}else w.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,w=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=w;const C=g.split("-");if(C!=null&&C.length)for(const x of C)if(f[x])f=(k=f[x])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:w})},c=(p,u,m)=>{var _,k,x;const g=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let w=g,f="";const C=p.split("-");if(C!=null&&C.length){for(const h of C)if(w[h])f=(k=w[h])==null?void 0:k.join,w=(x=w[h])==null?void 0:x.conditions;else break;if(f===m)w.splice(u+1,0,{keyValue:ke()});else{const h=Z.cloneDeep(w[u]);w[u]={join:m,conditions:[h,{keyValue:ke()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),sm="",Iu={class:"control-group"},Fu={class:"control-group-header"},Du={class:"control-group-content"};function $u(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Iu,[e.createElementVNode("div",Fu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Du,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Mu=oe(Ou,[["render",$u],["__scopeId","data-v-1e37d2d3"]]),vu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Vo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(A=>A.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(Z.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var A;let h=null;if(((A=e.unref(l))==null?void 0:A.dataType)==="component"){const L=e.unref(r).find(O=>{var N;return O.id===((N=e.unref(l))==null?void 0:N.id)});L&&(h=L)}return h}),p=e.computed(()=>{var A;let h=!1;return((A=e.unref(l))==null?void 0:A.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=ge(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(ge(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):ge(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,A)=>{h&&(e.unref(l).keyName=A.keyName)},w=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{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"}]:[]),C=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,A)=>{var L;return(L=A==null?void 0:A.keyName)==null?void 0:L.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:w,onChangeDataType:C,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),cm="",Pu={class:"variable-item"},ju=["title"],Ru={class:"popover-content-wrap"},Uu={style:{display:"flex"}};function Gu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Pu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,ju)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const zu=oe(vu,[["render",Gu],["__scopeId","data-v-1d5b6ae6"]]),Hu=e.defineComponent({name:"VariableGroup",components:{VariableItem:zu},setup(){const t=e.inject(fe),o=e.inject(xe),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=Z.cloneDeep(e.unref(a));l.push({keyValue:ke(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=Z.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=Z.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),dm="",Yu={class:"variable-group"},Wu={class:"variable-group-header"},qu={class:"variable-group-content"};function Ku(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Yu,[e.createElementVNode("div",Wu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const Qu=oe(Hu,[["render",Ku],["__scopeId","data-v-fd60cd09"]]),Xu=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:_,aggregate:k}=s;let x;return _&&(x=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:x}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:w=[],seriesList:f=[],leftAxisList:C=[],rightAxisList:_=[],queryColumnList:k=[],indicators:x=[],dataSourceId:h,idxLibMode:A,preview:L=!1}=s||{};m==null&&(ge(d,"table")?m="1":m="2");let O;if(Array.isArray(w)&&w.length>0){const F=w.length;for(let H=0;H<F;H++){const P=w[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){O={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}let N;if(Array.isArray(f)&&f.length>0){const F=f.length;for(let H=0;H<F;H++){const P=f[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){N={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}const V=[];k==null||k.forEach(F=>{V.push(o(F))});const B=[];if(C==null||C.forEach(F=>{F.location="LEFT",B.push(i(F))}),_==null||_.forEach(F=>{F.location="RIGHT",B.push(i(F))}),x==null||x.forEach(F=>{F.location="LEFT",B.push(i(F))}),!(m==="1"&&V.length===0)&&!(m==="2"&&B.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:O,series:N,indicatorList:B,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:A,preview:L})}catch(F){console.error(F)}}},qa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],w=i[g];w!=null&&(c=c.replace(g,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=qa(c,n)),t=t.replace(l,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},Ut=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=qa(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},Ju=(t,o,n)=>{switch(t.type){case"bar":return Zu(t,o,n);case"line":return ef(t,o,n);case"pie":return tf(t,o,n);case"comboGraph":return of(t,o,n);default:return{}}},Zu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{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(l),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 Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},ef=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{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 Ut(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 Ut(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(l)}},tf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,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:As(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:{}}}]}},of=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const w=m[g],{tooltipFormatter:f}=w||{},{marker:C,seriesName:_,name:k,value:x,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:C,name:k,value:x,seriesName:_,a:_,b:k,c:x,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},nf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:w,value:f}=g,C={...t[0],value:t[0][f]};r.add(w),p.push(C)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const w=a[g],{label:f,value:C}=w,_={...u,value:u[C]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},af=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",w=u[r]||"";if(i.add(m),s.has(w)){const f=s.get(w);f.push({name:m,value:g,...u}),s.set(w,f)}else s.set(w,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},rf=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(fe)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),w=e.computed(()=>g.value?ar:12),f=e.ref({}),C=e.ref(),_=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return C.value;const B=Ju(V,e.unref(f),w.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:V.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:V.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:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...B}}),k=(V=[],B,F=!1)=>{const H=F?B:null;f.value=nf(V,H)},x=(V=[],B)=>{f.value=af(V,B)},h=async()=>{var V,B,F;try{const H=Xu({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const P=await H(),{columns:S=[],rows:I=[]}=((B=P==null?void 0:P.data)==null?void 0:B.data)??{};if(((F=e.unref(n.value))==null?void 0:F.type)==="pie"){let E=[];if(S.length>0){const v=S[0],j=S[1];E=I.map(y=>({name:y[v],value:y[j]}))}x(E)}else{let E;S.length>0&&(E={name:S[0],types:S.slice(1).map(v=>({label:v,value:v}))}),k(I,E,!0)}}catch(H){console.error(H)}finally{m.value=!1}},A={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},L=()=>{e.unref(f).dataset.length===0?u.value.setOption(A):u.value.setOption(_.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&h()},N=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(_,()=>{L()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const B=eval;C.value=B(V)}catch(B){console.error(B)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(N),i.observe(p.value)),u.value=nr.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:O}),{echartRef:c,loading:m}}}),pm="",lf={class:"ecan-chart-graph",ref:"chartWrapRef"},sf={style:{width:"100%",height:"100%"},ref:"echartRef"};function cf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",lf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",sf,null,512)]),_:1},8,["spinning"])],512)}const Ka=oe(rf,[["render",cf],["__scopeId","data-v-8049fed2"]]),df=e.defineComponent({name:"DataConfig",components:{DataGroup:Xc,StyleGroup:Cu,ChartGraph:Ka,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Mu,VariableGroup:Qu,AButton:$.Button,ReloadOutlined:ri},setup(){var O;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(fe),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const N=Z.cloneDeep(e.unref(a));p(N);const V=Z.pick(N,Z.without(Object.keys(N),"position","top","left","width","height"));ge(N.type,l)?(V.height=N.height,V.width=N.width):V.height="290px";const B=Z.cloneDeep(e.unref(i));return B.pageMode="design",B.componentList=s,B.preview=!0,B.pageConfig=d,{...V,graphicConfig:B,toolboxShow:!1,sourceLeft:N.left,sourceTop:N.top}});function p(N){var V,B,F,H;["#ffffff","#fff"].includes((V=N==null?void 0:N.color)==null?void 0:V.toLowerCase())&&(N.color="#000"),["#ffffff","#fff"].includes((B=N==null?void 0:N.variableColor)==null?void 0:B.toLowerCase())&&(N.variableColor="#000"),["#ffffff","#fff"].includes((F=N==null?void 0:N.increaseColor)==null?void 0:F.toLowerCase())&&(N.increaseColor="#000"),["#ffffff","#fff"].includes((H=N==null?void 0:N.declineColor)==null?void 0:H.toLowerCase())&&(N.declineColor="#000")}const u=e.computed(()=>{let N=!0;return ge(e.unref(c).type,l)&&(N=!1),N}),m=e.computed(()=>{var N;return(N=e.unref(c))==null?void 0:N.type}),g=e.computed(()=>{var N;return!!((N=e.unref(c))!=null&&N.isGroupTable)}),w=N=>{const V=N==="1";V&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(V),N==="3"&&x()},f=e.ref(),C=e.inject(Me),_=e.unref(e.inject(ve)),k=(O=window==null?void 0:window.config)==null?void 0:O.pageId;function x(){var S;const{leftAxisList:N=[],rightAxisList:V=[],queryColumnList:B=[],indicators:F=[]}=e.unref(i),H=[...N,...V,...B,...F],P={};for(const I of H){const{id:E="",indexCode:v=""}=I;E&&!gt(I,"calcType")&&!P[E]&&(P[E]=v)}if((S=Object.keys(P))!=null&&S.length){const I=[];for(const E in P)I.push(new Promise((v,j)=>{C.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:E,indexCode:P[E],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?v(T.dataViewColumns):j(T)}).catch(y=>{j(y)})}));Promise.all(I).then(E=>{if(E!=null&&E.length){const v=E.reduce((j,y)=>j.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=v.filter(j=>j.typeGuid)}})}}const h=()=>{var V;let N;r&&m.value==="table"?N=window.updateConfig:N=(V=e.unref(n))==null?void 0:V.refreshData,typeof N=="function"&&N()},A=e.inject(xe),L=()=>{var N;A({variableConditions:Bt(((N=e.unref(i))==null?void 0:N.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:w,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:L}}}),um="",pf={class:"data-config"},uf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function ff(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),w=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",pf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",uf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(w,{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 mf=oe(df,[["render",ff],["__scopeId","data-v-d85f4e1e"]]),hf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:mf},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:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var A;return((A=e.unref(s))==null?void 0:A.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?Z.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?Z.cloneDeep(e.unref(s).chartsOptions):e.ref(Z.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?Z.cloneDeep(e.unref(s).tableOptions):e.ref(Z.cloneDeep(rr));u=e.ref(u);const m=e.ref([]),g=A=>{m.value=A},w=A=>{c.value={...e.unref(c),...e.unref(A)}},f=(A,L=!0)=>{L?p.value={...e.unref(p),...e.unref(A)}:p.value={...e.unref(A)}},C=A=>{u.value={...e.unref(u),...e.unref(A)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=Z.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=Z.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},x=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=x,t.request&&e.provide(Me,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=A=>{n("updateUsedComponent",A)};return e.provide(Ye,s),e.provide(fe,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(ve,i),e.provide(xe,w),e.provide(ho,f),e.provide(yo,C),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),fm="",yf={key:0,class:"config-modal"},gf={class:"config-modal-left"},bf={class:"config-modal-right"};function Cf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",gf,[e.createVNode(s)]),e.createElementVNode("div",bf,[e.createVNode(d)])]))}const Qa=pn(oe(hf,[["render",Cf],["__scopeId","data-v-23d542ce"]])),Xa=pn(Ka),Ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Xa,EcanIndicatorLibrary:Qa},Symbol.toStringTag,{value:"Module"})),wf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Ja).forEach(a=>{const r=Ja[a];r.install&&t.use(r)})}};we.EcanChartGraph=Xa,we.EcanIndicatorLibrary=Qa,we.default=wf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
64
64
  //# sourceMappingURL=index.umd.js.map