@ecan-bi/indicator-library 1.0.47 → 1.0.49
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 +3436 -3392
- 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-config/data-config-group/data-config-card/filter-modal/Condition.vue.d.ts +4 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(he,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):(he=typeof globalThis<"u"?globalThis:he||self,e(he["@ecan-bi/indicator-library"]={},he.Vue,he.LodashEs,he.AntDesignVue,he.Draggable,null,null,he.Dayjs,null,he.MonacoEditor,null,he.Echarts))})(this,function(he,e,ne,v,ft,lf,sf,se,cf,Ba,df,Oa){var Ea;"use strict";function Va(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 Ia=Va(Oa),Wo=(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},Le="$request",ke=((Ea=window==null?void 0:window.config)==null?void 0:Ea.indicatorURL)||"",Ee="INDICATOR_TOKEN",qo="DATA_LIST",ve="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",Be="UPDATE_GRAPHIC_CONFIG",Yo="SHOW_STYLE_CONFIG",Ko="REFRESH_DATA",Tt="CHARTS_OPTIONS",Xo="TABLE_OPTIONS",$a=18,Qt="UPDATE_CHARTS_OPTIONS",Jt="UPDATE_TABLE_OPTIONS",Zt="SOURCE_TYPE",Qo="CHANGE_CONDITION",Jo="DATA_VIEW_COLUMNS",Re="RENDER_USED_COMPONENTS",Lt="UPDATE_USED_COMPONENT",Zo="MAP_ATTRIBUTE_PROPS",en={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%"}},Fa={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Da=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:ft},setup(){var B;const t=e.inject(Le),o=e.unref(e.inject(Ee)),n=e.inject(pe),a=e.inject(Be),r=e.computed(()=>{var _;return((_=e.unref(n))==null?void 0:_.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(B=window==null?void 0:window.config)==null?void 0:B.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var g,x;const _=r.value;l.value=!0;try{const{data:O}=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:_,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,O.success&&((g=i.value)==null||g.push(s),i.value=(x=i.value)==null?void 0:x.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(_=[],g)=>{const x=[];return _.forEach(O=>{x.push({id:O.id,pId:g??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),x},f=async(_,g)=>{var S;let x=0;if(_){const{value:V}=_.dataRef;x=V}const{data:O}=await t.post(`${ke}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:x},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(i.value=(S=e.unref(i))==null?void 0:S.concat(p(O.data)),g&&e.unref(r)&&await c())},m=_=>{N(_),a({dataViewId:_,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(qo,{setDataList:_=>_}),w=e.ref(!1),b=e.ref([]),N=async _=>{if(_){b.value=[],w.value=!0;try{const g=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:_,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:x,data:O={}}=g.data;if(w.value=!1,x){const{rows:S=[]}=O;S==null||S.forEach(V=>{var $;const F=(($=V==null?void 0:V.dataViewColumns)==null?void 0:$.map(P=>({...P,show:!0})))||[];b.value=[...e.unref(b),...F]}),h(e.unref(b))}}catch{w.value=!1}}},E=_=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[_],u=(_,g)=>{const x=g[_.oldIndex];if(x){const O={...x,label:x.name,name:x.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await f(void 0,!0),N(e.unref(r))}),{dataViewId:r,handleLoadData:f,treeSelectData:i,treeSelectLoading:l,dataViewList:b,dataViewLoading:w,onDataViewIdChange:m,mapGenericType:E,onDragStart:u}}}),yf="",te=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},va={class:"data-view-list"},Pa={class:"columns"},Ma={class:"column-item"},ja={class:"column-item-name"};function Ra(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",va,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Pa,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ma,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",ja,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ua=te(Da,[["render",Ra],["__scopeId","data-v-4a66f7d2"]]);function _e(t,o){Ga(t)&&(t="100%");var n=za(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 Ga(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function za(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Et(t){return t<=1?"".concat(Number(t)*100,"%"):t}function eo(t){return t.length===1?"0"+t:String(t)}function Wa(t,o,n){return{r:_e(t,255)*255,g:_e(o,255)*255,b:_e(n,255)*255}}function to(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 qa(t,o,n){var a,r,l;if(t=_e(t,360),o=_e(o,100),n=_e(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=to(d,i,t+1/3),r=to(d,i,t),l=to(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ya(t,o,n){t=_e(t,255),o=_e(o,255),n=_e(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function Ka(t,o,n){t=_e(t,360)*6,o=_e(o,100),n=_e(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:f*255}}function Xa(t,o,n,a){var r=[eo(Math.round(t).toString(16)),eo(Math.round(o).toString(16)),eo(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 tn(t){return be(t)/255}function be(t){return parseInt(t,16)}var on={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 ut(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=Za(t)),typeof t=="object"&&(Pe(t.r)&&Pe(t.g)&&Pe(t.b)?(o=Wa(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Pe(t.h)&&Pe(t.s)&&Pe(t.v)?(a=Et(t.s),r=Et(t.v),o=Ka(t.h,a,r),i=!0,d="hsv"):Pe(t.h)&&Pe(t.s)&&Pe(t.l)&&(a=Et(t.s),l=Et(t.l),o=qa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Ha(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Qa="[-\\+]?\\d+%?",Ja="[-\\+]?\\d*\\.\\d+%?",Ue="(?:".concat(Ja,")|(?:").concat(Qa,")"),oo="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),no="[\\s|\\(]+(".concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")[,|\\s]+(").concat(Ue,")\\s*\\)?"),Oe={CSS_UNIT:new RegExp(Ue),rgb:new RegExp("rgb"+oo),rgba:new RegExp("rgba"+no),hsl:new RegExp("hsl"+oo),hsla:new RegExp("hsla"+no),hsv:new RegExp("hsv"+oo),hsva:new RegExp("hsva"+no),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(on[t])t=on[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Oe.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Oe.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Oe.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Oe.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Oe.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Oe.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Oe.hex8.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),a:tn(n[4]),format:o?"name":"hex8"}:(n=Oe.hex6.exec(t),n?{r:be(n[1]),g:be(n[2]),b:be(n[3]),format:o?"name":"hex"}:(n=Oe.hex4.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),a:tn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Oe.hex3.exec(t),n?{r:be(n[1]+n[1]),g:be(n[2]+n[2]),b:be(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Pe(t){return!!Oe.CSS_UNIT.exec(String(t))}var Bt=2,nn=.16,er=.05,tr=.05,or=.15,an=5,rn=4,nr=[{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 ln(t){var o=t.r,n=t.g,a=t.b,r=Ya(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Ot(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Xa(o,n,a,!1))}function ar(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 sn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Bt*o:Math.round(t.h)+Bt*o:a=n?Math.round(t.h)+Bt*o:Math.round(t.h)-Bt*o,a<0?a+=360:a>=360&&(a-=360),a}function cn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-nn*o:o===rn?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 dn(t,o,n){var a;return n?a=t.v+tr*o:a=t.v-or*o,a>1&&(a=1),Number(a.toFixed(2))}function ao(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=ut(t),r=an;r>0;r-=1){var l=ln(a),i=Ot(ut({h:sn(l,r,!0),s:cn(l,r,!0),v:dn(l,r,!0)}));n.push(i)}n.push(Ot(a));for(var d=1;d<=rn;d+=1){var s=ln(a),c=Ot(ut({h:sn(s,d),s:cn(s,d),v:dn(s,d)}));n.push(c)}return o.theme==="dark"?nr.map(function(p){var f=p.index,m=p.opacity,h=Ot(ar(ut(o.backgroundColor||"#141414"),ut(n[f]),m*100));return h}):n}var ro={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"},lo={},io={};Object.keys(ro).forEach(function(t){lo[t]=ao(ro[t]),lo[t].primary=lo[t][5],io[t]=ao(ro[t],{theme:"dark",backgroundColor:"#141414"}),io[t].primary=io[t][5]});var pn=[],mt=[],rr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function lr(){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(rr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=pn.indexOf(a);r===-1&&(r=pn.push(a)-1,mt[r]={});var l;return mt[r]!==void 0&&mt[r][n]!==void 0?l=mt[r][n]:(l=mt[r][n]=lr(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function fn(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){sr(t,r,n[r])})}return t}function sr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function cr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function dr(t,o){cr(t,"[@ant-design/icons-vue] ".concat(o))}function un(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function so(t,o,n){return n?e.h(t.tag,fn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,fn({key:o},t.attrs),(t.children||[]).map(function(a,r){return so(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function mn(t){return ao(t)[0]}function hn(t){return t?Array.isArray(t)?t:[t]:[]}var pr=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.49 */
|
|
2
|
+
(function(pe,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):(pe=typeof globalThis<"u"?globalThis:pe||self,e(pe["@ecan-bi/indicator-library"]={},pe.Vue,pe.LodashEs,pe.AntDesignVue,pe.Draggable,null,null,pe.Dayjs,null,pe.MonacoEditor,null,pe.Echarts))})(this,function(pe,e,te,j,ut,iu,su,ie,cu,Ba,du,Oa){var Ea;"use strict";function Va(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Ia=Va(Oa),Wn=(t,n)=>{if(t.install=o=>{for(const a of[t,...Object.values(n??{})])o.component(a.name,a)},n)for(const[o,a]of Object.entries(n))t[o]=a;return t},Ae="$request",Ce=((Ea=window==null?void 0:window.config)==null?void 0:Ea.indicatorURL)||"",Ne="INDICATOR_TOKEN",qn="DATA_LIST",De="SELECTED_COMPONENT",de="GRAPHIC_CONFIG",Te="UPDATE_GRAPHIC_CONFIG",Yn="SHOW_STYLE_CONFIG",Kn="REFRESH_DATA",Lt="CHARTS_OPTIONS",Xn="TABLE_OPTIONS",Fa=18,Jt="UPDATE_CHARTS_OPTIONS",Zt="UPDATE_TABLE_OPTIONS",en="SOURCE_TYPE",Qn="CHANGE_CONDITION",Jn="DATA_VIEW_COLUMNS",je="RENDER_USED_COMPONENTS",Et="UPDATE_USED_COMPONENT",Zn="MAP_ATTRIBUTE_PROPS",eo={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%"}},$a={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Da=e.defineComponent({name:"DataViewList",components:{ASpin:j.Spin,ATreeSelect:j.TreeSelect,Draggable:ut},setup(){var B;const t=e.inject(Ae),n=e.unref(e.inject(Ne)),o=e.inject(de),a=e.inject(Te),r=e.computed(()=>{var m;return((m=e.unref(o))==null?void 0:m.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(B=window==null?void 0:window.config)==null?void 0:B.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var b,x;const m=r.value;l.value=!0;try{const{data:O}=await t.post(`${Ce}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}});l.value=!1,O.success&&((b=i.value)==null||b.push(s),i.value=(x=i.value)==null?void 0:x.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(m=[],b)=>{const x=[];return m.forEach(O=>{x.push({id:O.id,pId:b??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),x},u=async(m,b)=>{var V;let x=0;if(m){const{value:T}=m.dataRef;x=T}const{data:O}=await t.post(`${Ce}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:x},{headers:{Authentication:n,operateContext:"ygt"}});O.success&&(i.value=(V=e.unref(i))==null?void 0:V.concat(p(O.data)),b&&e.unref(r)&&await c())},f=m=>{S(m),a({dataViewId:m,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(qn,{setDataList:m=>m}),_=e.ref(!1),g=e.ref([]),S=async m=>{if(m){g.value=[],_.value=!0;try{const b=await t.post(`${Ce}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:n,operateContext:"ygt"}}),{success:x,data:O={}}=b.data;if(_.value=!1,x){const{rows:V=[]}=O;V==null||V.forEach(T=>{var I;const M=((I=T==null?void 0:T.dataViewColumns)==null?void 0:I.map(R=>({...R,show:!0})))||[];g.value=[...e.unref(g),...M]}),h(e.unref(g))}}catch{_.value=!1}}},L=m=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[m],w=(m,b)=>{const x=b[m.oldIndex];if(x){const O={...x,label:x.name,name:x.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await u(void 0,!0),S(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:g,dataViewLoading:_,onDataViewIdChange:f,mapGenericType:L,onDragStart:w}}}),yu="",Z=(t,n)=>{const o=t.__vccOpts||t;for(const[a,r]of n)o[a]=r;return o},va={class:"data-view-list"},Pa={class:"columns"},Ma={class:"column-item"},ja={class:"column-item-name"};function Ra(t,n,o,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",va,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Pa,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":n[0]||(n[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:n[1]||(n[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ma,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",ja,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ua=Z(Da,[["render",Ra],["__scopeId","data-v-4a66f7d2"]]);function we(t,n){Ga(t)&&(t="100%");var o=za(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),o&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function Ga(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function za(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Bt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function tn(t){return t.length===1?"0"+t:String(t)}function Wa(t,n,o){return{r:we(t,255)*255,g:we(n,255)*255,b:we(o,255)*255}}function nn(t,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(n-t)*(6*o):o<1/2?n:o<2/3?t+(n-t)*(2/3-o)*6:t}function qa(t,n,o){var a,r,l;if(t=we(t,360),n=we(n,100),o=we(o,100),n===0)r=o,l=o,a=o;else{var i=o<.5?o*(1+n):o+n-o*n,d=2*o-i;a=nn(d,i,t+1/3),r=nn(d,i,t),l=nn(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Ya(t,n,o){t=we(t,255),n=we(n,255),o=we(o,255);var a=Math.max(t,n,o),r=Math.min(t,n,o),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(n-o)/d+(n<o?6:0);break;case n:l=(o-t)/d+2;break;case o:l=(t-n)/d+4;break}l/=6}return{h:l,s,v:i}}function Ka(t,n,o){t=we(t,360)*6,n=we(n,100),o=we(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:c*255,g:p*255,b:u*255}}function Xa(t,n,o,a){var r=[tn(Math.round(t).toString(16)),tn(Math.round(n).toString(16)),tn(Math.round(o).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function to(t){return me(t)/255}function me(t){return parseInt(t,16)}var no={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 ft(t){var n={r:0,g:0,b:0},o=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=Za(t)),typeof t=="object"&&(ve(t.r)&&ve(t.g)&&ve(t.b)?(n=Wa(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):ve(t.h)&&ve(t.s)&&ve(t.v)?(a=Bt(t.s),r=Bt(t.v),n=Ka(t.h,a,r),i=!0,d="hsv"):ve(t.h)&&ve(t.s)&&ve(t.l)&&(a=Bt(t.s),l=Bt(t.l),n=qa(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(o=t.a)),o=Ha(o),{ok:i,format:t.format||d,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var Qa="[-\\+]?\\d+%?",Ja="[-\\+]?\\d*\\.\\d+%?",Re="(?:".concat(Ja,")|(?:").concat(Qa,")"),on="[\\s|\\(]+(".concat(Re,")[,|\\s]+(").concat(Re,")[,|\\s]+(").concat(Re,")\\s*\\)?"),an="[\\s|\\(]+(".concat(Re,")[,|\\s]+(").concat(Re,")[,|\\s]+(").concat(Re,")[,|\\s]+(").concat(Re,")\\s*\\)?"),Le={CSS_UNIT:new RegExp(Re),rgb:new RegExp("rgb"+on),rgba:new RegExp("rgba"+an),hsl:new RegExp("hsl"+on),hsla:new RegExp("hsla"+an),hsv:new RegExp("hsv"+on),hsva:new RegExp("hsva"+an),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Za(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(no[t])t=no[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=Le.rgb.exec(t);return o?{r:o[1],g:o[2],b:o[3]}:(o=Le.rgba.exec(t),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=Le.hsl.exec(t),o?{h:o[1],s:o[2],l:o[3]}:(o=Le.hsla.exec(t),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=Le.hsv.exec(t),o?{h:o[1],s:o[2],v:o[3]}:(o=Le.hsva.exec(t),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=Le.hex8.exec(t),o?{r:me(o[1]),g:me(o[2]),b:me(o[3]),a:to(o[4]),format:n?"name":"hex8"}:(o=Le.hex6.exec(t),o?{r:me(o[1]),g:me(o[2]),b:me(o[3]),format:n?"name":"hex"}:(o=Le.hex4.exec(t),o?{r:me(o[1]+o[1]),g:me(o[2]+o[2]),b:me(o[3]+o[3]),a:to(o[4]+o[4]),format:n?"name":"hex8"}:(o=Le.hex3.exec(t),o?{r:me(o[1]+o[1]),g:me(o[2]+o[2]),b:me(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function ve(t){return!!Le.CSS_UNIT.exec(String(t))}var Ot=2,oo=.16,er=.05,tr=.05,nr=.15,ao=5,ro=4,or=[{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 lo(t){var n=t.r,o=t.g,a=t.b,r=Ya(n,o,a);return{h:r.h*360,s:r.s,v:r.v}}function Vt(t){var n=t.r,o=t.g,a=t.b;return"#".concat(Xa(n,o,a,!1))}function ar(t,n,o){var a=o/100,r={r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b};return r}function io(t,n,o){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=o?Math.round(t.h)-Ot*n:Math.round(t.h)+Ot*n:a=o?Math.round(t.h)+Ot*n:Math.round(t.h)-Ot*n,a<0?a+=360:a>=360&&(a-=360),a}function so(t,n,o){if(t.h===0&&t.s===0)return t.s;var a;return o?a=t.s-oo*n:n===ro?a=t.s+oo:a=t.s+er*n,a>1&&(a=1),o&&n===ao&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function co(t,n,o){var a;return o?a=t.v+tr*n:a=t.v-nr*n,a>1&&(a=1),Number(a.toFixed(2))}function rn(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],a=ft(t),r=ao;r>0;r-=1){var l=lo(a),i=Vt(ft({h:io(l,r,!0),s:so(l,r,!0),v:co(l,r,!0)}));o.push(i)}o.push(Vt(a));for(var d=1;d<=ro;d+=1){var s=lo(a),c=Vt(ft({h:io(s,d),s:so(s,d),v:co(s,d)}));o.push(c)}return n.theme==="dark"?or.map(function(p){var u=p.index,f=p.opacity,h=Vt(ar(ft(n.backgroundColor||"#141414"),ft(o[u]),f*100));return h}):o}var ln={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"},sn={},cn={};Object.keys(ln).forEach(function(t){sn[t]=rn(ln[t]),sn[t].primary=sn[t][5],cn[t]=rn(ln[t],{theme:"dark",backgroundColor:"#141414"}),cn[t].primary=cn[t][5]});var po=[],mt=[],rr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function lr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function ir(t,n){if(n=n||{},t===void 0)throw new Error(rr);var o=n.prepend===!0?"prepend":"append",a=n.container!==void 0?n.container:document.querySelector("head"),r=po.indexOf(a);r===-1&&(r=po.push(a)-1,mt[r]={});var l;return mt[r]!==void 0&&mt[r][o]!==void 0?l=mt[r][o]:(l=mt[r][o]=lr(),o==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function uo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){sr(t,r,o[r])})}return t}function sr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function cr(t,n){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(n))}function dr(t,n){cr(t,"[@ant-design/icons-vue] ".concat(n))}function fo(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function dn(t,n,o){return o?e.h(t.tag,uo({key:n},o,t.attrs),(t.children||[]).map(function(a,r){return dn(a,"".concat(n,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,uo({key:n},t.attrs),(t.children||[]).map(function(a,r){return dn(a,"".concat(n,"-").concat(t.tag,"-").concat(r))}))}function mo(t){return rn(t)[0]}function ho(t){return t?Array.isArray(t)?t:[t]:[]}var pr=`
|
|
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
|
-
`,
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xr(t,
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lr(t,o){if(t){if(typeof t=="string")return Cn(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 Cn(t,o)}}function Cn(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 Er(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Br(t){if(Array.isArray(t))return t}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){po(t,r,n[r])})}return t}function po(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Or(t,o){if(t==null)return{};var n=Vr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Vr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}bn("#1890ff");var tt=function(o,n){var a,r=wn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,f=r.onClick,m=Or(r,Ar),h=(a={anticon:!0},po(a,"anticon-".concat(i.name),!!i.name),po(a,l,l),a),w=d===""||d||i.name==="loading"?"anticon-spin":"",b=c;b===void 0&&f&&(b=-1,m.tabindex=b);var N=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,E=hn(p),u=Nr(E,2),B=u[0],_=u[1];return e.createVNode("span",wn({role:"img","aria-label":i.name},m,{onClick:f,class:h}),[e.createVNode(co,{class:w,icon:i,primaryColor:B,secondaryColor:_,style:N},null)])};tt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},tt.displayName="AntdIcon",tt.inheritAttrs=!1,tt.getTwoToneColor=Sr,tt.setTwoToneColor=bn;const Ce=tt;var Ir={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 $r=Ir;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){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}var fo=function(o,n){var a=xn({},o,n.attrs);return e.createVNode(Ce,xn({},a,{icon:$r}),null)};fo.displayName="AppstoreAddOutlined",fo.inheritAttrs=!1;const kn=fo;var Dr={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 vr=Dr;function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Pr(t,r,n[r])})}return t}function Pr(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=_n({},o,n.attrs);return e.createVNode(Ce,_n({},a,{icon:vr}),null)};uo.displayName="CaretDownOutlined",uo.inheritAttrs=!1;const Mr=uo;var jr={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 Rr=jr;function Sn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ur(t,r,n[r])})}return t}function Ur(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=Sn({},o,n.attrs);return e.createVNode(Ce,Sn({},a,{icon:Rr}),null)};mo.displayName="CaretRightOutlined",mo.inheritAttrs=!1;const Gr=mo;var zr={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 Hr=zr;function An(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){Wr(t,r,n[r])})}return t}function Wr(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=An({},o,n.attrs);return e.createVNode(Ce,An({},a,{icon:Hr}),null)};ho.displayName="CloseOutlined",ho.inheritAttrs=!1;const yo=ho;var qr={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 Yr=qr;function Nn(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){Kr(t,r,n[r])})}return t}function Kr(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=Nn({},o,n.attrs);return e.createVNode(Ce,Nn({},a,{icon:Yr}),null)};go.displayName="CopyOutlined",go.inheritAttrs=!1;const Xr=go;var Qr={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 Jr=Qr;function Tn(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 bo=function(o,n){var a=Tn({},o,n.attrs);return e.createVNode(Ce,Tn({},a,{icon:Jr}),null)};bo.displayName="DeleteOutlined",bo.inheritAttrs=!1;const el=bo;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 ol=tl;function Ln(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){nl(t,r,n[r])})}return t}function nl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Co=function(o,n){var a=Ln({},o,n.attrs);return e.createVNode(Ce,Ln({},a,{icon:ol}),null)};Co.displayName="DoubleRightOutlined",Co.inheritAttrs=!1;const al=Co;var rl={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 ll=rl;function En(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){il(t,r,n[r])})}return t}function il(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=En({},o,n.attrs);return e.createVNode(Ce,En({},a,{icon:ll}),null)};wo.displayName="DownOutlined",wo.inheritAttrs=!1;const sl=wo;var cl={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 dl=cl;function Bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 xo=function(o,n){var a=Bn({},o,n.attrs);return e.createVNode(Ce,Bn({},a,{icon:dl}),null)};xo.displayName="InfoCircleOutlined",xo.inheritAttrs=!1;const fl=xo;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 ml=ul;function On(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 ko=function(o,n){var a=On({},o,n.attrs);return e.createVNode(Ce,On({},a,{icon:ml}),null)};ko.displayName="MinusCircleOutlined",ko.inheritAttrs=!1;const yl=ko;var gl={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 bl=gl;function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 _o=function(o,n){var a=Vn({},o,n.attrs);return e.createVNode(Ce,Vn({},a,{icon:bl}),null)};_o.displayName="PlusCircleOutlined",_o.inheritAttrs=!1;const wl=_o;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 kl=xl;function In(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 So=function(o,n){var a=In({},o,n.attrs);return e.createVNode(Ce,In({},a,{icon:kl}),null)};So.displayName="PlusOutlined",So.inheritAttrs=!1;const Sl=So;var Al={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 Nl=Al;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 Ao=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(Ce,$n({},a,{icon:Nl}),null)};Ao.displayName="SettingOutlined",Ao.inheritAttrs=!1;const Ll=Ao,El=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Gr,CaretDownOutlined:Mr,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:ft},setup(){var _;const t=(_=window==null?void 0:window.config)==null?void 0:_.pageId,o=e.inject(Le),n=e.unref(e.inject(Ee)),a=e.inject(ve),r=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.graphicConfig}),l=e.computed(()=>{var g;return(g=e.unref(r))==null?void 0:g.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const g={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const x=await o.post(`${ke}/diagram/sourceList`,g,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:O,data:S={}}=x.data;if(O){const{rows:V=[],total:F=0}=S;V==null||V.forEach($=>{var P;$.show=!1,(P=$.dataViewColumns)==null||P.forEach(y=>{y.show=!0,y.edit=!1,y.title&&(y.label=y.title)})}),i.value=V,s.totalResult=+F}}catch{d.value=!1}},f=g=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[g],m=g=>{i.value[g].show=!i.value[g].show},h=()=>{s.currentPage=1,p()},w=ne.debounce(()=>{s.currentPage=1,p()},200),b=(g,x)=>{s.pageSize=x,s.currentPage=g,p()};e.onMounted(()=>{p()});const N=e.inject(pe),E=e.computed(()=>{const g=["classificationList","rowHeaderList","dimensionList"];let x=[];for(const O in e.unref(N))if(Object.prototype.hasOwnProperty.call(e.unref(N),O)&&g.includes(O)){const S=e.unref(N)[O];Array.isArray(S)&&(x=x.concat(S))}return x});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:m,mapScope:f,onSearch:h,onChange:w,onPaginationChange:b,searchText:c,setItemDisabled:(g=[])=>{let x=!1;for(const O of e.unref(E))if(!g.find(V=>V.typeGuid===O.typeGuid)){x=!0;break}return x},onDragStart:(g,x)=>{const O=x[g.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),gf="",Bl={class:"data-source-list"},Ol={class:"columns"},Vl={class:"column-item"},Il=["onClick"],$l={key:0},Fl={class:"column-child-item"},Dl={class:"column-child-item-name"};function vl(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),f=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Bl,[e.createVNode(i,{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",Ol,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,h)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Vl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(h)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name),1)],8,Il)]),m.show?(e.openBlock(),e.createElementBlock("div",$l,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":w=>m.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:w=>t.onDragStart(w,m.dataViewColumns)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",Fl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",Dl,e.toDisplayString(w.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(f,{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 Pl=te(El,[["render",vl],["__scopeId","data-v-dfb51d34"]]),Ml=e.defineComponent({name:"DataList",components:{DataSourceList:Pl,DataViewList:Ua},setup(){return{source:e.inject(Zt)}}});function jl(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Rl=te(Ml,[["render",jl]]),Fn={mounted(t){t.focus()}},Ul=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ft,AModal:v.Modal,AButton:v.Button},setup(t,{expose:o}){var B;const n=(B=window==null?void 0:window.config)==null?void 0:B.pageId,a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(pe),i=e.inject(Be),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const _=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:g,data:x=[]}=_.data;g&&(c.value=x==null?void 0:x.slice(0,200))}catch(_){console.error(_)}},f=()=>{var S;const _=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],g=_[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:_})};let m=!1;const h=()=>{m=!0},w=e.ref(!1),b=()=>{w.value=!0},N=()=>{w.value=!1},E=()=>{m&&f(),m=!1,N()};return o({showModal:b}),e.watch(w,_=>{var g,x;if(_){const O=(x=(g=t.item)==null?void 0:g.sort)==null?void 0:x.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!_)},{flush:"post"}),{visible:w,onCancel:E,customSortList:c,onChange:h,onDeleteConfig:()=>{var S;const _=((S=e.unref(l)[t.type])==null?void 0:S.slice())||[],g=_[t.index],{label:x,name:O}=t.item;g.sort={label:x,columnName:O},i({[t.type]:_}),N()}}}}),bf="",Gl={class:"button-wrapper"},zl={class:"sort-item"};function Hl(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",zl,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Wl=te(Ul,[["render",Hl],["__scopeId","data-v-8e16d201"]]),ql=e.defineComponent({name:"CustomGroupModal",directives:{focus:Fn},components:{CloseOutlined:yo,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.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(Le),a=(U=window==null?void 0:window.config)==null?void 0:U.pageId,r=e.unref(e.inject(Ee));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const k=e.unref(c).map(T=>T.title);return new Set(k)}),f=e.ref([]);e.watch(()=>e.unref(c).length,k=>{f.value=new Array(k).fill(!1)});const m=e.computed(()=>{let k=0;return e.unref(c).forEach(T=>{var L;(L=T.data)==null||L.forEach(M=>{M.checked&&k++})}),k}),h=()=>{const k=e.unref(d);if(!k){v.message.error("创建分组名不能空");return}e.unref(p).has(k)?v.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:k,data:[]}),l=!0)},w=k=>{e.unref(c).splice(k,1),l=!0},b=e.ref(null),N=()=>{if(e.unref(m)===0){v.message.error("当前移入分组已选个数为0");return}const k=e.unref(b);if(k==null){v.message.error("请选择移入分组");return}if(!e.unref(c)[k]){v.message.error("移入分组不存在,请重新选择");return}const T=[],L=e.unref(c).length;for(let M=0;M<L;M++){const j=e.unref(c)[M];e.unref(c)[M].data=j.data.filter(W=>(W.checked&&T.push({...W,checked:!1}),!W.checked))}e.unref(c)[k].data=[...T,...e.unref(c)[k].data],l=!0},E=k=>{e.unref(f)[k]=!0},u=k=>{e.unref(f)[k]=!1},B=(k,T)=>{const L=k.target.value;e.unref(p).has(L)&&v.message.error("组名不能相同,请修改"),e.unref(c)[T].title=L,l=!0},_=e.inject(pe),g=e.inject(Be),x=e.computed(()=>e.unref(_).source),O=e.computed(()=>e.unref(_).dataViewId),S=e.ref(!1),V=()=>{var K,J;const k=e.unref(c);let T="";e.unref(S)&&(T=(K=k[0])==null?void 0:K.title);const L=k==null?void 0:k.length,M={};for(let ee=1;ee<L;ee++){const ie=k[ee]||{},{title:fe,data:ue}=ie;M[fe]=(ue==null?void 0:ue.map(Ie=>Ie.label))||[]}const j=((J=e.unref(_)[t.type])==null?void 0:J.slice())||[],W=j[t.index];W.customGroup={groupInfoMap:M,otherGroupName:T},g({[t.type]:j})},F=e.ref(!1),$=()=>{F.value=!0},P=()=>{F.value=!1},y=()=>{P(),l&&V(),l=!1},C=()=>{l=!0},A=new Set,I=async()=>{const k=t.item.customGroup||{},T=k.otherGroupName,L=k.groupInfoMap;(T===""||T==null)&&(S.value=!1),e.unref(c)[0]={title:T||"未分组",data:[]};let M=1;for(const j in L)if(Object.prototype.hasOwnProperty.call(L,j)){const K=L[j].map(J=>(A.add(J),{label:J,checked:!1}));e.unref(c)[M]={title:j,data:K},M++}await D()},D=async()=>{var k;try{const T=await n.post(`${ke}/diagram/groupvalue`,{source:e.unref(x),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:L,data:M=[]}=T.data;if(L){const j=[];(k=M==null?void 0:M.slice(0,200))==null||k.forEach(W=>{A.has(W)||j.push({label:W,checked:!1})}),e.unref(c)[0].data=j}}catch(T){console.error(T)}};return e.watch(F,k=>{k&&I(),window.changeShowTable&&window.changeShowTable(!k)},{flush:"post"}),o({showModal:$}),{visible:F,title:i,activeKey:s,customGroupList:c,onCancel:y,useOtherGroup:S,selectCount:m,createGroupTitle:d,onAddGroup:h,onDeleteGroup:w,onMoveInGroup:N,selectGroupIndex:b,onEditTitle:E,onTitleChange:B,onFinishEditTitle:u,onUseOtherGroup:C,customGroupEditTitleList:f}}}),Cf="",wf="",Yl={class:"custom-group-header"},Kl={class:"move-and-create"},Xl={class:"select-tip"},Ql={class:"select-count"},Jl={class:"create-group"},Zl={class:"custom-group-content"},ei=["onClick"],ti={class:"extra"},oi={class:"custom-group-list"},ni={class:"text"};function ai(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),f=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),b=e.resolveComponent("a-collapse"),N=e.resolveComponent("a-modal"),E=e.resolveDirective("focus");return e.openBlock(),e.createBlock(N,{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",Yl,[e.createElementVNode("div",Kl,[e.createElementVNode("div",null,[e.createElementVNode("span",Xl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Ql,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=u=>t.selectGroupIndex=u),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(u,B)=>(e.openBlock(),e.createBlock(i,{key:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Jl,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=u=>t.createGroupTitle=u),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=u=>t.useOtherGroup=u),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Zl,[e.createVNode(b,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=u=>t.activeKey=u),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(u,B)=>(e.openBlock(),e.createBlock(w,{key:B},{header:e.withCtx(()=>[t.customGroupEditTitleList[B]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:u.title,size:"small",onChange:_=>t.onTitleChange(_,B),onBlur:_=>t.onFinishEditTitle(B),onPressEnter:_=>t.onFinishEditTitle(B)},null,8,["value","onChange","onBlur","onPressEnter"])),[[E]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(_=>t.onEditTitle(B),["prevent","stop"])},e.toDisplayString(u.title),9,ei))]),extra:e.withCtx(()=>[e.createElementVNode("div",ti,[B===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(f,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),B!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(_=>t.onDeleteGroup(B),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.data,(_,g)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:_.checked,"onUpdate:checked":x=>_.checked=x,class:"custom-group",key:g},{default:e.withCtx(()=>[e.createElementVNode("span",ni,e.toDisplayString(_.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ri=te(ql,[["render",ai],["__scopeId","data-v-7e3049d2"]]);var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},No={},ii={get exports(){return No},set exports(t){No=t}};(function(t,o){(function(n,a){t.exports=a()})(li,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var f=this.$utils(),m=!!f.u(p)||p;if(f.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 s.bind(this)(c,p)}}})})(ii);const si=No;se.extend(si);const ci=e.defineComponent({name:"Condition",components:{CloseOutlined:yo,DownOutlined:sl,AppstoreAddOutlined:kn,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var Ie,Ye,Ke,Xe,Qe,ze,Je,dt,pt;const o=(Ie=window==null?void 0:window.config)==null?void 0:Ie.pageId,n=e.inject(pe),a=e.inject(Le),r=e.unref(e.inject(Ee)),l=e.inject(Jo),i=e.inject(Re),d=e.computed(()=>{var H;const R=[];return(H=e.unref(i))==null||H.forEach(X=>{const{keyName:Q="",id:Z="",type:ce}=X;ce==="ecanRangePicker"?R.push({value:`${Z}-startTime`,label:`${Q||Z}-开始时间值`,keyName:`${Q||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${Q||Z}-结束时间值`,keyName:`${Q||Z}-endTime`,id:Z}):R.push({value:Z,label:`${Q||Z}`,keyName:`${Q||Z}`,id:Z})}),R}),s=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),c=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),p=e.ref(!1),f={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},m=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],h=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),w=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),b=[{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"}],E=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],u=e.ref({fieldName:(Ye=t.data)==null?void 0:Ye.fieldName,fieldType:(Ke=t.data)==null?void 0:Ke.fieldType,rule:(Xe=t.data)==null?void 0:Xe.rule,id:(Qe=t.data)==null?void 0:Qe.id,fieldValue:B(),label:(ze=t.data)==null?void 0:ze.label,targetSource:"",typeGuid:(Je=t.data)==null?void 0:Je.typeGuid,dataType:((dt=t.data)==null?void 0:dt.dataType)||"",componentId:((pt=t.data)==null?void 0:pt.componentId)||""});function B(){const{fieldType:R="",dataType:H="",fieldValue:X=""}=t.data;if(R==="DATE"&&H==="time")return se(X);if(H==="component"){const Q=e.unref(d).find(Z=>Z.keyName===X);return Q?Q.value:X}else return X}const _=e.ref(!1),g=e.computed(()=>u.value.fieldType==="DATE"),x=e.computed(()=>{const R=t.type;let H=[];const X=["classificationList","seriesList","rowHeaderList","dimensionList"];if(X.includes(R)){let Q=[];for(const Z in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),Z)&&!["controlList","sqlConditions"].includes(Z)){const ce=e.unref(n)[Z];Array.isArray(ce)&&(X.includes(Z)?Q=Q.concat(ce.filter(me=>me.show)):Q=Q.concat(ce))}H=Q}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(H=e.unref(l));return H.map(Q=>({...Q,label:Q.title||Q.label,value:Q.name}))}),{updateCondition:O,deleteCondition:S}=e.inject(Qo,{updateCondition:(R,H,X)=>{},deleteCondition:(R,H)=>{}}),V=()=>{S(t.level,t.index)};e.watch(u,R=>{const H=ne.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(H.fieldValue=R.fieldValue.format(R.dateFormat)),O(H,t.level,t.index)},{deep:!0});const F=R=>{const H=e.unref(x).find(G=>G.value===R)||{},{name:X,genericType:Q,id:Z,label:ce,typeGuid:me}=H;u.value={id:Z,fieldName:X,fieldType:Q,label:ce,rule:"",fieldValue:Q==="DATE"?null:void 0,targetSource:"",typeGuid:me,dataType:""}},$=R=>{const H=e.unref(d).find(X=>X.value===R)||{};e.unref(u).componentId=H.id||""},P=e.computed(()=>{const R=e.unref(u).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="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"}]:[]}),y=e.computed(()=>{let R="";const H=e.unref(P).find(X=>X.value===e.unref(u).rule);return H&&(R=H.label),R}),C=e.computed(()=>{let R={fontSize:"12px"};return e.unref(y)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),A=e.ref([]),I=async()=>{var R;if(!(e.unref(A).length>0))try{const H=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(c),dataViewId:e.unref(s),groupColumn:e.unref(u).fieldName,hrpIndexTypeGuid:e.unref(u).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:Q=[]}=H.data;X&&(A.value=(R=Q==null?void 0:Q.slice(0,200))==null?void 0:R.map(Z=>({label:Z,value:Z})))}catch(H){console.error(H)}},D=R=>{e.unref(u).rule=R,e.unref(u).fieldValue=e.unref(u).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&I()},U=R=>{e.unref(u).dataType=R,e.unref(u).fieldValue=""},k=e.ref(),T=R=>{k.value=R,e.unref(u).fieldValue=(R==null?void 0:R.join(","))||""},L=R=>{const{keyPath:H}=R;e.unref(u).rule=H[0],e.unref(u).dataType=H[1],e.unref(u).dateFormat=H[2],e.unref(u).fieldValue=""};e.onMounted(()=>{var Q,Z,ce,me,G,z,q;if(u.value.dataType=((Q=t.data)==null?void 0:Q.dataType)||"",u.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",e.unref(u).fieldType==="DATE"){const{activeKey:Y,dateCalcTypes:le=[]}=t.data||{};if(e.unref(u).dateFormat=(ce=t.data)==null?void 0:ce.dateFormat,e.unref(u).activeKey=Y,e.unref(u).calcWays=((me=t.data)==null?void 0:me.calcWays)||[],e.unref(u).dateCalcTypes=le,Y===5){const re=e.unref(u).calcWays[0];if(re){const oe=re.split("-");e.unref(h).expression=oe[0],e.unref(h).around=oe[1]}e.unref(h).unit=le[0]||"YEAR"}else{e.unref(u).radioValue=((G=t.data)==null?void 0:G.radioValue)||"";const re=e.unref(w).find(oe=>{var xe;return oe.key===((xe=t.data)==null?void 0:xe.activeKey)});re&&ie(re,t.data)}}else k.value=((q=(z=t.data)==null?void 0:z.fieldValue)==null?void 0:q.split(","))||[];const{fieldType:R,fieldName:H,rule:X}=u.value;R!=="DATE"&&H&&X&&["IN","NOT_IN"].includes(X)&&I()});const M=R=>{if(e.unref(u).activeKey===R){e.unref(w)[R].radioValue=e.unref(u).radioValue,e.unref(w)[e.unref(u).activeKey]&&(e.unref(w)[e.unref(u).activeKey].radioValue=e.unref(u).radioValue,e.unref(u).radioValue==="1"?e.unref(w)[R].beforeNum=e.unref(u).calcWays[0]:e.unref(u).radioValue==="2"&&(e.unref(w)[R].afterNum=e.unref(u).calcWays[0]));return}e.unref(w).forEach(H=>{H.beforeNum=0,H.afterNum=0,H.radioValue="1",H.value=""})},j=(R,H)=>{p.value=!0;const X=R.target.value,Q=H.type,Z=e.unref(u).dateFormat,ce=Math.abs(H.beforeNum),me=H.afterNum;H.value=fe(X,Q,Z,ce,me)},W=R=>{const H=e.unref(u).activeKey;if(R!==H)return;let X="";H===0?X="years":H===1?X="quarters":H===2?X="months":H===3?X="weeks":H===4&&(X="days");const Q=e.unref(u).dateFormat,Z=e.unref(u).radioValue;let ce=0,me=0;return Z==="1"?ce=Math.abs(e.unref(u).calcWays[0]):Z==="2"&&(me=e.unref(u).calcWays[0]),fe(Z,X,Q,ce,me)},K=(R,H,X,Q)=>{if(p.value=!0,H.radioValue===Q){const Z=R.target.value;X==="+"?H.value=se().add(Z,H.type).format(e.unref(u).dateFormat):H.value=se().subtract(Z,H.type).format(e.unref(u).dateFormat)}},J=(R,H)=>{(e.unref(u).fieldType!=="DATE"||e.unref(u).dataType!=="component")&&(u.value.fieldValue=se(R.value,e.unref(u).dateFormat)),e.unref(u).calcWays||(e.unref(u).calcWays=[]),e.unref(u).activeKey=H,e.unref(u).radioValue=R.radioValue,R.radioValue==="1"?e.unref(u).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(u).calcWays[0]=R.afterNum:R.radioValue==="3"?H===4?e.unref(u).calcWays[0]="0":e.unref(u).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(u).calcWays[0]="END"),H===0?e.unref(u).dateCalcTypes=["YEAR"]:H===1?e.unref(u).dateCalcTypes=["QUARTER"]:H===2?e.unref(u).dateCalcTypes=["MONTH"]:H===3?e.unref(u).dateCalcTypes=["WEEK"]:H===4&&(e.unref(u).dateCalcTypes=["DAY"]),_.value=!1},ee=()=>{e.unref(u).activeKey=5,e.unref(u).dateCalcTypes=[e.unref(h).unit],e.unref(u).calcWays[0]=`${e.unref(h).expression}-${e.unref(h).around}`,_.value=!1};function ie(R,H){const{radioValue:X="",calcWays:Q=[]}=H;R.radioValue=X,Q!=null&&Q.length&&(X==="1"?R.beforeNum=Math.abs(Q[0]):X==="2"&&(R.afterNum=Q[0]))}function fe(R,H,X,Q,Z){if(R==="1")return se().subtract(Q,H).format(X);if(R==="2")return se().add(Z,H).format(X);if(R==="3"){if(H==="years")return se().startOf("year").format(X);if(H==="quarters")return se().startOf("quarter").format(X);if(H==="months")return se().startOf("month").format(X);if(H==="days")return se().format(X)}else if(R==="4"){if(H==="years")return se().endOf("year").format(X);if(H==="quarters")return se().endOf("quarter").format(X);if(H==="months")return se().endOf("month").format(X)}return""}return{fieldOptions:x,ruleOptions:P,onFieldChange:F,condition:u,valueOptions:A,onRuleChange:D,onDataTypeChange:U,onFieldValueSelectChange:T,fieldValues:k,onDelete:V,isDateType:g,formatList:m,tabDateList:w,compareList:b,menuRule:N,dateBtnLabel:y,downIconStyle:C,popoverVisible:_,dateRadioStyle:f,showTime:p,controlList:d,dataTypeList:E,customTabData:h,handleMenuClick:L,changeTabInitDate:M,changeRadioValue:j,getFieldValue:W,blurCompare:K,okDatePickConfig:J,onChangeComponent:$,filterOption:(R,H)=>H.label.toLowerCase().indexOf(R.toLowerCase())>=0,okCustomConfig:ee}}}),xf="",kf="",di={class:"condition"},pi=["title"],fi={class:"rule"},ui={class:"data-type"},mi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},hi={class:"popover-content-wrap"},yi={class:"tabFilterRadio"},gi={key:0},bi={key:1},Ci={style:{"margin-left":"10px"}},wi={style:{"margin-left":"10px"}},xi={style:{position:"absolute",bottom:"10px"}},ki={style:{display:"flex"}},_i={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Si(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),f=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),b=e.resolveComponent("a-input-number"),N=e.resolveComponent("a-radio"),E=e.resolveComponent("a-radio-group"),u=e.resolveComponent("a-tab-pane"),B=e.resolveComponent("a-tabs"),_=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),x=e.resolveComponent("a-input"),O=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",di,[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,V)=>(e.openBlock(),e.createBlock(i,{key:V,value:S.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:S.label},e.toDisplayString(S.label),9,pi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",fi,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,S=>(e.openBlock(),e.createBlock(c,{key:S.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value?"color: #1890FF;":"")},e.toDisplayString(S.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,V=>{var F;return e.openBlock(),e.createBlock(c,{key:V.value,disabled:V.value==="component"&&!((F=t.controlList)!=null&&F.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===V.value?"color: #1890FF;":"")},e.toDisplayString(V.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,$=>(e.openBlock(),e.createBlock(s,{key:$.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===S.value&&t.condition.dataType===V.value&&t.condition.dateFormat===$.value?"color: #1890FF;":"")},e.toDisplayString($.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(f,{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",ui,[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,V)=>(e.openBlock(),e.createBlock(i,{key:V,value:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",mi,[t.condition.dataType==="time"?(e.openBlock(),e.createBlock(w,{key:0,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=S=>t.condition.fieldValue=S),format:t.condition.dateFormat},null,8,["value","format"])):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[8]||(o[8]=S=>t.popoverVisible=S),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",hi,[e.createVNode(B,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(S,V)=>(e.openBlock(),e.createBlock(u,{key:V,tab:S.label},{default:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(E,{value:S.radioValue,"onUpdate:value":F=>S.radioValue=F,onChange:F=>t.changeRadioValue(F,S)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",gi,"相对当前时间:"+e.toDisplayString(S.value),1)):(e.openBlock(),e.createElementBlock("div",bi,"相对当前时间:"+e.toDisplayString(t.getFieldValue(V)),1)),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(b,{value:S.beforeNum,"onUpdate:value":F=>S.beforeNum=F,min:0,onBlur:F=>t.blurCompare(F,S,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Ci,e.toDisplayString(S.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(N,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(b,{value:S.afterNum,"onUpdate:value":F=>S.afterNum=F,min:0,onBlur:F=>t.blurCompare(F,S,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",wi,e.toDisplayString(S.afterLabel),1)]),_:2},1032,["style"]),S.beforeText?(e.openBlock(),e.createBlock(N,{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(N,{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",xi,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[2]||(o[2]=F=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:F=>t.okDatePickConfig(S,V)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(u,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ki,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[3]||(o[3]=S=>t.customTabData.expression=S),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[4]||(o[4]=S=>t.customTabData.unit=S),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[5]||(o[5]=S=>t.customTabData.around=S)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",_i,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[6]||(o[6]=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[7]||(o[7]=S=>{t.popoverVisible=!0})},[e.createVNode(_)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[9]||(o[9]=S=>t.condition.fieldValue=S),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(x,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=S=>t.condition.fieldValue=S)},null,8,["value"])),e.createVNode(O,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Ai=te(ci,[["render",Si],["__scopeId","data-v-9706f7ef"]]),Ni=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Ai}}),_f="",Ti={key:0,class:"condition-list"},Li={key:0,class:"condition-container"},Ei={key:0,class:"condition-text"},Bi={key:1,class:"condition-text"},Oi={class:"conditions"};function Vi(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Li,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Ei,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Bi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Oi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Ii=te(Ni,[["render",Vi],["__scopeId","data-v-86c0c5aa"]]),$i=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=ne.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Sf="",Dn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Fi={class:"truncations"},Di={class:"rule"},vi={class:"field-value"},Pi={class:"field-value"},Mi=Dn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),ji=Dn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ri=["onClick"];function Ui(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Fi,[(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",Di,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":f=>c.rule=f,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",vi,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":f=>c.num=f,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",Pi,[Mi,e.createVNode(s,{value:c.name,"onUpdate:value":f=>c.name=f,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),ji]),e.createElementVNode("div",{class:"clear-truncation",onClick:f=>t.clearData(c)},"清空",8,Ri)]))),128))])}const Gi=te($i,[["render",Ui],["__scopeId","data-v-f543c690"]]),Ve=(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},zi=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),To=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),It=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...It(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},vn=(t,o)=>{var N;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,f=[],m=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const E of m){const u=It((E==null?void 0:E.conditions)||[]);if(u!=null&&u.length){const B=u.filter(_=>Pn(_,o)?(_==null?void 0:_.dataType)==="component":!1).map(_=>{const g=Pn(_,o),x={};return _!=null&&_.dateFormat&&(x.format=_.dateFormat),{conditionKey:_.fieldName,conditionLabel:_.fieldName,conditionName:_.fieldName,conditionValueType:_.fieldType,id:g.id,keyName:_.fieldValue,rule:_.rule,notGlobal:!0,...x}});if(B!=null&&B.length)for(const _ of B)h.find(g=>g.keyName===_.keyName)||h.push(_)}}const w=n.concat(h),b=w.length;for(let E=0;E<b;E++){const u=w[E];if(u&&!((N=Object.keys(u))!=null&&N.length)||(u==null?void 0:u.conditionKey)==="parentCode")continue;const{id:B,keyName:_,conditionLabel:g,conditionKey:x,conditionValueType:O,prop:S,rule:V="NONE",notGlobal:F=!1,format:$}=u;let P=_||B;P&&S&&(P+=`-${S}`);const y=o.find(L=>L.id===B),C={rule:V,label:g,fieldName:x,fieldValue:"",valueType:O,alias:P,globalCondition:!F},{value:A,format:I="YYYY-MM-DD",operate:D,type:U="",useCurrentTime:k}=y||{},T=$||I;if(Ve(U,"date")){let L;if(k?L=se():L=se(A),D&&A){const{mode:M,type:j,value:W}=D;if(W)switch(j){case"add":L=L.add(W,M);break;case"minus":L=L.subtract(W,M);break}}C.fieldValue=(L==null?void 0:L.format(T))||"",C.dateFormat=T}else if(U==="ecanRangePicker"){const{interval:L,intervalUnit:M}=y||{};let j=S;if(!S){const K=_==null?void 0:_.split("-");K!=null&&K.length&&(j=K[K.length-1])}if(!j)return;let W=null;if(k&&(j==="startTime"?W=se().subtract(L,M):j==="endTime"&&(W=se())),y[j]&&(W=se(y[j])),D){const{type:K,value:J,mode:ee}=D;switch(K){case"add":W=W&&W.add(J,ee);break;case"minus":W=W&&W.subtract(J,ee)}}W&&(C.fieldValue=W==null?void 0:W.format(T)),C.dateFormat=T}else{const L=A&&A.match(/\{(.+?)\}/g);L!=null&&L.length?C.fieldValue="":C.fieldValue=A}f.push(C)}for(let E=f.length-1;E>=0;E--){const u=f[E];u.globalCondition||f.find(_=>_.alias===u.alias&&_.globalCondition)&&f.splice(E,1)}return f},$t=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 Pn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let Lo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const Hi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Ii,TruncationList:Gi,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var y;return`添加过滤条件-${((y=t.item)==null?void 0:y.label)||""}`},r=e.inject(pe),l=e.inject(Be),i=e.inject(Re),d=e.computed(()=>{var y;return(y=e.unref(r))==null?void 0:y.dataSourceId}),s=e.inject(ve),c=e.inject(Lt),p=e.ref([]),f=e.ref([]),m=e.ref(!1);e.watch(m,y=>{var C,A,I,D;y&&(Array.isArray((C=t.item)==null?void 0:C.conditions)&&(p.value=ne.cloneDeep((A=t.item)==null?void 0:A.conditions)||[]),Array.isArray((I=t.item)==null?void 0:I.truncations)?f.value=ne.cloneDeep((D=t.item)==null?void 0:D.truncations)||[]:f.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"});let h=!1;const w=y=>{var C;h=!0,e.unref(p)==null||((C=e.unref(p))==null?void 0:C.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==y?p.value=[{join:y,conditions:[e.unref(p)[0],{keyValue:Lo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===y&&p.value[0].conditions.push({keyValue:Lo()}))};e.provide(Qo,{updateCondition(y,C,A){var D;h=!0;let I=e.unref(p);for(let U=0;U<C&&I[0];U++)I=(D=I[0])==null?void 0:D.conditions;Array.isArray(I)&&I[A]&&(I[A]=y)},deleteCondition(y,C){var I,D;h=!0;let A=e.unref(p);for(let U=0;U<y&&A[0];U++)A=(I=A[0])==null?void 0:I.conditions;if(Array.isArray(A)&&A[C]&&(A.splice(C,1),A.length===1)){let U=e.unref(p);const k=y-2>0?y-2:0;for(let T=0;T<k&&U[0];T++)U=(D=U[0])==null?void 0:D.conditions;U[0].join===A[0].join?U[0].conditions=[...A[0].conditions,...U[0].conditions.slice(1)]:U[0]=A[0]}}});const b=y=>{h=!0,f.value=y},N=e.computed(()=>{var C;const y=[];return(C=e.unref(i))==null||C.forEach(A=>{const{keyName:I="",id:D="",type:U}=A;U==="ecanRangePicker"?y.push({value:`${D}-startTime`,label:`${I||D}-开始时间值`,keyName:`${I||D}-startTime`},{value:`${D}-endTime`,label:`${I||D}-结束时间值`,keyName:`${I||D}-endTime`}):y.push({value:D,label:`${I||D}`,keyName:`${I||D}`})}),y}),E=()=>{var k,T;const{controlList:y=[]}=e.unref(r),C=((k=e.unref(r)[t.type])==null?void 0:k.slice())||[],A=It(ne.cloneDeep(C[t.index].conditions));C[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((T=e.unref(f))!=null&&T.length)&&(C[t.index].truncations=e.unref(f));const I=It(e.unref(p));for(const L of I)if(L.dataType==="component"&&L.fieldValue){const M=e.unref(N).find(j=>j.value===L.fieldValue);M&&(L.fieldValue=M.keyName)}const D=A.filter(L=>!I.find(M=>M.componentId===L.componentId)).filter(L=>!y.find(M=>M.id===L.componentId)),U=I.filter(L=>!A.find(M=>M.componentId===L.componentId));u(D,U),l({[t.type]:C,sqlConditions:vn({...e.unref(r),[t.type]:C},e.unref(i))})};function u(y,C){var I;const A=y.map(D=>({...D,delete:!0})).concat(C.map(D=>({...D,add:!0})));for(const D of A){const U=e.unref(i).find(k=>k.id===D.componentId);if(U){const{type:k,id:T,events:L=[]}=U,M=$t(k);if(D.add)L.find(j=>{var W;return j.on===M&&j.target===((W=e.unref(s))==null?void 0:W.id)&&j.emit==="refreshData"})||c({id:T,events:[...L,{on:M,target:(I=e.unref(s))==null?void 0:I.id,emit:"refreshData"}].reverse()});else if(D.delete){const j=L.findIndex(W=>{var K;return W.on===M&&W.target===((K=e.unref(s))==null?void 0:K.id)&&W.emit==="refreshData"});j!==-1&&(L.splice(j,1),c({id:T,events:L}))}}}}const B=()=>{m.value=!0},_=()=>{p.value=[],m.value=!1},g=()=>{h&&E(),h=!1,_()},x=()=>{_()},O=e.inject(Le),S=e.unref(e.inject(Ee)),V=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(Jo,F);const $=async y=>{var C;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:A,indexCode:I}=y,D=await O.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:V,dataSourceId:e.unref(d),indexGuid:A,indexCode:I},{headers:{Authentication:S,operateContext:"ygt"}}),{success:U,data:k=[]}=D.data;U&&((C=k==null?void 0:k.dataViewColumns)!=null&&C.length)&&(F.value=k.dataViewColumns)}catch(A){console.error(A)}};return e.watch(()=>t.item,y=>{y&&m.value&&$(y)}),o({showModal:B}),{visible:m,onOk:g,onCancel:x,handleTitle:a,conditionList:p,truncationList:f,addCondition:w,onUpdatetruncation:b,activeKey:n}}}),Af="",Wi={class:"header"},qi={class:"header"};function Yi(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(f,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","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(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{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(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",qi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{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 Ki=te(Hi,[["render",Yi],["__scopeId","data-v-552c795f"]]),Xi=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.ref(),i=p=>{const{showLabel:f="",label:m=""}=p;l.value=f||m||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var f;const p=((f=e.unref(a)[t.type])==null?void 0:f.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),Nf="",Qi=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Ji={class:"config-name"},Zi=Qi(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function es(t,o,n,a,r,l){const i=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",Ji,[Zi,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const ts=te(Xi,[["render",es],["__scopeId","data-v-de6a1755"]]),os=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Be),l=e.inject(Re),i=e.inject(ve),d=e.inject(Lt),s=e.ref(),c=e.computed(()=>{var E;return(E=e.unref(l))==null?void 0:E.filter(u=>u.keyName!=="")});let p=[];const f=E=>{const{sortCpnts:u=[]}=E;p=ne.cloneDeep(u),s.value=ne.cloneDeep(u),n.value=!0},m=()=>{n.value=!1},h=()=>{var g;const{controlList:E=[]}=e.unref(a),u=p.filter(x=>!e.unref(s).includes(x)).filter(x=>!E.find(O=>O.id===x)),B=e.unref(s).filter(x=>!p.includes(x)).filter(x=>!E.find(O=>O.id===x)),_=u.map(x=>({componentId:x,delete:!0})).concat(B.map(x=>({componentId:x,add:!0})));for(const x of _){const O=e.unref(l).find(S=>S.id===x.componentId);if(O){const{type:S,id:V,events:F=[]}=O,$=$t(S);if(x.add)F.find(P=>{var y;return P.on===$&&P.target===((y=e.unref(i))==null?void 0:y.id)&&P.emit==="refreshData"})||d({id:V,events:[...F,{on:$,target:(g=e.unref(i))==null?void 0:g.id,emit:"refreshData"}].reverse()});else if(x.delete){const P=F.findIndex(y=>{var C;return y.on===$&&y.target===((C=e.unref(i))==null?void 0:C.id)&&y.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:V,events:F}))}}}},w=()=>{var u;h();const E=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];E[t.index].sortCpnts=s.value,r({[t.type]:E}),m()},b=()=>{m()},N=(E,u)=>{var B;return(B=u==null?void 0:u.keyName)==null?void 0:B.toLowerCase().includes(E==null?void 0:E.toLowerCase())};return o({showModal:f}),{visible:n,onOk:w,onCancel:b,idFilterOption:N,fieldName:s,usedComponentList:c}}}),Tf="",ns=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),as={class:"sort-by-cpnt"},rs=ns(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function ls(t,o,n,a,r,l){const i=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",as,[rs,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),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 is=te(os,[["render",ls],["__scopeId","data-v-2943f455"]]),Eo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:Eo(t,r.children)&&(n=Eo(t,r.children)))}return n},ss=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,DoubleRightOutlined:al},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Le),a=e.unref(e.inject(Ee)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const x=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(x==null?void 0:x.filter(O=>O.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:x=>{o("update:value",x),o("change",x)}}),f=e.ref(""),m=x=>{const O=document.getElementById("calTextArea");let S=p.value;if(document.selection){const V=document.selection.createRange();V.text=x}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const V=O.selectionStart,F=O.selectionEnd;let $=V;S=S.substring(0,V)+x+S.substring(F,S.length),$+=x.length,O.selectionStart=O.selectionEnd=$}else S+=x;p.value=S},h=["+","-","*","/","(",")"],w=(x,O)=>{let S="";switch(O){case"name":{S="${"+x+"}";break}case"function":{S=x+"()";break}default:S=x}m(S)},b=[],N=e.ref([]),E=e.ref(!0),u=e.ref([]),B=x=>{var O;for(const S of x)(O=S==null?void 0:S.children)!=null&&O.length?B(S.children):b.push({key:S.key,title:S.title})},_=async()=>{try{const x=await n.get(`${ke}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:S=[]}=x.data;O&&(S!=null&&S.length)&&(B(S),u.value=S)}catch(x){console.error(x)}},g=x=>{N.value=x,E.value=!1};return e.watch(f,x=>{const O=b.map(S=>S.title.indexOf(x)>-1?Eo(S.key,u.value):null).filter((S,V,F)=>S&&F.indexOf(S)===V);N.value=O,f.value=x,E.value=!0}),e.onMounted(()=>{_()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:u,searchFuncValue:f,expandedKeys:N,autoExpandParent:E,selectedElem:w,onExpand:g}}}),Lf="",Ef="",cs={class:"formula-calculation"},ds={class:"field-area"},ps=["onClick"],fs={class:"cal_right_bottom"},us={class:"cal_fu"},ms=["onClick"],hs={class:"function-wrap"},ys={class:"wrap-search"},gs={class:"tree-box"},bs={key:0},Cs={style:{color:"#f50"}},ws={key:1},xs=["onClick"],ks={class:"cal_a"};function _s(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),f=e.resolveComponent("a-popover"),m=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",cs,[e.createVNode(m,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:b=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,ps))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",fs,[e.createElementVNode("ul",us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:b=>t.selectedElem(h,"symbol"),key:w},e.toDisplayString(h),9,ms))),128))]),e.createVNode(f,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",hs,[e.createElementVNode("div",ys,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",gs,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:w})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",bs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Cs,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",ws,e.toDisplayString(h),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:b=>t.selectedElem(h,"function")},"插入",8,xs)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",ks,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Ss=te(ss,[["render",_s],["__scopeId","data-v-1e6dd439"]]),As=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Ss,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const $=["leftAxisList","rightAxisList","queryColumnList","indicators"];let P=[];for(const y of $)Object.prototype.hasOwnProperty.call(e.unref(a),y)&&(P=P.concat(e.unref(a)[y]));return P}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},f=e.ref(),m=e.ref(!1),h=e.ref();e.watch(m,$=>{if($)if(t.mode==="edit"){const{label:P,calcType:y,formula:C,builtInValueSource:A,builtInFormula:I,builtInCalcWay:D}=t.item;h.value={label:P,calcType:y,formula:C,builtInValueSource:A,builtInFormula:I,builtInCalcWay:D}}else t.mode==="add"&&(h.value=ne.cloneDeep(p));else h.value=ne.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!$)},{immediate:!0,deep:!0});let w=!1;const b=()=>{w=!0},N=$=>{const P=e.unref(l).find(y=>y.id===$);P&&(h.value.builtInCalcWay=P.keyName),w=!0},E=()=>{var y;const $=((y=e.unref(a)[t.type])==null?void 0:y.slice())||[],{label:P}=e.unref(h)||{};if(t.mode==="add"){const C=Lo();$.push({...e.unref(h),id:C,show:!0,name:P})}else t.mode==="edit"&&($[t.index]={...$[t.index],...e.unref(h),name:P});r({[t.type]:$})},u=()=>{m.value=!0},B=()=>{m.value=!1},_=async($,P)=>{if(P==="")return Promise.reject(new Error("请输入指标名"));{const y=e.unref(d).find(C=>C.label===P);return y?y.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},g=e.computed(()=>{let $={label:[{required:!0,validator:_,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&($={...$,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),$}),x=()=>{f.value.validate().then(()=>{w&&E(),w=!1,B()})},O=()=>{f.value.clearValidate(),B()},S=()=>{w=!0,e.unref(h).builtInCalcWay=""},V=e.computed(()=>{let $="";const P=e.unref(h).builtInCalcWay,y=e.unref(h).builtInValueSource;if(!y||!P)return $;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{P==="ASC"?$="【"+y+"】由小到大在所有值中的排名":$="【"+y+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{$=`所有【】的
|
|
60
|
-
`,
|
|
61
|
-
`,P){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}$=$+"将所有【"+y+"】"+C;break}}return $}),F=($,P)=>P.keyName.toLowerCase().indexOf($.toLowerCase())>=0;return o({showModal:u}),{visible:m,onCancel:O,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:x,onChange:b,formRules:g,accessLogic:V,formRef:f,onChangeBuiltInFormula:S,componentList:l,onChangeComponent:N,filterOption:F}}}),Bf="",Ns={key:0,class:"accesstip"};function Ts(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),f=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(m,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=w=>t.formState.label=w),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=w=>t.formState.calcType=w),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=w=>t.formState.formula=w),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=w=>t.formState.builtInFormula=w),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=w=>t.formState.builtInValueSource=w),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(w,b)=>(e.openBlock(),e.createBlock(s,{key:b,value:w.label,disabled:t.item.label===w.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=w=>t.formState.builtInCalcWay=w),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Ns," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(f,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=w=>t.formState.builtInValueSource=w),"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)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const Ls=te(As,[["render",Ts],["__scopeId","data-v-934b2c09"]]),Es=e.defineComponent({name:"DataConfigCard",directives:{focus:Fn},components:{CalculationModal:Ls,FilterModal:Ki,CustomGroupModal:ri,SettingOutlined:Ll,DeleteOutlined:el,CopyOutlined:Xr,InfoCircleOutlined:fl,CustomSortModal:Wl,PlusOutlined:Sl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:ft,ConfigName:ts,SortByCpnt:is},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(pe),a=e.inject(Be),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(Zt),d=(G={})=>{var Y;const{type:z}=t;if(e.unref(i)==="SQL_VIEW")return!0;let q=!1;if(G.scope==="IDX"?r.includes(z)&&(q=!0):["DIM","BUILT_IN_DIM"].includes(G.scope)&&l.includes(z)&&(q=!0),z==="dimensionList"){const le=((Y=e.unref(n)[z])==null?void 0:Y.slice())||[];(le==null?void 0:le.length)===1&&(q=!1)}return q},s=(G="{}")=>{var z;try{const q=JSON.parse(G);if(!d(q))return;const Y=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];["classificationList","seriesList"].includes(t.type)&&Y.forEach(le=>{le.show=!1}),p(Y,q),Y.push(q),a({[t.type]:Y}),sessionStorage.setItem("indicator-list-item","")}catch(q){console.error(q)}},c=(G="{}")=>{var z;try{const{cardItem:q,type:Y,index:le}=JSON.parse(G);if(!d(q)||Y===t.type)return;const re=((z=e.unref(n)[t.type])==null?void 0:z.slice())||[];p(re,q),re.push(q);const oe=e.unref(n)[Y].slice()||[];oe.splice(le,1),a({[t.type]:re,[Y]:oe})}catch(q){console.error(q)}};function p(G,z){const q=[];if(G.forEach(Y=>{Y.label.includes(z.label)&&q.push(Y.label.split(z.label)[1])}),q.length>=1){for(let Y=1;Y<=q.length;Y++)if(!q.includes(Y+"")){z.label=z.label+Y;break}}}const f=(G,z)=>{var le,re;const q=(le=G.target)==null?void 0:le.checked,Y=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];["classificationList","seriesList"].includes(t.type)&&Y.forEach(oe=>{oe.show=!1}),Y[z].show=q,a({[t.type]:Y})},m=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},h=()=>{sessionStorage.setItem("indicator-card-item","")},w=()=>{const G=sessionStorage.getItem("indicator-list-item"),z=sessionStorage.getItem("indicator-card-item");G?s(G):z&&c(z)},b=G=>{var xe,Ze;const{newIndex:z,oldIndex:q,from:Y,to:le}=G,re=Y.id,oe=le.id;if(z>=0&&q>=0){if(re===oe){const ae=((xe=e.unref(n)[t.type])==null?void 0:xe.slice())||[],de=ae.splice(q,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}else if(t.type===oe){const ae=((Ze=e.unref(n)[oe])==null?void 0:Ze.slice())||[];if(ae!=null&&ae.length){const de=ae.splice(ae.length-1,1)[0];de&&(ae.splice(z,0,de),a({[t.type]:ae}))}}}},N=(G,z)=>{const q=G.oldIndex,Y=z[q];Y&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:Y,type:t.type,index:q}))},E=e.computed(()=>e.unref(n)[t.type]||[]),u=e.ref([]);let B=!1;e.watch(()=>e.unref(E).length,G=>{u.value=new Array(G).fill(!1)},{flush:"post",immediate:!0});const _=G=>{var q;const z=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];z.splice(G,1),a({[t.type]:z})},g=G=>{u.value[G]=!0},x=()=>{B=!0},O=(G,z,q)=>{var Y,le;if(u.value[z]=!1,B){const re=(Y=G.target)==null?void 0:Y.value,oe=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],xe=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.formula)==null?void 0:de.includes(q)}).map(ae=>ae.id),Ze=oe.filter(ae=>{var de;return(de=ae==null?void 0:ae.builtInValueSource)==null?void 0:de.includes(q)}).map(ae=>ae.id);if(xe!=null&&xe.length)for(const ae of xe){const de=oe.find(Ho=>Ho.id===ae);de.formula=de.formula.replaceAll(q,re)}if(Ze!=null&&Ze.length)for(const ae of Ze){const de=oe.find(Ho=>Ho.id===ae);de.builtInValueSource=de.builtInValueSource.replaceAll(q,re)}oe[z].label=re,a({[t.type]:oe})}B=!1},S="DEFAULT",V=e.computed(()=>{const G=e.unref(n)[t.type]||[],{leftAxisList:z=[],rightAxisList:q=[],indicators:Y=[]}=e.unref(n)||{};return[{id:S,label:"默认",name:"默认"},...G,...z,...q,...Y]}),F=(G={},z,q="ASC")=>{var xe;const{label:Y,name:le,id:re}=G,oe=((xe=e.unref(n)[t.type])==null?void 0:xe.slice())||[];re===S?delete oe[z].sort:oe[z].sort={label:Y,columnName:le,type:"NORMAL",order:q},a({[t.type]:oe})},$=(G={},z="ASC")=>{const Y={ASC:"升序",DESC:"降序"}[z],{sort:le}=G,{label:re,order:oe}=le||{};return re&&oe===z?`${Y}(${re})`:Y},P=e.ref(),y=e.ref(),C=e.ref(),A=e.ref(),I=(G={},z)=>{var q;P.value=G,y.value=z,(q=e.unref(C))==null||q.showModal()},D=G=>{var z;return"自定义排序"+(((z=G==null?void 0:G.sort)==null?void 0:z.type)==="CUSTOM"?"(已配置)":"")},U=(G={},z)=>{var q;P.value=G,y.value=z,(q=e.unref(A))==null||q.showModal()},k=G=>"自定义分组"+((G==null?void 0:G.customGroup)!=null?"(已配置)":""),T=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],L=(G,z)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[z].aggregate=G,a({[t.type]:q})},M=(G,z)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[z].dateFormat=G,a({[t.type]:q})},j=(G="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[G]})`,W=(G={})=>{var z;return"过滤"+(G!=null&&G.conditions&&((z=G==null?void 0:G.conditions)==null?void 0:z.length)>0?"(已配置)":"")},K=e.ref(),J=e.ref(),ee=e.ref(),ie=(G={},z)=>{P.value=G,y.value=z,e.unref(K).showModal()},fe=(G={},z)=>{P.value=G,y.value=z,e.unref(J).showModal(G)},ue=(G={},z)=>{P.value=G,y.value=z,e.unref(ee).showModal(G)},Ie=e.ref(),Ye=e.ref("add"),Ke=(G,z,q)=>{var Y;Ye.value=G,G==="edit"&&(P.value=z,y.value=q),(Y=e.unref(Ie))==null||Y.showModal()},Xe=e.inject(Le),Qe=e.unref(e.inject(Ee)),ze=e.ref([]),Je=e.computed(()=>e.unref(n)[t.type]||{}),dt=async()=>{try{const G=await Xe.post(`${ke}/diagram/dimFields`,{},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:z,data:q=[]}=G.data;z&&(ze.value=q)}catch(G){console.error(G)}},pt=(G,z)=>{const q=e.unref(n)[t.type]||{};q[z]=G,a({[t.type]:q})},R=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],H=e.ref({}),X=async(G,z)=>{var Y;const{name:q}=z;if(!R.includes(t.type)&&G&&To(z,"indexCode")){const le=await Xe.post(`${ke}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:z.id,indexCode:z.indexCode,pageId:(Y=window==null?void 0:window.config)==null?void 0:Y.pageId},{headers:{Authentication:Qe,operateContext:"ygt"}}),{success:re,data:oe}=le.data;re&&oe&&(H.value[q]={name:oe.name,code:oe.indexCode})}},Q=G=>{const z=document.createElement("input");document.body.appendChild(z),z.setAttribute("value",G),z.select(),document.execCommand("copy"),document.body.removeChild(z),v.message.success("复制成功")},Z=e.inject(ve),ce=e.computed(()=>t.type==="indicators"&&e.unref(Z).type==="ecanTable"),me=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&dt()}),{onCheckboxChange:f,onDropEnd:m,onDragItemEnd:h,onDragItemAdd:w,onDragItemSort:b,onDragItemStart:N,cardItemList:E,onDelete:_,onEdit:g,onCommitLabelChange:O,sortList:V,onSort:F,handleSortTitle:$,showCustomSortModal:I,customSortModalRef:C,currentItem:P,currentIndex:y,handleCustomSortTitle:D,handleCustomGroupTitle:k,customGroupModalRef:A,showCustomGroupModal:U,editLabelList:u,onLabelChange:x,aggregateList:T,onAggregateChange:L,onDateFormatChange:M,handleAggregateTitle:j,onShowCalculationModal:Ke,handleFilterTitle:W,filterModalRef:K,configNameRef:J,sortByCpntRef:ee,showFilterModal:ie,calculationModalRef:Ie,calculationModalMode:Ye,formatList:o,fieldOptions:ze,fieldData:Je,onFieldChange:pt,onVisibleChange:X,copyDataViewName:Q,dataViewMap:H,isShowConfigName:ce,showConfigNameModal:fe,dimensionType:R,isShowSortByCpnt:me,showSortByCpntModal:ue}}}),Of="",Vf="",ot=t=>(e.pushScopeId("data-v-d8ce3fb3"),t=t(),e.popScopeId(),t),Bs={class:"title"},Os={class:"title-text"},Vs={class:"field-wrap"},Is={class:"field-item"},$s=ot(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Fs={class:"field-item"},Ds=ot(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),vs={class:"title"},Ps={class:"title-text"},Ms=ot(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),js=ot(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Rs={class:"card-item-wrap"},Us={class:"card-item-inner"},Gs=["onClick"],zs=["onClick"],Hs=["onClick"],Ws={style:{display:"flex","align-items":"center"}},qs=["title"],Ys=ot(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Ks={style:{display:"flex","align-items":"center"}},Xs=["title"],Qs=ot(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Js(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),f=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),w=e.resolveComponent("a-sub-menu"),b=e.resolveComponent("a-menu-divider"),N=e.resolveComponent("copy-outlined"),E=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),B=e.resolveComponent("delete-outlined"),_=e.resolveComponent("a-checkbox"),g=e.resolveComponent("draggable"),x=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),S=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),F=e.resolveComponent("sort-by-cpnt"),$=e.resolveComponent("calculation-modal"),P=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Bs,[e.createElementVNode("div",Os,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Vs,[e.createElementVNode("div",Is,[$s,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=y=>t.onFieldChange(y,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Fs,[Ds,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=y=>t.onFieldChange(y,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",vs,[e.createElementVNode("div",Ps,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Ms]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(y=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),js]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(g,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=y=>t.cardItemList=y),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=y=>t.onDragItemStart(y,t.cardItemList))},{item:e.withCtx(({element:y,index:C})=>[e.createElementVNode("div",Rs,[e.createVNode(_,{class:"card-item",checked:y.show,onChange:A=>t.onCheckboxChange(A,C)},{default:e.withCtx(()=>[e.createElementVNode("div",Us,[!t.editLabelList[C]&&y.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(A=>t.onEdit(C),["prevent","stop"])},e.toDisplayString(y.label),9,Gs)):e.createCommentVNode("",!0),!t.editLabelList[C]&&!y.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(A=>t.onEdit(C),["prevent","stop"])}," 请点击填入名字 ",8,zs)):e.createCommentVNode("",!0),t.editLabelList[C]?e.withDirectives((e.openBlock(),e.createBlock(f,{key:2,"default-value":y.label,size:"small",onBlur:A=>t.onCommitLabelChange(A,C,y.label),onPressEnter:A=>t.onCommitLabelChange(A,C,y.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(y.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(A=>t.onShowCalculationModal("edit",y,C),["prevent","stop"])}," fx ",8,Hs)):e.createCommentVNode("",!0),e.createVNode(u,{trigger:["click"],onVisibleChange:A=>t.onVisibleChange(A,y)},{overlay:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:t.handleSortTitle(y,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.id,onClick:I=>t.onSort(A,C,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w,{title:t.handleSortTitle(y,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:A.id,onClick:I=>t.onSort(A,C,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:A=>t.showCustomSortModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),e.createVNode(h,{onClick:A=>t.showCustomGroupModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),y.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:I=>t.onDateFormatChange(A.value,C)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(y.dateFormat===A.value||!y.dateFormat&&A.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(b)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:A=>t.showFilterModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(b),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(y.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:I=>t.onAggregateChange(A.value,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(b)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:A=>t.showConfigNameModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(b)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:A=>t.showSortByCpntModal(y,C)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(b)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].name},[Ys,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].name),1)],8,qs),e.createVNode(N,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Ks,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].code},[Qs,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].code),1)],8,Xs),e.createVNode(N,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(B,{class:"delete-icon",onClick:e.withModifiers(A=>t.onDelete(C),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(x,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(S,{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(F,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode($,{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 Zs=te(Es,[["render",Js],["__scopeId","data-v-d8ce3fb3"]]),ec={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},tc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Zs},setup(){const t=e.inject(ve),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Be),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var N,E;const s=ne.cloneDeep((N=e.unref(t))==null?void 0:N.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},f="ecan";let m=e.unref(o);if(m.startsWith(f)){const u=f.length;m=((E=m.slice(u,u+1))==null?void 0:E.toLowerCase())+m.slice(u+1)}const h=p[m],w=ec,b=(h==null?void 0:h.length)||0;for(let u=0;u<b;u++){const B=h[u];if(!B)break;r.push({...w[B],type:B})}for(const u of c)i(s,u)&&!h.find(B=>B===u)&&(s[u]=[]);l(s)})(),{cardsMap:a,cards:r}}}),If="",$f="",oc={class:"data-group"};function nc(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const ac=te(tc,[["render",nc],["__scopeId","data-v-51c4bf1a"]]),rc=[{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"]}],lc={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"}},ic=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function sc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const cc=te(ic,[["render",sc]]),dc=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:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const f=t.value;return typeof f=="string"?parseFloat(f):typeof f=="object"&&f!=null?f[t.valueKey]:f}),a=f=>t.value!=null&&typeof t.value=="object"?t.value[t[`${f}ValueKey`]]:Array.isArray(t[f])?t[f][0]&&t[f][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:f=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:f,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):m===""||f==null?o("change",f):o("change",`${f}${m}`)},parser:f=>typeof t.suffix=="string"?f.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?f.replace(t.value[t.suffixValueKey],""):f,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function pc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,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},f)=>(e.openBlock(),e.createBlock(i,{key:f,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 Mn=te(dc,[["render",pc]]),fc=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:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function uc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const mc=te(fc,[["render",uc]]),hc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function yc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const gc=te(hc,[["render",yc]]),bc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function Cc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const wc=te(bc,[["render",Cc]]);var ye="top",Se="bottom",Ae="right",ge="left",Bo="auto",yt=[ye,Se,Ae,ge],nt="start",gt="end",xc="clippingParents",jn="viewport",bt="popper",kc="reference",Rn=yt.reduce(function(t,o){return t.concat([o+"-"+nt,o+"-"+gt])},[]),Un=[].concat(yt,[Bo]).reduce(function(t,o){return t.concat([o,o+"-"+nt,o+"-"+gt])},[]),_c="beforeRead",Sc="read",Ac="afterRead",Nc="beforeMain",Tc="main",Lc="afterMain",Ec="beforeWrite",Bc="write",Oc="afterWrite",Vc=[_c,Sc,Ac,Nc,Tc,Lc,Ec,Bc,Oc];function $e(t){return t?(t.nodeName||"").toLowerCase():null}function we(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function He(t){var o=we(t).Element;return t instanceof o||t instanceof Element}function Ne(t){var o=we(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Oo(t){if(typeof ShadowRoot>"u")return!1;var o=we(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ic(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Ne(l)||!$e(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function $c(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Ne(r)||!$e(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const Fc={name:"applyStyles",enabled:!0,phase:"write",fn:Ic,effect:$c,requires:["computeStyles"]};function Fe(t){return t.split("-")[0]}var We=Math.max,Ft=Math.min,at=Math.round;function Vo(){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 Gn(){return!/^((?!chrome|android).)*safari/i.test(Vo())}function rt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Ne(t)&&(r=t.offsetWidth>0&&at(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&at(a.height)/t.offsetHeight||1);var i=He(t)?we(t):window,d=i.visualViewport,s=!Gn()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,f=a.width/r,m=a.height/l;return{width:f,height:m,top:p,right:c+f,bottom:p+m,left:c,x:c,y:p}}function Io(t){var o=rt(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 zn(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Oo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Me(t){return we(t).getComputedStyle(t)}function Dc(t){return["table","td","th"].indexOf($e(t))>=0}function Ge(t){return((He(t)?t.ownerDocument:t.document)||window.document).documentElement}function Dt(t){return $e(t)==="html"?t:t.assignedSlot||t.parentNode||(Oo(t)?t.host:null)||Ge(t)}function Hn(t){return!Ne(t)||Me(t).position==="fixed"?null:t.offsetParent}function vc(t){var o=/firefox/i.test(Vo()),n=/Trident/i.test(Vo());if(n&&Ne(t)){var a=Me(t);if(a.position==="fixed")return null}var r=Dt(t);for(Oo(r)&&(r=r.host);Ne(r)&&["html","body"].indexOf($e(r))<0;){var l=Me(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Ct(t){for(var o=we(t),n=Hn(t);n&&Dc(n)&&Me(n).position==="static";)n=Hn(n);return n&&($e(n)==="html"||$e(n)==="body"&&Me(n).position==="static")?o:n||vc(t)||o}function $o(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wt(t,o,n){return We(t,Ft(o,n))}function Pc(t,o,n){var a=wt(t,o,n);return a>n?n:a}function Wn(){return{top:0,right:0,bottom:0,left:0}}function qn(t){return Object.assign({},Wn(),t)}function Yn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Mc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,qn(typeof o!="number"?o:Yn(o,yt))};function jc(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=Fe(n.placement),s=$o(d),c=[ge,Ae].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var f=Mc(r.padding,n),m=Io(l),h=s==="y"?ye:ge,w=s==="y"?Se:Ae,b=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],N=i[s]-n.rects.reference[s],E=Ct(l),u=E?s==="y"?E.clientHeight||0:E.clientWidth||0:0,B=b/2-N/2,_=f[h],g=u-m[p]-f[w],x=u/2-m[p]/2+B,O=wt(_,x,g),S=s;n.modifiersData[a]=(o={},o[S]=O,o.centerOffset=O-x,o)}}function Rc(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)||zn(o.elements.popper,r)&&(o.elements.arrow=r))}const Uc={name:"arrow",enabled:!0,phase:"main",fn:jc,effect:Rc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lt(t){return t.split("-")[1]}var Gc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:at(n*r)/r||0,y:at(a*r)/r||0}}function Kn(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,f=t.isFixed,m=i.x,h=m===void 0?0:m,w=i.y,b=w===void 0?0:w,N=typeof p=="function"?p({x:h,y:b}):{x:h,y:b};h=N.x,b=N.y;var E=i.hasOwnProperty("x"),u=i.hasOwnProperty("y"),B=ge,_=ye,g=window;if(c){var x=Ct(n),O="clientHeight",S="clientWidth";if(x===we(n)&&(x=Ge(n),Me(x).position!=="static"&&d==="absolute"&&(O="scrollHeight",S="scrollWidth")),x=x,r===ye||(r===ge||r===Ae)&&l===gt){_=Se;var V=f&&x===g&&g.visualViewport?g.visualViewport.height:x[O];b-=V-a.height,b*=s?1:-1}if(r===ge||(r===ye||r===Se)&&l===gt){B=Ae;var F=f&&x===g&&g.visualViewport?g.visualViewport.width:x[S];h-=F-a.width,h*=s?1:-1}}var $=Object.assign({position:d},c&&Gc),P=p===!0?zc({x:h,y:b},we(n)):{x:h,y:b};if(h=P.x,b=P.y,s){var y;return Object.assign({},$,(y={},y[_]=u?"0":"",y[B]=E?"0":"",y.transform=(g.devicePixelRatio||1)<=1?"translate("+h+"px, "+b+"px)":"translate3d("+h+"px, "+b+"px, 0)",y))}return Object.assign({},$,(o={},o[_]=u?b+"px":"",o[B]=E?h+"px":"",o.transform="",o))}function Hc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:Fe(o.placement),variation:lt(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,Kn(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Kn(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Wc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hc,data:{}};var vt={passive:!0};function qc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=we(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,vt)}),d&&s.addEventListener("resize",n.update,vt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,vt)}),d&&s.removeEventListener("resize",n.update,vt)}}const Yc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qc,data:{}};var Kc={left:"right",right:"left",bottom:"top",top:"bottom"};function Pt(t){return t.replace(/left|right|bottom|top/g,function(o){return Kc[o]})}var Xc={start:"end",end:"start"};function Xn(t){return t.replace(/start|end/g,function(o){return Xc[o]})}function Fo(t){var o=we(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Do(t){return rt(Ge(t)).left+Fo(t).scrollLeft}function Qc(t,o){var n=we(t),a=Ge(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Gn();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Do(t),y:s}}function Jc(t){var o,n=Ge(t),a=Fo(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=We(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=We(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Do(t),s=-a.scrollTop;return Me(r||n).direction==="rtl"&&(d+=We(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function vo(t){var o=Me(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Qn(t){return["html","body","#document"].indexOf($e(t))>=0?t.ownerDocument.body:Ne(t)&&vo(t)?t:Qn(Dt(t))}function xt(t,o){var n;o===void 0&&(o=[]);var a=Qn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=we(a),i=r?[l].concat(l.visualViewport||[],vo(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(xt(Dt(i)))}function Po(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Zc(t,o){var n=rt(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 Jn(t,o,n){return o===jn?Po(Qc(t,n)):He(o)?Zc(o,n):Po(Jc(Ge(t)))}function ed(t){var o=xt(Dt(t)),n=["absolute","fixed"].indexOf(Me(t).position)>=0,a=n&&Ne(t)?Ct(t):t;return He(a)?o.filter(function(r){return He(r)&&zn(r,a)&&$e(r)!=="body"}):[]}function td(t,o,n,a){var r=o==="clippingParents"?ed(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=Jn(t,c,a);return s.top=We(p.top,s.top),s.right=Ft(p.right,s.right),s.bottom=Ft(p.bottom,s.bottom),s.left=We(p.left,s.left),s},Jn(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Zn(t){var o=t.reference,n=t.element,a=t.placement,r=a?Fe(a):null,l=a?lt(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case ye:s={x:i,y:o.y-n.height};break;case Se:s={x:i,y:o.y+o.height};break;case Ae:s={x:o.x+o.width,y:d};break;case ge:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?$o(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case nt:s[c]=s[c]-(o[p]/2-n[p]/2);break;case gt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function kt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?xc:d,c=n.rootBoundary,p=c===void 0?jn:c,f=n.elementContext,m=f===void 0?bt:f,h=n.altBoundary,w=h===void 0?!1:h,b=n.padding,N=b===void 0?0:b,E=qn(typeof N!="number"?N:Yn(N,yt)),u=m===bt?kc:bt,B=t.rects.popper,_=t.elements[w?u:m],g=td(He(_)?_:_.contextElement||Ge(t.elements.popper),s,p,i),x=rt(t.elements.reference),O=Zn({reference:x,element:B,strategy:"absolute",placement:r}),S=Po(Object.assign({},B,O)),V=m===bt?S:x,F={top:g.top-V.top+E.top,bottom:V.bottom-g.bottom+E.bottom,left:g.left-V.left+E.left,right:V.right-g.right+E.right},$=t.modifiersData.offset;if(m===bt&&$){var P=$[r];Object.keys(F).forEach(function(y){var C=[Ae,Se].indexOf(y)>=0?1:-1,A=[ye,Se].indexOf(y)>=0?"y":"x";F[y]+=P[A]*C})}return F}function od(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?Un:s,p=lt(a),f=p?d?Rn:Rn.filter(function(w){return lt(w)===p}):yt,m=f.filter(function(w){return c.indexOf(w)>=0});m.length===0&&(m=f);var h=m.reduce(function(w,b){return w[b]=kt(t,{placement:b,boundary:r,rootBoundary:l,padding:i})[Fe(b)],w},{});return Object.keys(h).sort(function(w,b){return h[w]-h[b]})}function nd(t){if(Fe(t)===Bo)return[];var o=Pt(t);return[Xn(t),o,Xn(o)]}function ad(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,f=n.rootBoundary,m=n.altBoundary,h=n.flipVariations,w=h===void 0?!0:h,b=n.allowedAutoPlacements,N=o.options.placement,E=Fe(N),u=E===N,B=s||(u||!w?[Pt(N)]:nd(N)),_=[N].concat(B).reduce(function(W,K){return W.concat(Fe(K)===Bo?od(o,{placement:K,boundary:p,rootBoundary:f,padding:c,flipVariations:w,allowedAutoPlacements:b}):K)},[]),g=o.rects.reference,x=o.rects.popper,O=new Map,S=!0,V=_[0],F=0;F<_.length;F++){var $=_[F],P=Fe($),y=lt($)===nt,C=[ye,Se].indexOf(P)>=0,A=C?"width":"height",I=kt(o,{placement:$,boundary:p,rootBoundary:f,altBoundary:m,padding:c}),D=C?y?Ae:ge:y?Se:ye;g[A]>x[A]&&(D=Pt(D));var U=Pt(D),k=[];if(l&&k.push(I[P]<=0),d&&k.push(I[D]<=0,I[U]<=0),k.every(function(W){return W})){V=$,S=!1;break}O.set($,k)}if(S)for(var T=w?3:1,L=function(K){var J=_.find(function(ee){var ie=O.get(ee);if(ie)return ie.slice(0,K).every(function(fe){return fe})});if(J)return V=J,"break"},M=T;M>0;M--){var j=L(M);if(j==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const rd={name:"flip",enabled:!0,phase:"main",fn:ad,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 ta(t){return[ye,Ae,Se,ge].some(function(o){return t[o]>=0})}function ld(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=kt(o,{elementContext:"reference"}),d=kt(o,{altBoundary:!0}),s=ea(i,a),c=ea(d,r,l),p=ta(s),f=ta(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:f},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const id={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ld};function sd(t,o,n){var a=Fe(t),r=[ge,ye].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[ge,Ae].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function cd(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=Un.reduce(function(p,f){return p[f]=sd(f,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const dd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cd};function pd(t){var o=t.state,n=t.name;o.modifiersData[n]=Zn({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const fd={name:"popperOffsets",enabled:!0,phase:"read",fn:pd,data:{}};function ud(t){return t==="x"?"y":"x"}function md(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,f=n.padding,m=n.tether,h=m===void 0?!0:m,w=n.tetherOffset,b=w===void 0?0:w,N=kt(o,{boundary:s,rootBoundary:c,padding:f,altBoundary:p}),E=Fe(o.placement),u=lt(o.placement),B=!u,_=$o(E),g=ud(_),x=o.modifiersData.popperOffsets,O=o.rects.reference,S=o.rects.popper,V=typeof b=="function"?b(Object.assign({},o.rects,{placement:o.placement})):b,F=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),$=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,P={x:0,y:0};if(x){if(l){var y,C=_==="y"?ye:ge,A=_==="y"?Se:Ae,I=_==="y"?"height":"width",D=x[_],U=D+N[C],k=D-N[A],T=h?-S[I]/2:0,L=u===nt?O[I]:S[I],M=u===nt?-S[I]:-O[I],j=o.elements.arrow,W=h&&j?Io(j):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:Wn(),J=K[C],ee=K[A],ie=wt(0,O[I],W[I]),fe=B?O[I]/2-T-ie-J-F.mainAxis:L-ie-J-F.mainAxis,ue=B?-O[I]/2+T+ie+ee+F.mainAxis:M+ie+ee+F.mainAxis,Ie=o.elements.arrow&&Ct(o.elements.arrow),Ye=Ie?_==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,Ke=(y=$==null?void 0:$[_])!=null?y:0,Xe=D+fe-Ke-Ye,Qe=D+ue-Ke,ze=wt(h?Ft(U,Xe):U,D,h?We(k,Qe):k);x[_]=ze,P[_]=ze-D}if(d){var Je,dt=_==="x"?ye:ge,pt=_==="x"?Se:Ae,R=x[g],H=g==="y"?"height":"width",X=R+N[dt],Q=R-N[pt],Z=[ye,ge].indexOf(E)!==-1,ce=(Je=$==null?void 0:$[g])!=null?Je:0,me=Z?X:R-O[H]-S[H]-ce+F.altAxis,G=Z?R+O[H]+S[H]-ce-F.altAxis:Q,z=h&&Z?Pc(me,R,G):wt(h?me:X,R,h?G:Q);x[g]=z,P[g]=z-R}o.modifiersData[a]=P}}const hd={name:"preventOverflow",enabled:!0,phase:"main",fn:md,requiresIfExists:["offset"]};function yd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function gd(t){return t===we(t)||!Ne(t)?Fo(t):yd(t)}function bd(t){var o=t.getBoundingClientRect(),n=at(o.width)/t.offsetWidth||1,a=at(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Cd(t,o,n){n===void 0&&(n=!1);var a=Ne(o),r=Ne(o)&&bd(o),l=Ge(o),i=rt(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&(($e(o)!=="body"||vo(l))&&(d=gd(o)),Ne(o)?(s=rt(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=Do(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function wd(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function xd(t){var o=wd(t);return Vc.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function kd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function _d(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 oa={placement:"bottom",modifiers:[],strategy:"absolute"};function na(){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 Sd(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?oa:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},oa,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},f=[],m=!1,h={state:p,setOptions:function(E){var u=typeof E=="function"?E(p.options):E;b(),p.options=Object.assign({},l,p.options,u),p.scrollParents={reference:He(d)?xt(d):d.contextElement?xt(d.contextElement):[],popper:xt(s)};var B=xd(_d([].concat(a,p.options.modifiers)));return p.orderedModifiers=B.filter(function(_){return _.enabled}),w(),h.update()},forceUpdate:function(){if(!m){var E=p.elements,u=E.reference,B=E.popper;if(na(u,B)){p.rects={reference:Cd(u,Ct(B),p.options.strategy==="fixed"),popper:Io(B)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(F){return p.modifiersData[F.name]=Object.assign({},F.data)});for(var _=0;_<p.orderedModifiers.length;_++){if(p.reset===!0){p.reset=!1,_=-1;continue}var g=p.orderedModifiers[_],x=g.fn,O=g.options,S=O===void 0?{}:O,V=g.name;typeof x=="function"&&(p=x({state:p,options:S,name:V,instance:h})||p)}}}},update:kd(function(){return new Promise(function(N){h.forceUpdate(),N(p)})}),destroy:function(){b(),m=!0}};if(!na(d,s))return h;h.setOptions(c).then(function(N){!m&&c.onFirstUpdate&&c.onFirstUpdate(N)});function w(){p.orderedModifiers.forEach(function(N){var E=N.name,u=N.options,B=u===void 0?{}:u,_=N.effect;if(typeof _=="function"){var g=_({state:p,name:E,instance:h,options:B}),x=function(){};f.push(g||x)}})}function b(){f.forEach(function(N){return N()}),f=[]}return h}}var Ad=[Yc,fd,Wc,Fc,dd,rd,hd,Uc,id],Nd=Sd({defaultModifiers:Ad});function Mo(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 aa(t,o){if(t){if(typeof t=="string")return Mo(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)?Mo(t,o):void 0}}function Td(t){return function(o){if(Array.isArray(o))return Mo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||aa(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 it(t){return it=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},it(t)}function ra(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function la(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){ra(l,a,r,i,d,"next",s)}function d(s){ra(l,a,r,i,d,"throw",s)}i(void 0)})}}var ia={exports:{}},sa={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})(sa),function(t){var o=sa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(k,T,L){k[T]=L.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function m(k,T,L){return Object.defineProperty(k,T,{value:L,enumerable:!0,configurable:!0,writable:!0}),k[T]}try{m({},"")}catch{m=function(T,L,M){return T[L]=M}}function h(k,T,L,M){var j=T&&T.prototype instanceof _?T:_,W=Object.create(j.prototype),K=new D(M||[]);return d(W,"_invoke",{value:y(k,L,K)}),W}function w(k,T,L){try{return{type:"normal",arg:k.call(T,L)}}catch(M){return{type:"throw",arg:M}}}r.wrap=h;var b="suspendedStart",N="suspendedYield",E="executing",u="completed",B={};function _(){}function g(){}function x(){}var O={};m(O,c,function(){return this});var S=Object.getPrototypeOf,V=S&&S(S(U([])));V&&V!==l&&i.call(V,c)&&(O=V);var F=x.prototype=_.prototype=Object.create(O);function $(k){["next","throw","return"].forEach(function(T){m(k,T,function(L){return this._invoke(T,L)})})}function P(k,T){function L(j,W,K,J){var ee=w(k[j],k,W);if(ee.type!=="throw"){var ie=ee.arg,fe=ie.value;return fe&&o(fe)=="object"&&i.call(fe,"__await")?T.resolve(fe.__await).then(function(ue){L("next",ue,K,J)},function(ue){L("throw",ue,K,J)}):T.resolve(fe).then(function(ue){ie.value=ue,K(ie)},function(ue){return L("throw",ue,K,J)})}J(ee.arg)}var M;d(this,"_invoke",{value:function(j,W){function K(){return new T(function(J,ee){L(j,W,J,ee)})}return M=M?M.then(K,K):K()}})}function y(k,T,L){var M=b;return function(j,W){if(M===E)throw new Error("Generator is already running");if(M===u){if(j==="throw")throw W;return{value:a,done:!0}}for(L.method=j,L.arg=W;;){var K=L.delegate;if(K){var J=C(K,L);if(J){if(J===B)continue;return J}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(M===b)throw M=u,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);M=E;var ee=w(k,T,L);if(ee.type==="normal"){if(M=L.done?u:N,ee.arg===B)continue;return{value:ee.arg,done:L.done}}ee.type==="throw"&&(M=u,L.method="throw",L.arg=ee.arg)}}}function C(k,T){var L=T.method,M=k.iterator[L];if(M===a)return T.delegate=null,L==="throw"&&k.iterator.return&&(T.method="return",T.arg=a,C(k,T),T.method==="throw")||L!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+L+"' method")),B;var j=w(M,k.iterator,T.arg);if(j.type==="throw")return T.method="throw",T.arg=j.arg,T.delegate=null,B;var W=j.arg;return W?W.done?(T[k.resultName]=W.value,T.next=k.nextLoc,T.method!=="return"&&(T.method="next",T.arg=a),T.delegate=null,B):W:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,B)}function A(k){var T={tryLoc:k[0]};1 in k&&(T.catchLoc=k[1]),2 in k&&(T.finallyLoc=k[2],T.afterLoc=k[3]),this.tryEntries.push(T)}function I(k){var T=k.completion||{};T.type="normal",delete T.arg,k.completion=T}function D(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(A,this),this.reset(!0)}function U(k){if(k||k===""){var T=k[c];if(T)return T.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var L=-1,M=function j(){for(;++L<k.length;)if(i.call(k,L))return j.value=k[L],j.done=!1,j;return j.value=a,j.done=!0,j};return M.next=M}}throw new TypeError(o(k)+" is not iterable")}return g.prototype=x,d(F,"constructor",{value:x,configurable:!0}),d(x,"constructor",{value:g,configurable:!0}),g.displayName=m(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(k){var T=typeof k=="function"&&k.constructor;return!!T&&(T===g||(T.displayName||T.name)==="GeneratorFunction")},r.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,x):(k.__proto__=x,m(k,f,"GeneratorFunction")),k.prototype=Object.create(F),k},r.awrap=function(k){return{__await:k}},$(P.prototype),m(P.prototype,p,function(){return this}),r.AsyncIterator=P,r.async=function(k,T,L,M,j){j===void 0&&(j=Promise);var W=new P(h(k,T,L,M),j);return r.isGeneratorFunction(T)?W:W.next().then(function(K){return K.done?K.value:W.next()})},$(F),m(F,f,"Generator"),m(F,c,function(){return this}),m(F,"toString",function(){return"[object Generator]"}),r.keys=function(k){var T=Object(k),L=[];for(var M in T)L.push(M);return L.reverse(),function j(){for(;L.length;){var W=L.pop();if(W in T)return j.value=W,j.done=!1,j}return j.done=!0,j}},r.values=U,D.prototype={constructor:D,reset:function(k){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(I),!k)for(var T in this)T.charAt(0)==="t"&&i.call(this,T)&&!isNaN(+T.slice(1))&&(this[T]=a)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var T=this;function L(ee,ie){return W.type="throw",W.arg=k,T.next=ee,ie&&(T.method="next",T.arg=a),!!ie}for(var M=this.tryEntries.length-1;M>=0;--M){var j=this.tryEntries[M],W=j.completion;if(j.tryLoc==="root")return L("end");if(j.tryLoc<=this.prev){var K=i.call(j,"catchLoc"),J=i.call(j,"finallyLoc");if(K&&J){if(this.prev<j.catchLoc)return L(j.catchLoc,!0);if(this.prev<j.finallyLoc)return L(j.finallyLoc)}else if(K){if(this.prev<j.catchLoc)return L(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return L(j.finallyLoc)}}}},abrupt:function(k,T){for(var L=this.tryEntries.length-1;L>=0;--L){var M=this.tryEntries[L];if(M.tryLoc<=this.prev&&i.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var j=M;break}}j&&(k==="break"||k==="continue")&&j.tryLoc<=T&&T<=j.finallyLoc&&(j=null);var W=j?j.completion:{};return W.type=k,W.arg=T,j?(this.method="next",this.next=j.finallyLoc,B):this.complete(W)},complete:function(k,T){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&T&&(this.next=T),B},finish:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var L=this.tryEntries[T];if(L.finallyLoc===k)return this.complete(L.completion,L.afterLoc),I(L),B}},catch:function(k){for(var T=this.tryEntries.length-1;T>=0;--T){var L=this.tryEntries[T];if(L.tryLoc===k){var M=L.completion;if(M.type==="throw"){var j=M.arg;I(L)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(k,T,L){return this.delegate={iterator:U(k),resultName:T,nextLoc:L},this.method==="next"&&(this.arg=a),B}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(ia);var Mt=ia.exports(),jt=Mt;try{regeneratorRuntime=Mt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Mt:Function("r","regeneratorRuntime = r")(Mt)}function Ld(t){var o=function(n,a){if(it(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(it(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return it(o)==="symbol"?o:String(o)}function jo(t,o,n){return(o=Ld(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Rt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,f=c.clientY,m=p-i,h=f-d;m<0&&(m=0),h<0&&(h=0),m>t.size&&(m=t.size),h>t.size&&(h=t.size);var w=m/t.size*100,b=100-h/t.size*100;n("change",w,b)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ca=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Ed=ca(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Bd=ca(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function je(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))}}je(".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}"),Rt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[Ed,Bd,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Rt.__scopeId="data-v-24517fec",Rt.__file="src/picker/Saturation.vue";var Ut=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),Od={ref:"canvas"};je(".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}"),Ut.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Od,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Ut.__scopeId="data-v-78b9f4f0",Ut.__file="src/picker/Hue.vue";var Gt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,f.fillStyle="#ffffff",f.fillRect(0,0,m,m),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var f=parseFloat((p/t.height).toFixed(2));n("change",f)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Vd={ref:"canvas"};je(".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}"),Gt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Vd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Gt.__scopeId="data-v-24dc9656",Gt.__file="src/picker/Alpha.vue";var zt=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")}}}}),Id={class:"input"},$d={class:"label"},Fd=[".value"];function _t(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,f=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(m){f=!0,i=m}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return c}}(t,o)||aa(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 da(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 Te(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?da(Object(n),!0).forEach(function(a){jo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):da(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".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}"),zt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Id,[e.createElementVNode("span",$d,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,Fd)])},zt.__scopeId="data-v-d52a4d02",zt.__file="src/picker/InputValue.vue";var pa=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},fa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Ht=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(fa[o]||o).concat(fa[n]||n)},ua=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Ht(o)).concat(Ht(n)).concat(Ht(a))},st=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},St=function(t,o,n){t=6*st(t,360),o=st(o,100),n=st(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*f)}},ma=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=pa(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=St(a,r,l),c=s.r,p=s.g,f=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(f,", ").concat(i,")");default:return"".concat(ua(St(a,r,l))).concat(Ht(255*i))}else switch(o){case"hsl":var m=pa(a,r/100,l/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(l),"%)");case"rgb":var h=St(a,r,l),w=h.r,b=h.g,N=h.b;return"rgb(".concat(w,", ").concat(b,", ").concat(N,")");default:return ua(St(a,r,l))}},Wt=function(t){var o=t.r,n=t.g,a=t.b;o=st(o,255),n=st(n,255),a=st(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ha=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},ya=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]}},Ro=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Uo(t,Go(t),n),r=wa(a);return ma(r,o,n)}return""},ga=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},ba=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},Ca=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Uo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=ga(t),a=n.r,r=n.g,l=n.b,i=n.a;return Te(Te({},Wt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=Ca(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=ba(t),c=s.h,p=s.s,f=s.l,m=s.a;return Te(Te({},ha({h:c,s:p,l:f})),{},{a:+m});default:var h=ya(t),w=h.r,b=h.g,N=h.b,E=h.a;return Te(Te({},Wt({r:w,g:b,b:N})),{},{a:E/255})}else switch(o){case"rgb":return Te(Te({},Wt(ga(t))),{},{a:1});case"hsv":var u=Ca(t);return{h:u.h,s:u.s,v:u.v,a:1};case"hsl":return Te(Te({},ha(ba(t))),{},{a:1});default:return Te(Te({},Wt(ya(t))),{},{a:1})}},Go=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}},At=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,f.fillStyle="#ffffff",f.fillRect(0,0,m,m),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),Dd=["draggable"];je(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),At.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Dd)},At.__scopeId="data-v-02da71fd",At.__file="src/color-item/ColorItem.vue";var qt=e.defineComponent({name:"Colors",components:{ColorItem:At},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 Ro(a,"hex",!0)})})}}}),vd={class:"colors"};function xa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?xa(Object(n),!0).forEach(function(a){jo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),qt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",vd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},qt.__scopeId="data-v-0f8b52a8",qt.__file="src/picker/Colors.vue";var Yt=e.defineComponent({name:"Picker",components:{Colors:qt,Saturation:Rt,Hue:Ut,Alpha:Gt,InputValue:zt},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 De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var u,B=(u=t.value)===null||u===void 0?void 0:u.trim();if(B!=null&&B!==""){var _=Go(B);return wa(Uo(B,_,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(u,B){var _="";u!=null?(_=ma(De({},u),t.format,t.showAlpha),i.value=De({},u)):i.value=null,d.value=_;var g=s();JSON.stringify(u)!==JSON.stringify(g)&&JSON.stringify(u)!==JSON.stringify(B)&&n("change",_)},{immediate:!0});var c=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.h)||0}),p=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.s)||0}),f=e.computed(function(){var u;return((u=e.unref(l))===null||u===void 0?void 0:u.v)||0}),m=e.computed(function(){var u,B;return((u=e.unref(l))===null||u===void 0?void 0:u.a)!=null?(B=e.unref(l))===null||B===void 0?void 0:B.a:1}),h=e.computed(function(){return St(e.unref(c),e.unref(p),e.unref(f))}),w=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),b=e.computed(function(){var u=t.format;if(t.showAlpha)switch(u){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(u){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),N=e.ref(-1),E=function(u,B,_){if(u.length!==0){var g=Uo(u,B,_),x=g.h,O=g.s,S=g.v;if(!(isNaN(x)||isNaN(O)||isNaN(S))){var V=1,F=g.a;isNaN(F)||(V=F),l.value={h:x,s:O,v:S,a:V}}}};return{h:c,s:p,v:f,a:m,rgbStr:w,onSelectSaturation:function(u,B){N.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:u,v:B,a:e.unref(m)}:l.value=De(De({},e.unref(l)),{},{s:u,v:B})},onSelectHue:function(u){N.value=-1,e.unref(l)==null&&(l.value={h:u,s:e.unref(p),v:e.unref(f),a:e.unref(m)}),l.value=De(De({},e.unref(l)),{},{h:u})},onSelectAlpha:function(u){N.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(f),a:u}:l.value=De(De({},e.unref(l)),{},{a:u})},label:b,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(u){N.value=-1,d.value=u},handleChange:function(){var u,B=(u=e.unref(d))===null||u===void 0?void 0:u.trim();if(B!==""){var _=t.showAlpha,g=t.format,x=function(O,S,V){if(V)switch(S){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(S){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(B,g,_);x?E(B,g,_):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:N,onSelectColor:function(u,B){if(N.value=B,(u=u.trim())==="")l.value=null;else{var _=Go(u);_?E(u,_,!0):l.value=null}}}}}),Pd={class:"picker-inner"},Md={class:"picker-header"};je(".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}"),Yt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Pd,[e.createElementVNode("div",Md,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Yt.__scopeId="data-v-6ceadec6",Yt.__file="src/picker/Picker.vue";var Kt=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"):""}})}}}),jd=[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 zo(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){jo(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}je(".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}"),Kt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(jd),4)},Kt.__scopeId="data-v-ceb1719c",Kt.__file="src/add-color-item/AddColorItem.vue";var qe=null,ct=e.defineComponent({name:"ColorPicker",components:{ColorItem:At,Picker:Yt,AddColorItem:Kt},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(C){return Ro(C,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var C=t.value||"",A=Array.isArray(C)?C:[C];a.value=A.map(function(I){return Ro(I,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,f,m,h,w,b=e.ref(null),N=e.ref(null),E=(s=b,c=N,p={zIndex:t.zIndex},f=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){qe.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(C){var A=C.state,I=A.styles,D=A.placement,U=I.popper;f.value=zo(zo(zo({},U),p),{},{transformOrigin:D==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(C,A){var I,D=_t(C,2),U=D[0],k=D[1],T=_t(A,2),L=T[0],M=T[1];if(U&&k&&(L!==U||M!==L)){(I=qe)===null||I===void 0||I.destroy();var j=U.$el||U,W=k.$el||k;e.nextTick(function(){qe=Nd(j,W,m)})}}),e.onBeforeUnmount(function(){var C;qe&&((C=qe)===null||C===void 0||C.destroy(),qe=null)}),{instance:qe,style:f}),u=E.style,B=function(){e.unref(b)==null&&(b.value=e.unref(y)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},_=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},g=e.ref(),x=function(){var C=la(jt.mark(function A(I){var D,U,k,T;return jt.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(U=I.target,(k=(D=U.dataset)===null||D===void 0?void 0:D.index)!=null&&k!==""){L.next=4;break}return L.abrupt("return");case 4:if(T=+k,e.unref(l)!==T){L.next=7;break}return L.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==T?(_(),h&&clearTimeout(h),h=setTimeout(function(){B(),clearTimeout(h)},100)):B(),l.value=T,b.value=U;case 10:case"end":return L.stop()}},A)}));return function(A){return C.apply(this,arguments)}}(),O=function(){var C=la(jt.mark(function A(I){var D,U,k,T,L;return jt.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(T=I.target,!(!((D=e.unref(g))!==null&&D!==void 0&&D.isEqualNode(T))&&(!((U=e.unref(g))===null||U===void 0)&&U.contains(T)))){M.next=4;break}return M.abrupt("return");case 4:if(L=(k=e.unref(N))===null||k===void 0?void 0:k.$el,!(L!=null&&L.contains(T))){M.next=8;break}return M.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&_()},0);case 10:case"end":return M.stop()}},A)}));return function(A){return C.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(B(),clearTimeout(w))});var S,V=e.ref(t.max>e.unref(a).length),F=e.computed(function(){return typeof t.popupContainer=="string"||it(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),$=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(N)]},function(){e.nextTick(function(){var C,A;(C=e.unref(g))===null||C===void 0||C.setAttribute("pick-colors-theme",e.unref(P)),(A=e.unref(N))===null||A===void 0||(A=A.$el)===null||A===void 0||A.setAttribute("pick-colors-theme",e.unref(P))})},{immediate:!0}),e.provide("theme",{theme:P});var y=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&B()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(C){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===C},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:V,onPickerChange:function(C){var A=e.unref(l),I=e.unref(a).slice(),D=e.unref(a).length;if(A!=null){A>=0?I[A]=C:(l.value=D,I.push(C));var U="";U=Array.isArray(t.value)||t.addColor?I:C,t.value===void 0?a.value=Array.isArray(U)?U:[U]:(n("update:value",U),n("change",U,C,A)),t.addColor&&D>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:g,onColorClick:x,pickerRef:N,onColorItemDragStart:function(C){C.dataTransfer.effectAllowed="move";var A=C.target;S=+A.dataset.index},onColorItemDragOver:function(C){},onColorItemDrop:function(C){var A=+C.target.dataset.index,I=Td(e.unref(a)),D=I[S];I.splice(S,1);var U=I.slice(0,A),k=I.splice(A),T=U.concat([D]).concat(k);n("update:value",T),n("change",T,T[S],S)},colorItemsRef:y,pickerStyle:u,values:r,teleportDisabled:$,toPopupContainer:F}}});je(".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)}"),ct.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(f){return t.colorItemsRef[p]=f},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ct.__scopeId="data-v-3c43ade8",ct.__file="src/ColorPicker.vue";const Rd=e.defineComponent({name:"ColorPick",components:{PickColors:ct,AInput:v.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}}}}),Ff="",Ud={class:"color-pick"};function Gd(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Ud,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const zd=te(Rd,[["render",Gd],["__scopeId","data-v-e2113f43"]]),Hd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:ct},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Df="",Wd={class:"color-group-pick"};function qd(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Wd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Yd=te(Hd,[["render",qd],["__scopeId","data-v-b2be8322"]]),Kd=e.defineComponent({name:"FormGroup",components:{Draggable:ft,AppstoreAddOutlined:kn,MinusCircleOutlined:yl,PickColors:ct,InputNumber:Mn,PlusCircleOutlined:wl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var f;const c=(f=t.value)==null?void 0:f.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),w={};h.forEach(b=>{w[b]=""}),c.push(w)}else typeof m=="string"&&c.push(m);n.value=c}else v.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,f)=>{var h;const m=(h=t.value)==null?void 0:h.slice();if(Array.isArray(m)){const w=c==null?void 0:c.target,b=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;f?m[p][f]=b:m[p]=b,n.value=m}},onDelete:c=>{var f;const p=(f=t.value)==null?void 0:f.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),vf="",Xd={class:"form-group"},Qd={class:"form-row"},Jd={key:0,class:"label"},Zd={key:1,class:"label"},ep={class:"icon-group"};function tp(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Xd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(f.label)?(e.openBlock(),e.createElementBlock("span",Jd,e.toDisplayString(f.useLabelIndex?f.label[p]+(p+1):f.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Zd,e.toDisplayString(f.useLabelIndex?f.label+(p+1):f.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(f.type)),e.mergeProps({class:"value",[t.formatTypeValue(f.typeValue)||""]:typeof c=="string"?c:c[f.value]??f.defaultValue,style:{width:!["color","switch"].includes(f.type)&&t.format.length>1?"110px":""}},f.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,f.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:f=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const op=te(Kd,[["render",tp],["__scopeId","data-v-f0c0ab4d"]]),np=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function ap(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const rp=te(np,[["render",ap]]),lp=e.defineComponent({name:"PropsToForm",components:{Input:cc,InputNumber:Mn,RadioGroup:mc,Select:gc,Switch:wc,ColorPick:zd,ColorGroupPick:Yd,FormGroup:op,Textarea:rp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Tt),n=e.inject(Qt),a=e.inject(Jt),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:f,value:m}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:w="change",events:b}=p;c[f]={...p,valueProp:h,value:m,events:{[w]:(N,E=!0)=>{l(E?{[f]:N}:{})},...b}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:ne.reduce(s,(c,p,f)=>{const m=lc[f];if(Array.isArray(m)){const h=m.find(w=>{const{onlyType:b,excludeType:N}=w;return b==null&&N==null?!0:b?Ve(e.unref(r),b):N?!Ve(e.unref(r),N):!1});h&&i({result:c,value:p,key:f,mapAttributeProp:h})}else i({result:c,value:p,key:f,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:Ve}}}),Pf="",ip={class:"props-to-form"},sp={class:"label"},cp={class:"component-wrapper"};function dp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",ip,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",sp,e.toDisplayString(i.label),1),e.createElementVNode("div",cp,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const pp=te(lp,[["render",dp],["__scopeId","data-v-c6fb2484"]]);function fp(){return new Worker("/assets/editor.worker-02df2e61.js")}function up(){return new Worker("/assets/json.worker-867823a6.js")}function mp(){return new Worker("/assets/ts.worker-7254b425.js")}const hp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new up:i==="typescript"||i==="javascript"?new mp:new fp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=Ba.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(ne.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),Mf="",yp={class:"editor",ref:"dom"};function gp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",yp,null,512)}const _a=te(hp,[["render",gp],["__scopeId","data-v-71e88372"]]),bp=[{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}],Cp=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:_a},setup(){const t=e.inject(ve),o=e.computed(()=>{var b;return!!((b=e.unref(t))!=null&&b.isGroupTable)}),n=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.graphicConfig)||{}}),a=e.computed(()=>{var b;return((b=e.unref(t))==null?void 0:b.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var N,E,u;let b=[];if(r.value=[],!o.value)b=((N=e.unref(n))==null?void 0:N.queryColumnList)||[];else{const B=((E=e.unref(n))==null?void 0:E.rowHeaderList)||[],_=((u=e.unref(n))==null?void 0:u.indicators)||[];b=[...B,..._]}b.forEach(B=>{var g;let _=(g=e.unref(a))==null?void 0:g.find(x=>x.prop===B.name);_||(_={label:B.label,prop:B.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(_)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:bp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(b,N,E)=>{b&&N&&(l=b,i=N,d.value=b[N]||"",c.value=!0,s.value=E)},onEditorChange:b=>{try{d.value=b}catch(N){console.error(N)}},changeRenderBool:(b,N)=>{b.style=N.target.checked,b.style?b.renderBool===void 0&&(b.renderBool=!1):delete b.renderBool}}}}),jf="",wp={class:"table-column-config"};function xp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),f=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",wp,[e.createVNode(f,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:w,text:b,record:N})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:E=>t.changeRenderBool(N,E),checked:N.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:N.width,"onUpdate:value":E=>N.width=E,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[N.style?(e.openBlock(),e.createBlock(d,{key:1,value:N.renderText,"onUpdate:value":E=>N.renderText=E,readOnly:!0,onClick:E=>t.renderSave(N,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[N.style?(e.openBlock(),e.createBlock(d,{key:1,value:N.headerTemplate,"onUpdate:value":E=>N.headerTemplate=E,readOnly:!0,onClick:E=>t.renderSave(N,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(b),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:N.headerAlign,"onUpdate:value":E=>N.headerAlign=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:N.align,"onUpdate:value":E=>N.align=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:N.fixed,"onUpdate:value":E=>N.fixed=E},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:N.dataFormat,"onUpdate:value":E=>N.dataFormat=E,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[N.dataFormat&&N.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:N.retentiondigit,"onUpdate:value":E=>N.retentiondigit=E,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]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const kp=te(Cp,[["render",xp],["__scopeId","data-v-afebddc0"]]),_p=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:pp,TableColumnConfig:kp,Editor:_a,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Tt),r=e.inject(Xo),l=e.inject(Qt),i=e.inject(Jt),d=e.inject(Ko),s=g=>{l({...en[g]},!1),d()},c=e.computed(()=>{var g;return(g=e.unref(a))==null?void 0:g.type}),p=["showTotalBool","totalName","expandAll"],f=e.computed(()=>rc.map(g=>{const{props:x,title:O,enableProps:S,onlyType:V,excludeType:F}=g,$=[];x.forEach(C=>{typeof C=="string"&&(p.includes(C)?t.isGroupTable&&$.push(C):$.push(C))});let P,y;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(P=typeof S=="string"&&r.value?r.value[S]:void 0,y=ne.pick(e.unref(r),$)):(P=typeof S=="string"&&a.value?a.value[S]:void 0,y=ne.pick(e.unref(a),$)),{title:O,enableProps:P,enablePropsName:S,onlyType:V,excludeType:F,props:y}}).filter(({props:g})=>Object.keys(g).length>0)),m=(g,x)=>{const{onlyType:O,excludeType:S}=g;return O==null&&S==null?!0:O?Ve(x,O):S?!Ve(x,S):!1},h=(g,x)=>(x==null||x.stopPropagation(),g),w=(g,x)=>{x!=null&&l({[x]:g})},b=e.computed(()=>JSON.stringify(e.unref(a),null,2)),N=g=>{try{const x=JSON.parse(g||"{}");l(x,!1)}catch(x){console.error(x)}},E=e.ref(""),u=g=>{try{E.value=g}catch(x){console.error(x)}},B=(g,x)=>{try{i({[x]:g})}catch(O){console.error(O)}},_=e.computed(()=>{var g;return["customGraph"].includes((g=e.unref(a))==null?void 0:g.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:b,updateComponentOptions:N,tableOptions:r,optionCode:E,onEditorChange:u,tableEditorChange:B,onSwitchClick:h,onSwitchChange:w,detailPropsGroups:f,isRenderForm:m,isShowOptionEditor:_}}}),Rf="",Uf="",Sp={class:"style-group"};function Ap(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),f=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Sp,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=b=>t.type=b),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=b=>t.activePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[t.isRenderForm(b,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b.title?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{extra:e.withCtx(()=>[typeof b.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:b.enableProps,onChange:N=>t.onSwitchChange(N,b.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(f,{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]=b=>t.tablePanel=b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,b=>{var N;return e.openBlock(),e.createElementBlock(e.Fragment,{key:b.title},[b.title&&((N=b.onlyType)!=null&&N.includes(t.componentType))?(e.openBlock(),e.createBlock(f,{header:b.title,key:b.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:b.props,disabled:typeof b.enableProps=="boolean"?!b.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(f,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(w)]),_:1}),e.createVNode(f,{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]=b=>t.tableEditorChange(b,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(f,{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]=b=>t.tableEditorChange(b,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Np=te(_p,[["render",Ap],["__scopeId","data-v-2fb3e2ad"]]),Tp=e.defineComponent({name:"Card",components:{CloseOutlined:yo},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(Re),a=e.inject(Lt),r=e.inject(Zo),l=e.computed(()=>{var y;return(y=e.unref(n))==null?void 0:y.filter(C=>C.keyName!=="")}),i=e.computed(()=>{var A,I;const y=[],C=(A=e.unref(l))==null?void 0:A.find(D=>{var U;return D.id===((U=t.control)==null?void 0:U.id)});if(C){const D=C.type,U=ne.pick(C,["value","startTime","endTime"]);(I=Object.keys(U))!=null&&I.length||(U.value="");for(const k in U)if(Object.prototype.hasOwnProperty.call(U,k)){const T=e.unref(r)[k];if(Array.isArray(T)){const L=T.find(M=>Ve(D,M.onlyType));L&&y.push({label:L.label,value:k})}else y.push({label:T.label,value:k})}}return y}),d=()=>{o("delete",t.index),s(t.control.id)};function s(y){const C=e.unref(l).find(A=>A.id===y);if(C){const{type:A,id:I,events:D=[]}=C,U=$t(A),k=D.findIndex(T=>{var L;return T.on===U&&T.target===((L=e.unref(b))==null?void 0:L.id)&&T.emit==="refreshData"});k!==-1&&(D.splice(k,1),a({id:I,events:D}))}}const c=y=>{const C={...t.control};if(C.id=y,y){const A=e.unref(l).find(I=>I.id===y);A&&(C.keyName=A.keyName,u(A,y))}delete C.prop,o("update",C,t.index)},p=e.ref(""),f=()=>{p.value=t.control.id},m=y=>{o("update",{...t.control,prop:y},t.index)},h=y=>{o("update",{...t.control,rule:y},t.index)},w=y=>{const C={...t.control};y==null?delete C.mode:C.mode=y,delete C.conditionLabel,delete C.conditionName,delete C.conditionKey,delete C.conditionValueType,o("update",C,t.index)},b=e.inject(ve),N=e.inject(pe),E=e.computed(()=>{var K;const{classificationList:y=[],seriesList:C=[],leftAxisList:A=[],rightAxisList:I=[],indicators:D=[],rowHeaderList:U=[],queryColumnList:k=[]}=e.unref(N),T=ne.cloneDeep([...y,...C,...A,...I,...D,...U,...k]);if(T!=null&&T.length)for(const J of T)J.id=J.name;const L=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE"},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT"},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT"},...t.intersection.map(J=>({...J,id:J.name,label:J.title||J.label})),...T];((K=e.unref(b))==null?void 0:K.type)==="ecanSelect"&&L.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const M=new Map,j=L.length;for(let J=0;J<j;J++){const ee=L[J],{id:ie}=ee||{};M.set(ie,ee)}return[...M].map(([J,ee])=>ee)});function u(y,C){var k;const{type:A,id:I,events:D=[]}=y,U=$t(A);if(e.unref(p)&&C!==e.unref(p)){const{controlList:T=[]}=e.unref(N);T.find(L=>L.id===e.unref(p))||s(e.unref(p))}D.find(T=>{var L;return T.on===U&&T.target===((L=e.unref(b))==null?void 0:L.id)&&T.emit==="refreshData"})||a({id:I,events:[...D,{on:U,target:(k=e.unref(b))==null?void 0:k.id,emit:"refreshData"}].reverse()})}const B=(y,C)=>{if(y){const{label:A,name:I,id:D,genericType:U}=C||{};o("update",{...t.control,conditionKey:D,conditionLabel:A,conditionName:I,conditionValueType:U},t.index)}else{const A={...t.control};delete A.conditionLabel,delete A.conditionName,delete A.conditionKey,delete A.conditionValueType,o("update",A,t.index)}},_=(y,C)=>{var A;return(A=C==null?void 0:C.keyName)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},g=(y,C)=>{var A;return(A=C==null?void 0:C.label)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},x=e.computed(()=>{const y=e.unref(E).find(A=>A.id===t.control.conditionKey);let C="";return y&&(C=(y==null?void 0:y.genericType)||""),C==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:C==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:C==="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"}]:[]}),O=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(D=>D.id===C),I=["table","bar","combograph","line","pie","radar","scatter","list"];Ve(A==null?void 0:A.type,I)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(I=>I.id===C);(A==null?void 0:A.type)==="ecanRangePicker"&&(y=!0)}return y}),V=e.computed(()=>{let y=!1;const{id:C=""}=t.control;if(C){const A=e.unref(l).find(I=>I.id===C);["ecanDatePicker","ecanRangePicker"].includes(A==null?void 0:A.type)&&(y=!0)}return y});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:f,onPropChange:m,onModeChange:w,onRuleChange:h,conditionKeyOptions:E,onConditionKeyChange:B,idFilterOption:_,filterOption:g,onFormatChange:y=>{o("update",{...t.control,format:y},t.index)},onModelPropChange:y=>{o("update",{...t.control,modelKey:y.target.value},t.index)},ruleOption:x,isShowProp:S,isShowFormat:V,isShowModelProp:O,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"}]}}}),Gf="",zf="",Lp={class:"control-card"};function Ep(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Lp,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Bp=te(Tp,[["render",Ep],["__scopeId","data-v-00350e9a"]]),Op=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:Bp,AButton:v.Button},setup(t,{expose:o}){const n=e.inject(Re),a=e.inject(pe),r=e.inject(Be),l=e.computed(()=>{var m;const f=((m=e.unref(a))==null?void 0:m.controlList)||[];for(const h of f)h.conditionKey&&!To(h,"rule")&&(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL");return f}),i=e.ref(null),d=f=>{const m={...e.unref(a),...f,sqlConditions:vn({...e.unref(a),...f},e.unref(n))};r(m)},s=()=>{var m;const f=(m=e.unref(l))==null?void 0:m.slice();f.push({}),d({controlList:f})},c=f=>{var h;const m=(h=e.unref(l))==null?void 0:h.slice();m.splice(f,1),d({controlList:m})},p=(f,m)=>{var w;const h=(w=e.unref(l))==null?void 0:w.slice();h[m]=f,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),Hf="",Vp={class:"control-group"},Ip={class:"control-group-header"},$p={class:"control-group-content"};function Fp(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",Vp,[e.createElementVNode("div",Ip,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",$p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const Dp=te(Op,[["render",Fp],["__scopeId","data-v-365e5dd8"]]),vp=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:f}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,f)=>{a(p),c?f<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f,calcType:m="COLUMN",builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:N,conditions:E,aggregate:u}=i;let B;return E&&(B=r(E)),{label:d.trim(),columnName:s,location:c,show:p,calcType:m,hrpIndexCode:f,aggregate:u,builtInFormula:h,builtInValueSource:w,builtInCalcWay:b,formula:N,conditions:B}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:f="1",layer:m,chartType:h,classificationList:w=[],seriesList:b=[],leftAxisList:N=[],rightAxisList:E=[],queryColumnList:u=[],indicators:B=[],dataSourceId:_,idxLibMode:g,preview:x=!1}=i||{};m==null&&(Ve(d,"table")?m="1":m="2");let O;if(Array.isArray(w)&&w.length>0){const $=w.length;for(let P=0;P<$;P++){const y=w[P]||{},{label:C="",name:A="",show:I=!1,sort:D,customGroup:U,conditions:k}=y;if(I||$===1){O={label:C.trim(),columnName:A,show:I,sort:D,customGroup:U,conditions:r(k)};break}}}let S;if(Array.isArray(b)&&b.length>0){const $=b.length;for(let P=0;P<$;P++){const y=b[P]||{},{label:C="",name:A="",show:I=!1,sort:D,customGroup:U,conditions:k}=y;if(I||$===1){S={label:C.trim(),columnName:A,show:I,sort:D,customGroup:U,conditions:r(k)};break}}}const V=[];u==null||u.forEach($=>{V.push(o($))});const F=[];if(N==null||N.forEach($=>{$.location="LEFT",F.push(l($))}),E==null||E.forEach($=>{$.location="RIGHT",F.push(l($))}),B==null||B.forEach($=>{$.location="LEFT",F.push(l($))}),!(m==="1"&&V.length===0)&&!(m==="2"&&F.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:f,layer:m,chartType:h,classification:O,series:S,indicatorList:F,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:_,idxLibMode:g,preview:x})}catch($){console.error($)}}},Sa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Xt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=c.match(p);for(let m=0;m<f.length;m++){const h=f[m],w=l[h];w!=null&&(c=c.replace(h,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Sa(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Nt=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Sa(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},Pp=(t,o,n)=>{switch(t.type){case"bar":return Mp(t,o,n);case"line":return jp(t,o,n);case"pie":return Rp(t,o,n);case"comboGraph":return Up(t,o,n);default:return{}}},Mp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,f=[];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},f.push(h)}return f}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:N,value:E,data:u}=c[h]||{};h===0&&(f+=`${N}<br/>`),f+=Xt(m,{textData:{marker:w,name:N,value:E,a:b,b:N,c:E,...u}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},jp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let f=0;f<p;f++)c.push({type:"line",...i[f],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 f="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:w,seriesName:b,name:N,value:E,data:u}=c[h]||{};h===0&&(f+=`${N}<br/>`),f+=Xt(m,{textData:{marker:w,name:N,value:E,a:b,b:N,c:E,...u}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f}},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 Nt(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 Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},Rp=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:f}=l||{};return Xt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...f}},{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:zi(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:{}}}]}},Up=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let f=0;f<c;f++){const m=p[f];s.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[f]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Nt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");const m=t.seriesTypes;for(let h=0;h<c;h++){const w=m[h],{tooltipFormatter:b}=w||{},{marker:N,seriesName:E,name:u,value:B,data:_}=s[h]||{};h===0&&(p+=`${u}<br/>`),p+=Xt(b||f,{textData:{marker:N,name:u,value:B,seriesName:E,a:E,b:u,c:B,..._}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},Gp=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let m=0;m<d;m++){const h=a[m],{label:w,value:b}=h,N={...t[0],value:t[0][b]};r.add(w),p.push(N)}const f=t[0][n]||"";l.set(f,p)}else for(let p=0;p<i;p++){const f=t[p],m=f[n];r.add(m);for(let h=0;h<d;h++){const w=a[h],{label:b,value:N}=w,E={...f,value:f[N]};if(l.has(b)){const u=l.get(b);u.push(E),l.set(b,u)}else l.set(b,[E])}}const s=Array.from(r),c=[];for(const[p,f]of l)c.push({name:p,data:f});return{dimensions:s,dataset:c}},zp=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const f=t[p],m=f[n]||"",h=f[a]||"",w=f[r]||"";if(l.add(m),i.has(w)){const b=i.get(w);b.push({name:m,value:h,...f}),i.set(w,b)}else i.set(w,[{name:m,value:h,...f}])}const s=Array.from(l),c=[];for(const[p,f]of i)c.push({name:p,data:f});return{dimensions:s,dataset:c}},Hp=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Le);let l=null;const i=e.inject(Ee)||"",d=e.inject(pe)||{},s=e.inject(Tt)||{},c=e.ref(null),p=e.ref(null),f=e.ref(),m=e.ref(!1),h=e.ref(!1),w=e.computed(()=>h.value?$a:12),b=e.ref({}),N=e.ref(),E=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return N.value;const F=Pp(V,e.unref(b),w.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,...F}}),u=(V=[],F,$=!1)=>{const P=$?F:null;b.value=Gp(V,P)},B=(V=[],F)=>{b.value=zp(V,F)},_=async()=>{var V,F,$;try{const P=vp({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:i});m.value=!0;const y=await P(),{columns:C=[],rows:A=[]}=((F=y==null?void 0:y.data)==null?void 0:F.data)??{};if((($=e.unref(n.value))==null?void 0:$.type)==="pie"){let I=[];if(C.length>0){const D=C[0],U=C[1];I=A.map(k=>({name:k[D],value:k[U]}))}B(I)}else{let I;C.length>0&&(I={name:C[0],types:C.slice(1).map(D=>({label:D,value:D}))}),u(A,I,!0)}}catch(P){console.error(P)}finally{m.value=!1}},g={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},x=()=>{e.unref(b).dataset.length===0?f.value.setOption(g):f.value.setOption(E.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&_()},S=()=>{var V;(V=f.value)==null||V.resize()};return e.watch(E,()=>{x()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const F=eval;N.value=F(V)}catch(F){console.error(F)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(S),l.observe(p.value)),f.value=Ia.init(c.value)}),e.onBeforeUnmount(()=>{f.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:O}),{echartRef:c,loading:m}}}),Wf="",Wp={class:"ecan-chart-graph",ref:"chartWrapRef"},qp={style:{width:"100%",height:"100%"},ref:"echartRef"};function Yp(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",qp,null,512)]),_:1},8,["spinning"])],512)}const Aa=te(Hp,[["render",Yp],["__scopeId","data-v-8049fed2"]]),Kp=e.defineComponent({name:"DataConfig",components:{DataGroup:ac,StyleGroup:Np,ChartGraph:Aa,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:Dp},setup(){var _;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(ve),r=e.inject(Yo),l=e.inject(pe),i=e.inject(Re),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const g=ne.cloneDeep(e.unref(a));c(g);const x=ne.pick(g,ne.without(Object.keys(g),"position","top","left","width","height"));Ve(g.type,d)?(x.height=g.height,x.width=g.width):x.height="290px";const O=ne.cloneDeep(e.unref(l));return O.pageMode="design",O.componentList=i,O.preview=!0,{...x,graphicConfig:O,toolboxShow:!1}});function c(g){var x,O,S,V;["#ffffff","#fff"].includes((x=g==null?void 0:g.color)==null?void 0:x.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((O=g==null?void 0:g.variableColor)==null?void 0:O.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((S=g==null?void 0:g.increaseColor)==null?void 0:S.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((V=g==null?void 0:g.declineColor)==null?void 0:V.toLowerCase())&&(g.declineColor="#000")}const p=e.computed(()=>{let g=!0;return Ve(e.unref(s).type,d)&&(g=!1),g}),f=e.computed(()=>{var g;return(g=e.unref(s))==null?void 0:g.type}),m=e.computed(()=>{var g;return!!((g=e.unref(s))!=null&&g.isGroupTable)}),h=g=>{const x=g==="1";x&&f.value==="table"&&B(),window.changeShowTable&&window.changeShowTable(x),g==="3"&&u()},w=e.ref(),b=e.inject(Le),N=e.unref(e.inject(Ee)),E=(_=window==null?void 0:window.config)==null?void 0:_.pageId;function u(){var $;const{leftAxisList:g=[],rightAxisList:x=[],queryColumnList:O=[],indicators:S=[]}=e.unref(l),V=[...g,...x,...O,...S],F={};for(const P of V){const{id:y="",indexCode:C=""}=P;y&&!To(P,"calcType")&&!F[y]&&(F[y]=C)}if(($=Object.keys(F))!=null&&$.length){const P=[];for(const y in F)P.push(new Promise((C,A)=>{b.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:E,indexGuid:y,indexCode:F[y],dataSourceId:""},{headers:{Authentication:N,operateContext:"ygt"}}).then(I=>{var k;const{success:D,data:U=[]}=I.data;D&&((k=U==null?void 0:U.dataViewColumns)!=null&&k.length)?C(U.dataViewColumns):A(U)}).catch(I=>{A(I)})}));Promise.all(P).then(y=>{if(y!=null&&y.length){const C=y.reduce((A,I)=>A.filter(D=>I.find(U=>U.typeGuid===D.typeGuid)));w.value=C.filter(A=>A.typeGuid)}})}}const B=()=>{var x;let g;r&&f.value==="table"?g=window.updateConfig:g=(x=e.unref(n))==null?void 0:x.refreshData,typeof g=="function"&&g()};return e.provide(Ko,B),e.watch(l,()=>{B()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:m,onChange:h,component:s,fullWidth:p,renderUsedComponents:i,intersection:w}}}),qf="",Xp={class:"data-config"},Qp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Jp(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Xp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=m=>t.activeKey=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Qp,null,512)):e.withDirectives((e.openBlock(),e.createBlock(f,{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 Zp=te(Kp,[["render",Jp],["__scopeId","data-v-df437f90"]]),ef=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Rl,DataConfig:Zp},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var g;return((g=e.unref(i))==null?void 0:g.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?ne.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?ne.cloneDeep(e.unref(i).chartsOptions):e.ref(ne.cloneDeep(en.line));p=e.ref(p);let f=e.unref(i).tableOptions?ne.cloneDeep(e.unref(i).tableOptions):e.ref(ne.cloneDeep(Fa));f=e.ref(f);const m=e.ref([]),h=g=>{m.value=g},w=g=>{c.value={...e.unref(c),...e.unref(g)}},b=(g,x=!0)=>{x?p.value={...e.unref(p),...e.unref(g)}:p.value={...e.unref(g)}},N=g=>{f.value={...e.unref(f),...e.unref(g)}},E=()=>m,u=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=ne.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=ne.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},B=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(f),tableColumns:e.unref(d)});window.getIndicatorData=B,t.request&&e.provide(Le,t.request),e.provide(qo,{setDataList:h,getDataList:E});const _=g=>{n("updateUsedComponent",g)};return e.provide(ve,i),e.provide(pe,c),e.provide(Tt,p),e.provide(Xo,f),e.provide(Zt,r),e.provide(Yo,s),e.provide(Ee,l),e.provide(Be,w),e.provide(Qt,b),e.provide(Jt,N),e.provide(Re,t.renderUsedComponentList),e.provide(Lt,_),e.provide(Zo,t.mapAttributeProps),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:u}),{isUpdate:a}}}),Yf="",tf={key:0,class:"config-modal"},of={class:"config-modal-left"},nf={class:"config-modal-right"};function af(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",of,[e.createVNode(i)]),e.createElementVNode("div",nf,[e.createVNode(d)])]))}const Na=Wo(te(ef,[["render",af],["__scopeId","data-v-8e2109bf"]])),Ta=Wo(Aa),La=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ta,EcanIndicatorLibrary:Na},Symbol.toStringTag,{value:"Module"})),rf={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(La).forEach(a=>{const r=La[a];r.install&&t.use(r)})}};he.EcanChartGraph=Ta,he.EcanIndicatorLibrary=Na,he.default=rf,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,yo=!1,ur=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pr;e.nextTick(function(){yo||(typeof window<"u"&&window.document&&window.document.documentElement&&ir(n,{prepend:!0}),yo=!0)})},fr=["icon","primaryColor","secondaryColor"];function mr(t,n){if(t==null)return{};var o=hr(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function hr(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}function It(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){yr(t,r,o[r])})}return t}function yr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var ht={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function gr(t){var n=t.primaryColor,o=t.secondaryColor;ht.primaryColor=n,ht.secondaryColor=o||mo(n),ht.calculated=!!o}function br(){return It({},ht)}var Ze=function(n,o){var a=It({},n,o.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=mr(a,fr),s=ht;if(l&&(s={primaryColor:l,secondaryColor:i||mo(l)}),ur(),dr(fo(r),"icon should be icon definiton, but got ".concat(r)),!fo(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=It({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),dn(c.icon,"svg-".concat(c.name),It({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};Ze.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},Ze.inheritAttrs=!1,Ze.displayName="IconBase",Ze.getTwoToneColors=br,Ze.setTwoToneColors=gr;const pn=Ze;function Cr(t,n){return _r(t)||kr(t,n)||xr(t,n)||wr()}function wr(){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 xr(t,n){if(t){if(typeof t=="string")return go(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return go(t,n)}}function go(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function kr(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function _r(t){if(Array.isArray(t))return t}function bo(t){var n=ho(t),o=Cr(n,2),a=o[0],r=o[1];return pn.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Sr(){var t=pn.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Ar=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Nr(t,n){return Br(t)||Er(t,n)||Lr(t,n)||Tr()}function Tr(){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 Lr(t,n){if(t){if(typeof t=="string")return Co(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Co(t,n)}}function Co(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function Er(t,n){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var a=[],r=!0,l=!1,i,d;try{for(o=o.call(t);!(r=(i=o.next()).done)&&(a.push(i.value),!(n&&a.length===n));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&o.return!=null&&o.return()}finally{if(l)throw d}}return a}}function Br(t){if(Array.isArray(t))return t}function wo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){un(t,r,o[r])})}return t}function un(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function Or(t,n){if(t==null)return{};var o=Vr(t,n),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(o[a]=t[a])}return o}function Vr(t,n){if(t==null)return{};var o={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(n.indexOf(r)>=0)&&(o[r]=t[r]);return o}bo("#1890ff");var et=function(n,o){var a,r=wo({},n,o.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=Or(r,Ar),h=(a={anticon:!0},un(a,"anticon-".concat(i.name),!!i.name),un(a,l,l),a),_=d===""||d||i.name==="loading"?"anticon-spin":"",g=c;g===void 0&&u&&(g=-1,f.tabindex=g);var S=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,L=ho(p),w=Nr(L,2),B=w[0],m=w[1];return e.createVNode("span",wo({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(pn,{class:_,icon:i,primaryColor:B,secondaryColor:m,style:S},null)])};et.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},et.displayName="AntdIcon",et.inheritAttrs=!1,et.getTwoToneColor=Sr,et.setTwoToneColor=bo;const he=et;var Ir={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 Fr=Ir;function xo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){$r(t,r,o[r])})}return t}function $r(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var fn=function(n,o){var a=xo({},n,o.attrs);return e.createVNode(he,xo({},a,{icon:Fr}),null)};fn.displayName="AppstoreAddOutlined",fn.inheritAttrs=!1;const ko=fn;var Dr={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 vr=Dr;function _o(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Pr(t,r,o[r])})}return t}function Pr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var mn=function(n,o){var a=_o({},n,o.attrs);return e.createVNode(he,_o({},a,{icon:vr}),null)};mn.displayName="CaretDownOutlined",mn.inheritAttrs=!1;const Mr=mn;var jr={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 Rr=jr;function So(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Ur(t,r,o[r])})}return t}function Ur(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var hn=function(n,o){var a=So({},n,o.attrs);return e.createVNode(he,So({},a,{icon:Rr}),null)};hn.displayName="CaretRightOutlined",hn.inheritAttrs=!1;const Gr=hn;var zr={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 Hr=zr;function Ao(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Wr(t,r,o[r])})}return t}function Wr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var yn=function(n,o){var a=Ao({},n,o.attrs);return e.createVNode(he,Ao({},a,{icon:Hr}),null)};yn.displayName="CloseOutlined",yn.inheritAttrs=!1;const gn=yn;var qr={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 Yr=qr;function No(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Kr(t,r,o[r])})}return t}function Kr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var bn=function(n,o){var a=No({},n,o.attrs);return e.createVNode(he,No({},a,{icon:Yr}),null)};bn.displayName="CopyOutlined",bn.inheritAttrs=!1;const Xr=bn;var Qr={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 Jr=Qr;function To(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Zr(t,r,o[r])})}return t}function Zr(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Cn=function(n,o){var a=To({},n,o.attrs);return e.createVNode(he,To({},a,{icon:Jr}),null)};Cn.displayName="DeleteOutlined",Cn.inheritAttrs=!1;const el=Cn;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 nl=tl;function Lo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){ol(t,r,o[r])})}return t}function ol(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var wn=function(n,o){var a=Lo({},n,o.attrs);return e.createVNode(he,Lo({},a,{icon:nl}),null)};wn.displayName="DoubleRightOutlined",wn.inheritAttrs=!1;const al=wn;var rl={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 ll=rl;function Eo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){il(t,r,o[r])})}return t}function il(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var xn=function(n,o){var a=Eo({},n,o.attrs);return e.createVNode(he,Eo({},a,{icon:ll}),null)};xn.displayName="DownOutlined",xn.inheritAttrs=!1;const sl=xn;var cl={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 dl=cl;function Bo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){pl(t,r,o[r])})}return t}function pl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var kn=function(n,o){var a=Bo({},n,o.attrs);return e.createVNode(he,Bo({},a,{icon:dl}),null)};kn.displayName="InfoCircleOutlined",kn.inheritAttrs=!1;const ul=kn;var fl={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 ml=fl;function Oo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){hl(t,r,o[r])})}return t}function hl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var _n=function(n,o){var a=Oo({},n,o.attrs);return e.createVNode(he,Oo({},a,{icon:ml}),null)};_n.displayName="MinusCircleOutlined",_n.inheritAttrs=!1;const yl=_n;var gl={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 bl=gl;function Vo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Cl(t,r,o[r])})}return t}function Cl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Sn=function(n,o){var a=Vo({},n,o.attrs);return e.createVNode(he,Vo({},a,{icon:bl}),null)};Sn.displayName="PlusCircleOutlined",Sn.inheritAttrs=!1;const wl=Sn;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 kl=xl;function Io(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){_l(t,r,o[r])})}return t}function _l(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var An=function(n,o){var a=Io({},n,o.attrs);return e.createVNode(he,Io({},a,{icon:kl}),null)};An.displayName="PlusOutlined",An.inheritAttrs=!1;const Sl=An;var Al={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 Nl=Al;function Fo(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?Object(arguments[n]):{},a=Object.keys(o);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(o).filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable}))),a.forEach(function(r){Tl(t,r,o[r])})}return t}function Tl(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Nn=function(n,o){var a=Fo({},n,o.attrs);return e.createVNode(he,Fo({},a,{icon:Nl}),null)};Nn.displayName="SettingOutlined",Nn.inheritAttrs=!1;const Ll=Nn,El=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Gr,CaretDownOutlined:Mr,AInputSearch:j.InputSearch,ASpin:j.Spin,APagination:j.Pagination,Draggable:ut},setup(){var m;const t=(m=window==null?void 0:window.config)==null?void 0:m.pageId,n=e.inject(Ae),o=e.unref(e.inject(Ne)),a=e.inject(De),r=e.computed(()=>{var b;return(b=e.unref(a))==null?void 0:b.graphicConfig}),l=e.computed(()=>{var b;return(b=e.unref(r))==null?void 0:b.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const b={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const x=await n.post(`${Ce}/diagram/sourceList`,b,{headers:{Authentication:o,operateContext:"ygt"}});d.value=!1;const{success:O,data:V={}}=x.data;if(O){const{rows:T=[],total:M=0}=V;T==null||T.forEach(I=>{var R;I.show=!1,(R=I.dataViewColumns)==null||R.forEach(y=>{y.show=!0,y.edit=!1,y.title&&(y.label=y.title)})}),i.value=T,s.totalResult=+M}}catch{d.value=!1}},u=b=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[b],f=b=>{i.value[b].show=!i.value[b].show},h=()=>{s.currentPage=1,p()},_=te.debounce(()=>{s.currentPage=1,p()},200),g=(b,x)=>{s.pageSize=x,s.currentPage=b,p()};e.onMounted(()=>{p()});const S=e.inject(de),L=e.computed(()=>{const b=["classificationList","rowHeaderList","dimensionList"];let x=[];for(const O in e.unref(S))if(Object.prototype.hasOwnProperty.call(e.unref(S),O)&&b.includes(O)){const V=e.unref(S)[O];Array.isArray(V)&&(x=x.concat(V))}return x});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:_,onPaginationChange:g,searchText:c,setItemDisabled:(b=[])=>{let x=!1;for(const O of e.unref(L))if(!b.find(T=>T.typeGuid===O.typeGuid)){x=!0;break}return x},onDragStart:(b,x)=>{const O=x[b.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),gu="",Bl={class:"data-source-list"},Ol={class:"columns"},Vl={class:"column-item"},Il=["onClick"],Fl={key:0},$l={class:"column-child-item"},Dl={class:"column-child-item-name"};function vl(t,n,o,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Bl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":n[0]||(n[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Ol,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Vl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:_=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,Il)]),f.show?(e.openBlock(),e.createElementBlock("div",Fl,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":_=>f.dataViewColumns=_,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:_=>t.onDragStart(_,f.dataViewColumns)},{item:e.withCtx(({element:_})=>[e.createElementVNode("div",$l,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(_.scope))+"】 ",1),e.createElementVNode("span",Dl,e.toDisplayString(_.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":n[1]||(n[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":n[2]||(n[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Pl=Z(El,[["render",vl],["__scopeId","data-v-dfb51d34"]]),Ml=e.defineComponent({name:"DataList",components:{DataSourceList:Pl,DataViewList:Ua},setup(){return{source:e.inject(en)}}});function jl(t,n,o,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Rl=Z(Ml,[["render",jl]]),$o={mounted(t){t.focus()}},Ul=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ut,AModal:j.Modal,AButton:j.Button},setup(t,{expose:n}){var B;const o=(B=window==null?void 0:window.config)==null?void 0:B.pageId,a=e.inject(Ae),r=e.unref(e.inject(Ne)),l=e.inject(de),i=e.inject(Te),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const m=await a.post(`${Ce}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:b,data:x=[]}=m.data;b&&(c.value=x==null?void 0:x.slice(0,200))}catch(m){console.error(m)}},u=()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],b=m[t.index],{label:x,name:O}=t.item;b.sort={label:x,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:m})};let f=!1;const h=()=>{f=!0},_=e.ref(!1),g=()=>{_.value=!0},S=()=>{_.value=!1},L=()=>{f&&u(),f=!1,S()};return n({showModal:g}),e.watch(_,m=>{var b,x;if(m){const O=(x=(b=t.item)==null?void 0:b.sort)==null?void 0:x.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!m)},{flush:"post"}),{visible:_,onCancel:L,customSortList:c,onChange:h,onDeleteConfig:()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],b=m[t.index],{label:x,name:O}=t.item;b.sort={label:x,columnName:O},i({[t.type]:m}),S()}}}}),bu="",Gl={class:"button-wrapper"},zl={class:"sort-item"};function Hl(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":n[0]||(n[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",zl,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Wl=Z(Ul,[["render",Hl],["__scopeId","data-v-8e16d201"]]),ql=e.defineComponent({name:"CustomGroupModal",directives:{focus:$o},components:{CloseOutlined:gn,AModal:j.Modal,ASelect:j.Select,ASelectOption:j.SelectOption,AButton:j.Button,AInput:j.Input,ACheckbox:j.Checkbox,ACollapse:j.Collapse,ACollapsePanel:j.CollapsePanel,ATag:j.Tag,ACheckableTag:j.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:n}){var G;const o=e.inject(Ae),a=(G=window==null?void 0:window.config)==null?void 0:G.pageId,r=e.unref(e.inject(Ne));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const C=e.unref(c).map(N=>N.title);return new Set(C)}),u=e.ref([]);e.watch(()=>e.unref(c).length,C=>{u.value=new Array(C).fill(!1)});const f=e.computed(()=>{let C=0;return e.unref(c).forEach(N=>{var E;(E=N.data)==null||E.forEach(U=>{U.checked&&C++})}),C}),h=()=>{const C=e.unref(d);if(!C){j.message.error("创建分组名不能空");return}e.unref(p).has(C)?j.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:C,data:[]}),l=!0)},_=C=>{e.unref(c).splice(C,1),l=!0},g=e.ref(null),S=()=>{if(e.unref(f)===0){j.message.error("当前移入分组已选个数为0");return}const C=e.unref(g);if(C==null){j.message.error("请选择移入分组");return}if(!e.unref(c)[C]){j.message.error("移入分组不存在,请重新选择");return}const N=[],E=e.unref(c).length;for(let U=0;U<E;U++){const P=e.unref(c)[U];e.unref(c)[U].data=P.data.filter(q=>(q.checked&&N.push({...q,checked:!1}),!q.checked))}e.unref(c)[C].data=[...N,...e.unref(c)[C].data],l=!0},L=C=>{e.unref(u)[C]=!0},w=C=>{e.unref(u)[C]=!1},B=(C,N)=>{const E=C.target.value;e.unref(p).has(E)&&j.message.error("组名不能相同,请修改"),e.unref(c)[N].title=E,l=!0},m=e.inject(de),b=e.inject(Te),x=e.computed(()=>e.unref(m).source),O=e.computed(()=>e.unref(m).dataViewId),V=e.ref(!1),T=()=>{var X,Y;const C=e.unref(c);let N="";e.unref(V)&&(N=(X=C[0])==null?void 0:X.title);const E=C==null?void 0:C.length,U={};for(let J=1;J<E;J++){const ae=C[J]||{},{title:se,data:ce}=ae;U[se]=(ce==null?void 0:ce.map(Be=>Be.label))||[]}const P=((Y=e.unref(m)[t.type])==null?void 0:Y.slice())||[],q=P[t.index];q.customGroup={groupInfoMap:U,otherGroupName:N},b({[t.type]:P})},M=e.ref(!1),I=()=>{M.value=!0},R=()=>{M.value=!1},y=()=>{R(),l&&T(),l=!1},k=()=>{l=!0},A=new Set,$=async()=>{const C=t.item.customGroup||{},N=C.otherGroupName,E=C.groupInfoMap;(N===""||N==null)&&(V.value=!1),e.unref(c)[0]={title:N||"未分组",data:[]};let U=1;for(const P in E)if(Object.prototype.hasOwnProperty.call(E,P)){const X=E[P].map(Y=>(A.add(Y),{label:Y,checked:!1}));e.unref(c)[U]={title:P,data:X},U++}await v()},v=async()=>{var C;try{const N=await o.post(`${Ce}/diagram/groupvalue`,{source:e.unref(x),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:U=[]}=N.data;if(E){const P=[];(C=U==null?void 0:U.slice(0,200))==null||C.forEach(q=>{A.has(q)||P.push({label:q,checked:!1})}),e.unref(c)[0].data=P}}catch(N){console.error(N)}};return e.watch(M,C=>{C&&$(),window.changeShowTable&&window.changeShowTable(!C)},{flush:"post"}),n({showModal:I}),{visible:M,title:i,activeKey:s,customGroupList:c,onCancel:y,useOtherGroup:V,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:_,onMoveInGroup:S,selectGroupIndex:g,onEditTitle:L,onTitleChange:B,onFinishEditTitle:w,onUseOtherGroup:k,customGroupEditTitleList:u}}}),Cu="",wu="",Yl={class:"custom-group-header"},Kl={class:"move-and-create"},Xl={class:"select-tip"},Ql={class:"select-count"},Jl={class:"create-group"},Zl={class:"custom-group-content"},ei=["onClick"],ti={class:"extra"},ni={class:"custom-group-list"},oi={class:"text"};function ai(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),_=e.resolveComponent("a-collapse-panel"),g=e.resolveComponent("a-collapse"),S=e.resolveComponent("a-modal"),L=e.resolveDirective("focus");return e.openBlock(),e.createBlock(S,{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",Yl,[e.createElementVNode("div",Kl,[e.createElementVNode("div",null,[e.createElementVNode("span",Xl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Ql,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":n[0]||(n[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,B)=>(e.openBlock(),e.createBlock(i,{key:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Jl,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":n[1]||(n[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":n[2]||(n[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Zl,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,B)=>(e.openBlock(),e.createBlock(_,{key:B},{header:e.withCtx(()=>[t.customGroupEditTitleList[B]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:m=>t.onTitleChange(m,B),onBlur:m=>t.onFinishEditTitle(B),onPressEnter:m=>t.onFinishEditTitle(B)},null,8,["value","onChange","onBlur","onPressEnter"])),[[L]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(m=>t.onEditTitle(B),["prevent","stop"])},e.toDisplayString(w.title),9,ei))]),extra:e.withCtx(()=>[e.createElementVNode("div",ti,[B===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),B!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(m=>t.onDeleteGroup(B),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(m,b)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:m.checked,"onUpdate:checked":x=>m.checked=x,class:"custom-group",key:b},{default:e.withCtx(()=>[e.createElementVNode("span",oi,e.toDisplayString(m.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ri=Z(ql,[["render",ai],["__scopeId","data-v-7e3049d2"]]);var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Tn={},ii={get exports(){return Tn},set exports(t){Tn=t}};(function(t,n){(function(o,a){t.exports=a()})(li,function(){var o="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,o):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(o).startOf("day"):this.month(3*h+2).endOf(o).endOf("day")}return s.bind(this)(c,p)}}})})(ii);const si=Tn;ie.extend(si);const ci=e.defineComponent({name:"Condition",components:{CloseOutlined:gn,DownOutlined:sl,AppstoreAddOutlined:ko,ASelect:j.Select,AInput:j.Input,ADatePicker:j.DatePicker,AButton:j.Button,ADropdown:j.Dropdown,AMenu:j.Menu,AMenuItem:j.MenuItem,ASubMenu:j.SubMenu,APopover:j.Popover,ATabs:j.Tabs,ATabPane:j.TabPane,ARadioGroup:j.RadioGroup,ARadio:j.Radio,AInputNumber:j.InputNumber,ASelectOption:j.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var qe,Ye,Ke,Ge,Xe,ct,dt,ge,Fe,Qe,Je;const n=(qe=window==null?void 0:window.config)==null?void 0:qe.pageId,o=e.inject(de),a=e.inject(Ae),r=e.unref(e.inject(Ne)),l=e.inject(Jn),i=e.inject(je),d=e.ref(!1),s=ie(),c=e.computed(()=>{var W;const z=[];return(W=e.unref(i))==null||W.forEach(Q=>{const{keyName:F="",id:D="",type:H}=Q;H==="ecanRangePicker"?z.push({value:`${D}-startTime`,label:`${F||D}-开始时间值`,keyName:`${F||D}-startTime`,id:D},{value:`${D}-endTime`,label:`${F||D}-结束时间值`,keyName:`${F||D}-endTime`,id:D}):z.push({value:D,label:`${F||D}`,keyName:`${F||D}`,id:D})}),z}),p=e.computed(()=>{var z;return(z=e.unref(o))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(o))==null?void 0:z.source}),f=e.ref(!1),h={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},_=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],g=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),S=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:""}]),L=[{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"}],w=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],B=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(Ye=t.data)==null?void 0:Ye.fieldName,fieldType:(Ke=t.data)==null?void 0:Ke.fieldType,rule:(Ge=t.data)==null?void 0:Ge.rule,id:(Xe=t.data)==null?void 0:Xe.id,fieldValue:b(),label:(ct=t.data)==null?void 0:ct.label,targetSource:"",typeGuid:(dt=t.data)==null?void 0:dt.typeGuid,indexCode:(ge=t.data)==null?void 0:ge.indexCode,dataType:((Fe=t.data)==null?void 0:Fe.dataType)||"",componentId:((Qe=t.data)==null?void 0:Qe.componentId)||"",useCurrentTime:!!((Je=t.data)!=null&&Je.useCurrentTime)});function b(){const{fieldType:z="",dataType:W="",fieldValue:Q=""}=t.data;if(z==="DATE"&&W==="time")return Q&&ie(Q);if(W==="component"){const F=e.unref(c).find(D=>D.keyName===Q);return F?F.value:Q}else return Q}const x=e.ref(!1),O=e.computed(()=>m.value.fieldType==="DATE"),V=e.computed(()=>{const z=t.type;let W=[];const Q=["classificationList","seriesList","rowHeaderList","dimensionList"];if(Q.includes(z)){let F=[];for(const D in e.unref(o))if(Object.prototype.hasOwnProperty.call(e.unref(o),D)&&!["controlList","sqlConditions"].includes(D)){const H=e.unref(o)[D];Array.isArray(H)&&(Q.includes(D)?F=F.concat(H.filter(K=>K.show)):F=F.concat(H))}W=F}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(z)&&(W=e.unref(l));return W.map(F=>({...F,label:F.title||F.label,value:F.name}))}),{updateCondition:T,deleteCondition:M}=e.inject(Qn,{updateCondition:(z,W,Q)=>{},deleteCondition:(z,W)=>{}}),I=()=>{M(t.level,t.index)};e.watch(m,z=>{const W=te.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(W.fieldValue=z.fieldValue.format(z.dateFormat)),T(W,t.level,t.index)},{deep:!0}),e.watch(d,z=>{m.value.fieldValue="",m.value.useCurrentTime=z});const R=z=>{const W=e.unref(V).find(re=>re.value===z)||{},{name:Q,genericType:F,id:D,label:H,typeGuid:K,indexCode:oe}=W;m.value={id:D,fieldName:Q,fieldType:F,label:H,rule:"",fieldValue:F==="DATE"?null:void 0,targetSource:"",typeGuid:K,indexCode:oe,dataType:"",useCurrentTime:!1}},y=z=>{const W=e.unref(c).find(Q=>Q.value===z)||{};e.unref(m).componentId=W.id||""},k=e.computed(()=>{const z=e.unref(m).fieldType;return z==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),A=e.computed(()=>{let z="";const W=e.unref(k).find(Q=>Q.value===e.unref(m).rule);return W&&(z=W.label),z}),$=e.computed(()=>{let z={fontSize:"12px"};return e.unref(A)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),v=e.ref([]),G=async()=>{var z;if(!(e.unref(v).length>0))try{const W=await a.post(`${Ce}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:Q,data:F=[]}=W.data;Q&&(v.value=(z=F==null?void 0:F.slice(0,200))==null?void 0:z.map(D=>({label:D,value:D})))}catch(W){console.error(W)}},C=z=>{e.unref(m).rule=z,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&G()},N=z=>{e.unref(m).dataType=z,e.unref(m).fieldValue=""},E=e.ref(),U=z=>{E.value=z,e.unref(m).fieldValue=(z==null?void 0:z.join(","))||""},P=z=>{const{keyPath:W}=z;e.unref(m).rule=W[0],e.unref(m).dataType=W[1],e.unref(m).dateFormat=W[2],e.unref(m).fieldValue=""};e.onMounted(()=>{var F,D,H,K,oe,re,ne;if(m.value.dataType=((F=t.data)==null?void 0:F.dataType)||"",m.value.componentId=((D=t.data)==null?void 0:D.componentId)||"",e.unref(m).fieldType==="DATE"){const{activeKey:be,dateCalcTypes:$e=[]}=t.data||{};if(e.unref(m).dateFormat=(H=t.data)==null?void 0:H.dateFormat,e.unref(m).activeKey=be,e.unref(m).calcWays=((K=t.data)==null?void 0:K.calcWays)||[],e.unref(m).dateCalcTypes=$e,e.unref(m).useCurrentTime&&e.unref(m).dataType!=="component"&&(d.value=!0),be===5){const ee=e.unref(m).calcWays[0];if(ee){const le=ee.split("-");e.unref(g).expression=le[0],e.unref(g).around=le[1]}e.unref(g).unit=$e[0]||"YEAR"}else{e.unref(m).radioValue=((oe=t.data)==null?void 0:oe.radioValue)||"";const ee=e.unref(S).find(le=>{var pt;return le.key===((pt=t.data)==null?void 0:pt.activeKey)});ee&&ce(ee,t.data)}}else E.value=((ne=(re=t.data)==null?void 0:re.fieldValue)==null?void 0:ne.split(","))||[];const{fieldType:z,fieldName:W,rule:Q}=m.value;z!=="DATE"&&W&&Q&&["IN","NOT_IN"].includes(Q)&&G()});const q=z=>{if(e.unref(m).activeKey===z){e.unref(S)[z].radioValue=e.unref(m).radioValue,e.unref(S)[e.unref(m).activeKey]&&(e.unref(S)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(S)[z].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(S)[z].afterNum=e.unref(m).calcWays[0]));return}e.unref(S).forEach(W=>{W.beforeNum=0,W.afterNum=0,W.radioValue="1",W.value=""})},X=(z,W)=>{f.value=!0;const Q=z.target.value,F=W.type,D=e.unref(m).dateFormat,H=Math.abs(W.beforeNum),K=W.afterNum;W.value=Be(Q,F,D,H,K)},Y=z=>{const W=e.unref(m).activeKey;if(z!==W)return;let Q="";W===0?Q="years":W===1?Q="quarters":W===2?Q="months":W===3?Q="weeks":W===4&&(Q="days");const F=e.unref(m).dateFormat,D=e.unref(m).radioValue;let H=0,K=0;return D==="1"?H=Math.abs(e.unref(m).calcWays[0]):D==="2"&&(K=e.unref(m).calcWays[0]),Be(D,Q,F,H,K)},J=(z,W,Q,F)=>{if(f.value=!0,W.radioValue===F){const D=z.target.value;Q==="+"?W.value=ie().add(D,W.type).format(e.unref(m).dateFormat):W.value=ie().subtract(D,W.type).format(e.unref(m).dateFormat)}},ae=(z,W)=>{e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=W,e.unref(m).radioValue=z.radioValue,z.radioValue==="1"?e.unref(m).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(m).calcWays[0]=z.afterNum:z.radioValue==="3"?W===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),W===0?e.unref(m).dateCalcTypes=["YEAR"]:W===1?e.unref(m).dateCalcTypes=["QUARTER"]:W===2?e.unref(m).dateCalcTypes=["MONTH"]:W===3?e.unref(m).dateCalcTypes=["WEEK"]:W===4&&(e.unref(m).dateCalcTypes=["DAY"]),x.value=!1},se=()=>{e.unref(m).activeKey=5,e.unref(m).dateCalcTypes=[e.unref(g).unit],e.unref(m).calcWays[0]=`${e.unref(g).expression}-${e.unref(g).around}`,x.value=!1};function ce(z,W){const{radioValue:Q="",calcWays:F=[]}=W;z.radioValue=Q,F!=null&&F.length&&(Q==="1"?z.beforeNum=Math.abs(F[0]):Q==="2"&&(z.afterNum=F[0]))}function Be(z,W,Q,F,D){if(z==="1")return ie().subtract(F,W).format(Q);if(z==="2")return ie().add(D,W).format(Q);if(z==="3"){if(W==="years")return ie().startOf("year").format(Q);if(W==="quarters")return ie().startOf("quarter").format(Q);if(W==="months")return ie().startOf("month").format(Q);if(W==="days")return ie().format(Q)}else if(z==="4"){if(W==="years")return ie().endOf("year").format(Q);if(W==="quarters")return ie().endOf("quarter").format(Q);if(W==="months")return ie().endOf("month").format(Q)}return""}return{fieldOptions:V,ruleOptions:k,onFieldChange:R,condition:m,valueOptions:v,onRuleChange:C,onDataTypeChange:N,onFieldValueSelectChange:U,fieldValues:E,onDelete:I,isDateType:O,formatList:_,tabDateList:S,compareList:L,menuRule:w,dateBtnLabel:A,downIconStyle:$,popoverVisible:x,dateRadioStyle:h,showTime:f,controlList:c,dataTypeList:B,customTabData:g,isUseCurrentTime:d,currentTime:s,handleMenuClick:P,changeTabInitDate:q,changeRadioValue:X,getFieldValue:Y,blurCompare:J,okDatePickConfig:ae,onChangeComponent:y,filterOption:(z,W)=>W.label.toLowerCase().indexOf(z.toLowerCase())>=0,okCustomConfig:se}}}),xu="",ku="",di={class:"condition"},pi=["title"],ui={class:"rule"},fi={class:"data-type"},mi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},hi={class:"popover-content-wrap"},yi={key:0,class:"use-current-time"},gi={class:"tabFilterRadio"},bi={key:0},Ci={key:1},wi={style:{"margin-left":"10px"}},xi={style:{"margin-left":"10px"}},ki={style:{position:"absolute",bottom:"10px"}},_i={style:{display:"flex"}},Si={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Ai(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),_=e.resolveComponent("a-date-picker"),g=e.resolveComponent("a-checkbox"),S=e.resolveComponent("a-input-number"),L=e.resolveComponent("a-radio"),w=e.resolveComponent("a-radio-group"),B=e.resolveComponent("a-tab-pane"),m=e.resolveComponent("a-tabs"),b=e.resolveComponent("appstore-add-outlined"),x=e.resolveComponent("a-popover"),O=e.resolveComponent("a-input"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",di,[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,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:T.label},e.toDisplayString(T.label),9,pi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",ui,[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,T=>(e.openBlock(),e.createBlock(c,{key:T.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,M=>{var I;return e.openBlock(),e.createBlock(c,{key:M.value,disabled:M.value==="component"&&!((I=t.controlList)!=null&&I.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value?"color: #1890FF;":"")},e.toDisplayString(M.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,R=>(e.openBlock(),e.createBlock(s,{key:R.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value&&t.condition.dateFormat===R.value?"color: #1890FF;":"")},e.toDisplayString(R.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",fi,[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,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",mi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(_,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(_,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[0]||(n[0]=T=>t.condition.fieldValue=T),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":n[1]||(n[1]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(x,{visible:t.popoverVisible,"onUpdate:visible":n[9]||(n[9]=T=>t.popoverVisible=T),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",hi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",yi,[e.createVNode(g,{checked:t.isUseCurrentTime,"onUpdate:checked":n[2]||(n[2]=T=>t.isUseCurrentTime=T)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(m,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(T,M)=>(e.openBlock(),e.createBlock(B,{key:M,tab:T.label},{default:e.withCtx(()=>[e.createElementVNode("div",gi,[e.createVNode(w,{value:T.radioValue,"onUpdate:value":I=>T.radioValue=I,onChange:I=>t.changeRadioValue(I,T)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",bi,"相对当前时间:"+e.toDisplayString(T.value),1)):(e.openBlock(),e.createElementBlock("div",Ci,"相对当前时间:"+e.toDisplayString(t.getFieldValue(M)),1)),e.createVNode(L,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(S,{value:T.beforeNum,"onUpdate:value":I=>T.beforeNum=I,min:0,onBlur:I=>t.blurCompare(I,T,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",wi,e.toDisplayString(T.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(L,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(S,{value:T.afterNum,"onUpdate:value":I=>T.afterNum=I,min:0,onBlur:I=>t.blurCompare(I,T,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",xi,e.toDisplayString(T.afterLabel),1)]),_:2},1032,["style"]),T.beforeText?(e.openBlock(),e.createBlock(L,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),T.afterText?(e.openBlock(),e.createBlock(L,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ki,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:n[3]||(n[3]=I=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:I=>t.okDatePickConfig(T,M)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(B,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",_i,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":n[4]||(n[4]=T=>t.customTabData.expression=T),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":n[5]||(n[5]=T=>t.customTabData.unit=T),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":n[6]||(n[6]=T=>t.customTabData.around=T)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Si,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:n[7]||(n[7]=T=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:n[8]||(n[8]=T=>{t.popoverVisible=!0})},[e.createVNode(b)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":n[10]||(n[10]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(O,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":n[11]||(n[11]=T=>t.condition.fieldValue=T)},null,8,["value"])),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Ni=Z(ci,[["render",Ai],["__scopeId","data-v-03de125e"]]),Ti=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Ni}}),_u="",Li={key:0,class:"condition-list"},Ei={key:0,class:"condition-container"},Bi={key:0,class:"condition-text"},Oi={key:1,class:"condition-text"},Vi={class:"conditions"};function Ii(t,n,o,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Ei,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Bi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Oi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Vi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Fi=Z(Ti,[["render",Ii],["__scopeId","data-v-86c0c5aa"]]),$i=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:j.Select,AInput:j.Input,AInputNumber:j.InputNumber},setup(t,{emit:n}){const o=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&n("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=te.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:o,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Su="",Do=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Di={class:"truncations"},vi={class:"rule"},Pi={class:"field-value"},Mi={class:"field-value"},ji=Do(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ri=Do(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ui=["onClick"];function Gi(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Di,[(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",vi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Pi,[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",Mi,[ji,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ri]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ui)]))),128))])}const zi=Z($i,[["render",Gi],["__scopeId","data-v-f543c690"]]),Ee=(t,n)=>{if(typeof t=="string"&&typeof n=="string")return t.toLocaleLowerCase().includes(n.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(n)){const o=n.length;for(let a=0;a<o;a++){const r=n[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},Hi=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),Ln=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),Ft=t=>{const n=[];if(t!=null&&t.length)for(const o of t)o.conditions?n.push(...Ft(o.conditions)):(o==null?void 0:o.dataType)==="component"&&n.push(o);return n},vo=(t,n)=>{var S;const{controlList:o=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,u=[],f=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const L of f){const w=Ft((L==null?void 0:L.conditions)||[]);if(w!=null&&w.length){const B=w.filter(m=>Po(m,n)?(m==null?void 0:m.dataType)==="component":!1).map(m=>{const b=Po(m,n),x={};return m!=null&&m.dateFormat&&(x.format=m.dateFormat),{conditionKey:m.fieldName,conditionLabel:m.fieldName,conditionName:m.fieldName,conditionValueType:m.fieldType,id:b.id,keyName:m.fieldValue,rule:m.rule,notGlobal:!0,indexCode:m.indexCode,typeGuid:m.typeGuid,...x}});if(B!=null&&B.length)for(const m of B)h.find(b=>b.keyName===m.keyName)||h.push(m)}}const _=o.concat(h),g=_.length;for(let L=0;L<g;L++){const w=_[L];if(w&&!((S=Object.keys(w))!=null&&S.length)||(w==null?void 0:w.conditionKey)==="parentCode")continue;const{id:B,keyName:m,conditionLabel:b,conditionKey:x,conditionValueType:O,prop:V,rule:T="NONE",notGlobal:M=!1,format:I,indexCode:R,typeGuid:y}=w;let k=m||B;k&&V&&(k+=`-${V}`);const A=n.find(P=>P.id===B),$={rule:T,label:b,fieldName:x,fieldValue:"",valueType:O,alias:k,globalCondition:!M,indexCode:R,typeGuid:y},{value:v,format:G="YYYY-MM-DD",operate:C,type:N="",useCurrentTime:E}=A||{},U=I||G;if(Ee(N,"date")){let P;if(E?P=ie():P=ie(v),C&&v){const{mode:q,type:X,value:Y}=C;if(Y)switch(X){case"add":P=P.add(Y,q);break;case"minus":P=P.subtract(Y,q);break}}$.fieldValue=(P==null?void 0:P.format(U))||"",$.dateFormat=U}else if(N==="ecanRangePicker"){const{interval:P,intervalUnit:q}=A||{};let X=V;if(!V){const J=m==null?void 0:m.split("-");J!=null&&J.length&&(X=J[J.length-1])}if(!X)return;let Y=null;if(E&&(X==="startTime"?Y=ie().subtract(P,q):X==="endTime"&&(Y=ie())),A[X]&&(Y=ie(A[X])),C){const{type:J,value:ae,mode:se}=C;switch(J){case"add":Y=Y&&Y.add(ae,se);break;case"minus":Y=Y&&Y.subtract(ae,se)}}Y&&($.fieldValue=Y==null?void 0:Y.format(U)),$.dateFormat=U}else{const P=v&&v.match(/\{(.+?)\}/g);P!=null&&P.length?$.fieldValue="":$.fieldValue=v}u.push($)}for(let L=u.length-1;L>=0;L--){const w=u[L];w.globalCondition||u.find(m=>m.alias===w.alias&&m.globalCondition)&&u.splice(L,1)}return u},$t=t=>{let n="";switch(t){case"ecanDatePicker":case"ecanRangePicker":n="dateChange";break;case"ecanTimeDisplay":n="timeChange";break;case"ecanSelect":case"ecanTreeSelect":n="selectChange";break;case"ecanTabs":n="tabChange";break;case"ecanInput":n="inputChange";break;case"ecanCheckbox":case"ecanRadio":n="checkboxChange";break;case"ecanText":n="valueChange";break;case"ecanImage":n="click";break}return n};function Po(t,n){var o;if(t.componentId)return n.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(o=t.fieldValue)==null?void 0:o.split("-");return a!=null&&a.length?a[0]:null}else return n.find(a=>a.keyName===t.fieldValue);else return null}let En=(t=21)=>{let n="",o=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=o[t]&63;a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a<63?n+="_":n+="-"}return n};const Wi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Fi,TruncationList:zi,AModal:j.Modal,AButton:j.Button,ATabs:j.Tabs,ATabPane:j.TabPane},setup(t,{expose:n}){var R;const o=e.ref("1"),a=()=>{var y;return`添加过滤条件-${((y=t.item)==null?void 0:y.label)||""}`},r=e.inject(de),l=e.inject(Te),i=e.inject(je),d=e.computed(()=>{var y;return(y=e.unref(r))==null?void 0:y.dataSourceId}),s=e.inject(De),c=e.inject(Et),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,y=>{var k,A,$,v;y&&(Array.isArray((k=t.item)==null?void 0:k.conditions)&&(p.value=te.cloneDeep((A=t.item)==null?void 0:A.conditions)||[]),Array.isArray(($=t.item)==null?void 0:$.truncations)?u.value=te.cloneDeep((v=t.item)==null?void 0:v.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"});let h=!1;const _=y=>{var k;h=!0,e.unref(p)==null||((k=e.unref(p))==null?void 0:k.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==y?p.value=[{join:y,conditions:[e.unref(p)[0],{keyValue:En()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===y&&p.value[0].conditions.push({keyValue:En()}))};e.provide(Qn,{updateCondition(y,k,A){var v;h=!0;let $=e.unref(p);for(let G=0;G<k&&$[0];G++)$=(v=$[0])==null?void 0:v.conditions;Array.isArray($)&&$[A]&&($[A]=y)},deleteCondition(y,k){var $,v;h=!0;let A=e.unref(p);for(let G=0;G<y&&A[0];G++)A=($=A[0])==null?void 0:$.conditions;if(Array.isArray(A)&&A[k]&&(A.splice(k,1),A.length===1)){let G=e.unref(p);const C=y-2>0?y-2:0;for(let N=0;N<C&&G[0];N++)G=(v=G[0])==null?void 0:v.conditions;G[0].join===A[0].join?G[0].conditions=[...A[0].conditions,...G[0].conditions.slice(1)]:G[0]=A[0]}}});const g=y=>{h=!0,u.value=y},S=e.computed(()=>{var k;const y=[];return(k=e.unref(i))==null||k.forEach(A=>{const{keyName:$="",id:v="",type:G}=A;G==="ecanRangePicker"?y.push({value:`${v}-startTime`,label:`${$||v}-开始时间值`,keyName:`${$||v}-startTime`},{value:`${v}-endTime`,label:`${$||v}-结束时间值`,keyName:`${$||v}-endTime`}):y.push({value:v,label:`${$||v}`,keyName:`${$||v}`})}),y}),L=()=>{var C,N;const{controlList:y=[]}=e.unref(r),k=((C=e.unref(r)[t.type])==null?void 0:C.slice())||[],A=Ft(te.cloneDeep(k[t.index].conditions));k[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((N=e.unref(u))!=null&&N.length)&&(k[t.index].truncations=e.unref(u));const $=Ft(e.unref(p));for(const E of $)if(E.dataType==="component"&&E.fieldValue){const U=e.unref(S).find(P=>P.value===E.fieldValue);U&&(E.fieldValue=U.keyName)}const v=A.filter(E=>!$.find(U=>U.componentId===E.componentId)).filter(E=>!y.find(U=>U.id===E.componentId)),G=$.filter(E=>!A.find(U=>U.componentId===E.componentId));w(v,G),l({[t.type]:k,sqlConditions:vo({...e.unref(r),[t.type]:k},e.unref(i))})};function w(y,k){var $;const A=y.map(v=>({...v,delete:!0})).concat(k.map(v=>({...v,add:!0})));for(const v of A){const G=e.unref(i).find(C=>C.id===v.componentId);if(G){const{type:C,id:N,events:E=[]}=G,U=$t(C);if(v.add)E.find(P=>{var q;return P.on===U&&P.target===((q=e.unref(s))==null?void 0:q.id)&&P.emit==="refreshData"})||c({id:N,events:[...E,{on:U,target:($=e.unref(s))==null?void 0:$.id,emit:"refreshData"}].reverse()});else if(v.delete){const P=E.findIndex(q=>{var X;return q.on===U&&q.target===((X=e.unref(s))==null?void 0:X.id)&&q.emit==="refreshData"});P!==-1&&(E.splice(P,1),c({id:N,events:E}))}}}}const B=()=>{f.value=!0},m=()=>{p.value=[],f.value=!1},b=()=>{h&&L(),h=!1,m()},x=()=>{m()},O=e.inject(Ae),V=e.unref(e.inject(Ne)),T=(R=window==null?void 0:window.config)==null?void 0:R.pageId,M=e.ref([]);e.provide(Jn,M);const I=async y=>{var k;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:A,indexCode:$}=y,v=await O.post(`${Ce}/diagram/hrpIndexWithComplex`,{pageId:T,dataSourceId:e.unref(d),indexGuid:A,indexCode:$},{headers:{Authentication:V,operateContext:"ygt"}}),{success:G,data:C=[]}=v.data;G&&((k=C==null?void 0:C.dataViewColumns)!=null&&k.length)&&(M.value=C.dataViewColumns)}catch(A){console.error(A)}};return e.watch(()=>t.item,y=>{y&&f.value&&I(y)}),n({showModal:B}),{visible:f,onOk:b,onCancel:x,handleTitle:a,conditionList:p,truncationList:u,addCondition:_,onUpdatetruncation:g,activeKey:o}}}),Au="",qi={class:"header"},Yi={class:"header"};function Ki(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":n[3]||(n[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",qi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[0]||(n[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[1]||(n[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[2]||(n[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Yi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:n[4]||(n[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:n[5]||(n[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:n[6]||(n[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const Xi=Z(Wi,[["render",Ki],["__scopeId","data-v-552c795f"]]),Qi=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:j.Input,AModal:j.Modal},setup(t,{expose:n}){const o=e.ref(!1),a=e.inject(de),r=e.inject(Te),l=e.ref(),i=p=>{const{showLabel:u="",label:f=""}=p;l.value=u||f||"",o.value=!0},d=()=>{o.value=!1},s=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return n({showModal:i}),{visible:o,onOk:s,onCancel:c,fieldName:l}}}),Nu="",Ji=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Zi={class:"config-name"},es=Ji(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function ts(t,n,o,a,r,l){const i=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",Zi,[es,e.createVNode(i,{value:t.fieldName,"onUpdate:value":n[0]||(n[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const ns=Z(Qi,[["render",ts],["__scopeId","data-v-de6a1755"]]),os=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:j.Select,AModal:j.Modal},setup(t,{expose:n}){const o=e.ref(!1),a=e.inject(de),r=e.inject(Te),l=e.inject(je),i=e.inject(De),d=e.inject(Et),s=e.ref(),c=e.computed(()=>{var L;return(L=e.unref(l))==null?void 0:L.filter(w=>w.keyName!=="")});let p=[];const u=L=>{const{sortCpnts:w=[]}=L;p=te.cloneDeep(w),s.value=te.cloneDeep(w),o.value=!0},f=()=>{o.value=!1},h=()=>{var b;const{controlList:L=[]}=e.unref(a),w=p.filter(x=>!e.unref(s).includes(x)).filter(x=>!L.find(O=>O.id===x)),B=e.unref(s).filter(x=>!p.includes(x)).filter(x=>!L.find(O=>O.id===x)),m=w.map(x=>({componentId:x,delete:!0})).concat(B.map(x=>({componentId:x,add:!0})));for(const x of m){const O=e.unref(l).find(V=>V.id===x.componentId);if(O){const{type:V,id:T,events:M=[]}=O,I=$t(V);if(x.add)M.find(R=>{var y;return R.on===I&&R.target===((y=e.unref(i))==null?void 0:y.id)&&R.emit==="refreshData"})||d({id:T,events:[...M,{on:I,target:(b=e.unref(i))==null?void 0:b.id,emit:"refreshData"}].reverse()});else if(x.delete){const R=M.findIndex(y=>{var k;return y.on===I&&y.target===((k=e.unref(i))==null?void 0:k.id)&&y.emit==="refreshData"});R!==-1&&(M.splice(R,1),d({id:T,events:M}))}}}},_=()=>{var w;h();const L=((w=e.unref(a)[t.type])==null?void 0:w.slice())||[];L[t.index].sortCpnts=s.value,r({[t.type]:L}),f()},g=()=>{f()},S=(L,w)=>{var B;return(B=w==null?void 0:w.keyName)==null?void 0:B.toLowerCase().includes(L==null?void 0:L.toLowerCase())};return n({showModal:u}),{visible:o,onOk:_,onCancel:g,idFilterOption:S,fieldName:s,usedComponentList:c}}}),Tu="",as=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),rs={class:"sort-by-cpnt"},ls=as(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function is(t,n,o,a,r,l){const i=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",rs,[ls,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":n[0]||(n[0]=s=>t.fieldName=s),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 ss=Z(os,[["render",is],["__scopeId","data-v-2943f455"]]),Bn=(t,n)=>{let o;for(let a=0;a<n.length;a++){const r=n[a];r.children&&(r.children.some(l=>l.key===t)?o=r.key:Bn(t,r.children)&&(o=Bn(t,r.children)))}return o},cs=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})}},components:{ARow:j.Row,ACol:j.Col,ATextarea:j.Textarea,APopover:j.Popover,AInputSearch:j.InputSearch,ATree:j.Tree,DoubleRightOutlined:al},emits:["update:value","change"],setup(t,{emit:n}){const o=e.inject(Ae),a=e.unref(e.inject(Ne)),r=e.inject(de),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{const x=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return(x==null?void 0:x.filter(O=>O.id!==t.item.id))||[]}),p=e.computed({get:()=>t.value||"",set:x=>{n("update:value",x),n("change",x)}}),u=e.ref(""),f=x=>{const O=document.getElementById("calTextArea");let V=p.value;if(document.selection){const T=document.selection.createRange();T.text=x}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const T=O.selectionStart,M=O.selectionEnd;let I=T;V=V.substring(0,T)+x+V.substring(M,V.length),I+=x.length,O.selectionStart=O.selectionEnd=I}else V+=x;p.value=V},h=["+","-","*","/","(",")"],_=(x,O)=>{let V="";switch(O){case"name":{V="${"+x+"}";break}case"function":{V=x+"()";break}default:V=x}f(V)},g=[],S=e.ref([]),L=e.ref(!0),w=e.ref([]),B=x=>{var O;for(const V of x)(O=V==null?void 0:V.children)!=null&&O.length?B(V.children):g.push({key:V.key,title:V.title})},m=async()=>{try{const x=await o.get(`${Ce}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:V=[]}=x.data;O&&(V!=null&&V.length)&&(B(V),w.value=V)}catch(x){console.error(x)}},b=x=>{S.value=x,L.value=!1};return e.watch(u,x=>{const O=g.map(V=>V.title.indexOf(x)>-1?Bn(V.key,w.value):null).filter((V,T,M)=>V&&M.indexOf(V)===T);S.value=O,u.value=x,L.value=!0}),e.onMounted(()=>{m()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:w,searchFuncValue:u,expandedKeys:S,autoExpandParent:L,selectedElem:_,onExpand:b}}}),Lu="",Eu="",ds={class:"formula-calculation"},ps={class:"field-area"},us=["onClick"],fs={class:"cal_right_bottom"},ms={class:"cal_fu"},hs=["onClick"],ys={class:"function-wrap"},gs={class:"wrap-search"},bs={class:"tree-box"},Cs={key:0},ws={style:{color:"#f50"}},xs={key:1},ks=["onClick"],_s={class:"cal_a"};function Ss(t,n,o,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",ds,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ps,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,_)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:_,onClick:g=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,us))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":n[0]||(n[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",fs,[e.createElementVNode("ul",ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,_)=>(e.openBlock(),e.createElementBlock("li",{onClick:g=>t.selectedElem(h,"symbol"),key:_},e.toDisplayString(h),9,hs))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ys,[e.createElementVNode("div",gs,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":n[1]||(n[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",bs,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:_})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Cs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",ws,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",xs,e.toDisplayString(h),1)),_?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:g=>t.selectedElem(h,"function")},"插入",8,ks)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",_s,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const As=Z(cs,[["render",Ss],["__scopeId","data-v-1e6dd439"]]),Ns=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:As,AForm:j.Form,AModal:j.Modal,AFormItem:j.FormItem,AInput:j.Input,ASelect:j.Select,ASelectOption:j.SelectOption,ATextarea:j.Textarea},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:n}){const o=e.inject(je),a=e.inject(de),r=e.inject(Te),l=e.computed(()=>e.unref(o)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const I=["leftAxisList","rightAxisList","queryColumnList","indicators"];let R=[];for(const y of I)Object.prototype.hasOwnProperty.call(e.unref(a),y)&&(R=R.concat(e.unref(a)[y]));return R}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u=e.ref(),f=e.ref(!1),h=e.ref();e.watch(f,I=>{if(I)if(t.mode==="edit"){const{label:R,calcType:y,formula:k,builtInValueSource:A,builtInFormula:$,builtInCalcWay:v}=t.item;h.value={label:R,calcType:y,formula:k,builtInValueSource:A,builtInFormula:$,builtInCalcWay:v}}else t.mode==="add"&&(h.value=te.cloneDeep(p));else h.value=te.cloneDeep(p);window.changeShowTable&&window.changeShowTable(!I)},{immediate:!0,deep:!0});let _=!1;const g=()=>{_=!0},S=I=>{const R=e.unref(l).find(y=>y.id===I);R&&(h.value.builtInCalcWay=R.keyName),_=!0},L=()=>{var y;const I=((y=e.unref(a)[t.type])==null?void 0:y.slice())||[],{label:R}=e.unref(h)||{};if(t.mode==="add"){const k=En();I.push({...e.unref(h),id:k,show:!0,name:R})}else t.mode==="edit"&&(I[t.index]={...I[t.index],...e.unref(h),name:R});r({[t.type]:I})},w=()=>{f.value=!0},B=()=>{f.value=!1},m=async(I,R)=>{if(R==="")return Promise.reject(new Error("请输入指标名"));{const y=e.unref(d).find(k=>k.label===R);return y?y.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},b=e.computed(()=>{let I={label:[{required:!0,validator:m,trigger:"change"}]};return h.value.calcType==="BUILT_IN"&&(I={...I,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),I}),x=()=>{u.value.validate().then(()=>{_&&L(),_=!1,B()})},O=()=>{u.value.clearValidate(),B()},V=()=>{_=!0,e.unref(h).builtInCalcWay=""},T=e.computed(()=>{let I="";const R=e.unref(h).builtInCalcWay,y=e.unref(h).builtInValueSource;if(!y||!R)return I;switch(e.unref(h).builtInFormula){case"BUILT_IN_RANK":{R==="ASC"?I="【"+y+"】由小到大在所有值中的排名":I="【"+y+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{I=`所有【】的
|
|
60
|
+
`,R==="ASC"?I=I+"【"+y+"】由小到大的组内的排名":I=I+"【"+y+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let k="";switch(R){case"SUM":{k="求和";break}case"AVG":{k="求平均值";break}case"MIN":{k="求最小值";break}case"MAX":{k="求最大值";break}}I="将所有【"+y+"】"+k;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let k="";switch(I=`所有【】的
|
|
61
|
+
`,R){case"SUM":{k="求和";break}case"AVG":{k="求平均值";break}case"MIN":{k="求最小值";break}case"MAX":{k="求最大值";break}}I=I+"将所有【"+y+"】"+k;break}}return I}),M=(I,R)=>R.keyName.toLowerCase().indexOf(I.toLowerCase())>=0;return n({showModal:w}),{visible:f,onCancel:O,labelCol:s,wrapperCol:c,formState:h,builtInValueSourceList:i,onOK:x,onChange:g,formRules:b,accessLogic:T,formRef:u,onChangeBuiltInFormula:V,componentList:l,onChangeComponent:S,filterOption:M}}}),Bu="",Ts={key:0,class:"accesstip"};function Ls(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-form"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(h,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(f,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":n[0]||(n[0]=_=>t.formState.label=_),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":n[1]||(n[1]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":n[2]||(n[2]=_=>t.formState.formula=_),item:t.item,onChange:t.onChange},null,8,["value","item","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":n[3]||(n[3]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":n[4]||(n[4]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,g)=>(e.openBlock(),e.createBlock(s,{key:g,value:_.label,disabled:t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":n[5]||(n[5]=_=>t.formState.builtInCalcWay=_),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula!=="FIRST_ROW_RATE"?(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Ts," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":n[6]||(n[6]=_=>t.formState.builtInValueSource=_),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const Es=Z(Ns,[["render",Ls],["__scopeId","data-v-934b2c09"]]),Bs=e.defineComponent({name:"DataConfigCard",directives:{focus:$o},components:{CalculationModal:Es,FilterModal:Xi,CustomGroupModal:ri,SettingOutlined:Ll,DeleteOutlined:el,CopyOutlined:Xr,InfoCircleOutlined:ul,CustomSortModal:Wl,PlusOutlined:Sl,ACard:j.Card,ACheckbox:j.Checkbox,AInput:j.Input,ADropdown:j.Dropdown,AMenu:j.Menu,ASubMenu:j.SubMenu,AMenuItem:j.MenuItem,AMenuDivider:j.MenuDivider,ASelect:j.Select,APopover:j.Popover,Draggable:ut,ConfigName:ns,SortByCpnt:ss},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const n=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],o=e.inject(de),a=e.inject(Te),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(en),d=(F={})=>{var K;const{type:D}=t;if(e.unref(i)==="SQL_VIEW")return!0;let H=!1;if(F.scope==="IDX"?r.includes(D)&&(H=!0):["DIM","BUILT_IN_DIM"].includes(F.scope)&&l.includes(D)&&(H=!0),D==="dimensionList"){const oe=((K=e.unref(o)[D])==null?void 0:K.slice())||[];(oe==null?void 0:oe.length)===1&&(H=!1)}return H},s=(F="{}")=>{var D;try{const H=JSON.parse(F);if(!d(H))return;const K=((D=e.unref(o)[t.type])==null?void 0:D.slice())||[];["classificationList","seriesList"].includes(t.type)&&K.forEach(oe=>{oe.show=!1}),p(K,H),K.push(H),a({[t.type]:K}),sessionStorage.setItem("indicator-list-item","")}catch(H){console.error(H)}},c=(F="{}")=>{var D;try{const{cardItem:H,type:K,index:oe}=JSON.parse(F);if(!d(H)||K===t.type)return;const re=((D=e.unref(o)[t.type])==null?void 0:D.slice())||[];p(re,H),re.push(H);const ne=e.unref(o)[K].slice()||[];ne.splice(oe,1),a({[t.type]:re,[K]:ne})}catch(H){console.error(H)}};function p(F,D){const H=[];if(F.forEach(K=>{K.label.includes(D.label)&&H.push(K.label.split(D.label)[1])}),H.length>=1){for(let K=1;K<=H.length;K++)if(!H.includes(K+"")){D.label=D.label+K;break}}}const u=(F,D)=>{var oe,re;const H=(oe=F.target)==null?void 0:oe.checked,K=((re=e.unref(o)[t.type])==null?void 0:re.slice())||[];["classificationList","seriesList"].includes(t.type)&&K.forEach(ne=>{ne.show=!1}),K[D].show=H,a({[t.type]:K})},f=F=>{var H;const D=((H=e.unref(o)[t.type])==null?void 0:H.slice())||[];D.splice(F,1),a({[t.type]:D})},h=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const F=sessionStorage.getItem("indicator-list-item"),D=sessionStorage.getItem("indicator-card-item");F?s(F):D&&c(D)},g=F=>{var be,$e;const{newIndex:D,oldIndex:H,from:K,to:oe}=F,re=K.id,ne=oe.id;if(D>=0&&H>=0){if(re===ne){const ee=((be=e.unref(o)[t.type])==null?void 0:be.slice())||[],le=ee.splice(H,1)[0];le&&(ee.splice(D,0,le),a({[t.type]:ee}))}else if(t.type===ne){const ee=(($e=e.unref(o)[ne])==null?void 0:$e.slice())||[];if(ee!=null&&ee.length){const le=ee.splice(ee.length-1,1)[0];le&&(ee.splice(D,0,le),a({[t.type]:ee}))}}}},S=(F,D)=>{const H=F.oldIndex,K=D[H];K&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:K,type:t.type,index:H}))},L=e.computed(()=>e.unref(o)[t.type]||[]),w=e.ref([]);let B=!1;e.watch(()=>e.unref(L).length,F=>{w.value=new Array(F).fill(!1)},{flush:"post",immediate:!0});const m=F=>{var H;const D=((H=e.unref(o)[t.type])==null?void 0:H.slice())||[];D.splice(F,1),a({[t.type]:D})},b=F=>{w.value[F]=!0},x=()=>{B=!0},O=(F,D,H)=>{var K,oe;if(w.value[D]=!1,B){const re=(K=F.target)==null?void 0:K.value,ne=((oe=e.unref(o)[t.type])==null?void 0:oe.slice())||[],be=ne.filter(ee=>{var le;return(le=ee==null?void 0:ee.formula)==null?void 0:le.includes(H)}).map(ee=>ee.id),$e=ne.filter(ee=>{var le;return(le=ee==null?void 0:ee.builtInValueSource)==null?void 0:le.includes(H)}).map(ee=>ee.id);if(be!=null&&be.length)for(const ee of be){const le=ne.find(pt=>pt.id===ee);le.formula=le.formula.replaceAll(H,re)}if($e!=null&&$e.length)for(const ee of $e){const le=ne.find(pt=>pt.id===ee);le.builtInValueSource=le.builtInValueSource.replaceAll(H,re)}ne[D].label=re,a({[t.type]:ne})}B=!1},V="DEFAULT",T=e.computed(()=>{const F=e.unref(o)[t.type]||[],{leftAxisList:D=[],rightAxisList:H=[],indicators:K=[]}=e.unref(o)||{};return[{id:V,label:"默认",name:"默认"},...F,...D,...H,...K]}),M=(F={},D,H="ASC")=>{var be;const{label:K,name:oe,id:re}=F,ne=((be=e.unref(o)[t.type])==null?void 0:be.slice())||[];re===V?delete ne[D].sort:ne[D].sort={label:K,columnName:oe,type:"NORMAL",order:H},a({[t.type]:ne})},I=(F={},D="ASC")=>{const K={ASC:"升序",DESC:"降序"}[D],{sort:oe}=F,{label:re,order:ne}=oe||{};return re&&ne===D?`${K}(${re})`:K},R=e.ref(),y=e.ref(),k=e.ref(),A=e.ref(),$=(F={},D)=>{var H;R.value=F,y.value=D,(H=e.unref(k))==null||H.showModal()},v=F=>{var D;return"自定义排序"+(((D=F==null?void 0:F.sort)==null?void 0:D.type)==="CUSTOM"?"(已配置)":"")},G=(F={},D)=>{var H;R.value=F,y.value=D,(H=e.unref(A))==null||H.showModal()},C=F=>"自定义分组"+((F==null?void 0:F.customGroup)!=null?"(已配置)":""),N=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],E=(F,D)=>{var K;const H=((K=e.unref(o)[t.type])==null?void 0:K.slice())||[];H[D].aggregate=F,a({[t.type]:H})},U=(F,D)=>{var K;const H=((K=e.unref(o)[t.type])==null?void 0:K.slice())||[];H[D].dateFormat=F,a({[t.type]:H})},P=(F="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[F]})`,q=(F={})=>{var D;return"过滤"+(F!=null&&F.conditions&&((D=F==null?void 0:F.conditions)==null?void 0:D.length)>0?"(已配置)":"")},X=e.ref(),Y=e.ref(),J=e.ref(),ae=(F={},D)=>{R.value=F,y.value=D,e.unref(X).showModal()},se=(F={},D)=>{R.value=F,y.value=D,e.unref(Y).showModal(F)},ce=(F={},D)=>{R.value=F,y.value=D,e.unref(J).showModal(F)},Be=e.ref(),Tt=e.ref("add"),qe=(F,D,H)=>{var K;Tt.value=F,F==="edit"&&(R.value=D,y.value=H),(K=e.unref(Be))==null||K.showModal()},Ye=e.inject(Ae),Ke=e.unref(e.inject(Ne)),Ge=e.ref([]),Xe=e.computed(()=>e.unref(o)[t.type]||{}),ct=async()=>{try{const F=await Ye.post(`${Ce}/diagram/dimFields`,{},{headers:{Authentication:Ke,operateContext:"ygt"}}),{success:D,data:H=[]}=F.data;D&&(Ge.value=H)}catch(F){console.error(F)}},dt=(F,D)=>{const H=e.unref(o)[t.type]||{};H[D]=F,a({[t.type]:H})},ge=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],Fe=e.ref({}),Qe=async(F,D)=>{var K;const{name:H}=D;if(!ge.includes(t.type)&&F&&Ln(D,"indexCode")){const oe=await Ye.post(`${Ce}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:D.id,indexCode:D.indexCode,pageId:(K=window==null?void 0:window.config)==null?void 0:K.pageId},{headers:{Authentication:Ke,operateContext:"ygt"}}),{success:re,data:ne}=oe.data;re&&ne&&(Fe.value[H]={name:ne.name,code:ne.indexCode})}},Je=F=>{const D=document.createElement("input");document.body.appendChild(D),D.setAttribute("value",F),D.select(),document.execCommand("copy"),document.body.removeChild(D),j.message.success("复制成功")},z=e.inject(De),W=e.computed(()=>t.type==="indicators"&&e.unref(z).type==="ecanTable"),Q=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&ct()}),{onCheckboxChange:u,onDropEnd:f,onDragItemEnd:h,onDragItemAdd:_,onDragItemSort:g,onDragItemStart:S,cardItemList:L,onDelete:m,onEdit:b,onCommitLabelChange:O,sortList:T,onSort:M,handleSortTitle:I,showCustomSortModal:$,customSortModalRef:k,currentItem:R,currentIndex:y,handleCustomSortTitle:v,handleCustomGroupTitle:C,customGroupModalRef:A,showCustomGroupModal:G,editLabelList:w,onLabelChange:x,aggregateList:N,onAggregateChange:E,onDateFormatChange:U,handleAggregateTitle:P,onShowCalculationModal:qe,handleFilterTitle:q,filterModalRef:X,configNameRef:Y,sortByCpntRef:J,showFilterModal:ae,calculationModalRef:Be,calculationModalMode:Tt,formatList:n,fieldOptions:Ge,fieldData:Xe,onFieldChange:dt,onVisibleChange:Qe,copyDataViewName:Je,dataViewMap:Fe,isShowConfigName:W,showConfigNameModal:se,dimensionType:ge,isShowSortByCpnt:Q,showSortByCpntModal:ce}}}),Ou="",Vu="",tt=t=>(e.pushScopeId("data-v-d8ce3fb3"),t=t(),e.popScopeId(),t),Os={class:"title"},Vs={class:"title-text"},Is={class:"field-wrap"},Fs={class:"field-item"},$s=tt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ds={class:"field-item"},vs=tt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Ps={class:"title"},Ms={class:"title-text"},js=tt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Rs=tt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Us={class:"card-item-wrap"},Gs={class:"card-item-inner"},zs=["onClick"],Hs=["onClick"],Ws=["onClick"],qs={style:{display:"flex","align-items":"center"}},Ys=["title"],Ks=tt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Xs={style:{display:"flex","align-items":"center"}},Qs=["title"],Js=tt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Zs(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),f=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),_=e.resolveComponent("a-sub-menu"),g=e.resolveComponent("a-menu-divider"),S=e.resolveComponent("copy-outlined"),L=e.resolveComponent("a-menu"),w=e.resolveComponent("a-dropdown"),B=e.resolveComponent("delete-outlined"),m=e.resolveComponent("a-checkbox"),b=e.resolveComponent("draggable"),x=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),V=e.resolveComponent("filter-modal"),T=e.resolveComponent("config-name"),M=e.resolveComponent("sort-by-cpnt"),I=e.resolveComponent("calculation-modal"),R=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Os,[e.createElementVNode("div",Vs,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Is,[e.createElementVNode("div",Fs,[$s,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:n[0]||(n[0]=y=>t.onFieldChange(y,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ds,[vs,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:n[1]||(n[1]=y=>t.onFieldChange(y,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createElementVNode("div",Ms,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[js]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:n[2]||(n[2]=e.withModifiers(y=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Rs]))])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(b,{modelValue:t.cardItemList,"onUpdate:modelValue":n[3]||(n[3]=y=>t.cardItemList=y),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:n[4]||(n[4]=y=>t.onDragItemStart(y,t.cardItemList))},{item:e.withCtx(({element:y,index:k})=>[e.createElementVNode("div",Us,[e.createVNode(m,{class:"card-item",checked:y.show,onChange:A=>t.onCheckboxChange(A,k)},{default:e.withCtx(()=>[e.createElementVNode("div",Gs,[!t.editLabelList[k]&&y.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(A=>t.onEdit(k),["prevent","stop"])},e.toDisplayString(y.label),9,zs)):e.createCommentVNode("",!0),!t.editLabelList[k]&&!y.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(A=>t.onEdit(k),["prevent","stop"])}," 请点击填入名字 ",8,Hs)):e.createCommentVNode("",!0),t.editLabelList[k]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":y.label,size:"small",onBlur:A=>t.onCommitLabelChange(A,k,y.label),onPressEnter:A=>t.onCommitLabelChange(A,k,y.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[R]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(y.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(A=>t.onShowCalculationModal("edit",y,k),["prevent","stop"])}," fx ",8,Ws)):e.createCommentVNode("",!0),e.createVNode(w,{trigger:["click"],onVisibleChange:A=>t.onVisibleChange(A,y)},{overlay:e.withCtx(()=>[e.createVNode(L,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_,{title:t.handleSortTitle(y,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.id,onClick:$=>t.onSort(A,k,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(_,{title:t.handleSortTitle(y,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,A=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:A.id,onClick:$=>t.onSort(A,k,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:A=>t.showCustomSortModal(y,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),e.createVNode(h,{onClick:A=>t.showCustomGroupModal(y,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),y.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:$=>t.onDateFormatChange(A.value,k)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(y.dateFormat===A.value||!y.dateFormat&&A.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(A.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(g)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:A=>t.showFilterModal(y,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(_,{title:t.handleAggregateTitle(y.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,A=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:A.value,onClick:$=>t.onAggregateChange(A.value,k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:A=>t.showConfigNameModal(y,k)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(g)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:A=>t.showSortByCpntModal(y,k)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(g)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].name},[Ks,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].name),1)],8,Ys),e.createVNode(S,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:A=>t.copyDataViewName(t.dataViewMap[y.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Xs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].code},[Js,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].code),1)],8,Qs),e.createVNode(S,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(f,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(B,{class:"delete-icon",onClick:e.withModifiers(A=>t.onDelete(k),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(x,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(V,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(T,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(M,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(I,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const ec=Z(Bs,[["render",Zs],["__scopeId","data-v-d8ce3fb3"]]),tc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},nc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:ec},setup(){const t=e.inject(De),n=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),o=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Te),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var S,L;const s=te.cloneDeep((S=e.unref(t))==null?void 0:S.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:o.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},u="ecan";let f=e.unref(n);if(f.startsWith(u)){const w=u.length;f=((L=f.slice(w,w+1))==null?void 0:L.toLowerCase())+f.slice(w+1)}const h=p[f],_=tc,g=(h==null?void 0:h.length)||0;for(let w=0;w<g;w++){const B=h[w];if(!B)break;r.push({..._[B],type:B})}for(const w of c)i(s,w)&&!h.find(B=>B===w)&&(s[w]=[]);l(s)})(),{cardsMap:a,cards:r}}}),Iu="",Fu="",oc={class:"data-group"};function ac(t,n,o,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const rc=Z(nc,[["render",ac],["__scopeId","data-v-51c4bf1a"]]),lc=[{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"]}],ic={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"}},sc=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:j.Input},emits:["change"],setup(t,{emit:n}){return{onInputChange:a=>{n("change",a.target.value)}}}});function cc(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const dc=Z(sc,[["render",cc]]),pc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:j.InputNumber,ASelect:j.Select,ASelectOption:j.SelectOption},emits:["change"],setup(t,{emit:n}){const o=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:o,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?n("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?n("change",u):n("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&n("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&n("change",{[t.valueKey]:e.unref(o),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function uc(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":n[0]||(n[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":n[1]||(n[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Mo=Z(pc,[["render",uc]]),fc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:j.RadioGroup,ARadioButton:j.RadioButton},emits:["change"],setup(t,{emit:n}){return{onRadioChange:a=>{n("change",a.target.value)}}}});function mc(t,n,o,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const hc=Z(fc,[["render",mc]]),yc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:j.Select,ASelectOption:j.SelectOption},emits:["change"],setup(t,{emit:n}){return{onSelectChange:a=>{n("change",a)}}}});function gc(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const bc=Z(yc,[["render",gc]]),Cc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:j.Switch},emit:["change"],setup(t,{emit:n}){return{onSwitchChange:a=>{n("change",a)}}}});function wc(t,n,o,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const xc=Z(Cc,[["render",wc]]);var ue="top",xe="bottom",ke="right",fe="left",On="auto",yt=[ue,xe,ke,fe],nt="start",gt="end",kc="clippingParents",jo="viewport",bt="popper",_c="reference",Ro=yt.reduce(function(t,n){return t.concat([n+"-"+nt,n+"-"+gt])},[]),Uo=[].concat(yt,[On]).reduce(function(t,n){return t.concat([n,n+"-"+nt,n+"-"+gt])},[]),Sc="beforeRead",Ac="read",Nc="afterRead",Tc="beforeMain",Lc="main",Ec="afterMain",Bc="beforeWrite",Oc="write",Vc="afterWrite",Ic=[Sc,Ac,Nc,Tc,Lc,Ec,Bc,Oc,Vc];function Oe(t){return t?(t.nodeName||"").toLowerCase():null}function ye(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function ze(t){var n=ye(t).Element;return t instanceof n||t instanceof Element}function _e(t){var n=ye(t).HTMLElement;return t instanceof n||t instanceof HTMLElement}function Vn(t){if(typeof ShadowRoot>"u")return!1;var n=ye(t).ShadowRoot;return t instanceof n||t instanceof ShadowRoot}function Fc(t){var n=t.state;Object.keys(n.elements).forEach(function(o){var a=n.styles[o]||{},r=n.attributes[o]||{},l=n.elements[o];!_e(l)||!Oe(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function $c(t){var n=t.state,o={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,o.popper),n.styles=o,n.elements.arrow&&Object.assign(n.elements.arrow.style,o.arrow),function(){Object.keys(n.elements).forEach(function(a){var r=n.elements[a],l=n.attributes[a]||{},i=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:o[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!_e(r)||!Oe(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const Dc={name:"applyStyles",enabled:!0,phase:"write",fn:Fc,effect:$c,requires:["computeStyles"]};function Ve(t){return t.split("-")[0]}var He=Math.max,Dt=Math.min,ot=Math.round;function In(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Go(){return!/^((?!chrome|android).)*safari/i.test(In())}function at(t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);var a=t.getBoundingClientRect(),r=1,l=1;n&&_e(t)&&(r=t.offsetWidth>0&&ot(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&ot(a.height)/t.offsetHeight||1);var i=ze(t)?ye(t):window,d=i.visualViewport,s=!Go()&&o,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Fn(t){var n=at(t),o=t.offsetWidth,a=t.offsetHeight;return Math.abs(n.width-o)<=1&&(o=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:a}}function zo(t,n){var o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&Vn(o)){var a=n;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Pe(t){return ye(t).getComputedStyle(t)}function vc(t){return["table","td","th"].indexOf(Oe(t))>=0}function Ue(t){return((ze(t)?t.ownerDocument:t.document)||window.document).documentElement}function vt(t){return Oe(t)==="html"?t:t.assignedSlot||t.parentNode||(Vn(t)?t.host:null)||Ue(t)}function Ho(t){return!_e(t)||Pe(t).position==="fixed"?null:t.offsetParent}function Pc(t){var n=/firefox/i.test(In()),o=/Trident/i.test(In());if(o&&_e(t)){var a=Pe(t);if(a.position==="fixed")return null}var r=vt(t);for(Vn(r)&&(r=r.host);_e(r)&&["html","body"].indexOf(Oe(r))<0;){var l=Pe(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||n&&l.willChange==="filter"||n&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Ct(t){for(var n=ye(t),o=Ho(t);o&&vc(o)&&Pe(o).position==="static";)o=Ho(o);return o&&(Oe(o)==="html"||Oe(o)==="body"&&Pe(o).position==="static")?n:o||Pc(t)||n}function $n(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wt(t,n,o){return He(t,Dt(n,o))}function Mc(t,n,o){var a=wt(t,n,o);return a>o?o:a}function Wo(){return{top:0,right:0,bottom:0,left:0}}function qo(t){return Object.assign({},Wo(),t)}function Yo(t,n){return n.reduce(function(o,a){return o[a]=t,o},{})}var jc=function(n,o){return n=typeof n=="function"?n(Object.assign({},o.rects,{placement:o.placement})):n,qo(typeof n!="number"?n:Yo(n,yt))};function Rc(t){var n,o=t.state,a=t.name,r=t.options,l=o.elements.arrow,i=o.modifiersData.popperOffsets,d=Ve(o.placement),s=$n(d),c=[fe,ke].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=jc(r.padding,o),f=Fn(l),h=s==="y"?ue:fe,_=s==="y"?xe:ke,g=o.rects.reference[p]+o.rects.reference[s]-i[s]-o.rects.popper[p],S=i[s]-o.rects.reference[s],L=Ct(l),w=L?s==="y"?L.clientHeight||0:L.clientWidth||0:0,B=g/2-S/2,m=u[h],b=w-f[p]-u[_],x=w/2-f[p]/2+B,O=wt(m,x,b),V=s;o.modifiersData[a]=(n={},n[V]=O,n.centerOffset=O-x,n)}}function Uc(t){var n=t.state,o=t.options,a=o.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||zo(n.elements.popper,r)&&(n.elements.arrow=r))}const Gc={name:"arrow",enabled:!0,phase:"main",fn:Rc,effect:Uc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rt(t){return t.split("-")[1]}var zc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hc(t,n){var o=t.x,a=t.y,r=n.devicePixelRatio||1;return{x:ot(o*r)/r||0,y:ot(a*r)/r||0}}function Ko(t){var n,o=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,_=i.y,g=_===void 0?0:_,S=typeof p=="function"?p({x:h,y:g}):{x:h,y:g};h=S.x,g=S.y;var L=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),B=fe,m=ue,b=window;if(c){var x=Ct(o),O="clientHeight",V="clientWidth";if(x===ye(o)&&(x=Ue(o),Pe(x).position!=="static"&&d==="absolute"&&(O="scrollHeight",V="scrollWidth")),x=x,r===ue||(r===fe||r===ke)&&l===gt){m=xe;var T=u&&x===b&&b.visualViewport?b.visualViewport.height:x[O];g-=T-a.height,g*=s?1:-1}if(r===fe||(r===ue||r===xe)&&l===gt){B=ke;var M=u&&x===b&&b.visualViewport?b.visualViewport.width:x[V];h-=M-a.width,h*=s?1:-1}}var I=Object.assign({position:d},c&&zc),R=p===!0?Hc({x:h,y:g},ye(o)):{x:h,y:g};if(h=R.x,g=R.y,s){var y;return Object.assign({},I,(y={},y[m]=w?"0":"",y[B]=L?"0":"",y.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",y))}return Object.assign({},I,(n={},n[m]=w?g+"px":"",n[B]=L?h+"px":"",n.transform="",n))}function Wc(t){var n=t.state,o=t.options,a=o.gpuAcceleration,r=a===void 0?!0:a,l=o.adaptive,i=l===void 0?!0:l,d=o.roundOffsets,s=d===void 0?!0:d,c={placement:Ve(n.placement),variation:rt(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Ko(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:s})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Ko(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const qc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Wc,data:{}};var Pt={passive:!0};function Yc(t){var n=t.state,o=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=ye(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",o.update,Pt)}),d&&s.addEventListener("resize",o.update,Pt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",o.update,Pt)}),d&&s.removeEventListener("resize",o.update,Pt)}}const Kc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yc,data:{}};var Xc={left:"right",right:"left",bottom:"top",top:"bottom"};function Mt(t){return t.replace(/left|right|bottom|top/g,function(n){return Xc[n]})}var Qc={start:"end",end:"start"};function Xo(t){return t.replace(/start|end/g,function(n){return Qc[n]})}function Dn(t){var n=ye(t),o=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:o,scrollTop:a}}function vn(t){return at(Ue(t)).left+Dn(t).scrollLeft}function Jc(t,n){var o=ye(t),a=Ue(t),r=o.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Go();(c||!c&&n==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+vn(t),y:s}}function Zc(t){var n,o=Ue(t),a=Dn(t),r=(n=t.ownerDocument)==null?void 0:n.body,l=He(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=He(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+vn(t),s=-a.scrollTop;return Pe(r||o).direction==="rtl"&&(d+=He(o.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Pn(t){var n=Pe(t),o=n.overflow,a=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+a)}function Qo(t){return["html","body","#document"].indexOf(Oe(t))>=0?t.ownerDocument.body:_e(t)&&Pn(t)?t:Qo(vt(t))}function xt(t,n){var o;n===void 0&&(n=[]);var a=Qo(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),l=ye(a),i=r?[l].concat(l.visualViewport||[],Pn(a)?a:[]):a,d=n.concat(i);return r?d:d.concat(xt(vt(i)))}function Mn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ed(t,n){var o=at(t,!1,n==="fixed");return o.top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o}function Jo(t,n,o){return n===jo?Mn(Jc(t,o)):ze(n)?ed(n,o):Mn(Zc(Ue(t)))}function td(t){var n=xt(vt(t)),o=["absolute","fixed"].indexOf(Pe(t).position)>=0,a=o&&_e(t)?Ct(t):t;return ze(a)?n.filter(function(r){return ze(r)&&zo(r,a)&&Oe(r)!=="body"}):[]}function nd(t,n,o,a){var r=n==="clippingParents"?td(t):[].concat(n),l=[].concat(r,[o]),i=l[0],d=l.reduce(function(s,c){var p=Jo(t,c,a);return s.top=He(p.top,s.top),s.right=Dt(p.right,s.right),s.bottom=Dt(p.bottom,s.bottom),s.left=He(p.left,s.left),s},Jo(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Zo(t){var n=t.reference,o=t.element,a=t.placement,r=a?Ve(a):null,l=a?rt(a):null,i=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,s;switch(r){case ue:s={x:i,y:n.y-o.height};break;case xe:s={x:i,y:n.y+n.height};break;case ke:s={x:n.x+n.width,y:d};break;case fe:s={x:n.x-o.width,y:d};break;default:s={x:n.x,y:n.y}}var c=r?$n(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case nt:s[c]=s[c]-(n[p]/2-o[p]/2);break;case gt:s[c]=s[c]+(n[p]/2-o[p]/2);break}}return s}function kt(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=a===void 0?t.placement:a,l=o.strategy,i=l===void 0?t.strategy:l,d=o.boundary,s=d===void 0?kc:d,c=o.rootBoundary,p=c===void 0?jo:c,u=o.elementContext,f=u===void 0?bt:u,h=o.altBoundary,_=h===void 0?!1:h,g=o.padding,S=g===void 0?0:g,L=qo(typeof S!="number"?S:Yo(S,yt)),w=f===bt?_c:bt,B=t.rects.popper,m=t.elements[_?w:f],b=nd(ze(m)?m:m.contextElement||Ue(t.elements.popper),s,p,i),x=at(t.elements.reference),O=Zo({reference:x,element:B,strategy:"absolute",placement:r}),V=Mn(Object.assign({},B,O)),T=f===bt?V:x,M={top:b.top-T.top+L.top,bottom:T.bottom-b.bottom+L.bottom,left:b.left-T.left+L.left,right:T.right-b.right+L.right},I=t.modifiersData.offset;if(f===bt&&I){var R=I[r];Object.keys(M).forEach(function(y){var k=[ke,xe].indexOf(y)>=0?1:-1,A=[ue,xe].indexOf(y)>=0?"y":"x";M[y]+=R[A]*k})}return M}function od(t,n){n===void 0&&(n={});var o=n,a=o.placement,r=o.boundary,l=o.rootBoundary,i=o.padding,d=o.flipVariations,s=o.allowedAutoPlacements,c=s===void 0?Uo:s,p=rt(a),u=p?d?Ro:Ro.filter(function(_){return rt(_)===p}):yt,f=u.filter(function(_){return c.indexOf(_)>=0});f.length===0&&(f=u);var h=f.reduce(function(_,g){return _[g]=kt(t,{placement:g,boundary:r,rootBoundary:l,padding:i})[Ve(g)],_},{});return Object.keys(h).sort(function(_,g){return h[_]-h[g]})}function ad(t){if(Ve(t)===On)return[];var n=Mt(t);return[Xo(t),n,Xo(n)]}function rd(t){var n=t.state,o=t.options,a=t.name;if(!n.modifiersData[a]._skip){for(var r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!0:i,s=o.fallbackPlacements,c=o.padding,p=o.boundary,u=o.rootBoundary,f=o.altBoundary,h=o.flipVariations,_=h===void 0?!0:h,g=o.allowedAutoPlacements,S=n.options.placement,L=Ve(S),w=L===S,B=s||(w||!_?[Mt(S)]:ad(S)),m=[S].concat(B).reduce(function(q,X){return q.concat(Ve(X)===On?od(n,{placement:X,boundary:p,rootBoundary:u,padding:c,flipVariations:_,allowedAutoPlacements:g}):X)},[]),b=n.rects.reference,x=n.rects.popper,O=new Map,V=!0,T=m[0],M=0;M<m.length;M++){var I=m[M],R=Ve(I),y=rt(I)===nt,k=[ue,xe].indexOf(R)>=0,A=k?"width":"height",$=kt(n,{placement:I,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),v=k?y?ke:fe:y?xe:ue;b[A]>x[A]&&(v=Mt(v));var G=Mt(v),C=[];if(l&&C.push($[R]<=0),d&&C.push($[v]<=0,$[G]<=0),C.every(function(q){return q})){T=I,V=!1;break}O.set(I,C)}if(V)for(var N=_?3:1,E=function(X){var Y=m.find(function(J){var ae=O.get(J);if(ae)return ae.slice(0,X).every(function(se){return se})});if(Y)return T=Y,"break"},U=N;U>0;U--){var P=E(U);if(P==="break")break}n.placement!==T&&(n.modifiersData[a]._skip=!0,n.placement=T,n.reset=!0)}}const ld={name:"flip",enabled:!0,phase:"main",fn:rd,requiresIfExists:["offset"],data:{_skip:!1}};function ea(t,n,o){return o===void 0&&(o={x:0,y:0}),{top:t.top-n.height-o.y,right:t.right-n.width+o.x,bottom:t.bottom-n.height+o.y,left:t.left-n.width-o.x}}function ta(t){return[ue,ke,xe,fe].some(function(n){return t[n]>=0})}function id(t){var n=t.state,o=t.name,a=n.rects.reference,r=n.rects.popper,l=n.modifiersData.preventOverflow,i=kt(n,{elementContext:"reference"}),d=kt(n,{altBoundary:!0}),s=ea(i,a),c=ea(d,r,l),p=ta(s),u=ta(c);n.modifiersData[o]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const sd={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:id};function cd(t,n,o){var a=Ve(t),r=[fe,ue].indexOf(a)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},n,{placement:t})):o,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[fe,ke].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function dd(t){var n=t.state,o=t.options,a=t.name,r=o.offset,l=r===void 0?[0,0]:r,i=Uo.reduce(function(p,u){return p[u]=cd(u,n.rects,l),p},{}),d=i[n.placement],s=d.x,c=d.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=s,n.modifiersData.popperOffsets.y+=c),n.modifiersData[a]=i}const pd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dd};function ud(t){var n=t.state,o=t.name;n.modifiersData[o]=Zo({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})}const fd={name:"popperOffsets",enabled:!0,phase:"read",fn:ud,data:{}};function md(t){return t==="x"?"y":"x"}function hd(t){var n=t.state,o=t.options,a=t.name,r=o.mainAxis,l=r===void 0?!0:r,i=o.altAxis,d=i===void 0?!1:i,s=o.boundary,c=o.rootBoundary,p=o.altBoundary,u=o.padding,f=o.tether,h=f===void 0?!0:f,_=o.tetherOffset,g=_===void 0?0:_,S=kt(n,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),L=Ve(n.placement),w=rt(n.placement),B=!w,m=$n(L),b=md(m),x=n.modifiersData.popperOffsets,O=n.rects.reference,V=n.rects.popper,T=typeof g=="function"?g(Object.assign({},n.rects,{placement:n.placement})):g,M=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),I=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,R={x:0,y:0};if(x){if(l){var y,k=m==="y"?ue:fe,A=m==="y"?xe:ke,$=m==="y"?"height":"width",v=x[m],G=v+S[k],C=v-S[A],N=h?-V[$]/2:0,E=w===nt?O[$]:V[$],U=w===nt?-V[$]:-O[$],P=n.elements.arrow,q=h&&P?Fn(P):{width:0,height:0},X=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:Wo(),Y=X[k],J=X[A],ae=wt(0,O[$],q[$]),se=B?O[$]/2-N-ae-Y-M.mainAxis:E-ae-Y-M.mainAxis,ce=B?-O[$]/2+N+ae+J+M.mainAxis:U+ae+J+M.mainAxis,Be=n.elements.arrow&&Ct(n.elements.arrow),Tt=Be?m==="y"?Be.clientTop||0:Be.clientLeft||0:0,qe=(y=I==null?void 0:I[m])!=null?y:0,Ye=v+se-qe-Tt,Ke=v+ce-qe,Ge=wt(h?Dt(G,Ye):G,v,h?He(C,Ke):C);x[m]=Ge,R[m]=Ge-v}if(d){var Xe,ct=m==="x"?ue:fe,dt=m==="x"?xe:ke,ge=x[b],Fe=b==="y"?"height":"width",Qe=ge+S[ct],Je=ge-S[dt],z=[ue,fe].indexOf(L)!==-1,W=(Xe=I==null?void 0:I[b])!=null?Xe:0,Q=z?Qe:ge-O[Fe]-V[Fe]-W+M.altAxis,F=z?ge+O[Fe]+V[Fe]-W-M.altAxis:Je,D=h&&z?Mc(Q,ge,F):wt(h?Q:Qe,ge,h?F:Je);x[b]=D,R[b]=D-ge}n.modifiersData[a]=R}}const yd={name:"preventOverflow",enabled:!0,phase:"main",fn:hd,requiresIfExists:["offset"]};function gd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function bd(t){return t===ye(t)||!_e(t)?Dn(t):gd(t)}function Cd(t){var n=t.getBoundingClientRect(),o=ot(n.width)/t.offsetWidth||1,a=ot(n.height)/t.offsetHeight||1;return o!==1||a!==1}function wd(t,n,o){o===void 0&&(o=!1);var a=_e(n),r=_e(n)&&Cd(n),l=Ue(n),i=at(t,r,o),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!o)&&((Oe(n)!=="body"||Pn(l))&&(d=bd(n)),_e(n)?(s=at(n,!0),s.x+=n.clientLeft,s.y+=n.clientTop):l&&(s.x=vn(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function xd(t){var n=new Map,o=new Set,a=[];t.forEach(function(l){n.set(l.name,l)});function r(l){o.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!o.has(d)){var s=n.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){o.has(l.name)||r(l)}),a}function kd(t){var n=xd(t);return Ic.reduce(function(o,a){return o.concat(n.filter(function(r){return r.phase===a}))},[])}function _d(t){var n;return function(){return n||(n=new Promise(function(o){Promise.resolve().then(function(){n=void 0,o(t())})})),n}}function Sd(t){var n=t.reduce(function(o,a){var r=o[a.name];return o[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,o},{});return Object.keys(n).map(function(o){return n[o]})}var na={placement:"bottom",modifiers:[],strategy:"absolute"};function oa(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Ad(t){t===void 0&&(t={});var n=t,o=n.defaultModifiers,a=o===void 0?[]:o,r=n.defaultOptions,l=r===void 0?na:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},na,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(L){var w=typeof L=="function"?L(p.options):L;g(),p.options=Object.assign({},l,p.options,w),p.scrollParents={reference:ze(d)?xt(d):d.contextElement?xt(d.contextElement):[],popper:xt(s)};var B=kd(Sd([].concat(a,p.options.modifiers)));return p.orderedModifiers=B.filter(function(m){return m.enabled}),_(),h.update()},forceUpdate:function(){if(!f){var L=p.elements,w=L.reference,B=L.popper;if(oa(w,B)){p.rects={reference:wd(w,Ct(B),p.options.strategy==="fixed"),popper:Fn(B)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(M){return p.modifiersData[M.name]=Object.assign({},M.data)});for(var m=0;m<p.orderedModifiers.length;m++){if(p.reset===!0){p.reset=!1,m=-1;continue}var b=p.orderedModifiers[m],x=b.fn,O=b.options,V=O===void 0?{}:O,T=b.name;typeof x=="function"&&(p=x({state:p,options:V,name:T,instance:h})||p)}}}},update:_d(function(){return new Promise(function(S){h.forceUpdate(),S(p)})}),destroy:function(){g(),f=!0}};if(!oa(d,s))return h;h.setOptions(c).then(function(S){!f&&c.onFirstUpdate&&c.onFirstUpdate(S)});function _(){p.orderedModifiers.forEach(function(S){var L=S.name,w=S.options,B=w===void 0?{}:w,m=S.effect;if(typeof m=="function"){var b=m({state:p,name:L,instance:h,options:B}),x=function(){};u.push(b||x)}})}function g(){u.forEach(function(S){return S()}),u=[]}return h}}var Nd=[Kc,fd,qc,Dc,pd,ld,yd,Gc,sd],Td=Ad({defaultModifiers:Nd});function jn(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,a=new Array(n);o<n;o++)a[o]=t[o];return a}function aa(t,n){if(t){if(typeof t=="string")return jn(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?jn(t,n):void 0}}function Ld(t){return function(n){if(Array.isArray(n))return jn(n)}(t)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(t)||aa(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 lt(t){return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lt(t)}function ra(t,n,o,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void o(c)}d.done?n(s):Promise.resolve(s).then(a,r)}function la(t){return function(){var n=this,o=arguments;return new Promise(function(a,r){var l=t.apply(n,o);function i(s){ra(l,a,r,i,d,"next",s)}function d(s){ra(l,a,r,i,d,"throw",s)}i(void 0)})}}var ia={exports:{}},sa={exports:{}};(function(t){function n(o){return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(sa),function(t){var n=sa.exports.default;function o(){t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(C,N,E){C[N]=E.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(C,N,E){return Object.defineProperty(C,N,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[N]}try{f({},"")}catch{f=function(N,E,U){return N[E]=U}}function h(C,N,E,U){var P=N&&N.prototype instanceof m?N:m,q=Object.create(P.prototype),X=new v(U||[]);return d(q,"_invoke",{value:y(C,E,X)}),q}function _(C,N,E){try{return{type:"normal",arg:C.call(N,E)}}catch(U){return{type:"throw",arg:U}}}r.wrap=h;var g="suspendedStart",S="suspendedYield",L="executing",w="completed",B={};function m(){}function b(){}function x(){}var O={};f(O,c,function(){return this});var V=Object.getPrototypeOf,T=V&&V(V(G([])));T&&T!==l&&i.call(T,c)&&(O=T);var M=x.prototype=m.prototype=Object.create(O);function I(C){["next","throw","return"].forEach(function(N){f(C,N,function(E){return this._invoke(N,E)})})}function R(C,N){function E(P,q,X,Y){var J=_(C[P],C,q);if(J.type!=="throw"){var ae=J.arg,se=ae.value;return se&&n(se)=="object"&&i.call(se,"__await")?N.resolve(se.__await).then(function(ce){E("next",ce,X,Y)},function(ce){E("throw",ce,X,Y)}):N.resolve(se).then(function(ce){ae.value=ce,X(ae)},function(ce){return E("throw",ce,X,Y)})}Y(J.arg)}var U;d(this,"_invoke",{value:function(P,q){function X(){return new N(function(Y,J){E(P,q,Y,J)})}return U=U?U.then(X,X):X()}})}function y(C,N,E){var U=g;return function(P,q){if(U===L)throw new Error("Generator is already running");if(U===w){if(P==="throw")throw q;return{value:a,done:!0}}for(E.method=P,E.arg=q;;){var X=E.delegate;if(X){var Y=k(X,E);if(Y){if(Y===B)continue;return Y}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(U===g)throw U=w,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);U=L;var J=_(C,N,E);if(J.type==="normal"){if(U=E.done?w:S,J.arg===B)continue;return{value:J.arg,done:E.done}}J.type==="throw"&&(U=w,E.method="throw",E.arg=J.arg)}}}function k(C,N){var E=N.method,U=C.iterator[E];if(U===a)return N.delegate=null,E==="throw"&&C.iterator.return&&(N.method="return",N.arg=a,k(C,N),N.method==="throw")||E!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+E+"' method")),B;var P=_(U,C.iterator,N.arg);if(P.type==="throw")return N.method="throw",N.arg=P.arg,N.delegate=null,B;var q=P.arg;return q?q.done?(N[C.resultName]=q.value,N.next=C.nextLoc,N.method!=="return"&&(N.method="next",N.arg=a),N.delegate=null,B):q:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,B)}function A(C){var N={tryLoc:C[0]};1 in C&&(N.catchLoc=C[1]),2 in C&&(N.finallyLoc=C[2],N.afterLoc=C[3]),this.tryEntries.push(N)}function $(C){var N=C.completion||{};N.type="normal",delete N.arg,C.completion=N}function v(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(A,this),this.reset(!0)}function G(C){if(C||C===""){var N=C[c];if(N)return N.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,U=function P(){for(;++E<C.length;)if(i.call(C,E))return P.value=C[E],P.done=!1,P;return P.value=a,P.done=!0,P};return U.next=U}}throw new TypeError(n(C)+" is not iterable")}return b.prototype=x,d(M,"constructor",{value:x,configurable:!0}),d(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,u,"GeneratorFunction"),r.isGeneratorFunction=function(C){var N=typeof C=="function"&&C.constructor;return!!N&&(N===b||(N.displayName||N.name)==="GeneratorFunction")},r.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,f(C,u,"GeneratorFunction")),C.prototype=Object.create(M),C},r.awrap=function(C){return{__await:C}},I(R.prototype),f(R.prototype,p,function(){return this}),r.AsyncIterator=R,r.async=function(C,N,E,U,P){P===void 0&&(P=Promise);var q=new R(h(C,N,E,U),P);return r.isGeneratorFunction(N)?q:q.next().then(function(X){return X.done?X.value:q.next()})},I(M),f(M,u,"Generator"),f(M,c,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),r.keys=function(C){var N=Object(C),E=[];for(var U in N)E.push(U);return E.reverse(),function P(){for(;E.length;){var q=E.pop();if(q in N)return P.value=q,P.done=!1,P}return P.done=!0,P}},r.values=G,v.prototype={constructor:v,reset:function(C){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($),!C)for(var N in this)N.charAt(0)==="t"&&i.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=a)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var N=this;function E(J,ae){return q.type="throw",q.arg=C,N.next=J,ae&&(N.method="next",N.arg=a),!!ae}for(var U=this.tryEntries.length-1;U>=0;--U){var P=this.tryEntries[U],q=P.completion;if(P.tryLoc==="root")return E("end");if(P.tryLoc<=this.prev){var X=i.call(P,"catchLoc"),Y=i.call(P,"finallyLoc");if(X&&Y){if(this.prev<P.catchLoc)return E(P.catchLoc,!0);if(this.prev<P.finallyLoc)return E(P.finallyLoc)}else if(X){if(this.prev<P.catchLoc)return E(P.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<P.finallyLoc)return E(P.finallyLoc)}}}},abrupt:function(C,N){for(var E=this.tryEntries.length-1;E>=0;--E){var U=this.tryEntries[E];if(U.tryLoc<=this.prev&&i.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var P=U;break}}P&&(C==="break"||C==="continue")&&P.tryLoc<=N&&N<=P.finallyLoc&&(P=null);var q=P?P.completion:{};return q.type=C,q.arg=N,P?(this.method="next",this.next=P.finallyLoc,B):this.complete(q)},complete:function(C,N){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&N&&(this.next=N),B},finish:function(C){for(var N=this.tryEntries.length-1;N>=0;--N){var E=this.tryEntries[N];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),$(E),B}},catch:function(C){for(var N=this.tryEntries.length-1;N>=0;--N){var E=this.tryEntries[N];if(E.tryLoc===C){var U=E.completion;if(U.type==="throw"){var P=U.arg;$(E)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(C,N,E){return this.delegate={iterator:G(C),resultName:N,nextLoc:E},this.method==="next"&&(this.arg=a),B}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}(ia);var jt=ia.exports(),Rt=jt;try{regeneratorRuntime=jt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=jt:Function("r","regeneratorRuntime = r")(jt)}function Ed(t){var n=function(o,a){if(lt(o)!=="object"||o===null)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var l=r.call(o,a||"default");if(lt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}(t,"string");return lt(n)==="symbol"?n:String(n)}function Rn(t,n,o){return(n=Ed(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var Ut=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var _=f/t.size*100,g=100-h/t.size*100;o("change",_,g)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ca=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Bd=ca(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Od=ca(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Me(t,n){n===void 0&&(n={});var o=n.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",o==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Me(".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}"),Ut.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[Bd,Od,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Ut.__scopeId="data-v-24517fec",Ut.__file="src/picker/Saturation.vue";var Gt=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;o("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),Vd={ref:"canvas"};Me(".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}"),Gt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Vd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Gt.__scopeId="data-v-78b9f4f0",Gt.__file="src/picker/Hue.vue";var zt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,n){var o=n.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));o("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Id={ref:"canvas"};Me(".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}"),zt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:n[0]||(n[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Id,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},zt.__scopeId="data-v-24dc9656",zt.__file="src/picker/Alpha.vue";var Ht=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,n){var o=n.emit;return{onInput:function(a){var r;o("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){o("focus")},onBlur:function(){o("blur")},onEnter:function(){o("enter")}}}}),Fd={class:"input"},$d={class:"label"},Dd=[".value"];function _t(t,n){return function(o){if(Array.isArray(o))return o}(t)||function(o,a){var r=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(o)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,n)||aa(t,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function da(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Se(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?da(Object(o),!0).forEach(function(a){Rn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):da(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Me(".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}"),Ht.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",Fd,[e.createElementVNode("span",$d,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:n[0]||(n[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:n[1]||(n[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:n[2]||(n[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:n[3]||(n[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,Dd)])},Ht.__scopeId="data-v-d52a4d02",Ht.__file="src/picker/InputValue.vue";var pa=function(t,n,o){return[t,n*o/((t=(2-n)*o)<1?t:2-t)||0,t/2]},ua={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Wt=function(t){t=Math.min(Math.round(t),255);var n=Math.floor(t/16),o=t%16;return"".concat(ua[n]||n).concat(ua[o]||o)},fa=function(t){var n=t.r,o=t.g,a=t.b;return isNaN(n)||isNaN(o)||isNaN(a)?"":"#".concat(Wt(n)).concat(Wt(o)).concat(Wt(a))},it=function(t,n){var o;typeof(o=t)=="string"&&o.indexOf(".")!==-1&&parseFloat(o)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(n,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*n),10)/100),Math.abs(t-n)<1e-6?1:t%n/parseFloat(n)},St=function(t,n,o){t=6*it(t,360),n=it(n,100),o=it(o,100);var a=Math.floor(t),r=t-a,l=o*(1-n),i=o*(1-r*n),d=o*(1-(1-r)*n),s=a%6,c=[o,i,l,l,d,o][s],p=[d,o,o,i,l,l][s],u=[l,l,d,o,o,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},ma=function(t,n,o){var a=t.h,r=t.s,l=t.v,i=t.a;if(o)switch(n){case"hsl":var d=pa(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=St(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(fa(St(a,r,l))).concat(Wt(255*i))}else switch(n){case"hsl":var f=pa(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=St(a,r,l),_=h.r,g=h.g,S=h.b;return"rgb(".concat(_,", ").concat(g,", ").concat(S,")");default:return fa(St(a,r,l))}},qt=function(t){var n=t.r,o=t.g,a=t.b;n=it(n,255),o=it(o,255),a=it(a,255);var r,l=Math.max(n,o,a),i=Math.min(n,o,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case n:r=(o-a)/s+(o<a?6:0);break;case o:r=(a-n)/s+2;break;case a:r=(n-o)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ha=function(t){var n=t.h,o=t.s,a=t.l;a/=100;var r=o/=100,l=Math.max(a,.01);return o*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+n,s:100*(a===0?2*r/(l+r):2*o/(a+o)),v:100*((a+o)/2)}},ya=function(t){var n=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var o=1;o<t.length;o++)n.push(parseInt("0x"+t[o].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)n.push(parseInt("0x"+t.slice(a,a+2)));return{r:n[0],g:n[1],b:n[2],a:n[3]}},Un=function(t,n,o){if(typeof t=="string"&&t!==""){var a=Gn(t,zn(t),o),r=wa(a);return ma(r,n,o)}return""},ga=function(t){var n=_t(t.match(/(\d(\.\d+)?)+/g),4);return{r:n[0],g:n[1],b:n[2],a:n[3]}},ba=function(t){var n=_t(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:o,s:parseFloat(a),l:parseFloat(r),a:l}},Ca=function(t){var n=_t(t.match(/(\d(\.\d+)?)+/g),4),o=n[0],a=n[1],r=n[2],l=n[3];return{h:parseFloat(o),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Gn=function(t,n){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(n){case"rgb":var o=ga(t),a=o.r,r=o.g,l=o.b,i=o.a;return Se(Se({},qt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=Ca(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=ba(t),c=s.h,p=s.s,u=s.l,f=s.a;return Se(Se({},ha({h:c,s:p,l:u})),{},{a:+f});default:var h=ya(t),_=h.r,g=h.g,S=h.b,L=h.a;return Se(Se({},qt({r:_,g,b:S})),{},{a:L/255})}else switch(n){case"rgb":return Se(Se({},qt(ga(t))),{},{a:1});case"hsv":var w=Ca(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return Se(Se({},ha(ba(t))),{},{a:1});default:return Se(Se({},qt(ya(t))),{},{a:1})}},zn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},wa=function(t){var n=t.h,o=t.s,a=t.v,r=t.a;return isNaN(n)&&(n=0),isNaN(o)&&(o=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:n,s:o,v:a,a:r}},At=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var n=e.ref(),o=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(o)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=n.value.getContext("2d");n.value.width=e.unref(a),n.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:n,colorItemStyle:l}}}),vd=["draggable"];Me(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),At.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,vd)},At.__scopeId="data-v-02da71fd",At.__file="src/color-item/ColorItem.vue";var Yt=e.defineComponent({name:"Colors",components:{ColorItem:At},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,n){var o=n.emit;return{onSelectColor:function(a,r){o("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return Un(a,"hex",!0)})})}}}),Pd={class:"colors"};function xa(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Ie(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?xa(Object(o),!0).forEach(function(a){Rn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xa(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Me(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Yt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Pd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Yt.__scopeId="data-v-0f8b52a8",Yt.__file="src/picker/Colors.vue";var Kt=e.defineComponent({name:"Picker",components:{Colors:Yt,Saturation:Ut,Hue:Gt,Alpha:zt,InputValue:Ht},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,n){var o=n.emit,a=e.computed(function(){return Ie(Ie({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var w,B=(w=t.value)===null||w===void 0?void 0:w.trim();if(B!=null&&B!==""){var m=zn(B);return wa(Gn(B,m,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(w,B){var m="";w!=null?(m=ma(Ie({},w),t.format,t.showAlpha),i.value=Ie({},w)):i.value=null,d.value=m;var b=s();JSON.stringify(w)!==JSON.stringify(b)&&JSON.stringify(w)!==JSON.stringify(B)&&o("change",m)},{immediate:!0});var c=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.v)||0}),f=e.computed(function(){var w,B;return((w=e.unref(l))===null||w===void 0?void 0:w.a)!=null?(B=e.unref(l))===null||B===void 0?void 0:B.a:1}),h=e.computed(function(){return St(e.unref(c),e.unref(p),e.unref(u))}),_=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),g=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"}}),S=e.ref(-1),L=function(w,B,m){if(w.length!==0){var b=Gn(w,B,m),x=b.h,O=b.s,V=b.v;if(!(isNaN(x)||isNaN(O)||isNaN(V))){var T=1,M=b.a;isNaN(M)||(T=M),l.value={h:x,s:O,v:V,a:T}}}};return{h:c,s:p,v:u,a:f,rgbStr:_,onSelectSaturation:function(w,B){S.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:w,v:B,a:e.unref(f)}:l.value=Ie(Ie({},e.unref(l)),{},{s:w,v:B})},onSelectHue:function(w){S.value=-1,e.unref(l)==null&&(l.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=Ie(Ie({},e.unref(l)),{},{h:w})},onSelectAlpha:function(w){S.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:w}:l.value=Ie(Ie({},e.unref(l)),{},{a:w})},label:g,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){S.value=-1,d.value=w},handleChange:function(){var w,B=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(B!==""){var m=t.showAlpha,b=t.format,x=function(O,V,T){if(T)switch(V){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(V){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(O);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(B,b,m);x?L(B,b,m):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:S,onSelectColor:function(w,B){if(S.value=B,(w=w.trim())==="")l.value=null;else{var m=zn(w);m?L(w,m,!0):l.value=null}}}}}),Md={class:"picker-inner"},jd={class:"picker-header"};Me(".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}"),Kt.render=function(t,n,o,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Md,[e.createElementVNode("div",jd,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Kt.__scopeId="data-v-6ceadec6",Kt.__file="src/picker/Picker.vue";var Xt=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var n=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}})}}}),Rd=[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,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,a)}return o}function Hn(t){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?ka(Object(o),!0).forEach(function(a){Rn(t,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ka(Object(o)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))})}return t}Me(".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}"),Xt.render=function(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(Rd),4)},Xt.__scopeId="data-v-ceb1719c",Xt.__file="src/add-color-item/AddColorItem.vue";var We=null,st=e.defineComponent({name:"ColorPicker",components:{ColorItem:At,Picker:Kt,AddColorItem:Xt},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,n){var o=n.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(k){return Un(k,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var k=t.value||"",A=Array.isArray(k)?k:[k];a.value=A.map(function($){return Un($,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,_,g=e.ref(null),S=e.ref(null),L=(s=g,c=S,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){We.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(k){var A=k.state,$=A.styles,v=A.placement,G=$.popper;u.value=Hn(Hn(Hn({},G),p),{},{transformOrigin:v==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(k,A){var $,v=_t(k,2),G=v[0],C=v[1],N=_t(A,2),E=N[0],U=N[1];if(G&&C&&(E!==G||U!==E)){($=We)===null||$===void 0||$.destroy();var P=G.$el||G,q=C.$el||C;e.nextTick(function(){We=Td(P,q,f)})}}),e.onBeforeUnmount(function(){var k;We&&((k=We)===null||k===void 0||k.destroy(),We=null)}),{instance:We,style:u}),w=L.style,B=function(){e.unref(g)==null&&(g.value=e.unref(y)[0],l.value=0),t.showPicker===void 0?d.value=!0:o("update:showPicker",!0)},m=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:o("update:showPicker",!1),o("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},b=e.ref(),x=function(){var k=la(Rt.mark(function A($){var v,G,C,N;return Rt.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(G=$.target,(C=(v=G.dataset)===null||v===void 0?void 0:v.index)!=null&&C!==""){E.next=4;break}return E.abrupt("return");case 4:if(N=+C,e.unref(l)!==N){E.next=7;break}return E.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==N?(m(),h&&clearTimeout(h),h=setTimeout(function(){B(),clearTimeout(h)},100)):B(),l.value=N,g.value=G;case 10:case"end":return E.stop()}},A)}));return function(A){return k.apply(this,arguments)}}(),O=function(){var k=la(Rt.mark(function A($){var v,G,C,N,E;return Rt.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(N=$.target,!(!((v=e.unref(b))!==null&&v!==void 0&&v.isEqualNode(N))&&(!((G=e.unref(b))===null||G===void 0)&&G.contains(N)))){U.next=4;break}return U.abrupt("return");case 4:if(E=(C=e.unref(S))===null||C===void 0?void 0:C.$el,!(E!=null&&E.contains(N))){U.next=8;break}return U.abrupt("return");case 8:_&&clearTimeout(_),_=setTimeout(function(){e.unref(d)&&m()},0);case 10:case"end":return U.stop()}},A)}));return function(A){return k.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(B(),clearTimeout(_))});var V,T=e.ref(t.max>e.unref(a).length),M=e.computed(function(){return typeof t.popupContainer=="string"||lt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),I=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),R=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(S)]},function(){e.nextTick(function(){var k,A;(k=e.unref(b))===null||k===void 0||k.setAttribute("pick-colors-theme",e.unref(R)),(A=e.unref(S))===null||A===void 0||(A=A.$el)===null||A===void 0||A.setAttribute("pick-colors-theme",e.unref(R))})},{immediate:!0}),e.provide("theme",{theme:R});var y=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&B()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),_&&(clearTimeout(_),_=null)}),{valueList:a,colorItemSelected:function(k){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===k},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:T,onPickerChange:function(k){var A=e.unref(l),$=e.unref(a).slice(),v=e.unref(a).length;if(A!=null){A>=0?$[A]=k:(l.value=v,$.push(k));var G="";G=Array.isArray(t.value)||t.addColor?$:k,t.value===void 0?a.value=Array.isArray(G)?G:[G]:(o("update:value",G),o("change",G,k,A)),t.addColor&&v>=t.max&&(T.value=!1,o("overflowMax"))}},colorPicker:b,onColorClick:x,pickerRef:S,onColorItemDragStart:function(k){k.dataTransfer.effectAllowed="move";var A=k.target;V=+A.dataset.index},onColorItemDragOver:function(k){},onColorItemDrop:function(k){var A=+k.target.dataset.index,$=Ld(e.unref(a)),v=$[V];$.splice(V,1);var G=$.slice(0,A),C=$.splice(A),N=G.concat([v]).concat(C);o("update:value",N),o("change",N,N[V],V)},colorItemsRef:y,pickerStyle:w,values:r,teleportDisabled:I,toPopupContainer:M}}});Me(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),st.render=function(t,n,o,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:n[0]||(n[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:n[1]||(n[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:n[2]||(n[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:n[3]||(n[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},st.__scopeId="data-v-3c43ade8",st.__file="src/ColorPicker.vue";const Ud=e.defineComponent({name:"ColorPick",components:{PickColors:st,AInput:j.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,n){const o=e.computed({get:()=>t.value,set:r=>{n.emit("change",r)}});return{colorValue:o,onChangColor:r=>{o.value=r.hex}}}}),$u="",Gd={class:"color-pick"};function zd(t,n,o,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Gd,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":n[0]||(n[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":n[1]||(n[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const Hd=Z(Ud,[["render",zd],["__scopeId","data-v-e2113f43"]]),Wd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:st},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:n}){const o=l=>{n("change",l)},a=e.ref(13);return{onColorsChange:o,max:a,onOverflowMax:()=>{j.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Du="",qd={class:"color-group-pick"};function Yd(t,n,o,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",qd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Kd=Z(Wd,[["render",Yd],["__scopeId","data-v-b2be8322"]]),Xd=e.defineComponent({name:"FormGroup",components:{Draggable:ut,AppstoreAddOutlined:ko,MinusCircleOutlined:yl,PickColors:st,InputNumber:Mo,PlusCircleOutlined:wl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:n}){const o=e.computed({get:()=>t.value,set:c=>{n("change",c)}});return{myValue:o,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),_={};h.forEach(g=>{_[g]=""}),c.push(_)}else typeof f=="string"&&c.push(f);o.value=c}else j.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const _=c==null?void 0:c.target,g=(_==null?void 0:_.value)!=null?_==null?void 0:_.value:c;u?f[p][u]=g:f[p]=g,o.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){j.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),o.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),vu="",Qd={class:"form-group"},Jd={class:"form-row"},Zd={key:0,class:"label"},ep={key:1,class:"label"},tp={class:"icon-group"};function np(t,n,o,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Qd,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":n[0]||(n[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Jd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Zd,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",ep,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",tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const op=Z(Xd,[["render",np],["__scopeId","data-v-f0c0ab4d"]]),ap=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:j.Textarea},emits:["change"],setup(t,{emit:n}){return{onTextareaChange:a=>{n("change",a.target.value)}}}});function rp(t,n,o,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const lp=Z(ap,[["render",rp]]),ip=e.defineComponent({name:"PropsToForm",components:{Input:dc,InputNumber:Mo,RadioGroup:hc,Select:bc,Switch:xc,ColorPick:Hd,ColorGroupPick:Kd,FormGroup:op,Textarea:lp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const n=e.inject(Lt),o=e.inject(Jt),a=e.inject(Zt),r=e.computed(()=>{var s;return(s=e.unref(n))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):o(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:_="change",events:g}=p;c[u]={...p,valueProp:h,value:f,events:{[_]:(S,L=!0)=>{l(L?{[u]:S}:{})},...g}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:te.reduce(s,(c,p,u)=>{const f=ic[u];if(Array.isArray(f)){const h=f.find(_=>{const{onlyType:g,excludeType:S}=_;return g==null&&S==null?!0:g?Ee(e.unref(r),g):S?!Ee(e.unref(r),S):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Ee}}}),Pu="",sp={class:"props-to-form"},cp={class:"label"},dp={class:"component-wrapper"};function pp(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",cp,e.toDisplayString(i.label),1),e.createElementVNode("div",dp,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const up=Z(ip,[["render",pp],["__scopeId","data-v-c6fb2484"]]);function fp(){return new Worker("/assets/editor.worker-02df2e61.js")}function mp(){return new Worker("/assets/json.worker-867823a6.js")}function hp(){return new Worker("/assets/ts.worker-7254b425.js")}const yp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:n}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new mp:i==="typescript"||i==="javascript"?new hp:new fp}};const o=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=Ba.editor.create(o.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(te.debounce(()=>{const l=a==null?void 0:a.getValue();n("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();n("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:o}}}),Mu="",gp={class:"editor",ref:"dom"};function bp(t,n,o,a,r,l){return e.openBlock(),e.createElementBlock("div",gp,null,512)}const _a=Z(yp,[["render",bp],["__scopeId","data-v-71e88372"]]),Cp=[{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}],wp=e.defineComponent({name:"TableColumnConfig",components:{ATable:j.Table,AModal:j.Modal,ACheckbox:j.Checkbox,AInput:j.Input,AInputNumber:j.InputNumber,ASelect:j.Select,ASelectOption:j.SelectOption,Editor:_a},setup(){const t=e.inject(De),n=e.computed(()=>{var g;return!!((g=e.unref(t))!=null&&g.isGroupTable)}),o=e.computed(()=>{var g;return((g=e.unref(t))==null?void 0:g.graphicConfig)||{}}),a=e.computed(()=>{var g;return((g=e.unref(t))==null?void 0:g.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(o,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var S,L,w;let g=[];if(r.value=[],!n.value)g=((S=e.unref(o))==null?void 0:S.queryColumnList)||[];else{const B=((L=e.unref(o))==null?void 0:L.rowHeaderList)||[],m=((w=e.unref(o))==null?void 0:w.indicators)||[];g=[...B,...m]}g.forEach(B=>{var b;let m=(b=e.unref(a))==null?void 0:b.find(x=>x.prop===B.name);m||(m={label:B.label,prop:B.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(m)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:Cp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(g,S,L)=>{g&&S&&(l=g,i=S,d.value=g[S]||"",c.value=!0,s.value=L)},onEditorChange:g=>{try{d.value=g}catch(S){console.error(S)}},changeRenderBool:(g,S)=>{g.style=S.target.checked,g.style?g.renderBool===void 0&&(g.renderBool=!1):delete g.renderBool}}}}),ju="",xp={class:"table-column-config"};function kp(t,n,o,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",xp,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:_,text:g,record:S})=>[_.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:L=>t.changeRenderBool(S,L),checked:S.style},null,8,["onChange","checked"])):_.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:S.width,"onUpdate:value":L=>S.width=L,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):_.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[S.style?(e.openBlock(),e.createBlock(d,{key:1,value:S.renderText,"onUpdate:value":L=>S.renderText=L,readOnly:!0,onClick:L=>t.renderSave(S,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g),1)],64))],64)):_.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[S.style?(e.openBlock(),e.createBlock(d,{key:1,value:S.headerTemplate,"onUpdate:value":L=>S.headerTemplate=L,readOnly:!0,onClick:L=>t.renderSave(S,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g),1)],64))],64)):_.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:S.headerAlign,"onUpdate:value":L=>S.headerAlign=L},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:S.align,"onUpdate:value":L=>S.align=L},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:S.fixed,"onUpdate:value":L=>S.fixed=L},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:S.dataFormat,"onUpdate:value":L=>S.dataFormat=L,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):_.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[S.dataFormat&&S.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:S.retentiondigit,"onUpdate:value":L=>S.retentiondigit=L,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":n[0]||(n[0]=_=>t.editorVisible=_),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const _p=Z(wp,[["render",kp],["__scopeId","data-v-afebddc0"]]),Sp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:up,TableColumnConfig:_p,Editor:_a,AFormItem:j.FormItem,ASelect:j.Select,ASelectOption:j.SelectOption,ACollapse:j.Collapse,ACollapsePanel:j.CollapsePanel,ASwitch:j.Switch},setup(t){const n=e.ref([]),o=e.ref(["表格"]),a=e.inject(Lt),r=e.inject(Xn),l=e.inject(Jt),i=e.inject(Zt),d=e.inject(Kn),s=b=>{l({...eo[b]},!1),d()},c=e.computed(()=>{var b;return(b=e.unref(a))==null?void 0:b.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>lc.map(b=>{const{props:x,title:O,enableProps:V,onlyType:T,excludeType:M}=b,I=[];x.forEach(k=>{typeof k=="string"&&(p.includes(k)?t.isGroupTable&&I.push(k):I.push(k))});let R,y;return t.componentType==="table"&&(T!=null&&T.includes(t.componentType))?(R=typeof V=="string"&&r.value?r.value[V]:void 0,y=te.pick(e.unref(r),I)):(R=typeof V=="string"&&a.value?a.value[V]:void 0,y=te.pick(e.unref(a),I)),{title:O,enableProps:R,enablePropsName:V,onlyType:T,excludeType:M,props:y}}).filter(({props:b})=>Object.keys(b).length>0)),f=(b,x)=>{const{onlyType:O,excludeType:V}=b;return O==null&&V==null?!0:O?Ee(x,O):V?!Ee(x,V):!1},h=(b,x)=>(x==null||x.stopPropagation(),b),_=(b,x)=>{x!=null&&l({[x]:b})},g=e.computed(()=>JSON.stringify(e.unref(a),null,2)),S=b=>{try{const x=JSON.parse(b||"{}");l(x,!1)}catch(x){console.error(x)}},L=e.ref(""),w=b=>{try{L.value=b}catch(x){console.error(x)}},B=(b,x)=>{try{i({[x]:b})}catch(O){console.error(O)}},m=e.computed(()=>{var b;return["customGraph"].includes((b=e.unref(a))==null?void 0:b.type)});return{type:c,handleChangeType:s,activePanel:n,tablePanel:o,ComponentString:g,updateComponentOptions:S,tableOptions:r,optionCode:L,onEditorChange:w,tableEditorChange:B,onSwitchClick:h,onSwitchChange:_,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:m}}}),Ru="",Uu="",Ap={class:"style-group"};function Np(t,n,o,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),_=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Ap,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":n[0]||(n[0]=g=>t.type=g),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":n[1]||(n[1]=g=>t.activePanel=g)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.title},[t.isRenderForm(g,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.title?(e.openBlock(),e.createBlock(u,{header:g.title,key:g.title},{extra:e.withCtx(()=>[typeof g.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:g.enableProps,onChange:S=>t.onSwitchChange(S,g.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:g.props,disabled:typeof g.enableProps=="boolean"?!g.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":n[4]||(n[4]=g=>t.tablePanel=g)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,g=>{var S;return e.openBlock(),e.createElementBlock(e.Fragment,{key:g.title},[g.title&&((S=g.onlyType)!=null&&S.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:g.title,key:g.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:g.props,disabled:typeof g.enableProps=="boolean"?!g.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(_)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:n[2]||(n[2]=g=>t.tableEditorChange(g,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:n[3]||(n[3]=g=>t.tableEditorChange(g,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Tp=Z(Sp,[["render",Np],["__scopeId","data-v-2fb3e2ad"]]),Lp=e.defineComponent({name:"Card",components:{CloseOutlined:gn},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:n}){const o=e.inject(je),a=e.inject(Et),r=e.inject(Zn),l=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(k=>k.keyName!=="")}),i=e.computed(()=>{var A,$;const y=[],k=(A=e.unref(l))==null?void 0:A.find(v=>{var G;return v.id===((G=t.control)==null?void 0:G.id)});if(k){const v=k.type,G=te.pick(k,["value","startTime","endTime"]);($=Object.keys(G))!=null&&$.length||(G.value="");for(const C in G)if(Object.prototype.hasOwnProperty.call(G,C)){const N=e.unref(r)[C];if(Array.isArray(N)){const E=N.find(U=>Ee(v,U.onlyType));E&&y.push({label:E.label,value:C})}else y.push({label:N.label,value:C})}}return y}),d=()=>{n("delete",t.index),s(t.control.id)};function s(y){const k=e.unref(l).find(A=>A.id===y);if(k){const{type:A,id:$,events:v=[]}=k,G=$t(A),C=v.findIndex(N=>{var E;return N.on===G&&N.target===((E=e.unref(g))==null?void 0:E.id)&&N.emit==="refreshData"});C!==-1&&(v.splice(C,1),a({id:$,events:v}))}}const c=y=>{const k={...t.control};if(k.id=y,y){const A=e.unref(l).find($=>$.id===y);A&&(k.keyName=A.keyName,w(A,y))}delete k.prop,n("update",k,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=y=>{n("update",{...t.control,prop:y},t.index)},h=y=>{n("update",{...t.control,rule:y},t.index)},_=y=>{const k={...t.control};y==null?delete k.mode:k.mode=y,delete k.conditionLabel,delete k.conditionName,delete k.conditionKey,delete k.conditionValueType,n("update",k,t.index)},g=e.inject(De),S=e.inject(de),L=e.computed(()=>{var X;const{classificationList:y=[],seriesList:k=[],leftAxisList:A=[],rightAxisList:$=[],indicators:v=[],rowHeaderList:G=[],queryColumnList:C=[]}=e.unref(S),N=te.cloneDeep([...y,...k,...A,...$,...v,...G,...C]);if(N!=null&&N.length)for(const Y of N)Y.id=Y.name;const E=[{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(Y=>({...Y,id:Y.name,label:Y.title||Y.label})),...N];((X=e.unref(g))==null?void 0:X.type)==="ecanSelect"&&E.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const U=new Map,P=E.length;for(let Y=0;Y<P;Y++){const J=E[Y],{id:ae}=J||{};U.set(ae,J)}return[...U].map(([Y,J])=>J)});function w(y,k){var C;const{type:A,id:$,events:v=[]}=y,G=$t(A);if(e.unref(p)&&k!==e.unref(p)){const{controlList:N=[]}=e.unref(S);N.find(E=>E.id===e.unref(p))||s(e.unref(p))}v.find(N=>{var E;return N.on===G&&N.target===((E=e.unref(g))==null?void 0:E.id)&&N.emit==="refreshData"})||a({id:$,events:[...v,{on:G,target:(C=e.unref(g))==null?void 0:C.id,emit:"refreshData"}].reverse()})}const B=(y,k)=>{if(y){const{label:A,name:$,id:v,genericType:G,indexCode:C,typeGuid:N}=k||{};n("update",{...t.control,conditionKey:v,conditionLabel:A,conditionName:$,conditionValueType:G,indexCode:C,typeGuid:N},t.index)}else{const A={...t.control};delete A.conditionLabel,delete A.conditionName,delete A.conditionKey,delete A.conditionValueType,n("update",A,t.index)}},m=(y,k)=>{var A;return(A=k==null?void 0:k.keyName)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},b=(y,k)=>{var A;return(A=k==null?void 0:k.label)==null?void 0:A.toLowerCase().includes(y==null?void 0:y.toLowerCase())},x=e.computed(()=>{const y=e.unref(L).find(A=>A.id===t.control.conditionKey);let k="";return y&&(k=(y==null?void 0:y.genericType)||""),k==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:k==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:k==="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"}]:[]}),O=e.computed(()=>{let y=!1;const{id:k=""}=t.control;if(k){const A=e.unref(l).find(v=>v.id===k),$=["table","bar","combograph","line","pie","radar","scatter","list"];Ee(A==null?void 0:A.type,$)&&(y=!0)}return y}),V=e.computed(()=>{let y=!1;const{id:k=""}=t.control;if(k){const A=e.unref(l).find($=>$.id===k);(A==null?void 0:A.type)==="ecanRangePicker"&&(y=!0)}return y}),T=e.computed(()=>{let y=!1;const{id:k=""}=t.control;if(k){const A=e.unref(l).find($=>$.id===k);["ecanDatePicker","ecanRangePicker"].includes(A==null?void 0:A.type)&&(y=!0)}return y});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:_,onRuleChange:h,conditionKeyOptions:L,onConditionKeyChange:B,idFilterOption:m,filterOption:b,onFormatChange:y=>{n("update",{...t.control,format:y},t.index)},onModelPropChange:y=>{n("update",{...t.control,modelKey:y.target.value},t.index)},ruleOption:x,isShowProp:V,isShowFormat:T,isShowModelProp:O,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"}]}}}),Gu="",zu="",Ep={class:"control-card"};function Bp(t,n,o,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ep,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Op=Z(Lp,[["render",Bp],["__scopeId","data-v-cc665008"]]),Vp=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:Op,AButton:j.Button},setup(t,{expose:n}){const o=e.inject(je),a=e.inject(de),r=e.inject(Te),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&!Ln(h,"rule")&&(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL");return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:vo({...e.unref(a),...u},e.unref(o))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var _;const h=(_=e.unref(l))==null?void 0:_.slice();h[f]=u,d({controlList:h})};return n({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),Hu="",Ip={class:"control-group"},Fp={class:"control-group-header"},$p={class:"control-group-content"};function Dp(t,n,o,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",Ip,[e.createElementVNode("div",Fp,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",$p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const vp=Z(Vp,[["render",Dp],["__scopeId","data-v-365e5dd8"]]),Pp=(t={})=>{const n=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},o=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{o(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),o(i,"activeKey")&&delete i.activeKey,o(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:_,builtInCalcWay:g,formula:S,conditions:L,aggregate:w}=i;let B;return L&&(B=r(L)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:w,builtInFormula:h,builtInValueSource:_,builtInCalcWay:g,formula:S,conditions:B}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:_=[],seriesList:g=[],leftAxisList:S=[],rightAxisList:L=[],queryColumnList:w=[],indicators:B=[],dataSourceId:m,idxLibMode:b,preview:x=!1}=i||{};f==null&&(Ee(d,"table")?f="1":f="2");let O;if(Array.isArray(_)&&_.length>0){const I=_.length;for(let R=0;R<I;R++){const y=_[R]||{},{label:k="",name:A="",show:$=!1,sort:v,customGroup:G,conditions:C}=y;if($||I===1){O={label:k.trim(),columnName:A,show:$,sort:v,customGroup:G,conditions:r(C)};break}}}let V;if(Array.isArray(g)&&g.length>0){const I=g.length;for(let R=0;R<I;R++){const y=g[R]||{},{label:k="",name:A="",show:$=!1,sort:v,customGroup:G,conditions:C}=y;if($||I===1){V={label:k.trim(),columnName:A,show:$,sort:v,customGroup:G,conditions:r(C)};break}}}const T=[];w==null||w.forEach(I=>{T.push(n(I))});const M=[];if(S==null||S.forEach(I=>{I.location="LEFT",M.push(l(I))}),L==null||L.forEach(I=>{I.location="RIGHT",M.push(l(I))}),B==null||B.forEach(I=>{I.location="LEFT",M.push(l(I))}),!(f==="1"&&T.length===0)&&!(f==="2"&&M.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:O,series:V,indicatorList:M,queryColumns:T,pageFlag:!0,sqlConditions:[],dataSourceId:m,idxLibMode:b,preview:x})}catch(I){console.error(I)}}},Sa=(t,n)=>{const o={dayjs:ie,...n};let a="";const r=[];for(const d in o)a+=`${d},`,r.push(o[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Qt=(t="",{textData:n,codeData:o}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...n},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],_=l[h];_!=null&&(c=c.replace(h,_))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Sa(c,o)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Nt=(t,n)=>{var r;if(t==null)return n;const o=t.match(/\{.*\}/g);if(o==null||o.length===0)return n;const a=o.length;for(let l=0;l<a;l++){const i=o[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,n);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Sa(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},Mp=(t,n,o)=>{switch(t.type){case"bar":return jp(t,n,o);case"line":return Rp(t,n,o);case"pie":return Up(t,n,o);case"comboGraph":return Gp(t,n,o);default:return{}}},jp=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:_,seriesName:g,name:S,value:L,data:w}=c[h]||{};h===0&&(u+=`${S}<br/>`),u+=Qt(f,{textData:{marker:_,name:S,value:L,a:g,b:S,c:L,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},Rp=(t,n,o)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=n,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:o}}:p={value:c,textStyle:{fontSize:o}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:o},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:_,seriesName:g,name:S,value:L,data:w}=c[h]||{};h===0&&(u+=`${S}<br/>`),u+=Qt(f,{textData:{marker:_,name:S,value:L,a:g,b:S,c:L,...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 Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:o}},series:e.unref(s)}},Up=(t,n,o)=>{const{dataset:a=[]}=n;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return Qt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o===18?o:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:o===18?o:t.labelFontSize,position:t.labelPosition,formatter:Hi(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:{}}}]}},Gp=(t,n,o)=>{const{dimensions:a=[],dataset:r=[]}=n,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:o}}:c={value:s,textStyle:{fontSize:o}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:o,color:t.yAxisLabelColor,formatter(p){return Nt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:o}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const _=f[h],{tooltipFormatter:g}=_||{},{marker:S,seriesName:L,name:w,value:B,data:m}=s[h]||{};h===0&&(p+=`${w}<br/>`),p+=Qt(g||u,{textData:{marker:S,name:w,value:B,seriesName:L,a:L,b:w,c:B,...m}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:o}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},zp=(t=[],n)=>{let{name:o="name",types:a=[]}=n||{};o=(o==null?void 0:o.trim())||o;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:_,value:g}=h,S={...t[0],value:t[0][g]};r.add(_),p.push(S)}const u=t[0][o]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[o];r.add(f);for(let h=0;h<d;h++){const _=a[h],{label:g,value:S}=_,L={...u,value:u[S]};if(l.has(g)){const w=l.get(g);w.push(L),l.set(g,w)}else l.set(g,[L])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},Hp=(t,n)=>{let{name:o="name",value:a="value",type:r="type"}=n||{};o=o==null?void 0:o.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[o]||"",h=u[a]||"",_=u[r]||"";if(l.add(f),i.has(_)){const g=i.get(_);g.push({name:f,value:h,...u}),i.set(_,g)}else i.set(_,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},Wp=e.defineComponent({name:"ChartGraph",components:{ASpin:j.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:n}){const o=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Ae);let l=null;const i=e.inject(Ne)||"",d=e.inject(de)||{},s=e.inject(Lt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),_=e.computed(()=>h.value?Fa:12),g=e.ref({}),S=e.ref(),L=e.computed(()=>{const T=e.unref(o.value);if((T==null?void 0:T.type)==="customGraph")return S.value;const M=Mp(T,e.unref(g),_.value);return{toolbox:{show:T.toolboxShow,left:T.toolboxLeft,top:T.toolboxTop,itemSize:T.toolboxItemSize,itemGap:T.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:T.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:T.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:T.titleText,subtext:T.titleSubtext,left:"center"},grid:{top:T.gridTop,bottom:T.gridBottom,left:T.gridLeft,right:T.gridRight,containLabel:T.gridContainLabel},color:T.colors,...M}}),w=(T=[],M,I=!1)=>{const R=I?M:null;g.value=zp(T,R)},B=(T=[],M)=>{g.value=Hp(T,M)},m=async()=>{var T,M,I;try{const R=Pp({graphicConfig:e.unref(a.value),type:(T=e.unref(o.value))==null?void 0:T.type,request:r,indicatorToken:i});f.value=!0;const y=await R(),{columns:k=[],rows:A=[]}=((M=y==null?void 0:y.data)==null?void 0:M.data)??{};if(((I=e.unref(o.value))==null?void 0:I.type)==="pie"){let $=[];if(k.length>0){const v=k[0],G=k[1];$=A.map(C=>({name:C[v],value:C[G]}))}B($)}else{let $;k.length>0&&($={name:k[0],types:k.slice(1).map(v=>({label:v,value:v}))}),w(A,$,!0)}}catch(R){console.error(R)}finally{f.value=!1}},b={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},x=()=>{e.unref(g).dataset.length===0?u.value.setOption(b):u.value.setOption(L.value)},O=()=>{e.unref(o.value).type!=="customGraph"&&m()},V=()=>{var T;(T=u.value)==null||T.resize()};return e.watch(L,()=>{x()},{deep:!0}),e.watch(()=>e.unref(o.value).optionCode,T=>{try{const M=eval;S.value=M(T)}catch(M){console.error(M)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(V),l.observe(p.value)),u.value=Ia.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),n({refreshData:O}),{echartRef:c,loading:f}}}),Wu="",qp={class:"ecan-chart-graph",ref:"chartWrapRef"},Yp={style:{width:"100%",height:"100%"},ref:"echartRef"};function Kp(t,n,o,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",qp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",Yp,null,512)]),_:1},8,["spinning"])],512)}const Aa=Z(Wp,[["render",Kp],["__scopeId","data-v-8049fed2"]]),Xp=e.defineComponent({name:"DataConfig",components:{DataGroup:rc,StyleGroup:Tp,ChartGraph:Aa,ATabs:j.Tabs,ATabPane:j.TabPane,ControlGroup:vp},setup(){var m;const t=e.ref("1"),n=e.ref([0,1,2]),o=e.ref(),a=e.inject(De),r=e.inject(Yn),l=e.inject(de),i=e.inject(je),d=["text","proportion","select","checkbox","radio","radar"],s=e.computed(()=>{const b=te.cloneDeep(e.unref(a));c(b);const x=te.pick(b,te.without(Object.keys(b),"position","top","left","width","height"));Ee(b.type,d)?(x.height=b.height,x.width=b.width):x.height="290px";const O=te.cloneDeep(e.unref(l));return O.pageMode="design",O.componentList=i,O.preview=!0,{...x,graphicConfig:O,toolboxShow:!1}});function c(b){var x,O,V,T;["#ffffff","#fff"].includes((x=b==null?void 0:b.color)==null?void 0:x.toLowerCase())&&(b.color="#000"),["#ffffff","#fff"].includes((O=b==null?void 0:b.variableColor)==null?void 0:O.toLowerCase())&&(b.variableColor="#000"),["#ffffff","#fff"].includes((V=b==null?void 0:b.increaseColor)==null?void 0:V.toLowerCase())&&(b.increaseColor="#000"),["#ffffff","#fff"].includes((T=b==null?void 0:b.declineColor)==null?void 0:T.toLowerCase())&&(b.declineColor="#000")}const p=e.computed(()=>{let b=!0;return Ee(e.unref(s).type,d)&&(b=!1),b}),u=e.computed(()=>{var b;return(b=e.unref(s))==null?void 0:b.type}),f=e.computed(()=>{var b;return!!((b=e.unref(s))!=null&&b.isGroupTable)}),h=b=>{const x=b==="1";x&&u.value==="table"&&B(),window.changeShowTable&&window.changeShowTable(x),b==="3"&&w()},_=e.ref(),g=e.inject(Ae),S=e.unref(e.inject(Ne)),L=(m=window==null?void 0:window.config)==null?void 0:m.pageId;function w(){var I;const{leftAxisList:b=[],rightAxisList:x=[],queryColumnList:O=[],indicators:V=[]}=e.unref(l),T=[...b,...x,...O,...V],M={};for(const R of T){const{id:y="",indexCode:k=""}=R;y&&!Ln(R,"calcType")&&!M[y]&&(M[y]=k)}if((I=Object.keys(M))!=null&&I.length){const R=[];for(const y in M)R.push(new Promise((k,A)=>{g.post(`${Ce}/diagram/hrpIndexWithComplex`,{pageId:L,indexGuid:y,indexCode:M[y],dataSourceId:""},{headers:{Authentication:S,operateContext:"ygt"}}).then($=>{var C;const{success:v,data:G=[]}=$.data;v&&((C=G==null?void 0:G.dataViewColumns)!=null&&C.length)?k(G.dataViewColumns):A(G)}).catch($=>{A($)})}));Promise.all(R).then(y=>{if(y!=null&&y.length){const k=y.reduce((A,$)=>A.filter(v=>$.find(G=>G.typeGuid===v.typeGuid)));_.value=k.filter(A=>A.typeGuid)}})}}const B=()=>{var x;let b;r&&u.value==="table"?b=window.updateConfig:b=(x=e.unref(o))==null?void 0:x.refreshData,typeof b=="function"&&b()};return e.provide(Kn,B),e.watch(l,()=>{B()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:n,componentRef:o,type:u,isGroupTable:f,onChange:h,component:s,fullWidth:p,renderUsedComponents:i,intersection:_}}}),qu="",Qp={class:"data-config"},Jp={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Zp(t,n,o,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":n[0]||(n[0]=f=>t.activeKey=f),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Jp,null,512)):e.withDirectives((e.openBlock(),e.createBlock(u,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const eu=Z(Xp,[["render",Zp],["__scopeId","data-v-df437f90"]]),tu=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Rl,DataConfig:eu},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}}},setup(t,{expose:n,emit:o}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var b;return((b=e.unref(i))==null?void 0:b.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?te.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?te.cloneDeep(e.unref(i).chartsOptions):e.ref(te.cloneDeep(eo.line));p=e.ref(p);let u=e.unref(i).tableOptions?te.cloneDeep(e.unref(i).tableOptions):e.ref(te.cloneDeep($a));u=e.ref(u);const f=e.ref([]),h=b=>{f.value=b},_=b=>{c.value={...e.unref(c),...e.unref(b)}},g=(b,x=!0)=>{x?p.value={...e.unref(p),...e.unref(b)}:p.value={...e.unref(b)}},S=b=>{u.value={...e.unref(u),...e.unref(b)}},L=()=>f,w=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=te.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=te.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},B=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=B,t.request&&e.provide(Ae,t.request),e.provide(qn,{setDataList:h,getDataList:L});const m=b=>{o("updateUsedComponent",b)};return e.provide(De,i),e.provide(de,c),e.provide(Lt,p),e.provide(Xn,u),e.provide(en,r),e.provide(Yn,s),e.provide(Ne,l),e.provide(Te,_),e.provide(Jt,g),e.provide(Zt,S),e.provide(je,t.renderUsedComponentList),e.provide(Et,m),e.provide(Zn,t.mapAttributeProps),n({graphicConfig:c,chartsOptions:p,updateIndicatorData:w}),{isUpdate:a}}}),Yu="",nu={key:0,class:"config-modal"},ou={class:"config-modal-left"},au={class:"config-modal-right"};function ru(t,n,o,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nu,[e.createElementVNode("div",ou,[e.createVNode(i)]),e.createElementVNode("div",au,[e.createVNode(d)])]))}const Na=Wn(Z(tu,[["render",ru],["__scopeId","data-v-8e2109bf"]])),Ta=Wn(Aa),La=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ta,EcanIndicatorLibrary:Na},Symbol.toStringTag,{value:"Module"})),lu={install:(t,n)=>{const{request:o}=n;t.provide("$request",o),Object.keys(La).forEach(a=>{const r=La[a];r.install&&t.use(r)})}};pe.EcanChartGraph=Ta,pe.EcanIndicatorLibrary=Na,pe.default=lu,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|