@ecan-bi/datav 1.3.71 → 1.3.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +17 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.3.
|
|
1
|
+
/*! @ecan-bi/datav@1.3.72 */
|
|
2
2
|
(function(Ee,qe){typeof exports=="object"&&typeof module<"u"?qe(exports,require("vue"),require("echarts/core"),require("resize-detector"),require("ant-design-vue"),require("ant-design-vue/es/spin/style"),require("ant-design-vue/es/skeleton/style"),require("lodash-es"),require("dayjs"),require("axios"),require("mitt"),require("ant-design-vue/es/progress/style"),require("ant-design-vue/es/input/style"),require("ant-design-vue/es/date-picker/style"),require("ant-design-vue/es/date-picker/locale/zh_CN"),require("ant-design-vue/es/button/style"),require("ant-design-vue/es/checkbox/style"),require("ant-design-vue/es/select/style"),require("ant-design-vue/es/tree-select/style"),require("echarts/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/style"),require("echarts"),require("ant-design-vue/es/table/style"),require("ant-design-vue/es/notification/style"),require("xlsx"),require("big.js")):typeof define=="function"&&define.amd?define(["exports","vue","echarts/core","resize-detector","ant-design-vue","ant-design-vue/es/spin/style","ant-design-vue/es/skeleton/style","lodash-es","dayjs","axios","mitt","ant-design-vue/es/progress/style","ant-design-vue/es/input/style","ant-design-vue/es/date-picker/style","ant-design-vue/es/date-picker/locale/zh_CN","ant-design-vue/es/button/style","ant-design-vue/es/checkbox/style","ant-design-vue/es/select/style","ant-design-vue/es/tree-select/style","echarts/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","echarts","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],qe):(Ee=typeof globalThis<"u"?globalThis:Ee||self,qe(Ee["@ecan/bi-datav"]={},Ee.Vue,Ee["echarts/core"],Ee.ResizeDetector,Ee.AntDesignVue,null,null,Ee.LodashEs,Ee.Dayjs,Ee.Axios,Ee.Mitt,null,null,null,Ee["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,Ee["echarts/renderers"],Ee["echarts/charts"],Ee["echarts/components"],null,Ee.Echarts,null,null,Ee.Xlsx,Ee.big.js))})(this,function(exports,vue,core$1,resizeDetector,antDesignVue,style$1,style$2,lodashEs,dayjs,axios,mitt,style$3,style$4,style$5,locale,style$6,style$7,style$8,style$9,renderers,charts,components$1,style$a,echarts,style$b,style$c,xlsx,big_js){var Ee,qe,Ge,He;"use strict";function _interopNamespaceDefault(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const echarts__namespace=_interopNamespaceDefault(echarts),METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(e,r){function n(a){return(...o)=>{if(e.value||r(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[a].apply(e.value,o)}}function i(){const a=Object.create(null);return METHOD_NAMES.forEach(o=>{a[o]=n(o)}),a}return i()}function useAutoresize(e,r,n){let i=null;vue.watch([n,e,r],([a,o,s],l,c)=>{a&&o&&s&&(i=core$1.throttle(()=>{o.resize()},100),resizeDetector.addListener(a,i)),c(()=>{i&&a&&resizeDetector.removeListener(a,i)})})}const autoresizeProps={autoresize:Boolean},LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(e,r,n){const i=vue.inject(LOADING_OPTIONS_KEY,{}),a=vue.computed(()=>({...vue.unref(i),...n==null?void 0:n.value}));vue.watchEffect(()=>{const o=e.value;o&&(r.value?o.showLoading(a.value):o.hideLoading())})}const loadingProps$1={loading:Boolean,loadingOptions:Object},style="",onRE=/^on[^a-z]/,isOn=e=>onRE.test(e);function omitOn(e){const r={};for(const n in e)isOn(n)||(r[n]=e[n]);return r}const TAG_NAME="x-vue-echarts",THEME_KEY="ecTheme",INIT_OPTIONS_KEY="ecInitOptions",UPDATE_OPTIONS_KEY="ecUpdateOptions",Echarts=vue.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...autoresizeProps,...loadingProps$1},inheritAttrs:!1,setup(e,{attrs:r,listeners:n}){const i=vue.shallowRef(),a=vue.shallowRef(),o=vue.shallowRef(),s=vue.inject(THEME_KEY,null),l=vue.inject(INIT_OPTIONS_KEY,null),c=vue.inject(UPDATE_OPTIONS_KEY,null),{autoresize:u,manualUpdate:h,loading:b,loadingOptions:f}=vue.toRefs(e),g=vue.computed(()=>o.value||e.option||Object.create(null)),v=vue.computed(()=>e.theme||vue.unref(s)||{}),y=vue.computed(()=>e.initOptions||vue.unref(l)||{}),E=vue.computed(()=>e.updateOptions||vue.unref(c)||{}),d=vue.computed(()=>omitOn(r));function m(P){if(a.value||!i.value)return;const _=a.value=core$1.init(i.value,v.value,y.value);e.group&&(_.group=e.group);let F=n;F||(F={},Object.keys(r).filter(L=>L.indexOf("on")===0&&L.length>2).forEach(L=>{const M=L.charAt(2).toLowerCase()+L.slice(3);F[M]=r[L]})),Object.keys(F).forEach(L=>{const M=F[L];M&&(L.indexOf("zr:")===0?_.getZr().on(L.slice(3).toLowerCase(),M):_.on(L.toLowerCase(),M))});function D(){if(_&&!_.isDisposed())try{_.resize()}catch(L){if(L.message==="Cannot read property 'get' of undefined")return;throw L}}function R(){_.setOption(P||g.value,E.value)}u.value?vue.nextTick(()=>{D(),R()}):R()}function p(P,_){e.manualUpdate&&(o.value=P),a.value?a.value.setOption(P,_||{}):m(P)}function x(){a.value&&(a.value.dispose(),a.value=void 0)}let A=null;vue.watch(h,P=>{typeof A=="function"&&(A(),A=null),P||(A=vue.watch(()=>e.option,_=>{_&&(a.value?a.value.setOption(_,E.value):m())},{deep:!0}))},{immediate:!0}),vue.watch([v,y],()=>{x(),m()},{deep:!0}),vue.watchEffect(()=>{e.group&&a.value&&(a.value.group=e.group)});const C=usePublicAPI(a,m);return useLoading(a,b,f),useAutoresize(a,u,i),vue.onMounted(()=>{e.option&&m()}),vue.onUnmounted(x),{chart:a,root:i,setOption:p,nonEventAttrs:d,...C}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",vue.h(TAG_NAME,e)}});function bound01(e,r){isOnePointZero(e)&&(e="100%");var n=isPercentage(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function isOnePointZero(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function isPercentage(e){return typeof e=="string"&&e.indexOf("%")!==-1}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function convertToPercentage(e){return e<=1?"".concat(Number(e)*100,"%"):e}function pad2(e){return e.length===1?"0"+e:String(e)}function rgbToRgb(e,r,n){return{r:bound01(e,255)*255,g:bound01(r,255)*255,b:bound01(n,255)*255}}function hue2rgb(e,r,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(r-e)*(6*n):n<1/2?r:n<2/3?e+(r-e)*(2/3-n)*6:e}function hslToRgb(e,r,n){var i,a,o;if(e=bound01(e,360),r=bound01(r,100),n=bound01(n,100),r===0)a=n,o=n,i=n;else{var s=n<.5?n*(1+r):n+r-n*r,l=2*n-s;i=hue2rgb(l,s,e+1/3),a=hue2rgb(l,s,e),o=hue2rgb(l,s,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function rgbToHsv(e,r,n){e=bound01(e,255),r=bound01(r,255),n=bound01(n,255);var i=Math.max(e,r,n),a=Math.min(e,r,n),o=0,s=i,l=i-a,c=i===0?0:l/i;if(i===a)o=0;else{switch(i){case e:o=(r-n)/l+(r<n?6:0);break;case r:o=(n-e)/l+2;break;case n:o=(e-r)/l+4;break}o/=6}return{h:o,s:c,v:s}}function hsvToRgb(e,r,n){e=bound01(e,360)*6,r=bound01(r,100),n=bound01(n,100);var i=Math.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6,u=[n,s,o,o,l,n][c],h=[l,n,n,s,o,o][c],b=[o,o,l,n,n,s][c];return{r:u*255,g:h*255,b:b*255}}function rgbToHex(e,r,n,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(r).toString(16)),pad2(Math.round(n).toString(16))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}var names={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 inputToRGB(e){var r={r:0,g:0,b:0},n=1,i=null,a=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=stringInputToObject(e)),typeof e=="object"&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(r=rgbToRgb(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(i=convertToPercentage(e.s),a=convertToPercentage(e.v),r=hsvToRgb(e.h,i,a),s=!0,l="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(i=convertToPercentage(e.s),o=convertToPercentage(e.l),r=hslToRgb(e.h,i,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=boundAlpha(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),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 stringInputToObject(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(names[e])e=names[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:r?"name":"hex8"}:(n=matchers.hex6.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:r?"name":"hex"}:(n=matchers.hex4.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:r?"name":"hex8"}:(n=matchers.hex3.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:r?"name":"hex"}:!1)))))))))}function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(String(e))}var hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{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 toHsv(e){var r=e.r,n=e.g,i=e.b,a=rgbToHsv(r,n,i);return{h:a.h*360,s:a.s,v:a.v}}function toHex(e){var r=e.r,n=e.g,i=e.b;return"#".concat(rgbToHex(r,n,i,!1))}function mix(e,r,n){var i=n/100,a={r:(r.r-e.r)*i+e.r,g:(r.g-e.g)*i+e.g,b:(r.b-e.b)*i+e.b};return a}function getHue(e,r,n){var i;return Math.round(e.h)>=60&&Math.round(e.h)<=240?i=n?Math.round(e.h)-hueStep*r:Math.round(e.h)+hueStep*r:i=n?Math.round(e.h)+hueStep*r:Math.round(e.h)-hueStep*r,i<0?i+=360:i>=360&&(i-=360),i}function getSaturation(e,r,n){if(e.h===0&&e.s===0)return e.s;var i;return n?i=e.s-saturationStep*r:r===darkColorCount?i=e.s+saturationStep:i=e.s+saturationStep2*r,i>1&&(i=1),n&&r===lightColorCount&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function getValue(e,r,n){var i;return n?i=e.v+brightnessStep1*r:i=e.v-brightnessStep2*r,i>1&&(i=1),Number(i.toFixed(2))}function generate$1(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],i=inputToRGB(e),a=lightColorCount;a>0;a-=1){var o=toHsv(i),s=toHex(inputToRGB({h:getHue(o,a,!0),s:getSaturation(o,a,!0),v:getValue(o,a,!0)}));n.push(s)}n.push(toHex(i));for(var l=1;l<=darkColorCount;l+=1){var c=toHsv(i),u=toHex(inputToRGB({h:getHue(c,l),s:getSaturation(c,l),v:getValue(c,l)}));n.push(u)}return r.theme==="dark"?darkColorMap.map(function(h){var b=h.index,f=h.opacity,g=toHex(mix(inputToRGB(r.backgroundColor||"#141414"),inputToRGB(n[b]),f*100));return g}):n}var presetPrimaryColors={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"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(e){presetPalettes[e]=generate$1(presetPrimaryColors[e]),presetPalettes[e].primary=presetPalettes[e][5],presetDarkPalettes[e]=generate$1(presetPrimaryColors[e],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[e].primary=presetDarkPalettes[e][5]});var containers=[],styleElements=[],usage="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function createStyleElement(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function insertCss(e,r){if(r=r||{},e===void 0)throw new Error(usage);var n=r.prepend===!0?"prepend":"append",i=r.container!==void 0?r.container:document.querySelector("head"),a=containers.indexOf(i);a===-1&&(a=containers.push(i)-1,styleElements[a]={});var o;return styleElements[a]!==void 0&&styleElements[a][n]!==void 0?o=styleElements[a][n]:(o=styleElements[a][n]=createStyleElement(),n==="prepend"?i.insertBefore(o,i.childNodes[0]):i.appendChild(o)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),o.styleSheet?o.styleSheet.cssText+=e:o.textContent+=e,o}function _objectSpread$8(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?Object(arguments[r]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),i.forEach(function(a){_defineProperty$8(e,a,n[a])})}return e}function _defineProperty$8(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function warn(e,r){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(r))}function warning(e,r){warn(e,"[@ant-design/icons-vue] ".concat(r))}function isIconDefinition(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function generate(e,r,n){return n?vue.h(e.tag,_objectSpread$8({key:r},n,e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(r,"-").concat(e.tag,"-").concat(a))})):vue.h(e.tag,_objectSpread$8({key:r},e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(r,"-").concat(e.tag,"-").concat(a))}))}function getSecondaryColor(e){return generate$1(e)[0]}function normalizeTwoToneColors(e){return e?Array.isArray(e)?e:[e]:[]}var iconStyles=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
@@ -96,7 +96,7 @@ version: 2.9.0
|
|
|
96
96
|
`,n+="-----END PUBLIC KEY-----",n},r.hasPublicKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")&&n.hasOwnProperty("d")&&n.hasOwnProperty("p")&&n.hasOwnProperty("q")&&n.hasOwnProperty("dmp1")&&n.hasOwnProperty("dmq1")&&n.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(n){this.n=n.n,this.e=n.e,n.hasOwnProperty("d")&&(this.d=n.d,this.p=n.p,this.q=n.q,this.dmp1=n.dmp1,this.dmq1=n.dmq1,this.coeff=n.coeff)},r}(RSAKey),_a,version=typeof process<"u"?(_a=process.env)===null||_a===void 0?void 0:_a.npm_package_version:void 0,JSEncrypt=function(){function e(r){r===void 0&&(r={}),r=r||{},this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=null}return e.prototype.setKey=function(r){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(r)},e.prototype.setPrivateKey=function(r){this.setKey(r)},e.prototype.setPublicKey=function(r){this.setKey(r)},e.prototype.decrypt=function(r){try{return this.getKey().decrypt(b64tohex(r))}catch{return!1}},e.prototype.encrypt=function(r){try{return hex2b64(this.getKey().encrypt(r))}catch{return!1}},e.prototype.sign=function(r,n,i){try{return hex2b64(this.getKey().sign(r,n,i))}catch{return!1}},e.prototype.verify=function(r,n,i){try{return this.getKey().verify(r,b64tohex(n),i)}catch{return!1}},e.prototype.getKey=function(r){if(!this.key){if(this.key=new JSEncryptRSAKey,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version,e}();const encryptor=new JSEncrypt,aesKey=createAesKey();function createAesKey(){let r=Math.random().toString(36).substr(2);for(;r.length<16;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,16),r}const iv=CryptoJS.enc.Utf8.parse("ABCDEF1234123412");function aesEncrypt(e,r){r=r||aesKey;const n=CryptoJS.enc.Utf8.parse(r);let i="";switch(typeof e){case"string":i=CryptoJS.enc.Utf8.parse(e);break;case"object":i=CryptoJS.enc.Utf8.parse(JSON.stringify(e));break;default:i=CryptoJS.enc.Utf8.parse(e.toString())}return CryptoJS.AES.encrypt(i,n,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding}).toString()}function aesDecrypt(e,r){r=r||aesKey;const n=CryptoJS.enc.Utf8.parse(r),i=CryptoJS.AES.decrypt(e,n,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding});return CryptoJS.enc.Utf8.stringify(i).toString()}function setPublicKey(e){encryptor.setPublicKey(e)}function rsaEncrypt(e){return encryptor.encrypt(e)}function hasEncryptUrl(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const n=["/diagram","/dataview"].map(i=>`^(.*?)${i}(/|$)`);for(const i of n)if(new RegExp(i).test(e))return!0;return!1}function EncryptConfigParam(e){const{paramType:r,data:n,params:i,method:a}=e;r==="form"?["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(n,"string"):["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(n)}function getEncryptParam(e,r){let n=e||{};if(r==="string"){n="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const c=e[l];n+=`${l}=${encodeURIComponent(c)}&`}}setPublicKey("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const a=rsaEncrypt(aesKey);return{c:aesEncrypt(n,aesKey),p:a}}window.getEncryptParam=getEncryptParam;function encryptData(e,r){var n;(n=window==null?void 0:window.config)!=null&&n.encryptFlag&&hasEncryptUrl(e.url)&&(e.data instanceof FormData?e.data=getEncryptFileParam(e.data):EncryptConfigParam(e))}function getEncryptFileParam(e){const r=e.entries(),n=new FormData,i={};for(const o of r){const s=o[0],l=o[1];l instanceof Blob?n.append(s,l):i[s]=l}const a=getEncryptParam(i,"json");return typeof a=="object"&&(n.append("c",a.c),n.append("p",a.p)),n}window.xhaesKey=aesKey,window.xhaesDecrypt=aesDecrypt;function decryptData(e,r){var n;if((n=window==null?void 0:window.config)!=null&&n.encryptFlag&&hasEncryptUrl(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const i=aesDecrypt(e.data.data.content,aesKey);e.data=JSON.parse(i)}}const requestErrorTip=window.config.requestErrorTip,request=axios.create({timeout:1e3*180});request.interceptors.request.use(e=>{const{requestParams:r={}}=window.config;return r!=null&&r.pltToken&&(e.headers["Plt-Token"]=r.pltToken),encryptData(e),e},e=>Promise.reject(e)),request.interceptors.response.use(e=>{var r,n,i;return requestErrorTip&&+((r=e==null?void 0:e.data)==null?void 0:r.code)==500&&antDesignVue.message.error({content:((n=e==null?void 0:e.data)==null?void 0:n.msg)||((i=e==null?void 0:e.data)==null?void 0:i.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),decryptData(e),e},e=>{if(decryptData(e==null?void 0:e.response),requestErrorTip)if(e.message.includes("timeout"))antDesignVue.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:r}=(e==null?void 0:e.response)||{};r>=400&&r<500&&antDesignVue.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),r>=500&&antDesignVue.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(e)});const handleFormatter=e=>e.replace(/\\n/g,`
|
|
97
97
|
`),formatMoney=(e,r=2)=>{const n=parseFloat(e+"");return isNaN(n)?e:n.toFixed(r).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},formatThousands=e=>{const r=parseFloat(e+"");return isNaN(r)?e:(r+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},formatPercentage=(e,r=2)=>{const n=e+"";if(n.includes("%"))return e;const i=parseFloat(n);return isNaN(i)?e:`${(i*100).toFixed(r)}%`},formatDecimals=(e,r=2)=>{const n=e+"",i=parseFloat(n);return isNaN(i)?e:i.toFixed(r)},formatCustom=(e,r)=>useValueFormatter(r,e),lowerCaseIncludes=(e,r)=>{if(typeof e=="string"&&typeof r=="string")return e.toLocaleLowerCase().includes(r.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(r)){const n=r.length;for(let i=0;i<n;i++){const a=r[i];if(typeof a=="string"&&e.toLocaleLowerCase().includes(a.toLocaleLowerCase()))return!0}}return!1},hasOwn=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),getFixedValueDatas=e=>{const{leftAxisList:r=[],rightAxisList:n=[],queryColumnList:i=[],indicators:a=[]}=e;return[...r,...n,...i,...a].filter(o=>(o==null?void 0:o.calcType)==="COMPONENT").map(o=>({keyName:o.builtInCalcWay,id:o.builtInValueSource}))},canRequestIndicator=(e,r)=>{let n=!0;const i=getFixedValueDatas(e);return i!=null&&i.length&&(n=i.map(a=>r[a.id]).every(a=>a)),n},getLegendFormat=(e,r)=>{var s;const n=e.match(/\{(.+?)\}/g),i=((s=e.split(`
|
|
98
98
|
`))==null?void 0:s.length)-1;let a="";if(i)for(let l=0;l<i;l++)a+=`
|
|
99
|
-
`;let o=e;if(n!=null&&n.length){for(const l of n){const c=useVariablesInText(l,{textData:r},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e},setDefaultRangeVal=(e,r)=>{const{props:n,componentList:i,getGlobalModel:a}=e,{graphicConfig:o={},startValue:s,endValue:l}=n,c=getdefCompleteData({graphicConfig:o,startValue:s,endValue:l,componentList:i,getGlobalModel:a}),{dimensions:u,dataset:h}=r,{classificationList:b=[]}=o,g=b.find(v=>v.show).label||"";for(const v of c)u.includes(v)||u.push(v);u.sort((v,y)=>dayjs(v).isBefore(dayjs(y))?-1:1);for(const v of h){const{data:y}=v;if(y!=null&&y.length){const E=[];for(const d of c)if(y.find(m=>m[g]!==d)){const m=lodashEs.cloneDeep(y[0]);for(const p in m)p===g?m[p]=d:m[p]=0;E.push(m)}v.data.push(...E),v.data.sort((d,m)=>dayjs(d[g]).isBefore(dayjs(m[g]))?-1:1)}}},getConditions=e=>{const r=[];for(const n of e)n.conditions?r.push(...getConditions(n.conditions)):(n==null?void 0:n.dataType)==="component"&&r.push(n);return r};function getdefCompleteData(e){const{startValue:r,endValue:n,componentList:i,graphicConfig:a,getGlobalModel:o}=e,s=getVariableAndField(r),l=getVariableAndField(n),c=[];if(s&&l){const u=i.find(b=>b.keyName===s.keyName),h=i.find(b=>b.keyName===l.keyName);if(u&&h){const b=o(u.id),f=o(h.id),{classificationList:g=[]}=a,v=g.find(y=>y.show);if(v){let y="YYYY-MM";switch(v.name){case"the_year":y="YYYY";break;case"the_month":y="MM";break;case"the_day":y="DD";break;case"the_date":y=(v==null?void 0:v.dateFormat)||y;break}const E=getFormatStep(y);if(y){const d=vue.unref(b[s.field]),m=vue.unref(f[l.field]);let p=dayjs(d);const x=dayjs(m);for(c.push(x.format(y));p.isBefore(x);)c.push(p.format(y)),p=p.add(1,E)}}}}return c}function getVariableAndField(e){let r=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let i=n[0].slice(1,-1).trim();const a=i.match(/\[(.+?)\]/g);let o="";a!=null&&a.length&&(i=i.replace(a[0],""),o=a[0].slice(1,-1).trim()),r={keyName:i,field:o}}}return r}function getFormatStep(e){const r=e.split("-");let n="";if(r!=null&&r.length)switch(r[r.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const runCode=(e,r)=>{const n={dayjs,...r};let i="";const a=[];for(const l in n)i+=`${l},`,a.push(n[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText=(e="",{textData:r,codeData:n}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const s={...window.config||{},...r},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let c=0;c<l.length;c++){const u=l[c];let h=u.slice(1,-1).trim();const b=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=h.match(b);for(let g=0;g<f.length;g++){const v=f[g],y=s[v];y!=null&&typeof y!="function"&&(h=h.replace(v,y))}(/\(.*\)/g.test(h)||/[+/\\*]/g.test(h))&&(h=runCode(h,n)),e=e.replace(u,h)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},useRequestData=(e,r=()=>{})=>{const{requestUrl:n,requestMethod:i,requestHeaders:a,requestParams:o,requestInterval:s,isOpenRequestTimer:l,openCustomRequestData:c,projectRequestUrl:u="",getModel:h,requestParamsMode:b,customRequestParams:f}=e,{pageMode:g}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{contextRequestUrl:v,touchEventId:y}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:E}=vue.inject(GLOBAL_MODEL,{getGlobalModel:A=>{}})||{},d=h||E,m=useVariablesInText(n),p=async(A={})=>{if(!m||!i||!a)return;let C={};for(const M of o){const{key:V,value:B}=M;if(typeof B=="object"&&B!=null&&B.id){let k={};const{id:I,prop:S,propKey:w,operate:O}=B;I==="THIS"?k=d(vue.unref(y))||{}:k=d(I)||{};const T=vue.unref(k[S]);let G=null;if(["date","range"].some(N=>lowerCaseIncludes(k==null?void 0:k.type,N))){const{value:N,type:W,mode:q}=O||{};if(N&&W&&q)switch(W){case"add":G=vue.unref(T).add(N,q);break;case"minus":G=vue.unref(T).subtract(N,q);break}G==null&&(G=vue.unref(T)),G=(G==null?void 0:G.format((w==null?void 0:w.trim())||k.format))||""}else Object.prototype.toString.call(T)==="[object Object]"?w?G=T[w]:G=S?T[S]:T:lowerCaseIncludes(k==null?void 0:k.type,"select")&&vue.unref(T)&&S&&Array.isArray(vue.unref(T))?G=vue.unref(T).map(N=>Object.prototype.hasOwnProperty.call(N,S)?N[S]:N):G=T;C[V]=G}else typeof B=="string"&&(C[V]=useVariablesInText(B))}if(b==="2"&&f!=="{}"){const M=JSON.parse(f);P(M),M&&(C=M)}function P(M){var B;const V={...C,...((B=window==null?void 0:window.config)==null?void 0:B.requestParams)||{}};if(Array.isArray(M))M.forEach((k,I)=>{if(typeof k=="string"){const S=k.match(/\${(.+?)\}/g);if(S!=null&&S.length){const w=S[0].slice(2,-1);w&&V[w]?M[I]=V[w]:M[I]=""}}else P(k)});else if(Object.prototype.toString.call(M)==="[object Object]")for(const k in M)if(typeof M[k]=="string"){const I=M[k].match(/\${(.+?)\}/g);if(I!=null&&I.length){const S=I[0].slice(2,-1);S&&V[S]?M[k]=V[S]:M[k]=""}}else P(M[k])}C={...window.config.requestParams,...A,...C};let _="";const F=Object.keys(C),D=F.length-1,R=F.length;F.forEach((M,V)=>{let B=C[M];Object.prototype.toString.call(B)==="[object Object]"&&(B=JSON.stringify(B)),V===0?R!==1?_+=`?${M}=${B}&`:_+=`?${M}=${B}`:V===D?_+=`${M}=${B}`:_+=`${M}=${B}&`});function L(M){var k;const V=JSON.parse(M),B=((k=window==null?void 0:window.config)==null?void 0:k.requestParams)||{};if(Object.prototype.toString.call(V)==="[object Object]"){for(const I in V)if(typeof V[I]=="string"){const S=V[I].match(/\${(.+?)\}/g);if(S!=null&&S.length){const w=S[0].slice(2,-1);w&&B[w]?V[I]=B[w]:V[I]=""}}}return V}try{const M=["get","head"].includes(i),V={};let B=M?m+_:m;C.dataSqlId&&!B.includes("dataSqlId")&&(B+=`${B.includes("?")?"&":"?"}dataSqlId=${C.dataSqlId}`),Object.prototype.hasOwnProperty.call(C,"signal")&&(V.signal=C.signal);const k=await request({baseURL:vue.unref(v)||u||"",url:B,method:i,headers:a?L(a):{},data:M?{}:C,...V});return r(k),k}catch(M){console.error(M)}},x=vue.unref(g)!=="design"&&l&&(c||c===void 0)&&setInterval(p,s*1e3);return vue.onUnmounted(()=>{clearInterval(x)}),p},useTransformChartDataByAttrKey=(e=[],r,n=!1)=>{let{name:i="name",types:a=[]}=r||{};i=(i==null?void 0:i.trim())||i;const o=new Set,s=new Map,l=e.length,c=a.length;if(l===1&&!n){const b=[];for(let g=0;g<c;g++){const v=a[g],{label:y,value:E}=v,d={...e[0],value:e[0][E]};o.add(y),b.push(d)}const f=e[0][i]||"";s.set(f,b)}else for(let b=0;b<l;b++){const f=e[b],g=f[i];o.add(g);for(let v=0;v<c;v++){const y=a[v],{label:E,value:d}=y,m={...f,value:f[d]||0};if(s.has(E)){const p=s.get(E);p.push(m),s.set(E,p)}else s.set(E,[m])}}const u=Array.from(o),h=[];for(const[b,f]of s)h.push({name:b,data:f});return{dimensions:u,dataset:h}},useImagePath=(e,r=!1)=>{var i;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((i=window==null?void 0:window.config)==null?void 0:i.uploadPath)+e,r&&(n=`url(${n})`),n},usePageUrl=(e,r)=>{const n=`${BASE_URL}/preview?pageId=${r}`,i=`${BASE_URL}/${r}`;return e==="preview"?n:i},useValueFormatter=(e,r)=>{var a;if(e==null)return r;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return r;const i=n.length;for(let o=0;o<i;o++){const s=n[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,r);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e},useIndicatorData=(e={},r=()=>{})=>{var A;const{pageMode:n}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:i}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:a}=vue.inject(LOADED_DATA,{setLoadedData:(C,P)=>{}}),{getGlobalModel:o}=vue.inject(GLOBAL_MODEL,{getGlobalModel:C=>{}});e.dataType==="indicator"&&i();const s=C=>{const{around:P,unit:_,id:F}=C;let D="";const{pageMode:R="",componentList:L=[]}=(e==null?void 0:e.graphicConfig)||{};let M=null,V=null;if(R==="design"){const B=L==null?void 0:L.find(G=>G.id===F);if(!B)return[];const{interval:k,intervalUnit:I,startTime:S,endTime:w,operate:O,useCurrentTime:T}=B||{};if(T&&(M=dayjs().subtract(k,I),V=dayjs()),S&&(M=dayjs(S)),w&&(V=dayjs(w)),O){const{type:G,value:H,mode:N}=O;switch(G){case"add":M=M&&M.add(H,N),V=V&&V.add(H,N);break;case"minus":M=M&&M.subtract(H,N),V=V&&V.subtract(H,N)}}}else{const B=o(F)||{};vue.unref(B.startTime)&&(M=dayjs(vue.unref(B.startTime))),vue.unref(B.endTime)&&(V=dayjs(vue.unref(B.endTime)))}if(M&&V){const B=V.diff(M,_.toLowerCase());D=`${P==="before"?"-":""}${B+1}`}return D?[D]:[]},l=(C,P)=>Object.prototype.hasOwnProperty.call(C,P),c=(C,P)=>{if(P)l(C,"indexCode")&&(C.hrpIndexCode=C.indexCode,delete C.indexCode),l(C,"indexCodeNum")&&(C.hrpIndexCodeNum=C.indexCodeNum,delete C.indexCodeNum),l(C,"dataType")&&delete C.dataType;else{const{calcWays:_=[],dateCalcTypes:F=[],activeKey:D,componentId:R=""}=C;if(D===5&&(_!=null&&_.length)&&(F!=null&&F.length)&&R){const L=_[0].split("-");(L==null?void 0:L.length)>1&&L[0]==="rangeValue"&&(C.calcWays=s({around:L[1],unit:F[0],id:R})),delete C.radioValue}l(C,"dataType")&&(C.fieldType==="DATE"&&(C.label=C.fieldName),C.dataType==="component"&&(C.fieldValue="${"+C.fieldValue+"}"),delete C.dataType),l(C,"activeKey")&&delete C.activeKey,l(C,"radioValue")&&delete C.radioValue,l(C,"indexCode")&&(C.hrpIndexCode=C.indexCode,delete C.indexCode),l(C,"indexCodeNum")&&(C.hrpIndexCodeNum=C.indexCodeNum,delete C.indexCodeNum),C.dataType!=="component"&&C.useCurrentTime&&(C.fieldValue=dayjs().format(C.dateFormat)),delete C.useCurrentTime}},u=(C,P)=>{const _=[];return C!=null&&C.length&&lodashEs.cloneDeep(C).forEach(F=>{if(F.join&&F.conditions){const D=!F.conditions.some(R=>R.join&&R.conditions);F.conditions.forEach((R,L)=>{c(R,P);const M={};if(L<F.conditions.length-1&&(M.join=F.join),D)_.push({...M,...R});else if(R.join&&R.conditions){const V=P?"sqlConditions":"conditions";_.push({[V]:u([R],P),...M})}else _.push({...M,...R})})}else c(F,P),_.push(F)}),_},h=(C={},P)=>{if(C!=null&&C.sortCpnts&&P){const q=m(C);q&&(P.sort=q)}const{label:_,name:F,location:D,show:R,indexCode:L,indexCodeNum:M,calcType:V="COLUMN",builtInFormula:B,builtInValueSource:k,builtInCalcWay:I,formula:S,conditions:w,aggregate:O,distinct:T,dimByCount:G,dataTo:H}=C;let N;if(w&&(N=u(w)),V==="COMPONENT"){const q={};return E(q,k),{label:_.trim(),columnName:F,show:R,calcType:V,componentAlias:I,componentValue:q.fieldValue||null}}const W={label:_.trim(),columnName:F,location:D,show:R,calcType:H==="1"?"VIEW":V,hrpIndexCode:L,hrpIndexCodeNum:M,aggregate:O,builtInFormula:B,builtInValueSource:k,formula:S,conditions:N};if(B==="DATE_OFFSET"){const q=I.split("-");if((q==null?void 0:q.length)===3){let j=q[0];return q[2]==="before"&&q[0]!=="0"&&(j=`-${q[0]}`),{...W,calcWays:[j],dateCalcTypes:[q[1]]}}}else return F==="the_count"&&(W.calcType="AGGREGATE",W.distinct=!!T,W.typeGuid=G),{...W,builtInCalcWay:I}},b=C=>{if(!C)return[];const P=lodashEs.cloneDeep((C==null?void 0:C.controlList)||[]).filter(O=>O.conditionKey!=="parentCode"),{classificationList:_=[],rowHeaderList:F=[],dimensionList:D=[],seriesList:R=[],leftAxisList:L=[],rightAxisList:M=[],queryColumnList:V=[],indicators:B=[]}=C;v(P);const k=[..._,...F,...D,...R,...L,...M,...V,...B],I=[];for(const O of k){const T=getConditions((O==null?void 0:O.conditions)||[]);if(T!=null&&T.length){const G=T.filter(H=>(H==null?void 0:H.dataType)==="component").map(H=>{const N={};return H!=null&&H.dateFormat&&(N.format=H.dateFormat),{conditionKey:H.fieldName,conditionLabel:H.fieldName,conditionName:H.fieldName,conditionValueType:H.fieldType,id:H.componentId,keyName:H.fieldValue,rule:H.rule,notGlobal:!0,indexCode:H.indexCode,typeGuid:H.typeGuid,indexCodeNum:H.indexCodeNum,...N}});if(G!=null&&G.length)for(const H of G)I.find(N=>N.keyName===H.keyName)||I.push(H)}}const S=I.length,w=P;for(let O=0;O<S;O++){const T=I[O];if((T==null?void 0:T.conditionKey)==="parentCode")continue;const{id:G,keyName:H,prop:N,format:W,modelKey:q,dataType:j="component",customValue:$}=T,U=f(T);E(U,G,{prop:N,dateFormat:W,modelKey:q,keyName:H}),j===""&&(U.fieldValue=$||""),w.push(U)}for(let O=w.length-1;O>=0;O--){const T=w[O];T.globalCondition||getConditions(w).find(H=>H.alias===T.alias&&H.globalCondition)&&w.splice(O,1)}return w};function f(C){const{id:P,keyName:_,conditionLabel:F,conditionKey:D,conditionValueType:R,prop:L,rule:M="NONE",notGlobal:V=!1,indexCode:B,typeGuid:k,indexCodeNum:I,dataType:S="component"}=C;let w=_||P;w&&L&&(w+=`-${L}`);let O=M;return O==="NONE"&&(["startTime","endTime"].includes(L)?O=L==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":_!=null&&_.includes("startTime")?O=L==="GREATER_EQUAL":_!=null&&_.includes("endTime")?O=L==="LESS_EQUAL":O="EQUAL"),{rule:O,label:F,fieldName:D,fieldValue:"",valueType:R,alias:w,globalCondition:!V,indexCode:B,typeGuid:k,indexCodeNum:I,dataType:S}}const g=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function v(C){if(C!=null&&C.length)for(const P of C)if(P!=null&&P.conditions)v(P.conditions);else{const{id:_,keyName:F,prop:D,modelKey:R,format:L,dataType:M="component",customValue:V}=P,B=f(P);E(B,_,{prop:D,dateFormat:L,modelKey:R,keyName:F}),M===""&&(B.fieldValue=V||"");for(const k in B)P[k]=B[k];for(const k of g)delete P[k]}}function y(C){const P=[];if(C!=null&&C.length){for(const _ of C)if(_.variableName){const F={variateName:_.variableName,globalCondition:!1,valueType:_.variableType,alias:_.keyName||""};E(F,_.id,{dateFormat:_.format,prop:_.dateTypeValue,keyName:_.keyName,operateType:_.operateType,operateMode:_.operateMode,operateValue:_.operateValue}),_.dataType===""&&(F.fieldValue=_.variableValue),_.format&&(F.dateFormat=_.format),_.label&&(F.label=_.label),P.push(F)}}return P}function E(C,P,_){const F=o(P)||{},{prop:D="",dateFormat:R="",modelKey:L="",keyName:M="",operateValue:V,operateMode:B,operateType:k}=_||{},{value:I,format:S="YYYY-MM-DD",type:w="",useCurrentTime:O,RECORD:T}=F||{},G=R||S;if(lowerCaseIncludes(F.type,"date")){let H;if(O?I?H=vue.unref(I):H=dayjs():H=vue.unref(I),V&&B&&k)switch(k){case"add":H=H.add(V,B);break;case"minus":H=H.subtract(V,B);break}C.fieldValue=H==null?void 0:H.format(G),C.dateFormat=G}else if(w==="ecanRangePicker"){let H=D;if(!D){const W=M&&M.split("-");W!=null&&W.length&&(H=W[W.length-1])}if(!H)return;let N=null;if(vue.unref(F[H])&&(N=dayjs(vue.unref(F[H]))),V&&B&&k){if(V==="rangeValue"){if(F.startTime&&F.endTime){const W=vue.unref(F.endTime).diff(vue.unref(F.startTime),B)+1;switch(k){case"add":N=N&&N.add(W,B);break;case"minus":N=N&&N.subtract(W,B)}}}else if(!isNaN(+V))switch(k){case"add":N=N&&N.add(V,B);break;case"minus":N=N&&N.subtract(V,B)}}if(N&&(C.fieldValue=N==null?void 0:N.format(G)),H==="rangeValue"&&F.startTime&&F.endTime){const W=getFormatStep(G);W&&(C.fieldValue=vue.unref(F.endTime).diff(vue.unref(F.startTime),W)+1)}C.dateFormat=G}else lowerCaseIncludes(w,MODEL_KEY_LIST)?L&&T?C.fieldValue=T[L]:!L&&T?C.fieldValue=T.value:C.fieldValue=vue.unref(I):C.fieldValue=vue.unref(I)}const d=C=>{if(C){const P=Array.isArray(C)?lodashEs.cloneDeep(C):[lodashEs.cloneDeep(C)];let _="",F=[];const D=[],R=[],L=[];for(const M of P)M.defaultCode&&(M.label=M.columnName,delete M.defaultCode),M.type==="CUSTOM"&&(F=M.customOrderColumns),_=M.type,D.push(M.label),R.push(M.columnName),L.push(M.order);return _!=="CUSTOM"&&(D==null?void 0:D.length)>1&&(_="COMBINATION"),_==="CUSTOM"?{label:D.join(","),columnName:R.join(","),type:_,customOrderColumns:F}:{label:D.join(","),columnName:R.join(","),order:L.join(","),type:_}}else return C},m=C=>{const{sortCpnts:P=[]}=C;let _,F="";for(const D of P){const R=o(D)||{},{type:L,RECORD:M}=R;if(lowerCaseIncludes(L,"image")&&lowerCaseIncludes(M==null?void 0:M.value,["asc","desc"])){F=M.value.toUpperCase();break}}return F&&(_={label:C.label,columnName:C.name,order:F,type:"NORMAL"}),_},p=async(C={})=>{var he,pe,ve,ye,be,Ce;a(e.id,!1);const{graphicConfig:P,type:_,isGroupTable:F=!1}=e;let{source:D,dataViewId:R,plugin:L="1",layer:M,chartType:V,classificationList:B=[],rowHeaderList:k=[],dimensionList:I=[],seriesList:S=[],leftAxisList:w=[],rightAxisList:O=[],queryColumnList:T=[],indicators:G=[],controlList:H=[],formFields:N={},variableList:W=[],variableConditions:q=[],idxLibMode:j,preview:$=!1}=P||{},U=[];if((P==null?void 0:P.pageMode)==="design"?(U=(P.sqlConditions??[]).map(ue=>{const fe={};if(!l(ue,"globalCondition")&&!ue.join&&(fe.globalCondition=!0),!ue.join){const de=ue.rule||"EQUAL";fe.rule=de==="NONE"?"EQUAL":de}return{...ue,...fe}}),q!=null&&q.length&&(U=U.concat(q))):(U=b(P),W!=null&&W.length&&(U=U.concat(y(W)))),U!=null&&U.length){const ue=U.filter(de=>de.globalCondition),fe=U.filter(de=>!de.globalCondition);(ue==null?void 0:ue.length)>1&&(U=[{join:"&&",conditions:ue},...fe])}U!=null&&U.length&&(U=u(U,"1")),M==null&&(lowerCaseIncludes(_,["table"])||lowerCaseIncludes(_,["list","circulate"])&&(B==null?void 0:B.length)>1?M="1":lowerCaseIncludes(_,["select","checkbox","radio"])?M="3":M="2");let J;const Q=[];let oe="";if(Array.isArray(B)&&B.length>0&&(!["ecanList","ecanCirculate"].includes(_)||(B==null?void 0:B.length)===1)){const ue=B.length;for(let fe=0;fe<ue;fe++){const de=B[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,dateFormat:Te,typeGuid:Le="",truncations:Fe=[]}=de;if(_e||ue===1){oe=Le,J={label:Ae.trim(),columnName:Se,show:_e,sort:m(de)||d(ke)||ke,customGroup:Me,conditions:u(Re),typeGuid:Le},Te&&(J.dateFormat=Te),Se==="the_date"&&!J.dateFormat&&(J.dateFormat="YYYY-MM");const Pe={};if(Array.isArray(Fe)&&Fe.length>0){const Z=Fe.length;for(let X=0;X<Z;X++){const te=Fe[X]||{},{rule:se="",num:ce=0,name:le=""}=te;se&&ce&&(Pe.num=ce,Pe.rule=se,le&&(Pe.otherGroupName=le))}}if((he=Object.keys(Pe))!=null&&he.length&&(J.truncation=Pe),lowerCaseIncludes(_,"scatter"))Q.push(J);else break}}}let K;if(Array.isArray(S)&&S.length>0){const ue=S.length;for(let fe=0;fe<ue;fe++){const de=S[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,typeGuid:Te}=de;if(_e||ue===1){K={label:Ae.trim(),columnName:Se,show:_e,sort:d(ke),customGroup:Me,conditions:u(Re),typeGuid:Te};break}}}const Y=[];w==null||w.forEach(ue=>{ue.location="LEFT",Y.push(h(ue,J))}),O==null||O.forEach(ue=>{ue.location="RIGHT",Y.push(h(ue,J))}),G==null||G.forEach(ue=>{ue.location="LEFT",Y.push(h(ue,J))});const ee=[];["ecanList","ecanCirculate"].includes(_)&&(B==null?void 0:B.length)>1&&(T=B),T==null||T.forEach(ue=>{const{label:fe,name:de,location:Ae,show:Se,indexCode:_e,sort:ke,typeGuid:Me,indexCodeNum:Re,dateFormat:Te,conditions:Le}=ue;let Fe=d(ke);if(C.sort){const{field:Z,order:X}=C.sort;let te=Y.find(se=>se.label===Z);!te&&fe===Z&&(te=ue),te&&(Fe={columnName:te.columnName,label:C.sort.field,order:X.toUpperCase(),type:"NORMAL"})}const Pe={label:fe,columnName:de,location:Ae,show:Se,sort:Fe,calcType:"COLUMN",hrpIndexCode:_e,hrpIndexCodeNum:Re,conditions:u(Le),typeGuid:Me};Te&&(Pe.dateFormat=Te),de==="the_date"&&!Pe.dateFormat&&(Pe.dateFormat="YYYY-MM"),ee.push(Pe)});const ne=[];let re=[];if(Array.isArray(k)&&k.length>0?re=k:Array.isArray(I)&&I.length>0&&(re=I),re!=null&&re.length){const ue=re.length;for(let fe=0;fe<ue;fe++){const de=re[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,truncations:Te,typeGuid:Le="",dateFormat:Fe}=de;let Pe=d(ke);if(C.sort){const{field:te,order:se}=C.sort;let ce=Y.find(le=>le.label===te);!ce&&de.label===te&&(ce=de),ce&&(Pe={columnName:ce.columnName,label:C.sort.field,order:se.toUpperCase(),type:"NORMAL"})}const Z={label:Ae.trim(),columnName:Se,show:_e,sort:Pe,customGroup:Me,conditions:u(Re),typeGuid:Le};Fe&&(Z.dateFormat=Fe),Se==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const X={};if(Array.isArray(Te)&&Te.length>0){const te=Te.length;for(let se=0;se<te;se++){const ce=Te[se]||{},{rule:le="",num:ae=0,name:me=""}=ce;le&&ae&&(X.num=ae,X.rule=le,me&&(X.otherGroupName=me))}}(pe=Object.keys(X))!=null&&pe.length&&(Z.truncation=X),ne.push(Z)}}if(lowerCaseIncludes(_,["text","proportion","counter"])&&(V="zb"),F){if(ne.length===0||Y.length===0)return;V="grouptable"}else{if(M==="1"&&ee.length===0)return;if(M==="2"&&Y.length===0)return;if(M==="3"&&(!oe||!N.labelField||!N.valueField))return;if(M==="3"&&_==="ecanDataSelect"&&Y.length===0)return}I!=null&&I.length&&(M="1",V="grouptable");let ie=(ve=window==null?void 0:window.config)==null?void 0:ve.pageId;if(!ie){const{pathname:ue}=window==null?void 0:window.location;if(ue){const fe=ue.split("/");fe!=null&&fe.length&&(ie=fe[fe.length-1])}}if(_!=="ecanScatter"&&((ye=Object.keys(N))!=null&&ye.length)){const ue=getConditions(H).find(de=>de.conditionKey==="parentCode"),fe={};if(ue){const de=o(ue.id)||{};if(de!=null&&de.itemCodes)fe.parentItemCodes=de.itemCodes;else return}_==="ecanDataSelect"&&(fe.indicatorList=Y.filter(de=>de.show));try{const de=await request.post(`${INDICATOR_URL}/diagram/formData`,{source:D,dataViewId:R,plugin:"4",layer:M,chartType:"normalSelect",rangeIndexTypeGuid:oe,type:_==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:N.labelField,valueField:N.valueField,pageId:ie,sqlConditions:U,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...fe},{headers:{Authentication:(be=window==null?void 0:window.config)==null?void 0:be.indicatorToken,operateContext:CONTEXT}});return C!=null&&C.isTimer&&r(de),de}catch(de){console.error(de)}finally{}}else try{let ue={};lowerCaseIncludes(_,"scatter")?ue={classifications:Q}:ue={classification:J};const fe=await request.post(`${INDICATOR_URL}/diagram`,{source:D,dataViewId:R,plugin:L,layer:M,chartType:V,...ue,series:K,indicatorList:Y,queryColumns:F?[]:ee,pageFlag:!0,pageId:ie,sqlConditions:U.map(de=>{const{fieldValue:Ae}=de,Se={};return Ae&&Array.isArray(Ae)&&(Se.fieldValue=JSON.stringify(Ae)),{...de,...Se}}),idxLibMode:j,preview:$,rowHeaders:ne,keyName:e.keyName},{headers:{Authentication:(Ce=window==null?void 0:window.config)==null?void 0:Ce.indicatorToken,operateContext:CONTEXT}});return C!=null&&C.isTimer&&r(fe),fe}catch(ue){console.error(ue)}finally{}},x=vue.unref(n)!=="design"&&((A=e==null?void 0:e.graphicConfig)==null?void 0:A.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{p({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(x)}),p},useHrefParamsToGlobalVariables=()=>{const r=window.location.search.slice(1).split("&"),n=r.length,i={};for(let a=0;a<n;a++){const o=r[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$r=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps},setup(e){const{width:r,height:n}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=r.value,x.height=n.value),{...x,backgroundColor:e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),h=vue.ref(!1),b=vue.ref();let f;const g=()=>new Promise(x=>{vue.nextTick(()=>{r.value&&n.value?(s.value=parseFloat(r.value),l.value=parseFloat(n.value)):(s.value=b.value.clientWidth,l.value=b.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),v=()=>{s.value&&l.value?(b.value.style.width=`${s.value}px`,b.value.style.height=`${l.value}px`):(b.value.style.width=`${c.value}px`,b.value.style.height=`${u.value}px`)};vue.watch([r,n],async()=>{await g(),v(),E(),window.addEventListener("resize",d),m(),h.value=!0},{immediate:!0});const y=vue.ref({});vue.provide("scaleValue",y);const E=()=>{if(a){b.value.style.width="100%",b.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,A=document.body.clientHeight,C=s.value||c.value,P=l.value||u.value,_=x/C;let F=A/P;(s.value!==1920||l.value!==1080)&&(F=l.value/s.value*x/P),y.value={widthScale:_,heightScale:F},b.value&&(b.value.style.transform=`scale(${_}, ${F})`),i(F)},d=lodashEs.debounce(async()=>{await g(),E()},100),m=()=>{const x=window.MutationObserver;f=new x(d),f.observe(b.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},p=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return vue.onMounted(()=>{h.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",d),p()}),{style:o,container:b,ready:h}}}),PageConfig_vue_vue_type_style_index_0_scoped_b496b36e_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$w(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$r,[["render",_sfc_render$w],["__scopeId","data-v-b496b36e"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$q=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps},setup(e,{expose:r}){useHrefParamsToGlobalVariables();const n=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),i=vue.ref(),a=()=>{i.value.setAttribute("datav-theme",e.theme)},o=vue.inject("usedComponentList",[]),s=vue.inject("componentList",[]),l=vue.computed(()=>{const K=[];for(const Y of vue.unref(o))Y.type==="ecanModal"?K.push(...Y.componentList):K.push(Y);return K});vue.watch(()=>e.theme,()=>{a()}),vue.onMounted(()=>{a()});const c=vue.computed(()=>useVariablesInText(e.contextRequestUrl)),u=vue.computed(()=>e.pageMode),h=vue.computed(()=>e.theme),b=vue.computed(()=>e.width),f=vue.computed(()=>e.height),g=vue.computed(()=>e.pageFontFamily),v=vue.computed(()=>{const K=[],Y=vue.unref(s).filter(ee=>ee.type==="ecanModal");for(const ee of Y)ee!=null&&ee.requestList&&K.push(...ee.requestList);return[...K,...e.requestList]}),y=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:c,pageMode:u,theme:h,touchEventId:y,width:b,height:f,fontFamily:g,requestList:v});const E=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",K=>{let Y=K;n.value||(Y=parseFloat(f.value)*K+"px"),E.value.height=Y}),vue.provide("isMobile",n.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap);const d=vue.ref(),m=new Map;console.log("globalModel",m);const p=K=>m.get(K),x=(K,Y)=>{d.value=Y,m.set(K,Y)},A=()=>{d.value=null},C=K=>{let Y=K;if(Y){const ee=K.match(/\{(.+?)\}/g);if(ee!=null&&ee.length){let ne=ee[0].slice(1,-1).trim();const re=ne.match(/\[(.+?)\]/g);let ie="";re!=null&&re.length&&(ne=ne.replace(re[0],""),ie=re[0].slice(1,-1).trim());const he=vue.unref(o).find(pe=>pe.keyName===ne);if(he){const pe=p(he.id),{type:ve,value:ye,RECORD:be,recordData:Ce}=pe||{};lowerCaseIncludes(ve,MODEL_KEY_LIST)?Y=be[ie]:lowerCaseIncludes(ve,"select")?Y=Ce[ie]:lowerCaseIncludes(ve,["rangePicker","date"])?dayjs.isDayjs(vue.unref(pe[ie]))?Y=vue.unref(pe[ie]).format(pe.format):Y=vue.unref(pe[ie]):Y=ye}else Y=""}}return Y},P=new Map,_={},F=async(K,Y)=>{var he;const{requestName:ee}=K,ne=await useRequestData({...K,projectRequestUrl:vue.unref(c),getModel:p})(),re=((he=ne==null?void 0:ne.data)==null?void 0:he.data)||{},ie=P.get(ee);if(ie!=null&&ie.length&&(!Y||_[ee])){for(const pe of ie)pe(re);Y||P.delete(ee)}},D=(K,Y)=>{_[K]&&(clearInterval(_[K]),delete _[K],P.delete(K));const ee=vue.unref(l).filter(re=>re.customRequestName===K),ne=P.get(K)||[];if((ee==null?void 0:ee.length)>ne.length&&(ne.push(Y),P.set(K,ne),(ee==null?void 0:ee.length)===ne.length)){const re=vue.unref(v).find(ie=>ie.requestName===K);re&&(re!=null&&re.isOpenRequestTimer&&(re!=null&&re.requestInterval)?(F(re,!0),_[K]=setInterval(()=>{F(re,!0)},re.requestInterval*1e3)):F(re))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:p,setGlobalModel:x,clearInteractiveData:A,getRecordValueByKeyName:C,hanldePageRequestData:D,interactiveData:d});const R=vue.ref({}),L=(K,Y)=>{R.value[K]=Y};vue.provide(LOADED_DATA,{loadedData:R,setLoadedData:L});const M=[],V=()=>{M.pop()},B=K=>{M.push(K)},k=new Map,I=K=>k.get(K),S=(K,Y)=>{k.set(K,Y)};vue.provide(MODAL_MODEL,{popUseModalIds:V,pushUseModalIds:B,getModalModel:I,setModalModel:S});const w=mitt(),O=new Set,T=(K,Y)=>{O.add(K),w.on(K,ee=>{const{eventName:ne,params:re}=ee;return typeof Y[ne]=="function"&&Y[ne](re)}),vue.onBeforeUnmount(()=>{G(K)})},G=K=>{O.delete(K),w.off(K)},H=(K,Y,ee={})=>{if(K==="PAGE"){const ne=M.length;let re=[];if(ne===0)re=[...O];else{const ie=M[ne-1];re=[...I(ie)]}re.forEach(ie=>{w.emit(ie,{eventName:Y,params:ee})})}else w.emit(K,{eventName:Y,params:ee})};vue.provide(EVENT_BUS,{onEvent:T,offEvent:G,emitEvent:H});const N=vue.ref(0),W=()=>{N.value=vue.unref(N)+1};vue.provide(GLOBAL_TOKEN,{requestToken:W});const q=new Map,j=new Map,$=({requestFn:K=()=>{},sortNum:Y=0,id:ee=""})=>{if(q.has(Y)){const ne=q.get(Y);ne==null||ne.push(K)}else q.set(Y,[K]);j.set(ee,K)},U=K=>new Promise((Y,ee)=>{const ne=K.map(re=>re());Promise.all(ne).then(re=>{Y(re)}).catch(re=>{ee(re)})}),J=K=>new Promise(async(Y,ee)=>{if(K){if(typeof K=="string"){const ne=j.get(K);if(typeof ne=="function"){const re=request.interceptors.response.use(ie=>(Y(ie),ie),ie=>(ee(ie),Promise.reject(ie)));ne(),request.interceptors.response.eject(re)}}}else{const ne=Array.from(q);ne.sort((ie,he)=>he[0]-ie[0]);const re=ne.length;try{e.pageMode!=="design"&&vue.unref(N)>0;for(let ie=0;ie<re;ie++){const he=ne[ie][1];await U(he)}}catch(ie){console.error(ie)}finally{q.clear(),Y(null)}}});vue.provide(REQUEST_MODEL,{setRequest:$,touchRequest:J});const Q=()=>{w.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Q});const oe=K=>{w.on(REFRESH_PAGE,()=>K()),vue.onMounted(()=>{w.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var K;if((K=vue.unref(o))!=null&&K.length&&vue.unref(u)!=="design"){const{jumpType:Y,jumpTime:ee,jumpPage:ne,jumpLink:re}=e;if(ee!=null&&ee.value){let ie=0;switch(ee==null?void 0:ee.suffix){case"hours":ie=ee.value*60*60*1e3;break;case"minute":ie=ee.value*60*1e3;break;case"seconds":ie=ee.value*1e3;break}setTimeout(()=>{let he="";Y==="page"&&ne?he=usePageUrl(vue.unref(u),ne):Y==="link"&&re&&(he=re),he=useVariablesInText(he),window.open(he,"_self")},ie)}}}),vue.onBeforeUnmount(()=>{q==null||q.clear(),j==null||j.clear()}),r({touchRequest:J,getGlobalModel:p,onRefreshPage:oe}),{providerConfig:i,configStyle:E}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_ffe2b0b9_lang="";function _sfc_render$v(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$q,[["render",_sfc_render$v],["__scopeId","data-v-ffe2b0b9"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:r}){const n=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=B=>{var k,I;if(e.showAnimation){const S=e.text.match(/\{(.+?)\}/g)||[];if(S!=null&&S.length){const w=(k=S[0].slice(1,-1))==null?void 0:k.trim();if(vue.unref(a)[w]===B){a.value=B;return}const O=+B[w];let T=0;if(isNaN(O))a.value=B;else{String(O).includes(".")&&(T=((I=String(O).split(".")[1])==null?void 0:I.length)||0);const G=Math.abs(O)*Math.pow(10,T),H=String(G).length;let N=[];for(let q=0;q<5;q++){const j=Math.ceil(Math.random()*(G+1)-1);N.includes(j)||N.push(j)}N.sort((q,j)=>q-j),N=N.map(q=>{const j=String(q).split("").reverse(),$=[];for(let U=0;U<H;U++)j&&j[U]?$.push(j[U]):$.push("0");return T&&$.splice(T,0,"."),(O<0?"-":"")+$.reverse().join("")}),N.push(O);let W=0;for(const q of N)setTimeout(()=>{a.value={...vue.unref(a),[w]:q}},W*1e3),W+=.1}}else a.value=B}else a.value=B};vue.watch(()=>[e.data,e.dataType],([B,k])=>{k==="static"&&l(B)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:h,hanldePageRequestData:b}=vue.inject(GLOBAL_MODEL,{getGlobalModel:B=>{},setGlobalModel:(B,k)=>{},getRecordValueByKeyName:B=>{},hanldePageRequestData:(B,k)=>{}}),{setLoadedData:f}=vue.inject(LOADED_DATA,{setLoadedData:(B,k)=>{}}),g=vue.computed(()=>{let B="";if(e.gradientShow){const{gradientColor:k,gradientOffset:I,gradientAngle:S,color:w}=e;B+=`background: linear-gradient(${S}, ${w}, ${k||"transparent"} ${I*100}%);-webkit-background-clip: text;color: transparent;`}return B}),v=vue.computed(()=>{const B={};if(e.gradientShow){const{gradientColor:k,gradientOffset:I,gradientAngle:S,color:w}=e,O=k||"transparent";B.background=`linear-gradient(${S}, ${w}, ${O} ${I*100}%)`,B["-webkit-background-clip"]="text",B.color="transparent"}return B}),y=vue.computed(()=>{var G;if(vue.unref(n))return"NaN";const B=vue.unref(a),k=e.increaseColor||e.color,I=e.declineColor||e.color;let S=e.text;S=S==null?void 0:S.replace(/\n|\\n/g,"<br/>"),S=S==null?void 0:S.replace(/\s(?!\{) | (?!\})\s/g," ");const w=S.match(/\{(.+?)\}/g)||[];let O="",T="";if(e.exceedConfig==="wrap"?T="show-wrap":e.exceedConfig==="ellipsis"&&(T="show-ellipsis"),w==null||w.length===0){if(S&&e.format==="percentage"&&!isNaN(+S)){const H=parseFloat(S),N=H*100,W=E(N.toFixed(2));H>=0?S=`<span class="${T}" style="color: ${W||k||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(g)}">
|
|
99
|
+
`;let o=e;if(n!=null&&n.length){for(const l of n){const c=useVariablesInText(l,{textData:r},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e},setDefaultRangeVal=(e,r)=>{const{props:n,componentList:i,getGlobalModel:a}=e,{graphicConfig:o={},startValue:s,endValue:l}=n,c=getdefCompleteData({graphicConfig:o,startValue:s,endValue:l,componentList:i,getGlobalModel:a}),{dimensions:u,dataset:h}=r,{classificationList:b=[]}=o,g=b.find(v=>v.show).label||"";for(const v of c)u.includes(v)||u.push(v);u.sort((v,y)=>dayjs(v).isBefore(dayjs(y))?-1:1);for(const v of h){const{data:y}=v;if(y!=null&&y.length){const E=[];for(const d of c)if(y.find(m=>m[g]!==d)){const m=lodashEs.cloneDeep(y[0]);for(const p in m)p===g?m[p]=d:m[p]=0;E.push(m)}v.data.push(...E),v.data.sort((d,m)=>dayjs(d[g]).isBefore(dayjs(m[g]))?-1:1)}}},getConditions=e=>{const r=[];for(const n of e)n.conditions?r.push(...getConditions(n.conditions)):(n==null?void 0:n.dataType)==="component"&&r.push(n);return r};function getdefCompleteData(e){const{startValue:r,endValue:n,componentList:i,graphicConfig:a,getGlobalModel:o}=e,s=getVariableAndField(r),l=getVariableAndField(n),c=[];if(s&&l){const u=i.find(b=>b.keyName===s.keyName),h=i.find(b=>b.keyName===l.keyName);if(u&&h){const b=o(u.id),f=o(h.id),{classificationList:g=[]}=a,v=g.find(y=>y.show);if(v){let y="YYYY-MM";switch(v.name){case"the_year":y="YYYY";break;case"the_month":y="MM";break;case"the_day":y="DD";break;case"the_date":y=(v==null?void 0:v.dateFormat)||y;break}const E=getFormatStep(y);if(y){const d=vue.unref(b[s.field]),m=vue.unref(f[l.field]);let p=dayjs(d);const x=dayjs(m);for(c.push(x.format(y));p.isBefore(x);)c.push(p.format(y)),p=p.add(1,E)}}}}return c}function getVariableAndField(e){let r=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let i=n[0].slice(1,-1).trim();const a=i.match(/\[(.+?)\]/g);let o="";a!=null&&a.length&&(i=i.replace(a[0],""),o=a[0].slice(1,-1).trim()),r={keyName:i,field:o}}}return r}function getFormatStep(e){const r=e.split("-");let n="";if(r!=null&&r.length)switch(r[r.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const runCode=(e,r)=>{const n={dayjs,...r};let i="";const a=[];for(const l in n)i+=`${l},`,a.push(n[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText=(e="",{textData:r,codeData:n}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const s={...window.config||{},...r},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let c=0;c<l.length;c++){const u=l[c];let h=u.slice(1,-1).trim();const b=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=h.match(b);for(let g=0;g<f.length;g++){const v=f[g],y=s[v];y!=null&&typeof y!="function"&&(h=h.replace(v,y))}(/\(.*\)/g.test(h)||/[+/\\*]/g.test(h))&&(h=runCode(h,n)),e=e.replace(u,h)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g," ")),e},useRequestData=(e,r=()=>{})=>{const{requestUrl:n,requestMethod:i,requestHeaders:a,requestParams:o,requestInterval:s,isOpenRequestTimer:l,openCustomRequestData:c,projectRequestUrl:u="",getModel:h,requestParamsMode:b,customRequestParams:f}=e,{pageMode:g}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{contextRequestUrl:v,touchEventId:y}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:E}=vue.inject(GLOBAL_MODEL,{getGlobalModel:A=>{}})||{},d=h||E,m=useVariablesInText(n),p=async(A={})=>{if(!m||!i||!a)return;let C={};for(const M of o){const{key:V,value:B}=M;if(typeof B=="object"&&B!=null&&B.id){let k={};const{id:I,prop:S,propKey:w,operate:O}=B;I==="THIS"?k=d(vue.unref(y))||{}:k=d(I)||{};const T=vue.unref(k[S]);let G=null;if(["date","range"].some(N=>lowerCaseIncludes(k==null?void 0:k.type,N))){const{value:N,type:W,mode:q}=O||{};if(N&&W&&q)switch(W){case"add":G=vue.unref(T).add(N,q);break;case"minus":G=vue.unref(T).subtract(N,q);break}G==null&&(G=vue.unref(T)),G=(G==null?void 0:G.format((w==null?void 0:w.trim())||k.format))||""}else Object.prototype.toString.call(T)==="[object Object]"?w?G=T[w]:G=S?T[S]:T:lowerCaseIncludes(k==null?void 0:k.type,"select")&&vue.unref(T)&&S&&Array.isArray(vue.unref(T))?G=vue.unref(T).map(N=>Object.prototype.hasOwnProperty.call(N,S)?N[S]:N):G=T;C[V]=G}else typeof B=="string"&&(C[V]=useVariablesInText(B))}if(b==="2"&&f!=="{}"){const M=JSON.parse(f);P(M),M&&(C=M)}function P(M){var B;const V={...C,...((B=window==null?void 0:window.config)==null?void 0:B.requestParams)||{}};if(Array.isArray(M))M.forEach((k,I)=>{if(typeof k=="string"){const S=k.match(/\${(.+?)\}/g);if(S!=null&&S.length){const w=S[0].slice(2,-1);w&&V[w]?M[I]=V[w]:M[I]=""}}else P(k)});else if(Object.prototype.toString.call(M)==="[object Object]")for(const k in M)if(typeof M[k]=="string"){const I=M[k].match(/\${(.+?)\}/g);if(I!=null&&I.length){const S=I[0].slice(2,-1);S&&V[S]?M[k]=V[S]:M[k]=""}}else P(M[k])}C={...window.config.requestParams,...A,...C};let _="";const F=Object.keys(C),D=F.length-1,R=F.length;F.forEach((M,V)=>{let B=C[M];Object.prototype.toString.call(B)==="[object Object]"&&(B=JSON.stringify(B)),V===0?R!==1?_+=`?${M}=${B}&`:_+=`?${M}=${B}`:V===D?_+=`${M}=${B}`:_+=`${M}=${B}&`});function L(M){var V;if(typeof M=="string"){const B=JSON.parse(M),k=((V=window==null?void 0:window.config)==null?void 0:V.requestParams)||{};if(Object.prototype.toString.call(B)==="[object Object]"){for(const I in B)if(typeof B[I]=="string"){const S=B[I].match(/\${(.+?)\}/g);if(S!=null&&S.length){const w=S[0].slice(2,-1);w&&k[w]?B[I]=k[w]:B[I]=""}}}return B}else return M}try{const M=["get","head"].includes(i),V={};let B=M?m+_:m;C.dataSqlId&&!B.includes("dataSqlId")&&(B+=`${B.includes("?")?"&":"?"}dataSqlId=${C.dataSqlId}`),Object.prototype.hasOwnProperty.call(C,"signal")&&(V.signal=C.signal);const k=await request({baseURL:vue.unref(v)||u||"",url:B,method:i,headers:a?L(a):{},data:M?{}:C,...V});return r(k),k}catch(M){console.error(M)}},x=vue.unref(g)!=="design"&&l&&(c||c===void 0)&&setInterval(p,s*1e3);return vue.onUnmounted(()=>{clearInterval(x)}),p},useTransformChartDataByAttrKey=(e=[],r,n=!1)=>{let{name:i="name",types:a=[]}=r||{};i=(i==null?void 0:i.trim())||i;const o=new Set,s=new Map,l=e.length,c=a.length;if(l===1&&!n){const b=[];for(let g=0;g<c;g++){const v=a[g],{label:y,value:E}=v,d={...e[0],value:e[0][E]};o.add(y),b.push(d)}const f=e[0][i]||"";s.set(f,b)}else for(let b=0;b<l;b++){const f=e[b],g=f[i];o.add(g);for(let v=0;v<c;v++){const y=a[v],{label:E,value:d}=y,m={...f,value:f[d]||0};if(s.has(E)){const p=s.get(E);p.push(m),s.set(E,p)}else s.set(E,[m])}}const u=Array.from(o),h=[];for(const[b,f]of s)h.push({name:b,data:f});return{dimensions:u,dataset:h}},useImagePath=(e,r=!1)=>{var i;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((i=window==null?void 0:window.config)==null?void 0:i.uploadPath)+e,r&&(n=`url(${n})`),n},usePageUrl=(e,r)=>{const n=`${BASE_URL}/preview?pageId=${r}`,i=`${BASE_URL}/${r}`;return e==="preview"?n:i},useValueFormatter=(e,r)=>{var a;if(e==null)return r;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return r;const i=n.length;for(let o=0;o<i;o++){const s=n[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,r);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e},useIndicatorData=(e={},r=()=>{})=>{var A;const{pageMode:n}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:i}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:a}=vue.inject(LOADED_DATA,{setLoadedData:(C,P)=>{}}),{getGlobalModel:o}=vue.inject(GLOBAL_MODEL,{getGlobalModel:C=>{}});e.dataType==="indicator"&&i();const s=C=>{const{around:P,unit:_,id:F}=C;let D="";const{pageMode:R="",componentList:L=[]}=(e==null?void 0:e.graphicConfig)||{};let M=null,V=null;if(R==="design"){const B=L==null?void 0:L.find(G=>G.id===F);if(!B)return[];const{interval:k,intervalUnit:I,startTime:S,endTime:w,operate:O,useCurrentTime:T}=B||{};if(T&&(M=dayjs().subtract(k,I),V=dayjs()),S&&(M=dayjs(S)),w&&(V=dayjs(w)),O){const{type:G,value:H,mode:N}=O;switch(G){case"add":M=M&&M.add(H,N),V=V&&V.add(H,N);break;case"minus":M=M&&M.subtract(H,N),V=V&&V.subtract(H,N)}}}else{const B=o(F)||{};vue.unref(B.startTime)&&(M=dayjs(vue.unref(B.startTime))),vue.unref(B.endTime)&&(V=dayjs(vue.unref(B.endTime)))}if(M&&V){const B=V.diff(M,_.toLowerCase());D=`${P==="before"?"-":""}${B+1}`}return D?[D]:[]},l=(C,P)=>Object.prototype.hasOwnProperty.call(C,P),c=(C,P)=>{if(P)l(C,"indexCode")&&(C.hrpIndexCode=C.indexCode,delete C.indexCode),l(C,"indexCodeNum")&&(C.hrpIndexCodeNum=C.indexCodeNum,delete C.indexCodeNum),l(C,"dataType")&&delete C.dataType;else{const{calcWays:_=[],dateCalcTypes:F=[],activeKey:D,componentId:R=""}=C;if(D===5&&(_!=null&&_.length)&&(F!=null&&F.length)&&R){const L=_[0].split("-");(L==null?void 0:L.length)>1&&L[0]==="rangeValue"&&(C.calcWays=s({around:L[1],unit:F[0],id:R})),delete C.radioValue}l(C,"dataType")&&(C.fieldType==="DATE"&&(C.label=C.fieldName),C.dataType==="component"&&(C.fieldValue="${"+C.fieldValue+"}"),delete C.dataType),l(C,"activeKey")&&delete C.activeKey,l(C,"radioValue")&&delete C.radioValue,l(C,"indexCode")&&(C.hrpIndexCode=C.indexCode,delete C.indexCode),l(C,"indexCodeNum")&&(C.hrpIndexCodeNum=C.indexCodeNum,delete C.indexCodeNum),C.dataType!=="component"&&C.useCurrentTime&&(C.fieldValue=dayjs().format(C.dateFormat)),delete C.useCurrentTime}},u=(C,P)=>{const _=[];return C!=null&&C.length&&lodashEs.cloneDeep(C).forEach(F=>{if(F.join&&F.conditions){const D=!F.conditions.some(R=>R.join&&R.conditions);F.conditions.forEach((R,L)=>{c(R,P);const M={};if(L<F.conditions.length-1&&(M.join=F.join),D)_.push({...M,...R});else if(R.join&&R.conditions){const V=P?"sqlConditions":"conditions";_.push({[V]:u([R],P),...M})}else _.push({...M,...R})})}else c(F,P),_.push(F)}),_},h=(C={},P)=>{if(C!=null&&C.sortCpnts&&P){const q=m(C);q&&(P.sort=q)}const{label:_,name:F,location:D,show:R,indexCode:L,indexCodeNum:M,calcType:V="COLUMN",builtInFormula:B,builtInValueSource:k,builtInCalcWay:I,formula:S,conditions:w,aggregate:O,distinct:T,dimByCount:G,dataTo:H}=C;let N;if(w&&(N=u(w)),V==="COMPONENT"){const q={};return E(q,k),{label:_.trim(),columnName:F,show:R,calcType:V,componentAlias:I,componentValue:q.fieldValue||null}}const W={label:_.trim(),columnName:F,location:D,show:R,calcType:H==="1"?"VIEW":V,hrpIndexCode:L,hrpIndexCodeNum:M,aggregate:O,builtInFormula:B,builtInValueSource:k,formula:S,conditions:N};if(B==="DATE_OFFSET"){const q=I.split("-");if((q==null?void 0:q.length)===3){let j=q[0];return q[2]==="before"&&q[0]!=="0"&&(j=`-${q[0]}`),{...W,calcWays:[j],dateCalcTypes:[q[1]]}}}else return F==="the_count"&&(W.calcType="AGGREGATE",W.distinct=!!T,W.typeGuid=G),{...W,builtInCalcWay:I}},b=C=>{if(!C)return[];const P=lodashEs.cloneDeep((C==null?void 0:C.controlList)||[]).filter(O=>O.conditionKey!=="parentCode"),{classificationList:_=[],rowHeaderList:F=[],dimensionList:D=[],seriesList:R=[],leftAxisList:L=[],rightAxisList:M=[],queryColumnList:V=[],indicators:B=[]}=C;v(P);const k=[..._,...F,...D,...R,...L,...M,...V,...B],I=[];for(const O of k){const T=getConditions((O==null?void 0:O.conditions)||[]);if(T!=null&&T.length){const G=T.filter(H=>(H==null?void 0:H.dataType)==="component").map(H=>{const N={};return H!=null&&H.dateFormat&&(N.format=H.dateFormat),{conditionKey:H.fieldName,conditionLabel:H.fieldName,conditionName:H.fieldName,conditionValueType:H.fieldType,id:H.componentId,keyName:H.fieldValue,rule:H.rule,notGlobal:!0,indexCode:H.indexCode,typeGuid:H.typeGuid,indexCodeNum:H.indexCodeNum,...N}});if(G!=null&&G.length)for(const H of G)I.find(N=>N.keyName===H.keyName)||I.push(H)}}const S=I.length,w=P;for(let O=0;O<S;O++){const T=I[O];if((T==null?void 0:T.conditionKey)==="parentCode")continue;const{id:G,keyName:H,prop:N,format:W,modelKey:q,dataType:j="component",customValue:$}=T,U=f(T);E(U,G,{prop:N,dateFormat:W,modelKey:q,keyName:H}),j===""&&(U.fieldValue=$||""),w.push(U)}for(let O=w.length-1;O>=0;O--){const T=w[O];T.globalCondition||getConditions(w).find(H=>H.alias===T.alias&&H.globalCondition)&&w.splice(O,1)}return w};function f(C){const{id:P,keyName:_,conditionLabel:F,conditionKey:D,conditionValueType:R,prop:L,rule:M="NONE",notGlobal:V=!1,indexCode:B,typeGuid:k,indexCodeNum:I,dataType:S="component"}=C;let w=_||P;w&&L&&(w+=`-${L}`);let O=M;return O==="NONE"&&(["startTime","endTime"].includes(L)?O=L==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":_!=null&&_.includes("startTime")?O=L==="GREATER_EQUAL":_!=null&&_.includes("endTime")?O=L==="LESS_EQUAL":O="EQUAL"),{rule:O,label:F,fieldName:D,fieldValue:"",valueType:R,alias:w,globalCondition:!V,indexCode:B,typeGuid:k,indexCodeNum:I,dataType:S}}const g=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function v(C){if(C!=null&&C.length)for(const P of C)if(P!=null&&P.conditions)v(P.conditions);else{const{id:_,keyName:F,prop:D,modelKey:R,format:L,dataType:M="component",customValue:V}=P,B=f(P);E(B,_,{prop:D,dateFormat:L,modelKey:R,keyName:F}),M===""&&(B.fieldValue=V||"");for(const k in B)P[k]=B[k];for(const k of g)delete P[k]}}function y(C){const P=[];if(C!=null&&C.length){for(const _ of C)if(_.variableName){const F={variateName:_.variableName,globalCondition:!1,valueType:_.variableType,alias:_.keyName||""};E(F,_.id,{dateFormat:_.format,prop:_.dateTypeValue,keyName:_.keyName,operateType:_.operateType,operateMode:_.operateMode,operateValue:_.operateValue}),_.dataType===""&&(F.fieldValue=_.variableValue),_.format&&(F.dateFormat=_.format),_.label&&(F.label=_.label),P.push(F)}}return P}function E(C,P,_){const F=o(P)||{},{prop:D="",dateFormat:R="",modelKey:L="",keyName:M="",operateValue:V,operateMode:B,operateType:k}=_||{},{value:I,format:S="YYYY-MM-DD",type:w="",useCurrentTime:O,RECORD:T}=F||{},G=R||S;if(lowerCaseIncludes(F.type,"date")){let H;if(O?I?H=vue.unref(I):H=dayjs():H=vue.unref(I),V&&B&&k)switch(k){case"add":H=H.add(V,B);break;case"minus":H=H.subtract(V,B);break}C.fieldValue=H==null?void 0:H.format(G),C.dateFormat=G}else if(w==="ecanRangePicker"){let H=D;if(!D){const W=M&&M.split("-");W!=null&&W.length&&(H=W[W.length-1])}if(!H)return;let N=null;if(vue.unref(F[H])&&(N=dayjs(vue.unref(F[H]))),V&&B&&k){if(V==="rangeValue"){if(F.startTime&&F.endTime){const W=vue.unref(F.endTime).diff(vue.unref(F.startTime),B)+1;switch(k){case"add":N=N&&N.add(W,B);break;case"minus":N=N&&N.subtract(W,B)}}}else if(!isNaN(+V))switch(k){case"add":N=N&&N.add(V,B);break;case"minus":N=N&&N.subtract(V,B)}}if(N&&(C.fieldValue=N==null?void 0:N.format(G)),H==="rangeValue"&&F.startTime&&F.endTime){const W=getFormatStep(G);W&&(C.fieldValue=vue.unref(F.endTime).diff(vue.unref(F.startTime),W)+1)}C.dateFormat=G}else lowerCaseIncludes(w,MODEL_KEY_LIST)?L&&T?C.fieldValue=T[L]:!L&&T?C.fieldValue=T.value:C.fieldValue=vue.unref(I):C.fieldValue=vue.unref(I)}const d=C=>{if(C){const P=Array.isArray(C)?lodashEs.cloneDeep(C):[lodashEs.cloneDeep(C)];let _="",F=[];const D=[],R=[],L=[];for(const M of P)M.defaultCode&&(M.label=M.columnName,delete M.defaultCode),M.type==="CUSTOM"&&(F=M.customOrderColumns),_=M.type,D.push(M.label),R.push(M.columnName),L.push(M.order);return _!=="CUSTOM"&&(D==null?void 0:D.length)>1&&(_="COMBINATION"),_==="CUSTOM"?{label:D.join(","),columnName:R.join(","),type:_,customOrderColumns:F}:{label:D.join(","),columnName:R.join(","),order:L.join(","),type:_}}else return C},m=C=>{const{sortCpnts:P=[]}=C;let _,F="";for(const D of P){const R=o(D)||{},{type:L,RECORD:M}=R;if(lowerCaseIncludes(L,"image")&&lowerCaseIncludes(M==null?void 0:M.value,["asc","desc"])){F=M.value.toUpperCase();break}}return F&&(_={label:C.label,columnName:C.name,order:F,type:"NORMAL"}),_},p=async(C={})=>{var he,pe,ve,ye,be,Ce;a(e.id,!1);const{graphicConfig:P,type:_,isGroupTable:F=!1}=e;let{source:D,dataViewId:R,plugin:L="1",layer:M,chartType:V,classificationList:B=[],rowHeaderList:k=[],dimensionList:I=[],seriesList:S=[],leftAxisList:w=[],rightAxisList:O=[],queryColumnList:T=[],indicators:G=[],controlList:H=[],formFields:N={},variableList:W=[],variableConditions:q=[],idxLibMode:j,preview:$=!1}=P||{},U=[];if((P==null?void 0:P.pageMode)==="design"?(U=(P.sqlConditions??[]).map(ue=>{const fe={};if(!l(ue,"globalCondition")&&!ue.join&&(fe.globalCondition=!0),!ue.join){const de=ue.rule||"EQUAL";fe.rule=de==="NONE"?"EQUAL":de}return{...ue,...fe}}),q!=null&&q.length&&(U=U.concat(q))):(U=b(P),W!=null&&W.length&&(U=U.concat(y(W)))),U!=null&&U.length){const ue=U.filter(de=>de.globalCondition),fe=U.filter(de=>!de.globalCondition);(ue==null?void 0:ue.length)>1&&(U=[{join:"&&",conditions:ue},...fe])}U!=null&&U.length&&(U=u(U,"1")),M==null&&(lowerCaseIncludes(_,["table"])||lowerCaseIncludes(_,["list","circulate"])&&(B==null?void 0:B.length)>1?M="1":lowerCaseIncludes(_,["select","checkbox","radio"])?M="3":M="2");let J;const Q=[];let oe="";if(Array.isArray(B)&&B.length>0&&(!["ecanList","ecanCirculate"].includes(_)||(B==null?void 0:B.length)===1)){const ue=B.length;for(let fe=0;fe<ue;fe++){const de=B[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,dateFormat:Te,typeGuid:Le="",truncations:Fe=[]}=de;if(_e||ue===1){oe=Le,J={label:Ae.trim(),columnName:Se,show:_e,sort:m(de)||d(ke)||ke,customGroup:Me,conditions:u(Re),typeGuid:Le},Te&&(J.dateFormat=Te),Se==="the_date"&&!J.dateFormat&&(J.dateFormat="YYYY-MM");const Pe={};if(Array.isArray(Fe)&&Fe.length>0){const Z=Fe.length;for(let X=0;X<Z;X++){const te=Fe[X]||{},{rule:se="",num:ce=0,name:le=""}=te;se&&ce&&(Pe.num=ce,Pe.rule=se,le&&(Pe.otherGroupName=le))}}if((he=Object.keys(Pe))!=null&&he.length&&(J.truncation=Pe),lowerCaseIncludes(_,"scatter"))Q.push(J);else break}}}let K;if(Array.isArray(S)&&S.length>0){const ue=S.length;for(let fe=0;fe<ue;fe++){const de=S[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,typeGuid:Te}=de;if(_e||ue===1){K={label:Ae.trim(),columnName:Se,show:_e,sort:d(ke),customGroup:Me,conditions:u(Re),typeGuid:Te};break}}}const Y=[];w==null||w.forEach(ue=>{ue.location="LEFT",Y.push(h(ue,J))}),O==null||O.forEach(ue=>{ue.location="RIGHT",Y.push(h(ue,J))}),G==null||G.forEach(ue=>{ue.location="LEFT",Y.push(h(ue,J))});const ee=[];["ecanList","ecanCirculate"].includes(_)&&(B==null?void 0:B.length)>1&&(T=B),T==null||T.forEach(ue=>{const{label:fe,name:de,location:Ae,show:Se,indexCode:_e,sort:ke,typeGuid:Me,indexCodeNum:Re,dateFormat:Te,conditions:Le}=ue;let Fe=d(ke);if(C.sort){const{field:Z,order:X}=C.sort;let te=Y.find(se=>se.label===Z);!te&&fe===Z&&(te=ue),te&&(Fe={columnName:te.columnName,label:C.sort.field,order:X.toUpperCase(),type:"NORMAL"})}const Pe={label:fe,columnName:de,location:Ae,show:Se,sort:Fe,calcType:"COLUMN",hrpIndexCode:_e,hrpIndexCodeNum:Re,conditions:u(Le),typeGuid:Me};Te&&(Pe.dateFormat=Te),de==="the_date"&&!Pe.dateFormat&&(Pe.dateFormat="YYYY-MM"),ee.push(Pe)});const ne=[];let re=[];if(Array.isArray(k)&&k.length>0?re=k:Array.isArray(I)&&I.length>0&&(re=I),re!=null&&re.length){const ue=re.length;for(let fe=0;fe<ue;fe++){const de=re[fe]||{},{label:Ae="",name:Se="",show:_e=!1,sort:ke,customGroup:Me,conditions:Re,truncations:Te,typeGuid:Le="",dateFormat:Fe}=de;let Pe=d(ke);if(C.sort){const{field:te,order:se}=C.sort;let ce=Y.find(le=>le.label===te);!ce&&de.label===te&&(ce=de),ce&&(Pe={columnName:ce.columnName,label:C.sort.field,order:se.toUpperCase(),type:"NORMAL"})}const Z={label:Ae.trim(),columnName:Se,show:_e,sort:Pe,customGroup:Me,conditions:u(Re),typeGuid:Le};Fe&&(Z.dateFormat=Fe),Se==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const X={};if(Array.isArray(Te)&&Te.length>0){const te=Te.length;for(let se=0;se<te;se++){const ce=Te[se]||{},{rule:le="",num:ae=0,name:me=""}=ce;le&&ae&&(X.num=ae,X.rule=le,me&&(X.otherGroupName=me))}}(pe=Object.keys(X))!=null&&pe.length&&(Z.truncation=X),ne.push(Z)}}if(lowerCaseIncludes(_,["text","proportion","counter"])&&(V="zb"),F){if(ne.length===0||Y.length===0)return;V="grouptable"}else{if(M==="1"&&ee.length===0)return;if(M==="2"&&Y.length===0)return;if(M==="3"&&(!oe||!N.labelField||!N.valueField))return;if(M==="3"&&_==="ecanDataSelect"&&Y.length===0)return}I!=null&&I.length&&(M="1",V="grouptable");let ie=(ve=window==null?void 0:window.config)==null?void 0:ve.pageId;if(!ie){const{pathname:ue}=window==null?void 0:window.location;if(ue){const fe=ue.split("/");fe!=null&&fe.length&&(ie=fe[fe.length-1])}}if(_!=="ecanScatter"&&((ye=Object.keys(N))!=null&&ye.length)){const ue=getConditions(H).find(de=>de.conditionKey==="parentCode"),fe={};if(ue){const de=o(ue.id)||{};if(de!=null&&de.itemCodes)fe.parentItemCodes=de.itemCodes;else return}_==="ecanDataSelect"&&(fe.indicatorList=Y.filter(de=>de.show));try{const de=await request.post(`${INDICATOR_URL}/diagram/formData`,{source:D,dataViewId:R,plugin:"4",layer:M,chartType:"normalSelect",rangeIndexTypeGuid:oe,type:_==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:N.labelField,valueField:N.valueField,pageId:ie,sqlConditions:U,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...fe},{headers:{Authentication:(be=window==null?void 0:window.config)==null?void 0:be.indicatorToken,operateContext:CONTEXT}});return C!=null&&C.isTimer&&r(de),de}catch(de){console.error(de)}finally{}}else try{let ue={};lowerCaseIncludes(_,"scatter")?ue={classifications:Q}:ue={classification:J};const fe=await request.post(`${INDICATOR_URL}/diagram`,{source:D,dataViewId:R,plugin:L,layer:M,chartType:V,...ue,series:K,indicatorList:Y,queryColumns:F?[]:ee,pageFlag:!0,pageId:ie,sqlConditions:U.map(de=>{const{fieldValue:Ae}=de,Se={};return Ae&&Array.isArray(Ae)&&(Se.fieldValue=JSON.stringify(Ae)),{...de,...Se}}),idxLibMode:j,preview:$,rowHeaders:ne,keyName:e.keyName},{headers:{Authentication:(Ce=window==null?void 0:window.config)==null?void 0:Ce.indicatorToken,operateContext:CONTEXT}});return C!=null&&C.isTimer&&r(fe),fe}catch(ue){console.error(ue)}finally{}},x=vue.unref(n)!=="design"&&((A=e==null?void 0:e.graphicConfig)==null?void 0:A.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{p({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(x)}),p},useHrefParamsToGlobalVariables=()=>{const r=window.location.search.slice(1).split("&"),n=r.length,i={};for(let a=0;a<n;a++){const o=r[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$r=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps},setup(e){const{width:r,height:n}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=r.value,x.height=n.value),{...x,backgroundColor:e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),h=vue.ref(!1),b=vue.ref();let f;const g=()=>new Promise(x=>{vue.nextTick(()=>{r.value&&n.value?(s.value=parseFloat(r.value),l.value=parseFloat(n.value)):(s.value=b.value.clientWidth,l.value=b.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),v=()=>{s.value&&l.value?(b.value.style.width=`${s.value}px`,b.value.style.height=`${l.value}px`):(b.value.style.width=`${c.value}px`,b.value.style.height=`${u.value}px`)};vue.watch([r,n],async()=>{await g(),v(),E(),window.addEventListener("resize",d),m(),h.value=!0},{immediate:!0});const y=vue.ref({});vue.provide("scaleValue",y);const E=()=>{if(a){b.value.style.width="100%",b.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,A=document.body.clientHeight,C=s.value||c.value,P=l.value||u.value,_=x/C;let F=A/P;(s.value!==1920||l.value!==1080)&&(F=l.value/s.value*x/P),y.value={widthScale:_,heightScale:F},b.value&&(b.value.style.transform=`scale(${_}, ${F})`),i(F)},d=lodashEs.debounce(async()=>{await g(),E()},100),m=()=>{const x=window.MutationObserver;f=new x(d),f.observe(b.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},p=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return vue.onMounted(()=>{h.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",d),p()}),{style:o,container:b,ready:h}}}),PageConfig_vue_vue_type_style_index_0_scoped_b496b36e_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$w(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$r,[["render",_sfc_render$w],["__scopeId","data-v-b496b36e"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$q=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps},setup(e,{expose:r}){useHrefParamsToGlobalVariables();const n=vue.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),i=vue.ref(),a=()=>{i.value.setAttribute("datav-theme",e.theme)},o=vue.inject("usedComponentList",[]),s=vue.inject("componentList",[]),l=vue.computed(()=>{const K=[];for(const Y of vue.unref(o))Y.type==="ecanModal"?K.push(...Y.componentList):K.push(Y);return K});vue.watch(()=>e.theme,()=>{a()}),vue.onMounted(()=>{a()});const c=vue.computed(()=>useVariablesInText(e.contextRequestUrl)),u=vue.computed(()=>e.pageMode),h=vue.computed(()=>e.theme),b=vue.computed(()=>e.width),f=vue.computed(()=>e.height),g=vue.computed(()=>e.pageFontFamily),v=vue.computed(()=>{const K=[],Y=vue.unref(s).filter(ee=>ee.type==="ecanModal");for(const ee of Y)ee!=null&&ee.requestList&&K.push(...ee.requestList);return[...K,...e.requestList]}),y=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:c,pageMode:u,theme:h,touchEventId:y,width:b,height:f,fontFamily:g,requestList:v});const E=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",K=>{let Y=K;n.value||(Y=parseFloat(f.value)*K+"px"),E.value.height=Y}),vue.provide("isMobile",n.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap);const d=vue.ref(),m=new Map;console.log("globalModel",m);const p=K=>m.get(K),x=(K,Y)=>{d.value=Y,m.set(K,Y)},A=()=>{d.value=null},C=K=>{let Y=K;if(Y){const ee=K.match(/\{(.+?)\}/g);if(ee!=null&&ee.length){let ne=ee[0].slice(1,-1).trim();const re=ne.match(/\[(.+?)\]/g);let ie="";re!=null&&re.length&&(ne=ne.replace(re[0],""),ie=re[0].slice(1,-1).trim());const he=vue.unref(o).find(pe=>pe.keyName===ne);if(he){const pe=p(he.id),{type:ve,value:ye,RECORD:be,recordData:Ce}=pe||{};lowerCaseIncludes(ve,MODEL_KEY_LIST)?Y=be[ie]:lowerCaseIncludes(ve,"select")?Y=Ce[ie]:lowerCaseIncludes(ve,["rangePicker","date"])?dayjs.isDayjs(vue.unref(pe[ie]))?Y=vue.unref(pe[ie]).format(pe.format):Y=vue.unref(pe[ie]):Y=ye}else Y=""}}return Y},P=new Map,_={},F=async(K,Y)=>{var he;const{requestName:ee}=K,ne=await useRequestData({...K,projectRequestUrl:vue.unref(c),getModel:p})(),re=((he=ne==null?void 0:ne.data)==null?void 0:he.data)||{},ie=P.get(ee);if(ie!=null&&ie.length&&(!Y||_[ee])){for(const pe of ie)pe(re);Y||P.delete(ee)}},D=(K,Y)=>{_[K]&&(clearInterval(_[K]),delete _[K],P.delete(K));const ee=vue.unref(l).filter(re=>re.customRequestName===K),ne=P.get(K)||[];if((ee==null?void 0:ee.length)>ne.length&&(ne.push(Y),P.set(K,ne),(ee==null?void 0:ee.length)===ne.length)){const re=vue.unref(v).find(ie=>ie.requestName===K);re&&(re!=null&&re.isOpenRequestTimer&&(re!=null&&re.requestInterval)?(F(re,!0),_[K]=setInterval(()=>{F(re,!0)},re.requestInterval*1e3)):F(re))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:p,setGlobalModel:x,clearInteractiveData:A,getRecordValueByKeyName:C,hanldePageRequestData:D,interactiveData:d});const R=vue.ref({}),L=(K,Y)=>{R.value[K]=Y};vue.provide(LOADED_DATA,{loadedData:R,setLoadedData:L});const M=[],V=()=>{M.pop()},B=K=>{M.push(K)},k=new Map,I=K=>k.get(K),S=(K,Y)=>{k.set(K,Y)};vue.provide(MODAL_MODEL,{popUseModalIds:V,pushUseModalIds:B,getModalModel:I,setModalModel:S});const w=mitt(),O=new Set,T=(K,Y)=>{O.add(K),w.on(K,ee=>{const{eventName:ne,params:re}=ee;return typeof Y[ne]=="function"&&Y[ne](re)}),vue.onBeforeUnmount(()=>{G(K)})},G=K=>{O.delete(K),w.off(K)},H=(K,Y,ee={})=>{if(K==="PAGE"){const ne=M.length;let re=[];if(ne===0)re=[...O];else{const ie=M[ne-1];re=[...I(ie)]}re.forEach(ie=>{w.emit(ie,{eventName:Y,params:ee})})}else w.emit(K,{eventName:Y,params:ee})};vue.provide(EVENT_BUS,{onEvent:T,offEvent:G,emitEvent:H});const N=vue.ref(0),W=()=>{N.value=vue.unref(N)+1};vue.provide(GLOBAL_TOKEN,{requestToken:W});const q=new Map,j=new Map,$=({requestFn:K=()=>{},sortNum:Y=0,id:ee=""})=>{if(q.has(Y)){const ne=q.get(Y);ne==null||ne.push(K)}else q.set(Y,[K]);j.set(ee,K)},U=K=>new Promise((Y,ee)=>{const ne=K.map(re=>re());Promise.all(ne).then(re=>{Y(re)}).catch(re=>{ee(re)})}),J=K=>new Promise(async(Y,ee)=>{if(K){if(typeof K=="string"){const ne=j.get(K);if(typeof ne=="function"){const re=request.interceptors.response.use(ie=>(Y(ie),ie),ie=>(ee(ie),Promise.reject(ie)));ne(),request.interceptors.response.eject(re)}}}else{const ne=Array.from(q);ne.sort((ie,he)=>he[0]-ie[0]);const re=ne.length;try{e.pageMode!=="design"&&vue.unref(N)>0;for(let ie=0;ie<re;ie++){const he=ne[ie][1];await U(he)}}catch(ie){console.error(ie)}finally{q.clear(),Y(null)}}});vue.provide(REQUEST_MODEL,{setRequest:$,touchRequest:J});const Q=()=>{w.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:Q});const oe=K=>{w.on(REFRESH_PAGE,()=>K()),vue.onMounted(()=>{w.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var K;if((K=vue.unref(o))!=null&&K.length&&vue.unref(u)!=="design"){const{jumpType:Y,jumpTime:ee,jumpPage:ne,jumpLink:re}=e;if(ee!=null&&ee.value){let ie=0;switch(ee==null?void 0:ee.suffix){case"hours":ie=ee.value*60*60*1e3;break;case"minute":ie=ee.value*60*1e3;break;case"seconds":ie=ee.value*1e3;break}setTimeout(()=>{let he="";Y==="page"&&ne?he=usePageUrl(vue.unref(u),ne):Y==="link"&&re&&(he=re),he=useVariablesInText(he),window.open(he,"_self")},ie)}}}),vue.onBeforeUnmount(()=>{q==null||q.clear(),j==null||j.clear()}),r({touchRequest:J,getGlobalModel:p,onRefreshPage:oe}),{providerConfig:i,configStyle:E}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_ffe2b0b9_lang="";function _sfc_render$v(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$q,[["render",_sfc_render$v],["__scopeId","data-v-ffe2b0b9"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[],exceedConfig:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",goDown="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:r}){const n=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=B=>{var k,I;if(e.showAnimation){const S=e.text.match(/\{(.+?)\}/g)||[];if(S!=null&&S.length){const w=(k=S[0].slice(1,-1))==null?void 0:k.trim();if(vue.unref(a)[w]===B){a.value=B;return}const O=+B[w];let T=0;if(isNaN(O))a.value=B;else{String(O).includes(".")&&(T=((I=String(O).split(".")[1])==null?void 0:I.length)||0);const G=Math.abs(O)*Math.pow(10,T),H=String(G).length;let N=[];for(let q=0;q<5;q++){const j=Math.ceil(Math.random()*(G+1)-1);N.includes(j)||N.push(j)}N.sort((q,j)=>q-j),N=N.map(q=>{const j=String(q).split("").reverse(),$=[];for(let U=0;U<H;U++)j&&j[U]?$.push(j[U]):$.push("0");return T&&$.splice(T,0,"."),(O<0?"-":"")+$.reverse().join("")}),N.push(O);let W=0;for(const q of N)setTimeout(()=>{a.value={...vue.unref(a),[w]:q}},W*1e3),W+=.1}}else a.value=B}else a.value=B};vue.watch(()=>[e.data,e.dataType],([B,k])=>{k==="static"&&l(B)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:h,hanldePageRequestData:b}=vue.inject(GLOBAL_MODEL,{getGlobalModel:B=>{},setGlobalModel:(B,k)=>{},getRecordValueByKeyName:B=>{},hanldePageRequestData:(B,k)=>{}}),{setLoadedData:f}=vue.inject(LOADED_DATA,{setLoadedData:(B,k)=>{}}),g=vue.computed(()=>{let B="";if(e.gradientShow){const{gradientColor:k,gradientOffset:I,gradientAngle:S,color:w}=e;B+=`background: linear-gradient(${S}, ${w}, ${k||"transparent"} ${I*100}%);-webkit-background-clip: text;color: transparent;`}return B}),v=vue.computed(()=>{const B={};if(e.gradientShow){const{gradientColor:k,gradientOffset:I,gradientAngle:S,color:w}=e,O=k||"transparent";B.background=`linear-gradient(${S}, ${w}, ${O} ${I*100}%)`,B["-webkit-background-clip"]="text",B.color="transparent"}return B}),y=vue.computed(()=>{var G;if(vue.unref(n))return"NaN";const B=vue.unref(a),k=e.increaseColor||e.color,I=e.declineColor||e.color;let S=e.text;S=S==null?void 0:S.replace(/\n|\\n/g,"<br/>"),S=S==null?void 0:S.replace(/\s(?!\{) | (?!\})\s/g," ");const w=S.match(/\{(.+?)\}/g)||[];let O="",T="";if(e.exceedConfig==="wrap"?T="show-wrap":e.exceedConfig==="ellipsis"&&(T="show-ellipsis"),w==null||w.length===0){if(S&&e.format==="percentage"&&!isNaN(+S)){const H=parseFloat(S),N=H*100,W=E(N.toFixed(2));H>=0?S=`<span class="${T}" style="color: ${W||k||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(g)}">
|
|
100
100
|
<div class="percentage-img-box">
|
|
101
101
|
<img style="width: ${vue.unref(o)};filter: ${`drop-shadow(${W||k||"#ED6643"} ${vue.unref(o)} 0px)`};" src="${goUp}"/>
|
|
102
102
|
</div>
|