UNPKG

shu-c-view

Version:

rollup 打包vue组件库框架

7 lines (6 loc) 30.8 kB
/*! * shu-c-view v1.2.43 * (c) 2022-10-23 * @license MIT */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/assign"),t=require("lodash/includes"),r=require("lodash/toNumber"),n=require("lodash/has"),i=require("lodash/find"),l=require("lodash/get"),o=require("lodash/isNil"),a=require("lodash/isEmpty"),u=require("lodash/isString"),c=require("lodash/isArray"),s=require("lodash/difference"),f=require("lodash/isEqual"),p=require("lodash/findIndex");function d(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var h=d(e),v=d(t),g=d(r),y=d(n),S=d(i),b=d(l),m=d(o),x=d(a),E=d(u),w=d(c),F=d(s),R=d(f),I=d(p);function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$=function(e){try{return!!e()}catch(e){return!0}},_=!$((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),V=function(e){return e&&e.Math==Math&&e},P=V("object"==typeof globalThis&&globalThis)||V("object"==typeof window&&window)||V("object"==typeof self&&self)||V("object"==typeof O&&O)||function(){return this}()||Function("return this")(),A=$,N=/#|\.prototype\./,T=function(e,t){var r=j[G(e)];return r==k||r!=C&&("function"==typeof t?A(t):!!t)},G=T.normalize=function(e){return String(e).replace(N,".").toLowerCase()},j=T.data={},C=T.NATIVE="N",k=T.POLYFILL="P",U=T,M={exports:{}},D={},q=function(e){return"object"==typeof e?null!==e:"function"==typeof e},B=q,H=P.document,z=B(H)&&B(H.createElement),W=function(e){return z?H.createElement(e):{}},Y=W,K=!_&&!$((function(){return 7!=Object.defineProperty(Y("div"),"a",{get:function(){return 7}}).a})),X=q,Q=function(e){if(!X(e))throw TypeError(String(e)+" is not an object");return e},J=q,Z=function(e,t){if(!J(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!J(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!J(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!J(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},ee=_,te=K,re=Q,ne=Z,ie=Object.defineProperty;D.f=ee?ie:function(e,t,r){if(re(e),t=ne(t,!0),re(r),te)try{return ie(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var le=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},oe=D,ae=le,ue=_?function(e,t,r){return oe.f(e,t,ae(1,r))}:function(e,t,r){return e[t]=r,e},ce={}.hasOwnProperty,se=function(e,t){return ce.call(e,t)},fe=P,pe=ue,de=function(e,t){try{pe(fe,e,t)}catch(r){fe[e]=t}return t},he=de,ve=P["__core-js_shared__"]||he("__core-js_shared__",{}),ge=ve,ye=Function.toString;"function"!=typeof ge.inspectSource&&(ge.inspectSource=function(e){return ye.call(e)});var Se=ge.inspectSource,be=Se,me=P.WeakMap,xe="function"==typeof me&&/native code/.test(be(me)),Ee={exports:{}},we=ve;(Ee.exports=function(e,t){return we[e]||(we[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Fe,Re,Ie,Le=0,Oe=Math.random(),$e=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Le+Oe).toString(36)},_e=Ee.exports,Ve=$e,Pe=_e("keys"),Ae=function(e){return Pe[e]||(Pe[e]=Ve(e))},Ne={},Te=xe,Ge=q,je=ue,Ce=se,ke=ve,Ue=Ae,Me=Ne,De=P.WeakMap;if(Te){var qe=ke.state||(ke.state=new De),Be=qe.get,He=qe.has,ze=qe.set;Fe=function(e,t){return t.facade=e,ze.call(qe,e,t),t},Re=function(e){return Be.call(qe,e)||{}},Ie=function(e){return He.call(qe,e)}}else{var We=Ue("state");Me[We]=!0,Fe=function(e,t){return t.facade=e,je(e,We,t),t},Re=function(e){return Ce(e,We)?e[We]:{}},Ie=function(e){return Ce(e,We)}}var Ye={set:Fe,get:Re,has:Ie,enforce:function(e){return Ie(e)?Re(e):Fe(e,{})},getterFor:function(e){return function(t){var r;if(!Ge(t)||(r=Re(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},Ke=P,Xe=ue,Qe=se,Je=de,Ze=Se,et=Ye.get,tt=Ye.enforce,rt=String(String).split("String");(M.exports=function(e,t,r,n){var i,l=!!n&&!!n.unsafe,o=!!n&&!!n.enumerable,a=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof t||Qe(r,"name")||Xe(r,"name",t),(i=tt(r)).source||(i.source=rt.join("string"==typeof t?t:""))),e!==Ke?(l?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=r:Xe(e,t,r)):o?e[t]=r:Je(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&et(this).source||Ze(this)}));var nt,it={}.toString,lt=function(e){return it.call(e).slice(8,-1)},ot=q,at=Q,ut=function(e){if(!ot(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},ct=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return at(r),ut(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),st=q,ft=ct,pt=function(e,t,r){var n,i;return ft&&"function"==typeof(n=t.constructor)&&n!==r&&st(i=n.prototype)&&i!==r.prototype&&ft(e,i),e},dt=lt,ht="".split,vt=$((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==dt(e)?ht.call(e,""):Object(e)}:Object,gt=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},yt=vt,St=gt,bt=function(e){return yt(St(e))},mt=Math.ceil,xt=Math.floor,Et=function(e){return isNaN(e=+e)?0:(e>0?xt:mt)(e)},wt=Et,Ft=Math.min,Rt=function(e){return e>0?Ft(wt(e),9007199254740991):0},It=Et,Lt=Math.max,Ot=Math.min,$t=function(e,t){var r=It(e);return r<0?Lt(r+t,0):Ot(r,t)},_t=bt,Vt=Rt,Pt=$t,At=function(e){return function(t,r,n){var i,l=_t(t),o=Vt(l.length),a=Pt(n,o);if(e&&r!=r){for(;o>a;)if((i=l[a++])!=i)return!0}else for(;o>a;a++)if((e||a in l)&&l[a]===r)return e||a||0;return!e&&-1}},Nt={includes:At(!0),indexOf:At(!1)},Tt=se,Gt=bt,jt=Nt.indexOf,Ct=Ne,kt=function(e,t){var r,n=Gt(e),i=0,l=[];for(r in n)!Tt(Ct,r)&&Tt(n,r)&&l.push(r);for(;t.length>i;)Tt(n,r=t[i++])&&(~jt(l,r)||l.push(r));return l},Ut=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Mt=kt,Dt=Ut,qt=Object.keys||function(e){return Mt(e,Dt)},Bt=D,Ht=Q,zt=qt,Wt=_?Object.defineProperties:function(e,t){Ht(e);for(var r,n=zt(t),i=n.length,l=0;i>l;)Bt.f(e,r=n[l++],t[r]);return e},Yt=P,Kt=P,Xt=function(e){return"function"==typeof e?e:void 0},Qt=function(e,t){return arguments.length<2?Xt(Yt[e])||Xt(Kt[e]):Yt[e]&&Yt[e][t]||Kt[e]&&Kt[e][t]},Jt=Qt("document","documentElement"),Zt=Q,er=Wt,tr=Ut,rr=Ne,nr=Jt,ir=W,lr=Ae("IE_PROTO"),or=function(){},ar=function(e){return"<script>"+e+"<\/script>"},ur=function(){try{nt=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ur=nt?function(e){e.write(ar("")),e.close();var t=e.parentWindow.Object;return e=null,t}(nt):((t=ir("iframe")).style.display="none",nr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ar("document.F=Object")),e.close(),e.F);for(var r=tr.length;r--;)delete ur.prototype[tr[r]];return ur()};rr[lr]=!0;var cr=Object.create||function(e,t){var r;return null!==e?(or.prototype=Zt(e),r=new or,or.prototype=null,r[lr]=e):r=ur(),void 0===t?r:er(r,t)},sr={},fr=kt,pr=Ut.concat("length","prototype");sr.f=Object.getOwnPropertyNames||function(e){return fr(e,pr)};var dr={},hr={},vr={}.propertyIsEnumerable,gr=Object.getOwnPropertyDescriptor,yr=gr&&!vr.call({1:2},1);hr.f=yr?function(e){var t=gr(this,e);return!!t&&t.enumerable}:vr;var Sr=_,br=hr,mr=le,xr=bt,Er=Z,wr=se,Fr=K,Rr=Object.getOwnPropertyDescriptor;dr.f=Sr?Rr:function(e,t){if(e=xr(e),t=Er(t,!0),Fr)try{return Rr(e,t)}catch(e){}if(wr(e,t))return mr(!br.f.call(e,t),e[t])};var Ir=gt,Lr="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Or=RegExp("^"+Lr+Lr+"*"),$r=RegExp(Lr+Lr+"*$"),_r=function(e){return function(t){var r=String(Ir(t));return 1&e&&(r=r.replace(Or,"")),2&e&&(r=r.replace($r,"")),r}},Vr={start:_r(1),end:_r(2),trim:_r(3)},Pr=_,Ar=P,Nr=U,Tr=M.exports,Gr=se,jr=lt,Cr=pt,kr=Z,Ur=$,Mr=cr,Dr=sr.f,qr=dr.f,Br=D.f,Hr=Vr.trim,zr=Ar.Number,Wr=zr.prototype,Yr="Number"==jr(Mr(Wr)),Kr=function(e){var t,r,n,i,l,o,a,u,c=kr(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=Hr(c)).charCodeAt(0))||45===t){if(88===(r=c.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(o=(l=c.slice(2)).length,a=0;a<o;a++)if((u=l.charCodeAt(a))<48||u>i)return NaN;return parseInt(l,n)}return+c};if(Nr("Number",!zr(" 0o1")||!zr("0b1")||zr("+0x1"))){for(var Xr,Qr=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof Qr&&(Yr?Ur((function(){Wr.valueOf.call(r)})):"Number"!=jr(r))?Cr(new zr(Kr(t)),r,Qr):Kr(t)},Jr=Pr?Dr(zr):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),Zr=0;Jr.length>Zr;Zr++)Gr(zr,Xr=Jr[Zr])&&!Gr(Qr,Xr)&&Br(Qr,Xr,qr(zr,Xr));Qr.prototype=Wr,Wr.constructor=Qr,Tr(Ar,"Number",Qr)}var en={};en.f=Object.getOwnPropertySymbols;var tn,rn,nn=sr,ln=en,on=Q,an=Qt("Reflect","ownKeys")||function(e){var t=nn.f(on(e)),r=ln.f;return r?t.concat(r(e)):t},un=se,cn=an,sn=dr,fn=D,pn=P,dn=dr.f,hn=ue,vn=M.exports,gn=de,yn=function(e,t){for(var r=cn(t),n=fn.f,i=sn.f,l=0;l<r.length;l++){var o=r[l];un(e,o)||n(e,o,i(t,o))}},Sn=U,bn=function(e,t){var r,n,i,l,o,a=e.target,u=e.global,c=e.stat;if(r=u?pn:c?pn[a]||gn(a,{}):(pn[a]||{}).prototype)for(n in t){if(l=t[n],i=e.noTargetGet?(o=dn(r,n))&&o.value:r[n],!Sn(u?n:a+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof l==typeof i)continue;yn(l,i)}(e.sham||i&&i.sham)&&hn(l,"sham",!0),vn(r,n,l,e)}},mn=gt,xn=function(e){return Object(mn(e))},En=lt,wn=Array.isArray||function(e){return"Array"==En(e)},Fn="process"==lt(P.process),Rn=Qt("navigator","userAgent")||"",In=P.process,Ln=In&&In.versions,On=Ln&&Ln.v8;On?rn=(tn=On.split("."))[0]+tn[1]:Rn&&(!(tn=Rn.match(/Edge\/(\d+)/))||tn[1]>=74)&&(tn=Rn.match(/Chrome\/(\d+)/))&&(rn=tn[1]);var $n=rn&&+rn,_n=Fn,Vn=$n,Pn=$,An=!!Object.getOwnPropertySymbols&&!Pn((function(){return!Symbol.sham&&(_n?38===Vn:Vn>37&&Vn<41)})),Nn=An&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Tn=P,Gn=Ee.exports,jn=se,Cn=$e,kn=An,Un=Nn,Mn=Gn("wks"),Dn=Tn.Symbol,qn=Un?Dn:Dn&&Dn.withoutSetter||Cn,Bn=function(e){return jn(Mn,e)&&(kn||"string"==typeof Mn[e])||(kn&&jn(Dn,e)?Mn[e]=Dn[e]:Mn[e]=qn("Symbol."+e)),Mn[e]},Hn=q,zn=wn,Wn=Bn("species"),Yn=function(e,t){var r;return zn(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!zn(r.prototype)?Hn(r)&&null===(r=r[Wn])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},Kn=Z,Xn=D,Qn=le,Jn=$,Zn=$n,ei=Bn("species"),ti=function(e){return Zn>=51||!Jn((function(){var t=[];return(t.constructor={})[ei]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ri=bn,ni=$t,ii=Et,li=Rt,oi=xn,ai=Yn,ui=function(e,t,r){var n=Kn(t);n in e?Xn.f(e,n,Qn(0,r)):e[n]=r},ci=ti("splice"),si=Math.max,fi=Math.min;ri({target:"Array",proto:!0,forced:!ci},{splice:function(e,t){var r,n,i,l,o,a,u=oi(this),c=li(u.length),s=ni(e,c),f=arguments.length;if(0===f?r=n=0:1===f?(r=0,n=c-s):(r=f-2,n=fi(si(ii(t),0),c-s)),c+r-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=ai(u,n),l=0;l<n;l++)(o=s+l)in u&&ui(i,l,u[o]);if(i.length=n,r<n){for(l=s;l<c-n;l++)a=l+r,(o=l+n)in u?u[a]=u[o]:delete u[a];for(l=c;l>c-n+r;l--)delete u[l-1]}else if(r>n)for(l=c-n;l>s;l--)a=l+r-1,(o=l+n-1)in u?u[a]=u[o]:delete u[a];for(l=0;l<r;l++)u[l+s]=arguments[l+2];return u.length=c-n+r,i}});var pi=Q,di=function(){var e=pi(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},hi={},vi=$;function gi(e,t){return RegExp(e,t)}hi.UNSUPPORTED_Y=vi((function(){var e=gi("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),hi.BROKEN_CARET=vi((function(){var e=gi("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var yi=di,Si=hi,bi=RegExp.prototype.exec,mi=String.prototype.replace,xi=bi,Ei=function(){var e=/a/,t=/b*/g;return bi.call(e,"a"),bi.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),wi=Si.UNSUPPORTED_Y||Si.BROKEN_CARET,Fi=void 0!==/()??/.exec("")[1];(Ei||Fi||wi)&&(xi=function(e){var t,r,n,i,l=this,o=wi&&l.sticky,a=yi.call(l),u=l.source,c=0,s=e;return o&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),s=String(e).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==e[l.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,c++),r=new RegExp("^(?:"+u+")",a)),Fi&&(r=new RegExp("^"+u+"$(?!\\s)",a)),Ei&&(t=l.lastIndex),n=bi.call(o?r:l,s),o?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=l.lastIndex,l.lastIndex+=n[0].length):l.lastIndex=0:Ei&&n&&(l.lastIndex=l.global?n.index+n[0].length:t),Fi&&n&&n.length>1&&mi.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var Ri=xi;bn({target:"RegExp",proto:!0,forced:/./.exec!==Ri},{exec:Ri});var Ii=M.exports,Li=$,Oi=Bn,$i=Ri,_i=ue,Vi=Oi("species"),Pi=!Li((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Ai="$0"==="a".replace(/./,"$0"),Ni=Oi("replace"),Ti=!!/./[Ni]&&""===/./[Ni]("a","$0"),Gi=!Li((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),ji=function(e,t,r,n){var i=Oi(e),l=!Li((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=l&&!Li((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Vi]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!l||!o||"replace"===e&&(!Pi||!Ai||Ti)||"split"===e&&!Gi){var a=/./[i],u=r(i,""[e],(function(e,t,r,n,i){return t.exec===$i?l&&!i?{done:!0,value:a.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Ai,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ti}),c=u[0],s=u[1];Ii(String.prototype,e,c),Ii(RegExp.prototype,i,2==t?function(e,t){return s.call(e,this,t)}:function(e){return s.call(e,this)})}n&&_i(RegExp.prototype[i],"sham",!0)},Ci=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ki=lt,Ui=Ri,Mi=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==ki(e))throw TypeError("RegExp#exec called on incompatible receiver");return Ui.call(e,t)},Di=Q,qi=gt,Bi=Ci,Hi=Mi;ji("search",1,(function(e,t,r){return[function(t){var r=qi(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,r):new RegExp(t)[e](String(r))},function(e){var n=r(t,e,this);if(n.done)return n.value;var i=Di(e),l=String(this),o=i.lastIndex;Bi(o,0)||(i.lastIndex=0);var a=Hi(i,l);return Bi(i.lastIndex,o)||(i.lastIndex=o),null===a?-1:a.index}]}));var zi=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Wi=function(e,t,r){if(zi(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}},Yi=vt,Ki=xn,Xi=Rt,Qi=Yn,Ji=[].push,Zi=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,l=6==e,o=7==e,a=5==e||l;return function(u,c,s,f){for(var p,d,h=Ki(u),v=Yi(h),g=Wi(c,s,3),y=Xi(v.length),S=0,b=f||Qi,m=t?b(u,y):r||o?b(u,0):void 0;y>S;S++)if((a||S in v)&&(d=g(p=v[S],S,h),e))if(t)m[S]=d;else if(d)switch(e){case 3:return!0;case 5:return p;case 6:return S;case 2:Ji.call(m,p)}else switch(e){case 4:return!1;case 7:Ji.call(m,p)}return l?-1:n||i?i:m}},el={forEach:Zi(0),map:Zi(1),filter:Zi(2),some:Zi(3),every:Zi(4),find:Zi(5),findIndex:Zi(6),filterOut:Zi(7)},tl=cr,rl=D,nl=Bn("unscopables"),il=Array.prototype;null==il[nl]&&rl.f(il,nl,{configurable:!0,value:tl(null)});var ll=bn,ol=el.findIndex,al=function(e){il[nl][e]=!0},ul=!0;"findIndex"in[]&&Array(1).findIndex((function(){ul=!1})),ll({target:"Array",proto:!0,forced:ul},{findIndex:function(e){return ol(this,e,arguments.length>1?arguments[1]:void 0)}}),al("findIndex");var cl=el.map;bn({target:"Array",proto:!0,forced:!ti("map")},{map:function(e){return cl(this,e,arguments.length>1?arguments[1]:void 0)}});var sl=Et,fl=gt,pl=function(e){return function(t,r){var n,i,l=String(fl(t)),o=sl(r),a=l.length;return o<0||o>=a?e?"":void 0:(n=l.charCodeAt(o))<55296||n>56319||o+1===a||(i=l.charCodeAt(o+1))<56320||i>57343?e?l.charAt(o):n:e?l.slice(o,o+2):i-56320+(n-55296<<10)+65536}},dl={codeAt:pl(!1),charAt:pl(!0)}.charAt,hl=xn,vl=Math.floor,gl="".replace,yl=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Sl=/\$([$&'`]|\d{1,2})/g,bl=ji,ml=Q,xl=Rt,El=Et,wl=gt,Fl=function(e,t,r){return t+(r?dl(e,t).length:1)},Rl=function(e,t,r,n,i,l){var o=r+e.length,a=n.length,u=Sl;return void 0!==i&&(i=hl(i),u=yl),gl.call(l,u,(function(l,u){var c;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(o);case"<":c=i[u.slice(1,-1)];break;default:var s=+u;if(0===s)return l;if(s>a){var f=vl(s/10);return 0===f?l:f<=a?void 0===n[f-1]?u.charAt(1):n[f-1]+u.charAt(1):l}c=n[s-1]}return void 0===c?"":c}))},Il=Mi,Ll=Math.max,Ol=Math.min;bl("replace",2,(function(e,t,r,n){var i=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,l=n.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(r,n){var i=wl(this),l=null==r?void 0:r[e];return void 0!==l?l.call(r,i,n):t.call(String(i),r,n)},function(e,n){if(!i&&l||"string"==typeof n&&-1===n.indexOf(o)){var a=r(t,e,this,n);if(a.done)return a.value}var u=ml(e),c=String(this),s="function"==typeof n;s||(n=String(n));var f=u.global;if(f){var p=u.unicode;u.lastIndex=0}for(var d=[];;){var h=Il(u,c);if(null===h)break;if(d.push(h),!f)break;""===String(h[0])&&(u.lastIndex=Fl(c,xl(u.lastIndex),p))}for(var v,g="",y=0,S=0;S<d.length;S++){h=d[S];for(var b=String(h[0]),m=Ll(Ol(El(h.index),c.length),0),x=[],E=1;E<h.length;E++)x.push(void 0===(v=h[E])?v:String(v));var w=h.groups;if(s){var F=[b].concat(x,m,c);void 0!==w&&F.push(w);var R=String(n.apply(void 0,F))}else R=Rl(b,c,m,x,w,n);m>=y&&(g+=c.slice(y,m)+R,y=m+b.length)}return g+c.slice(y)}]}));var $l=_,_l=D.f,Vl=Function.prototype,Pl=Vl.toString,Al=/^\s*function ([^ (]*)/;$l&&!("name"in Vl)&&_l(Vl,"name",{configurable:!0,get:function(){try{return Pl.call(this).match(Al)[1]}catch(e){return""}}});var Nl=q,Tl=lt,Gl=Bn("match"),jl=Qt,Cl=D,kl=_,Ul=Bn("species"),Ml=_,Dl=P,ql=U,Bl=pt,Hl=D.f,zl=sr.f,Wl=function(e){var t;return Nl(e)&&(void 0!==(t=e[Gl])?!!t:"RegExp"==Tl(e))},Yl=di,Kl=hi,Xl=M.exports,Ql=$,Jl=Ye.set,Zl=function(e){var t=jl(e),r=Cl.f;kl&&t&&!t[Ul]&&r(t,Ul,{configurable:!0,get:function(){return this}})},eo=Bn("match"),to=Dl.RegExp,ro=to.prototype,no=/a/g,io=/a/g,lo=new to(no)!==no,oo=Kl.UNSUPPORTED_Y;if(Ml&&ql("RegExp",!lo||oo||Ql((function(){return io[eo]=!1,to(no)!=no||to(io)==io||"/a/i"!=to(no,"i")})))){for(var ao=function(e,t){var r,n=this instanceof ao,i=Wl(e),l=void 0===t;if(!n&&i&&e.constructor===ao&&l)return e;lo?i&&!l&&(e=e.source):e instanceof ao&&(l&&(t=Yl.call(e)),e=e.source),oo&&(r=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var o=Bl(lo?new to(e,t):to(e,t),n?this:ro,ao);return oo&&r&&Jl(o,{sticky:r}),o},uo=function(e){e in ao||Hl(ao,e,{configurable:!0,get:function(){return to[e]},set:function(t){to[e]=t}})},co=zl(to),so=0;co.length>so;)uo(co[so++]);ro.constructor=ao,ao.prototype=ro,Xl(Dl,"RegExp",ao)}Zl("RegExp");var fo=M.exports,po=Q,ho=$,vo=di,go=RegExp.prototype,yo=go.toString,So=ho((function(){return"/a/b"!=yo.call({source:"a",flags:"b"})})),bo="toString"!=yo.name;(So||bo)&&fo(RegExp.prototype,"toString",(function(){var e=po(this),t=String(e.source),r=e.flags;return"/"+t+"/"+String(void 0===r&&e instanceof RegExp&&!("flags"in go)?vo.call(e):r)}),{unsafe:!0});var mo={name:"BaseSelectGrid",inheritAttrs:!1,model:{prop:"selectGridValue",event:"selectGridChange"},props:{maxItem:{type:Number,default:20},width:{type:[Number,String],default:160},gridWidth:{type:Number,default:490},selectGridValue:{type:[String,Array],default:function(){return[]}},defaultCheckedRows:{type:Array,default:function(){return[]}},searchField:{type:String},prefixLabel:{type:String},multiple:{type:Boolean,default:!1},displayField:{type:String,default:"name"},valueField:{type:String,default:"id"},listeners:{type:Object,default:function(){return{}}},ctCls:{type:Object},isDisplay:{type:Boolean,default:!0},isRender:{type:Boolean,default:!0},idSingleSelectedHide:{type:Boolean,default:!0}},watch:{selectGridValue:function(e,t){if(m(e)||0!==e.length){if(w(e)&&this.multiple&&!R(e,t))if(e.length<t.length){var r=F(t,e);this.outValueRemove(r)}else{var n=F(e,t);this.outValueAdd(n)}this.setSingleNode()}else this.clear()}},data:function(){return this.currentPageTable=[],{gridUserRef:"".concat(this._uid,"-selectGrid"),elSelectRef:"".concat(this._uid,"-base-select-grid-ref"),popoverVisible:!1,curSelectRowList:[],curSelectLabelList:[],curSelectValueList:[],curSelectRow:null,curSelectLabel:"",curSelectValue:"",gridValue:[],options:[],searchInput:""}},methods:{getGrid:function(){return this.$refs[this.gridUserRef]},handOpenGrid:function(){var e=this;setTimeout((function(){e.popoverVisible=!0}),0)},createPopover:function(){var e=this,t=[],r=this.$createElement;return t.push(r("el-popover",{ref:"".concat(this._uid,"-base-select-grid-popover"),props:{popperClass:"base-select-grid-el-popover",placement:"bottom-start",width:this.gridWidth,trigger:"click",value:this.popoverVisible},on:{input:function(t){e.popoverVisible=t}}},[this.createGrid(),r("div",{slot:"reference",style:{height:"0px"},ref:"bbb"},[])])),t},createSelect:function(){var e=this,t=this.$createElement,r=t();return this.prefixLabel&&(r=t("span",{style:{lineHeight:"32px"},slot:"prefix"},this.prefixLabel)),t("el-select",{ref:this.elSelectRef,style:{width:E(this.width)?this.width:"".concat(this.width,"px")},attrs:{id:this.$attrs.id,autofocus:this.$attrs.autofocus,placeholder:this.$attrs.placeholder},props:h({},{value:this.multiple?this.curSelectValueList:this.curSelectValue,clearable:!0,multiple:this.multiple,"collapse-tags":!0},this.$attrs),on:{"hook:mounted":function(){e.selectInputHeight=e.$refs[e.elSelectRef].$el.offsetHeight},clear:function(){e.clear(),e.$emit("selectGridChange",e.multiple?[]:""),e.change([]),e.$emit("clear",e.multiple?[]:""),e.setSelectPanel2InputOffsetTop()},"remove-tag":function(t){var r=I(e.curSelectValueList,(function(e){return e===t})),n=I(e.options,(function(r){return r[e.valueField]===t}));-1!==r&&(e.curSelectRowList.splice(r,1),e.curSelectLabelList.splice(r,1),e.curSelectValueList.splice(r,1)),-1!==n&&e.options.splice(n,1),e.$emit("selectGridChange",e.curSelectValueList),e.change(e.curSelectRowList),e.$emit("remove-tag",t),e.setSelectPanel2InputOffsetTop(),e.$refs[e.gridUserRef].selectRows([{field:e.valueField,value:t}])}},nativeOn:{click:function(t){if(!y(e.$attrs,"disabled")||y(e.$attrs,"disabled")&&!1===e.$attrs.disabled)return e.$refs[e.elSelectRef].blur(),e.$refs.bbb.click(),t.stopPropagation(),t.preventDefault(),!1}}},[r,this.createOptions(),t("div",{class:"base-select-grid-down-empty",slot:"empty",style:{display:"none"}},[])])},createGrid:function(){var e=this,t=this.$createElement,r=t();return m(this.searchField)||y(this.$slots,"search")||(r=this.createSearchBar()),y(this.$slots,"search")&&(r=this.$slots.search),t("base-grid",{class:"base-grid-panel-content-cls",ref:this.gridUserRef,attrs:{},props:h({api:this.$attrs.api,queryParams:this.$attrs.queryParams||this.$attrs["query-params"],columns:this.$attrs.columns,selectMode:this.multiple,isReloadGrid:!0,isSelectedFirstRow:!1,loadFilter:this.$attrs.loadFilter||this.$attrs["load-filter"],tableAttributes:{size:"mini",border:!0},paginationAttributes:{layout:"prev, pager, next, slot, ->, total",pageSize:10,pageSizes:[5,10,15,20]}},this.$attrs),on:{"row-click":function(t,r,n){var i;e.multiple||(e.curSelectLabel=t[e.displayField],e.curSelectValue=t[e.valueField],e.curSelectRow=t,e.options=[(i={},L(i,e.displayField,t[e.displayField]),L(i,e.valueField,t[e.valueField]),i)],e.$emit("selectGridChange",t[e.valueField]));e.idSingleSelectedHide&&(e.popoverVisible=!1),n.stopPropagation()},select:function(t,r){for(var n=h([],e.selectGridValue),i=h([],e.curSelectLabelList),l=0,o=t.length;l<o;l++)v(n,t[l][e.valueField])||(n.push(t[l][e.valueField]),i.push(t[l][e.displayField]));if(v(e.selectGridValue,r[e.valueField])){var a=e.selectGridValue.findIndex((function(t){return t===r[e.valueField]}));-1!==a&&(n.splice(a,1),i.splice(a,1))}var u=S(e.curSelectRowList,(function(t){return b(t,e.valueField)===r[e.valueField]}));m(u)&&e.curSelectRowList.push(r),e.curSelectLabelList=i,e.curSelectValueList=n;var c,s=S(e.options,(function(t){return b(t,e.valueField)===r[e.valueField]}));m(s)&&e.options.push((L(c={},e.displayField,r[e.displayField]),L(c,e.valueField,r[e.valueField]),c));e.$emit("selectGridChange",n),e.setSelectPanel2InputOffsetTop()},"select-all":function(t){for(var r=h([],e.curSelectValueList),n=h([],e.curSelectLabelList),i=x(t)?e.currentPageTable:t,l=function(l,o){if(x(t)){var a=I(r,(function(t){return t===b(i[l],e.valueField)}));-1!==a&&(r.splice(a,1),n.splice(a,1),e.options.splice(a,1))}else if(!v(r,i[l][e.valueField])){r.push(i[l][e.valueField]),n.push(i[l][e.displayField]);var u,c=S(e.options,(function(t){return b(t,e.valueField)===i[l][e.valueField]})),s=S(e.curSelectRowList,(function(t){return b(t,e.valueField)===i[l][e.valueField]}));if(m(c))e.options.push((L(u={},e.displayField,t[l][e.displayField]),L(u,e.valueField,t[l][e.valueField]),u));m(s)&&e.curSelectRowList.push(t[l])}},o=0,a=i.length;o<a;o++)l(o);e.curSelectLabelList=n,e.curSelectValueList=r,e.$emit("selectGridChange",r),e.setSelectPanel2InputOffsetTop()},onLoadSuccess:this.afterDataLoadHandler}},[t("template",{slot:"search"},[r])])},createSearchBar:function(){var e=this,t=this.$createElement;return this.$createElement("div",{class:"base-select-grid__search-box"},[t("el-input",{attrs:{placeholder:"请输入内容",maxlength:"40"},props:{value:this.searchInput,"show-word-limit":!0,clearable:!0},on:{input:function(t){e.searchInput=t}}},[]),t("el-button",{props:{type:"primary"},on:{click:function(){var t=L({},e.searchField,"");e.searchInput.length>0&&(t=L({},e.searchField,e.searchInput)),e.getGrid().setQueryParams(t),e.getGrid().reloadGrid()}}},["搜索"])])},createOptions:function(){var e=this,t=this.$createElement;return this.options.map((function(r){return t("el-option",{style:{display:"absolute",top:"0px",left:"0px",height:"0px","z-index":"-100"},props:{key:r[e.valueField],label:r[e.displayField],value:r[e.valueField]},on:{"hook:mounted":function(){}}})}))},setSingleNode:function(){},afterDataLoadHandler:function(e){var t=this;this.currentPageTable=e,setTimeout((function(){var r=[],n=function(e){if(x(t.options)){var r;t.options.push((L(r={},t.displayField,b(e,t.displayField)),L(r,t.valueField,b(e,t.valueField)),r))}else{var n,i=S(t.options,(function(r){return b(r,t.valueField)===b(e,t.valueField)}));if(m(i))t.options.push((L(n={},t.displayField,b(e,t.displayField)),L(n,t.valueField,b(e,t.valueField)),n))}};if(!w(t.selectGridValue)){var i=S(e,(function(e){return b(e,t.valueField)===t.selectGridValue}));return t.curSelectLabel=b(i,t.displayField),t.curSelectValue=t.selectGridValue,void(m(i)||n(i))}for(var l=function(i,l){r.push({field:t.valueField,value:t.selectGridValue[i]});var o=S(e,(function(e){return b(e,t.valueField)===t.selectGridValue[i]}));m(o)&&!x(t.defaultCheckedRows)&&(o=S(t.defaultCheckedRows,(function(e){return b(e,t.valueField)===t.selectGridValue[i]}))),t.multiple?m(S(t.curSelectValueList,(function(e){return e===t.selectGridValue[i]})))&&(t.curSelectValueList.push(t.selectGridValue[i]),t.curSelectLabelList.push(b(o,t.displayField,"")),t.curSelectRowList.push(o)):(t.curSelectLabel=b(o,t.displayField),t.curSelectValue=t.selectGridValue[i]),m(o)||n(o)},o=0,a=t.selectGridValue.length;o<a;o++)l(o);t.$refs[t.gridUserRef].selectRows(r)}),0)},setSelectPanel2InputOffsetTop:function(){var e=this;setTimeout((function(){var t=e.$refs["".concat(e._uid,"-base-select-grid-popover")].$el;if(!m(t)&&!m(t.childNodes)){var r=e.$refs[e.elSelectRef].$el.clientHeight,n=e.$refs[e.gridUserRef].$el.parentNode.style.top.replace("px","");if(r>e.selectInputHeight){var i=r-e.selectInputHeight;e.$refs[e.gridUserRef].$el.parentNode.style.top="".concat(g(n)+g(i),"px")}else if(r<=e.selectInputHeight){var l=e.selectInputHeight-r;0!==l&&(e.$refs[e.gridUserRef].$el.parentNode.style.top="".concat(g(n)-g(l),"px"))}e.selectInputHeight=r}}),100)},clear:function(){if(this.multiple)for(var e=0,t=this.curSelectValueList.length;e<t;e++)this.$refs[this.gridUserRef].selectRows([{field:this.valueField,value:this.curSelectValueList[e]}]);else this.$refs[this.gridUserRef].selectRow(this.curSelectRow);this.curSelectRowList=[],this.curSelectLabelList=[],this.curSelectValueList=[],this.curSelectRow=null,this.curSelectLabel="",this.curSelectValue="",this.gridValue=[],this.options=[]},change:function(e){"change"in this.listeners&&this.listeners.change(e)},outValueRemove:function(e){for(var t=this,r=this.getGrid().getData(),n=this.getGrid().getElTable(),i=function(i,l){var o=e[i],a=I(t.curSelectValueList,(function(e){return e===o}));if(-1!==a){var u=S(r,(function(e){return b(e,t.valueField,"")===o}));n.toggleRowSelection(u,!1),t.curSelectRowList.splice(a,1),t.curSelectLabelList.splice(a,1),t.curSelectValueList.splice(a,1),t.options.splice(a,1)}},l=0,o=e.length;l<o;l++)i(l)},outValueAdd:function(e){for(var t=this,r=this.getGrid().getData(),n=this.getGrid().getElTable(),i=function(i,l){var o=e[i];if(-1===I(t.curSelectValueList,(function(e){return e===o}))){var a,u=S(r,(function(e){return b(e,t.valueField,"")===o}));m(u)&&!x(t.defaultCheckedRows)&&(u=S(t.defaultCheckedRows,(function(e){return b(e,t.valueField,"")===o}))),n.toggleRowSelection(u,!0),t.curSelectRowList.push(u),t.curSelectLabelList.push(b(u,t.displayField)),t.curSelectValueList.push(b(u,t.valueField)),t.options.push((L(a={},t.displayField,b(u,t.displayField)),L(a,t.valueField,b(u,t.valueField)),a))}},l=0,o=e.length;l<o;l++)i(l)}},render:function(e){return e("div",{ref:"".concat(this._uid,"-base-grid-panel"),style:{width:E(this.width)?this.width:"".concat(this.width,"px")},class:L({"base-select-grid":!0},this.ctCls,this.ctCls)},[this.createSelect(),this.createPopover()])}};mo.install=function(e,t){var r;if(r="按需加载独立组件:"+mo.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(r),w(t)&&!x(t))for(var n=0;n<t.length;n++)t[n].name!==mo.name&&e.use(t[n]);e.component(mo.name,mo)},exports.BaseSelectGrid=mo;