UNPKG

@persagy2/meri-design

Version:

fork from meri-design and extend it.

7 lines 63.9 kB
/*! * @@persagy2/meri-design v1.4.9-extend.2 * (c) 2019-2020 xiongshuang * Released under the MIT License. * 2022-12-07 10:31:52 */ var t,e;t=this,e=function(t){return function(){"use strict";var e={1952:function(t,e,n){var i=n(5064);e.Z={name:"Checkbox",props:{checked:{type:String,default:"uncheck"},disabled:{type:Boolean,default:!1},stopPropagation:{type:Boolean,default:!1}},methods:{TextEllipsis:i.Z,handleChange:function(t){var e,n=this.disabled,i=this.checked;if(this.stopPropagation&&t.stopPropagation(),!n){var r=this.$el.dataset,a="";a="checked"===i?"uncheck":"checked",null!==(e=this._events)&&void 0!==e&&e.change?this.$emit("change",a,r):this.$emit("update:checked",a)}}}}},8349:function(t,e,n){n.d(e,{s:function(){return i},x:function(){return r}});var i=function(){var t=this,e=t._self._c;return e("div",{class:["p-checkbox",t.disabled&&"p-checkbox-disabled"],on:{click:t.handleChange}},[e("i",{class:["p-checkbox-box","p-checkbox-"+t.checked]}),t._v(" "),Object.keys(t.$slots).length?e("span",{staticClass:"p-checkbox-text",on:{mouseenter:t.TextEllipsis}},[t._t("default")],2):t._e()])},r=[]},6875:function(t,e,n){var i=n(3931);i.Z.install=function(t){return t.component(i.Z.name,i.Z)},e.default=i.Z},3451:function(t,e,n){n.d(e,{default:function(){return r}});var i={name:"MButton",props:{type:{type:String,default:"default"},size:{type:String,default:"medium"},disabled:{type:Boolean,default:!1},width:{type:[String,Number],default:""}},data:function(){return{}},methods:{clickHandle:function(){this.$emit("click")}},render:function(t){var e=this.type,n=this.size,i=this.disabled,r=this.width,a=this.clickHandle;return t("div",{class:["m-button","m-button-".concat(e),"m-button-".concat(n),"m-button-".concat(i?"disabled":"normal")],attrs:{type:e},style:{width:"".concat(r,"px")},on:{click:a}},[t("section",{class:"m-button-content"},[t("span",{class:"m-button-text"},[this.$slots.default])])])},install:function(t){return t.component(i.name,i)}},r=i},5064:function(t,e){e.Z=function(t){var e=t.target,n=e.clientWidth,i=e.scrollWidth;e.title=i>n?e.innerText:""}},7021:function(){},3931:function(t,e,n){var i=n(872),r=n(5242),a=(n(6921),(0,n(1900).Z)(r.Z,i.s,i.x,!1,null,null,null));e.Z=a.exports},5242:function(t,e,n){var i=n(1952);e.Z=i.Z},872:function(t,e,n){n.d(e,{s:function(){return i.s},x:function(){return i.x}});var i=n(8349)},6921:function(t,e,n){n(7021)},1900:function(t,e,n){function i(t,e,n,i,r,a,o,s){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}n.d(e,{Z:function(){return i}})},2205:function(e){e.exports=t}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var a=n[t]={exports:{}};return e[t](a,a.exports,i),a.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){i.r(r),i.d(r,{default:function(){return Dt}});var t=i(1900),e=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M112.979852 869.87749m29.144113-29.144113l699.730243-699.730243q29.144113-29.144113 58.288226 0l0 0q29.144113 29.144113 0 58.288226l-699.730243 699.730243q-29.144113 29.144113-58.288226 0l0 0q-29.144113-29.144113 0-58.288226Z"}}),this._v(" "),t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M824.612116 882.05104L156.379237 213.818161a42.88 42.88 0 1 1 60.641478-60.641477l668.232879 668.232879a42.88 42.88 0 0 1-60.641478 60.641477z"}})])}),[],!1,null,null,null).exports,n=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M712.277333 776.234667l202.709334 196.992a42.666667 42.666667 0 0 0 59.477333-61.184l-202.666667-196.992a42.666667 42.666667 0 1 0-59.52 61.184z"}}),t("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M462.08 877.397333c231.552 0 419.370667-186.837333 419.370667-417.365333 0-230.570667-187.818667-417.365333-419.413334-417.365333C230.485333 42.666667 42.666667 229.461333 42.666667 460.032c0 230.528 187.818667 417.365333 419.413333 417.365333z m0-85.333333c-184.576 0-334.08-148.736-334.08-332.032C128 276.693333 277.504 128 462.08 128c184.533333 0 334.037333 148.693333 334.037333 332.032 0 183.296-149.504 332.032-334.08 332.032z"}})])}),[],!1,null,null,null).exports,a=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("g",{attrs:{transform:"translate(-1.000000, -1.000000)","fill-rule":"nonzero"}},[t("path",{staticClass:"svg-fill-grey-400",attrs:{d:"M8,1 C4.134375,1 1,4.134375 1,8 C1,11.865625 4.134375,15 8,15 C11.865625,15 15,11.865625 15,8 C15,4.134375 11.865625,1 8,1 Z M10.784375,9.6375 C11.040625,9.89375 11.040625,10.309375 10.784375,10.565625 C10.528125,10.821875 10.1125,10.821875 9.85625,10.565625 L8,8.709375 L6.14375,10.565625 C5.8875,10.821875 5.471875,10.821875 5.215625,10.565625 C4.959375,10.309375 4.959375,9.89375 5.215625,9.6375 L7.071875,7.78125 L5.215625,5.925 C4.959375,5.66875 4.959375,5.253125 5.215625,4.996875 C5.471875,4.740625 5.8875,4.740625 6.14375,4.996875 L8,6.853125 L9.85625,4.996875 C10.1125,4.740625 10.528125,4.740625 10.784375,4.996875 C11.040625,5.253125 11.040625,5.66875 10.784375,5.925 L8.928125,7.78125 L10.784375,9.6375 L10.784375,9.6375 Z"}})])])}),[],!1,null,null,null).exports,o=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"\r\n M7.36397105,6.47904167\r\n C7.71544566,6.05570759 8.29167643,6.06338938 8.63677321,6.47904167\r\n L10.9236602,9.23348584\r\n C11.2751348,9.65681992 11.1147123,10 10.555128,10\r\n L5.44561621,10 C4.89060692,10 4.7319873,9.64913813 5.07708407,9.23348584\r\n L7.36397105,6.47904167\r\n Z"}})])}),[],!1,null,null,null).exports,s=(0,t.Z)({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M213.312 525.376m-85.312 0a85.312 85.312 0 1 0 170.624 0 85.312 85.312 0 1 0-170.624 0Z"}}),t._v(" "),e("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M495.744 525.376m-85.312 0a85.312 85.312 0 1 0 170.624 0 85.312 85.312 0 1 0-170.624 0Z"}}),t._v(" "),e("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M778.176 525.376m-85.312 0a85.312 85.312 0 1 0 170.624 0 85.312 85.312 0 1 0-170.624 0Z"}})])}),[],!1,null,null,null).exports,c=i(6875),l=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"\r\n M8.3904344,6.48804301\r\n L11.350122,10.1876525\r\n C11.5226268,10.4032834 11.4876661,10.7179296 11.2720351,10.8904344\r\n C11.1833786,10.9613596 11.0732233,11 10.9596876,11\r\n L5.04031242,11\r\n C4.76417005,11 4.54031242,10.7761424 4.54031242,10.5\r\n C4.54031242,10.3864643 4.5789528,10.276309 4.64987802,10.1876525\r\n L7.6095656,6.48804301\r\n C7.78207037,6.27241204 8.09671656,6.23745135 8.31234752,6.40995612\r\n C8.34117988,6.43302201 8.36736852,6.45921065 8.3904344,6.48804301\r\n Z",transform:"translate(0, -0.5)"}})])}),[],!1,null,null,null).exports,u=i(2205),d=i.n(u),h=function(t,e,n,i,r){var a,o,s=e.clientHeight,c=e.clientWidth,l=window,u=l.pageYOffset,d=l.pageXOffset,h=t.getBoundingClientRect(),p=h.top,f=h.left,v=h.height,m=h.width,g=!0;s-(p+v+8)>=n?a=p+v+8+u:p-8>=n?(a=p-n-8+u,g=!1):a=s-n+u;var y=c-f-m,b=y+m;return o=c<=i?d:f>0?b>=i?f+d:f+m>=i?f+m-i+d+(y>0?0:y):(c-i)/2+d:d,r&&b>=i&&(o=o-i+m),{X:o,Y:a,P:g}},p=function(t){if(t&&!t._isDestroyed){t.$destroy();var e=t.$el;e&&e.parentNode.removeChild(e)}},f=i(5064),v={name:"DOption",components:{ClearSvg:a},props:{parent:{type:Object,default:function(){return{}}},data:{type:Array,default:function(){return[]},require:!0},value:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},maxWidth:{type:[String,Number],default:""},theme:{type:String,default:"light"},trigger:{type:String,default:"hover"},openSearch:{type:Boolean,default:!1},placeholder:{type:String,default:"请搜索"},alignRight:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},translateX:{type:[String,Number],default:0},maxCount:{type:[String,Number],default:5}},data:function(){return{position:!0,optionStatus:!1,activeClose:!0,inputVal:"",optionData:[],scrollTop:0}},watch:{optionStatus:function(t){var e=this;t?setTimeout((function(){e.$el.style.pointerEvents="auto",e.$el.focus()}),300):this.$el.style.pointerEvents="none"},data:{handler:function(t,e){var n=JSON.stringify(t);n!==JSON.stringify(e)&&(this.optionData=JSON.parse(n))},deep:!0},inputVal:function(t,e){var n=this;t!==e&&(this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){n.searchHandle(t)}),300))}},mounted:function(){this.optionData=JSON.parse(JSON.stringify(this.data))},methods:{TextEllipsis:f.Z,inputDown:function(){this.activeClose=!1},searchHandle:function(t){var e=JSON.parse(JSON.stringify(this.data));this.optionData=t?e.filter((function(e){return e.name.includes(t)?e:null})):e},clearInput:function(){this.inputVal=""},optionClick:function(t,e,n){n||this.$emit("change",t,e)},dropClose:function(){this.activeClose&&(this.optionStatus=!1,this.parent.optionStatus=!1)},dropEnter:function(){this.activeClose=!1,this.parent.dropTimer&&clearTimeout(this.parent.dropTimer),this.dropTimer&&clearTimeout(this.dropTimer)},dropLeave:function(){this.activeClose=!0,this.$el.focus(),"hover"===this.trigger&&(this.dropTimer=setTimeout(this.dropClose,300))},scrollTopHandle:function(t){this.scrollTop=t.target.scrollTop}}},m=(0,t.Z)(v,(function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:t.position?"selectDownUpExtend":"selectDownUpExtendTop"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.optionStatus,expression:"optionStatus"}],class:["p-drop-content","p-drop-content-".concat(t.theme),t.arrow&&(t.position?"p-drop-content-top-arrow":"p-drop-content-bottom-arrow")],style:{minWidth:"".concat(t.minWidth,"px"),maxWidth:"".concat(t.maxWidth,"px")},attrs:{tabindex:"-1"},on:{wheel:function(t){t.stopPropagation()},blur:t.dropClose,mouseenter:t.dropEnter,mouseleave:t.dropLeave}},[t.openSearch?e("label",{staticClass:"p-drop-search",class:{"p-drop-search-shadow":t.scrollTop>12}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.inputVal,expression:"inputVal"}],staticClass:"p-drop-input",attrs:{type:"text",placeholder:t.placeholder},domProps:{value:t.inputVal},on:{mousedown:t.inputDown,input:function(e){e.target.composing||(t.inputVal=e.target.value)}}}),t._v(" "),e("i",{directives:[{name:"show",rawName:"v-show",value:t.inputVal,expression:"inputVal"}],staticClass:"p-drop-clear",on:{click:t.clearInput}},[e("ClearSvg")],1)]):t._e(),t._v(" "),e("div",{ref:"dropOption",staticClass:"p-drop-option",on:{scroll:t.scrollTopHandle}},t._l(t.optionData,(function(n,i){return e("section",{key:"".concat(i,"-").concat(n.id),class:["p-drop-option-item",t.value===n.id&&"p-drop-option-selected",n.disabled&&"p-drop-option-disable"],on:{click:function(e){return e.stopPropagation(),t.optionClick(n.id,n.name,n.disabled)},mouseenter:t.TextEllipsis}},[n.icon?e("i",{staticClass:"p-drop-option-svg",domProps:{innerHTML:t._s(n.icon)}}):t._e(),t._v(" "),e("span",[t._v(t._s(n.name))])])})),0)])])}),[],!1,null,null,null).exports,g=d().extend(m),y=null,b=function(t){var e=t.tag,n=t.propsData,i=document.body;return(y=(y=new g({propsData:n})).$mount()).tag=e,y.dom=i,i.appendChild(y.$el),y};b.remove=p,b.resetPosition=function(t){var e,n=t.data,i=void 0===n?[]:n,r=t.minWidth,a=t.maxWidth,o=t.alignRight,s=t.translateX,c=t.maxCount,l=void 0===c?5:c,u=t.$refs.dropOption,d=r&&a&&r===a?a:function(t,e,n){var i=document.body,r=document.createElement("div");r.className="p-drop-content",e&&(r.style.minWidth="".concat(e,"px")),n&&(r.style.maxWidth="".concat(n,"px")),r.style.height="0",r.style.zIndex="-100";var a='<div class="p-drop-option">';t.forEach((function(t){a+='<section class="p-drop-option-item"><span>'.concat(t.name,"</span></section>")})),a+="</div>",r.innerHTML=a,i.appendChild(r);var o=r.getBoundingClientRect().width;return i.removeChild(r),o}(i,r,a),p=38*i.length,f=38*l;e=p<f?p:f;var v=h(t.tag,t.dom,e,d,o),m=v.X,g=v.Y,y=v.P;t.position=y,t.$el.style.top="".concat(g,"px"),t.$el.style.left="".concat(m+Number(s),"px"),u.style.maxHeight="".concat(f,"px")};var k=b,w={name:"Dropdown",components:{Triangle:l},props:{data:{type:Array,default:function(){return[]},require:!0},value:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},maxWidth:{type:[String,Number],default:""},triangle:{type:Boolean,default:!0},transfer:{type:String,default:"parent"},theme:{type:String,default:"light"},trigger:{type:String,default:"hover"},openSearch:{type:Boolean,default:!1},placeholder:{type:String,default:"请搜索"},alignRight:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},translateX:{type:[String,Number],default:0},disabled:{type:Boolean,default:!1},maxCount:{type:[String,Number],default:5}},data:function(){return{optionStatus:!1,dropShow:!1}},watch:{value:function(t,e){t!==e&&this.dOption&&(this.dOption.value=t)},data:function(t,e){t!==e&&this.dOption&&(this.dOption.data=t)},optionStatus:function(t,e){var n=this;t!==e&&(t?this.dropShow=!0:setTimeout((function(){n.dropShow=!1}),300))},dropShow:function(t,e){t!==e&&this.$emit("getStatus",t)}},methods:{openDrop:function(){var t=this,e=this.data;if(!(JSON.stringify(e).length<=4))if(this.dOption)this.setDropdownStatus(!0);else{var n=this.value,i=this.minWidth,r=this.maxWidth,a=this.trigger,o=this.theme,s=this.openSearch,c=this.placeholder,l=this.alignRight,u=this.arrow,d=this.translateX,h=this.maxCount,p=this.$refs.pDrop;this.dOption=k({tag:p,propsData:{parent:this,value:n,data:e,minWidth:i,maxWidth:r,trigger:a,theme:o,openSearch:s,placeholder:c,alignRight:l,arrow:u,translateX:d,maxCount:h}}).$on("change",(function(e,n){t.optionClick(e,n)})),this.dOption.$nextTick((function(){t.setDropdownStatus(!0)}))}},dropClick:function(){var t=this.disabled,e=this.trigger,n=this.optionStatus,i=this.dropShow;t||i||"click"!==e||n||this.openDrop()},dropEnter:function(){var t=this.disabled,e=this.trigger,n=this.optionStatus;t||"hover"!==e||n||this.openDrop()},dropLeave:function(){this.disabled||"hover"===this.trigger&&this.dOption&&(this.dropTimer=setTimeout(this.dOption.dropClose,300))},setDropdownStatus:function(t){this.optionStatus=t,this.dOption&&(this.dOption.optionStatus=t,t&&k.resetPosition(this.dOption))},optionClick:function(t,e){this.$emit("input",t),this.$emit("change",t,e),this.setDropdownStatus(!1)},listenScroll:function(){this.setDropdownStatus(!1)}},beforeDestroy:function(){this.setDropdownStatus(!1),this.dOption&&k.remove(this.dOption)}},x=(0,t.Z)(w,(function(){var t=this,e=t._self._c;return e("div",{ref:"pDrop",class:["p-drop","p-drop-".concat(t.theme),t.dropShow&&"p-drop-show",t.disabled&&"p-drop-disabled"],on:{mouseenter:t.dropEnter,mouseleave:t.dropLeave,click:function(e){return e.stopPropagation(),t.dropClick.apply(null,arguments)}}},[e("section",{staticClass:"p-drop-title"},[e("article",{staticClass:"p-drop-title-content"},[t._t("default")],2),t._v(" "),t.triangle?e("article",{class:["p-drop-triangle",!t.optionStatus&&"p-drop-triangle-rotate"]},[e("Triangle")],1):t._e()])])}),[],!1,null,null,null),S=x.exports,D=function(){return!!window.ActiveXObject||"ActiveXObject"in window},C=function(t,e,n){var i=n?t.reverse():t,r={},a=i.reduce((function(t,n){return r[n[e]]||(r[n[e]]=t.push(n)),t}),[]);return n?a.reverse():a};function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function N(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */N=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(_){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof h?e:h,o=Object.create(a.prototype),s=new C(r||[]);return i(o,"_invoke",{value:w(t,n,s)}),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(_){return{type:"throw",arg:_}}}t.wrap=l;var d={};function h(){}function p(){}function f(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==e&&n.call(g,a)&&(v=g);var y=f.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,a,o,s){var c=u(t[i],t,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==O(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(d).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function w(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return{value:void 0,done:!0}}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=u(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=f,i(y,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(k.prototype),c(k.prototype,o,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,i,r,a){void 0===a&&(a=Promise);var o=new k(l(e,n,i,r),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(y),c(y,s,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=L,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return o.type="throw",o.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function T(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?L(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==O(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===O(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function I(t,e,n,i,r,a,o){try{var s=t[a](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,r)}function E(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){I(a,i,r,o,s,"next",t)}function s(t){I(a,i,r,o,s,"throw",t)}o(void 0)}))}}var P=function(t){return 24*(t.split("-").length-1)+12},j=function(t){return!(t.hasOwnProperty("children")&&t.children instanceof Array&&JSON.stringify(t.children).length>4)},B=function(t,e){var n=e.multiple,i=void 0!==n&&n,r=e.allCheckboxShow,a=void 0===r||r,o=e.lastStage,s=void 0!==o&&o,c=t.showCheckbox,l=void 0===c||c;return!!i&&(a?l?!(s&&!j(t)):l:a)},$=function(t,e){var n=t.id,i=e.value;return e.multiple?i instanceof Array&&i.includes(n)?"checked":"uncheck":i===n?"checked":"uncheck"},H=function(t){var e=t.name,n=document.createElement("span");n.style.position="absolute",n.style.top="100%",n.style.left="0",n.style.zIndex="-1",n.style.opacity="0",n.style.fontSize="12px",n.style.paddingLeft="8px",n.style.paddingRight="8px",n.innerText=e,document.body.appendChild(n);var i=n.getBoundingClientRect().width;return D()?n.removeNode(!0):n.remove(),t.width=Math.ceil(i),t},J=function(){var t=E(N().mark((function t(e,n,i){var r,a,o,s=arguments;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=s.length>3&&void 0!==s[3]?s[3]:null,a=s.length>4&&void 0!==s[4]&&s[4],o=s.length>5?s[5]:void 0,t.abrupt("return",new Promise((function(t){var s=o.omit;n.forEach((function(t,n){var c=r?"".concat(r,"-").concat(n):"".concat(n),l=j(t),u=s&&t.tag?H(t.tag):{},d=T(T({},t),{index:c,parentId:i,checked:$(t,o),open:!!t.open,defaultDisabled:!!t.defaultDisabled,disabled:t.hasOwnProperty("defaultDisabled")&&t.defaultDisabled?t.defaultDisabled:!!t.disabled,paddingLeft:r?P(c):12,show:!r||a,lastNode:l,omit:s&&!l,tag:u,showCheckbox:B(t,o)});delete d.children,e.push(d),t.children&&t.children instanceof Array&&JSON.stringify(t.children).length>4&&J(e,t.children,t.id,c,t.open,o)})),t(e)})));case 4:case"end":return t.stop()}}),t)})));return function(e,n,i){return t.apply(this,arguments)}}(),Z=function t(e){var n=e.id,i=e.tileData,r=e.status,a=e.childDisable,o=void 0!==a&&a,s=e.sameParams,c=void 0!==s&&s,l=e.init,u=e.checkedData,d=void 0===u?[]:u,h=e.linkage,p=void 0===h||h,f=e.includeParent,v=void 0===f||f,m=e.lastStage,g=void 0!==m&&m;i.forEach((function(e){e.parentId===n&&(e.defaultDisabled||(e.checked=r),o?(e.disabled=e.defaultDisabled||"checked"===r,e.disabled||"checked"!==e.checked||!d||d.some((function(t){return t.id===e.id}))||d.push(e)):e.disabled||"checked"!==e.checked||d&&(!d||d.some((function(t){return t.id===e.id})))||(g?e.lastNode&&d.push(e):p?(v||e.lastNode)&&d.push(e):d.push(e)),e.lastNode||t({id:e.id,tileData:i,status:e.checked,childDisable:o,sameParams:c,init:l,checkedData:d,linkage:p,includeParent:v,lastStage:g}))}))},W=function t(e){var n=e.parentId,i=e.tileData,r=e.checkedData,a=e.thisObj,o=a.notNull,s=a.includeParent;i.forEach((function(e){e.defaultDisabled||e.id===n&&(e.checked=function(t){var e=t.every((function(t){return"checked"===t.checked})),n=t.some((function(t){return"checked"===t.checked})),i=t.some((function(t){return"notNull"===t.checked}));return e&&n?"checked":!e&&n||i?"notNull":e||n||i?void 0:"uncheck"}(function(t,e){return e.filter((function(e){return e.parentId===t&&!e.defaultDisabled}))}(n,i)),r&&!r.some((function(t){return t.id===e.id}))&&"uncheck"!==e.checked&&("checked"===e.checked?s&&r.push(e):o&&r.push(e)),"-1"!==e.id&&t({parentId:e.parentId,tileData:i,checkedData:r,thisObj:a}))}))},A=function t(e,n,i){for(var r=e.length,a=0;a<r;a++){var o=e[a],s=o.id,c=o.parentId,l=o.name;if(s===n){i.unshift(l),"-1"!==c&&t(e,c,i);break}}},M=function(t,e){return e.forEach((function(e){var n=[e.name];A(t,e.parentId,n),e.biasName=n.join("/")})),e},z=function(t,e){var n,i=e.notNull,r=e.childDisable,a=e.includeParent,o=e.jointParent;if(r){var s=t.filter((function(t){return"checked"===t.checked})),c=s.every((function(t){return t.lastNode})),l=s.some((function(t){return t.lastNode})),u=s.map((function(t){return t.id}));n=c?s:l?s.filter((function(t){return!t.disabled||t.defaultDisabled&&!u.includes(t.parentId)})):s.filter((function(t){return!t.disabled}))}else n=i&&a?t.filter((function(t){return"checked"===t.checked||"notNull"===t.checked})):i&&!a?t.filter((function(t){return"checked"===t.checked&&t.lastNode})):!i&&a?t.filter((function(t){return"checked"===t.checked})):t.filter((function(t){return"checked"===t.checked&&t.lastNode}));return o&&M(t,n),n},G=function(t,e){if(!e||!e.length)return t.map((function(t){return t.sameId&&!t.defaultDisabled&&(t.disabled=!1),t}));if(1===e.length&&"-1"===e[0].parentId)return t;var n=null==e?void 0:e.filter((function(t){return t.sameId})),i=C(n,"sameId",!0),r=e.map((function(t){return t.id}))||[],a=(null==i?void 0:i.map((function(t){return t.sameId})))||[];return t.map((function(e){var n,i;return e.sameId&&!r.includes(e.parentId)&&(e.disabled=(n=e.parentId,"checked"===(null===(i=t.find((function(t){return t.id===n})))||void 0===i?void 0:i.checked)||!r.includes(e.id)&&a.includes(e.sameId))),e}))},R=function t(e,n,i,r){n.forEach((function(t){t.id!==i||r.includes(t.id)||r.push(t.id)}));var a=e.filter((function(t){return t.id===i}));a&&a.length&&a.forEach((function(i){t(e,n,i.parentId,r)}))},V=function t(e,n,i,r){n.forEach((function(t){t.id!==i||r.includes(t.id)||r.push(t.id)}));var a=e.filter((function(t){return t.parentId===i}));a&&a.length&&a.forEach((function(i){t(e,n,i.id,r)}))},X=function t(e,n,i){e.forEach((function(r){r.parentId===n&&(i.push(r.id),r.lastNode||t(e,r.id,i))}))},F=function(t,e,n){var i=n.linkage,r=n.includeParent,a=n.lastStage,o=n.childDisable,s=n.jointParent,c=n.sameParams,l=n.checkedData,u=void 0===l?[]:l,d=t.id,h=t.parentId,p=(t.sameId,{checked:"uncheck",uncheck:"checked",notNull:"checked"}[t.checked]),f=function(t,e,n){for(var i=t.length,r=0;r<i;r++){var a=t[r];if(a.id===n){a.checked=e;break}}return t}(e,p,d);t.checked=p;var v=function(t){var e=t.tileData,n=t.checkedData,i=t.status,r=t.item,a=t.thisObj,o=a.linkage,s=a.lastStage,c=a.includeParent,l=a.childDisable,u=JSON.parse(JSON.stringify(n)),d=r.id,h=r.parentId,p=u;if("checked"===i)if(l){u.push(r);var f=[d];X(e,d,f),p=u.filter((function(t){return!f.includes(t.parentId)}))}else s?!n.some((function(t){return t.id===r.id}))&&r.lastNode&&p.push(r):o?c?n.some((function(t){return t.id===r.id}))||p.push(r):!n.some((function(t){return t.id===r.id}))&&r.lastNode&&p.push(r):n.some((function(t){return t.id===r.id}))||p.push(r);else if(n&&n.length){var v=[d];o&&(V(e,n,d,v),R(e,n,h,v)),p=u.filter((function(t){return!v.includes(t.id)}))}return p}({tileData:f,checkedData:u,status:p,item:t,thisObj:n});return i&&(o?Z({id:d,tileData:f,status:p,childDisable:o,sameParams:c,init:!1,checkedData:v}):(Z({id:d,tileData:f,status:p,childDisable:o,init:!1,checkedData:v,linkage:i,includeParent:r,lastStage:a}),(i||r)&&W({parentId:h,tileData:f,checkedData:v,thisObj:n}))),c&&(f=G(f,v)),s&&M(f,v),{tileData:f,checkedIds:v.map((function(t){return t.id})),checkedData:JSON.parse(JSON.stringify(v))}},q=function t(e,n,i){return i.forEach((function(r){r.parentId===e&&(r.show=n,!n&&r.open&&(r.open=!1,t(r.id,!1,i)))})),i},Y=function(){var t=E(N().mark((function t(e,n){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var i=n.value,r=n.multiple,a=n.linkage,o=n.lastStage,s=n.childDisable,c=n.sameParams,l=e;if(r&&i instanceof Array){var u=e.filter((function(t){return i.includes(t.id)}));l=c?G(e,u):e,s?u.filter((function(t){return!t.lastNode})).forEach((function(t){Z({id:t.id,tileData:l,status:"checked",childDisable:s,init:!0})})):u.forEach((function(t){(a||o)&&Z({id:t.id,tileData:l,status:"checked",init:!0,linkage:a,lastStage:o}),a&&W({parentId:t.parentId,tileData:l,thisObj:n})}))}if(r){var d=z(e,n),h=d.map((function(t){return t.id}));t({tileData:l,checkedIds:h,checkedData:d})}else{var p=l.find((function(t){return t.id===i})),f=p?p.id:"";t({tileData:l,checkedIds:f,checkedData:p})}})));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),U=function(){var t=E(N().mark((function t(e){var n,i,r,a,o=arguments;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:[],i=o.length>2?o[2]:void 0,r=i.linkage,a=i.childDisable,t.abrupt("return",new Promise((function(t){t(n.map((function(t){if(!t.defaultDisabled)if("-1"===t.parentId)t.checked=e,t.disabled=!1;else if(a){var i=n.find((function(e){return e.id===t.parentId})),o=i.checked,s=i.disabled;t.checked=o,t.disabled=s}else if(r){var c=n.find((function(e){return e.id===t.parentId})).checked;t.checked="checked"===c?c:e}else t.checked=e;return t})))})));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),K=function t(e,n,i,r){return n.forEach((function(a){a.parentId===e&&(a.defaultDisabled||a.disabled||(a.checked=i),r&&t(a.id,n,i,r))})),n};function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);c=!0);}catch(u){l=!0,r=u}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function nt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(L){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof h?e:h,o=Object.create(a.prototype),s=new C(r||[]);return i(o,"_invoke",{value:w(t,n,s)}),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(L){return{type:"throw",arg:L}}}t.wrap=l;var d={};function h(){}function p(){}function f(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(O([])));g&&g!==e&&n.call(g,a)&&(v=g);var y=f.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,a,o,s){var c=u(t[i],t,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==Q(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(d).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function w(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return{value:void 0,done:!0}}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=u(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=f,i(y,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,c(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(k.prototype),c(k.prototype,o,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,i,r,a){void 0===a&&(a=Promise);var o=new k(l(e,n,i,r),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(y),c(y,s,"Generator"),c(y,a,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=O,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return o.type="throw",o.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function it(t,e,n,i,r,a,o){try{var s=t[a](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,r)}function rt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){it(a,i,r,o,s,"next",t)}function s(t){it(a,i,r,o,s,"throw",t)}o(void 0)}))}}var at={name:"PTree",components:{ArrowTriangle:o,MorePointSvg:s,Checkbox:c.default,Dropdown:S},props:{value:{type:[String,Number,Array],default:""},data:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!1},allCheckboxShow:{type:Boolean,default:!0},notNull:{type:Boolean,default:!1},linkage:{type:Boolean,default:!0},lastStage:{type:Boolean,default:!1},childDisable:{type:Boolean,default:!1},includeParent:{type:Boolean,default:!0},jointParent:{type:Boolean,default:!1},sameParams:{type:Boolean,default:!1},render:{type:String,default:""},omit:{type:Boolean,default:!1},sortByTree:{type:Boolean,default:!1}},data:function(){return{tileList:[],tileListHistory:[],currentId:null,checkedData:[],dropDownData:[{id:"allChild",name:"选择所有子级"},{id:"nextChild",name:"选择下一级"},{id:"cancelAll",name:"取消所有子级"}]}},watch:{data:{handler:function(t){this.setTileList(t,this.value)},deep:!0,immediate:!0},value:{handler:function(t){this.currentId=t,this.setTileList(this.data,t)},deep:!0}},methods:{TextEllipsis:f.Z,setTileList:function(t){var e=arguments,n=this;return rt(nt().mark((function i(){var r,a,o,s,c,l,u;return nt().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=e.length>1&&void 0!==e[1]?e[1]:null,n.currentId=r,!((a=JSON.stringify(t)).length<=4)){i.next=7;break}n.tileList=[],i.next=21;break;case 7:return o=JSON.parse(a),i.next=10,J([],o,"-1",null,!1,n);case 10:return s=i.sent,i.next=13,Y(s,n);case 13:c=i.sent,l=c.tileData,u=c.checkedData,n.tileList=l,n.checkedData=u,n.treeShowHandle(l),n.resetTileList("setHistory"),n.$emit("changeTileData",l,!0);case 21:case"end":return i.stop()}}),i)})))()},itemClick:function(t,e){var n=this,i=this.multiple,r=this.tileList,a=this.sameParams,o=this.sortByTree,s=JSON.parse(JSON.stringify(t)),c=s.id,l=s.sameId,u=s.disabled,d=s.showCheckbox,h=s.checked;if(!(u||i&&!d)){var p={true:function(){var t=a?r.map((function(t){var e=t.sameId,n=t.defaultDisabled,i=t.disabled,r=t.id;return l&&e&&!n&&!i&&r!==c&&e===l&&(t.disabled="checked"!==h),t})):r,i=o?function(t,e,n){var i=n.linkage,r=n.lastStage,a=n.childDisable,o=t.id,s=t.parentId,c={checked:"uncheck",uncheck:"checked",notNull:"checked"}[t.checked];t.checked=c,a?Z({id:o,tileData:e,status:c,childDisable:a}):(i||r)&&(Z({id:o,tileData:e,status:c}),W({parentId:s,tileData:e}));var l=z(e,n);return{tileData:e,checkedIds:l.map((function(t){return t.id})),checkedData:JSON.parse(JSON.stringify(l))}}(s,t,n):F(s,t,n),u=i.tileData,d=i.checkedIds,p=i.checkedData;n.tileList=u,n.checkedData=p,n.$emit("change",{item:s,checkedIds:d,checkedData:p},e)},false:function(){n.currentId=c,n.$emit("change",s)}};p["".concat(i)]()}},openNode:function(t){var e=this.tileList,n=t.id,i=!t.open;if(!t.lastNode){t.open=i;var r=q(n,i,e);this.tileList=r,this.$emit("openNode",JSON.parse(JSON.stringify(t))),this.treeShowHandle(r)}},treeShowHandle:function(t){var e=null==t?void 0:t.filter((function(t){return t.show})).length;this.$emit("treeShowHandle",e)},setTileListStatus:function(t){var e=this;return rt(nt().mark((function n(){var i,r,a,o;return nt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.tileList,r=e.linkage,a=e.childDisable,n.next=3,U(t,i,{linkage:r,childDisable:a});case 3:o=n.sent,e.tileList=o,"uncheck"===t&&(e.checkedData=[]),e.$emit("changeTileData",o);case 7:case"end":return n.stop()}}),n)})))()},changeTileList:function(t,e){this.itemClick(t,e)},resetTileList:function(t){var e=this,n=this.tileList,i=this.tileListHistory;({setHistory:function(){e.tileListHistory=JSON.parse(JSON.stringify(n))},recoverHistory:function(){var t=JSON.parse(JSON.stringify(i));e.tileList=t,e.$emit("changeTileData",t)}})[t]()},getStatus:function(t){var e=tt(t,2),n=e[0],i=e[1],r=this.tileList;this.tileList=r.map((function(t){return t.id===i.id&&(t.omitStatus=n),t}))},dropdownChange:function(t){var e=tt(t,3),n=e[0],i=(e[1],e[2]);this.strategyChange(n,i)},strategyChange:function(t,e){var n=function(t,e,n){var i=e.id,r=n.tileList,a={allChild:function(){return K(i,r,"checked",!0)},nextChild:function(){return K(i,r,"checked",!1)},cancelAll:function(){return K(i,r,"uncheck",!0)}}[t](),o=z(a,n);return{tileData:a,checkedIds:o.map((function(t){return t.id})),checkedData:o}}(t,e,this),i=n.tileData,r=n.checkedIds,a=n.checkedData;this.checkedData=a,this.tileList=i,this.$emit("changeTileData",i),this.$emit("change",{item:e,checkedIds:r,checkedData:a},!0)}}},ot=at,st=(0,t.Z)(ot,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"p-tree-com"},[t._l(t.tileList,(function(n,i){return[n.show?e("div",{key:"".concat(n.id,"-").concat(i),class:["p-tree-com-item",!t.multiple&&t.currentId===n.id&&"p-tree-com-current",n.disabled&&"p-tree-com-disabled"],style:{paddingLeft:"".concat(n.paddingLeft,"px")}},[e("section",{staticClass:"p-tree-com-arrow",on:{click:function(e){return e.stopPropagation(),t.openNode(n)}}},[n.lastNode?t._e():e("ArrowTriangle",{class:[n.open&&"p-tree-com-triangle"]})],1),t._v(" "),e("div",{class:["p-tree-com-main",t.multiple?"p-tree-com-multiple":"p-tree-com-single"],on:{click:function(e){return e.stopPropagation(),t.itemClick(n)}}},[n.showCheckbox?e("section",{staticClass:"p-tree-com-checkbox"},[e("Checkbox",{attrs:{disabled:n.disabled,checked:n.checked}})],1):t._e(),t._v(" "),e("section",{staticClass:"p-tree-com-content",class:{"p-tree-com-omit":n.omit}},["custom"===t.render?t._t(n.id,null,{item:n}):[e("article",{staticClass:"p-tree-com-text",on:{mouseenter:t.TextEllipsis}},[t._v(t._s(n.name))]),t._v(" "),n.omit?e("span",{staticClass:"p-tree-com-point-svg",class:{"p-tree-com-point-svg-active":n.omitStatus},on:{click:function(t){t.stopPropagation()}}},[e("Dropdown",{attrs:{trigger:"click",triangle:!1,data:t.dropDownData},on:{getStatus:function(e){return t.getStatus([].concat(Array.prototype.slice.call(arguments),[n]))},change:function(e){return t.dropdownChange([].concat(Array.prototype.slice.call(arguments),[n]))}}},[e("MorePointSvg")],1)],1):t._e()]],2)])]):t._e()]}))],2)}),[],!1,null,null,null),ct=st.exports,lt=(0,t.Z)({},(function(){var t=this._self._c;return t("svg",{attrs:{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M170.666667 426.666667h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v384a85.333333 85.333333 0 0 1-85.333334 85.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-384a85.333333 85.333333 0 0 1 85.333334-85.333333z m0 85.333333v384h682.666666v-384H170.666667z"}}),t("path",{staticClass:"svg-fill-grey-800",attrs:{d:"M341.333333 443.733333V312.661333C341.333333 210.090667 418.389333 128 512 128s170.666667 82.090667 170.666667 184.661333v130.346667h85.333333V312.661333C768 164.138667 653.994667 42.666667 512 42.666667S256 164.138667 256 312.661333V443.733333h85.333333z"}}),t("path",{staticClass:"svg-fill-grey-500",attrs:{d:"M459.648 708.266667a85.333333 64 90 1 0 128 0 85.333333 64 90 1 0-128 0Z"}})])}),[],!1,null,null,null).exports,ut=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=document.createElement("div");n.style.display="inline-block",n.style.position="absolute",n.style.height="0",n.style.fontSize="14px",n.innerText=e,document.body.appendChild(n);var i=n.getBoundingClientRect(),r=i.width,a=Math.ceil(r);return D()?n.removeNode(!0):n.remove(),a<=t?0:a-t},dt=function(){var t=document.createElement("div");t.style.cssText="position:absolute;top:-1000