@ecan-bi/indicator-library 1.0.81 → 1.0.83
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/assets/editor.worker-02df2e61.js +1 -1
- package/dist/assets/json.worker-867823a6.js +1 -1
- package/dist/assets/ts.worker-7254b425.js +1 -1
- package/dist/index.es.js +4142 -4055
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/indicator/indicator-library/data-list/DataSourceList.vue.d.ts +2 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(ke,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):(ke=typeof globalThis<"u"?globalThis:ke||self,e(ke["@ecan-bi/indicator-library"]={},ke.Vue,ke.LodashEs,ke.AntDesignVue,ke.Draggable,null,null,ke.Dayjs,null,ke.MonacoEditor,null,ke.Echarts))})(this,function(ke,e,ee,P,Nt,Tf,Ef,ue,Vf,nr,Lf,ar){var or;"use strict";function rr(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 lr=rr(ar),fn=(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",xe=((or=window==null?void 0:window.config)==null?void 0:or.indicatorURL)||"",ve="INDICATOR_TOKEN",mn="DATA_LIST",Ye="SELECTED_COMPONENT",Ce="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",hn="SHOW_STYLE_CONFIG",yn="REFRESH_DATA",Yt="CHARTS_OPTIONS",gn="TABLE_OPTIONS",ir=18,bo="UPDATE_CHARTS_OPTIONS",Co="UPDATE_TABLE_OPTIONS",At="SOURCE_TYPE",bn="CHANGE_CONDITION",Cn="DATA_VIEW_COLUMNS",je="RENDER_USED_COMPONENTS",Wt="UPDATE_USED_COMPONENT",wn="MAP_ATTRIBUTE_PROPS",kn="PAGE_CONFIG",_n={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%"}},sr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},cr=e.defineComponent({name:"DataViewList",components:{ASpin:P.Spin,ATreeSelect:P.TreeSelect,Draggable:Nt},setup(){var A;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(Ce),a=e.inject(Se),r=e.computed(()=>{var T;return((T=e.unref(n))==null?void 0:T.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(A=window==null?void 0:window.config)==null?void 0:A.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var h,I;const T=r.value;i.value=!0;try{const{data:F}=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:T,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,F.success&&((h=s.value)==null||h.push(l),s.value=(I=s.value)==null?void 0:I.concat(p([F.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(T=[],h)=>{const I=[];return T.forEach(F=>{I.push({id:F.id,pId:h??F.parentId,value:F.id,title:F.name,isLeaf:F.leaf||!1,nature:F.nature,selectable:F.leaf||!1})}),I},u=async(T,h)=>{var _;let I=0;if(T){const{value:N}=T.dataRef;I=N}const{data:F}=await t.post(`${xe}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:I},{headers:{Authentication:o,operateContext:"ygt"}});F.success&&(s.value=(_=e.unref(s))==null?void 0:_.concat(p(F.data)),h&&e.unref(r)&&await c())},m=T=>{b(T),a({dataViewId:T,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:y}=e.inject(mn,{setDataList:T=>T}),g=e.ref(!1),f=e.ref([]),b=async T=>{if(T){f.value=[],g.value=!0;try{const h=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:T,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:I,data:F={}}=h.data;if(g.value=!1,I){const{rows:_=[]}=F;_==null||_.forEach(N=>{var L;const S=((L=N==null?void 0:N.dataViewColumns)==null?void 0:L.map(M=>({...M,show:!0})))||[];f.value=[...e.unref(f),...S]}),y(e.unref(f))}}catch{g.value=!1}}},k=T=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[T],C=(T,h)=>{const I=h[T.oldIndex];if(I){const F={...I,label:I.name,name:I.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(F))}};return e.onMounted(async()=>{await u(void 0,!0),b(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:g,onDataViewIdChange:m,mapGenericType:k,onDragStart:C}}}),$f="",ae=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},dr={class:"data-view-list"},pr={class:"columns"},ur={class:"column-item"},fr={class:"column-item-name"};function mr(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",dr,[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",pr,[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",ur,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",fr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const hr=ae(cr,[["render",mr],["__scopeId","data-v-4a66f7d2"]]);function Oe(t,o){yr(t)&&(t="100%");var n=gr(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 yr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function gr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function br(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function qt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function wo(t){return t.length===1?"0"+t:String(t)}function Cr(t,o,n){return{r:Oe(t,255)*255,g:Oe(o,255)*255,b:Oe(n,255)*255}}function ko(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 wr(t,o,n){var a,r,i;if(t=Oe(t,360),o=Oe(o,100),n=Oe(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=ko(d,s,t+1/3),r=ko(d,s,t),i=ko(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function kr(t,o,n){t=Oe(t,255),o=Oe(o,255),n=Oe(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 _r(t,o,n){t=Oe(t,360)*6,o=Oe(o,100),n=Oe(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 xr(t,o,n,a){var r=[wo(Math.round(t).toString(16)),wo(Math.round(o).toString(16)),wo(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 xn(t){return Ee(t)/255}function Ee(t){return parseInt(t,16)}var Sn={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 Tt(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=Ar(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=Cr(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=qt(t.s),r=qt(t.v),o=_r(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=qt(t.s),i=qt(t.l),o=wr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=br(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 Sr="[-\\+]?\\d+%?",Nr="[-\\+]?\\d*\\.\\d+%?",et="(?:".concat(Nr,")|(?:").concat(Sr,")"),_o="[\\s|\\(]+(".concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")\\s*\\)?"),xo="[\\s|\\(]+(".concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")\\s*\\)?"),Re={CSS_UNIT:new RegExp(et),rgb:new RegExp("rgb"+_o),rgba:new RegExp("rgba"+xo),hsl:new RegExp("hsl"+_o),hsla:new RegExp("hsla"+xo),hsv:new RegExp("hsv"+_o),hsva:new RegExp("hsva"+xo),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 Ar(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(Sn[t])t=Sn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Re.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Re.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Re.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Re.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Re.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Re.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Re.hex8.exec(t),n?{r:Ee(n[1]),g:Ee(n[2]),b:Ee(n[3]),a:xn(n[4]),format:o?"name":"hex8"}:(n=Re.hex6.exec(t),n?{r:Ee(n[1]),g:Ee(n[2]),b:Ee(n[3]),format:o?"name":"hex"}:(n=Re.hex4.exec(t),n?{r:Ee(n[1]+n[1]),g:Ee(n[2]+n[2]),b:Ee(n[3]+n[3]),a:xn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Re.hex3.exec(t),n?{r:Ee(n[1]+n[1]),g:Ee(n[2]+n[2]),b:Ee(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!Re.CSS_UNIT.exec(String(t))}var Kt=2,Nn=.16,Tr=.05,Er=.05,Vr=.15,An=5,Tn=4,Lr=[{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 En(t){var o=t.r,n=t.g,a=t.b,r=kr(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Qt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(xr(o,n,a,!1))}function Br(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 Vn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Kt*o:Math.round(t.h)+Kt*o:a=n?Math.round(t.h)+Kt*o:Math.round(t.h)-Kt*o,a<0?a+=360:a>=360&&(a-=360),a}function Ln(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-Nn*o:o===Tn?a=t.s+Nn:a=t.s+Tr*o,a>1&&(a=1),n&&o===An&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Bn(t,o,n){var a;return n?a=t.v+Er*o:a=t.v-Vr*o,a>1&&(a=1),Number(a.toFixed(2))}function So(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Tt(t),r=An;r>0;r-=1){var i=En(a),s=Qt(Tt({h:Vn(i,r,!0),s:Ln(i,r,!0),v:Bn(i,r,!0)}));n.push(s)}n.push(Qt(a));for(var d=1;d<=Tn;d+=1){var l=En(a),c=Qt(Tt({h:Vn(l,d),s:Ln(l,d),v:Bn(l,d)}));n.push(c)}return o.theme==="dark"?Lr.map(function(p){var u=p.index,m=p.opacity,y=Qt(Br(Tt(o.backgroundColor||"#141414"),Tt(n[u]),m*100));return y}):n}var No={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"},Ao={},To={};Object.keys(No).forEach(function(t){Ao[t]=So(No[t]),Ao[t].primary=Ao[t][5],To[t]=So(No[t],{theme:"dark",backgroundColor:"#141414"}),To[t].primary=To[t][5]});var On=[],Et=[],Or="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Dr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ir(t,o){if(o=o||{},t===void 0)throw new Error(Or);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=On.indexOf(a);r===-1&&(r=On.push(a)-1,Et[r]={});var i;return Et[r]!==void 0&&Et[r][n]!==void 0?i=Et[r][n]:(i=Et[r][n]=Dr(),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 Dn(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){Fr(t,r,n[r])})}return t}function Fr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function $r(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Pr(t,o){$r(t,"[@ant-design/icons-vue] ".concat(o))}function In(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Eo(t,o,n){return n?e.h(t.tag,Dn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Dn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function Fn(t){return So(t)[0]}function $n(t){return t?Array.isArray(t)?t:[t]:[]}var Mr=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.83 */
|
|
2
|
+
(function(ke,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):(ke=typeof globalThis<"u"?globalThis:ke||self,e(ke["@ecan-bi/indicator-library"]={},ke.Vue,ke.LodashEs,ke.AntDesignVue,ke.Draggable,null,null,ke.Dayjs,null,ke.MonacoEditor,null,ke.Echarts))})(this,function(ke,e,ee,M,Nt,Of,Df,ue,Ff,ar,If,rr){var nr;"use strict";function lr(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 ir=lr(rr),fn=(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",xe=((nr=window==null?void 0:window.config)==null?void 0:nr.indicatorURL)||"",ve="INDICATOR_TOKEN",mn="DATA_LIST",Ye="SELECTED_COMPONENT",Ce="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",hn="SHOW_STYLE_CONFIG",yn="REFRESH_DATA",Yt="CHARTS_OPTIONS",gn="TABLE_OPTIONS",sr=18,bo="UPDATE_CHARTS_OPTIONS",Co="UPDATE_TABLE_OPTIONS",At="SOURCE_TYPE",bn="CHANGE_CONDITION",Cn="DATA_VIEW_COLUMNS",je="RENDER_USED_COMPONENTS",Wt="UPDATE_USED_COMPONENT",wn="MAP_ATTRIBUTE_PROPS",kn="PAGE_CONFIG",_n={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%"}},cr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},dr=e.defineComponent({name:"DataViewList",components:{ASpin:M.Spin,ATreeSelect:M.TreeSelect,Draggable:Nt},setup(){var N;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(Ce),a=e.inject(Se),r=e.computed(()=>{var A;return((A=e.unref(n))==null?void 0:A.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(N=window==null?void 0:window.config)==null?void 0:N.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var y,F;const A=r.value;i.value=!0;try{const{data:I}=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:A,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,I.success&&((y=s.value)==null||y.push(l),s.value=(F=s.value)==null?void 0:F.concat(p([I.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(A=[],y)=>{const F=[];return A.forEach(I=>{F.push({id:I.id,pId:y??I.parentId,value:I.id,title:I.name,isLeaf:I.leaf||!1,nature:I.nature,selectable:I.leaf||!1})}),F},u=async(A,y)=>{var T;let F=0;if(A){const{value:V}=A.dataRef;F=V}const{data:I}=await t.post(`${xe}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:F},{headers:{Authentication:o,operateContext:"ygt"}});I.success&&(s.value=(T=e.unref(s))==null?void 0:T.concat(p(I.data)),y&&e.unref(r)&&await c())},m=A=>{g(A),a({dataViewId:A,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(mn,{setDataList:A=>A}),C=e.ref(!1),f=e.ref([]),g=async A=>{if(A){f.value=[],C.value=!0;try{const y=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:A,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:F,data:I={}}=y.data;if(C.value=!1,F){const{rows:T=[]}=I;T==null||T.forEach(V=>{var S;const b=((S=V==null?void 0:V.dataViewColumns)==null?void 0:S.map(P=>({...P,show:!0})))||[];f.value=[...e.unref(f),...b]}),h(e.unref(f))}}catch{C.value=!1}}},k=A=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[A],w=(A,y)=>{const F=y[A.oldIndex];if(F){const I={...F,label:F.name,name:F.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(I))}};return e.onMounted(async()=>{await u(void 0,!0),g(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:C,onDataViewIdChange:m,mapGenericType:k,onDragStart:w}}}),Rf="",ne=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},pr={class:"data-view-list"},ur={class:"columns"},fr={class:"column-item"},mr={class:"column-item-name"};function hr(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",pr,[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",ur,[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",fr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",mr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const yr=ne(dr,[["render",hr],["__scopeId","data-v-4a66f7d2"]]);function Oe(t,o){gr(t)&&(t="100%");var n=br(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 gr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function br(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Cr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function qt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function wo(t){return t.length===1?"0"+t:String(t)}function wr(t,o,n){return{r:Oe(t,255)*255,g:Oe(o,255)*255,b:Oe(n,255)*255}}function ko(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 kr(t,o,n){var a,r,i;if(t=Oe(t,360),o=Oe(o,100),n=Oe(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=ko(d,s,t+1/3),r=ko(d,s,t),i=ko(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function _r(t,o,n){t=Oe(t,255),o=Oe(o,255),n=Oe(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 xr(t,o,n){t=Oe(t,360)*6,o=Oe(o,100),n=Oe(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 Sr(t,o,n,a){var r=[wo(Math.round(t).toString(16)),wo(Math.round(o).toString(16)),wo(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 xn(t){return Ee(t)/255}function Ee(t){return parseInt(t,16)}var Sn={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 Tt(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=Tr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=wr(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=qt(t.s),r=qt(t.v),o=xr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=qt(t.s),i=qt(t.l),o=kr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Cr(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 Nr="[-\\+]?\\d+%?",Ar="[-\\+]?\\d*\\.\\d+%?",et="(?:".concat(Ar,")|(?:").concat(Nr,")"),_o="[\\s|\\(]+(".concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")\\s*\\)?"),xo="[\\s|\\(]+(".concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")[,|\\s]+(").concat(et,")\\s*\\)?"),Re={CSS_UNIT:new RegExp(et),rgb:new RegExp("rgb"+_o),rgba:new RegExp("rgba"+xo),hsl:new RegExp("hsl"+_o),hsla:new RegExp("hsla"+xo),hsv:new RegExp("hsv"+_o),hsva:new RegExp("hsva"+xo),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 Tr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(Sn[t])t=Sn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Re.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Re.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Re.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Re.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Re.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Re.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Re.hex8.exec(t),n?{r:Ee(n[1]),g:Ee(n[2]),b:Ee(n[3]),a:xn(n[4]),format:o?"name":"hex8"}:(n=Re.hex6.exec(t),n?{r:Ee(n[1]),g:Ee(n[2]),b:Ee(n[3]),format:o?"name":"hex"}:(n=Re.hex4.exec(t),n?{r:Ee(n[1]+n[1]),g:Ee(n[2]+n[2]),b:Ee(n[3]+n[3]),a:xn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Re.hex3.exec(t),n?{r:Ee(n[1]+n[1]),g:Ee(n[2]+n[2]),b:Ee(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!Re.CSS_UNIT.exec(String(t))}var Kt=2,Nn=.16,Er=.05,Vr=.05,Lr=.15,An=5,Tn=4,Br=[{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 En(t){var o=t.r,n=t.g,a=t.b,r=_r(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Qt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Sr(o,n,a,!1))}function Or(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 Vn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Kt*o:Math.round(t.h)+Kt*o:a=n?Math.round(t.h)+Kt*o:Math.round(t.h)-Kt*o,a<0?a+=360:a>=360&&(a-=360),a}function Ln(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-Nn*o:o===Tn?a=t.s+Nn:a=t.s+Er*o,a>1&&(a=1),n&&o===An&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Bn(t,o,n){var a;return n?a=t.v+Vr*o:a=t.v-Lr*o,a>1&&(a=1),Number(a.toFixed(2))}function So(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Tt(t),r=An;r>0;r-=1){var i=En(a),s=Qt(Tt({h:Vn(i,r,!0),s:Ln(i,r,!0),v:Bn(i,r,!0)}));n.push(s)}n.push(Qt(a));for(var d=1;d<=Tn;d+=1){var l=En(a),c=Qt(Tt({h:Vn(l,d),s:Ln(l,d),v:Bn(l,d)}));n.push(c)}return o.theme==="dark"?Br.map(function(p){var u=p.index,m=p.opacity,h=Qt(Or(Tt(o.backgroundColor||"#141414"),Tt(n[u]),m*100));return h}):n}var No={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"},Ao={},To={};Object.keys(No).forEach(function(t){Ao[t]=So(No[t]),Ao[t].primary=Ao[t][5],To[t]=So(No[t],{theme:"dark",backgroundColor:"#141414"}),To[t].primary=To[t][5]});var On=[],Et=[],Dr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Fr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Ir(t,o){if(o=o||{},t===void 0)throw new Error(Dr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=On.indexOf(a);r===-1&&(r=On.push(a)-1,Et[r]={});var i;return Et[r]!==void 0&&Et[r][n]!==void 0?i=Et[r][n]:(i=Et[r][n]=Fr(),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 Dn(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){$r(t,r,n[r])})}return t}function $r(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Pr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Mr(t,o){Pr(t,"[@ant-design/icons-vue] ".concat(o))}function Fn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Eo(t,o,n){return n?e.h(t.tag,Dn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Dn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Eo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return So(t)[0]}function $n(t){return t?Array.isArray(t)?t:[t]:[]}var vr=`
|
|
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
|
-
`,Pn=!1,
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tl(t,o){if(t){if(typeof t=="string")return jn(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 jn(t,o)}}function jn(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 ol(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 nl(t){if(Array.isArray(t))return t}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){Lo(t,r,n[r])})}return t}function Lo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function al(t,o){if(t==null)return{};var n=rl(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 rl(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}vn("#1890ff");var ht=function(o,n){var a,r=Rn({},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=al(r,Jr),y=(a={anticon:!0},Lo(a,"anticon-".concat(s.name),!!s.name),Lo(a,i,i),a),g=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var b=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,k=$n(p),C=Zr(k,2),A=C[0],T=C[1];return e.createVNode("span",Rn({role:"img","aria-label":s.name},m,{onClick:u,class:y}),[e.createVNode(Vo,{class:g,icon:s,primaryColor:A,secondaryColor:T,style:b},null)])};ht.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},ht.displayName="AntdIcon",ht.inheritAttrs=!1,ht.getTwoToneColor=Xr,ht.setTwoToneColor=vn;const we=ht;var ll={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 il=ll;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){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=Un({},o,n.attrs);return e.createVNode(we,Un({},a,{icon:il}),null)};Bo.displayName="AppstoreAddOutlined",Bo.inheritAttrs=!1;const Oo=Bo;var cl={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 dl=cl;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){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 Do=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(we,Gn({},a,{icon:dl}),null)};Do.displayName="CaretDownOutlined",Do.inheritAttrs=!1;const ul=Do;var fl={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 ml=fl;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){hl(t,r,n[r])})}return t}function hl(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(we,zn({},a,{icon:ml}),null)};Io.displayName="CaretRightOutlined",Io.inheritAttrs=!1;const yl=Io;var gl={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 bl=gl;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){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=Hn({},o,n.attrs);return e.createVNode(we,Hn({},a,{icon:bl}),null)};Fo.displayName="CloseOutlined",Fo.inheritAttrs=!1;const Jt=Fo;var wl={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 kl=wl;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){_l(t,r,n[r])})}return t}function _l(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(we,Yn({},a,{icon:kl}),null)};$o.displayName="CopyOutlined",$o.inheritAttrs=!1;const xl=$o;var Sl={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 Nl=Sl;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){Al(t,r,n[r])})}return t}function Al(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=Wn({},o,n.attrs);return e.createVNode(we,Wn({},a,{icon:Nl}),null)};Po.displayName="DeleteOutlined",Po.inheritAttrs=!1;const qn=Po;var Tl={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 El=Tl;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){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 Mo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(we,Kn({},a,{icon:El}),null)};Mo.displayName="DoubleRightOutlined",Mo.inheritAttrs=!1;const Ll=Mo;var Bl={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 Ol=Bl;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(we,Qn({},a,{icon:Ol}),null)};vo.displayName="DownOutlined",vo.inheritAttrs=!1;const Il=vo;var Fl={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 $l=Fl;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){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 jo=function(o,n){var a=Xn({},o,n.attrs);return e.createVNode(we,Xn({},a,{icon:$l}),null)};jo.displayName="InfoCircleOutlined",jo.inheritAttrs=!1;const Ml=jo;var vl={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 jl=vl;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 Ro=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(we,Jn({},a,{icon:jl}),null)};Ro.displayName="MenuOutlined",Ro.inheritAttrs=!1;const Zn=Ro;var Ul={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 Gl=Ul;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){zl(t,r,n[r])})}return t}function zl(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(we,ea({},a,{icon:Gl}),null)};Uo.displayName="MinusCircleOutlined",Uo.inheritAttrs=!1;const Hl=Uo;var Yl={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 Wl=Yl;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){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 Go=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(we,ta({},a,{icon:Wl}),null)};Go.displayName="PlusCircleOutlined",Go.inheritAttrs=!1;const Kl=Go;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 Xl=Ql;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){Jl(t,r,n[r])})}return t}function Jl(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(we,oa({},a,{icon:Xl}),null)};zo.displayName="PlusOutlined",zo.inheritAttrs=!1;const Zl=zo;var ei={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 ti=ei;function na(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){oi(t,r,n[r])})}return t}function oi(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=na({},o,n.attrs);return e.createVNode(we,na({},a,{icon:ti}),null)};Ho.displayName="QuestionCircleOutlined",Ho.inheritAttrs=!1;const ni=Ho;var ai={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 ri=ai;function aa(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){li(t,r,n[r])})}return t}function li(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Yo=function(o,n){var a=aa({},o,n.attrs);return e.createVNode(we,aa({},a,{icon:ri}),null)};Yo.displayName="ReloadOutlined",Yo.inheritAttrs=!1;const ii=Yo;var si={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 ci=si;function ra(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){di(t,r,n[r])})}return t}function di(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Wo=function(o,n){var a=ra({},o,n.attrs);return e.createVNode(we,ra({},a,{icon:ci}),null)};Wo.displayName="SettingOutlined",Wo.inheritAttrs=!1;const pi=Wo,ui=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:yl,CaretDownOutlined:ul,AInputSearch:P.InputSearch,ASpin:P.Spin,APagination:P.Pagination,Draggable:Nt},setup(){var F;const t=(F=window==null?void 0:window.config)==null?void 0:F.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var _;return(_=e.unref(a))==null?void 0:_.graphicConfig}),i=e.computed(()=>{var _;return(_=e.unref(r))==null?void 0:_.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.inject(At),p=e.ref(""),u=async()=>{d.value=!0;const _={source:e.unref(c),queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(p),pageId:t,dataSourceId:e.unref(i)};_.source==="EDV_DATA_SET"&&(_.edvDataSetName=_.indexName,delete _.indexName);try{const N=await o.post(`${xe}/diagram/sourceList`,_,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:S,data:L={}}=N.data;if(S){const{rows:M=[],total:v=0}=L;M==null||M.forEach(B=>{var D;B.show=!1,(D=B.dataViewColumns)==null||D.forEach(V=>{V.show=!0,V.edit=!1,V.title&&(V.label=V.title)})}),s.value=M,l.totalResult=+v}}catch{d.value=!1}},m=_=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标",FIELD:"数据集"})[_],y=_=>({0:"文本",1:"数值",2:"日期"})[_],g=_=>{s.value[_].show=!s.value[_].show},f=()=>{l.currentPage=1,u()},b=ee.debounce(()=>{l.currentPage=1,u()},200),k=(_,N)=>{l.pageSize=N,l.currentPage=_,u()};e.onMounted(()=>{u()});const C=e.inject(Ce),A=e.computed(()=>{const _=["classificationList","rowHeaderList","dimensionList"];let N=[];for(const S in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),S)&&_.includes(S)){const L=e.unref(C)[S];Array.isArray(L)&&(N=N.concat(L))}return N});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:g,mapScope:m,mapDataSetScope:y,onSearch:f,onChange:b,source:c,onPaginationChange:k,searchText:p,setItemDisabled:(_=[])=>{let N=!1;if(e.unref(c)==="EDV_DATA_SET"){for(const S of e.unref(A))if(!_.find(M=>M.parentId===S.parentId)){N=!0;break}}else for(const S of e.unref(A))if(!_.find(M=>M.typeGuid===S.typeGuid)){N=!0;break}return N},onDragStart:(_,N)=>{const S=N.dataViewColumns[_.oldIndex];let L={};N.dataSetParams&&(L=N.dataSetParams),S&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...S,dataTo:N.dataTo,dataSetParams:L})),N.dataTo==="1"&&(N!=null&&N.hrpIndexVariates)&&sessionStorage.setItem("indicator-variates",JSON.stringify(N.hrpIndexVariates)),N.dataTo==="2"&&(N!=null&&N.dataSetParams)&&sessionStorage.setItem("indicator-variates",JSON.stringify(N.dataSetParams)))},getSourceType:_=>_==="0"?"【指标库】":_==="1"?"【视图】":_==="2"?"【数据集】":"【其他】"}}}),Pf="",fi={class:"data-source-list"},mi={class:"columns"},hi={class:"column-item"},yi=["onClick"],gi={key:0},bi={class:"column-child-item"},Ci={class:"column-child-item-name"};function wi(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",fi,[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",mi,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,y)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",hi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:g=>t.onToggleGroup(y)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString((m.indexCode?m.indexCode:"")+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,yi)]),m.show?(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":g=>m.dataViewColumns=g,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:g=>t.onDragStart(g,m)},{item:e.withCtx(({element:g})=>[e.createElementVNode("div",bi,[e.createTextVNode(" 【"+e.toDisplayString(g.scope==="FIELD"?t.mapDataSetScope(g.genericType):t.mapScope(g.scope))+"】 ",1),e.createElementVNode("span",Ci,e.toDisplayString(g.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 ki=ae(ui,[["render",wi],["__scopeId","data-v-0ecde64a"]]),_i=e.defineComponent({name:"DataList",components:{DataSourceList:ki,DataViewList:hr},setup(){return{source:e.inject(At)}}});function xi(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"||t.source==="EDV_DATA_SET"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Si=ae(_i,[["render",xi]]),la={mounted(t){t.focus()}},Ni=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},sortList:{type:Array,default:()=>[]}},components:{Draggable:Nt,AModal:P.Modal,AButton:P.Button,ASelect:P.Select,ASelectOption:P.SelectOption,DeleteOutlined:qn},setup(t,{expose:o}){var N;const n=(N=window==null?void 0:window.config)==null?void 0:N.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(Ce),s=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=e.ref("1"),u=e.ref([]),m=S=>{const L=t.sortList.filter(v=>!e.unref(u).find(B=>B.columnName===v.name)||S.columnName===v.name),M=[];return L.forEach((v,B)=>{M.includes(v.name)?v.name=`${v.name}_ecanrepeat_${B}`:M.push(v.name)}),L},y=async()=>{try{const S=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0,edvDataSetId:e.unref(i).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:L,data:M=[]}=S.data;L&&(c.value=M==null?void 0:M.slice(0,200))}catch(S){console.error(S)}},g=()=>{var B,D;const S=((B=e.unref(i)[t.type])==null?void 0:B.slice())||[],L=S[t.index],{label:M,name:v}=t.item;e.unref(p)==="2"?L.sort={label:M,columnName:v,type:"CUSTOM",customOrderColumns:e.unref(c)}:e.unref(p)==="1"&&((D=e.unref(u))!=null&&D.length?L.sort=ee.cloneDeep(e.unref(u)):delete L.sort),s({[t.type]:S})};let f=!1;const b=()=>{f=!0},k=e.ref(!1),C=S=>{var M;const{sort:L}=S;L?Array.isArray(L)?(p.value=((M=L[0])==null?void 0:M.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=ee.cloneDeep(L):u.value=[]):(p.value=(L==null?void 0:L.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=[ee.cloneDeep(L)]:u.value=[]):u.value=[],k.value=!0},A=()=>{k.value=!1},T=()=>{e.unref(p)==="2"?(f&&g(),f=!1):g(),A()};return o({showModal:C}),e.watch(k,S=>{var L,M;if(S){const v=(M=(L=t.item)==null?void 0:L.sort)==null?void 0:M.customOrderColumns;v==null?y():c.value=v}else c.value=[];window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"}),{visible:k,customSortList:c,activeKey:p,combSortList:u,getSortOptions:m,onChange:b,onDeleteConfig:()=>{var M;const S=((M=e.unref(i)[t.type])==null?void 0:M.slice())||[],L=S[t.index];delete L.sort,s({[t.type]:S}),A()},onCancel:T,onAddSort:()=>{e.unref(u).push({label:"",columnName:null,type:"COMBINATION",order:null})},handleDeleteSort:S=>{u.value.splice(S,1)},onColumnChange:S=>{const L=e.unref(u).find(M=>M.columnName===S);if(L){const M=t.sortList.find(v=>v.name===S);M&&(L.label=M.label,M.defaultCode?L.defaultCode=M.defaultCode:delete L.defaultCode)}}}}}),Mf="",Ai={class:"button-wrapper"},Ti={class:"list-wrapper"},Ei={class:"button-wrapper"},Vi={class:"sort-item"};function Li(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("delete-outlined"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("draggable"),m=e.resolveComponent("a-tabs"),y=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(y,{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.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[1]||(o[1]=g=>t.activeKey=g)},{default:e.withCtx(()=>[e.createVNode(p,{key:"1",tab:"组合排序"},{default:e.withCtx(()=>[e.createElementVNode("div",Ai,[e.createVNode(s,{primary:"",onClick:t.onAddSort},{default:e.withCtx(()=>[e.createTextVNode(" 新增 ")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.combSortList,(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sort-row",key:f},[e.createVNode(d,{value:g.columnName,"onUpdate:value":b=>g.columnName=b,style:{width:"200px"},placeholder:"维度/指标",options:t.getSortOptions(g),fieldNames:{label:"label",value:"name"},onChange:t.onColumnChange},null,8,["value","onUpdate:value","options","onChange"]),e.createVNode(d,{value:g.order,"onUpdate:value":b=>g.order=b,style:{"margin-left":"10px",width:"100px"},placeholder:"升/降序"},{default:e.withCtx(()=>[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})]),_:2},1032,["value","onUpdate:value"]),e.createVNode(c,{style:{color:"red","margin-left":"10px"},onClick:b=>t.handleDeleteSort(f)},null,8,["onClick"])]))),128))])]),_:1}),e.createVNode(p,{key:"2",tab:"自定义排序","force-render":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ei,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(u,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=g=>t.customSortList=g),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:g})=>[e.createElementVNode("div",Vi,e.toDisplayString(g),1)]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["visible","onCancel"])}const Bi=ae(Ni,[["render",Li],["__scopeId","data-v-6a468e35"]]),Oi=e.defineComponent({name:"CustomGroupModal",directives:{focus:la},components:{CloseOutlined:Jt,AModal:P.Modal,ASelect:P.Select,ASelectOption:P.SelectOption,AButton:P.Button,AInput:P.Input,ACheckbox:P.Checkbox,ACollapse:P.Collapse,ACollapsePanel:P.CollapsePanel,ATag:P.Tag,ACheckableTag:P.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 x=e.unref(c).map(E=>E.title);return new Set(x)}),u=e.ref([]);e.watch(()=>e.unref(c).length,x=>{u.value=new Array(x).fill(!1)});const m=e.computed(()=>{let x=0;return e.unref(c).forEach(E=>{var w;(w=E.data)==null||w.forEach(O=>{O.checked&&x++})}),x}),y=()=>{const x=e.unref(d);if(!x){P.message.error("创建分组名不能空");return}e.unref(p).has(x)?P.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:x,data:[]}),i=!0)},g=x=>{e.unref(c).splice(x,1),i=!0},f=e.ref(null),b=()=>{if(e.unref(m)===0){P.message.error("当前移入分组已选个数为0");return}const x=e.unref(f);if(x==null){P.message.error("请选择移入分组");return}if(!e.unref(c)[x]){P.message.error("移入分组不存在,请重新选择");return}const E=[],w=e.unref(c).length;for(let O=0;O<w;O++){const $=e.unref(c)[O];e.unref(c)[O].data=$.data.filter(z=>(z.checked&&E.push({...z,checked:!1}),!z.checked))}e.unref(c)[x].data=[...E,...e.unref(c)[x].data],i=!0},k=x=>{e.unref(u)[x]=!0},C=x=>{e.unref(u)[x]=!1},A=(x,E)=>{const w=x.target.value;e.unref(p).has(w)&&P.message.error("组名不能相同,请修改"),e.unref(c)[E].title=w,i=!0},T=e.inject(Ce),h=e.inject(Se),I=e.computed(()=>e.unref(T).source),F=e.computed(()=>e.unref(T).dataViewId),_=e.ref(!1),N=()=>{var Y,Q;const x=e.unref(c);let E="";e.unref(_)&&(E=(Y=x[0])==null?void 0:Y.title);const w=x==null?void 0:x.length,O={};for(let Z=1;Z<w;Z++){const oe=x[Z]||{},{title:ie,data:se}=oe;O[ie]=(se==null?void 0:se.map(Pe=>Pe.label))||[]}const $=((Q=e.unref(T)[t.type])==null?void 0:Q.slice())||[],z=$[t.index];z.customGroup={groupInfoMap:O,otherGroupName:E},h({[t.type]:$})},S=e.ref(!1),L=()=>{S.value=!0},M=()=>{S.value=!1},v=()=>{M(),i&&N(),i=!1},B=()=>{i=!0},D=new Set,V=async()=>{const x=t.item.customGroup||{},E=x.otherGroupName,w=x.groupInfoMap;(E===""||E==null)&&(_.value=!1),e.unref(c)[0]={title:E||"未分组",data:[]};let O=1;for(const $ in w)if(Object.prototype.hasOwnProperty.call(w,$)){const Y=w[$].map(Q=>(D.add(Q),{label:Q,checked:!1}));e.unref(c)[O]={title:$,data:Y},O++}await G()},G=async()=>{var x;try{const E=await n.post(`${xe}/diagram/groupvalue`,{source:e.unref(I),dataViewId:e.unref(F),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0,edvDataSetId:e.unref(T).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:w,data:O=[]}=E.data;if(w){const $=[];(x=O==null?void 0:O.slice(0,200))==null||x.forEach(z=>{D.has(z)||$.push({label:z,checked:!1})}),e.unref(c)[0].data=$}}catch(E){console.error(E)}};return e.watch(S,x=>{x&&V(),window.changeShowTable&&window.changeShowTable(!x)},{flush:"post"}),o({showModal:L}),{visible:S,title:s,activeKey:l,customGroupList:c,onCancel:v,useOtherGroup:_,selectCount:m,createGroupTitle:d,onAddGroup:y,onDeleteGroup:g,onMoveInGroup:b,selectGroupIndex:f,onEditTitle:k,onTitleChange:A,onFinishEditTitle:C,onUseOtherGroup:B,customGroupEditTitleList:u}}}),vf="",jf="",Di={class:"custom-group-header"},Ii={class:"move-and-create"},Fi={class:"select-tip"},$i={class:"select-count"},Pi={class:"create-group"},Mi={class:"custom-group-content"},vi=["onClick"],ji={class:"extra"},Ri={class:"custom-group-list"},Ui={class:"text"};function Gi(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"),y=e.resolveComponent("a-checkable-tag"),g=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),b=e.resolveComponent("a-modal"),k=e.resolveDirective("focus");return e.openBlock(),e.createBlock(b,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[e.createElementVNode("div",Ii,[e.createElementVNode("div",null,[e.createElementVNode("span",Fi,[e.createTextVNode(" 已选"),e.createElementVNode("span",$i,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,A)=>(e.openBlock(),e.createBlock(s,{key:A},{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",Pi,[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",Mi,[e.createVNode(f,{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,A)=>(e.openBlock(),e.createBlock(g,{key:A},{header:e.withCtx(()=>[t.customGroupEditTitleList[A]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:C.title,size:"small",onChange:T=>t.onTitleChange(T,A),onBlur:T=>t.onFinishEditTitle(A),onPressEnter:T=>t.onFinishEditTitle(A)},null,8,["value","onChange","onBlur","onPressEnter"])),[[k]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(T=>t.onEditTitle(A),["prevent","stop"])},e.toDisplayString(C.title),9,vi))]),extra:e.withCtx(()=>[e.createElementVNode("div",ji,[A===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),A!==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(T=>t.onDeleteGroup(A),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.data,(T,h)=>(e.openBlock(),e.createBlock(y,{color:"red",checked:T.checked,"onUpdate:checked":I=>T.checked=I,class:"custom-group",key:h},{default:e.withCtx(()=>[e.createElementVNode("span",Ui,e.toDisplayString(T.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const zi=ae(Oi,[["render",Gi],["__scopeId","data-v-a0733a80"]]);let _e=(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 Hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo={},Yi={get exports(){return qo},set exports(t){qo=t}};(function(t,o){(function(n,a){t.exports=a()})(Hi,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 y=this.quarter()-1;return m?this.month(3*y).startOf(n).startOf("day"):this.month(3*y+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Yi);const Wi=qo;ue.extend(Wi);const qi=e.defineComponent({name:"Condition",components:{CloseOutlined:Jt,DownOutlined:Il,AppstoreAddOutlined:Oo,ASelect:P.Select,AInput:P.Input,ADatePicker:P.DatePicker,AButton:P.Button,ADropdown:P.Dropdown,AMenu:P.Menu,AMenuItem:P.MenuItem,ASubMenu:P.SubMenu,APopover:P.Popover,ATabs:P.Tabs,ATabPane:P.TabPane,ARadioGroup:P.RadioGroup,ARadio:P.Radio,AInputNumber:P.InputNumber,ASelectOption:P.SelectOption,MenuOutlined:Zn},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,dt,Le,Qe,Xe,Je,Be,pt,Ze,at,ut,go,Gt,zt,Ht;const o=(St=window==null?void 0:window.config)==null?void 0:St.pageId,n=e.inject(Ce),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(Cn),s=e.inject(je),d=e.ref(!1),l=ue(),c=e.computed(()=>{var q;const H=[];return(q=e.unref(s))==null||q.forEach(X=>{const{keyName:te="",id:re="",type:fe}=X;fe==="ecanRangePicker"?H.push({value:`${re}-startTime`,label:`${te||re}-开始时间值`,keyName:`${te||re}-startTime`,id:re},{value:`${re}-endTime`,label:`${te||re}-结束时间值`,keyName:`${te||re}-endTime`,id:re}):H.push({value:re,label:`${te||re}`,keyName:`${te||re}`,id:re})}),H}),p=e.computed(()=>[{label:"父页面",value:"PARENT",id:"PARENT",keyName:"PARENT"},...e.unref(c)]),u=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.dataViewId}),m=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.source}),y=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},f=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],b=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),k=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),C=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],A=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],T=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(dt=t.data)==null?void 0:dt.fieldName,fieldType:(Le=t.data)==null?void 0:Le.fieldType,rule:(Qe=t.data)==null?void 0:Qe.rule,id:(Xe=t.data)==null?void 0:Xe.id,fieldValue:I(),label:(Je=t.data)==null?void 0:Je.label,targetSource:"",typeGuid:(Be=t.data)==null?void 0:Be.typeGuid,indexCode:(pt=t.data)==null?void 0:pt.indexCode,indexCodeNum:(Ze=t.data)==null?void 0:Ze.indexCodeNum,dataType:((at=t.data)==null?void 0:at.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((go=t.data)!=null&&go.useCurrentTime),keyValue:(Gt=t.data)==null?void 0:Gt.keyValue,modelKey:(zt=t.data)==null?void 0:zt.modelKey,prop:(Ht=t.data)==null?void 0:Ht.prop});function I(){const{fieldType:H="",dataType:q="",fieldValue:X=""}=t.data;if(H==="DATE"&&q==="time")return X&&ue(X);if(q==="component"){const te=e.unref(c).find(re=>re.keyName===X);return te?te.value:X}else return X}const F=e.ref([]),_=e.ref(!1),N=e.computed(()=>h.value.fieldType==="DATE"),S=e.computed(()=>{const H=t.type,{source:q}=e.unref(n);let X=[];const te=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],re=["controlList","sqlConditions","variableList","variableConditions"];if(q==="EDV_DATA_SET")X=F.value;else if(te.includes(H)){let fe=[];for(const j in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),j)&&!re.includes(j)){const R=e.unref(n)[j];Array.isArray(R)&&(te.includes(j)?fe=fe.concat(R.filter(W=>W.show)):fe=fe.concat(R))}X=fe}else["leftAxisList","rightAxisList","indicators"].includes(H)&&(X=e.unref(i));return X.map(fe=>({...fe,label:fe.title||fe.label,value:fe.name}))}),{updateCondition:L,deleteCondition:M,addCondition:v}=e.inject(bn,{updateCondition:(H,q,X)=>{},deleteCondition:(H,q)=>{},addCondition:(H,q,X)=>{}}),B=()=>{M(t.index,t.path)};e.watch(h,H=>{const q=ee.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(q.fieldValue=H.fieldValue.format(H.dateFormat)),L(q,t.index,t.path)},{deep:!0}),e.watch(d,H=>{h.value.fieldValue="",h.value.useCurrentTime=H});const D=H=>{var le;const q=e.unref(S).find(ne=>ne.value===H)||{},{name:X,genericType:te,id:re,edvDataSetId:fe,label:j,typeGuid:R,indexCode:W,indexCodeNum:K}=q;h.value={id:re,fieldName:X,fieldType:te,label:j,rule:"",fieldValue:te==="DATE"?null:void 0,targetSource:"",typeGuid:R,indexCode:W,edvDataSetId:fe,indexCodeNum:K,dataType:"",useCurrentTime:!1,keyValue:((le=e.unref(h))==null?void 0:le.keyValue)||_e(),modelKey:"",prop:""}},V=H=>{const q=e.unref(c).find(X=>X.value===H)||{};e.unref(h).componentId=q.id||""},G=e.computed(()=>{const H=e.unref(h).fieldType;return H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),U=e.computed(()=>{let H="";const q=e.unref(G).find(X=>X.value===e.unref(h).rule);return q&&(H=q.label),H}),x=e.computed(()=>{let H={fontSize:"12px"};return e.unref(U)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),E=e.ref([]),w=async()=>{var H;if(!(e.unref(E).length>0))try{const q=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(m),dataViewId:e.unref(u),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0,edvDataSetId:e.unref(h).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:te=[]}=q.data;X&&(E.value=(H=te==null?void 0:te.slice(0,200))==null?void 0:H.map(re=>({label:re,value:re})))}catch(q){console.error(q)}},O=H=>{e.unref(h).rule=H,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&w()},$=H=>{e.unref(h).dataType=H,e.unref(h).fieldValue="",e.unref(h).modelKey="",e.unref(h).prop=""},z=e.ref(),Y=H=>{z.value=H,e.unref(h).fieldValue=(H==null?void 0:H.join(","))||""},Q=H=>{const{keyPath:q}=H;e.unref(h).rule=q[0],e.unref(h).dataType=q[1],e.unref(h).dateFormat=q[2],e.unref(h).fieldValue="",e.unref(h).modelKey="",e.unref(h).prop=""};e.onMounted(async()=>{var re,fe,j,R,W,K,le,ne,J,ye;if(h.value.dataType=((re=t.data)==null?void 0:re.dataType)||"",h.value.componentId=((fe=t.data)==null?void 0:fe.componentId)||"",h.value.keyValue=(j=t.data)==null?void 0:j.keyValue,h.value.modelKey=(R=t.data)==null?void 0:R.modelKey,h.value.prop=(W=t.data)==null?void 0:W.prop,e.unref(h).fieldType==="DATE"){const{activeKey:de,dateCalcTypes:ce=[]}=t.data||{};if(e.unref(h).dateFormat=(K=t.data)==null?void 0:K.dateFormat,e.unref(h).activeKey=de,e.unref(h).calcWays=((le=t.data)==null?void 0:le.calcWays)||[],e.unref(h).dateCalcTypes=ce,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),de===5){const he=e.unref(h).calcWays[0];if(he){const me=he.split("-");e.unref(b).expression=me[0],e.unref(b).around=me[1]}e.unref(b).unit=ce[0]||"YEAR"}else{e.unref(h).radioValue=((ne=t.data)==null?void 0:ne.radioValue)||"";const he=e.unref(k).find(me=>{var be;return me.key===((be=t.data)==null?void 0:be.activeKey)});he&&He(he,t.data)}}else z.value=((ye=(J=t.data)==null?void 0:J.fieldValue)==null?void 0:ye.split(","))||[];const{fieldType:H,fieldName:q,rule:X}=h.value;H!=="DATE"&&q&&X&&["IN","NOT_IN"].includes(X)&&w();const{source:te}=e.unref(n);te==="EDV_DATA_SET"&&await a.get(`${xe}/dataset/`+e.unref(n).edvDataSetId||"",{headers:{Authentication:r,operateContext:"ygt"}}).then(de=>{de.data.success&&(console.log(de.data),F.value=de.data.data.column.map(ce=>({...ce,genericType:ce.columnCategory==="0"?"TEXT":ce.columnCategory==="1"?"NUMBER":"DATE",edvDataSetId:de.data.data.id,name:ce.columnName,label:ce.columnName})))}).catch(de=>{console.error(de)})});const Z=H=>{if(e.unref(h).activeKey===H){e.unref(k)[H].radioValue=e.unref(h).radioValue,e.unref(k)[e.unref(h).activeKey]&&(e.unref(k)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(k)[H].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(k)[H].afterNum=e.unref(h).calcWays[0]));return}e.unref(k).forEach(q=>{q.beforeNum=0,q.afterNum=0,q.radioValue="1",q.value=""})},oe=(H,q)=>{y.value=!0;const X=H.target.value,te=q.type,re=e.unref(h).dateFormat,fe=Math.abs(q.beforeNum),j=q.afterNum;q.value=pe(X,te,re,fe,j)},ie=H=>{const q=e.unref(h).activeKey;if(H!==q)return;let X="";q===0?X="years":q===1?X="quarters":q===2?X="months":q===3?X="weeks":q===4&&(X="days");const te=e.unref(h).dateFormat,re=e.unref(h).radioValue;let fe=0,j=0;return re==="1"?fe=Math.abs(e.unref(h).calcWays[0]):re==="2"&&(j=e.unref(h).calcWays[0]),pe(re,X,te,fe,j)},se=(H,q,X,te)=>{if(y.value=!0,q.radioValue===te){const re=H.target.value;X==="+"?q.value=ue().add(re,q.type).format(e.unref(h).dateFormat):q.value=ue().subtract(re,q.type).format(e.unref(h).dateFormat)}},Pe=(H,q)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=q,e.unref(h).radioValue=H.radioValue,H.radioValue==="1"?e.unref(h).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(h).calcWays[0]=H.afterNum:H.radioValue==="3"?q===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),q===0?e.unref(h).dateCalcTypes=["YEAR"]:q===1?e.unref(h).dateCalcTypes=["QUARTER"]:q===2?e.unref(h).dateCalcTypes=["MONTH"]:q===3?e.unref(h).dateCalcTypes=["WEEK"]:q===4&&(e.unref(h).dateCalcTypes=["DAY"]),_.value=!1},ct=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(b).unit],e.unref(h).calcWays[0]=`${e.unref(b).expression}-${e.unref(b).around}`,_.value=!1};function He(H,q){const{radioValue:X="",calcWays:te=[]}=q;H.radioValue=X,te!=null&&te.length&&(X==="1"?H.beforeNum=Math.abs(te[0]):X==="2"&&(H.afterNum=te[0]))}function pe(H,q,X,te,re){if(H==="1")return ue().subtract(te,q).format(X);if(H==="2")return ue().add(re,q).format(X);if(H==="3"){if(q==="years")return ue().startOf("year").format(X);if(q==="quarters")return ue().startOf("quarter").format(X);if(q==="months")return ue().startOf("month").format(X);if(q==="days")return ue().format(X)}else if(H==="4"){if(q==="years")return ue().endOf("year").format(X);if(q==="quarters")return ue().endOf("quarter").format(X);if(q==="months")return ue().endOf("month").format(X)}return""}const Te=(H,q)=>q.label.toLowerCase().indexOf(H.toLowerCase())>=0,nt=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:S,ruleOptions:G,onFieldChange:D,condition:h,valueOptions:E,onRuleChange:O,onDataTypeChange:$,onFieldValueSelectChange:Y,fieldValues:z,onDelete:B,isDateType:N,formatList:f,tabDateList:k,compareList:C,menuRule:A,dateBtnLabel:U,downIconStyle:x,popoverVisible:_,dateRadioStyle:g,showTime:y,controlList:c,keyNameOptions:p,dataTypeList:T,customTabData:b,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:nt,handleMenuClick:Q,changeTabInitDate:Z,changeRadioValue:oe,getFieldValue:ie,blurCompare:se,okDatePickConfig:Pe,onChangeComponent:V,filterOption:Te,okCustomConfig:ct,clickConditionMenu:({key:H})=>{v(t.path,t.index,H==="2"?"||":"&&")},dataSetfieldOptions:F}}}),Rf="",Uf="",Ki={class:"condition"},Qi=["title"],Xi={class:"rule"},Ji={class:"data-type"},Zi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},es={class:"popover-content-wrap"},ts={key:0,class:"use-current-time"},os={class:"tabFilterRadio"},ns={key:0},as={key:1},rs={style:{"margin-left":"10px"}},ls={style:{"margin-left":"10px"}},is={style:{position:"absolute",bottom:"10px"}},ss={style:{display:"flex"}},cs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ds(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"),y=e.resolveComponent("a-dropdown"),g=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-input"),b=e.resolveComponent("a-checkbox"),k=e.resolveComponent("a-input-number"),C=e.resolveComponent("a-radio"),A=e.resolveComponent("a-radio-group"),T=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),I=e.resolveComponent("appstore-add-outlined"),F=e.resolveComponent("a-popover"),_=e.resolveComponent("menu-outlined"),N=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ki,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(S,L)=>(e.openBlock(),e.createBlock(s,{key:L,value:S.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:S.label},e.toDisplayString(S.label),9,Qi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Xi,[t.isDateType?(e.openBlock(),e.createBlock(y,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,S=>(e.openBlock(),e.createBlock(c,{key:S.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,L=>{var M;return e.openBlock(),e.createBlock(c,{key:L.value,disabled:L.value==="component"&&!((M=t.controlList)!=null&&M.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===L.value?"color: #1890FF;":"")},e.toDisplayString(L.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,v=>(e.openBlock(),e.createBlock(l,{key:v.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===L.value&&t.condition.dateFormat===v.value?"color: #1890FF;":"")},e.toDisplayString(v.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",Ji,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(S,L)=>(e.openBlock(),e.createBlock(s,{key:L,value:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.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",Zi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(g,{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(g,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=S=>t.condition.fieldValue=S),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:e.normalizeStyle({width:t.condition.fieldValue==="PARENT"?"":"calc(100% - 35px)",marginRight:"10px"}),value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.keyNameOptions,onChange:t.onChangeComponent},null,8,["style","value","filter-option","options","onChange"])):e.createCommentVNode("",!0),t.condition.fieldValue==="PARENT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(f,{class:"field-value",value:t.condition.modelKey,"onUpdate:value":o[2]||(o[2]=S=>t.condition.modelKey=S),placeholder:"组件别名",style:{margin:"0"}},null,8,["value"]),e.createVNode(f,{class:"field-value",value:t.condition.prop,"onUpdate:value":o[3]||(o[3]=S=>t.condition.prop=S),placeholder:"属性名"},null,8,["value"])],64)):e.createCommentVNode("",!0),e.createVNode(F,{visible:t.popoverVisible,"onUpdate:visible":o[11]||(o[11]=S=>t.popoverVisible=S),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",es,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(b,{checked:t.isUseCurrentTime,"onUpdate:checked":o[4]||(o[4]=S=>t.isUseCurrentTime=S)},{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,(S,L)=>(e.openBlock(),e.createBlock(T,{key:L,tab:S.label},{default:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(A,{value:S.radioValue,"onUpdate:value":M=>S.radioValue=M,onChange:M=>t.changeRadioValue(M,S)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ns,"相对当前时间:"+e.toDisplayString(S.value),1)):(e.openBlock(),e.createElementBlock("div",as,"相对当前时间:"+e.toDisplayString(t.getFieldValue(L)),1)),e.createVNode(C,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(k,{value:S.beforeNum,"onUpdate:value":M=>S.beforeNum=M,min:0,onBlur:M=>t.blurCompare(M,S,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",rs,e.toDisplayString(S.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(C,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(k,{value:S.afterNum,"onUpdate:value":M=>S.afterNum=M,min:0,onBlur:M=>t.blurCompare(M,S,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ls,e.toDisplayString(S.afterLabel),1)]),_:2},1032,["style"]),S.beforeText?(e.openBlock(),e.createBlock(C,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),S.afterText?(e.openBlock(),e.createBlock(C,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",is,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[5]||(o[5]=M=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:M=>t.okDatePickConfig(S,L)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(T,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ss,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[6]||(o[6]=S=>t.customTabData.expression=S),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[7]||(o[7]=S=>t.customTabData.unit=S),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[8]||(o[8]=S=>t.customTabData.around=S)},{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",cs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[9]||(o[9]=S=>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[10]||(o[10]=S=>{t.popoverVisible=!0})},[e.createVNode(I)])]),_: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[12]||(o[12]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.keyNameOptions,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(f,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[13]||(o[13]=S=>t.condition.fieldValue=S)},null,8,["value"])),!t.isDateType&&t.condition.fieldValue==="PARENT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(f,{class:"field-value",value:t.condition.modelKey,"onUpdate:value":o[14]||(o[14]=S=>t.condition.modelKey=S),placeholder:"组件别名",style:{margin:"0"}},null,8,["value"]),e.createVNode(f,{class:"field-value",value:t.condition.prop,"onUpdate:value":o[15]||(o[15]=S=>t.condition.prop=S),placeholder:"属性名"},null,8,["value"])],64)):e.createCommentVNode("",!0),e.createVNode(y,{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(_,{class:"more-icon"})]),_:1}),e.createVNode(N,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const ps=ae(qi,[["render",ds],["__scopeId","data-v-93aee962"]]),us=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:ps}}),Gf="",fs={key:0,class:"condition-list"},ms={key:0,class:"condition-container"},hs={key:0,class:"condition-text"},ys={key:1,class:"condition-text"},gs={class:"conditions"};function bs(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",fs,[(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",ms,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",hs,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",ys,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",gs,[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 Cs=ae(us,[["render",bs],["__scopeId","data-v-553c1496"]]),ws=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:P.Select,AInput:P.Input,AInputNumber:P.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=ee.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),zf="",ia=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),ks={class:"truncations"},_s={class:"rule"},xs={class:"field-value"},Ss={class:"field-value"},Ns=ia(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),As=ia(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ts=["onClick"];function Es(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",ks,[(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",_s,[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",xs,[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",Ss,[Ns,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),As]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ts)]))),128))])}const Vs=ae(ws,[["render",Es],["__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},Ls=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),yt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),tt=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...tt(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},sa=(t,o)=>{var f;const n=ee.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;da(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],y=[];for(const b of m){const k=tt((b==null?void 0:b.conditions)||[]);if(k!=null&&k.length){const C=k.filter(A=>pa(A,o)?(A==null?void 0:A.dataType)==="component":!1).map(A=>{const T=pa(A,o),h={};return A!=null&&A.dateFormat&&(h.format=A.dateFormat),{conditionKey:A.fieldName,conditionLabel:A.fieldName,conditionName:A.fieldName,conditionValueType:A.fieldType,id:T.id,keyName:A.fieldValue,rule:A.rule,notGlobal:!0,indexCode:A.indexCode,typeGuid:A.typeGuid,indexCodeNum:A.indexCodeNum,...h}});if(C!=null&&C.length)for(const A of C)y.find(T=>T.keyName===A.keyName)||y.push(A)}}const g=y.length;for(let b=0;b<g;b++){const k=y[b];if(k&&!((f=Object.keys(k))!=null&&f.length)||(k==null?void 0:k.conditionKey)==="parentCode")continue;const{id:C,keyName:A,prop:T,format:h,dataType:I="component",customValue:F}=k,_=ca(k);Ko({sqlCondition:_,renderUsedComponents:o,id:C,dateFormat:h,prop:T,keyName:A,dataType:I,customValue:F}),u.push(_)}for(let b=u.length-1;b>=0;b--){const k=u[b];k.globalCondition||tt(u).find(A=>A.alias===k.alias&&A.globalCondition)&&u.splice(b,1)}return u},Lt=(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||""};Ko({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 ca(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 y=n||o;return y&&s&&(y+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:y,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Bs=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function da(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)da(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=ca(n);Ko({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 Bs)delete n[p]}}function Ko(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(A=>A.id===a),{value:y,format:g="YYYY-MM-DD",operate:f,type:b="",useCurrentTime:k}=m||{},C=r||g;if(ge(b,"date")){let A;if(k?A=ue():A=ue(y),f&&y){const{mode:T,type:h,value:I}=f;if(I)switch(h){case"add":A=A.add(I,T);break;case"minus":A=A.subtract(I,T);break}}if(c&&p&&u)switch(u){case"add":A=A.add(c,p);break;case"minus":A=A.subtract(c,p);break}o.fieldValue=(A==null?void 0:A.format(C))||"",o.dateFormat=C}else if(b==="ecanRangePicker"){const{interval:A,intervalUnit:T,startTime:h,endTime:I}=m||{};let F=i;if(!i){const N=s==null?void 0:s.split("-");N!=null&&N.length&&(F=N[N.length-1])}if(!F)return;let _=null;if(k&&(F==="startTime"?_=ue().subtract(A,T):F==="endTime"&&(_=ue())),m[F]&&(_=ue(m[F])),f){const{type:N,value:S,mode:L}=f;switch(N){case"add":_=_&&_.add(S,L);break;case"minus":_=_&&_.subtract(S,L)}}if(c&&p&&u){if(c==="rangeValue"){if(h&&I){const N=ue(I).diff(ue(h),p)+1;switch(u){case"add":_=_&&_.add(N,p);break;case"minus":_=_&&_.subtract(N,p)}}}else if(!isNaN(+c))switch(u){case"add":_=_&&_.add(c,p);break;case"minus":_=_&&_.subtract(c,p)}}if(_&&(o.fieldValue=_==null?void 0:_.format(C)),F==="rangeValue"&&h&&I){const N=Os(C);N&&(o.fieldValue=ue(I).diff(ue(h),N)+1)}o.dateFormat=C}else{const A=y&&y.match(/\{(.+?)\}/g);A!=null&&A.length?o.fieldValue="":o.fieldValue=y}d===""&&(o.fieldValue=l||"")}const Zt=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 pa(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 Os(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 Ds=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Cs,TruncationList:Vs,AModal:P.Modal,AButton:P.Button,ATabs:P.Tabs,ATabPane:P.TabPane},setup(t,{expose:o}){var B;const n=e.ref("1"),a=()=>{var D;return`添加过滤条件-${((D=t.item)==null?void 0:D.label)||""}`},r=e.inject(Ce),i=e.inject(Se),s=e.inject(je),d=e.computed(()=>{var D;return(D=e.unref(r))==null?void 0:D.dataSourceId}),l=e.inject(Ye),c=e.inject(Wt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),y=e.inject(At),g=D=>{var V;for(const G of D)(V=G.conditions)!=null&&V.length?g(G.conditions):G.keyValue=_e()};e.watch(m,D=>{var V,G,U,x;if(D){if(Array.isArray((V=t.item)==null?void 0:V.conditions)){const E=ee.cloneDeep(((G=t.item)==null?void 0:G.conditions)||[]);g(E),p.value=E}Array.isArray((U=t.item)==null?void 0:U.truncations)?u.value=ee.cloneDeep((x=t.item)==null?void 0:x.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!D)},{flush:"post"});let f=!1;const b=D=>{var V;f=!0,e.unref(p)==null||((V=e.unref(p))==null?void 0:V.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==D?p.value=[{join:D,conditions:[e.unref(p)[0],{keyValue:_e()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===D&&p.value[0].conditions.push({keyValue:_e()}))};e.provide(bn,{updateCondition(D,V,G){var E;f=!0;let U=e.unref(p);const x=G.split("-");if(x!=null&&x.length)for(const w of x)if(U[w])U=(E=U[w])==null?void 0:E.conditions;else break;Array.isArray(U)&&U[V]&&(U[V]=D)},deleteCondition(D,V){var x,E,w;f=!0;let G=e.unref(p);const U=V.split("-");if(U!=null&&U.length){for(const O of U)if(G[O])G=(x=G[O])==null?void 0:x.conditions;else break;if(Array.isArray(G)&&G[D])if(G.splice(D,1),G.length===1){if(U.length>0){const O=U.length-1,$=U[O],z=U.slice(0,O);let Y=e.unref(p),Q="";for(const Z of z)if(Y[Z])Q=(E=Y[Z])==null?void 0:E.join,Y=(w=Y[Z])==null?void 0:w.conditions;else break;if(Q===G[0].join){if(Array.isArray(G[0].conditions)){const Z=ee.cloneDeep(G[0].conditions);Y.splice(+$,1),Y.splice(+$,0,...Z)}}else Y[$]=G[0]}}else G.length===0&&(p.value=[])}},addCondition(D,V,G){var w,O;f=!0;let U=e.unref(p),x="";const E=D.split("-");if(E!=null&&E.length){for(const $ of E)if(U[$])x=(w=U[$])==null?void 0:w.join,U=(O=U[$])==null?void 0:O.conditions;else break;if(x===G)U.splice(V+1,0,{keyValue:_e()});else{const $=ee.cloneDeep(U[V]);U[V]={join:G,conditions:[$,{keyValue:_e()}]}}}}});const k=D=>{f=!0,u.value=D},C=e.computed(()=>{var V;const D=[];return(V=e.unref(s))==null||V.forEach(G=>{const{keyName:U="",id:x="",type:E}=G;E==="ecanRangePicker"?D.push({value:`${x}-startTime`,label:`${U||x}-开始时间值`,keyName:`${U||x}-startTime`},{value:`${x}-endTime`,label:`${U||x}-结束时间值`,keyName:`${U||x}-endTime`}):D.push({value:x,label:`${U||x}`,keyName:`${U||x}`})}),D}),A=()=>{var w,O,$;const D=tt(((w=e.unref(r))==null?void 0:w.controlList)||[]),V=((O=e.unref(r)[t.type])==null?void 0:O.slice())||[],G=tt(ee.cloneDeep(V[t.index].conditions));V[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&(($=e.unref(u))!=null&&$.length)&&(V[t.index].truncations=e.unref(u));const U=tt(e.unref(p));for(const z of U)if(z.dataType==="component"&&z.fieldValue){const Y=e.unref(C).find(Q=>Q.value===z.fieldValue);Y&&(z.fieldValue=Y.keyName)}const x=G.filter(z=>!U.find(Y=>Y.componentId===z.componentId)).filter(z=>!D.find(Y=>Y.id===z.componentId)),E=U.filter(z=>!G.find(Y=>Y.componentId===z.componentId));T(x,E),i({[t.type]:V,sqlConditions:sa({...e.unref(r),[t.type]:V},e.unref(s))})};function T(D,V){var U;const G=D.map(x=>({...x,delete:!0})).concat(V.map(x=>({...x,add:!0})));for(const x of G){const E=e.unref(s).find(w=>w.id===x.componentId);if(E){const{type:w,id:O,events:$=[]}=E,z=Zt(w);if(x.add)$.find(Y=>{var Q;return Y.on===z&&Y.target===((Q=e.unref(l))==null?void 0:Q.id)&&Y.emit==="refreshData"})||c({id:O,events:[...$,{on:z,target:(U=e.unref(l))==null?void 0:U.id,emit:"refreshData"}].reverse()});else if(x.delete){const Y=$.findIndex(Q=>{var Z;return Q.on===z&&Q.target===((Z=e.unref(l))==null?void 0:Z.id)&&Q.emit==="refreshData"});Y!==-1&&($.splice(Y,1),c({id:O,events:$}))}}}}const h=()=>{m.value=!0},I=()=>{p.value=[],m.value=!1},F=()=>{f&&A(),f=!1,I()},_=()=>{I()},N=e.inject(Me),S=e.unref(e.inject(ve)),L=(B=window==null?void 0:window.config)==null?void 0:B.pageId,M=e.ref([]);e.provide(Cn,M);const v=async D=>{var V;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:G,indexCode:U}=D,x=await N.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:L,dataSourceId:e.unref(d),indexGuid:G,indexCode:U},{headers:{Authentication:S,operateContext:"ygt"}}),{success:E,data:w=[]}=x.data;E&&((V=w==null?void 0:w.dataViewColumns)!=null&&V.length)&&(M.value=w.dataViewColumns.map(O=>({...O,label:O.title||O.label})))}catch(G){console.error(G)}};return e.watch(()=>t.item,D=>{D&&m.value&&e.unref(y)!=="EDV_DATA_SET"&&v(D)}),o({showModal:h}),{visible:m,onOk:F,onCancel:_,handleTitle:a,conditionList:p,truncationList:u,addCondition:b,onUpdatetruncation:k,activeKey:n,source:y}}}),Hf="",Is={class:"header"},Fs={class:"header"};function $s(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",Is,[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",Fs,[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 Ps=ae(Ds,[["render",$s],["__scopeId","data-v-38f115c6"]]),Ms=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:P.Input,AModal:P.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(Ce),r=e.inject(Se),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}}}),Yf="",vs=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),js={class:"config-name"},Rs=vs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function Us(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",js,[Rs,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 Gs=ae(Ms,[["render",Us],["__scopeId","data-v-de6a1755"]]),zs=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:P.Select,AModal:P.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(Ce),r=e.inject(Se),i=e.inject(je),s=e.inject(Ye),d=e.inject(Wt),l=e.ref(),c=e.computed(()=>{var k;return(k=e.unref(i))==null?void 0:k.filter(C=>C.keyName!=="")});let p=[];const u=k=>{const{sortCpnts:C=[]}=k;p=ee.cloneDeep(C),l.value=ee.cloneDeep(C),n.value=!0},m=()=>{n.value=!1},y=()=>{var h,I;const k=tt(((h=e.unref(a))==null?void 0:h.controlList)||[]),C=p.filter(F=>!e.unref(l).includes(F)).filter(F=>!k.find(_=>_.id===F)),A=e.unref(l).filter(F=>!p.includes(F)).filter(F=>!k.find(_=>_.id===F)),T=C.map(F=>({componentId:F,delete:!0})).concat(A.map(F=>({componentId:F,add:!0})));for(const F of T){const _=e.unref(i).find(N=>N.id===F.componentId);if(_){const{type:N,id:S,events:L=[]}=_,M=Zt(N);if(F.add)L.find(v=>{var B;return v.on===M&&v.target===((B=e.unref(s))==null?void 0:B.id)&&v.emit==="refreshData"})||d({id:S,events:[...L,{on:M,target:(I=e.unref(s))==null?void 0:I.id,emit:"refreshData"}].reverse()});else if(F.delete){const v=L.findIndex(B=>{var D;return B.on===M&&B.target===((D=e.unref(s))==null?void 0:D.id)&&B.emit==="refreshData"});v!==-1&&(L.splice(v,1),d({id:S,events:L}))}}}},g=()=>{var C;y();const k=((C=e.unref(a)[t.type])==null?void 0:C.slice())||[];k[t.index].sortCpnts=l.value,r({[t.type]:k}),m()},f=()=>{m()},b=(k,C)=>{var A;return(A=C==null?void 0:C.keyName)==null?void 0:A.toLowerCase().includes(k==null?void 0:k.toLowerCase())};return o({showModal:u}),{visible:n,onOk:g,onCancel:f,idFilterOption:b,fieldName:l,usedComponentList:c}}}),Wf="",Hs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Ys={class:"sort-by-cpnt"},Ws=Hs(()=>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",Ys,[Ws,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 Ks=ae(zs,[["render",qs],["__scopeId","data-v-08af1ef8"]]),Qs=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:P.Select,AModal:P.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(Ce),r=e.inject(Se),i=e.ref(),s=e.ref([]),d=(m,y)=>{const{dimByCount:g=""}=m;i.value=g,s.value=y.filter(f=>["DIM","BUILT_IN_DIM","FIELD"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var y;const m=((y=e.unref(a)[t.type])==null?void 0:y.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,y)=>{var g;return(g=y==null?void 0:y.label)==null?void 0:g.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),qf="",Xs=t=>(e.pushScopeId("data-v-aa1c298e"),t=t(),e.popScopeId(),t),Js={class:"dim-by-count"},Zs=Xs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function ec(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",Js,[Zs,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 tc=ae(Qs,[["render",ec],["__scopeId","data-v-aa1c298e"]]),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},oc=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:P.Row,ACol:P.Col,ATextarea:P.Textarea,APopover:P.Popover,AInputSearch:P.InputSearch,ATree:P.Tree,ARadioGroup:P.RadioGroup,ARadioButton:P.RadioButton,DoubleRightOutlined:Ll},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(Ce),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 N=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(N==null?void 0:N.filter(S=>{var L;return S.id!==((L=t.item)==null?void 0:L.id)}))||[]:N||[]}),u=e.computed(()=>s.value.filter(N=>!N.randomKey)),m=e.computed({get:()=>t.value||"",set:N=>{o("update:value",N),o("change",N)}}),y=e.ref("1"),g=e.ref(""),f=N=>{const S=document.getElementById("calTextArea");let L=m.value;if(document.selection){const M=document.selection.createRange();M.text=N}else if(typeof S.selectionStart=="number"&&typeof S.selectionEnd=="number"){const M=S.selectionStart,v=S.selectionEnd;let B=M;L=L.substring(0,M)+N+L.substring(v,L.length),B+=N.length,S.selectionStart=S.selectionEnd=B}else L+=N;m.value=L},b=["+","-","*","/","(",")"],k=(N,S)=>{let L="";switch(S){case"name":{L="${"+N+"}";break}case"function":{L=N+"()";break}default:L=N}f(L)},C=[],A=e.ref([]),T=e.ref(!0),h=e.ref([]),I=N=>{var S;for(const L of N)(S=L==null?void 0:L.children)!=null&&S.length?I(L.children):C.push({key:L.key,title:L.title})},F=async()=>{try{const N=await n.get(`${xe}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:S,data:L=[]}=N.data;S&&(L!=null&&L.length)&&(I(L),h.value=L)}catch(N){console.error(N)}},_=N=>{A.value=N,T.value=!1};return e.watch(g,N=>{const S=C.map(L=>L.title.indexOf(N)>-1?Qo(L.key,h.value):null).filter((L,M,v)=>L&&v.indexOf(L)===M);A.value=S,g.value=N,T.value=!0}),e.onMounted(()=>{F()}),{fieldList:p,varList:u,myValue:m,calculMethods:b,funcDescsData:h,searchFuncValue:g,expandedKeys:A,autoExpandParent:T,activeKey:y,selectedElem:k,onExpand:_}}}),Kf="",Qf="",nc={class:"formula-calculation"},ac={class:"field-area"},rc={style:{"text-align":"center",padding:"10px 0"}},lc=["onClick"],ic=["onClick"],sc={class:"cal_right_bottom"},cc={class:"cal_fu"},dc=["onClick"],pc={class:"function-wrap"},uc={class:"wrap-search"},fc={class:"tree-box"},mc={key:0},hc={style:{color:"#f50"}},yc={key:1},gc=["onClick"],bc={class:"cal_a"};function Cc(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"),y=e.resolveComponent("a-popover"),g=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",nc,[e.createVNode(g,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ac,[e.createElementVNode("div",rc,[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,b)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:b,onClick:k=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,lc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,b)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:b,onClick:k=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,ic))),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",sc,[e.createElementVNode("ul",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,b)=>(e.openBlock(),e.createElementBlock("li",{onClick:k=>t.selectedElem(f,"symbol"),key:b},e.toDisplayString(f),9,dc))),128))]),e.createVNode(y,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",pc,[e.createElementVNode("div",uc,[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",fc,[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:b})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",mc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",hc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",yc,e.toDisplayString(f),1)),b?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:k=>t.selectedElem(f,"function")},"插入",8,gc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",bc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const wc=ae(oc,[["render",Cc],["__scopeId","data-v-ba051d9b"]]),kc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:wc,AForm:P.Form,AModal:P.Modal,AFormItem:P.FormItem,AInput:P.Input,ASelect:P.Select,ASelectOption:P.SelectOption,ATextarea:P.Textarea,AInputNumber:P.InputNumber,ATooltip:P.Tooltip,QuestionCircleOutlined:ni},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(je),a=e.inject(Ce),r=e.inject(Se),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const v=["leftAxisList","rightAxisList","queryColumnList","indicators"];let B=[];for(const D of v)Object.prototype.hasOwnProperty.call(e.unref(a),D)&&(B=B.concat(e.unref(a)[D]));return B}),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({}),y=e.ref(),g=e.ref(!1),f=e.ref();e.watch(g,v=>{if(v)if(t.mode==="edit"){const{label:B,calcType:D,formula:V,builtInValueSource:G,builtInFormula:U,builtInCalcWay:x}=t.item;if(f.value={label:B,calcType:D,formula:V,builtInValueSource:G,builtInFormula:U,builtInCalcWay:x},U==="DATE_OFFSET"){const E=x.split("-");(E==null?void 0:E.length)===3&&(m.value={value:E[0],unit:E[1],around:E[2]})}}else t.mode==="add"&&(f.value=ee.cloneDeep(p),m.value=ee.cloneDeep(u));else f.value=ee.cloneDeep(p),m.value=ee.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!v)},{immediate:!0,deep:!0});let b=!1;const k=()=>{b=!0},C=v=>{const B=e.unref(i).find(D=>D.id===v);B&&(f.value.builtInCalcWay=B.keyName),b=!0},A=()=>{var G;const v=((G=e.unref(a)[t.type])==null?void 0:G.slice())||[],{label:B,builtInFormula:D}=e.unref(f)||{},V={};if(D==="DATE_OFFSET"&&(V.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const U=_e();v.push({...e.unref(f),...V,id:U,show:!0,name:B})}else t.mode==="edit"&&(v[t.index]={...v[t.index],...e.unref(f),...V,name:B});r({[t.type]:v})},T=()=>{g.value=!0},h=()=>{g.value=!1},I=async(v,B)=>{if(B==="")return Promise.reject(new Error("请输入指标名"));{const D=e.unref(d).find(V=>V.label===B);return D?D.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},F=e.computed(()=>{let v={label:[{required:!0,validator:I,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(v={...v,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),v}),_=()=>{y.value.validate().then(()=>{b&&A(),b=!1,h()})},N=()=>{y.value.clearValidate(),h()},S=()=>{b=!0,e.unref(f).builtInCalcWay=""},L=e.computed(()=>{let v="";const B=e.unref(f).builtInCalcWay,D=e.unref(f).builtInValueSource;if(!D||!B)return v;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{B==="ASC"?v="【"+D+"】由小到大在所有值中的排名":v="【"+D+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{v=`所有【】的
|
|
60
|
-
`,
|
|
61
|
-
`,B){case"SUM":{V="求和";break}case"AVG":{V="求平均值";break}case"MIN":{V="求最小值";break}case"MAX":{V="求最大值";break}}v=v+"将所有【"+D+"】"+V;break}}return v}),M=(v,B)=>B.keyName.toLowerCase().indexOf(v.toLowerCase())>=0;return o({showModal:T}),{visible:g,onCancel:N,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:_,onChange:k,formRules:F,accessLogic:L,formRef:y,onChangeBuiltInFormula:S,componentList:i,onChangeComponent:C,filterOption:M,offsetConfig:m}}}),Xf="",Jf="",_c={key:0,class:"accesstip"},xc={style:{display:"flex","align-items":"center"}};function Sc(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"),y=e.resolveComponent("question-circle-outlined"),g=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),b=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(b,{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]=k=>t.formState.label=k),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]=k=>t.formState.calcType=k),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]=k=>t.formState.formula=k),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]=k=>t.formState.builtInFormula=k),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]=k=>t.formState.builtInValueSource=k),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(k,C)=>(e.openBlock(),e.createBlock(l,{key:C,value:k.label,disabled:t.mode==="edit"&&t.item.label===k.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.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]=k=>t.formState.builtInCalcWay=k),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",_c," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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]=k=>t.formState.builtInValueSource=k),"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",xc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=k=>t.offsetConfig.value=k),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]=k=>t.offsetConfig.unit=k),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]=k=>t.offsetConfig.around=k),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(g,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(y,{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 Nc=ae(kc,[["render",Sc],["__scopeId","data-v-33575cd9"]]),Ac=e.defineComponent({name:"DataConfigCard",directives:{focus:la},components:{CalculationModal:Nc,FilterModal:Ps,CustomGroupModal:zi,SettingOutlined:pi,DeleteOutlined:qn,CopyOutlined:xl,InfoCircleOutlined:Ml,CustomSortModal:Bi,PlusOutlined:Zl,ACard:P.Card,ACheckbox:P.Checkbox,AInput:P.Input,ADropdown:P.Dropdown,AMenu:P.Menu,ASubMenu:P.SubMenu,AMenuItem:P.MenuItem,AMenuDivider:P.MenuDivider,ASelect:P.Select,APopover:P.Popover,Draggable:Nt,ConfigName:Gs,SortByCpnt:Ks,DimByCount:tc},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(Ce),a=e.inject(Se),r=e.inject(je),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(At),l=e.ref(),c=(j={})=>{var K;const{type:R}=t;if(e.unref(d)==="SQL_VIEW")return!0;e.unref(d)==="EDV_DATA_SET"&&a({edvDataSetId:j.parentId});let W=!1;if(j.scope==="FIELD"&&(W=!0,j.genericType==="0"&&i.includes(R)&&(W=!1)),["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 le=((K=e.unref(n)[R])==null?void 0:K.slice())||[];(le==null?void 0:le.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(te).type==="ecanDataSelect"&&t.type==="indicators"),u=(j="{}")=>{var R,W;try{const K=JSON.parse(j);if(!c(K))return;const le=((R=e.unref(n)[t.type])==null?void 0:R.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(te).type,["list","circulate","scatter"])||e.unref(p))&&le.forEach(ye=>{ye.show=!1}),y(le,K),K.randomKey=_e(),le.push(K);const{type:ne}=t,J={};if(["IDX","BUILT_IN_IDX","FIELD"].includes(K.scope)){const ye=((W=e.unref(n))==null?void 0:W.variableList)||[];let de=sessionStorage.getItem("indicator-variates");if(K.scope==="FIELD"&&!i.includes(ne)&&(de="[]"),de){const ce=JSON.parse(de);if(ce!=null&&ce.length)for(const he of ce)ye.unshift({...he,dataType:"",id:null,variableValue:e.unref(d)==="EDV_DATA_SET"?he.defaultValue:null,dateTypeValue:null,format:he.valueFormat&&he.valueFormat.toUpperCase()||null,variableName:he.name,variableType:he.valueType,label:K.label,randomKey:K.randomKey,keyValue:_e(),disabled:e.unref(d)==="EDV_DATA_SET"})}J.variableList=ye,J.variableConditions=Lt(ye,r)}a({[t.type]:le,...J}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(K){console.error(K)}},m=(j="{}")=>{var R;try{const{cardItem:W,type:K,index:le}=JSON.parse(j);if(!c(W)||K===t.type)return;const ne=((R=e.unref(n)[t.type])==null?void 0:R.slice())||[];y(ne,W),ne.push(W);const J=e.unref(n)[K].slice()||[];J.splice(le,1),a({[t.type]:ne,[K]:J})}catch(W){console.error(W)}};function y(j,R){const W=[];if(j.forEach(K=>{K.label.includes(R.label)&&W.push(K.label.split(R.label)[1])}),W.length>=1){for(let K=1;K<=W.length;K++)if(!W.includes(K+"")){R.label=R.label+K;break}}}const g=(j,R)=>{var le,ne;const W=(le=j.target)==null?void 0:le.checked,K=((ne=e.unref(n)[t.type])==null?void 0:ne.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(te).type,["list","circulate"])||e.unref(p))&&K.forEach(J=>{J.show=!1}),K[R].show=W,a({[t.type]:K})},f=j=>{var W;const R=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];R.splice(j,1),a({[t.type]:R})},b=()=>{sessionStorage.setItem("indicator-card-item","")},k=j=>{const R=sessionStorage.getItem("indicator-list-item"),W=sessionStorage.getItem("indicator-card-item");R?u(R):W&&m(W)},C=j=>{var ye,de;const{newIndex:R,oldIndex:W,from:K,to:le}=j,ne=K.id,J=le.id;if(R>=0&&W>=0){if(ne===J){const ce=((ye=e.unref(n)[t.type])==null?void 0:ye.slice())||[],he=ce.splice(W,1)[0];he&&(ce.splice(R,0,he),a({[t.type]:ce}))}else if(t.type===J){const ce=((de=e.unref(n)[J])==null?void 0:de.slice())||[];if(ce!=null&&ce.length){const he=ce.splice(ce.length-1,1)[0];he&&(ce.splice(R,0,he),a({[t.type]:ce}))}}}},A=(j,R)=>{const W=j.oldIndex,K=R[W];K&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:K,type:t.type,index:W}))},T=e.computed(()=>e.unref(n)[t.type]||[]),h=e.ref([]);let I=!1;e.watch(()=>e.unref(T).length,j=>{h.value=new Array(j).fill(!1)},{flush:"post",immediate:!0});const F=j=>{var W,K,le;const R=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((K=R[j])!=null&&K.randomKey){const ne=((le=e.unref(n))==null?void 0:le.variableList)||[];for(let J=ne.length-1;J>=0;J--)ne[J].randomKey===R[j].randomKey&&ne.splice(J,1);a({variableConditions:Lt(ne,r),variableList:ne})}R.splice(j,1),a({[t.type]:R})},_=j=>{h.value[j]=!0},N=()=>{I=!0},S=(j,R,W)=>{var K,le,ne,J;if(h.value[R]=!1,I){const ye=(K=j.target)==null?void 0:K.value,de=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],ce=de.filter(me=>{var be;return(be=me==null?void 0:me.formula)==null?void 0:be.includes(W)}).map(me=>me.id),he=de.filter(me=>{var be;return(be=me==null?void 0:me.builtInValueSource)==null?void 0:be.includes(W)}).map(me=>me.id);if(ce!=null&&ce.length)for(const me of ce){const be=de.find(ft=>ft.id===me);be.formula=be.formula.replaceAll(W,ye)}if(he!=null&&he.length)for(const me of he){const be=de.find(ft=>ft.id===me);be.builtInValueSource=be.builtInValueSource.replaceAll(W,ye)}if(de[R].label=ye,(ne=de[R])!=null&&ne.randomKey){const me=((J=e.unref(n))==null?void 0:J.variableList)||[],be=me.filter(ft=>ft.randomKey===de[R].randomKey);be!=null&&be.length&&be.forEach(ft=>{ft.label=ye}),a({variableConditions:Lt(me,r),variableList:me})}a({[t.type]:de})}I=!1},L="DEFAULT",M=e.computed(()=>{const j=[],{scope:R}=e.unref(l)||{},W=e.unref(n)[t.type]||[];if(R==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const J=ee.cloneDeep(e.unref(l));delete J.show,delete J.truncations,delete J.conditions,J.hrpIndexComplexid+="_code",J.id+="_code",J.typeGuid+="_code",J.label=J.name+"_编码",J.name=J.typeGuid,J.defaultCode=J.typeGuid,j.push(J)}const{leftAxisList:K=[],rightAxisList:le=[],indicators:ne=[]}=e.unref(n)||{};return[...W,...j,...K,...le,...ne]}),v=(j={},R,W="ASC")=>{var de;const{label:K,name:le,id:ne,defaultCode:J}=j,ye=((de=e.unref(n)[t.type])==null?void 0:de.slice())||[];ne===L?delete ye[R].sort:ye[R].sort={label:K,columnName:le,type:"NORMAL",order:W,defaultCode:J},a({[t.type]:ye})},B=(j={},R="ASC")=>{const K={ASC:"升序",DESC:"降序"}[R],{sort:le}=j,{label:ne,order:J}=le||{};return ne&&J===R?`${K}(${ne})`:K},D=e.ref(),V=e.ref(),G=e.ref(),U=e.ref(),x=(j={},R)=>{var W;D.value=j,V.value=R,(W=e.unref(G))==null||W.showModal(j)},E=j=>"排序"+(j!=null&&j.sort?"(已配置)":""),w=(j={},R)=>{var W;D.value=j,V.value=R,(W=e.unref(U))==null||W.showModal()},O=j=>"自定义分组"+((j==null?void 0:j.customGroup)!=null?"(已配置)":""),$=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],z=[{name:"是",value:1},{name:"否",value:0}],Y=(j,R)=>{var K;const W=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];W[R].aggregate=j,a({[t.type]:W})},Q=(j,R)=>{var K;const W=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];W[R].distinct=j,a({[t.type]:W})},Z=(j,R)=>{var K;const W=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];W[R].dateFormat=j,a({[t.type]:W})},oe=(j="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[j]})`,ie=j=>`是否去重(${{0:"否",1:"是"}[j]||"否"})`,se=(j={})=>{var R;return"过滤"+(j!=null&&j.conditions&&((R=j==null?void 0:j.conditions)==null?void 0:R.length)>0?"(已配置)":"")},Pe=e.ref(),ct=e.ref(),He=e.ref(),pe=e.ref(),Te=(j={},R)=>{D.value=j,V.value=R,e.unref(Pe).showModal()},nt=(j={},R)=>{D.value=j,V.value=R,e.unref(ct).showModal(j)},Ut=(j={},R)=>{D.value=j,V.value=R,e.unref(He).showModal(j)},St=(j={},R)=>{D.value=j,V.value=R,e.unref(pe).showModal(j,e.unref(Ht))},dt=e.ref(),Le=e.ref("add"),Qe=(j,R,W)=>{var K;Le.value=j,j==="edit"&&(D.value=R,V.value=W),(K=e.unref(dt))==null||K.showModal()},Xe=e.inject(Me),Je=e.unref(e.inject(ve)),Be=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{});e.watch(n,()=>{var j;ge(e.unref(te).type,"scatter")&&((j=e.unref(n))!=null&&j.indicators)&&(Be.value=e.unref(n).indicators.map(R=>({label:R.label,value:R.label})))}),e.watch(()=>n.value.classificationList,()=>{at()});const Ze=e.ref(""),at=async()=>{if(!ge(e.unref(te).type,"select"))return;const{classificationList:j=[]}=e.unref(n),R=j.find(ne=>ne.show);if(R!=null&&R.parentId){if(e.unref(Ze)===R.parentId)return;Ze.value=R.parentId}else{e.unref(n).selectFieldOptions=[],Be.value=[],Ze.value="";return}const W=await Xe.get(`${xe}/dataset/`+R.parentId,{headers:{Authentication:Je,operateContext:"ygt"}}),{success:K,data:le=[]}=W.data;if(K){const ne=le.column.map(J=>({label:J.columnName,value:J.columnName}));e.unref(n).selectFieldOptions=ne,Be.value=ne}},ut=async()=>{const{source:j}=e.unref(n);if(!ge(e.unref(te).type,"scatter"))try{if(j==="EDV_DATA_SET")await at();else{const R=await Xe.post(`${xe}/diagram/dimFields`,{},{headers:{Authentication:Je,operateContext:"ygt"}}),{success:W,data:K=[]}=R.data;W&&(e.unref(n).selectFieldOptions=K||[],Be.value=K)}}catch(R){console.error(R)}},go=(j,R)=>{const W=e.unref(n)[t.type]||{};W[R]=j,a({[t.type]:W})},Gt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],zt=e.ref({}),Ht=e.ref([]),H=async(j,R)=>{var K;const{name:W}=R;if(!Gt.includes(t.type)&&j&&yt(R,"indexCode")){const le=await Xe.post(`${xe}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:R.id,indexCode:R.indexCode,pageId:(K=window==null?void 0:window.config)==null?void 0:K.pageId},{headers:{Authentication:Je,operateContext:"ygt"}}),{success:ne,data:J}=le.data;ne&&J&&(Ht.value=(J==null?void 0:J.dataViewColumns)||[],zt.value[W]={name:J.name,code:J.indexCode})}},q=j=>{l.value=j},X=j=>{const R=document.createElement("input");document.body.appendChild(R),R.setAttribute("value",j),R.select(),document.execCommand("copy"),document.body.removeChild(R),P.message.success("复制成功")},te=e.inject(Ye),re=e.computed(()=>t.type==="indicators"&&e.unref(te).type==="ecanTable"),fe=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(te).type==="ecanDataSelect"?Be.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:g,onDropEnd:f,onDragItemEnd:b,onDragItemAdd:k,onDragItemSort:C,onDragItemStart:A,cardItemList:T,onDelete:F,onEdit:_,onCommitLabelChange:S,sortList:M,onSort:v,handleSortTitle:B,showCustomSortModal:x,customSortModalRef:G,currentItem:D,currentIndex:V,handleCustomSortTitle:E,handleCustomGroupTitle:O,customGroupModalRef:U,showCustomGroupModal:w,editLabelList:h,onLabelChange:N,aggregateList:$,distinctList:z,onAggregateChange:Y,onDistinctChange:Q,onDateFormatChange:Z,handleAggregateTitle:oe,handleDistinctTitle:ie,onShowCalculationModal:Qe,handleFilterTitle:se,filterModalRef:Pe,configNameRef:ct,sortByCpntRef:He,dimByCountRef:pe,showFilterModal:Te,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:Be,fieldData:pt,onFieldChange:go,onVisibleChange:H,onClickSetting:q,copyDataViewName:X,dataViewMap:zt,isShowConfigName:re,showConfigNameModal:nt,dimensionType:Gt,isShowSortByCpnt:fe,showSortByCpntModal:Ut,dataSelectIndicators:p,showDimByCountModal:St,selectedComponent:te}}}),Zf="",em="",rt=t=>(e.pushScopeId("data-v-ff7129f6"),t=t(),e.popScopeId(),t),Tc={class:"title"},Ec={class:"title-text"},Vc={class:"field-wrap"},Lc={class:"field-item"},Bc=rt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Oc={class:"field-item"},Dc=rt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Ic={key:0,class:"field-item"},Fc=rt(()=>e.createElementVNode("div",{class:"item-label",style:{width:"20px"}},null,-1)),$c={class:"title"},Pc={class:"title-text"},Mc=rt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),vc=rt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),jc={class:"card-item-wrap"},Rc={class:"card-item-inner"},Uc=["onClick"],Gc=["onClick"],zc=["onClick"],Hc={style:{display:"flex","align-items":"center"}},Yc=["title"],Wc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),qc={style:{display:"flex","align-items":"center"}},Kc=["title"],Qc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Xc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-checkbox"),l=e.resolveComponent("a-card"),c=e.resolveComponent("info-circle-outlined"),p=e.resolveComponent("a-popover"),u=e.resolveComponent("plus-outlined"),m=e.resolveComponent("a-input"),y=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-menu-divider"),b=e.resolveComponent("a-sub-menu"),k=e.resolveComponent("copy-outlined"),C=e.resolveComponent("a-menu"),A=e.resolveComponent("a-dropdown"),T=e.resolveComponent("delete-outlined"),h=e.resolveComponent("draggable"),I=e.resolveComponent("custom-sort-modal"),F=e.resolveComponent("custom-group-modal"),_=e.resolveComponent("filter-modal"),N=e.resolveComponent("config-name"),S=e.resolveComponent("sort-by-cpnt"),L=e.resolveComponent("dim-by-count"),M=e.resolveComponent("calculation-modal"),v=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(l,{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",Tc,[e.createElementVNode("div",Ec,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Vc,[e.createElementVNode("div",Lc,[Bc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=B=>t.onFieldChange(B,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Oc,[Dc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=B=>t.onFieldChange(B,"valueField"))},null,8,["value","options"])]),t.selectedComponent.type==="ecanSelect"?(e.openBlock(),e.createElementBlock("div",Ic,[Fc,e.createVNode(d,{checked:t.fieldData.hasAllOption,"onUpdate:checked":o[2]||(o[2]=B=>t.fieldData.hasAllOption=B)},{default:e.withCtx(()=>[e.createTextVNode(" 显示【全部】选项 ")]),_:1},8,["checked"])])):e.createCommentVNode("",!0)])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(l,{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",$c,[e.createElementVNode("div",Pc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(p,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Mc]),default:e.withCtx(()=>[e.createVNode(c,{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[3]||(o[3]=e.withModifiers(B=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(u,{class:"add-calculation-icon"}),vc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(h,{modelValue:t.cardItemList,"onUpdate:modelValue":o[4]||(o[4]=B=>t.cardItemList=B),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[5]||(o[5]=B=>t.onDragItemStart(B,t.cardItemList))},{item:e.withCtx(({element:B,index:D})=>[e.createElementVNode("div",jc,[e.createVNode(d,{class:"card-item",checked:B.show,onChange:V=>t.onCheckboxChange(V,D)},{default:e.withCtx(()=>[e.createElementVNode("div",Rc,[!t.editLabelList[D]&&B.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(V=>t.onEdit(D),["prevent","stop"])},e.toDisplayString(B.label),9,Uc)):e.createCommentVNode("",!0),!t.editLabelList[D]&&!B.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(V=>t.onEdit(D),["prevent","stop"])}," 请点击填入名字 ",8,Gc)):e.createCommentVNode("",!0),t.editLabelList[D]?e.withDirectives((e.openBlock(),e.createBlock(m,{key:2,"default-value":B.label,size:"small",onBlur:V=>t.onCommitLabelChange(V,D,B.label),onPressEnter:V=>t.onCommitLabelChange(V,D,B.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[v]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(B.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(V=>t.onShowCalculationModal("edit",B,D),["prevent","stop"])}," fx ",8,zc)):e.createCommentVNode("",!0),e.createVNode(A,{trigger:["click"],onVisibleChange:V=>t.onVisibleChange(V,B)},{overlay:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(g,{onClick:V=>t.showCustomSortModal(B,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(B)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{onClick:V=>t.showCustomGroupModal(B,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(B)),1)]),_:2},1032,["onClick"]),e.createVNode(f),B.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(b,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:G=>t.onDateFormatChange(V.value,D)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(B.dateFormat===V.value||!B.dateFormat&&V.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(V.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:V=>t.showFilterModal(B,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(B)),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(b,{title:t.handleAggregateTitle(B.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:G=>t.onAggregateChange(V.value,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.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:V=>t.showConfigNameModal(B,D)},{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:V=>t.showSortByCpntModal(B,D)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),B.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:V=>t.showDimByCountModal(B,D)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(b,{title:t.handleDistinctTitle(B.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:G=>t.onDistinctChange(V.value,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.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[B.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:V=>t.copyDataViewName(t.dataViewMap[B.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Hc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[B.name].name},[Wc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[B.name].name),1)],8,Yc),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[B.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:V=>t.copyDataViewName(t.dataViewMap[B.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",qc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[B.name].code},[Qc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[B.name].code),1)],8,Kc),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(y,{class:"setting-icon",onClick:V=>t.onClickSetting(B)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(T,{class:"delete-icon",onClick:e.withModifiers(V=>t.onDelete(D),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,sortList:t.sortList,ref:"customSortModalRef"},null,8,["item","index","type","sortList"]),e.createVNode(F,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(_,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(N,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(S,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(L,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(M,{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 Jc=ae(Ac,[["render",Xc],["__scopeId","data-v-ff7129f6"]]),Zc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},ed=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Jc},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 b,k;const l=ee.cloneDeep((b=e.unref(t))==null?void 0:b.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"],scatter:["classificationList","indicators","formFields"],pivotTable:["queryColumnList","indicators"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const C=u.length;m=((k=m.slice(C,C+1))==null?void 0:k.toLowerCase())+m.slice(C+1)}const y=p[m],g=Zc,f=(y==null?void 0:y.length)||0;for(let C=0;C<f;C++){const A=y[C];if(!A)break;r.push({...g[A],type:A})}for(const C of c)s(l,C)&&!y.find(A=>A===C)&&(l[C]=[]);i(l)})(),{cardsMap:a,cards:r}}}),tm="",om="",td={class:"data-group"};function od(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",td,[(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 nd=ae(ed,[["render",od],["__scopeId","data-v-8b6475b7"]]),ad=[{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"]}],rd={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"}},ld=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:P.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function id(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 sd=ae(ld,[["render",id]]),cd=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:P.InputNumber,ASelect:P.Select,ASelectOption:P.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 dd(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 ua=ae(cd,[["render",dd]]),pd=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:P.RadioGroup,ARadioButton:P.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function ud(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 fd=ae(pd,[["render",ud]]),md=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:P.Select,ASelectOption:P.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function hd(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 yd=ae(md,[["render",hd]]),gd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:P.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function bd(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 Cd=ae(gd,[["render",bd]]);var Ne="top",De="bottom",Ie="right",Ae="left",Xo="auto",Bt=[Ne,De,Ie,Ae],gt="start",Ot="end",wd="clippingParents",fa="viewport",Dt="popper",kd="reference",ma=Bt.reduce(function(t,o){return t.concat([o+"-"+gt,o+"-"+Ot])},[]),ha=[].concat(Bt,[Xo]).reduce(function(t,o){return t.concat([o,o+"-"+gt,o+"-"+Ot])},[]),_d="beforeRead",xd="read",Sd="afterRead",Nd="beforeMain",Ad="main",Td="afterMain",Ed="beforeWrite",Vd="write",Ld="afterWrite",Bd=[_d,xd,Sd,Nd,Ad,Td,Ed,Vd,Ld];function Ue(t){return t?(t.nodeName||"").toLowerCase():null}function Ve(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function lt(t){var o=Ve(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Ve(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Jo(t){if(typeof ShadowRoot>"u")return!1;var o=Ve(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Od(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)||!Ue(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 Dd(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)||!Ue(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Id={name:"applyStyles",enabled:!0,phase:"write",fn:Od,effect:Dd,requires:["computeStyles"]};function Ge(t){return t.split("-")[0]}var it=Math.max,eo=Math.min,bt=Math.round;function Zo(){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 ya(){return!/^((?!chrome|android).)*safari/i.test(Zo())}function Ct(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&&bt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&bt(a.height)/t.offsetHeight||1);var s=lt(t)?Ve(t):window,d=s.visualViewport,l=!ya()&&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 en(t){var o=Ct(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 ga(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Jo(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 Ve(t).getComputedStyle(t)}function Fd(t){return["table","td","th"].indexOf(Ue(t))>=0}function ot(t){return((lt(t)?t.ownerDocument:t.document)||window.document).documentElement}function to(t){return Ue(t)==="html"?t:t.assignedSlot||t.parentNode||(Jo(t)?t.host:null)||ot(t)}function ba(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function $d(t){var o=/firefox/i.test(Zo()),n=/Trident/i.test(Zo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=to(t);for(Jo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Ue(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 It(t){for(var o=Ve(t),n=ba(t);n&&Fd(n)&&qe(n).position==="static";)n=ba(n);return n&&(Ue(n)==="html"||Ue(n)==="body"&&qe(n).position==="static")?o:n||$d(t)||o}function tn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ft(t,o,n){return it(t,eo(o,n))}function Pd(t,o,n){var a=Ft(t,o,n);return a>n?n:a}function Ca(){return{top:0,right:0,bottom:0,left:0}}function wa(t){return Object.assign({},Ca(),t)}function ka(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Md=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,wa(typeof o!="number"?o:ka(o,Bt))};function vd(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ge(n.placement),l=tn(d),c=[Ae,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Md(r.padding,n),m=en(i),y=l==="y"?Ne:Ae,g=l==="y"?De:Ie,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],b=s[l]-n.rects.reference[l],k=It(i),C=k?l==="y"?k.clientHeight||0:k.clientWidth||0:0,A=f/2-b/2,T=u[y],h=C-m[p]-u[g],I=C/2-m[p]/2+A,F=Ft(T,I,h),_=l;n.modifiersData[a]=(o={},o[_]=F,o.centerOffset=F-I,o)}}function jd(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)||ga(o.elements.popper,r)&&(o.elements.arrow=r))}const Rd={name:"arrow",enabled:!0,phase:"main",fn:vd,effect:jd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wt(t){return t.split("-")[1]}var Ud={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:bt(n*r)/r||0,y:bt(a*r)/r||0}}function _a(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,y=m===void 0?0:m,g=s.y,f=g===void 0?0:g,b=typeof p=="function"?p({x:y,y:f}):{x:y,y:f};y=b.x,f=b.y;var k=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),A=Ae,T=Ne,h=window;if(c){var I=It(n),F="clientHeight",_="clientWidth";if(I===Ve(n)&&(I=ot(n),qe(I).position!=="static"&&d==="absolute"&&(F="scrollHeight",_="scrollWidth")),I=I,r===Ne||(r===Ae||r===Ie)&&i===Ot){T=De;var N=u&&I===h&&h.visualViewport?h.visualViewport.height:I[F];f-=N-a.height,f*=l?1:-1}if(r===Ae||(r===Ne||r===De)&&i===Ot){A=Ie;var S=u&&I===h&&h.visualViewport?h.visualViewport.width:I[_];y-=S-a.width,y*=l?1:-1}}var L=Object.assign({position:d},c&&Ud),M=p===!0?Gd({x:y,y:f},Ve(n)):{x:y,y:f};if(y=M.x,f=M.y,l){var v;return Object.assign({},L,(v={},v[T]=C?"0":"",v[A]=k?"0":"",v.transform=(h.devicePixelRatio||1)<=1?"translate("+y+"px, "+f+"px)":"translate3d("+y+"px, "+f+"px, 0)",v))}return Object.assign({},L,(o={},o[T]=C?f+"px":"",o[A]=k?y+"px":"",o.transform="",o))}function zd(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:Ge(o.placement),variation:wt(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,_a(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,_a(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 Hd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zd,data:{}};var oo={passive:!0};function Yd(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=Ve(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,oo)}),d&&l.addEventListener("resize",n.update,oo),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,oo)}),d&&l.removeEventListener("resize",n.update,oo)}}const Wd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yd,data:{}};var qd={left:"right",right:"left",bottom:"top",top:"bottom"};function no(t){return t.replace(/left|right|bottom|top/g,function(o){return qd[o]})}var Kd={start:"end",end:"start"};function xa(t){return t.replace(/start|end/g,function(o){return Kd[o]})}function on(t){var o=Ve(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function nn(t){return Ct(ot(t)).left+on(t).scrollLeft}function Qd(t,o){var n=Ve(t),a=ot(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=ya();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+nn(t),y:l}}function Xd(t){var o,n=ot(t),a=on(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=it(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=it(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+nn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=it(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function an(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Sa(t){return["html","body","#document"].indexOf(Ue(t))>=0?t.ownerDocument.body:Fe(t)&&an(t)?t:Sa(to(t))}function $t(t,o){var n;o===void 0&&(o=[]);var a=Sa(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Ve(a),s=r?[i].concat(i.visualViewport||[],an(a)?a:[]):a,d=o.concat(s);return r?d:d.concat($t(to(s)))}function rn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jd(t,o){var n=Ct(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 Na(t,o,n){return o===fa?rn(Qd(t,n)):lt(o)?Jd(o,n):rn(Xd(ot(t)))}function Zd(t){var o=$t(to(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?It(t):t;return lt(a)?o.filter(function(r){return lt(r)&&ga(r,a)&&Ue(r)!=="body"}):[]}function ep(t,o,n,a){var r=o==="clippingParents"?Zd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=Na(t,c,a);return l.top=it(p.top,l.top),l.right=eo(p.right,l.right),l.bottom=eo(p.bottom,l.bottom),l.left=it(p.left,l.left),l},Na(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 Aa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ge(a):null,i=a?wt(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Ne:l={x:s,y:o.y-n.height};break;case De:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case Ae:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?tn(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case gt: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 Pt(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?wd:d,c=n.rootBoundary,p=c===void 0?fa:c,u=n.elementContext,m=u===void 0?Dt:u,y=n.altBoundary,g=y===void 0?!1:y,f=n.padding,b=f===void 0?0:f,k=wa(typeof b!="number"?b:ka(b,Bt)),C=m===Dt?kd:Dt,A=t.rects.popper,T=t.elements[g?C:m],h=ep(lt(T)?T:T.contextElement||ot(t.elements.popper),l,p,s),I=Ct(t.elements.reference),F=Aa({reference:I,element:A,strategy:"absolute",placement:r}),_=rn(Object.assign({},A,F)),N=m===Dt?_:I,S={top:h.top-N.top+k.top,bottom:N.bottom-h.bottom+k.bottom,left:h.left-N.left+k.left,right:N.right-h.right+k.right},L=t.modifiersData.offset;if(m===Dt&&L){var M=L[r];Object.keys(S).forEach(function(v){var B=[Ie,De].indexOf(v)>=0?1:-1,D=[Ne,De].indexOf(v)>=0?"y":"x";S[v]+=M[D]*B})}return S}function tp(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?ha:l,p=wt(a),u=p?d?ma:ma.filter(function(g){return wt(g)===p}):Bt,m=u.filter(function(g){return c.indexOf(g)>=0});m.length===0&&(m=u);var y=m.reduce(function(g,f){return g[f]=Pt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ge(f)],g},{});return Object.keys(y).sort(function(g,f){return y[g]-y[f]})}function op(t){if(Ge(t)===Xo)return[];var o=no(t);return[xa(t),o,xa(o)]}function np(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,y=n.flipVariations,g=y===void 0?!0:y,f=n.allowedAutoPlacements,b=o.options.placement,k=Ge(b),C=k===b,A=l||(C||!g?[no(b)]:op(b)),T=[b].concat(A).reduce(function(z,Y){return z.concat(Ge(Y)===Xo?tp(o,{placement:Y,boundary:p,rootBoundary:u,padding:c,flipVariations:g,allowedAutoPlacements:f}):Y)},[]),h=o.rects.reference,I=o.rects.popper,F=new Map,_=!0,N=T[0],S=0;S<T.length;S++){var L=T[S],M=Ge(L),v=wt(L)===gt,B=[Ne,De].indexOf(M)>=0,D=B?"width":"height",V=Pt(o,{placement:L,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),G=B?v?Ie:Ae:v?De:Ne;h[D]>I[D]&&(G=no(G));var U=no(G),x=[];if(i&&x.push(V[M]<=0),d&&x.push(V[G]<=0,V[U]<=0),x.every(function(z){return z})){N=L,_=!1;break}F.set(L,x)}if(_)for(var E=g?3:1,w=function(Y){var Q=T.find(function(Z){var oe=F.get(Z);if(oe)return oe.slice(0,Y).every(function(ie){return ie})});if(Q)return N=Q,"break"},O=E;O>0;O--){var $=w(O);if($==="break")break}o.placement!==N&&(o.modifiersData[a]._skip=!0,o.placement=N,o.reset=!0)}}const ap={name:"flip",enabled:!0,phase:"main",fn:np,requiresIfExists:["offset"],data:{_skip:!1}};function Ta(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 Ea(t){return[Ne,Ie,De,Ae].some(function(o){return t[o]>=0})}function rp(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=Pt(o,{elementContext:"reference"}),d=Pt(o,{altBoundary:!0}),l=Ta(s,a),c=Ta(d,r,i),p=Ea(l),u=Ea(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 lp={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rp};function ip(t,o,n){var a=Ge(t),r=[Ae,Ne].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,[Ae,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function sp(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ha.reduce(function(p,u){return p[u]=ip(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 cp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sp};function dp(t){var o=t.state,n=t.name;o.modifiersData[n]=Aa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const pp={name:"popperOffsets",enabled:!0,phase:"read",fn:dp,data:{}};function up(t){return t==="x"?"y":"x"}function fp(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,y=m===void 0?!0:m,g=n.tetherOffset,f=g===void 0?0:g,b=Pt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),k=Ge(o.placement),C=wt(o.placement),A=!C,T=tn(k),h=up(T),I=o.modifiersData.popperOffsets,F=o.rects.reference,_=o.rects.popper,N=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,S=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),L=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,M={x:0,y:0};if(I){if(i){var v,B=T==="y"?Ne:Ae,D=T==="y"?De:Ie,V=T==="y"?"height":"width",G=I[T],U=G+b[B],x=G-b[D],E=y?-_[V]/2:0,w=C===gt?F[V]:_[V],O=C===gt?-_[V]:-F[V],$=o.elements.arrow,z=y&&$?en($):{width:0,height:0},Y=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Ca(),Q=Y[B],Z=Y[D],oe=Ft(0,F[V],z[V]),ie=A?F[V]/2-E-oe-Q-S.mainAxis:w-oe-Q-S.mainAxis,se=A?-F[V]/2+E+oe+Z+S.mainAxis:O+oe+Z+S.mainAxis,Pe=o.elements.arrow&&It(o.elements.arrow),ct=Pe?T==="y"?Pe.clientTop||0:Pe.clientLeft||0:0,He=(v=L==null?void 0:L[T])!=null?v:0,pe=G+ie-He-ct,Te=G+se-He,nt=Ft(y?eo(U,pe):U,G,y?it(x,Te):x);I[T]=nt,M[T]=nt-G}if(d){var Ut,St=T==="x"?Ne:Ae,dt=T==="x"?De:Ie,Le=I[h],Qe=h==="y"?"height":"width",Xe=Le+b[St],Je=Le-b[dt],Be=[Ne,Ae].indexOf(k)!==-1,pt=(Ut=L==null?void 0:L[h])!=null?Ut:0,Ze=Be?Xe:Le-F[Qe]-_[Qe]-pt+S.altAxis,at=Be?Le+F[Qe]+_[Qe]-pt-S.altAxis:Je,ut=y&&Be?Pd(Ze,Le,at):Ft(y?Ze:Xe,Le,y?at:Je);I[h]=ut,M[h]=ut-Le}o.modifiersData[a]=M}}const mp={name:"preventOverflow",enabled:!0,phase:"main",fn:fp,requiresIfExists:["offset"]};function hp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yp(t){return t===Ve(t)||!Fe(t)?on(t):hp(t)}function gp(t){var o=t.getBoundingClientRect(),n=bt(o.width)/t.offsetWidth||1,a=bt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function bp(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&gp(o),i=ot(o),s=Ct(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Ue(o)!=="body"||an(i))&&(d=yp(o)),Fe(o)?(l=Ct(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=nn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function Cp(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 wp(t){var o=Cp(t);return Bd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function kp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function _p(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 Va={placement:"bottom",modifiers:[],strategy:"absolute"};function La(){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 xp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Va:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Va,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,y={state:p,setOptions:function(k){var C=typeof k=="function"?k(p.options):k;f(),p.options=Object.assign({},i,p.options,C),p.scrollParents={reference:lt(d)?$t(d):d.contextElement?$t(d.contextElement):[],popper:$t(l)};var A=wp(_p([].concat(a,p.options.modifiers)));return p.orderedModifiers=A.filter(function(T){return T.enabled}),g(),y.update()},forceUpdate:function(){if(!m){var k=p.elements,C=k.reference,A=k.popper;if(La(C,A)){p.rects={reference:bp(C,It(A),p.options.strategy==="fixed"),popper:en(A)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(S){return p.modifiersData[S.name]=Object.assign({},S.data)});for(var T=0;T<p.orderedModifiers.length;T++){if(p.reset===!0){p.reset=!1,T=-1;continue}var h=p.orderedModifiers[T],I=h.fn,F=h.options,_=F===void 0?{}:F,N=h.name;typeof I=="function"&&(p=I({state:p,options:_,name:N,instance:y})||p)}}}},update:kp(function(){return new Promise(function(b){y.forceUpdate(),b(p)})}),destroy:function(){f(),m=!0}};if(!La(d,l))return y;y.setOptions(c).then(function(b){!m&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){p.orderedModifiers.forEach(function(b){var k=b.name,C=b.options,A=C===void 0?{}:C,T=b.effect;if(typeof T=="function"){var h=T({state:p,name:k,instance:y,options:A}),I=function(){};u.push(h||I)}})}function f(){u.forEach(function(b){return b()}),u=[]}return y}}var Sp=[Wd,pp,Hd,Id,cp,ap,mp,Rd,lp],Np=xp({defaultModifiers:Sp});function ln(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 Ba(t,o){if(t){if(typeof t=="string")return ln(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)?ln(t,o):void 0}}function Ap(t){return function(o){if(Array.isArray(o))return ln(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Ba(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 kt(t){return kt=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},kt(t)}function Oa(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 Da(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){Oa(i,a,r,s,d,"next",l)}function d(l){Oa(i,a,r,s,d,"throw",l)}s(void 0)})}}var Ia={exports:{}},Fa={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})(Fa),function(t){var o=Fa.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(x,E,w){x[E]=w.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(x,E,w){return Object.defineProperty(x,E,{value:w,enumerable:!0,configurable:!0,writable:!0}),x[E]}try{m({},"")}catch{m=function(E,w,O){return E[w]=O}}function y(x,E,w,O){var $=E&&E.prototype instanceof T?E:T,z=Object.create($.prototype),Y=new G(O||[]);return d(z,"_invoke",{value:v(x,w,Y)}),z}function g(x,E,w){try{return{type:"normal",arg:x.call(E,w)}}catch(O){return{type:"throw",arg:O}}}r.wrap=y;var f="suspendedStart",b="suspendedYield",k="executing",C="completed",A={};function T(){}function h(){}function I(){}var F={};m(F,c,function(){return this});var _=Object.getPrototypeOf,N=_&&_(_(U([])));N&&N!==i&&s.call(N,c)&&(F=N);var S=I.prototype=T.prototype=Object.create(F);function L(x){["next","throw","return"].forEach(function(E){m(x,E,function(w){return this._invoke(E,w)})})}function M(x,E){function w($,z,Y,Q){var Z=g(x[$],x,z);if(Z.type!=="throw"){var oe=Z.arg,ie=oe.value;return ie&&o(ie)=="object"&&s.call(ie,"__await")?E.resolve(ie.__await).then(function(se){w("next",se,Y,Q)},function(se){w("throw",se,Y,Q)}):E.resolve(ie).then(function(se){oe.value=se,Y(oe)},function(se){return w("throw",se,Y,Q)})}Q(Z.arg)}var O;d(this,"_invoke",{value:function($,z){function Y(){return new E(function(Q,Z){w($,z,Q,Z)})}return O=O?O.then(Y,Y):Y()}})}function v(x,E,w){var O=f;return function($,z){if(O===k)throw new Error("Generator is already running");if(O===C){if($==="throw")throw z;return{value:a,done:!0}}for(w.method=$,w.arg=z;;){var Y=w.delegate;if(Y){var Q=B(Y,w);if(Q){if(Q===A)continue;return Q}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===f)throw O=C,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=k;var Z=g(x,E,w);if(Z.type==="normal"){if(O=w.done?C:b,Z.arg===A)continue;return{value:Z.arg,done:w.done}}Z.type==="throw"&&(O=C,w.method="throw",w.arg=Z.arg)}}}function B(x,E){var w=E.method,O=x.iterator[w];if(O===a)return E.delegate=null,w==="throw"&&x.iterator.return&&(E.method="return",E.arg=a,B(x,E),E.method==="throw")||w!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+w+"' method")),A;var $=g(O,x.iterator,E.arg);if($.type==="throw")return E.method="throw",E.arg=$.arg,E.delegate=null,A;var z=$.arg;return z?z.done?(E[x.resultName]=z.value,E.next=x.nextLoc,E.method!=="return"&&(E.method="next",E.arg=a),E.delegate=null,A):z:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,A)}function D(x){var E={tryLoc:x[0]};1 in x&&(E.catchLoc=x[1]),2 in x&&(E.finallyLoc=x[2],E.afterLoc=x[3]),this.tryEntries.push(E)}function V(x){var E=x.completion||{};E.type="normal",delete E.arg,x.completion=E}function G(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(D,this),this.reset(!0)}function U(x){if(x||x===""){var E=x[c];if(E)return E.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var w=-1,O=function $(){for(;++w<x.length;)if(s.call(x,w))return $.value=x[w],$.done=!1,$;return $.value=a,$.done=!0,$};return O.next=O}}throw new TypeError(o(x)+" is not iterable")}return h.prototype=I,d(S,"constructor",{value:I,configurable:!0}),d(I,"constructor",{value:h,configurable:!0}),h.displayName=m(I,u,"GeneratorFunction"),r.isGeneratorFunction=function(x){var E=typeof x=="function"&&x.constructor;return!!E&&(E===h||(E.displayName||E.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,I):(x.__proto__=I,m(x,u,"GeneratorFunction")),x.prototype=Object.create(S),x},r.awrap=function(x){return{__await:x}},L(M.prototype),m(M.prototype,p,function(){return this}),r.AsyncIterator=M,r.async=function(x,E,w,O,$){$===void 0&&($=Promise);var z=new M(y(x,E,w,O),$);return r.isGeneratorFunction(E)?z:z.next().then(function(Y){return Y.done?Y.value:z.next()})},L(S),m(S,u,"Generator"),m(S,c,function(){return this}),m(S,"toString",function(){return"[object Generator]"}),r.keys=function(x){var E=Object(x),w=[];for(var O in E)w.push(O);return w.reverse(),function $(){for(;w.length;){var z=w.pop();if(z in E)return $.value=z,$.done=!1,$}return $.done=!0,$}},r.values=U,G.prototype={constructor:G,reset:function(x){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(V),!x)for(var E in this)E.charAt(0)==="t"&&s.call(this,E)&&!isNaN(+E.slice(1))&&(this[E]=a)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var E=this;function w(Z,oe){return z.type="throw",z.arg=x,E.next=Z,oe&&(E.method="next",E.arg=a),!!oe}for(var O=this.tryEntries.length-1;O>=0;--O){var $=this.tryEntries[O],z=$.completion;if($.tryLoc==="root")return w("end");if($.tryLoc<=this.prev){var Y=s.call($,"catchLoc"),Q=s.call($,"finallyLoc");if(Y&&Q){if(this.prev<$.catchLoc)return w($.catchLoc,!0);if(this.prev<$.finallyLoc)return w($.finallyLoc)}else if(Y){if(this.prev<$.catchLoc)return w($.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return w($.finallyLoc)}}}},abrupt:function(x,E){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc<=this.prev&&s.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var $=O;break}}$&&(x==="break"||x==="continue")&&$.tryLoc<=E&&E<=$.finallyLoc&&($=null);var z=$?$.completion:{};return z.type=x,z.arg=E,$?(this.method="next",this.next=$.finallyLoc,A):this.complete(z)},complete:function(x,E){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&E&&(this.next=E),A},finish:function(x){for(var E=this.tryEntries.length-1;E>=0;--E){var w=this.tryEntries[E];if(w.finallyLoc===x)return this.complete(w.completion,w.afterLoc),V(w),A}},catch:function(x){for(var E=this.tryEntries.length-1;E>=0;--E){var w=this.tryEntries[E];if(w.tryLoc===x){var O=w.completion;if(O.type==="throw"){var $=O.arg;V(w)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(x,E,w){return this.delegate={iterator:U(x),resultName:E,nextLoc:w},this.method==="next"&&(this.arg=a),A}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ia);var ao=Ia.exports(),ro=ao;try{regeneratorRuntime=ao}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ao:Function("r","regeneratorRuntime = r")(ao)}function Tp(t){var o=function(n,a){if(kt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(kt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return kt(o)==="symbol"?o:String(o)}function sn(t,o,n){return(o=Tp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var lo=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,y=u-d;m<0&&(m=0),y<0&&(y=0),m>t.size&&(m=t.size),y>t.size&&(y=t.size);var g=m/t.size*100,f=100-y/t.size*100;n("change",g,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),$a=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Ep=$a(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Vp=$a(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}"),lo.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"]))},[Ep,Vp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},lo.__scopeId="data-v-24517fec",lo.__file="src/picker/Saturation.vue";var io=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)})}}}}),Lp={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}"),io.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",Lp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},io.__scopeId="data-v-78b9f4f0",io.__file="src/picker/Hue.vue";var so=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)})}}}}),Bp={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}"),so.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",Bp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},so.__scopeId="data-v-24dc9656",so.__file="src/picker/Alpha.vue";var co=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")}}}}),Op={class:"input"},Dp={class:"label"},Ip=[".value"];function Mt(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)||Ba(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 Pa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function $e(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Pa(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}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}"),co.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Op,[e.createElementVNode("span",Dp,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,Ip)])},co.__scopeId="data-v-d52a4d02",co.__file="src/picker/InputValue.vue";var Ma=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},va={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},po=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(va[o]||o).concat(va[n]||n)},ja=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(po(o)).concat(po(n)).concat(po(a))},_t=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)},vt=function(t,o,n){t=6*_t(t,360),o=_t(o,100),n=_t(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)}},Ra=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=Ma(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=vt(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(ja(vt(a,r,i))).concat(po(255*s))}else switch(o){case"hsl":var m=Ma(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 y=vt(a,r,i),g=y.r,f=y.g,b=y.b;return"rgb(".concat(g,", ").concat(f,", ").concat(b,")");default:return ja(vt(a,r,i))}},uo=function(t){var o=t.r,n=t.g,a=t.b;o=_t(o,255),n=_t(n,255),a=_t(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}},Ua=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)}},Ga=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]}},cn=function(t,o,n){if(typeof t=="string"&&t!==""){var a=dn(t,pn(t),n),r=Wa(a);return Ra(r,o,n)}return""},za=function(t){var o=Mt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ha=function(t){var o=Mt(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}},Ya=function(t){var o=Mt(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)}},dn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=za(t),a=n.r,r=n.g,i=n.b,s=n.a;return $e($e({},uo({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Ya(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ha(t),c=l.h,p=l.s,u=l.l,m=l.a;return $e($e({},Ua({h:c,s:p,l:u})),{},{a:+m});default:var y=Ga(t),g=y.r,f=y.g,b=y.b,k=y.a;return $e($e({},uo({r:g,g:f,b})),{},{a:k/255})}else switch(o){case"rgb":return $e($e({},uo(za(t))),{},{a:1});case"hsv":var C=Ya(t);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return $e($e({},Ua(Ha(t))),{},{a:1});default:return $e($e({},uo(Ga(t))),{},{a:1})}},pn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Wa=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"),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}}}),Fp=["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,Fp)},jt.__scopeId="data-v-02da71fd",jt.__file="src/color-item/ColorItem.vue";var fo=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 cn(a,"hex",!0)})})}}}),$p={class:"colors"};function qa(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 ze(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?qa(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qa(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}"),fo.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",$p,[(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))])},fo.__scopeId="data-v-0f8b52a8",fo.__file="src/picker/Colors.vue";var mo=e.defineComponent({name:"Picker",components:{Colors:fo,Saturation:lo,Hue:io,Alpha:so,InputValue:co},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 ze(ze({},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,A=(C=t.value)===null||C===void 0?void 0:C.trim();if(A!=null&&A!==""){var T=pn(A);return Wa(dn(A,T,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,A){var T="";C!=null?(T=Ra(ze({},C),t.format,t.showAlpha),s.value=ze({},C)):s.value=null,d.value=T;var h=l();JSON.stringify(C)!==JSON.stringify(h)&&JSON.stringify(C)!==JSON.stringify(A)&&n("change",T)},{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}),m=e.computed(function(){var C,A;return((C=e.unref(i))===null||C===void 0?void 0:C.a)!=null?(A=e.unref(i))===null||A===void 0?void 0:A.a:1}),y=e.computed(function(){return vt(e.unref(c),e.unref(p),e.unref(u))}),g=e.computed(function(){return"rgb(".concat(e.unref(y).r,", ").concat(e.unref(y).g,", ").concat(e.unref(y).b,")")}),f=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"}}),b=e.ref(-1),k=function(C,A,T){if(C.length!==0){var h=dn(C,A,T),I=h.h,F=h.s,_=h.v;if(!(isNaN(I)||isNaN(F)||isNaN(_))){var N=1,S=h.a;isNaN(S)||(N=S),i.value={h:I,s:F,v:_,a:N}}}};return{h:c,s:p,v:u,a:m,rgbStr:g,onSelectSaturation:function(C,A){b.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:C,v:A,a:e.unref(m)}:i.value=ze(ze({},e.unref(i)),{},{s:C,v:A})},onSelectHue:function(C){b.value=-1,e.unref(i)==null&&(i.value={h:C,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=ze(ze({},e.unref(i)),{},{h:C})},onSelectAlpha:function(C){b.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:C}:i.value=ze(ze({},e.unref(i)),{},{a:C})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(C){b.value=-1,d.value=C},handleChange:function(){var C,A=(C=e.unref(d))===null||C===void 0?void 0:C.trim();if(A!==""){var T=t.showAlpha,h=t.format,I=function(F,_,N){if(N)switch(_){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(F);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(F);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(F);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(F)}else switch(_){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(F);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(F);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(F);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(F)}}(A,h,T);I?k(A,h,T):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:b,onSelectColor:function(C,A){if(b.value=A,(C=C.trim())==="")i.value=null;else{var T=pn(C);T?k(C,T,!0):i.value=null}}}}}),Pp={class:"picker-inner"},Mp={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}"),mo.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",Pp,[e.createElementVNode("div",Mp,[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)},mo.__scopeId="data-v-6ceadec6",mo.__file="src/picker/Picker.vue";var ho=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"):""}})}}}),vp=[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 Ka(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 un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ka(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ka(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}"),ho.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(vp),4)},ho.__scopeId="data-v-ceb1719c",ho.__file="src/add-color-item/AddColorItem.vue";var st=null,xt=e.defineComponent({name:"ColorPicker",components:{ColorItem:jt,Picker:mo,AddColorItem:ho},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(B){return cn(B,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var B=t.value||"",D=Array.isArray(B)?B:[B];a.value=D.map(function(V){return cn(V,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,y,g,f=e.ref(null),b=e.ref(null),k=(l=f,c=b,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){st.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(B){var D=B.state,V=D.styles,G=D.placement,U=V.popper;u.value=un(un(un({},U),p),{},{transformOrigin:G==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(B,D){var V,G=Mt(B,2),U=G[0],x=G[1],E=Mt(D,2),w=E[0],O=E[1];if(U&&x&&(w!==U||O!==w)){(V=st)===null||V===void 0||V.destroy();var $=U.$el||U,z=x.$el||x;e.nextTick(function(){st=Np($,z,m)})}}),e.onBeforeUnmount(function(){var B;st&&((B=st)===null||B===void 0||B.destroy(),st=null)}),{instance:st,style:u}),C=k.style,A=function(){e.unref(f)==null&&(f.value=e.unref(v)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},T=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]))},h=e.ref(),I=function(){var B=Da(ro.mark(function D(V){var G,U,x,E;return ro.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(U=V.target,(x=(G=U.dataset)===null||G===void 0?void 0:G.index)!=null&&x!==""){w.next=4;break}return w.abrupt("return");case 4:if(E=+x,e.unref(i)!==E){w.next=7;break}return w.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==E?(T(),y&&clearTimeout(y),y=setTimeout(function(){A(),clearTimeout(y)},100)):A(),i.value=E,f.value=U;case 10:case"end":return w.stop()}},D)}));return function(D){return B.apply(this,arguments)}}(),F=function(){var B=Da(ro.mark(function D(V){var G,U,x,E,w;return ro.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(E=V.target,!(!((G=e.unref(h))!==null&&G!==void 0&&G.isEqualNode(E))&&(!((U=e.unref(h))===null||U===void 0)&&U.contains(E)))){O.next=4;break}return O.abrupt("return");case 4:if(w=(x=e.unref(b))===null||x===void 0?void 0:x.$el,!(w!=null&&w.contains(E))){O.next=8;break}return O.abrupt("return");case 8:g&&clearTimeout(g),g=setTimeout(function(){e.unref(d)&&T()},0);case 10:case"end":return O.stop()}},D)}));return function(D){return B.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(A(),clearTimeout(g))});var _,N=e.ref(t.max>e.unref(a).length),S=e.computed(function(){return typeof t.popupContainer=="string"||kt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),L=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),M=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(b)]},function(){e.nextTick(function(){var B,D;(B=e.unref(h))===null||B===void 0||B.setAttribute("pick-colors-theme",e.unref(M)),(D=e.unref(b))===null||D===void 0||(D=D.$el)===null||D===void 0||D.setAttribute("pick-colors-theme",e.unref(M))})},{immediate:!0}),e.provide("theme",{theme:M});var v=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",F,!1),t.showPicker&&A()}),e.onUnmounted(function(){document.removeEventListener("mouseup",F,!1),y&&(clearTimeout(y),y=null),g&&(clearTimeout(g),g=null)}),{valueList:a,colorItemSelected:function(B){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===B},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:N,onPickerChange:function(B){var D=e.unref(i),V=e.unref(a).slice(),G=e.unref(a).length;if(D!=null){D>=0?V[D]=B:(i.value=G,V.push(B));var U="";U=Array.isArray(t.value)||t.addColor?V:B,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,B,D)),t.addColor&&G>=t.max&&(N.value=!1,n("overflowMax"))}},colorPicker:h,onColorClick:I,pickerRef:b,onColorItemDragStart:function(B){B.dataTransfer.effectAllowed="move";var D=B.target;_=+D.dataset.index},onColorItemDragOver:function(B){},onColorItemDrop:function(B){var D=+B.target.dataset.index,V=Ap(e.unref(a)),G=V[_];V.splice(_,1);var U=V.slice(0,D),x=V.splice(D),E=U.concat([G]).concat(x);n("update:value",E),n("change",E,E[_],_)},colorItemsRef:v,pickerStyle:C,values:r,teleportDisabled:L,toPopupContainer:S}}});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)}"),xt.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)},xt.__scopeId="data-v-3c43ade8",xt.__file="src/ColorPicker.vue";const jp=e.defineComponent({name:"ColorPick",components:{PickColors:xt,AInput:P.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}}}}),nm="",Rp={class:"color-pick"};function Up(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Rp,[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 Gp=ae(jp,[["render",Up],["__scopeId","data-v-e2113f43"]]),zp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:xt},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:()=>{P.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),am="",Hp={class:"color-group-pick"};function Yp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Hp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Wp=ae(zp,[["render",Yp],["__scopeId","data-v-b2be8322"]]),qp=e.defineComponent({name:"FormGroup",components:{Draggable:Nt,AppstoreAddOutlined:Oo,MinusCircleOutlined:Hl,PickColors:xt,InputNumber:ua,PlusCircleOutlined:Kl},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 y=Object.keys(m),g={};y.forEach(f=>{g[f]=""}),c.push(g)}else typeof m=="string"&&c.push(m);n.value=c}else P.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var y;const m=(y=t.value)==null?void 0:y.slice();if(Array.isArray(m)){const g=c==null?void 0:c.target,f=(g==null?void 0:g.value)!=null?g==null?void 0:g.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){P.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),rm="",Kp={class:"form-group"},Qp={class:"form-row"},Xp={key:0,class:"label"},Jp={key:1,class:"label"},Zp={class:"icon-group"};function eu(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",Kp,[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",Qp,[(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",Xp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Jp,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:y=>t.onValueChange(y,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Zp,[(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 tu=ae(qp,[["render",eu],["__scopeId","data-v-f0c0ab4d"]]),ou=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:P.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function nu(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 au=ae(ou,[["render",nu]]),ru=e.defineComponent({name:"PropsToForm",components:{Input:sd,InputNumber:ua,RadioGroup:fd,Select:yd,Switch:Cd,ColorPick:Gp,ColorGroupPick:Wp,FormGroup:tu,Textarea:au},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Yt),n=e.inject(bo),a=e.inject(Co),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:y="value",changeValueEventName:g="change",events:f}=p;c[u]={...p,valueProp:y,value:m,events:{[g]:(b,k=!0)=>{i(k?{[u]:b}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:ee.reduce(l,(c,p,u)=>{const m=rd[u];if(Array.isArray(m)){const y=m.find(g=>{const{onlyType:f,excludeType:b}=g;return f==null&&b==null?!0:f?ge(e.unref(r),f):b?!ge(e.unref(r),b):!1});y&&s({result:c,value:p,key:u,mapAttributeProp:y})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:ge}}}),lm="",lu={class:"props-to-form"},iu={class:"label"},su={class:"component-wrapper"};function cu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",lu,[(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",iu,e.toDisplayString(s.label),1),e.createElementVNode("div",su,[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 du=ae(ru,[["render",cu],["__scopeId","data-v-c6fb2484"]]);function pu(){return new Worker("/assets/editor.worker-02df2e61.js")}function uu(){return new Worker("/assets/json.worker-867823a6.js")}function fu(){return new Worker("/assets/ts.worker-7254b425.js")}const mu=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 uu:s==="typescript"||s==="javascript"?new fu:new pu}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=nr.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(ee.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}}}),im="",hu={class:"editor",ref:"dom"};function yu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",hu,null,512)}const Qa=ae(mu,[["render",yu],["__scopeId","data-v-71e88372"]]),gu=[{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}],bu=e.defineComponent({name:"TableColumnConfig",components:{ATable:P.Table,AModal:P.Modal,ACheckbox:P.Checkbox,AInput:P.Input,AInputNumber:P.InputNumber,ASelect:P.Select,ASelectOption:P.SelectOption,Editor:Qa},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 b,k,C;let f=[];if(r.value=[],!o.value)f=((b=e.unref(n))==null?void 0:b.queryColumnList)||[];else{const A=((k=e.unref(n))==null?void 0:k.rowHeaderList)||[],T=((C=e.unref(n))==null?void 0:C.indicators)||[];f=[...A,...T]}f.forEach(A=>{var h;let T=(h=e.unref(a))==null?void 0:h.find(I=>I.prop===A.name);T||(T={label:A.label,prop:A.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(T)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:gu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,b,k)=>{f&&b&&(i=f,s=b,d.value=f[b]||"",c.value=!0,l.value=k)},onEditorChange:f=>{try{d.value=f}catch(b){console.error(b)}},changeRenderBool:(f,b)=>{f.style=b.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),sm="",Cu={class:"table-column-config"};function wu(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"),y=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Cu,[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:g,text:f,record:b})=>[g.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:k=>t.changeRenderBool(b,k),checked:b.style},null,8,["onChange","checked"])):g.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:b.width,"onUpdate:value":k=>b.width=k,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):g.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[b.style?(e.openBlock(),e.createBlock(d,{key:1,value:b.renderText,"onUpdate:value":k=>b.renderText=k,readOnly:!0,onClick:k=>t.renderSave(b,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):g.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[b.style?(e.openBlock(),e.createBlock(d,{key:1,value:b.headerTemplate,"onUpdate:value":k=>b.headerTemplate=k,readOnly:!0,onClick:k=>t.renderSave(b,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):g.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:b.headerAlign,"onUpdate:value":k=>b.headerAlign=k},{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"])):g.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:b.align,"onUpdate:value":k=>b.align=k},{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"])):g.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:b.fixed,"onUpdate:value":k=>b.fixed=k},{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"])):g.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:b.dataFormat,"onUpdate:value":k=>b.dataFormat=k,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"])):g.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[b.dataFormat&&b.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:b.retentiondigit,"onUpdate:value":k=>b.retentiondigit=k,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(y,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=g=>t.editorVisible=g),"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 ku=ae(bu,[["render",wu],["__scopeId","data-v-afebddc0"]]),_u=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:du,TableColumnConfig:ku,Editor:Qa,AFormItem:P.FormItem,ASelect:P.Select,ASelectOption:P.SelectOption,ACollapse:P.Collapse,ACollapsePanel:P.CollapsePanel,ASwitch:P.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Yt),r=e.inject(gn),i=e.inject(bo),s=e.inject(Co),d=e.inject(yn),l=h=>{i({..._n[h]},!1),d()},c=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>ad.map(h=>{const{props:I,title:F,enableProps:_,onlyType:N,excludeType:S}=h,L=[];I.forEach(B=>{typeof B=="string"&&(p.includes(B)?t.isGroupTable&&L.push(B):L.push(B))});let M,v;return t.componentType==="table"&&(N!=null&&N.includes(t.componentType))?(M=typeof _=="string"&&r.value?r.value[_]:void 0,v=ee.pick(e.unref(r),L)):(M=typeof _=="string"&&a.value?a.value[_]:void 0,v=ee.pick(e.unref(a),L)),{title:F,enableProps:M,enablePropsName:_,onlyType:N,excludeType:S,props:v}}).filter(({props:h})=>Object.keys(h).length>0)),m=(h,I)=>{const{onlyType:F,excludeType:_}=h;return F==null&&_==null?!0:F?ge(I,F):_?!ge(I,_):!1},y=(h,I)=>(I==null||I.stopPropagation(),h),g=(h,I)=>{I!=null&&i({[I]:h})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),b=h=>{try{const I=JSON.parse(h||"{}");i(I,!1)}catch(I){console.error(I)}},k=e.ref(""),C=h=>{try{k.value=h}catch(I){console.error(I)}},A=(h,I)=>{try{s({[I]:h})}catch(F){console.error(F)}},T=e.computed(()=>{var h;return["customGraph"].includes((h=e.unref(a))==null?void 0:h.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:b,tableOptions:r,optionCode:k,onEditorChange:C,tableEditorChange:A,onSwitchClick:y,onSwitchChange:g,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:T}}}),cm="",dm="",xu={class:"style-group"};function Su(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"),y=e.resolveComponent("a-collapse"),g=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",xu,[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(y,{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:b=>t.onSwitchChange(b,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(y,{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 b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((b=f.onlyType)!=null&&b.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(g)]),_: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 Nu=ae(_u,[["render",Su],["__scopeId","data-v-2fb3e2ad"]]),Au=e.defineComponent({name:"Card",components:{CloseOutlined:Jt,MenuOutlined:Zn,ADropdown:P.Dropdown,AMenu:P.Menu,AMenuItem:P.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(je),n=e.inject(Wt),a=e.inject(wn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:w=>{},onDeleteControl:w=>{},onAddMenuControl:(w,O,$)=>{}}),d=e.computed(()=>{var w;return(w=e.unref(o))==null?void 0:w.filter(O=>O.keyName!=="")}),l=e.computed(()=>[{keyName:"父页面",id:"PARENT"},...e.unref(d)]),c=e.computed(()=>{var $,z;const w=[],O=($=e.unref(d))==null?void 0:$.find(Y=>{var Q;return Y.id===((Q=t.control)==null?void 0:Q.id)});if(O){const Y=O.type,Q=ee.pick(O,["value","startTime","endTime"]);(z=Object.keys(Q))!=null&&z.length||(Q.value="");for(const Z in Q)if(Object.prototype.hasOwnProperty.call(Q,Z)){const oe=e.unref(a)[Z];if(Array.isArray(oe)){const ie=oe.find(se=>ge(Y,se.onlyType));ie&&w.push({label:ie.label,value:Z})}else w.push({label:oe.label,value:Z})}}return w}),p=()=>{i({index:t.index,path:t.path}),m(t.control.id)},u=({key:w})=>{s(t.path,t.index,w==="2"?"||":"&&")};function m(w){const O=e.unref(d).find($=>$.id===w);if(O){const{type:$,id:z,events:Y=[]}=O,Q=Zt($),Z=Y.findIndex(oe=>{var ie;return oe.on===Q&&oe.target===((ie=e.unref(I))==null?void 0:ie.id)&&oe.emit==="refreshData"});Z!==-1&&(Y.splice(Z,1),n({id:z,events:Y}))}}const y=w=>{const O={...t.control};if(O.id=w,O.customValue="",w){const $=e.unref(d).find(z=>z.id===w);$&&(O.keyName=$.keyName,N($,w))}delete O.prop,r({control:O,index:t.index,path:t.path})},g=e.ref(""),f=()=>{g.value=t.control.id},b=w=>{r({control:{...t.control,prop:w},index:t.index,path:t.path})},k=w=>{r({control:{...t.control,prop:w.target.value},index:t.index,path:t.path})},C=w=>{r({control:{...t.control,rule:w},index:t.index,path:t.path})},A=w=>{const O={...t.control};O.modelKey&&(O.modelKey=""),O.prop&&(O.prop=""),O.format&&(O.format=""),r({control:{...O,dataType:w,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},T=w=>{r({control:{...t.control,customValue:w.target.value},index:t.index,path:t.path})},h=w=>{const O={...t.control};w==null?delete O.mode:O.mode=w,delete O.conditionLabel,delete O.conditionName,delete O.conditionKey,delete O.conditionValueType,r({control:O,index:t.index,path:t.path})},I=e.inject(Ye),F=e.inject(Ce),_=e.computed(()=>{var He;const{classificationList:w=[],seriesList:O=[],leftAxisList:$=[],rightAxisList:z=[],indicators:Y=[],rowHeaderList:Q=[],queryColumnList:Z=[]}=e.unref(F),oe=ee.cloneDeep([...w,...O,...$,...z,...Y,...Q,...Z]);if(oe!=null&&oe.length)for(const pe of oe)pe.id=pe.name;const ie=[{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(pe=>({...pe,id:pe.name,label:pe.title||pe.label})),...oe];if(((He=e.unref(I))==null?void 0:He.type)==="ecanSelect"){const{selectFieldOptions:pe=[]}=e.unref(F);if(ie.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"}),pe!=null&&pe.length)for(const Te of pe)ie.unshift({label:Te.label,name:Te.value,id:Te.value,genericType:"TEXT"})}const se=new Map,Pe=ie.length;for(let pe=0;pe<Pe;pe++){const Te=ie[pe],{id:nt}=Te||{};se.set(nt,Te)}return[...se].map(([pe,Te])=>Te)});function N(w,O){var Z,oe;const{type:$,id:z,events:Y=[]}=w,Q=Zt($);e.unref(g)&&O!==e.unref(g)&&(tt(((Z=e.unref(F))==null?void 0:Z.controlList)||[]).find(se=>se.id===e.unref(g))||m(e.unref(g))),Y.find(ie=>{var se;return ie.on===Q&&ie.target===((se=e.unref(I))==null?void 0:se.id)&&ie.emit==="refreshData"})||n({id:z,events:[...Y,{on:Q,target:(oe=e.unref(I))==null?void 0:oe.id,emit:"refreshData"}].reverse()})}const S=(w,O)=>{if(w){const{label:$,name:z,id:Y,genericType:Q,indexCode:Z,typeGuid:oe,indexCodeNum:ie}=O||{},se={...t.control,conditionKey:Y,conditionLabel:$,conditionName:z,conditionValueType:Q,indexCode:Z,typeGuid:oe,indexCodeNum:ie};yt(se,"rule")||(se.rule="EQUAL"),yt(se,"dataType")||(se.dataType="component"),r({control:se,index:t.index,path:t.path})}else{const $={...t.control};delete $.conditionLabel,delete $.conditionName,delete $.conditionKey,delete $.conditionValueType,r({control:$,index:t.index,path:t.path})}},L=(w,O)=>{var $;return($=O==null?void 0:O.keyName)==null?void 0:$.toLowerCase().includes(w==null?void 0:w.toLowerCase())},M=(w,O)=>{var $;return($=O==null?void 0:O.label)==null?void 0:$.toLowerCase().includes(w==null?void 0:w.toLowerCase())},v=e.computed(()=>{const w=e.unref(_).find($=>$.id===t.control.conditionKey);let O="";return w&&(O=(w==null?void 0:w.genericType)||""),O==="TEXT"||O==="0"?[{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"}]:O==="NUMBER"||O==="1"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:O==="DATE"||O==="2"?[{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"}]:[]}),B=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],D=e.computed(()=>{let w=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(Q=>Q.id===O),Y=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(z==null?void 0:z.type,Y)&&(w=!0)}return O==="PARENT"&&(w=!0),w}),V=e.computed(()=>{let w=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(Y=>Y.id===O);(z==null?void 0:z.type)==="ecanRangePicker"&&(w=!0)}return O==="PARENT"&&(w=!0),w}),G=e.computed(()=>{let w=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(Y=>Y.id===O);["ecanDatePicker","ecanRangePicker"].includes(z==null?void 0:z.type)&&(w=!0)}return w});return{propOptions:c,usedComponentList:d,onDelete:p,onIdChange:y,onIdFocus:f,onPropChange:b,onParentPropChange:k,onModeChange:h,onRuleChange:C,onDataTypeChange:A,onCustomValueChange:T,conditionKeyOptions:_,onConditionKeyChange:S,idFilterOption:L,filterOption:M,onFormatChange:w=>{r({control:{...t.control,format:w},index:t.index,path:t.path})},onModelPropChange:w=>{r({control:{...t.control,modelKey:w.target.value},index:t.index,path:t.path})},clickConditionMenu:u,ruleOption:v,dataTypeOption:B,isShowProp:V,isShowFormat:G,isShowModelProp:D,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"}],keyNameOptions:l}}}),pm="",um="",Tu={class:"control-card"};function Eu(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",Tu,[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.keyNameOptions,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,placeholder:t.control.id==="PARENT"?"请输入组件别名":""},null,8,["value","onInput","placeholder"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.control.id==="PARENT"?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.prop,onInput:t.onParentPropChange,placeholder:"请输入属性名"},null,8,["value","onInput"])):(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"]))],64)):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 Vu=ae(Au,[["render",Eu],["__scopeId","data-v-1e33ff6f"]]),Lu=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:Vu}}),fm="",Bu={key:0,class:"condition-list"},Ou={key:0,class:"condition-container"},Du={key:0,class:"condition-text"},Iu={key:1,class:"condition-text"},Fu={class:"conditions"};function $u(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",Bu,[(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",Ou,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Du,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Iu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Fu,[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 Pu=ae(Lu,[["render",$u],["__scopeId","data-v-916ff9bd"]]),Mu=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Pu,AButton:P.Button},setup(){const t=e.inject(je),o=e.inject(Ce),n=e.inject(Se),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const y of p)y.conditionKey&&(yt(y,"rule")||(y.prop==="startTime"?y.rule="GREATER_EQUAL":y.prop==="endTime"?y.rule="LESS_EQUAL":y.rule="EQUAL"),yt(y,"dataType")||(y.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:sa({...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:_e()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:_e()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:_e()}),i({controlList:u})))},d=p=>{var b,k,C,A;const{index:u,path:m}=p;let y=ee.cloneDeep((b=e.unref(a))==null?void 0:b.slice()),g=y;const f=m.split("-");if(f!=null&&f.length){for(const T of f)if(g[T])g=(k=g[T])==null?void 0:k.conditions;else break;if(Array.isArray(g)&&g[u])if(g.splice(u,1),g.length===1){if(f.length>0){const T=f.length-1,h=f[T],I=f.slice(0,T);let F=y,_="";for(const N of I)if(F[N])_=(C=F[N])==null?void 0:C.join,F=(A=F[N])==null?void 0:A.conditions;else break;if(_===g[0].join){if(Array.isArray(g[0].conditions)){const N=ee.cloneDeep(g[0].conditions);F.splice(+h,1),F.splice(+h,0,...N)}}else F[h]=g[0]}}else g.length===0&&(y=[]);i({controlList:y})}},l=p=>{var k,C;const{control:u,index:m,path:y}=p,g=ee.cloneDeep((k=e.unref(a))==null?void 0:k.slice());let f=g;const b=y.split("-");if(b!=null&&b.length)for(const A of b)if(f[A])f=(C=f[A])==null?void 0:C.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:g})},c=(p,u,m)=>{var k,C,A;const y=ee.cloneDeep((k=e.unref(a))==null?void 0:k.slice());let g=y,f="";const b=p.split("-");if(b!=null&&b.length){for(const T of b)if(g[T])f=(C=g[T])==null?void 0:C.join,g=(A=g[T])==null?void 0:A.conditions;else break;if(f===m)g.splice(u+1,0,{keyValue:_e()});else{const T=ee.cloneDeep(g[u]);g[u]={join:m,conditions:[T,{keyValue:_e()}]}}i({controlList:y})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),mm="",vu={class:"control-group"},ju={class:"control-group-header"},Ru={class:"control-group-content"};function Uu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",vu,[e.createElementVNode("div",ju,[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",Ru,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Gu=ae(Mu,[["render",Uu],["__scopeId","data-v-1e37d2d3"]]),zu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Jt,AppstoreAddOutlined:Oo,ASelect:P.Select,ASelectOption:P.SelectOption,AInput:P.Input,APopover:P.Popover,ATabs:P.Tabs,ATabPane:P.TabPane,AInputNumber:P.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(je),r=e.computed(()=>{var T;return(T=e.unref(a))==null?void 0:T.filter(h=>h.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(ee.cloneDeep(t.item));e.watch(l,T=>{o("update",{...T,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var h;let T=null;if(((h=e.unref(l))==null?void 0:h.dataType)==="component"){const I=e.unref(r).find(F=>{var _;return F.id===((_=e.unref(l))==null?void 0:_.id)});I&&(T=I)}return T}),p=e.computed(()=>{var h;let T=!1;return((h=e.unref(l))==null?void 0:h.variableType)==="DATE"&&(T=!0),T}),u=e.computed(()=>{let T=!1;return e.unref(c)&&(T=ge(e.unref(c).type,"range")),T}),m=e.computed(()=>{let T=!1;return e.unref(c)&&(ge(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(T=!0):ge(e.unref(c).type,"date")&&(T=!0)),T}),y=(T,h)=>{T&&(e.unref(l).keyName=h.keyName)},g=()=>{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"}]:[]),b=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},k=()=>{e.unref(l).format=null},C=(T,h)=>{var I;return(I=h==null?void 0:h.keyName)==null?void 0:I.toLowerCase().includes(T==null?void 0:T.toLowerCase())};return e.watch(m,T=>{T&&(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:C,onChangeComponent:y,onDelete:g,onChangeDataType:b,onChangeVariableType:k,changeTab:T=>{e.unref(l).activeOperateKey=T,T===1?e.unref(l).operateValue=0:T===2&&(e.unref(l).operateValue="rangeValue")}}}}),hm="",Hu={class:"variable-item"},Yu=["title"],Wu={class:"popover-content-wrap"},qu={style:{display:"flex"}};function Ku(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"),y=e.resolveComponent("a-popover"),g=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,Yu)):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,disabled:t.variableData.disabled,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","disabled","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(y,{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",Wu,[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",qu,[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(g,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const Qu=ae(zu,[["render",Ku],["__scopeId","data-v-75ccc065"]]),Xu=e.defineComponent({name:"VariableGroup",components:{VariableItem:Qu},setup(){const t=e.inject(Ce),o=e.inject(Se),n=e.inject(je),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Lt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=ee.cloneDeep(e.unref(a));l.push({keyValue:_e(),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=ee.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=ee.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),ym="",Ju={class:"variable-group"},Zu={class:"variable-group-header"},ef={class:"variable-group-content"};function tf(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",Ju,[e.createElementVNode("div",Zu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",ef,[(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 of=ae(Xu,[["render",tf],["__scopeId","data-v-fd60cd09"]]),nf=(t={})=>{console.log(t,"reqpp");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:y,builtInValueSource:g,builtInCalcWay:f,formula:b,conditions:k,aggregate:C}=s;let A;return k&&(A=r(k)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:C,builtInFormula:y,builtInValueSource:g,builtInCalcWay:f,formula:b,conditions:A}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:y,classificationList:g=[],seriesList:f=[],leftAxisList:b=[],rightAxisList:k=[],queryColumnList:C=[],indicators:A=[],dataSourceId:T,idxLibMode:h,preview:I=!1}=s||{};m==null&&(ge(d,"table")?m="1":m="2");let F;if(Array.isArray(g)&&g.length>0){const L=g.length;for(let M=0;M<L;M++){const v=g[M]||{},{label:B="",name:D="",show:V=!1,sort:G,customGroup:U,conditions:x}=v;if(V||L===1){F={label:B.trim(),columnName:D,show:V,sort:G,customGroup:U,conditions:r(x)};break}}}let _;if(Array.isArray(f)&&f.length>0){const L=f.length;for(let M=0;M<L;M++){const v=f[M]||{},{label:B="",name:D="",show:V=!1,sort:G,customGroup:U,conditions:x}=v;if(V||L===1){_={label:B.trim(),columnName:D,show:V,sort:G,customGroup:U,conditions:r(x)};break}}}const N=[];C==null||C.forEach(L=>{N.push(o(L))});const S=[];if(b==null||b.forEach(L=>{L.location="LEFT",S.push(i(L))}),k==null||k.forEach(L=>{L.location="RIGHT",S.push(i(L))}),A==null||A.forEach(L=>{L.location="LEFT",S.push(i(L))}),!(m==="1"&&N.length===0)&&!(m==="2"&&S.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:y,classification:F,series:_,indicatorList:S,queryColumns:N,pageFlag:!0,sqlConditions:[],dataSourceId:T,idxLibMode:h,preview:I})}catch(L){console.error(L)}}},Xa=(t,o)=>{const n={dayjs:ue,...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},yo=(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 y=u[m],g=i[y];g!=null&&(c=c.replace(y,g))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Xa(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," ")),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=Xa(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},af=(t,o,n)=>{switch(t.type){case"bar":return rf(t,o,n);case"line":return lf(t,o,n);case"pie":return sf(t,o,n);case"comboGraph":return cf(t,o,n);default:return{}}},rf=(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 y={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(y.stack="stack"),y.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(y)}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 y=0;y<p;y++){const{marker:g,seriesName:f,name:b,value:k,data:C}=c[y]||{};y===0&&(u+=`${b}<br/>`),u+=yo(m,{textData:{marker:g,name:b,value:k,a:f,b,c:k,...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)}},lf=(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 y=0;y<p;y++){const{marker:g,seriesName:f,name:b,value:k,data:C}=c[y]||{};y===0&&(u+=`${b}<br/>`),u+=yo(m,{textData:{marker:g,name:b,value:k,a:f,b,c:k,...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)}},sf=(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 yo(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:Ls(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:{}}}]}},cf=(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 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 m=t.seriesTypes;for(let y=0;y<c;y++){const g=m[y],{tooltipFormatter:f}=g||{},{marker:b,seriesName:k,name:C,value:A,data:T}=l[y]||{};y===0&&(p+=`${C}<br/>`),p+=yo(f||u,{textData:{marker:b,name:C,value:A,seriesName:k,a:k,b:C,c:A,...T}},{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)}},df=(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 y=a[m],{label:g,value:f}=y,b={...t[0],value:t[0][f]};r.add(g),p.push(b)}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 y=0;y<d;y++){const g=a[y],{label:f,value:b}=g,k={...u,value:u[b]};if(i.has(f)){const C=i.get(f);C.push(k),i.set(f,C)}else i.set(f,[k])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},pf=(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]||"",y=u[a]||"",g=u[r]||"";if(i.add(m),s.has(g)){const f=s.get(g);f.push({name:m,value:y,...u}),s.set(g,f)}else s.set(g,[{name:m,value:y,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},uf=e.defineComponent({name:"ChartGraph",components:{ASpin:P.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(Ce)||{},l=e.inject(Yt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),y=e.ref(!1),g=e.computed(()=>y.value?ir:12),f=e.ref({}),b=e.ref(),k=e.computed(()=>{const N=e.unref(n.value);if((N==null?void 0:N.type)==="customGraph")return b.value;const S=af(N,e.unref(f),g.value);return{toolbox:{show:N.toolboxShow,left:N.toolboxLeft,top:N.toolboxTop,itemSize:N.toolboxItemSize,itemGap:N.toolboxItemGap,feature:{myDataZoom:{show:y.value?!1:N.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:N.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:N.titleText,subtext:N.titleSubtext,left:"center"},grid:{top:N.gridTop,bottom:N.gridBottom,left:N.gridLeft,right:N.gridRight,containLabel:N.gridContainLabel},color:N.colors,...S}}),C=(N=[],S,L=!1)=>{const M=L?S:null;f.value=df(N,M)},A=(N=[],S)=>{f.value=pf(N,S)},T=async()=>{var N,S,L;try{const M=nf({graphicConfig:e.unref(a.value),type:(N=e.unref(n.value))==null?void 0:N.type,request:r,indicatorToken:s});m.value=!0;const v=await M(),{columns:B=[],rows:D=[]}=((S=v==null?void 0:v.data)==null?void 0:S.data)??{};if(((L=e.unref(n.value))==null?void 0:L.type)==="pie"){let V=[];if(B.length>0){const G=B[0],U=B[1];V=D.map(x=>({name:x[G],value:x[U]}))}A(V)}else{let V;B.length>0&&(V={name:B[0],types:B.slice(1).map(G=>({label:G,value:G}))}),C(D,V,!0)}}catch(M){console.error(M)}finally{m.value=!1}},h={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},I=()=>{e.unref(f).dataset.length===0?u.value.setOption(h):u.value.setOption(k.value)},F=()=>{e.unref(n.value).type!=="customGraph"&&T()},_=()=>{var N;(N=u.value)==null||N.resize()};return e.watch(k,()=>{I()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,N=>{try{const S=eval;b.value=S(N)}catch(S){console.error(S)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(_),i.observe(p.value)),u.value=lr.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:F}),{echartRef:c,loading:m}}}),gm="",ff={class:"ecan-chart-graph",ref:"chartWrapRef"},mf={style:{width:"100%",height:"100%"},ref:"echartRef"};function hf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",mf,null,512)]),_:1},8,["spinning"])],512)}const Ja=ae(uf,[["render",hf],["__scopeId","data-v-8049fed2"]]),yf=e.defineComponent({name:"DataConfig",components:{DataGroup:nd,StyleGroup:Nu,ChartGraph:Ja,ATabs:P.Tabs,ATabPane:P.TabPane,ControlGroup:Gu,VariableGroup:of,AButton:P.Button,ReloadOutlined:ii},setup(){var F;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(hn),i=e.inject(Ce),s=e.inject(je),d=e.inject(kn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const _=ee.cloneDeep(e.unref(a));p(_);const N=ee.pick(_,ee.without(Object.keys(_),"position","top","left","width","height"));ge(_.type,l)?(N.height=_.height,N.width=_.width):N.height="290px";const S=ee.cloneDeep(e.unref(i));return S.pageMode="design",S.componentList=s,S.preview=!0,S.pageConfig=d,{...N,graphicConfig:S,toolboxShow:!1,sourceLeft:_.left,sourceTop:_.top}});function p(_){var N,S,L,M;["#ffffff","#fff"].includes((N=_==null?void 0:_.color)==null?void 0:N.toLowerCase())&&(_.color="#000"),["#ffffff","#fff"].includes((S=_==null?void 0:_.variableColor)==null?void 0:S.toLowerCase())&&(_.variableColor="#000"),["#ffffff","#fff"].includes((L=_==null?void 0:_.increaseColor)==null?void 0:L.toLowerCase())&&(_.increaseColor="#000"),["#ffffff","#fff"].includes((M=_==null?void 0:_.declineColor)==null?void 0:M.toLowerCase())&&(_.declineColor="#000")}const u=e.computed(()=>{let _=!0;return ge(e.unref(c).type,l)&&(_=!1),_}),m=e.computed(()=>{var _;return(_=e.unref(c))==null?void 0:_.type}),y=e.computed(()=>{var _;return!!((_=e.unref(c))!=null&&_.isGroupTable)}),g=_=>{const N=_==="1";N&&m.value==="table"&&T(),window.changeShowTable&&window.changeShowTable(N),_==="3"&&A()},f=e.ref(),b=e.inject(Me),k=e.unref(e.inject(ve)),C=(F=window==null?void 0:window.config)==null?void 0:F.pageId;function A(){var B;const{leftAxisList:_=[],rightAxisList:N=[],queryColumnList:S=[],indicators:L=[]}=e.unref(i),M=[..._,...N,...S,...L],v={};for(const D of M){const{id:V="",indexCode:G=""}=D;V&&!yt(D,"calcType")&&!v[V]&&(v[V]=G)}if((B=Object.keys(v))!=null&&B.length){const D=[];for(const V in v)D.push(new Promise((G,U)=>{b.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:C,indexGuid:V,indexCode:v[V],dataSourceId:""},{headers:{Authentication:k,operateContext:"ygt"}}).then(x=>{var O;const{success:E,data:w=[]}=x.data;E&&((O=w==null?void 0:w.dataViewColumns)!=null&&O.length)?G(w.dataViewColumns):U(w)}).catch(x=>{U(x)})}));Promise.all(D).then(V=>{if(V!=null&&V.length){const G=V.reduce((U,x)=>U.filter(E=>x.find(w=>w.typeGuid===E.typeGuid)));f.value=G.filter(U=>U.typeGuid)}})}}const T=()=>{var N;let _;r&&m.value==="table"?_=window.updateConfig:_=(N=e.unref(n))==null?void 0:N.refreshData,typeof _=="function"&&_()},h=e.inject(Se),I=()=>{var _;h({variableConditions:Lt(((_=e.unref(i))==null?void 0:_.variableList)||[],s)})};return e.provide(yn,T),e.watch(i,()=>{T()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:y,onChange:g,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:T,refreshAction:I}}}),bm="",gf={class:"data-config"},bf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Cf(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"),y=e.resolveComponent("a-tabs"),g=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",gf,[e.createVNode(y,{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",bf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(g,{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 wf=ae(yf,[["render",Cf],["__scopeId","data-v-d85f4e1e"]]),kf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Si,DataConfig:wf},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 h;return((h=e.unref(s))==null?void 0:h.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?ee.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?ee.cloneDeep(e.unref(s).chartsOptions):e.ref(ee.cloneDeep(_n.line));p=e.ref(p);let u=e.unref(s).tableOptions?ee.cloneDeep(e.unref(s).tableOptions):e.ref(ee.cloneDeep(sr));u=e.ref(u);const m=e.ref([]),y=h=>{m.value=h},g=h=>{c.value={...e.unref(c),...e.unref(h)}},f=(h,I=!0)=>{I?p.value={...e.unref(p),...e.unref(h)}:p.value={...e.unref(h)}},b=h=>{u.value={...e.unref(u),...e.unref(h)}},k=()=>m,C=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=ee.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=ee.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},A=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=A,t.request&&e.provide(Me,t.request),e.provide(mn,{setDataList:y,getDataList:k});const T=h=>{n("updateUsedComponent",h)};return e.provide(Ye,s),e.provide(Ce,c),e.provide(Yt,p),e.provide(gn,u),e.provide(At,r),e.provide(hn,l),e.provide(ve,i),e.provide(Se,g),e.provide(bo,f),e.provide(Co,b),e.provide(je,t.renderUsedComponentList),e.provide(Wt,T),e.provide(wn,t.mapAttributeProps),e.provide(kn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:C}),{isUpdate:a}}}),Cm="",_f={key:0,class:"config-modal"},xf={class:"config-modal-left"},Sf={class:"config-modal-right"};function Nf(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",_f,[e.createElementVNode("div",xf,[e.createVNode(s)]),e.createElementVNode("div",Sf,[e.createVNode(d)])]))}const Za=fn(ae(kf,[["render",Nf],["__scopeId","data-v-23d542ce"]])),er=fn(Ja),tr=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:er,EcanIndicatorLibrary:Za},Symbol.toStringTag,{value:"Module"})),Af={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(tr).forEach(a=>{const r=tr[a];r.install&&t.use(r)})}};ke.EcanChartGraph=er,ke.EcanIndicatorLibrary=Za,ke.default=Af,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,Pn=!1,jr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vr;e.nextTick(function(){Pn||(typeof window<"u"&&window.document&&window.document.documentElement&&Ir(o,{prepend:!0}),Pn=!0)})},Rr=["icon","primaryColor","secondaryColor"];function Ur(t,o){if(t==null)return{};var n=Gr(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 Gr(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 Xt(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){zr(t,r,n[r])})}return t}function zr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Hr(t){var o=t.primaryColor,n=t.secondaryColor;Vt.primaryColor=o,Vt.secondaryColor=n||In(o),Vt.calculated=!!n}function Yr(){return Xt({},Vt)}var mt=function(o,n){var a=Xt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=Ur(a,Rr),l=Vt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),jr(),Mr(Fn(r),"icon should be icon definiton, but got ".concat(r)),!Fn(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Xt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Eo(c.icon,"svg-".concat(c.name),Xt({},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=Yr,mt.setTwoToneColors=Hr;const Vo=mt;function Wr(t,o){return Xr(t)||Qr(t,o)||Kr(t,o)||qr()}function qr(){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 Kr(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 Qr(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 Xr(t){if(Array.isArray(t))return t}function vn(t){var o=$n(t),n=Wr(o,2),a=n[0],r=n[1];return Vo.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Jr(){var t=Vo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Zr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function el(t,o){return al(t)||nl(t,o)||ol(t,o)||tl()}function tl(){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 ol(t,o){if(t){if(typeof t=="string")return jn(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 jn(t,o)}}function jn(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 nl(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 al(t){if(Array.isArray(t))return t}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){Lo(t,r,n[r])})}return t}function Lo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function rl(t,o){if(t==null)return{};var n=ll(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 ll(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}vn("#1890ff");var ht=function(o,n){var a,r=Rn({},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=rl(r,Zr),h=(a={anticon:!0},Lo(a,"anticon-".concat(s.name),!!s.name),Lo(a,i,i),a),C=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var g=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,k=$n(p),w=el(k,2),N=w[0],A=w[1];return e.createVNode("span",Rn({role:"img","aria-label":s.name},m,{onClick:u,class:h}),[e.createVNode(Vo,{class:C,icon:s,primaryColor:N,secondaryColor:A,style:g},null)])};ht.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},ht.displayName="AntdIcon",ht.inheritAttrs=!1,ht.getTwoToneColor=Jr,ht.setTwoToneColor=vn;const we=ht;var il={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 sl=il;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){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 Bo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(we,Un({},a,{icon:sl}),null)};Bo.displayName="AppstoreAddOutlined",Bo.inheritAttrs=!1;const Oo=Bo;var dl={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 pl=dl;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){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 Do=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(we,Gn({},a,{icon:pl}),null)};Do.displayName="CaretDownOutlined",Do.inheritAttrs=!1;const fl=Do;var ml={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 hl=ml;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){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 Fo=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(we,zn({},a,{icon:hl}),null)};Fo.displayName="CaretRightOutlined",Fo.inheritAttrs=!1;const gl=Fo;var bl={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 Cl=bl;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){wl(t,r,n[r])})}return t}function wl(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=Hn({},o,n.attrs);return e.createVNode(we,Hn({},a,{icon:Cl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Jt=Io;var kl={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 _l=kl;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){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 $o=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(we,Yn({},a,{icon:_l}),null)};$o.displayName="CopyOutlined",$o.inheritAttrs=!1;const Sl=$o;var Nl={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 Al=Nl;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){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 Po=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(we,Wn({},a,{icon:Al}),null)};Po.displayName="DeleteOutlined",Po.inheritAttrs=!1;const qn=Po;var El={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 Vl=El;function Kn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ll(t,r,n[r])})}return t}function Ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Mo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(we,Kn({},a,{icon:Vl}),null)};Mo.displayName="DoubleRightOutlined",Mo.inheritAttrs=!1;const Bl=Mo;var Ol={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 Dl=Ol;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){Fl(t,r,n[r])})}return t}function Fl(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(we,Qn({},a,{icon:Dl}),null)};vo.displayName="DownOutlined",vo.inheritAttrs=!1;const Il=vo;var $l={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 Pl=$l;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){Ml(t,r,n[r])})}return t}function Ml(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Xn({},o,n.attrs);return e.createVNode(we,Xn({},a,{icon:Pl}),null)};jo.displayName="InfoCircleOutlined",jo.inheritAttrs=!1;const vl=jo;var jl={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 Rl=jl;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){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 Ro=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(we,Jn({},a,{icon:Rl}),null)};Ro.displayName="MenuOutlined",Ro.inheritAttrs=!1;const Zn=Ro;var Gl={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 zl=Gl;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){Hl(t,r,n[r])})}return t}function Hl(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(we,ea({},a,{icon:zl}),null)};Uo.displayName="MinusCircleOutlined",Uo.inheritAttrs=!1;const Yl=Uo;var Wl={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 ql=Wl;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){Kl(t,r,n[r])})}return t}function Kl(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(we,ta({},a,{icon:ql}),null)};Go.displayName="PlusCircleOutlined",Go.inheritAttrs=!1;const Ql=Go;var Xl={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 Jl=Xl;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){Zl(t,r,n[r])})}return t}function Zl(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(we,oa({},a,{icon:Jl}),null)};zo.displayName="PlusOutlined",zo.inheritAttrs=!1;const ei=zo;var ti={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 oi=ti;function na(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){ni(t,r,n[r])})}return t}function ni(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=na({},o,n.attrs);return e.createVNode(we,na({},a,{icon:oi}),null)};Ho.displayName="QuestionCircleOutlined",Ho.inheritAttrs=!1;const ai=Ho;var ri={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 li=ri;function aa(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){ii(t,r,n[r])})}return t}function ii(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Yo=function(o,n){var a=aa({},o,n.attrs);return e.createVNode(we,aa({},a,{icon:li}),null)};Yo.displayName="ReloadOutlined",Yo.inheritAttrs=!1;const si=Yo;var ci={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 di=ci;function ra(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){pi(t,r,n[r])})}return t}function pi(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Wo=function(o,n){var a=ra({},o,n.attrs);return e.createVNode(we,ra({},a,{icon:di}),null)};Wo.displayName="SettingOutlined",Wo.inheritAttrs=!1;const ui=Wo,fi=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:gl,CaretDownOutlined:fl,AInputSearch:M.InputSearch,ASpin:M.Spin,APagination:M.Pagination,Draggable:Nt,ATooltip:M.Tooltip},setup(){var V;const t=(V=window==null?void 0:window.config)==null?void 0:V.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var b;return(b=e.unref(a))==null?void 0:b.graphicConfig}),i=e.computed(()=>{var b;return(b=e.unref(r))==null?void 0:b.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.inject(At),p=e.ref(""),u=async()=>{d.value=!0;const b={source:e.unref(c),queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(p),pageId:t,dataSourceId:e.unref(i)};b.source==="EDV_DATA_SET"&&(b.edvDataSetName=b.indexName,delete b.indexName);try{const S=await o.post(`${xe}/diagram/sourceList`,b,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:P,data:v={}}=S.data;if(P){const{rows:L=[],total:D=0}=v;L==null||L.forEach(B=>{var U;B.show=!1,(U=B.dataViewColumns)==null||U.forEach(R=>{R.show=!0,R.edit=!1,R.title&&(R.label=R.title)})}),s.value=L,l.totalResult=+D}}catch{d.value=!1}},m=b=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标",FIELD:"数据集"})[b],h=b=>({0:"文本",1:"数值",2:"日期"})[b],C=b=>{s.value[b].show=!s.value[b].show},f=()=>{l.currentPage=1,u()},g=ee.debounce(()=>{l.currentPage=1,u()},200),k=(b,S)=>{l.pageSize=S,l.currentPage=b,u()};e.onMounted(()=>{u()});const w=e.inject(Ce),N=e.computed(()=>{const b=["classificationList","rowHeaderList","dimensionList"];let S=[];for(const P in e.unref(w))if(Object.prototype.hasOwnProperty.call(e.unref(w),P)&&b.includes(P)){const v=e.unref(w)[P];Array.isArray(v)&&(S=S.concat(v))}return S});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:C,mapScope:m,mapDataSetScope:h,onSearch:f,onChange:g,source:c,onPaginationChange:k,searchText:p,setItemDisabled:(b=[])=>{let S=!1;if(e.unref(c)==="EDV_DATA_SET"){for(const P of e.unref(N))if(!b.find(L=>L.parentId===P.parentId)){S=!0;break}}else for(const P of e.unref(N))if(!b.find(L=>L.typeGuid===P.typeGuid)){S=!0;break}return S},onDragStart:(b,S)=>{const P=S.dataViewColumns[b.oldIndex];let v={};S.dataSetParams&&(v=S.dataSetParams),P&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...P,dataTo:S.dataTo,dataSetParams:v})),S.dataTo==="1"&&(S!=null&&S.hrpIndexVariates)&&sessionStorage.setItem("indicator-variates",JSON.stringify(S.hrpIndexVariates)),S.dataTo==="2"&&(S!=null&&S.dataSetParams)&&sessionStorage.setItem("indicator-variates",JSON.stringify(S.dataSetParams)))},getSourceType:b=>b==="0"?"【指标库】":b==="1"?"【视图】":b==="2"?"【数据集】":"【其他】",getLoadType:b=>b==="0"?"手工录入":b==="1"?"系统取数":b==="2"?"运算加工":"",getUseType:b=>{let S="";switch(b){case"1":S="人力系统";break;case"2":S="绩效系统";break;case"3":S="预算系统";break;case"4":S="财务系统";break;case"5":S="成本系统";break;case"6":S="物流系统";break;case"7":S="固定资产系统";break;case"8":S="OA办公系统";break;case"9":S="电子档案系统";break;case"10":S="个人收入系统";break;case"11":S="奖金二次分配系统";break;case"12":S="财务管理系统";break;case"13":S="报销系统";break;case"14":S="科研管理系统";break;case"15":S="审计系统";break;case"16":S="分组器系统";break}return S}}}}),Uf="",mi={class:"data-source-list"},hi={class:"columns"},yi={class:"column-item"},gi={key:0},bi={key:1},Ci=["onClick"],wi={key:0},ki={class:"column-child-item"},_i={class:"column-child-item-name"};function xi(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("a-tooltip"),p=e.resolveComponent("draggable"),u=e.resolveComponent("a-spin"),m=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",mi,[e.createVNode(s,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=h=>t.searchText=h),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",hi,[e.createVNode(u,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(h,C)=>(e.openBlock(),e.createElementBlock("div",{key:h.id,class:e.normalizeClass(t.setItemDisabled(h.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",yi,[e.createVNode(c,null,{title:e.withCtx(()=>[e.createElementVNode("div",null,"加载类型:"+e.toDisplayString(t.getLoadType(h.loadType)),1),h.useType?(e.openBlock(),e.createElementBlock("div",gi,"数据使用系统:"+e.toDisplayString(t.getUseType(h.useType)),1)):e.createCommentVNode("",!0),h.systemSource?(e.openBlock(),e.createElementBlock("div",bi,"制度出处:"+e.toDisplayString(h.systemSource),1)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:f=>t.onToggleGroup(C)},[h.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString((h.indexCode?h.indexCode:"")+" "+h.name)+e.toDisplayString(t.getSourceType(h.dataTo)),1)],8,Ci)]),_:2},1024)]),h.show?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(p,{modelValue:h.dataViewColumns,"onUpdate:modelValue":f=>h.dataViewColumns=f,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(h.dataViewColumns),onStart:f=>t.onDragStart(f,h)},{item:e.withCtx(({element:f})=>[e.createElementVNode("div",ki,[e.createTextVNode(" 【"+e.toDisplayString(f.scope==="FIELD"?t.mapDataSetScope(f.genericType):t.mapScope(f.scope))+"】 ",1),e.createElementVNode("span",_i,e.toDisplayString(f.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(m,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=h=>t.pagination.pageSize=h),total:t.pagination.totalResult,"show-total":h=>`共 ${h} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=h=>t.pagination.currentPage=h),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Si=ne(fi,[["render",xi],["__scopeId","data-v-94f7e639"]]),Ni=e.defineComponent({name:"DataList",components:{DataSourceList:Si,DataViewList:yr},setup(){return{source:e.inject(At)}}});function Ai(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"||t.source==="EDV_DATA_SET"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Ti=ne(Ni,[["render",Ai]]),la={mounted(t){t.focus()}},Ei=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},sortList:{type:Array,default:()=>[]}},components:{Draggable:Nt,AModal:M.Modal,AButton:M.Button,ASelect:M.Select,ASelectOption:M.SelectOption,DeleteOutlined:qn},setup(t,{expose:o}){var V;const n=(V=window==null?void 0:window.config)==null?void 0:V.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(Ce),s=e.inject(Se),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=e.ref("1"),u=e.ref([]),m=b=>{const S=t.sortList.filter(v=>!e.unref(u).find(L=>L.columnName===v.name)||b.columnName===v.name),P=[];return S.forEach((v,L)=>{P.includes(v.name)?v.name=`${v.name}_ecanrepeat_${L}`:P.push(v.name)}),S},h=async()=>{try{const b=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0,edvDataSetId:e.unref(i).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:S,data:P=[]}=b.data;S&&(c.value=P==null?void 0:P.slice(0,200))}catch(b){console.error(b)}},C=()=>{var L,D;const b=((L=e.unref(i)[t.type])==null?void 0:L.slice())||[],S=b[t.index],{label:P,name:v}=t.item;e.unref(p)==="2"?S.sort={label:P,columnName:v,type:"CUSTOM",customOrderColumns:e.unref(c)}:e.unref(p)==="1"&&((D=e.unref(u))!=null&&D.length?S.sort=ee.cloneDeep(e.unref(u)):delete S.sort),s({[t.type]:b})};let f=!1;const g=()=>{f=!0},k=e.ref(!1),w=b=>{var P;const{sort:S}=b;S?Array.isArray(S)?(p.value=((P=S[0])==null?void 0:P.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=ee.cloneDeep(S):u.value=[]):(p.value=(S==null?void 0:S.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=[ee.cloneDeep(S)]:u.value=[]):u.value=[],k.value=!0},N=()=>{k.value=!1},A=()=>{e.unref(p)==="2"?(f&&C(),f=!1):C(),N()};return o({showModal:w}),e.watch(k,b=>{var S,P;if(b){const v=(P=(S=t.item)==null?void 0:S.sort)==null?void 0:P.customOrderColumns;v==null?h():c.value=v}else c.value=[];window.changeShowTable&&window.changeShowTable(!b)},{flush:"post"}),{visible:k,customSortList:c,activeKey:p,combSortList:u,getSortOptions:m,onChange:g,onDeleteConfig:()=>{var P;const b=((P=e.unref(i)[t.type])==null?void 0:P.slice())||[],S=b[t.index];delete S.sort,s({[t.type]:b}),N()},onCancel:A,onAddSort:()=>{e.unref(u).push({label:"",columnName:null,type:"COMBINATION",order:null})},handleDeleteSort:b=>{u.value.splice(b,1)},onColumnChange:b=>{const S=e.unref(u).find(P=>P.columnName===b);if(S){const P=t.sortList.find(v=>v.name===b);P&&(S.label=P.label,P.defaultCode?S.defaultCode=P.defaultCode:delete S.defaultCode)}}}}}),Gf="",Vi={class:"button-wrapper"},Li={class:"list-wrapper"},Bi={class:"button-wrapper"},Oi={class:"sort-item"};function Di(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("delete-outlined"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("draggable"),m=e.resolveComponent("a-tabs"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{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.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[1]||(o[1]=C=>t.activeKey=C)},{default:e.withCtx(()=>[e.createVNode(p,{key:"1",tab:"组合排序"},{default:e.withCtx(()=>[e.createElementVNode("div",Vi,[e.createVNode(s,{primary:"",onClick:t.onAddSort},{default:e.withCtx(()=>[e.createTextVNode(" 新增 ")]),_:1},8,["onClick"])]),e.createElementVNode("div",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.combSortList,(C,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sort-row",key:f},[e.createVNode(d,{value:C.columnName,"onUpdate:value":g=>C.columnName=g,style:{width:"200px"},placeholder:"维度/指标",options:t.getSortOptions(C),fieldNames:{label:"label",value:"name"},onChange:t.onColumnChange},null,8,["value","onUpdate:value","options","onChange"]),e.createVNode(d,{value:C.order,"onUpdate:value":g=>C.order=g,style:{"margin-left":"10px",width:"100px"},placeholder:"升/降序"},{default:e.withCtx(()=>[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})]),_:2},1032,["value","onUpdate:value"]),e.createVNode(c,{style:{color:"red","margin-left":"10px"},onClick:g=>t.handleDeleteSort(f)},null,8,["onClick"])]))),128))])]),_:1}),e.createVNode(p,{key:"2",tab:"自定义排序","force-render":""},{default:e.withCtx(()=>[e.createElementVNode("div",Bi,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(u,{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",Oi,e.toDisplayString(C),1)]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["visible","onCancel"])}const Fi=ne(Ei,[["render",Di],["__scopeId","data-v-6a468e35"]]),Ii=e.defineComponent({name:"CustomGroupModal",directives:{focus:la},components:{CloseOutlined:Jt,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 R;const n=e.inject(Me),a=(R=window==null?void 0:window.config)==null?void 0:R.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 x=e.unref(c).map(E=>E.title);return new Set(x)}),u=e.ref([]);e.watch(()=>e.unref(c).length,x=>{u.value=new Array(x).fill(!1)});const m=e.computed(()=>{let x=0;return e.unref(c).forEach(E=>{var _;(_=E.data)==null||_.forEach(O=>{O.checked&&x++})}),x}),h=()=>{const x=e.unref(d);if(!x){M.message.error("创建分组名不能空");return}e.unref(p).has(x)?M.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:x,data:[]}),i=!0)},C=x=>{e.unref(c).splice(x,1),i=!0},f=e.ref(null),g=()=>{if(e.unref(m)===0){M.message.error("当前移入分组已选个数为0");return}const x=e.unref(f);if(x==null){M.message.error("请选择移入分组");return}if(!e.unref(c)[x]){M.message.error("移入分组不存在,请重新选择");return}const E=[],_=e.unref(c).length;for(let O=0;O<_;O++){const $=e.unref(c)[O];e.unref(c)[O].data=$.data.filter(z=>(z.checked&&E.push({...z,checked:!1}),!z.checked))}e.unref(c)[x].data=[...E,...e.unref(c)[x].data],i=!0},k=x=>{e.unref(u)[x]=!0},w=x=>{e.unref(u)[x]=!1},N=(x,E)=>{const _=x.target.value;e.unref(p).has(_)&&M.message.error("组名不能相同,请修改"),e.unref(c)[E].title=_,i=!0},A=e.inject(Ce),y=e.inject(Se),F=e.computed(()=>e.unref(A).source),I=e.computed(()=>e.unref(A).dataViewId),T=e.ref(!1),V=()=>{var W,Q;const x=e.unref(c);let E="";e.unref(T)&&(E=(W=x[0])==null?void 0:W.title);const _=x==null?void 0:x.length,O={};for(let Z=1;Z<_;Z++){const oe=x[Z]||{},{title:ie,data:se}=oe;O[ie]=(se==null?void 0:se.map(Pe=>Pe.label))||[]}const $=((Q=e.unref(A)[t.type])==null?void 0:Q.slice())||[],z=$[t.index];z.customGroup={groupInfoMap:O,otherGroupName:E},y({[t.type]:$})},b=e.ref(!1),S=()=>{b.value=!0},P=()=>{b.value=!1},v=()=>{P(),i&&V(),i=!1},L=()=>{i=!0},D=new Set,B=async()=>{const x=t.item.customGroup||{},E=x.otherGroupName,_=x.groupInfoMap;(E===""||E==null)&&(T.value=!1),e.unref(c)[0]={title:E||"未分组",data:[]};let O=1;for(const $ in _)if(Object.prototype.hasOwnProperty.call(_,$)){const W=_[$].map(Q=>(D.add(Q),{label:Q,checked:!1}));e.unref(c)[O]={title:$,data:W},O++}await U()},U=async()=>{var x;try{const E=await n.post(`${xe}/diagram/groupvalue`,{source:e.unref(F),dataViewId:e.unref(I),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0,edvDataSetId:e.unref(A).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:_,data:O=[]}=E.data;if(_){const $=[];(x=O==null?void 0:O.slice(0,200))==null||x.forEach(z=>{D.has(z)||$.push({label:z,checked:!1})}),e.unref(c)[0].data=$}}catch(E){console.error(E)}};return e.watch(b,x=>{x&&B(),window.changeShowTable&&window.changeShowTable(!x)},{flush:"post"}),o({showModal:S}),{visible:b,title:s,activeKey:l,customGroupList:c,onCancel:v,useOtherGroup:T,selectCount:m,createGroupTitle:d,onAddGroup:h,onDeleteGroup:C,onMoveInGroup:g,selectGroupIndex:f,onEditTitle:k,onTitleChange:N,onFinishEditTitle:w,onUseOtherGroup:L,customGroupEditTitleList:u}}}),zf="",Hf="",$i={class:"custom-group-header"},Pi={class:"move-and-create"},Mi={class:"select-tip"},vi={class:"select-count"},ji={class:"create-group"},Ri={class:"custom-group-content"},Ui=["onClick"],Gi={class:"extra"},zi={class:"custom-group-list"},Hi={class:"text"};function Yi(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"),h=e.resolveComponent("a-checkable-tag"),C=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),g=e.resolveComponent("a-modal"),k=e.resolveDirective("focus");return e.openBlock(),e.createBlock(g,{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",$i,[e.createElementVNode("div",Pi,[e.createElementVNode("div",null,[e.createElementVNode("span",Mi,[e.createTextVNode(" 已选"),e.createElementVNode("span",vi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=w=>t.selectGroupIndex=w),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,N)=>(e.openBlock(),e.createBlock(s,{key:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.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",ji,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=w=>t.createGroupTitle=w),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Ri,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,N)=>(e.openBlock(),e.createBlock(C,{key:N},{header:e.withCtx(()=>[t.customGroupEditTitleList[N]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:A=>t.onTitleChange(A,N),onBlur:A=>t.onFinishEditTitle(N),onPressEnter:A=>t.onFinishEditTitle(N)},null,8,["value","onChange","onBlur","onPressEnter"])),[[k]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(A=>t.onEditTitle(N),["prevent","stop"])},e.toDisplayString(w.title),9,Ui))]),extra:e.withCtx(()=>[e.createElementVNode("div",Gi,[N===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),N!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(A=>t.onDeleteGroup(N),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(A,y)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:A.checked,"onUpdate:checked":F=>A.checked=F,class:"custom-group",key:y},{default:e.withCtx(()=>[e.createElementVNode("span",Hi,e.toDisplayString(A.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Wi=ne(Ii,[["render",Yi],["__scopeId","data-v-a0733a80"]]);let _e=(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 qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo={},Ki={get exports(){return qo},set exports(t){qo=t}};(function(t,o){(function(n,a){t.exports=a()})(qi,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 h=this.quarter()-1;return m?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Ki);const Qi=qo;ue.extend(Qi);const Xi=e.defineComponent({name:"Condition",components:{CloseOutlined:Jt,DownOutlined:Il,AppstoreAddOutlined:Oo,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:Zn},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,dt,Le,Qe,Xe,Je,Be,pt,Ze,at,ut,go,Gt,zt,Ht;const o=(St=window==null?void 0:window.config)==null?void 0:St.pageId,n=e.inject(Ce),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(Cn),s=e.inject(je),d=e.ref(!1),l=ue(),c=e.computed(()=>{var q;const H=[];return(q=e.unref(s))==null||q.forEach(X=>{const{keyName:te="",id:ae="",type:fe}=X;fe==="ecanRangePicker"?H.push({value:`${ae}-startTime`,label:`${te||ae}-开始时间值`,keyName:`${te||ae}-startTime`,id:ae},{value:`${ae}-endTime`,label:`${te||ae}-结束时间值`,keyName:`${te||ae}-endTime`,id:ae}):H.push({value:ae,label:`${te||ae}`,keyName:`${te||ae}`,id:ae})}),H}),p=e.computed(()=>[{label:"父页面",value:"PARENT",id:"PARENT",keyName:"PARENT"},...e.unref(c)]),u=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.dataViewId}),m=e.computed(()=>{var H;return(H=e.unref(n))==null?void 0:H.source}),h=e.ref(!1),C={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},f=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],g=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),k=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),w=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],N=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],A=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],y=e.ref({fieldName:(dt=t.data)==null?void 0:dt.fieldName,fieldType:(Le=t.data)==null?void 0:Le.fieldType,rule:(Qe=t.data)==null?void 0:Qe.rule,id:(Xe=t.data)==null?void 0:Xe.id,fieldValue:F(),label:(Je=t.data)==null?void 0:Je.label,targetSource:"",typeGuid:(Be=t.data)==null?void 0:Be.typeGuid,indexCode:(pt=t.data)==null?void 0:pt.indexCode,indexCodeNum:(Ze=t.data)==null?void 0:Ze.indexCodeNum,dataType:((at=t.data)==null?void 0:at.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((go=t.data)!=null&&go.useCurrentTime),keyValue:(Gt=t.data)==null?void 0:Gt.keyValue,modelKey:(zt=t.data)==null?void 0:zt.modelKey,prop:(Ht=t.data)==null?void 0:Ht.prop});function F(){const{fieldType:H="",dataType:q="",fieldValue:X=""}=t.data;if(H==="DATE"&&q==="time")return X&&ue(X);if(q==="component"){const te=e.unref(c).find(ae=>ae.keyName===X);return te?te.value:X}else return X}const I=e.ref([]),T=e.ref(!1),V=e.computed(()=>y.value.fieldType==="DATE"),b=e.computed(()=>{const H=t.type,{source:q}=e.unref(n);let X=[];const te=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ae=["controlList","sqlConditions","variableList","variableConditions"];if(q==="EDV_DATA_SET")X=I.value;else if(te.includes(H)){let fe=[];for(const j in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),j)&&!ae.includes(j)){const G=e.unref(n)[j];Array.isArray(G)&&(te.includes(j)?fe=fe.concat(G.filter(Y=>Y.show)):fe=fe.concat(G))}X=fe}else["leftAxisList","rightAxisList","indicators"].includes(H)&&(X=e.unref(i));return X.map(fe=>({...fe,label:fe.title||fe.label,value:fe.name}))}),{updateCondition:S,deleteCondition:P,addCondition:v}=e.inject(bn,{updateCondition:(H,q,X)=>{},deleteCondition:(H,q)=>{},addCondition:(H,q,X)=>{}}),L=()=>{P(t.index,t.path)};e.watch(y,H=>{const q=ee.cloneDeep(H);H.fieldType==="DATE"&&H.dataType!=="component"&&H.fieldValue&&(q.fieldValue=H.fieldValue.format(H.dateFormat)),S(q,t.index,t.path)},{deep:!0}),e.watch(d,H=>{y.value.fieldValue="",y.value.useCurrentTime=H});const D=H=>{var re;const q=e.unref(b).find(le=>le.value===H)||{},{name:X,genericType:te,id:ae,edvDataSetId:fe,label:j,typeGuid:G,indexCode:Y,indexCodeNum:K}=q;y.value={id:ae,fieldName:X,fieldType:te,label:j,rule:"",fieldValue:te==="DATE"?null:void 0,targetSource:"",typeGuid:G,indexCode:Y,edvDataSetId:fe,indexCodeNum:K,dataType:"",useCurrentTime:!1,keyValue:((re=e.unref(y))==null?void 0:re.keyValue)||_e(),modelKey:"",prop:""}},B=H=>{const q=e.unref(c).find(X=>X.value===H)||{};e.unref(y).componentId=q.id||""},U=e.computed(()=>{const H=e.unref(y).fieldType;return H==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:H==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:H==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),R=e.computed(()=>{let H="";const q=e.unref(U).find(X=>X.value===e.unref(y).rule);return q&&(H=q.label),H}),x=e.computed(()=>{let H={fontSize:"12px"};return e.unref(R)||(H={...H,position:"absolute",right:"11px",top:"9px"}),H}),E=e.ref([]),_=async()=>{var H;if(!(e.unref(E).length>0))try{const q=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(m),dataViewId:e.unref(u),groupColumn:e.unref(y).fieldName,hrpIndexTypeGuid:e.unref(y).typeGuid,pageId:o,pageFlag:!0,edvDataSetId:e.unref(y).edvDataSetId||""},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:te=[]}=q.data;X&&(E.value=(H=te==null?void 0:te.slice(0,200))==null?void 0:H.map(ae=>({label:ae,value:ae})))}catch(q){console.error(q)}},O=H=>{e.unref(y).rule=H,e.unref(y).fieldValue=e.unref(y).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(H)&&_()},$=H=>{e.unref(y).dataType=H,e.unref(y).fieldValue="",e.unref(y).modelKey="",e.unref(y).prop=""},z=e.ref(),W=H=>{z.value=H,e.unref(y).fieldValue=(H==null?void 0:H.join(","))||""},Q=H=>{const{keyPath:q}=H;e.unref(y).rule=q[0],e.unref(y).dataType=q[1],e.unref(y).dateFormat=q[2],e.unref(y).fieldValue="",e.unref(y).modelKey="",e.unref(y).prop=""};e.onMounted(async()=>{var ae,fe,j,G,Y,K,re,le,J,he;if(y.value.dataType=((ae=t.data)==null?void 0:ae.dataType)||"",y.value.componentId=((fe=t.data)==null?void 0:fe.componentId)||"",y.value.keyValue=(j=t.data)==null?void 0:j.keyValue,y.value.modelKey=(G=t.data)==null?void 0:G.modelKey,y.value.prop=(Y=t.data)==null?void 0:Y.prop,e.unref(y).fieldType==="DATE"){const{activeKey:de,dateCalcTypes:ce=[]}=t.data||{};if(e.unref(y).dateFormat=(K=t.data)==null?void 0:K.dateFormat,e.unref(y).activeKey=de,e.unref(y).calcWays=((re=t.data)==null?void 0:re.calcWays)||[],e.unref(y).dateCalcTypes=ce,e.unref(y).useCurrentTime&&e.unref(y).dataType!=="component"&&(d.value=!0),de===5){const ye=e.unref(y).calcWays[0];if(ye){const me=ye.split("-");e.unref(g).expression=me[0],e.unref(g).around=me[1]}e.unref(g).unit=ce[0]||"YEAR"}else{e.unref(y).radioValue=((le=t.data)==null?void 0:le.radioValue)||"";const ye=e.unref(k).find(me=>{var be;return me.key===((be=t.data)==null?void 0:be.activeKey)});ye&&He(ye,t.data)}}else z.value=((he=(J=t.data)==null?void 0:J.fieldValue)==null?void 0:he.split(","))||[];const{fieldType:H,fieldName:q,rule:X}=y.value;H!=="DATE"&&q&&X&&["IN","NOT_IN"].includes(X)&&_();const{source:te}=e.unref(n);te==="EDV_DATA_SET"&&await a.get(`${xe}/dataset/`+e.unref(n).edvDataSetId||"",{headers:{Authentication:r,operateContext:"ygt"}}).then(de=>{de.data.success&&(console.log(de.data),I.value=de.data.data.column.map(ce=>({...ce,genericType:ce.columnCategory==="0"?"TEXT":ce.columnCategory==="1"?"NUMBER":"DATE",edvDataSetId:de.data.data.id,name:ce.columnName,label:ce.columnName})))}).catch(de=>{console.error(de)})});const Z=H=>{if(e.unref(y).activeKey===H){e.unref(k)[H].radioValue=e.unref(y).radioValue,e.unref(k)[e.unref(y).activeKey]&&(e.unref(k)[e.unref(y).activeKey].radioValue=e.unref(y).radioValue,e.unref(y).radioValue==="1"?e.unref(k)[H].beforeNum=e.unref(y).calcWays[0]:e.unref(y).radioValue==="2"&&(e.unref(k)[H].afterNum=e.unref(y).calcWays[0]));return}e.unref(k).forEach(q=>{q.beforeNum=0,q.afterNum=0,q.radioValue="1",q.value=""})},oe=(H,q)=>{h.value=!0;const X=H.target.value,te=q.type,ae=e.unref(y).dateFormat,fe=Math.abs(q.beforeNum),j=q.afterNum;q.value=pe(X,te,ae,fe,j)},ie=H=>{const q=e.unref(y).activeKey;if(H!==q)return;let X="";q===0?X="years":q===1?X="quarters":q===2?X="months":q===3?X="weeks":q===4&&(X="days");const te=e.unref(y).dateFormat,ae=e.unref(y).radioValue;let fe=0,j=0;return ae==="1"?fe=Math.abs(e.unref(y).calcWays[0]):ae==="2"&&(j=e.unref(y).calcWays[0]),pe(ae,X,te,fe,j)},se=(H,q,X,te)=>{if(h.value=!0,q.radioValue===te){const ae=H.target.value;X==="+"?q.value=ue().add(ae,q.type).format(e.unref(y).dateFormat):q.value=ue().subtract(ae,q.type).format(e.unref(y).dateFormat)}},Pe=(H,q)=>{e.unref(y).calcWays||(e.unref(y).calcWays=[]),e.unref(y).activeKey=q,e.unref(y).radioValue=H.radioValue,H.radioValue==="1"?e.unref(y).calcWays[0]="-"+H.beforeNum:H.radioValue==="2"?e.unref(y).calcWays[0]=H.afterNum:H.radioValue==="3"?q===4?e.unref(y).calcWays[0]="0":e.unref(y).calcWays[0]="BEGIN":H.radioValue==="4"&&(e.unref(y).calcWays[0]="END"),q===0?e.unref(y).dateCalcTypes=["YEAR"]:q===1?e.unref(y).dateCalcTypes=["QUARTER"]:q===2?e.unref(y).dateCalcTypes=["MONTH"]:q===3?e.unref(y).dateCalcTypes=["WEEK"]:q===4&&(e.unref(y).dateCalcTypes=["DAY"]),T.value=!1},ct=()=>{e.unref(y).activeKey=5,e.unref(y).dateCalcTypes=[e.unref(g).unit],e.unref(y).calcWays[0]=`${e.unref(g).expression}-${e.unref(g).around}`,T.value=!1};function He(H,q){const{radioValue:X="",calcWays:te=[]}=q;H.radioValue=X,te!=null&&te.length&&(X==="1"?H.beforeNum=Math.abs(te[0]):X==="2"&&(H.afterNum=te[0]))}function pe(H,q,X,te,ae){if(H==="1")return ue().subtract(te,q).format(X);if(H==="2")return ue().add(ae,q).format(X);if(H==="3"){if(q==="years")return ue().startOf("year").format(X);if(q==="quarters")return ue().startOf("quarter").format(X);if(q==="months")return ue().startOf("month").format(X);if(q==="days")return ue().format(X)}else if(H==="4"){if(q==="years")return ue().endOf("year").format(X);if(q==="quarters")return ue().endOf("quarter").format(X);if(q==="months")return ue().endOf("month").format(X)}return""}const Te=(H,q)=>q.label.toLowerCase().indexOf(H.toLowerCase())>=0,nt=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(y).rule));return{fieldOptions:b,ruleOptions:U,onFieldChange:D,condition:y,valueOptions:E,onRuleChange:O,onDataTypeChange:$,onFieldValueSelectChange:W,fieldValues:z,onDelete:L,isDateType:V,formatList:f,tabDateList:k,compareList:w,menuRule:N,dateBtnLabel:R,downIconStyle:x,popoverVisible:T,dateRadioStyle:C,showTime:h,controlList:c,keyNameOptions:p,dataTypeList:A,customTabData:g,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:nt,handleMenuClick:Q,changeTabInitDate:Z,changeRadioValue:oe,getFieldValue:ie,blurCompare:se,okDatePickConfig:Pe,onChangeComponent:B,filterOption:Te,okCustomConfig:ct,clickConditionMenu:({key:H})=>{v(t.path,t.index,H==="2"?"||":"&&")},dataSetfieldOptions:I}}}),Yf="",Wf="",Ji={class:"condition"},Zi=["title"],es={class:"rule"},ts={class:"data-type"},os={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},ns={class:"popover-content-wrap"},as={key:0,class:"use-current-time"},rs={class:"tabFilterRadio"},ls={key:0},is={key:1},ss={style:{"margin-left":"10px"}},cs={style:{"margin-left":"10px"}},ds={style:{position:"absolute",bottom:"10px"}},ps={style:{display:"flex"}},us={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function fs(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"),h=e.resolveComponent("a-dropdown"),C=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-input"),g=e.resolveComponent("a-checkbox"),k=e.resolveComponent("a-input-number"),w=e.resolveComponent("a-radio"),N=e.resolveComponent("a-radio-group"),A=e.resolveComponent("a-tab-pane"),y=e.resolveComponent("a-tabs"),F=e.resolveComponent("appstore-add-outlined"),I=e.resolveComponent("a-popover"),T=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ji,[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,S)=>(e.openBlock(),e.createBlock(s,{key:S,value:b.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:b.label},e.toDisplayString(b.label),9,Zi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",es,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,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,S=>{var P;return e.openBlock(),e.createBlock(c,{key:S.value,disabled:S.value==="component"&&!((P=t.controlList)!=null&&P.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===b.value&&t.condition.dataType===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,v=>(e.openBlock(),e.createBlock(l,{key:v.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===b.value&&t.condition.dataType===S.value&&t.condition.dateFormat===v.value?"color: #1890FF;":"")},e.toDisplayString(v.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",ts,[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,S)=>(e.openBlock(),e.createBlock(s,{key:S,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",os,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(C,{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(C,{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:e.normalizeStyle({width:t.condition.fieldValue==="PARENT"?"":"calc(100% - 35px)",marginRight:"10px"}),value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=b=>t.condition.fieldValue=b),"filter-option":t.filterOption,options:t.keyNameOptions,onChange:t.onChangeComponent},null,8,["style","value","filter-option","options","onChange"])):e.createCommentVNode("",!0),t.condition.fieldValue==="PARENT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(f,{class:"field-value",value:t.condition.modelKey,"onUpdate:value":o[2]||(o[2]=b=>t.condition.modelKey=b),placeholder:"组件别名",style:{margin:"0"}},null,8,["value"]),e.createVNode(f,{class:"field-value",value:t.condition.prop,"onUpdate:value":o[3]||(o[3]=b=>t.condition.prop=b),placeholder:"属性名"},null,8,["value"])],64)):e.createCommentVNode("",!0),e.createVNode(I,{visible:t.popoverVisible,"onUpdate:visible":o[11]||(o[11]=b=>t.popoverVisible=b),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",ns,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",as,[e.createVNode(g,{checked:t.isUseCurrentTime,"onUpdate:checked":o[4]||(o[4]=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,S)=>(e.openBlock(),e.createBlock(A,{key:S,tab:b.label},{default:e.withCtx(()=>[e.createElementVNode("div",rs,[e.createVNode(N,{value:b.radioValue,"onUpdate:value":P=>b.radioValue=P,onChange:P=>t.changeRadioValue(P,b)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ls,"相对当前时间:"+e.toDisplayString(b.value),1)):(e.openBlock(),e.createElementBlock("div",is,"相对当前时间:"+e.toDisplayString(t.getFieldValue(S)),1)),e.createVNode(w,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(k,{value:b.beforeNum,"onUpdate:value":P=>b.beforeNum=P,min:0,onBlur:P=>t.blurCompare(P,b,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ss,e.toDisplayString(b.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(w,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(k,{value:b.afterNum,"onUpdate:value":P=>b.afterNum=P,min:0,onBlur:P=>t.blurCompare(P,b,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",cs,e.toDisplayString(b.afterLabel),1)]),_:2},1032,["style"]),b.beforeText?(e.openBlock(),e.createBlock(w,{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(w,{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",ds,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[5]||(o[5]=P=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:P=>t.okDatePickConfig(b,S)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(A,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ps,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[6]||(o[6]=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[7]||(o[7]=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[8]||(o[8]=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",us,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[9]||(o[9]=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[10]||(o[10]=b=>{t.popoverVisible=!0})},[e.createVNode(F)])]),_: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[12]||(o[12]=b=>t.condition.fieldValue=b),"filter-option":t.filterOption,options:t.keyNameOptions,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(f,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[13]||(o[13]=b=>t.condition.fieldValue=b)},null,8,["value"])),!t.isDateType&&t.condition.fieldValue==="PARENT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(f,{class:"field-value",value:t.condition.modelKey,"onUpdate:value":o[14]||(o[14]=b=>t.condition.modelKey=b),placeholder:"组件别名",style:{margin:"0"}},null,8,["value"]),e.createVNode(f,{class:"field-value",value:t.condition.prop,"onUpdate:value":o[15]||(o[15]=b=>t.condition.prop=b),placeholder:"属性名"},null,8,["value"])],64)):e.createCommentVNode("",!0),e.createVNode(h,{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(T,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const ms=ne(Xi,[["render",fs],["__scopeId","data-v-93aee962"]]),hs=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:ms}}),qf="",ys={key:0,class:"condition-list"},gs={key:0,class:"condition-container"},bs={key:0,class:"condition-text"},Cs={key:1,class:"condition-text"},ws={class:"conditions"};function ks(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",ys,[(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",gs,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",bs,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Cs,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",ws,[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 _s=ne(hs,[["render",ks],["__scopeId","data-v-553c1496"]]),xs=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=ee.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),Kf="",ia=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Ss={class:"truncations"},Ns={class:"rule"},As={class:"field-value"},Ts={class:"field-value"},Es=ia(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Vs=ia(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ls=["onClick"];function Bs(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",Ss,[(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",Ns,[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",As,[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",Ts,[Es,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Vs]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ls)]))),128))])}const Os=ne(xs,[["render",Bs],["__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},Ds=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),yt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),tt=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...tt(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},sa=(t,o)=>{var f;const n=ee.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;da(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],h=[];for(const g of m){const k=tt((g==null?void 0:g.conditions)||[]);if(k!=null&&k.length){const w=k.filter(N=>pa(N,o)?(N==null?void 0:N.dataType)==="component":!1).map(N=>{const A=pa(N,o),y={};return N!=null&&N.dateFormat&&(y.format=N.dateFormat),{conditionKey:N.fieldName,conditionLabel:N.fieldName,conditionName:N.fieldName,conditionValueType:N.fieldType,id:A.id,keyName:N.fieldValue,rule:N.rule,notGlobal:!0,indexCode:N.indexCode,typeGuid:N.typeGuid,indexCodeNum:N.indexCodeNum,...y}});if(w!=null&&w.length)for(const N of w)h.find(A=>A.keyName===N.keyName)||h.push(N)}}const C=h.length;for(let g=0;g<C;g++){const k=h[g];if(k&&!((f=Object.keys(k))!=null&&f.length)||(k==null?void 0:k.conditionKey)==="parentCode")continue;const{id:w,keyName:N,prop:A,format:y,dataType:F="component",customValue:I}=k,T=ca(k);Ko({sqlCondition:T,renderUsedComponents:o,id:w,dateFormat:y,prop:A,keyName:N,dataType:F,customValue:I}),u.push(T)}for(let g=u.length-1;g>=0;g--){const k=u[g];k.globalCondition||tt(u).find(N=>N.alias===k.alias&&N.globalCondition)&&u.splice(g,1)}return u},Lt=(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||""};Ko({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 ca(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 h=n||o;return h&&s&&(h+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:h,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Fs=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function da(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)da(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=ca(n);Ko({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 Fs)delete n[p]}}function Ko(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(N=>N.id===a),{value:h,format:C="YYYY-MM-DD",operate:f,type:g="",useCurrentTime:k}=m||{},w=r||C;if(ge(g,"date")){let N;if(k?N=ue():N=ue(h),f&&h){const{mode:A,type:y,value:F}=f;if(F)switch(y){case"add":N=N.add(F,A);break;case"minus":N=N.subtract(F,A);break}}if(c&&p&&u)switch(u){case"add":N=N.add(c,p);break;case"minus":N=N.subtract(c,p);break}o.fieldValue=(N==null?void 0:N.format(w))||"",o.dateFormat=w}else if(g==="ecanRangePicker"){const{interval:N,intervalUnit:A,startTime:y,endTime:F}=m||{};let I=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(I=V[V.length-1])}if(!I)return;let T=null;if(k&&(I==="startTime"?T=ue().subtract(N,A):I==="endTime"&&(T=ue())),m[I]&&(T=ue(m[I])),f){const{type:V,value:b,mode:S}=f;switch(V){case"add":T=T&&T.add(b,S);break;case"minus":T=T&&T.subtract(b,S)}}if(c&&p&&u){if(c==="rangeValue"){if(y&&F){const V=ue(F).diff(ue(y),p)+1;switch(u){case"add":T=T&&T.add(V,p);break;case"minus":T=T&&T.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":T=T&&T.add(c,p);break;case"minus":T=T&&T.subtract(c,p)}}if(T&&(o.fieldValue=T==null?void 0:T.format(w)),I==="rangeValue"&&y&&F){const V=Is(w);V&&(o.fieldValue=ue(F).diff(ue(y),V)+1)}o.dateFormat=w}else{const N=h&&h.match(/\{(.+?)\}/g);N!=null&&N.length?o.fieldValue="":o.fieldValue=h}d===""&&(o.fieldValue=l||"")}const Zt=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 pa(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 Is(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 $s=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:_s,TruncationList:Os,AModal:M.Modal,AButton:M.Button,ATabs:M.Tabs,ATabPane:M.TabPane},setup(t,{expose:o}){var L;const n=e.ref("1"),a=()=>{var D;return`添加过滤条件-${((D=t.item)==null?void 0:D.label)||""}`},r=e.inject(Ce),i=e.inject(Se),s=e.inject(je),d=e.computed(()=>{var D;return(D=e.unref(r))==null?void 0:D.dataSourceId}),l=e.inject(Ye),c=e.inject(Wt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),h=e.inject(At),C=D=>{var B;for(const U of D)(B=U.conditions)!=null&&B.length?C(U.conditions):U.keyValue=_e()};e.watch(m,D=>{var B,U,R,x;if(D){if(Array.isArray((B=t.item)==null?void 0:B.conditions)){const E=ee.cloneDeep(((U=t.item)==null?void 0:U.conditions)||[]);C(E),p.value=E}Array.isArray((R=t.item)==null?void 0:R.truncations)?u.value=ee.cloneDeep((x=t.item)==null?void 0:x.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!D)},{flush:"post"});let f=!1;const g=D=>{var B;f=!0,e.unref(p)==null||((B=e.unref(p))==null?void 0:B.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==D?p.value=[{join:D,conditions:[e.unref(p)[0],{keyValue:_e()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===D&&p.value[0].conditions.push({keyValue:_e()}))};e.provide(bn,{updateCondition(D,B,U){var E;f=!0;let R=e.unref(p);const x=U.split("-");if(x!=null&&x.length)for(const _ of x)if(R[_])R=(E=R[_])==null?void 0:E.conditions;else break;Array.isArray(R)&&R[B]&&(R[B]=D)},deleteCondition(D,B){var x,E,_;f=!0;let U=e.unref(p);const R=B.split("-");if(R!=null&&R.length){for(const O of R)if(U[O])U=(x=U[O])==null?void 0:x.conditions;else break;if(Array.isArray(U)&&U[D])if(U.splice(D,1),U.length===1){if(R.length>0){const O=R.length-1,$=R[O],z=R.slice(0,O);let W=e.unref(p),Q="";for(const Z of z)if(W[Z])Q=(E=W[Z])==null?void 0:E.join,W=(_=W[Z])==null?void 0:_.conditions;else break;if(Q===U[0].join){if(Array.isArray(U[0].conditions)){const Z=ee.cloneDeep(U[0].conditions);W.splice(+$,1),W.splice(+$,0,...Z)}}else W[$]=U[0]}}else U.length===0&&(p.value=[])}},addCondition(D,B,U){var _,O;f=!0;let R=e.unref(p),x="";const E=D.split("-");if(E!=null&&E.length){for(const $ of E)if(R[$])x=(_=R[$])==null?void 0:_.join,R=(O=R[$])==null?void 0:O.conditions;else break;if(x===U)R.splice(B+1,0,{keyValue:_e()});else{const $=ee.cloneDeep(R[B]);R[B]={join:U,conditions:[$,{keyValue:_e()}]}}}}});const k=D=>{f=!0,u.value=D},w=e.computed(()=>{var B;const D=[];return(B=e.unref(s))==null||B.forEach(U=>{const{keyName:R="",id:x="",type:E}=U;E==="ecanRangePicker"?D.push({value:`${x}-startTime`,label:`${R||x}-开始时间值`,keyName:`${R||x}-startTime`},{value:`${x}-endTime`,label:`${R||x}-结束时间值`,keyName:`${R||x}-endTime`}):D.push({value:x,label:`${R||x}`,keyName:`${R||x}`})}),D}),N=()=>{var _,O,$;const D=tt(((_=e.unref(r))==null?void 0:_.controlList)||[]),B=((O=e.unref(r)[t.type])==null?void 0:O.slice())||[],U=tt(ee.cloneDeep(B[t.index].conditions));B[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&(($=e.unref(u))!=null&&$.length)&&(B[t.index].truncations=e.unref(u));const R=tt(e.unref(p));for(const z of R)if(z.dataType==="component"&&z.fieldValue){const W=e.unref(w).find(Q=>Q.value===z.fieldValue);W&&(z.fieldValue=W.keyName)}const x=U.filter(z=>!R.find(W=>W.componentId===z.componentId)).filter(z=>!D.find(W=>W.id===z.componentId)),E=R.filter(z=>!U.find(W=>W.componentId===z.componentId));A(x,E),i({[t.type]:B,sqlConditions:sa({...e.unref(r),[t.type]:B},e.unref(s))})};function A(D,B){var R;const U=D.map(x=>({...x,delete:!0})).concat(B.map(x=>({...x,add:!0})));for(const x of U){const E=e.unref(s).find(_=>_.id===x.componentId);if(E){const{type:_,id:O,events:$=[]}=E,z=Zt(_);if(x.add)$.find(W=>{var Q;return W.on===z&&W.target===((Q=e.unref(l))==null?void 0:Q.id)&&W.emit==="refreshData"})||c({id:O,events:[...$,{on:z,target:(R=e.unref(l))==null?void 0:R.id,emit:"refreshData"}].reverse()});else if(x.delete){const W=$.findIndex(Q=>{var Z;return Q.on===z&&Q.target===((Z=e.unref(l))==null?void 0:Z.id)&&Q.emit==="refreshData"});W!==-1&&($.splice(W,1),c({id:O,events:$}))}}}}const y=()=>{m.value=!0},F=()=>{p.value=[],m.value=!1},I=()=>{f&&N(),f=!1,F()},T=()=>{F()},V=e.inject(Me),b=e.unref(e.inject(ve)),S=(L=window==null?void 0:window.config)==null?void 0:L.pageId,P=e.ref([]);e.provide(Cn,P);const v=async D=>{var B;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:U,indexCode:R}=D,x=await V.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:S,dataSourceId:e.unref(d),indexGuid:U,indexCode:R},{headers:{Authentication:b,operateContext:"ygt"}}),{success:E,data:_=[]}=x.data;E&&((B=_==null?void 0:_.dataViewColumns)!=null&&B.length)&&(P.value=_.dataViewColumns.map(O=>({...O,label:O.title||O.label})))}catch(U){console.error(U)}};return e.watch(()=>t.item,D=>{D&&m.value&&e.unref(h)!=="EDV_DATA_SET"&&v(D)}),o({showModal:y}),{visible:m,onOk:I,onCancel:T,handleTitle:a,conditionList:p,truncationList:u,addCondition:g,onUpdatetruncation:k,activeKey:n,source:h}}}),Qf="",Ps={class:"header"},Ms={class:"header"};function vs(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",Ps,[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",Ms,[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 js=ne($s,[["render",vs],["__scopeId","data-v-38f115c6"]]),Rs=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(Ce),r=e.inject(Se),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}}}),Xf="",Us=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Gs={class:"config-name"},zs=Us(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function Hs(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",Gs,[zs,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 Ys=ne(Rs,[["render",Hs],["__scopeId","data-v-de6a1755"]]),Ws=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(Ce),r=e.inject(Se),i=e.inject(je),s=e.inject(Ye),d=e.inject(Wt),l=e.ref(),c=e.computed(()=>{var k;return(k=e.unref(i))==null?void 0:k.filter(w=>w.keyName!=="")});let p=[];const u=k=>{const{sortCpnts:w=[]}=k;p=ee.cloneDeep(w),l.value=ee.cloneDeep(w),n.value=!0},m=()=>{n.value=!1},h=()=>{var y,F;const k=tt(((y=e.unref(a))==null?void 0:y.controlList)||[]),w=p.filter(I=>!e.unref(l).includes(I)).filter(I=>!k.find(T=>T.id===I)),N=e.unref(l).filter(I=>!p.includes(I)).filter(I=>!k.find(T=>T.id===I)),A=w.map(I=>({componentId:I,delete:!0})).concat(N.map(I=>({componentId:I,add:!0})));for(const I of A){const T=e.unref(i).find(V=>V.id===I.componentId);if(T){const{type:V,id:b,events:S=[]}=T,P=Zt(V);if(I.add)S.find(v=>{var L;return v.on===P&&v.target===((L=e.unref(s))==null?void 0:L.id)&&v.emit==="refreshData"})||d({id:b,events:[...S,{on:P,target:(F=e.unref(s))==null?void 0:F.id,emit:"refreshData"}].reverse()});else if(I.delete){const v=S.findIndex(L=>{var D;return L.on===P&&L.target===((D=e.unref(s))==null?void 0:D.id)&&L.emit==="refreshData"});v!==-1&&(S.splice(v,1),d({id:b,events:S}))}}}},C=()=>{var w;h();const k=((w=e.unref(a)[t.type])==null?void 0:w.slice())||[];k[t.index].sortCpnts=l.value,r({[t.type]:k}),m()},f=()=>{m()},g=(k,w)=>{var N;return(N=w==null?void 0:w.keyName)==null?void 0:N.toLowerCase().includes(k==null?void 0:k.toLowerCase())};return o({showModal:u}),{visible:n,onOk:C,onCancel:f,idFilterOption:g,fieldName:l,usedComponentList:c}}}),Jf="",qs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Ks={class:"sort-by-cpnt"},Qs=qs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Xs(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",Ks,[Qs,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 Js=ne(Ws,[["render",Xs],["__scopeId","data-v-08af1ef8"]]),Zs=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(Ce),r=e.inject(Se),i=e.ref(),s=e.ref([]),d=(m,h)=>{const{dimByCount:C=""}=m;i.value=C,s.value=h.filter(f=>["DIM","BUILT_IN_DIM","FIELD"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var h;const m=((h=e.unref(a)[t.type])==null?void 0:h.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,h)=>{var C;return(C=h==null?void 0:h.label)==null?void 0:C.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Zf="",ec=t=>(e.pushScopeId("data-v-aa1c298e"),t=t(),e.popScopeId(),t),tc={class:"dim-by-count"},oc=ec(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function nc(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",tc,[oc,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 ac=ne(Zs,[["render",nc],["__scopeId","data-v-aa1c298e"]]),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},rc=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:Bl},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(Ce),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 S;return b.id!==((S=t.item)==null?void 0:S.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)}}),h=e.ref("1"),C=e.ref(""),f=V=>{const b=document.getElementById("calTextArea");let S=m.value;if(document.selection){const P=document.selection.createRange();P.text=V}else if(typeof b.selectionStart=="number"&&typeof b.selectionEnd=="number"){const P=b.selectionStart,v=b.selectionEnd;let L=P;S=S.substring(0,P)+V+S.substring(v,S.length),L+=V.length,b.selectionStart=b.selectionEnd=L}else S+=V;m.value=S},g=["+","-","*","/","(",")"],k=(V,b)=>{let S="";switch(b){case"name":{S="${"+V+"}";break}case"function":{S=V+"()";break}default:S=V}f(S)},w=[],N=e.ref([]),A=e.ref(!0),y=e.ref([]),F=V=>{var b;for(const S of V)(b=S==null?void 0:S.children)!=null&&b.length?F(S.children):w.push({key:S.key,title:S.title})},I=async()=>{try{const V=await n.get(`${xe}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:b,data:S=[]}=V.data;b&&(S!=null&&S.length)&&(F(S),y.value=S)}catch(V){console.error(V)}},T=V=>{N.value=V,A.value=!1};return e.watch(C,V=>{const b=w.map(S=>S.title.indexOf(V)>-1?Qo(S.key,y.value):null).filter((S,P,v)=>S&&v.indexOf(S)===P);N.value=b,C.value=V,A.value=!0}),e.onMounted(()=>{I()}),{fieldList:p,varList:u,myValue:m,calculMethods:g,funcDescsData:y,searchFuncValue:C,expandedKeys:N,autoExpandParent:A,activeKey:h,selectedElem:k,onExpand:T}}}),em="",tm="",ua=t=>(e.pushScopeId("data-v-69040cfb"),t=t(),e.popScopeId(),t),lc={class:"formula-calculation"},ic={class:"field-area"},sc={style:{"text-align":"center",padding:"10px 0"}},cc=["onClick"],dc=["onClick"],pc={class:"cal_right_bottom"},uc={class:"cal_fu"},fc=["onClick"],mc={class:"function-wrap"},hc={class:"wrap-search"},yc={class:"tree-box"},gc=ua(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"描述:",-1)),bc=ua(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"示例:",-1)),Cc={key:0},wc={style:{color:"#f50"}},kc={key:1},_c=["onClick"],xc={class:"cal_a"};function Sc(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-tooltip"),m=e.resolveComponent("a-tree"),h=e.resolveComponent("double-right-outlined"),C=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",lc,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=g=>t.activeKey=g),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,(g,k)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:k,onClick:w=>t.selectedElem(g.label,"name")},e.toDisplayString(g.label),9,cc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(g,k)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:k,onClick:w=>t.selectedElem(g.variableName,"name")},e.toDisplayString(g.variableName),9,dc))),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]=g=>t.myValue=g),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",pc,[e.createElementVNode("ul",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(g,k)=>(e.openBlock(),e.createElementBlock("li",{onClick:w=>t.selectedElem(g,"symbol"),key:k},e.toDisplayString(g),9,fc))),128))]),e.createVNode(C,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",mc,[e.createElementVNode("div",hc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=g=>t.searchFuncValue=g),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",yc,[e.createVNode(m,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:g,leaf:k,describe:w,exp:N})=>[e.createVNode(u,{placement:"top"},e.createSlots({default:e.withCtx(()=>[g.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Cc,[e.createTextVNode(e.toDisplayString(g.substr(0,g.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",wc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(g.substr(g.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",kc,e.toDisplayString(g),1)),k?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:A=>t.selectedElem(g,"function")},"插入",8,_c)):e.createCommentVNode("",!0)]),_:2},[k?{name:"title",fn:e.withCtx(()=>[e.createElementVNode("div",null,[gc,e.createElementVNode("span",null,e.toDisplayString(w),1)]),e.createElementVNode("div",null,[bc,e.createElementVNode("span",null,e.toDisplayString(N),1)])]),key:"0"}:void 0]),1024)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",xc,[e.createTextVNode(" 更多函数 "),e.createVNode(h,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Nc=ne(rc,[["render",Sc],["__scopeId","data-v-69040cfb"]]),Ac=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Nc,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:ai},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(je),a=e.inject(Ce),r=e.inject(Se),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const v=["leftAxisList","rightAxisList","queryColumnList","indicators"];let L=[];for(const D of v)Object.prototype.hasOwnProperty.call(e.unref(a),D)&&(L=L.concat(e.unref(a)[D]));return L}),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({}),h=e.ref(),C=e.ref(!1),f=e.ref();e.watch(C,v=>{if(v)if(t.mode==="edit"){const{label:L,calcType:D,formula:B,builtInValueSource:U,builtInFormula:R,builtInCalcWay:x}=t.item;if(f.value={label:L,calcType:D,formula:B,builtInValueSource:U,builtInFormula:R,builtInCalcWay:x},R==="DATE_OFFSET"){const E=x.split("-");(E==null?void 0:E.length)===3&&(m.value={value:E[0],unit:E[1],around:E[2]})}}else t.mode==="add"&&(f.value=ee.cloneDeep(p),m.value=ee.cloneDeep(u));else f.value=ee.cloneDeep(p),m.value=ee.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!v)},{immediate:!0,deep:!0});let g=!1;const k=()=>{g=!0},w=v=>{const L=e.unref(i).find(D=>D.id===v);L&&(f.value.builtInCalcWay=L.keyName),g=!0},N=()=>{var U;const v=((U=e.unref(a)[t.type])==null?void 0:U.slice())||[],{label:L,builtInFormula:D}=e.unref(f)||{},B={};if(D==="DATE_OFFSET"&&(B.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const R=_e();v.push({...e.unref(f),...B,id:R,show:!0,name:L})}else t.mode==="edit"&&(v[t.index]={...v[t.index],...e.unref(f),...B,name:L});r({[t.type]:v})},A=()=>{C.value=!0},y=()=>{C.value=!1},F=async(v,L)=>{if(L==="")return Promise.reject(new Error("请输入指标名"));{const D=e.unref(d).find(B=>B.label===L);return D?D.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},I=e.computed(()=>{let v={label:[{required:!0,validator:F,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(v={...v,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),v}),T=()=>{h.value.validate().then(()=>{g&&N(),g=!1,y()})},V=()=>{h.value.clearValidate(),y()},b=()=>{g=!0,e.unref(f).builtInCalcWay=""},S=e.computed(()=>{let v="";const L=e.unref(f).builtInCalcWay,D=e.unref(f).builtInValueSource;if(!D||!L)return v;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{L==="ASC"?v="【"+D+"】由小到大在所有值中的排名":v="【"+D+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{v=`所有【】的
|
|
60
|
+
`,L==="ASC"?v=v+"【"+D+"】由小到大的组内的排名":v=v+"【"+D+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let B="";switch(L){case"SUM":{B="求和";break}case"AVG":{B="求平均值";break}case"MIN":{B="求最小值";break}case"MAX":{B="求最大值";break}}v="将所有【"+D+"】"+B;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let B="";switch(v=`所有【】的
|
|
61
|
+
`,L){case"SUM":{B="求和";break}case"AVG":{B="求平均值";break}case"MIN":{B="求最小值";break}case"MAX":{B="求最大值";break}}v=v+"将所有【"+D+"】"+B;break}}return v}),P=(v,L)=>L.keyName.toLowerCase().indexOf(v.toLowerCase())>=0;return o({showModal:A}),{visible:C,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:T,onChange:k,formRules:I,accessLogic:S,formRef:h,onChangeBuiltInFormula:b,componentList:i,onChangeComponent:w,filterOption:P,offsetConfig:m}}}),om="",nm="",Tc={key:0,class:"accesstip"},Ec={style:{display:"flex","align-items":"center"}};function Vc(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"),h=e.resolveComponent("question-circle-outlined"),C=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{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]=k=>t.formState.label=k),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]=k=>t.formState.calcType=k),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]=k=>t.formState.formula=k),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]=k=>t.formState.builtInFormula=k),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]=k=>t.formState.builtInValueSource=k),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(k,w)=>(e.openBlock(),e.createBlock(l,{key:w,value:k.label,disabled:t.mode==="edit"&&t.item.label===k.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.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]=k=>t.formState.builtInCalcWay=k),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",Tc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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]=k=>t.formState.builtInValueSource=k),"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",Ec,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=k=>t.offsetConfig.value=k),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]=k=>t.offsetConfig.unit=k),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]=k=>t.offsetConfig.around=k),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(C,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(h,{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 Lc=ne(Ac,[["render",Vc],["__scopeId","data-v-33575cd9"]]),Bc=e.defineComponent({name:"DataConfigCard",directives:{focus:la},components:{CalculationModal:Lc,FilterModal:js,CustomGroupModal:Wi,SettingOutlined:ui,DeleteOutlined:qn,CopyOutlined:Sl,InfoCircleOutlined:vl,CustomSortModal:Fi,PlusOutlined:ei,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:Nt,ConfigName:Ys,SortByCpnt:Js,DimByCount:ac},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(Ce),a=e.inject(Se),r=e.inject(je),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(At),l=e.ref(),c=(j={})=>{var K;const{type:G}=t;if(e.unref(d)==="SQL_VIEW")return!0;e.unref(d)==="EDV_DATA_SET"&&a({edvDataSetId:j.parentId});let Y=!1;if(j.scope==="FIELD"&&(Y=!0,j.genericType==="0"&&i.includes(G)&&(Y=!1)),["IDX","BUILT_IN_IDX"].includes(j.scope)?i.includes(G)&&(Y=!0):["DIM","BUILT_IN_DIM"].includes(j.scope)&&s.includes(G)&&(Y=!0),G==="dimensionList"){const re=((K=e.unref(n)[G])==null?void 0:K.slice())||[];(re==null?void 0:re.length)===1&&(Y=!1)}return Y},p=e.computed(()=>e.unref(te).type==="ecanDataSelect"&&t.type==="indicators"),u=(j="{}")=>{var G,Y;try{const K=JSON.parse(j);if(!c(K))return;const re=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(te).type,["list","circulate","scatter"])||e.unref(p))&&re.forEach(he=>{he.show=!1}),h(re,K),K.randomKey=_e(),re.push(K);const{type:le}=t,J={};if(["IDX","BUILT_IN_IDX","FIELD"].includes(K.scope)){const he=((Y=e.unref(n))==null?void 0:Y.variableList)||[];let de=sessionStorage.getItem("indicator-variates");if(K.scope==="FIELD"&&!i.includes(le)&&(de="[]"),de){const ce=JSON.parse(de);if(ce!=null&&ce.length)for(const ye of ce)he.unshift({...ye,dataType:"",id:null,variableValue:e.unref(d)==="EDV_DATA_SET"?ye.defaultValue:null,dateTypeValue:null,format:ye.valueFormat&&ye.valueFormat.toUpperCase()||null,variableName:ye.name,variableType:ye.valueType,label:K.label,randomKey:K.randomKey,keyValue:_e(),disabled:e.unref(d)==="EDV_DATA_SET"})}J.variableList=he,J.variableConditions=Lt(he,r)}a({[t.type]:re,...J}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(K){console.error(K)}},m=(j="{}")=>{var G;try{const{cardItem:Y,type:K,index:re}=JSON.parse(j);if(!c(Y)||K===t.type)return;const le=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];h(le,Y),le.push(Y);const J=e.unref(n)[K].slice()||[];J.splice(re,1),a({[t.type]:le,[K]:J})}catch(Y){console.error(Y)}};function h(j,G){const Y=[];if(j.forEach(K=>{K.label.includes(G.label)&&Y.push(K.label.split(G.label)[1])}),Y.length>=1){for(let K=1;K<=Y.length;K++)if(!Y.includes(K+"")){G.label=G.label+K;break}}}const C=(j,G)=>{var re,le;const Y=(re=j.target)==null?void 0:re.checked,K=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(te).type,["list","circulate"])||e.unref(p))&&K.forEach(J=>{J.show=!1}),K[G].show=Y,a({[t.type]:K})},f=j=>{var Y;const G=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];G.splice(j,1),a({[t.type]:G})},g=()=>{sessionStorage.setItem("indicator-card-item","")},k=j=>{const G=sessionStorage.getItem("indicator-list-item"),Y=sessionStorage.getItem("indicator-card-item");G?u(G):Y&&m(Y)},w=j=>{var he,de;const{newIndex:G,oldIndex:Y,from:K,to:re}=j,le=K.id,J=re.id;if(G>=0&&Y>=0){if(le===J){const ce=((he=e.unref(n)[t.type])==null?void 0:he.slice())||[],ye=ce.splice(Y,1)[0];ye&&(ce.splice(G,0,ye),a({[t.type]:ce}))}else if(t.type===J){const ce=((de=e.unref(n)[J])==null?void 0:de.slice())||[];if(ce!=null&&ce.length){const ye=ce.splice(ce.length-1,1)[0];ye&&(ce.splice(G,0,ye),a({[t.type]:ce}))}}}},N=(j,G)=>{const Y=j.oldIndex,K=G[Y];K&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:K,type:t.type,index:Y}))},A=e.computed(()=>e.unref(n)[t.type]||[]),y=e.ref([]);let F=!1;e.watch(()=>e.unref(A).length,j=>{y.value=new Array(j).fill(!1)},{flush:"post",immediate:!0});const I=j=>{var Y,K,re;const G=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];if((K=G[j])!=null&&K.randomKey){const le=((re=e.unref(n))==null?void 0:re.variableList)||[];for(let J=le.length-1;J>=0;J--)le[J].randomKey===G[j].randomKey&&le.splice(J,1);a({variableConditions:Lt(le,r),variableList:le})}G.splice(j,1),a({[t.type]:G})},T=j=>{y.value[j]=!0},V=()=>{F=!0},b=(j,G,Y)=>{var K,re,le,J;if(y.value[G]=!1,F){const he=(K=j.target)==null?void 0:K.value,de=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[],ce=de.filter(me=>{var be;return(be=me==null?void 0:me.formula)==null?void 0:be.includes(Y)}).map(me=>me.id),ye=de.filter(me=>{var be;return(be=me==null?void 0:me.builtInValueSource)==null?void 0:be.includes(Y)}).map(me=>me.id);if(ce!=null&&ce.length)for(const me of ce){const be=de.find(ft=>ft.id===me);be.formula=be.formula.replaceAll(Y,he)}if(ye!=null&&ye.length)for(const me of ye){const be=de.find(ft=>ft.id===me);be.builtInValueSource=be.builtInValueSource.replaceAll(Y,he)}if(de[G].label=he,(le=de[G])!=null&&le.randomKey){const me=((J=e.unref(n))==null?void 0:J.variableList)||[],be=me.filter(ft=>ft.randomKey===de[G].randomKey);be!=null&&be.length&&be.forEach(ft=>{ft.label=he}),a({variableConditions:Lt(me,r),variableList:me})}a({[t.type]:de})}F=!1},S="DEFAULT",P=e.computed(()=>{const j=[],{scope:G}=e.unref(l)||{},Y=e.unref(n)[t.type]||[];if(G==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const J=ee.cloneDeep(e.unref(l));delete J.show,delete J.truncations,delete J.conditions,J.hrpIndexComplexid+="_code",J.id+="_code",J.typeGuid+="_code",J.label=J.name+"_编码",J.name=J.typeGuid,J.defaultCode=J.typeGuid,j.push(J)}const{leftAxisList:K=[],rightAxisList:re=[],indicators:le=[]}=e.unref(n)||{};return[...Y,...j,...K,...re,...le]}),v=(j={},G,Y="ASC")=>{var de;const{label:K,name:re,id:le,defaultCode:J}=j,he=((de=e.unref(n)[t.type])==null?void 0:de.slice())||[];le===S?delete he[G].sort:he[G].sort={label:K,columnName:re,type:"NORMAL",order:Y,defaultCode:J},a({[t.type]:he})},L=(j={},G="ASC")=>{const K={ASC:"升序",DESC:"降序"}[G],{sort:re}=j,{label:le,order:J}=re||{};return le&&J===G?`${K}(${le})`:K},D=e.ref(),B=e.ref(),U=e.ref(),R=e.ref(),x=(j={},G)=>{var Y;D.value=j,B.value=G,(Y=e.unref(U))==null||Y.showModal(j)},E=j=>"排序"+(j!=null&&j.sort?"(已配置)":""),_=(j={},G)=>{var Y;D.value=j,B.value=G,(Y=e.unref(R))==null||Y.showModal()},O=j=>"自定义分组"+((j==null?void 0:j.customGroup)!=null?"(已配置)":""),$=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],z=[{name:"是",value:1},{name:"否",value:0}],W=(j,G)=>{var K;const Y=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];Y[G].aggregate=j,a({[t.type]:Y})},Q=(j,G)=>{var K;const Y=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];Y[G].distinct=j,a({[t.type]:Y})},Z=(j,G)=>{var K;const Y=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];Y[G].dateFormat=j,a({[t.type]:Y})},oe=(j="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[j]})`,ie=j=>`是否去重(${{0:"否",1:"是"}[j]||"否"})`,se=(j={})=>{var G;return"过滤"+(j!=null&&j.conditions&&((G=j==null?void 0:j.conditions)==null?void 0:G.length)>0?"(已配置)":"")},Pe=e.ref(),ct=e.ref(),He=e.ref(),pe=e.ref(),Te=(j={},G)=>{D.value=j,B.value=G,e.unref(Pe).showModal()},nt=(j={},G)=>{D.value=j,B.value=G,e.unref(ct).showModal(j)},Ut=(j={},G)=>{D.value=j,B.value=G,e.unref(He).showModal(j)},St=(j={},G)=>{D.value=j,B.value=G,e.unref(pe).showModal(j,e.unref(Ht))},dt=e.ref(),Le=e.ref("add"),Qe=(j,G,Y)=>{var K;Le.value=j,j==="edit"&&(D.value=G,B.value=Y),(K=e.unref(dt))==null||K.showModal()},Xe=e.inject(Me),Je=e.unref(e.inject(ve)),Be=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{});e.watch(n,()=>{var j;ge(e.unref(te).type,"scatter")&&((j=e.unref(n))!=null&&j.indicators)&&(Be.value=e.unref(n).indicators.map(G=>({label:G.label,value:G.label})))}),e.watch(()=>n.value.classificationList,()=>{at()});const Ze=e.ref(""),at=async()=>{const{source:j}=e.unref(n);if(j!=="EDV_DATA_SET"||!ge(e.unref(te).type,"select"))return;const{classificationList:G=[]}=e.unref(n),Y=G.find(J=>J.show);if(Y!=null&&Y.parentId){if(e.unref(Ze)===Y.parentId)return;Ze.value=Y.parentId}else{e.unref(n).selectFieldOptions=[],Be.value=[],Ze.value="";return}const K=await Xe.get(`${xe}/dataset/`+Y.parentId,{headers:{Authentication:Je,operateContext:"ygt"}}),{success:re,data:le=[]}=K.data;if(re){const J=le.column.map(he=>({label:he.columnName,value:he.columnName}));e.unref(n).selectFieldOptions=J,Be.value=J}},ut=async()=>{const{source:j}=e.unref(n);if(!ge(e.unref(te).type,"scatter"))try{if(j==="EDV_DATA_SET")await at();else{const G=await Xe.post(`${xe}/diagram/dimFields`,{},{headers:{Authentication:Je,operateContext:"ygt"}}),{success:Y,data:K=[]}=G.data;Y&&(e.unref(n).selectFieldOptions=K||[],Be.value=K)}}catch(G){console.error(G)}},go=(j,G)=>{const Y=e.unref(n)[t.type]||{};Y[G]=j,a({[t.type]:Y})},Gt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],zt=e.ref({}),Ht=e.ref([]),H=async(j,G)=>{var K;const{name:Y}=G;if(!Gt.includes(t.type)&&j&&yt(G,"indexCode")){const re=await Xe.post(`${xe}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(K=window==null?void 0:window.config)==null?void 0:K.pageId},{headers:{Authentication:Je,operateContext:"ygt"}}),{success:le,data:J}=re.data;le&&J&&(Ht.value=(J==null?void 0:J.dataViewColumns)||[],zt.value[Y]={name:J.name,code:J.indexCode})}},q=j=>{l.value=j},X=j=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",j),G.select(),document.execCommand("copy"),document.body.removeChild(G),M.message.success("复制成功")},te=e.inject(Ye),ae=e.computed(()=>t.type==="indicators"&&e.unref(te).type==="ecanTable"),fe=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(te).type==="ecanDataSelect"?Be.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:C,onDropEnd:f,onDragItemEnd:g,onDragItemAdd:k,onDragItemSort:w,onDragItemStart:N,cardItemList:A,onDelete:I,onEdit:T,onCommitLabelChange:b,sortList:P,onSort:v,handleSortTitle:L,showCustomSortModal:x,customSortModalRef:U,currentItem:D,currentIndex:B,handleCustomSortTitle:E,handleCustomGroupTitle:O,customGroupModalRef:R,showCustomGroupModal:_,editLabelList:y,onLabelChange:V,aggregateList:$,distinctList:z,onAggregateChange:W,onDistinctChange:Q,onDateFormatChange:Z,handleAggregateTitle:oe,handleDistinctTitle:ie,onShowCalculationModal:Qe,handleFilterTitle:se,filterModalRef:Pe,configNameRef:ct,sortByCpntRef:He,dimByCountRef:pe,showFilterModal:Te,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:Be,fieldData:pt,onFieldChange:go,onVisibleChange:H,onClickSetting:q,copyDataViewName:X,dataViewMap:zt,isShowConfigName:ae,showConfigNameModal:nt,dimensionType:Gt,isShowSortByCpnt:fe,showSortByCpntModal:Ut,dataSelectIndicators:p,showDimByCountModal:St,selectedComponent:te}}}),am="",rm="",rt=t=>(e.pushScopeId("data-v-9e4b5852"),t=t(),e.popScopeId(),t),Oc={class:"title"},Dc={class:"title-text"},Fc={class:"field-wrap"},Ic={class:"field-item"},$c=rt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Pc={class:"field-item"},Mc=rt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),vc={key:0,class:"field-item"},jc=rt(()=>e.createElementVNode("div",{class:"item-label",style:{width:"20px"}},null,-1)),Rc={class:"title"},Uc={class:"title-text"},Gc=rt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),zc=rt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Hc={class:"card-item-wrap"},Yc={class:"card-item-inner"},Wc=["onClick"],qc=["onClick"],Kc=["onClick"],Qc={style:{display:"flex","align-items":"center"}},Xc=["title"],Jc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Zc={style:{display:"flex","align-items":"center"}},ed=["title"],td=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function od(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-checkbox"),l=e.resolveComponent("a-card"),c=e.resolveComponent("info-circle-outlined"),p=e.resolveComponent("a-popover"),u=e.resolveComponent("plus-outlined"),m=e.resolveComponent("a-input"),h=e.resolveComponent("setting-outlined"),C=e.resolveComponent("a-menu-item"),f=e.resolveComponent("a-menu-divider"),g=e.resolveComponent("a-sub-menu"),k=e.resolveComponent("copy-outlined"),w=e.resolveComponent("a-menu"),N=e.resolveComponent("a-dropdown"),A=e.resolveComponent("delete-outlined"),y=e.resolveComponent("draggable"),F=e.resolveComponent("custom-sort-modal"),I=e.resolveComponent("custom-group-modal"),T=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),b=e.resolveComponent("sort-by-cpnt"),S=e.resolveComponent("dim-by-count"),P=e.resolveComponent("calculation-modal"),v=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(l,{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",Oc,[e.createElementVNode("div",Dc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Fc,[e.createElementVNode("div",Ic,[$c,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=L=>t.onFieldChange(L,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Pc,[Mc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=L=>t.onFieldChange(L,"valueField"))},null,8,["value","options"])]),t.selectedComponent.type==="ecanSelect"?(e.openBlock(),e.createElementBlock("div",vc,[jc,e.createVNode(d,{checked:t.fieldData.hasAllOption,"onUpdate:checked":o[2]||(o[2]=L=>t.fieldData.hasAllOption=L)},{default:e.withCtx(()=>[e.createTextVNode(" 显示【全部】选项 ")]),_:1},8,["checked"])])):e.createCommentVNode("",!0)])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(l,{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",Rc,[e.createElementVNode("div",Uc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(p,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Gc]),default:e.withCtx(()=>[e.createVNode(c,{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[3]||(o[3]=e.withModifiers(L=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(u,{class:"add-calculation-icon"}),zc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(y,{modelValue:t.cardItemList,"onUpdate:modelValue":o[4]||(o[4]=L=>t.cardItemList=L),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[5]||(o[5]=L=>t.onDragItemStart(L,t.cardItemList))},{item:e.withCtx(({element:L,index:D})=>[e.createElementVNode("div",Hc,[e.createVNode(d,{class:"card-item",checked:L.show,onChange:B=>t.onCheckboxChange(B,D)},{default:e.withCtx(()=>[e.createElementVNode("div",Yc,[!t.editLabelList[D]&&L.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(B=>t.onEdit(D),["prevent","stop"])},e.toDisplayString(L.label),9,Wc)):e.createCommentVNode("",!0),!t.editLabelList[D]&&!L.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(B=>t.onEdit(D),["prevent","stop"])}," 请点击填入名字 ",8,qc)):e.createCommentVNode("",!0),t.editLabelList[D]?e.withDirectives((e.openBlock(),e.createBlock(m,{key:2,"default-value":L.label,size:"small",onBlur:B=>t.onCommitLabelChange(B,D,L.label),onPressEnter:B=>t.onCommitLabelChange(B,D,L.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[v]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(L.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(B=>t.onShowCalculationModal("edit",L,D),["prevent","stop"])}," fx ",8,Kc)):e.createCommentVNode("",!0),e.createVNode(N,{trigger:["click"],onVisibleChange:B=>t.onVisibleChange(B,L)},{overlay:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{onClick:B=>t.showCustomSortModal(L,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(L)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(C,{onClick:B=>t.showCustomGroupModal(L,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(L)),1)]),_:2},1032,["onClick"]),e.createVNode(f),L.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(g,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,B=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:B.value,onClick:U=>t.onDateFormatChange(B.value,D)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(L.dateFormat===B.value||!L.dateFormat&&B.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(C,{onClick:B=>t.showFilterModal(L,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(L)),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(g,{title:t.handleAggregateTitle(L.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,B=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:B.value,onClick:U=>t.onAggregateChange(B.value,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.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(C,{onClick:B=>t.showConfigNameModal(L,D)},{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(C,{onClick:B=>t.showSortByCpntModal(L,D)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),L.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(C,{onClick:B=>t.showDimByCountModal(L,D)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{title:t.handleDistinctTitle(L.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,B=>(e.openBlock(),e.createBlock(C,{style:{"white-space":"nowrap"},key:B.value,onClick:U=>t.onDistinctChange(B.value,D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.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[L.name]?(e.openBlock(),e.createBlock(C,{key:0,onClick:B=>t.copyDataViewName(t.dataViewMap[L.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Qc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[L.name].name},[Jc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[L.name].name),1)],8,Xc),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[L.name]?(e.openBlock(),e.createBlock(C,{key:1,onClick:B=>t.copyDataViewName(t.dataViewMap[L.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Zc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[L.name].code},[td,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[L.name].code),1)],8,ed),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(h,{class:"setting-icon",onClick:B=>t.onClickSetting(L)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(A,{class:"delete-icon",onClick:e.withModifiers(B=>t.onDelete(D),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(F,{item:t.currentItem,index:t.currentIndex,type:t.type,sortList:t.sortList,ref:"customSortModalRef"},null,8,["item","index","type","sortList"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(T,{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(S,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(P,{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 nd=ne(Bc,[["render",od],["__scopeId","data-v-9e4b5852"]]),ad={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},rd=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:nd},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 g,k;const l=ee.cloneDeep((g=e.unref(t))==null?void 0:g.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"],scatter:["classificationList","indicators","formFields"],pivotTable:["queryColumnList","indicators"]},u="ecan";let m=e.unref(o);if(m.startsWith(u)){const w=u.length;m=((k=m.slice(w,w+1))==null?void 0:k.toLowerCase())+m.slice(w+1)}const h=p[m],C=ad,f=(h==null?void 0:h.length)||0;for(let w=0;w<f;w++){const N=h[w];if(!N)break;r.push({...C[N],type:N})}for(const w of c)s(l,w)&&!h.find(N=>N===w)&&(l[w]=[]);i(l)})(),{cardsMap:a,cards:r}}}),lm="",im="",ld={class:"data-group"};function id(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",ld,[(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 sd=ne(rd,[["render",id],["__scopeId","data-v-8b6475b7"]]),cd=[{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"]}],dd={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"}},pd=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 ud(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 fd=ne(pd,[["render",ud]]),md=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 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 hd(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 fa=ne(md,[["render",hd]]),yd=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 gd(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 bd=ne(yd,[["render",gd]]),Cd=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 wd(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 kd=ne(Cd,[["render",wd]]),_d=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 xd(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 Sd=ne(_d,[["render",xd]]);var Ne="top",De="bottom",Fe="right",Ae="left",Xo="auto",Bt=[Ne,De,Fe,Ae],gt="start",Ot="end",Nd="clippingParents",ma="viewport",Dt="popper",Ad="reference",ha=Bt.reduce(function(t,o){return t.concat([o+"-"+gt,o+"-"+Ot])},[]),ya=[].concat(Bt,[Xo]).reduce(function(t,o){return t.concat([o,o+"-"+gt,o+"-"+Ot])},[]),Td="beforeRead",Ed="read",Vd="afterRead",Ld="beforeMain",Bd="main",Od="afterMain",Dd="beforeWrite",Fd="write",Id="afterWrite",$d=[Td,Ed,Vd,Ld,Bd,Od,Dd,Fd,Id];function Ue(t){return t?(t.nodeName||"").toLowerCase():null}function Ve(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function lt(t){var o=Ve(t).Element;return t instanceof o||t instanceof Element}function Ie(t){var o=Ve(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Jo(t){if(typeof ShadowRoot>"u")return!1;var o=Ve(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Pd(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];!Ie(i)||!Ue(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 Md(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},{});!Ie(r)||!Ue(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const vd={name:"applyStyles",enabled:!0,phase:"write",fn:Pd,effect:Md,requires:["computeStyles"]};function Ge(t){return t.split("-")[0]}var it=Math.max,eo=Math.min,bt=Math.round;function Zo(){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 ga(){return!/^((?!chrome|android).)*safari/i.test(Zo())}function Ct(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Ie(t)&&(r=t.offsetWidth>0&&bt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&bt(a.height)/t.offsetHeight||1);var s=lt(t)?Ve(t):window,d=s.visualViewport,l=!ga()&&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 en(t){var o=Ct(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 ba(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Jo(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 Ve(t).getComputedStyle(t)}function jd(t){return["table","td","th"].indexOf(Ue(t))>=0}function ot(t){return((lt(t)?t.ownerDocument:t.document)||window.document).documentElement}function to(t){return Ue(t)==="html"?t:t.assignedSlot||t.parentNode||(Jo(t)?t.host:null)||ot(t)}function Ca(t){return!Ie(t)||qe(t).position==="fixed"?null:t.offsetParent}function Rd(t){var o=/firefox/i.test(Zo()),n=/Trident/i.test(Zo());if(n&&Ie(t)){var a=qe(t);if(a.position==="fixed")return null}var r=to(t);for(Jo(r)&&(r=r.host);Ie(r)&&["html","body"].indexOf(Ue(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=Ve(t),n=Ca(t);n&&jd(n)&&qe(n).position==="static";)n=Ca(n);return n&&(Ue(n)==="html"||Ue(n)==="body"&&qe(n).position==="static")?o:n||Rd(t)||o}function tn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function It(t,o,n){return it(t,eo(o,n))}function Ud(t,o,n){var a=It(t,o,n);return a>n?n:a}function wa(){return{top:0,right:0,bottom:0,left:0}}function ka(t){return Object.assign({},wa(),t)}function _a(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Gd=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ka(typeof o!="number"?o:_a(o,Bt))};function zd(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ge(n.placement),l=tn(d),c=[Ae,Fe].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Gd(r.padding,n),m=en(i),h=l==="y"?Ne:Ae,C=l==="y"?De:Fe,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],g=s[l]-n.rects.reference[l],k=Ft(i),w=k?l==="y"?k.clientHeight||0:k.clientWidth||0:0,N=f/2-g/2,A=u[h],y=w-m[p]-u[C],F=w/2-m[p]/2+N,I=It(A,F,y),T=l;n.modifiersData[a]=(o={},o[T]=I,o.centerOffset=I-F,o)}}function Hd(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)||ba(o.elements.popper,r)&&(o.elements.arrow=r))}const Yd={name:"arrow",enabled:!0,phase:"main",fn:zd,effect:Hd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wt(t){return t.split("-")[1]}var Wd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:bt(n*r)/r||0,y:bt(a*r)/r||0}}function xa(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,h=m===void 0?0:m,C=s.y,f=C===void 0?0:C,g=typeof p=="function"?p({x:h,y:f}):{x:h,y:f};h=g.x,f=g.y;var k=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),N=Ae,A=Ne,y=window;if(c){var F=Ft(n),I="clientHeight",T="clientWidth";if(F===Ve(n)&&(F=ot(n),qe(F).position!=="static"&&d==="absolute"&&(I="scrollHeight",T="scrollWidth")),F=F,r===Ne||(r===Ae||r===Fe)&&i===Ot){A=De;var V=u&&F===y&&y.visualViewport?y.visualViewport.height:F[I];f-=V-a.height,f*=l?1:-1}if(r===Ae||(r===Ne||r===De)&&i===Ot){N=Fe;var b=u&&F===y&&y.visualViewport?y.visualViewport.width:F[T];h-=b-a.width,h*=l?1:-1}}var S=Object.assign({position:d},c&&Wd),P=p===!0?qd({x:h,y:f},Ve(n)):{x:h,y:f};if(h=P.x,f=P.y,l){var v;return Object.assign({},S,(v={},v[A]=w?"0":"",v[N]=k?"0":"",v.transform=(y.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",v))}return Object.assign({},S,(o={},o[A]=w?f+"px":"",o[N]=k?h+"px":"",o.transform="",o))}function Kd(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:Ge(o.placement),variation:wt(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,xa(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,xa(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 Qd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kd,data:{}};var oo={passive:!0};function Xd(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=Ve(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,oo)}),d&&l.addEventListener("resize",n.update,oo),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,oo)}),d&&l.removeEventListener("resize",n.update,oo)}}const Jd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Xd,data:{}};var Zd={left:"right",right:"left",bottom:"top",top:"bottom"};function no(t){return t.replace(/left|right|bottom|top/g,function(o){return Zd[o]})}var ep={start:"end",end:"start"};function Sa(t){return t.replace(/start|end/g,function(o){return ep[o]})}function on(t){var o=Ve(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function nn(t){return Ct(ot(t)).left+on(t).scrollLeft}function tp(t,o){var n=Ve(t),a=ot(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=ga();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+nn(t),y:l}}function op(t){var o,n=ot(t),a=on(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=it(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=it(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+nn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=it(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function an(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Na(t){return["html","body","#document"].indexOf(Ue(t))>=0?t.ownerDocument.body:Ie(t)&&an(t)?t:Na(to(t))}function $t(t,o){var n;o===void 0&&(o=[]);var a=Na(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Ve(a),s=r?[i].concat(i.visualViewport||[],an(a)?a:[]):a,d=o.concat(s);return r?d:d.concat($t(to(s)))}function rn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function np(t,o){var n=Ct(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 Aa(t,o,n){return o===ma?rn(tp(t,n)):lt(o)?np(o,n):rn(op(ot(t)))}function ap(t){var o=$t(to(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Ie(t)?Ft(t):t;return lt(a)?o.filter(function(r){return lt(r)&&ba(r,a)&&Ue(r)!=="body"}):[]}function rp(t,o,n,a){var r=o==="clippingParents"?ap(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=Aa(t,c,a);return l.top=it(p.top,l.top),l.right=eo(p.right,l.right),l.bottom=eo(p.bottom,l.bottom),l.left=it(p.left,l.left),l},Aa(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 Ta(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ge(a):null,i=a?wt(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Ne:l={x:s,y:o.y-n.height};break;case De:l={x:s,y:o.y+o.height};break;case Fe:l={x:o.x+o.width,y:d};break;case Ae:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?tn(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case gt: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 Pt(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?Nd:d,c=n.rootBoundary,p=c===void 0?ma:c,u=n.elementContext,m=u===void 0?Dt:u,h=n.altBoundary,C=h===void 0?!1:h,f=n.padding,g=f===void 0?0:f,k=ka(typeof g!="number"?g:_a(g,Bt)),w=m===Dt?Ad:Dt,N=t.rects.popper,A=t.elements[C?w:m],y=rp(lt(A)?A:A.contextElement||ot(t.elements.popper),l,p,s),F=Ct(t.elements.reference),I=Ta({reference:F,element:N,strategy:"absolute",placement:r}),T=rn(Object.assign({},N,I)),V=m===Dt?T:F,b={top:y.top-V.top+k.top,bottom:V.bottom-y.bottom+k.bottom,left:y.left-V.left+k.left,right:V.right-y.right+k.right},S=t.modifiersData.offset;if(m===Dt&&S){var P=S[r];Object.keys(b).forEach(function(v){var L=[Fe,De].indexOf(v)>=0?1:-1,D=[Ne,De].indexOf(v)>=0?"y":"x";b[v]+=P[D]*L})}return b}function lp(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?ya:l,p=wt(a),u=p?d?ha:ha.filter(function(C){return wt(C)===p}):Bt,m=u.filter(function(C){return c.indexOf(C)>=0});m.length===0&&(m=u);var h=m.reduce(function(C,f){return C[f]=Pt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ge(f)],C},{});return Object.keys(h).sort(function(C,f){return h[C]-h[f]})}function ip(t){if(Ge(t)===Xo)return[];var o=no(t);return[Sa(t),o,Sa(o)]}function sp(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,h=n.flipVariations,C=h===void 0?!0:h,f=n.allowedAutoPlacements,g=o.options.placement,k=Ge(g),w=k===g,N=l||(w||!C?[no(g)]:ip(g)),A=[g].concat(N).reduce(function(z,W){return z.concat(Ge(W)===Xo?lp(o,{placement:W,boundary:p,rootBoundary:u,padding:c,flipVariations:C,allowedAutoPlacements:f}):W)},[]),y=o.rects.reference,F=o.rects.popper,I=new Map,T=!0,V=A[0],b=0;b<A.length;b++){var S=A[b],P=Ge(S),v=wt(S)===gt,L=[Ne,De].indexOf(P)>=0,D=L?"width":"height",B=Pt(o,{placement:S,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),U=L?v?Fe:Ae:v?De:Ne;y[D]>F[D]&&(U=no(U));var R=no(U),x=[];if(i&&x.push(B[P]<=0),d&&x.push(B[U]<=0,B[R]<=0),x.every(function(z){return z})){V=S,T=!1;break}I.set(S,x)}if(T)for(var E=C?3:1,_=function(W){var Q=A.find(function(Z){var oe=I.get(Z);if(oe)return oe.slice(0,W).every(function(ie){return ie})});if(Q)return V=Q,"break"},O=E;O>0;O--){var $=_(O);if($==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const cp={name:"flip",enabled:!0,phase:"main",fn:sp,requiresIfExists:["offset"],data:{_skip:!1}};function Ea(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 Va(t){return[Ne,Fe,De,Ae].some(function(o){return t[o]>=0})}function dp(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=Pt(o,{elementContext:"reference"}),d=Pt(o,{altBoundary:!0}),l=Ea(s,a),c=Ea(d,r,i),p=Va(l),u=Va(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 pp={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dp};function up(t,o,n){var a=Ge(t),r=[Ae,Ne].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,[Ae,Fe].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function fp(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ya.reduce(function(p,u){return p[u]=up(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 mp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fp};function hp(t){var o=t.state,n=t.name;o.modifiersData[n]=Ta({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const yp={name:"popperOffsets",enabled:!0,phase:"read",fn:hp,data:{}};function gp(t){return t==="x"?"y":"x"}function bp(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,h=m===void 0?!0:m,C=n.tetherOffset,f=C===void 0?0:C,g=Pt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),k=Ge(o.placement),w=wt(o.placement),N=!w,A=tn(k),y=gp(A),F=o.modifiersData.popperOffsets,I=o.rects.reference,T=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),S=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,P={x:0,y:0};if(F){if(i){var v,L=A==="y"?Ne:Ae,D=A==="y"?De:Fe,B=A==="y"?"height":"width",U=F[A],R=U+g[L],x=U-g[D],E=h?-T[B]/2:0,_=w===gt?I[B]:T[B],O=w===gt?-T[B]:-I[B],$=o.elements.arrow,z=h&&$?en($):{width:0,height:0},W=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:wa(),Q=W[L],Z=W[D],oe=It(0,I[B],z[B]),ie=N?I[B]/2-E-oe-Q-b.mainAxis:_-oe-Q-b.mainAxis,se=N?-I[B]/2+E+oe+Z+b.mainAxis:O+oe+Z+b.mainAxis,Pe=o.elements.arrow&&Ft(o.elements.arrow),ct=Pe?A==="y"?Pe.clientTop||0:Pe.clientLeft||0:0,He=(v=S==null?void 0:S[A])!=null?v:0,pe=U+ie-He-ct,Te=U+se-He,nt=It(h?eo(R,pe):R,U,h?it(x,Te):x);F[A]=nt,P[A]=nt-U}if(d){var Ut,St=A==="x"?Ne:Ae,dt=A==="x"?De:Fe,Le=F[y],Qe=y==="y"?"height":"width",Xe=Le+g[St],Je=Le-g[dt],Be=[Ne,Ae].indexOf(k)!==-1,pt=(Ut=S==null?void 0:S[y])!=null?Ut:0,Ze=Be?Xe:Le-I[Qe]-T[Qe]-pt+b.altAxis,at=Be?Le+I[Qe]+T[Qe]-pt-b.altAxis:Je,ut=h&&Be?Ud(Ze,Le,at):It(h?Ze:Xe,Le,h?at:Je);F[y]=ut,P[y]=ut-Le}o.modifiersData[a]=P}}const Cp={name:"preventOverflow",enabled:!0,phase:"main",fn:bp,requiresIfExists:["offset"]};function wp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function kp(t){return t===Ve(t)||!Ie(t)?on(t):wp(t)}function _p(t){var o=t.getBoundingClientRect(),n=bt(o.width)/t.offsetWidth||1,a=bt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function xp(t,o,n){n===void 0&&(n=!1);var a=Ie(o),r=Ie(o)&&_p(o),i=ot(o),s=Ct(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Ue(o)!=="body"||an(i))&&(d=kp(o)),Ie(o)?(l=Ct(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=nn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function Sp(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 Np(t){var o=Sp(t);return $d.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Ap(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Tp(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 La={placement:"bottom",modifiers:[],strategy:"absolute"};function Ba(){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 Ep(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?La:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},La,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,h={state:p,setOptions:function(k){var w=typeof k=="function"?k(p.options):k;f(),p.options=Object.assign({},i,p.options,w),p.scrollParents={reference:lt(d)?$t(d):d.contextElement?$t(d.contextElement):[],popper:$t(l)};var N=Np(Tp([].concat(a,p.options.modifiers)));return p.orderedModifiers=N.filter(function(A){return A.enabled}),C(),h.update()},forceUpdate:function(){if(!m){var k=p.elements,w=k.reference,N=k.popper;if(Ba(w,N)){p.rects={reference:xp(w,Ft(N),p.options.strategy==="fixed"),popper:en(N)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(b){return p.modifiersData[b.name]=Object.assign({},b.data)});for(var A=0;A<p.orderedModifiers.length;A++){if(p.reset===!0){p.reset=!1,A=-1;continue}var y=p.orderedModifiers[A],F=y.fn,I=y.options,T=I===void 0?{}:I,V=y.name;typeof F=="function"&&(p=F({state:p,options:T,name:V,instance:h})||p)}}}},update:Ap(function(){return new Promise(function(g){h.forceUpdate(),g(p)})}),destroy:function(){f(),m=!0}};if(!Ba(d,l))return h;h.setOptions(c).then(function(g){!m&&c.onFirstUpdate&&c.onFirstUpdate(g)});function C(){p.orderedModifiers.forEach(function(g){var k=g.name,w=g.options,N=w===void 0?{}:w,A=g.effect;if(typeof A=="function"){var y=A({state:p,name:k,instance:h,options:N}),F=function(){};u.push(y||F)}})}function f(){u.forEach(function(g){return g()}),u=[]}return h}}var Vp=[Jd,yp,Qd,vd,mp,cp,Cp,Yd,pp],Lp=Ep({defaultModifiers:Vp});function ln(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 Oa(t,o){if(t){if(typeof t=="string")return ln(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)?ln(t,o):void 0}}function Bp(t){return function(o){if(Array.isArray(o))return ln(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Oa(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 kt(t){return kt=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},kt(t)}function Da(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 Fa(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){Da(i,a,r,s,d,"next",l)}function d(l){Da(i,a,r,s,d,"throw",l)}s(void 0)})}}var Ia={exports:{}},$a={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})($a),function(t){var o=$a.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(x,E,_){x[E]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(x,E,_){return Object.defineProperty(x,E,{value:_,enumerable:!0,configurable:!0,writable:!0}),x[E]}try{m({},"")}catch{m=function(E,_,O){return E[_]=O}}function h(x,E,_,O){var $=E&&E.prototype instanceof A?E:A,z=Object.create($.prototype),W=new U(O||[]);return d(z,"_invoke",{value:v(x,_,W)}),z}function C(x,E,_){try{return{type:"normal",arg:x.call(E,_)}}catch(O){return{type:"throw",arg:O}}}r.wrap=h;var f="suspendedStart",g="suspendedYield",k="executing",w="completed",N={};function A(){}function y(){}function F(){}var I={};m(I,c,function(){return this});var T=Object.getPrototypeOf,V=T&&T(T(R([])));V&&V!==i&&s.call(V,c)&&(I=V);var b=F.prototype=A.prototype=Object.create(I);function S(x){["next","throw","return"].forEach(function(E){m(x,E,function(_){return this._invoke(E,_)})})}function P(x,E){function _($,z,W,Q){var Z=C(x[$],x,z);if(Z.type!=="throw"){var oe=Z.arg,ie=oe.value;return ie&&o(ie)=="object"&&s.call(ie,"__await")?E.resolve(ie.__await).then(function(se){_("next",se,W,Q)},function(se){_("throw",se,W,Q)}):E.resolve(ie).then(function(se){oe.value=se,W(oe)},function(se){return _("throw",se,W,Q)})}Q(Z.arg)}var O;d(this,"_invoke",{value:function($,z){function W(){return new E(function(Q,Z){_($,z,Q,Z)})}return O=O?O.then(W,W):W()}})}function v(x,E,_){var O=f;return function($,z){if(O===k)throw new Error("Generator is already running");if(O===w){if($==="throw")throw z;return{value:a,done:!0}}for(_.method=$,_.arg=z;;){var W=_.delegate;if(W){var Q=L(W,_);if(Q){if(Q===N)continue;return Q}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(O===f)throw O=w,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);O=k;var Z=C(x,E,_);if(Z.type==="normal"){if(O=_.done?w:g,Z.arg===N)continue;return{value:Z.arg,done:_.done}}Z.type==="throw"&&(O=w,_.method="throw",_.arg=Z.arg)}}}function L(x,E){var _=E.method,O=x.iterator[_];if(O===a)return E.delegate=null,_==="throw"&&x.iterator.return&&(E.method="return",E.arg=a,L(x,E),E.method==="throw")||_!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+_+"' method")),N;var $=C(O,x.iterator,E.arg);if($.type==="throw")return E.method="throw",E.arg=$.arg,E.delegate=null,N;var z=$.arg;return z?z.done?(E[x.resultName]=z.value,E.next=x.nextLoc,E.method!=="return"&&(E.method="next",E.arg=a),E.delegate=null,N):z:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,N)}function D(x){var E={tryLoc:x[0]};1 in x&&(E.catchLoc=x[1]),2 in x&&(E.finallyLoc=x[2],E.afterLoc=x[3]),this.tryEntries.push(E)}function B(x){var E=x.completion||{};E.type="normal",delete E.arg,x.completion=E}function U(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(D,this),this.reset(!0)}function R(x){if(x||x===""){var E=x[c];if(E)return E.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var _=-1,O=function $(){for(;++_<x.length;)if(s.call(x,_))return $.value=x[_],$.done=!1,$;return $.value=a,$.done=!0,$};return O.next=O}}throw new TypeError(o(x)+" is not iterable")}return y.prototype=F,d(b,"constructor",{value:F,configurable:!0}),d(F,"constructor",{value:y,configurable:!0}),y.displayName=m(F,u,"GeneratorFunction"),r.isGeneratorFunction=function(x){var E=typeof x=="function"&&x.constructor;return!!E&&(E===y||(E.displayName||E.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,F):(x.__proto__=F,m(x,u,"GeneratorFunction")),x.prototype=Object.create(b),x},r.awrap=function(x){return{__await:x}},S(P.prototype),m(P.prototype,p,function(){return this}),r.AsyncIterator=P,r.async=function(x,E,_,O,$){$===void 0&&($=Promise);var z=new P(h(x,E,_,O),$);return r.isGeneratorFunction(E)?z:z.next().then(function(W){return W.done?W.value:z.next()})},S(b),m(b,u,"Generator"),m(b,c,function(){return this}),m(b,"toString",function(){return"[object Generator]"}),r.keys=function(x){var E=Object(x),_=[];for(var O in E)_.push(O);return _.reverse(),function $(){for(;_.length;){var z=_.pop();if(z in E)return $.value=z,$.done=!1,$}return $.done=!0,$}},r.values=R,U.prototype={constructor:U,reset:function(x){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(B),!x)for(var E in this)E.charAt(0)==="t"&&s.call(this,E)&&!isNaN(+E.slice(1))&&(this[E]=a)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var E=this;function _(Z,oe){return z.type="throw",z.arg=x,E.next=Z,oe&&(E.method="next",E.arg=a),!!oe}for(var O=this.tryEntries.length-1;O>=0;--O){var $=this.tryEntries[O],z=$.completion;if($.tryLoc==="root")return _("end");if($.tryLoc<=this.prev){var W=s.call($,"catchLoc"),Q=s.call($,"finallyLoc");if(W&&Q){if(this.prev<$.catchLoc)return _($.catchLoc,!0);if(this.prev<$.finallyLoc)return _($.finallyLoc)}else if(W){if(this.prev<$.catchLoc)return _($.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return _($.finallyLoc)}}}},abrupt:function(x,E){for(var _=this.tryEntries.length-1;_>=0;--_){var O=this.tryEntries[_];if(O.tryLoc<=this.prev&&s.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var $=O;break}}$&&(x==="break"||x==="continue")&&$.tryLoc<=E&&E<=$.finallyLoc&&($=null);var z=$?$.completion:{};return z.type=x,z.arg=E,$?(this.method="next",this.next=$.finallyLoc,N):this.complete(z)},complete:function(x,E){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&E&&(this.next=E),N},finish:function(x){for(var E=this.tryEntries.length-1;E>=0;--E){var _=this.tryEntries[E];if(_.finallyLoc===x)return this.complete(_.completion,_.afterLoc),B(_),N}},catch:function(x){for(var E=this.tryEntries.length-1;E>=0;--E){var _=this.tryEntries[E];if(_.tryLoc===x){var O=_.completion;if(O.type==="throw"){var $=O.arg;B(_)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(x,E,_){return this.delegate={iterator:R(x),resultName:E,nextLoc:_},this.method==="next"&&(this.arg=a),N}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ia);var ao=Ia.exports(),ro=ao;try{regeneratorRuntime=ao}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ao:Function("r","regeneratorRuntime = r")(ao)}function Op(t){var o=function(n,a){if(kt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(kt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return kt(o)==="symbol"?o:String(o)}function sn(t,o,n){return(o=Op(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var lo=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,h=u-d;m<0&&(m=0),h<0&&(h=0),m>t.size&&(m=t.size),h>t.size&&(h=t.size);var C=m/t.size*100,f=100-h/t.size*100;n("change",C,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Pa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Dp=Pa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Fp=Pa(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}"),lo.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"]))},[Dp,Fp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},lo.__scopeId="data-v-24517fec",lo.__file="src/picker/Saturation.vue";var io=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)})}}}}),Ip={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}"),io.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",Ip,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},io.__scopeId="data-v-78b9f4f0",io.__file="src/picker/Hue.vue";var so=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)})}}}}),$p={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}"),so.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",$p,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},so.__scopeId="data-v-24dc9656",so.__file="src/picker/Alpha.vue";var co=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")}}}}),Pp={class:"input"},Mp={class:"label"},vp=[".value"];function Mt(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)||Oa(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 Ma(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 $e(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ma(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ma(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}"),co.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Pp,[e.createElementVNode("span",Mp,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,vp)])},co.__scopeId="data-v-d52a4d02",co.__file="src/picker/InputValue.vue";var va=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},ja={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},po=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(ja[o]||o).concat(ja[n]||n)},Ra=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(po(o)).concat(po(n)).concat(po(a))},_t=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)},vt=function(t,o,n){t=6*_t(t,360),o=_t(o,100),n=_t(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)}},Ua=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=va(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=vt(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(Ra(vt(a,r,i))).concat(po(255*s))}else switch(o){case"hsl":var m=va(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 h=vt(a,r,i),C=h.r,f=h.g,g=h.b;return"rgb(".concat(C,", ").concat(f,", ").concat(g,")");default:return Ra(vt(a,r,i))}},uo=function(t){var o=t.r,n=t.g,a=t.b;o=_t(o,255),n=_t(n,255),a=_t(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}},Ga=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)}},za=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]}},cn=function(t,o,n){if(typeof t=="string"&&t!==""){var a=dn(t,pn(t),n),r=qa(a);return Ua(r,o,n)}return""},Ha=function(t){var o=Mt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ya=function(t){var o=Mt(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}},Wa=function(t){var o=Mt(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)}},dn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ha(t),a=n.r,r=n.g,i=n.b,s=n.a;return $e($e({},uo({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Wa(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ya(t),c=l.h,p=l.s,u=l.l,m=l.a;return $e($e({},Ga({h:c,s:p,l:u})),{},{a:+m});default:var h=za(t),C=h.r,f=h.g,g=h.b,k=h.a;return $e($e({},uo({r:C,g:f,b:g})),{},{a:k/255})}else switch(o){case"rgb":return $e($e({},uo(Ha(t))),{},{a:1});case"hsv":var w=Wa(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return $e($e({},Ga(Ya(t))),{},{a:1});default:return $e($e({},uo(za(t))),{},{a:1})}},pn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},qa=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"),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}}}),jp=["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,jp)},jt.__scopeId="data-v-02da71fd",jt.__file="src/color-item/ColorItem.vue";var fo=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 cn(a,"hex",!0)})})}}}),Rp={class:"colors"};function Ka(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 ze(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ka(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ka(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}"),fo.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Rp,[(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))])},fo.__scopeId="data-v-0f8b52a8",fo.__file="src/picker/Colors.vue";var mo=e.defineComponent({name:"Picker",components:{Colors:fo,Saturation:lo,Hue:io,Alpha:so,InputValue:co},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 ze(ze({},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 w,N=(w=t.value)===null||w===void 0?void 0:w.trim();if(N!=null&&N!==""){var A=pn(N);return qa(dn(N,A,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(w,N){var A="";w!=null?(A=Ua(ze({},w),t.format,t.showAlpha),s.value=ze({},w)):s.value=null,d.value=A;var y=l();JSON.stringify(w)!==JSON.stringify(y)&&JSON.stringify(w)!==JSON.stringify(N)&&n("change",A)},{immediate:!0});var c=e.computed(function(){var w;return((w=e.unref(i))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(i))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(i))===null||w===void 0?void 0:w.v)||0}),m=e.computed(function(){var w,N;return((w=e.unref(i))===null||w===void 0?void 0:w.a)!=null?(N=e.unref(i))===null||N===void 0?void 0:N.a:1}),h=e.computed(function(){return vt(e.unref(c),e.unref(p),e.unref(u))}),C=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),f=e.computed(function(){var w=t.format;if(t.showAlpha)switch(w){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(w){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),g=e.ref(-1),k=function(w,N,A){if(w.length!==0){var y=dn(w,N,A),F=y.h,I=y.s,T=y.v;if(!(isNaN(F)||isNaN(I)||isNaN(T))){var V=1,b=y.a;isNaN(b)||(V=b),i.value={h:F,s:I,v:T,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:C,onSelectSaturation:function(w,N){g.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:w,v:N,a:e.unref(m)}:i.value=ze(ze({},e.unref(i)),{},{s:w,v:N})},onSelectHue:function(w){g.value=-1,e.unref(i)==null&&(i.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=ze(ze({},e.unref(i)),{},{h:w})},onSelectAlpha:function(w){g.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:w}:i.value=ze(ze({},e.unref(i)),{},{a:w})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){g.value=-1,d.value=w},handleChange:function(){var w,N=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(N!==""){var A=t.showAlpha,y=t.format,F=function(I,T,V){if(V)switch(T){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(I);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(I);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(I);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(I)}else switch(T){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(I);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(I);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(I);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(I)}}(N,y,A);F?k(N,y,A):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:g,onSelectColor:function(w,N){if(g.value=N,(w=w.trim())==="")i.value=null;else{var A=pn(w);A?k(w,A,!0):i.value=null}}}}}),Up={class:"picker-inner"},Gp={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}"),mo.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",Up,[e.createElementVNode("div",Gp,[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)},mo.__scopeId="data-v-6ceadec6",mo.__file="src/picker/Picker.vue";var ho=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"):""}})}}}),zp=[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 Qa(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 un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Qa(Object(n),!0).forEach(function(a){sn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qa(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}"),ho.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(zp),4)},ho.__scopeId="data-v-ceb1719c",ho.__file="src/add-color-item/AddColorItem.vue";var st=null,xt=e.defineComponent({name:"ColorPicker",components:{ColorItem:jt,Picker:mo,AddColorItem:ho},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(L){return cn(L,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var L=t.value||"",D=Array.isArray(L)?L:[L];a.value=D.map(function(B){return cn(B,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,h,C,f=e.ref(null),g=e.ref(null),k=(l=f,c=g,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){st.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(L){var D=L.state,B=D.styles,U=D.placement,R=B.popper;u.value=un(un(un({},R),p),{},{transformOrigin:U==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(L,D){var B,U=Mt(L,2),R=U[0],x=U[1],E=Mt(D,2),_=E[0],O=E[1];if(R&&x&&(_!==R||O!==_)){(B=st)===null||B===void 0||B.destroy();var $=R.$el||R,z=x.$el||x;e.nextTick(function(){st=Lp($,z,m)})}}),e.onBeforeUnmount(function(){var L;st&&((L=st)===null||L===void 0||L.destroy(),st=null)}),{instance:st,style:u}),w=k.style,N=function(){e.unref(f)==null&&(f.value=e.unref(v)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},A=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]))},y=e.ref(),F=function(){var L=Fa(ro.mark(function D(B){var U,R,x,E;return ro.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(R=B.target,(x=(U=R.dataset)===null||U===void 0?void 0:U.index)!=null&&x!==""){_.next=4;break}return _.abrupt("return");case 4:if(E=+x,e.unref(i)!==E){_.next=7;break}return _.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==E?(A(),h&&clearTimeout(h),h=setTimeout(function(){N(),clearTimeout(h)},100)):N(),i.value=E,f.value=R;case 10:case"end":return _.stop()}},D)}));return function(D){return L.apply(this,arguments)}}(),I=function(){var L=Fa(ro.mark(function D(B){var U,R,x,E,_;return ro.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(E=B.target,!(!((U=e.unref(y))!==null&&U!==void 0&&U.isEqualNode(E))&&(!((R=e.unref(y))===null||R===void 0)&&R.contains(E)))){O.next=4;break}return O.abrupt("return");case 4:if(_=(x=e.unref(g))===null||x===void 0?void 0:x.$el,!(_!=null&&_.contains(E))){O.next=8;break}return O.abrupt("return");case 8:C&&clearTimeout(C),C=setTimeout(function(){e.unref(d)&&A()},0);case 10:case"end":return O.stop()}},D)}));return function(D){return L.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(N(),clearTimeout(C))});var T,V=e.ref(t.max>e.unref(a).length),b=e.computed(function(){return typeof t.popupContainer=="string"||kt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),S=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),P=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(g)]},function(){e.nextTick(function(){var L,D;(L=e.unref(y))===null||L===void 0||L.setAttribute("pick-colors-theme",e.unref(P)),(D=e.unref(g))===null||D===void 0||(D=D.$el)===null||D===void 0||D.setAttribute("pick-colors-theme",e.unref(P))})},{immediate:!0}),e.provide("theme",{theme:P});var v=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",I,!1),t.showPicker&&N()}),e.onUnmounted(function(){document.removeEventListener("mouseup",I,!1),h&&(clearTimeout(h),h=null),C&&(clearTimeout(C),C=null)}),{valueList:a,colorItemSelected:function(L){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===L},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(L){var D=e.unref(i),B=e.unref(a).slice(),U=e.unref(a).length;if(D!=null){D>=0?B[D]=L:(i.value=U,B.push(L));var R="";R=Array.isArray(t.value)||t.addColor?B:L,t.value===void 0?a.value=Array.isArray(R)?R:[R]:(n("update:value",R),n("change",R,L,D)),t.addColor&&U>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:y,onColorClick:F,pickerRef:g,onColorItemDragStart:function(L){L.dataTransfer.effectAllowed="move";var D=L.target;T=+D.dataset.index},onColorItemDragOver:function(L){},onColorItemDrop:function(L){var D=+L.target.dataset.index,B=Bp(e.unref(a)),U=B[T];B.splice(T,1);var R=B.slice(0,D),x=B.splice(D),E=R.concat([U]).concat(x);n("update:value",E),n("change",E,E[T],T)},colorItemsRef:v,pickerStyle:w,values:r,teleportDisabled:S,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)}"),xt.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)},xt.__scopeId="data-v-3c43ade8",xt.__file="src/ColorPicker.vue";const Hp=e.defineComponent({name:"ColorPick",components:{PickColors:xt,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}}}}),sm="",Yp={class:"color-pick"};function Wp(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Yp,[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 qp=ne(Hp,[["render",Wp],["__scopeId","data-v-e2113f43"]]),Kp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:xt},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}`)}}}}),cm="",Qp={class:"color-group-pick"};function Xp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Jp=ne(Kp,[["render",Xp],["__scopeId","data-v-b2be8322"]]),Zp=e.defineComponent({name:"FormGroup",components:{Draggable:Nt,AppstoreAddOutlined:Oo,MinusCircleOutlined:Yl,PickColors:xt,InputNumber:fa,PlusCircleOutlined:Ql},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 h=Object.keys(m),C={};h.forEach(f=>{C[f]=""}),c.push(C)}else typeof m=="string"&&c.push(m);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 h;const m=(h=t.value)==null?void 0:h.slice();if(Array.isArray(m)){const C=c==null?void 0:c.target,f=(C==null?void 0:C.value)!=null?C==null?void 0:C.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){M.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),dm="",eu={class:"form-group"},tu={class:"form-row"},ou={key:0,class:"label"},nu={key:1,class:"label"},au={class:"icon-group"};function ru(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",eu,[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",tu,[(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",ou,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",nu,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",au,[(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 lu=ne(Zp,[["render",ru],["__scopeId","data-v-f0c0ab4d"]]),iu=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 su(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 cu=ne(iu,[["render",su]]),du=e.defineComponent({name:"PropsToForm",components:{Input:fd,InputNumber:fa,RadioGroup:bd,Select:kd,Switch:Sd,ColorPick:qp,ColorGroupPick:Jp,FormGroup:lu,Textarea:cu},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Yt),n=e.inject(bo),a=e.inject(Co),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:h="value",changeValueEventName:C="change",events:f}=p;c[u]={...p,valueProp:h,value:m,events:{[C]:(g,k=!0)=>{i(k?{[u]:g}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:ee.reduce(l,(c,p,u)=>{const m=dd[u];if(Array.isArray(m)){const h=m.find(C=>{const{onlyType:f,excludeType:g}=C;return f==null&&g==null?!0:f?ge(e.unref(r),f):g?!ge(e.unref(r),g):!1});h&&s({result:c,value:p,key:u,mapAttributeProp:h})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:ge}}}),pm="",pu={class:"props-to-form"},uu={class:"label"},fu={class:"component-wrapper"};function mu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",pu,[(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",uu,e.toDisplayString(s.label),1),e.createElementVNode("div",fu,[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 hu=ne(du,[["render",mu],["__scopeId","data-v-c6fb2484"]]);function yu(){return new Worker("/assets/editor.worker-02df2e61.js")}function gu(){return new Worker("/assets/json.worker-867823a6.js")}function bu(){return new Worker("/assets/ts.worker-7254b425.js")}const Cu=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 gu:s==="typescript"||s==="javascript"?new bu:new yu}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=ar.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(ee.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}}}),um="",wu={class:"editor",ref:"dom"};function ku(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",wu,null,512)}const Xa=ne(Cu,[["render",ku],["__scopeId","data-v-71e88372"]]),_u=[{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}],xu=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:Xa},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 g,k,w;let f=[];if(r.value=[],!o.value)f=((g=e.unref(n))==null?void 0:g.queryColumnList)||[];else{const N=((k=e.unref(n))==null?void 0:k.rowHeaderList)||[],A=((w=e.unref(n))==null?void 0:w.indicators)||[];f=[...N,...A]}f.forEach(N=>{var y;let A=(y=e.unref(a))==null?void 0:y.find(F=>F.prop===N.name);A||(A={label:N.label,prop:N.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(A)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:_u,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,g,k)=>{f&&g&&(i=f,s=g,d.value=f[g]||"",c.value=!0,l.value=k)},onEditorChange:f=>{try{d.value=f}catch(g){console.error(g)}},changeRenderBool:(f,g)=>{f.style=g.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),fm="",Su={class:"table-column-config"};function Nu(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"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Su,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:C,text:f,record:g})=>[C.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:k=>t.changeRenderBool(g,k),checked:g.style},null,8,["onChange","checked"])):C.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:g.width,"onUpdate:value":k=>g.width=k,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):C.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[g.style?(e.openBlock(),e.createBlock(d,{key:1,value:g.renderText,"onUpdate:value":k=>g.renderText=k,readOnly:!0,onClick:k=>t.renderSave(g,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[g.style?(e.openBlock(),e.createBlock(d,{key:1,value:g.headerTemplate,"onUpdate:value":k=>g.headerTemplate=k,readOnly:!0,onClick:k=>t.renderSave(g,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:g.headerAlign,"onUpdate:value":k=>g.headerAlign=k},{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"])):C.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:g.align,"onUpdate:value":k=>g.align=k},{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"])):C.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:g.fixed,"onUpdate:value":k=>g.fixed=k},{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"])):C.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:g.dataFormat,"onUpdate:value":k=>g.dataFormat=k,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"])):C.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.dataFormat&&g.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:g.retentiondigit,"onUpdate:value":k=>g.retentiondigit=k,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=C=>t.editorVisible=C),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(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 Au=ne(xu,[["render",Nu],["__scopeId","data-v-afebddc0"]]),Tu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:hu,TableColumnConfig:Au,Editor:Xa,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(Yt),r=e.inject(gn),i=e.inject(bo),s=e.inject(Co),d=e.inject(yn),l=y=>{i({..._n[y]},!1),d()},c=e.computed(()=>{var y;return(y=e.unref(a))==null?void 0:y.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>cd.map(y=>{const{props:F,title:I,enableProps:T,onlyType:V,excludeType:b}=y,S=[];F.forEach(L=>{typeof L=="string"&&(p.includes(L)?t.isGroupTable&&S.push(L):S.push(L))});let P,v;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(P=typeof T=="string"&&r.value?r.value[T]:void 0,v=ee.pick(e.unref(r),S)):(P=typeof T=="string"&&a.value?a.value[T]:void 0,v=ee.pick(e.unref(a),S)),{title:I,enableProps:P,enablePropsName:T,onlyType:V,excludeType:b,props:v}}).filter(({props:y})=>Object.keys(y).length>0)),m=(y,F)=>{const{onlyType:I,excludeType:T}=y;return I==null&&T==null?!0:I?ge(F,I):T?!ge(F,T):!1},h=(y,F)=>(F==null||F.stopPropagation(),y),C=(y,F)=>{F!=null&&i({[F]:y})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),g=y=>{try{const F=JSON.parse(y||"{}");i(F,!1)}catch(F){console.error(F)}},k=e.ref(""),w=y=>{try{k.value=y}catch(F){console.error(F)}},N=(y,F)=>{try{s({[F]:y})}catch(I){console.error(I)}},A=e.computed(()=>{var y;return["customGraph"].includes((y=e.unref(a))==null?void 0:y.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:g,tableOptions:r,optionCode:k,onEditorChange:w,tableEditorChange:N,onSwitchClick:h,onSwitchChange:C,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:A}}}),mm="",hm="",Eu={class:"style-group"};function Vu(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"),h=e.resolveComponent("a-collapse"),C=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Eu,[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(h,{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:g=>t.onSwitchChange(g,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(h,{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 g;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((g=f.onlyType)!=null&&g.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(C)]),_: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 Lu=ne(Tu,[["render",Vu],["__scopeId","data-v-2fb3e2ad"]]),Bu=e.defineComponent({name:"Card",components:{CloseOutlined:Jt,MenuOutlined:Zn,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(je),n=e.inject(Wt),a=e.inject(wn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:_=>{},onDeleteControl:_=>{},onAddMenuControl:(_,O,$)=>{}}),d=e.computed(()=>{var _;return(_=e.unref(o))==null?void 0:_.filter(O=>O.keyName!=="")}),l=e.computed(()=>[{keyName:"父页面",id:"PARENT"},...e.unref(d)]),c=e.computed(()=>{var $,z;const _=[],O=($=e.unref(d))==null?void 0:$.find(W=>{var Q;return W.id===((Q=t.control)==null?void 0:Q.id)});if(O){const W=O.type,Q=ee.pick(O,["value","startTime","endTime"]);(z=Object.keys(Q))!=null&&z.length||(Q.value="");for(const Z in Q)if(Object.prototype.hasOwnProperty.call(Q,Z)){const oe=e.unref(a)[Z];if(Array.isArray(oe)){const ie=oe.find(se=>ge(W,se.onlyType));ie&&_.push({label:ie.label,value:Z})}else _.push({label:oe.label,value:Z})}}return _}),p=()=>{i({index:t.index,path:t.path}),m(t.control.id)},u=({key:_})=>{s(t.path,t.index,_==="2"?"||":"&&")};function m(_){const O=e.unref(d).find($=>$.id===_);if(O){const{type:$,id:z,events:W=[]}=O,Q=Zt($),Z=W.findIndex(oe=>{var ie;return oe.on===Q&&oe.target===((ie=e.unref(F))==null?void 0:ie.id)&&oe.emit==="refreshData"});Z!==-1&&(W.splice(Z,1),n({id:z,events:W}))}}const h=_=>{const O={...t.control};if(O.id=_,O.customValue="",_){const $=e.unref(d).find(z=>z.id===_);$&&(O.keyName=$.keyName,V($,_))}delete O.prop,r({control:O,index:t.index,path:t.path})},C=e.ref(""),f=()=>{C.value=t.control.id},g=_=>{r({control:{...t.control,prop:_},index:t.index,path:t.path})},k=_=>{r({control:{...t.control,prop:_.target.value},index:t.index,path:t.path})},w=_=>{r({control:{...t.control,rule:_},index:t.index,path:t.path})},N=_=>{const O={...t.control};O.modelKey&&(O.modelKey=""),O.prop&&(O.prop=""),O.format&&(O.format=""),r({control:{...O,dataType:_,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},A=_=>{r({control:{...t.control,customValue:_.target.value},index:t.index,path:t.path})},y=_=>{const O={...t.control};_==null?delete O.mode:O.mode=_,delete O.conditionLabel,delete O.conditionName,delete O.conditionKey,delete O.conditionValueType,r({control:O,index:t.index,path:t.path})},F=e.inject(Ye),I=e.inject(Ce),T=e.computed(()=>{var He;const{classificationList:_=[],seriesList:O=[],leftAxisList:$=[],rightAxisList:z=[],indicators:W=[],rowHeaderList:Q=[],queryColumnList:Z=[]}=e.unref(I),oe=ee.cloneDeep([..._,...O,...$,...z,...W,...Q,...Z]);if(oe!=null&&oe.length)for(const pe of oe)pe.id=pe.name;const ie=[{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(pe=>({...pe,id:pe.name,label:pe.title||pe.label})),...oe];if(((He=e.unref(F))==null?void 0:He.type)==="ecanSelect"){const{selectFieldOptions:pe=[]}=e.unref(I);if(ie.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"}),pe!=null&&pe.length)for(const Te of pe)ie.unshift({label:Te.label,name:Te.value,id:Te.value,genericType:"TEXT"})}const se=new Map,Pe=ie.length;for(let pe=0;pe<Pe;pe++){const Te=ie[pe],{id:nt}=Te||{};se.set(nt,Te)}return[...se].map(([pe,Te])=>Te)});function V(_,O){var Z,oe;const{type:$,id:z,events:W=[]}=_,Q=Zt($);e.unref(C)&&O!==e.unref(C)&&(tt(((Z=e.unref(I))==null?void 0:Z.controlList)||[]).find(se=>se.id===e.unref(C))||m(e.unref(C))),W.find(ie=>{var se;return ie.on===Q&&ie.target===((se=e.unref(F))==null?void 0:se.id)&&ie.emit==="refreshData"})||n({id:z,events:[...W,{on:Q,target:(oe=e.unref(F))==null?void 0:oe.id,emit:"refreshData"}].reverse()})}const b=(_,O)=>{if(_){const{label:$,name:z,id:W,genericType:Q,indexCode:Z,typeGuid:oe,indexCodeNum:ie}=O||{},se={...t.control,conditionKey:W,conditionLabel:$,conditionName:z,conditionValueType:Q,indexCode:Z,typeGuid:oe,indexCodeNum:ie};yt(se,"rule")||(se.rule="EQUAL"),yt(se,"dataType")||(se.dataType="component"),r({control:se,index:t.index,path:t.path})}else{const $={...t.control};delete $.conditionLabel,delete $.conditionName,delete $.conditionKey,delete $.conditionValueType,r({control:$,index:t.index,path:t.path})}},S=(_,O)=>{var $;return($=O==null?void 0:O.keyName)==null?void 0:$.toLowerCase().includes(_==null?void 0:_.toLowerCase())},P=(_,O)=>{var $;return($=O==null?void 0:O.label)==null?void 0:$.toLowerCase().includes(_==null?void 0:_.toLowerCase())},v=e.computed(()=>{const _=e.unref(T).find($=>$.id===t.control.conditionKey);let O="";return _&&(O=(_==null?void 0:_.genericType)||""),O==="TEXT"||O==="0"?[{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"}]:O==="NUMBER"||O==="1"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:O==="DATE"||O==="2"?[{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"}]:[]}),L=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],D=e.computed(()=>{let _=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(Q=>Q.id===O),W=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(z==null?void 0:z.type,W)&&(_=!0)}return O==="PARENT"&&(_=!0),_}),B=e.computed(()=>{let _=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(W=>W.id===O);(z==null?void 0:z.type)==="ecanRangePicker"&&(_=!0)}return O==="PARENT"&&(_=!0),_}),U=e.computed(()=>{let _=!1;const{id:O="",dataType:$="component"}=t.control;if(O&&$==="component"){const z=e.unref(d).find(W=>W.id===O);["ecanDatePicker","ecanRangePicker"].includes(z==null?void 0:z.type)&&(_=!0)}return _});return{propOptions:c,usedComponentList:d,onDelete:p,onIdChange:h,onIdFocus:f,onPropChange:g,onParentPropChange:k,onModeChange:y,onRuleChange:w,onDataTypeChange:N,onCustomValueChange:A,conditionKeyOptions:T,onConditionKeyChange:b,idFilterOption:S,filterOption:P,onFormatChange:_=>{r({control:{...t.control,format:_},index:t.index,path:t.path})},onModelPropChange:_=>{r({control:{...t.control,modelKey:_.target.value},index:t.index,path:t.path})},clickConditionMenu:u,ruleOption:v,dataTypeOption:L,isShowProp:B,isShowFormat:U,isShowModelProp:D,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"}],keyNameOptions:l}}}),ym="",gm="",Ou={class:"control-card"};function Du(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",Ou,[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.keyNameOptions,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,placeholder:t.control.id==="PARENT"?"请输入组件别名":""},null,8,["value","onInput","placeholder"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.control.id==="PARENT"?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.prop,onInput:t.onParentPropChange,placeholder:"请输入属性名"},null,8,["value","onInput"])):(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"]))],64)):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 Fu=ne(Bu,[["render",Du],["__scopeId","data-v-1e33ff6f"]]),Iu=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:Fu}}),bm="",$u={key:0,class:"condition-list"},Pu={key:0,class:"condition-container"},Mu={key:0,class:"condition-text"},vu={key:1,class:"condition-text"},ju={class:"conditions"};function Ru(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",$u,[(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",Pu,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Mu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",vu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",ju,[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 Uu=ne(Iu,[["render",Ru],["__scopeId","data-v-916ff9bd"]]),Gu=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Uu,AButton:M.Button},setup(){const t=e.inject(je),o=e.inject(Ce),n=e.inject(Se),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const h of p)h.conditionKey&&(yt(h,"rule")||(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL"),yt(h,"dataType")||(h.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:sa({...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:_e()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:_e()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:_e()}),i({controlList:u})))},d=p=>{var g,k,w,N;const{index:u,path:m}=p;let h=ee.cloneDeep((g=e.unref(a))==null?void 0:g.slice()),C=h;const f=m.split("-");if(f!=null&&f.length){for(const A of f)if(C[A])C=(k=C[A])==null?void 0:k.conditions;else break;if(Array.isArray(C)&&C[u])if(C.splice(u,1),C.length===1){if(f.length>0){const A=f.length-1,y=f[A],F=f.slice(0,A);let I=h,T="";for(const V of F)if(I[V])T=(w=I[V])==null?void 0:w.join,I=(N=I[V])==null?void 0:N.conditions;else break;if(T===C[0].join){if(Array.isArray(C[0].conditions)){const V=ee.cloneDeep(C[0].conditions);I.splice(+y,1),I.splice(+y,0,...V)}}else I[y]=C[0]}}else C.length===0&&(h=[]);i({controlList:h})}},l=p=>{var k,w;const{control:u,index:m,path:h}=p,C=ee.cloneDeep((k=e.unref(a))==null?void 0:k.slice());let f=C;const g=h.split("-");if(g!=null&&g.length)for(const N of g)if(f[N])f=(w=f[N])==null?void 0:w.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:C})},c=(p,u,m)=>{var k,w,N;const h=ee.cloneDeep((k=e.unref(a))==null?void 0:k.slice());let C=h,f="";const g=p.split("-");if(g!=null&&g.length){for(const A of g)if(C[A])f=(w=C[A])==null?void 0:w.join,C=(N=C[A])==null?void 0:N.conditions;else break;if(f===m)C.splice(u+1,0,{keyValue:_e()});else{const A=ee.cloneDeep(C[u]);C[u]={join:m,conditions:[A,{keyValue:_e()}]}}i({controlList:h})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),Cm="",zu={class:"control-group"},Hu={class:"control-group-header"},Yu={class:"control-group-content"};function Wu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",zu,[e.createElementVNode("div",Hu,[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",Yu,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const qu=ne(Gu,[["render",Wu],["__scopeId","data-v-1e37d2d3"]]),Ku=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Jt,AppstoreAddOutlined:Oo,ASelect:M.Select,ASelectOption:M.SelectOption,AInput:M.Input,APopover:M.Popover,ATabs:M.Tabs,ATabPane:M.TabPane,AInputNumber:M.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(je),r=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.filter(y=>y.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(ee.cloneDeep(t.item));e.watch(l,A=>{o("update",{...A,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var y;let A=null;if(((y=e.unref(l))==null?void 0:y.dataType)==="component"){const F=e.unref(r).find(I=>{var T;return I.id===((T=e.unref(l))==null?void 0:T.id)});F&&(A=F)}return A}),p=e.computed(()=>{var y;let A=!1;return((y=e.unref(l))==null?void 0:y.variableType)==="DATE"&&(A=!0),A}),u=e.computed(()=>{let A=!1;return e.unref(c)&&(A=ge(e.unref(c).type,"range")),A}),m=e.computed(()=>{let A=!1;return e.unref(c)&&(ge(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(A=!0):ge(e.unref(c).type,"date")&&(A=!0)),A}),h=(A,y)=>{A&&(e.unref(l).keyName=y.keyName)},C=()=>{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"}]:[]),g=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},k=()=>{e.unref(l).format=null},w=(A,y)=>{var F;return(F=y==null?void 0:y.keyName)==null?void 0:F.toLowerCase().includes(A==null?void 0:A.toLowerCase())};return e.watch(m,A=>{A&&(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:w,onChangeComponent:h,onDelete:C,onChangeDataType:g,onChangeVariableType:k,changeTab:A=>{e.unref(l).activeOperateKey=A,A===1?e.unref(l).operateValue=0:A===2&&(e.unref(l).operateValue="rangeValue")}}}}),wm="",Qu={class:"variable-item"},Xu=["title"],Ju={class:"popover-content-wrap"},Zu={style:{display:"flex"}};function ef(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"),h=e.resolveComponent("a-popover"),C=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Qu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,Xu)):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,disabled:t.variableData.disabled,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","disabled","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(h,{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",Ju,[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",Zu,[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(C,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const tf=ne(Ku,[["render",ef],["__scopeId","data-v-75ccc065"]]),of=e.defineComponent({name:"VariableGroup",components:{VariableItem:tf},setup(){const t=e.inject(Ce),o=e.inject(Se),n=e.inject(je),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Lt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=ee.cloneDeep(e.unref(a));l.push({keyValue:_e(),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=ee.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=ee.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),km="",nf={class:"variable-group"},af={class:"variable-group-header"},rf={class:"variable-group-content"};function lf(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",nf,[e.createElementVNode("div",af,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",rf,[(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 sf=ne(of,[["render",lf],["__scopeId","data-v-fd60cd09"]]),cf=(t={})=>{console.log(t,"reqpp");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:h,builtInValueSource:C,builtInCalcWay:f,formula:g,conditions:k,aggregate:w}=s;let N;return k&&(N=r(k)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:w,builtInFormula:h,builtInValueSource:C,builtInCalcWay:f,formula:g,conditions:N}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:h,classificationList:C=[],seriesList:f=[],leftAxisList:g=[],rightAxisList:k=[],queryColumnList:w=[],indicators:N=[],dataSourceId:A,idxLibMode:y,preview:F=!1}=s||{};m==null&&(ge(d,"table")?m="1":m="2");let I;if(Array.isArray(C)&&C.length>0){const S=C.length;for(let P=0;P<S;P++){const v=C[P]||{},{label:L="",name:D="",show:B=!1,sort:U,customGroup:R,conditions:x}=v;if(B||S===1){I={label:L.trim(),columnName:D,show:B,sort:U,customGroup:R,conditions:r(x)};break}}}let T;if(Array.isArray(f)&&f.length>0){const S=f.length;for(let P=0;P<S;P++){const v=f[P]||{},{label:L="",name:D="",show:B=!1,sort:U,customGroup:R,conditions:x}=v;if(B||S===1){T={label:L.trim(),columnName:D,show:B,sort:U,customGroup:R,conditions:r(x)};break}}}const V=[];w==null||w.forEach(S=>{V.push(o(S))});const b=[];if(g==null||g.forEach(S=>{S.location="LEFT",b.push(i(S))}),k==null||k.forEach(S=>{S.location="RIGHT",b.push(i(S))}),N==null||N.forEach(S=>{S.location="LEFT",b.push(i(S))}),!(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:h,classification:I,series:T,indicatorList:b,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:A,idxLibMode:y,preview:F})}catch(S){console.error(S)}}},Ja=(t,o)=>{const n={dayjs:ue,...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},yo=(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 h=u[m],C=i[h];C!=null&&(c=c.replace(h,C))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Ja(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," ")),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=Ja(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},df=(t,o,n)=>{switch(t.type){case"bar":return pf(t,o,n);case"line":return uf(t,o,n);case"pie":return ff(t,o,n);case"comboGraph":return mf(t,o,n);default:return{}}},pf=(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 h={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),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 h=0;h<p;h++){const{marker:C,seriesName:f,name:g,value:k,data:w}=c[h]||{};h===0&&(u+=`${g}<br/>`),u+=yo(m,{textData:{marker:C,name:g,value:k,a:f,b:g,c:k,...w}},{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)}},uf=(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 h=0;h<p;h++){const{marker:C,seriesName:f,name:g,value:k,data:w}=c[h]||{};h===0&&(u+=`${g}<br/>`),u+=yo(m,{textData:{marker:C,name:g,value:k,a:f,b:g,c:k,...w}},{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)}},ff=(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 yo(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:Ds(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:{}}}]}},mf=(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 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 m=t.seriesTypes;for(let h=0;h<c;h++){const C=m[h],{tooltipFormatter:f}=C||{},{marker:g,seriesName:k,name:w,value:N,data:A}=l[h]||{};h===0&&(p+=`${w}<br/>`),p+=yo(f||u,{textData:{marker:g,name:w,value:N,seriesName:k,a:k,b:w,c:N,...A}},{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)}},hf=(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 h=a[m],{label:C,value:f}=h,g={...t[0],value:t[0][f]};r.add(C),p.push(g)}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 h=0;h<d;h++){const C=a[h],{label:f,value:g}=C,k={...u,value:u[g]};if(i.has(f)){const w=i.get(f);w.push(k),i.set(f,w)}else i.set(f,[k])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},yf=(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]||"",h=u[a]||"",C=u[r]||"";if(i.add(m),s.has(C)){const f=s.get(C);f.push({name:m,value:h,...u}),s.set(C,f)}else s.set(C,[{name:m,value:h,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},gf=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(Ce)||{},l=e.inject(Yt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),h=e.ref(!1),C=e.computed(()=>h.value?sr:12),f=e.ref({}),g=e.ref(),k=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return g.value;const b=df(V,e.unref(f),C.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:h.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}}),w=(V=[],b,S=!1)=>{const P=S?b:null;f.value=hf(V,P)},N=(V=[],b)=>{f.value=yf(V,b)},A=async()=>{var V,b,S;try{const P=cf({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const v=await P(),{columns:L=[],rows:D=[]}=((b=v==null?void 0:v.data)==null?void 0:b.data)??{};if(((S=e.unref(n.value))==null?void 0:S.type)==="pie"){let B=[];if(L.length>0){const U=L[0],R=L[1];B=D.map(x=>({name:x[U],value:x[R]}))}N(B)}else{let B;L.length>0&&(B={name:L[0],types:L.slice(1).map(U=>({label:U,value:U}))}),w(D,B,!0)}}catch(P){console.error(P)}finally{m.value=!1}},y={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},F=()=>{e.unref(f).dataset.length===0?u.value.setOption(y):u.value.setOption(k.value)},I=()=>{e.unref(n.value).type!=="customGraph"&&A()},T=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(k,()=>{F()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const b=eval;g.value=b(V)}catch(b){console.error(b)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(T),i.observe(p.value)),u.value=ir.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:I}),{echartRef:c,loading:m}}}),_m="",bf={class:"ecan-chart-graph",ref:"chartWrapRef"},Cf={style:{width:"100%",height:"100%"},ref:"echartRef"};function wf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",bf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",Cf,null,512)]),_:1},8,["spinning"])],512)}const Za=ne(gf,[["render",wf],["__scopeId","data-v-8049fed2"]]),kf=e.defineComponent({name:"DataConfig",components:{DataGroup:sd,StyleGroup:Lu,ChartGraph:Za,ATabs:M.Tabs,ATabPane:M.TabPane,ControlGroup:qu,VariableGroup:sf,AButton:M.Button,ReloadOutlined:si},setup(){var I;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(hn),i=e.inject(Ce),s=e.inject(je),d=e.inject(kn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const T=ee.cloneDeep(e.unref(a));p(T);const V=ee.pick(T,ee.without(Object.keys(T),"position","top","left","width","height"));ge(T.type,l)?(V.height=T.height,V.width=T.width):V.height="290px";const b=ee.cloneDeep(e.unref(i));return b.pageMode="design",b.componentList=s,b.preview=!0,b.pageConfig=d,{...V,graphicConfig:b,toolboxShow:!1,sourceLeft:T.left,sourceTop:T.top}});function p(T){var V,b,S,P;["#ffffff","#fff"].includes((V=T==null?void 0:T.color)==null?void 0:V.toLowerCase())&&(T.color="#000"),["#ffffff","#fff"].includes((b=T==null?void 0:T.variableColor)==null?void 0:b.toLowerCase())&&(T.variableColor="#000"),["#ffffff","#fff"].includes((S=T==null?void 0:T.increaseColor)==null?void 0:S.toLowerCase())&&(T.increaseColor="#000"),["#ffffff","#fff"].includes((P=T==null?void 0:T.declineColor)==null?void 0:P.toLowerCase())&&(T.declineColor="#000")}const u=e.computed(()=>{let T=!0;return ge(e.unref(c).type,l)&&(T=!1),T}),m=e.computed(()=>{var T;return(T=e.unref(c))==null?void 0:T.type}),h=e.computed(()=>{var T;return!!((T=e.unref(c))!=null&&T.isGroupTable)}),C=T=>{const V=T==="1";V&&m.value==="table"&&A(),window.changeShowTable&&window.changeShowTable(V),T==="3"&&N()},f=e.ref(),g=e.inject(Me),k=e.unref(e.inject(ve)),w=(I=window==null?void 0:window.config)==null?void 0:I.pageId;function N(){var L;const{leftAxisList:T=[],rightAxisList:V=[],queryColumnList:b=[],indicators:S=[]}=e.unref(i),P=[...T,...V,...b,...S],v={};for(const D of P){const{id:B="",indexCode:U=""}=D;B&&!yt(D,"calcType")&&!v[B]&&(v[B]=U)}if((L=Object.keys(v))!=null&&L.length){const D=[];for(const B in v)D.push(new Promise((U,R)=>{g.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:w,indexGuid:B,indexCode:v[B],dataSourceId:""},{headers:{Authentication:k,operateContext:"ygt"}}).then(x=>{var O;const{success:E,data:_=[]}=x.data;E&&((O=_==null?void 0:_.dataViewColumns)!=null&&O.length)?U(_.dataViewColumns):R(_)}).catch(x=>{R(x)})}));Promise.all(D).then(B=>{if(B!=null&&B.length){const U=B.reduce((R,x)=>R.filter(E=>x.find(_=>_.typeGuid===E.typeGuid)));f.value=U.filter(R=>R.typeGuid)}})}}const A=()=>{var V;let T;r&&m.value==="table"?T=window.updateConfig:T=(V=e.unref(n))==null?void 0:V.refreshData,typeof T=="function"&&T()},y=e.inject(Se),F=()=>{var T;y({variableConditions:Lt(((T=e.unref(i))==null?void 0:T.variableList)||[],s)})};return e.provide(yn,A),e.watch(i,()=>{A()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:h,onChange:C,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:A,refreshAction:F}}}),xm="",_f={class:"data-config"},xf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Sf(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"),h=e.resolveComponent("a-tabs"),C=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",_f,[e.createVNode(h,{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",xf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(C,{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 Nf=ne(kf,[["render",Sf],["__scopeId","data-v-d85f4e1e"]]),Af=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Ti,DataConfig:Nf},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 y;return((y=e.unref(s))==null?void 0:y.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?ee.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?ee.cloneDeep(e.unref(s).chartsOptions):e.ref(ee.cloneDeep(_n.line));p=e.ref(p);let u=e.unref(s).tableOptions?ee.cloneDeep(e.unref(s).tableOptions):e.ref(ee.cloneDeep(cr));u=e.ref(u);const m=e.ref([]),h=y=>{m.value=y},C=y=>{c.value={...e.unref(c),...e.unref(y)}},f=(y,F=!0)=>{F?p.value={...e.unref(p),...e.unref(y)}:p.value={...e.unref(y)}},g=y=>{u.value={...e.unref(u),...e.unref(y)}},k=()=>m,w=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=ee.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=ee.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},N=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=N,t.request&&e.provide(Me,t.request),e.provide(mn,{setDataList:h,getDataList:k});const A=y=>{n("updateUsedComponent",y)};return e.provide(Ye,s),e.provide(Ce,c),e.provide(Yt,p),e.provide(gn,u),e.provide(At,r),e.provide(hn,l),e.provide(ve,i),e.provide(Se,C),e.provide(bo,f),e.provide(Co,g),e.provide(je,t.renderUsedComponentList),e.provide(Wt,A),e.provide(wn,t.mapAttributeProps),e.provide(kn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:w}),{isUpdate:a}}}),Sm="",Tf={key:0,class:"config-modal"},Ef={class:"config-modal-left"},Vf={class:"config-modal-right"};function Lf(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",Tf,[e.createElementVNode("div",Ef,[e.createVNode(s)]),e.createElementVNode("div",Vf,[e.createVNode(d)])]))}const er=fn(ne(Af,[["render",Lf],["__scopeId","data-v-23d542ce"]])),tr=fn(Za),or=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:tr,EcanIndicatorLibrary:er},Symbol.toStringTag,{value:"Module"})),Bf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(or).forEach(a=>{const r=or[a];r.install&&t.use(r)})}};ke.EcanChartGraph=tr,ke.EcanIndicatorLibrary=er,ke.default=Bf,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|