shu-c-view
Version:
rollup 打包vue组件库框架
7 lines (6 loc) • 23.4 kB
JavaScript
/*!
* shu-c-view v1.2.37
* (c) 2022-09-22
* @license MIT
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/isArray"),t=require("lodash/isEmpty"),r=require("lodash/set"),n=require("lodash/isEqual"),o=require("lodash/isNil"),i=require("lodash/join"),a=require("lodash/get"),l=require("lodash/omit"),c=require("lodash/has"),s=require("lodash/forEach");function u(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var f=u(e),p=u(t),d=u(r),h=u(n),g=u(o),v=u(i),m=u(a),y=u(l),b=u(c),E=u(s),_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},x=function(e){try{return!!e()}catch(e){return!0}},S=!x((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w={},C=function(e){return e&&e.Math==Math&&e},O=C("object"==typeof globalThis&&globalThis)||C("object"==typeof window&&window)||C("object"==typeof self&&self)||C("object"==typeof _&&_)||function(){return this}()||Function("return this")(),N=function(e){return"object"==typeof e?null!==e:"function"==typeof e},R=N,I=O.document,$=R(I)&&R(I.createElement),T=function(e){return $?I.createElement(e):{}},P=T,j=!S&&!x((function(){return 7!=Object.defineProperty(P("div"),"a",{get:function(){return 7}}).a})),k=N,A=function(e){if(!k(e))throw TypeError(String(e)+" is not an object");return e},B=N,F=function(e,t){if(!B(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!B(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!B(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!B(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},M=S,D=j,U=A,L=F,q=Object.defineProperty;w.f=M?q:function(e,t,r){if(U(e),t=L(t,!0),U(r),D)try{return q(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 H=S,V=w.f,G=Function.prototype,X=G.toString,z=/^\s*function ([^ (]*)/;H&&!("name"in G)&&V(G,"name",{configurable:!0,get:function(){try{return X.call(this).match(z)[1]}catch(e){return""}}});var W={},Y={},K={}.propertyIsEnumerable,J=Object.getOwnPropertyDescriptor,Q=J&&!K.call({1:2},1);Y.f=Q?function(e){var t=J(this,e);return!!t&&t.enumerable}:K;var Z=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ee={}.toString,te=function(e){return ee.call(e).slice(8,-1)},re=te,ne="".split,oe=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},ie=x((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==re(e)?ne.call(e,""):Object(e)}:Object,ae=oe,le=function(e){return ie(ae(e))},ce={}.hasOwnProperty,se=function(e,t){return ce.call(e,t)},ue=S,fe=Y,pe=Z,de=le,he=F,ge=se,ve=j,me=Object.getOwnPropertyDescriptor;W.f=ue?me:function(e,t){if(e=de(e),t=he(t,!0),ve)try{return me(e,t)}catch(e){}if(ge(e,t))return pe(!fe.f.call(e,t),e[t])};var ye=w,be=Z,Ee=S?function(e,t,r){return ye.f(e,t,be(1,r))}:function(e,t,r){return e[t]=r,e},_e={exports:{}},xe=O,Se=Ee,we=function(e,t){try{Se(xe,e,t)}catch(r){xe[e]=t}return t},Ce=we,Oe=O["__core-js_shared__"]||Ce("__core-js_shared__",{}),Ne=Oe,Re=Function.toString;"function"!=typeof Ne.inspectSource&&(Ne.inspectSource=function(e){return Re.call(e)});var Ie=Ne.inspectSource,$e=Ie,Te=O.WeakMap,Pe="function"==typeof Te&&/native code/.test($e(Te)),je={exports:{}},ke=Oe;(je.exports=function(e,t){return ke[e]||(ke[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Ae,Be,Fe,Me=0,De=Math.random(),Ue=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Me+De).toString(36)},Le=je.exports,qe=Ue,He=Le("keys"),Ve=function(e){return He[e]||(He[e]=qe(e))},Ge={},Xe=Pe,ze=N,We=Ee,Ye=se,Ke=Oe,Je=Ve,Qe=Ge,Ze=O.WeakMap;if(Xe){var et=Ke.state||(Ke.state=new Ze),tt=et.get,rt=et.has,nt=et.set;Ae=function(e,t){return t.facade=e,nt.call(et,e,t),t},Be=function(e){return tt.call(et,e)||{}},Fe=function(e){return rt.call(et,e)}}else{var ot=Je("state");Qe[ot]=!0,Ae=function(e,t){return t.facade=e,We(e,ot,t),t},Be=function(e){return Ye(e,ot)?e[ot]:{}},Fe=function(e){return Ye(e,ot)}}var it={set:Ae,get:Be,has:Fe,enforce:function(e){return Fe(e)?Be(e):Ae(e,{})},getterFor:function(e){return function(t){var r;if(!ze(t)||(r=Be(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},at=O,lt=Ee,ct=se,st=we,ut=Ie,ft=it.get,pt=it.enforce,dt=String(String).split("String");(_e.exports=function(e,t,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,l=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof t||ct(r,"name")||lt(r,"name",t),(o=pt(r)).source||(o.source=dt.join("string"==typeof t?t:""))),e!==at?(i?!l&&e[t]&&(a=!0):delete e[t],a?e[t]=r:lt(e,t,r)):a?e[t]=r:st(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&ft(this).source||ut(this)}));var ht=O,gt=O,vt=function(e){return"function"==typeof e?e:void 0},mt=function(e,t){return arguments.length<2?vt(ht[e])||vt(gt[e]):ht[e]&&ht[e][t]||gt[e]&>[e][t]},yt={},bt=Math.ceil,Et=Math.floor,_t=function(e){return isNaN(e=+e)?0:(e>0?Et:bt)(e)},xt=_t,St=Math.min,wt=function(e){return e>0?St(xt(e),9007199254740991):0},Ct=_t,Ot=Math.max,Nt=Math.min,Rt=le,It=wt,$t=function(e,t){var r=Ct(e);return r<0?Ot(r+t,0):Nt(r,t)},Tt=function(e){return function(t,r,n){var o,i=Rt(t),a=It(i.length),l=$t(n,a);if(e&&r!=r){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===r)return e||l||0;return!e&&-1}},Pt={includes:Tt(!0),indexOf:Tt(!1)},jt=se,kt=le,At=Pt.indexOf,Bt=Ge,Ft=function(e,t){var r,n=kt(e),o=0,i=[];for(r in n)!jt(Bt,r)&&jt(n,r)&&i.push(r);for(;t.length>o;)jt(n,r=t[o++])&&(~At(i,r)||i.push(r));return i},Mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Dt=Ft,Ut=Mt.concat("length","prototype");yt.f=Object.getOwnPropertyNames||function(e){return Dt(e,Ut)};var Lt={};Lt.f=Object.getOwnPropertySymbols;var qt=yt,Ht=Lt,Vt=A,Gt=mt("Reflect","ownKeys")||function(e){var t=qt.f(Vt(e)),r=Ht.f;return r?t.concat(r(e)):t},Xt=se,zt=Gt,Wt=W,Yt=w,Kt=x,Jt=/#|\.prototype\./,Qt=function(e,t){var r=er[Zt(e)];return r==rr||r!=tr&&("function"==typeof t?Kt(t):!!t)},Zt=Qt.normalize=function(e){return String(e).replace(Jt,".").toLowerCase()},er=Qt.data={},tr=Qt.NATIVE="N",rr=Qt.POLYFILL="P",nr=Qt,or=O,ir=W.f,ar=Ee,lr=_e.exports,cr=we,sr=function(e,t){for(var r=zt(t),n=Yt.f,o=Wt.f,i=0;i<r.length;i++){var a=r[i];Xt(e,a)||n(e,a,o(t,a))}},ur=nr,fr=A,pr=function(){var e=fr(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},dr={},hr=x;function gr(e,t){return RegExp(e,t)}dr.UNSUPPORTED_Y=hr((function(){var e=gr("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),dr.BROKEN_CARET=hr((function(){var e=gr("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var vr=pr,mr=dr,yr=RegExp.prototype.exec,br=String.prototype.replace,Er=yr,_r=function(){var e=/a/,t=/b*/g;return yr.call(e,"a"),yr.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),xr=mr.UNSUPPORTED_Y||mr.BROKEN_CARET,Sr=void 0!==/()??/.exec("")[1];(_r||Sr||xr)&&(Er=function(e){var t,r,n,o,i=this,a=xr&&i.sticky,l=vr.call(i),c=i.source,s=0,u=e;return a&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),u=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",u=" "+u,s++),r=new RegExp("^(?:"+c+")",l)),Sr&&(r=new RegExp("^"+c+"$(?!\\s)",l)),_r&&(t=i.lastIndex),n=yr.call(a?r:i,u),a?n?(n.input=n.input.slice(s),n[0]=n[0].slice(s),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:_r&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),Sr&&n&&n.length>1&&br.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var wr=Er;(function(e,t){var r,n,o,i,a,l=e.target,c=e.global,s=e.stat;if(r=c?or:s?or[l]||cr(l,{}):(or[l]||{}).prototype)for(n in t){if(i=t[n],o=e.noTargetGet?(a=ir(r,n))&&a.value:r[n],!ur(c?n:l+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;sr(i,o)}(e.sham||o&&o.sham)&&ar(i,"sham",!0),lr(r,n,i,e)}})({target:"RegExp",proto:!0,forced:/./.exec!==wr},{exec:wr});var Cr,Or,Nr="process"==te(O.process),Rr=mt("navigator","userAgent")||"",Ir=O.process,$r=Ir&&Ir.versions,Tr=$r&&$r.v8;Tr?Or=(Cr=Tr.split("."))[0]+Cr[1]:Rr&&(!(Cr=Rr.match(/Edge\/(\d+)/))||Cr[1]>=74)&&(Cr=Rr.match(/Chrome\/(\d+)/))&&(Or=Cr[1]);var Pr=Nr,jr=Or&&+Or,kr=x,Ar=!!Object.getOwnPropertySymbols&&!kr((function(){return!Symbol.sham&&(Pr?38===jr:jr>37&&jr<41)})),Br=Ar&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Fr=O,Mr=je.exports,Dr=se,Ur=Ue,Lr=Ar,qr=Br,Hr=Mr("wks"),Vr=Fr.Symbol,Gr=qr?Vr:Vr&&Vr.withoutSetter||Ur,Xr=function(e){return Dr(Hr,e)&&(Lr||"string"==typeof Hr[e])||(Lr&&Dr(Vr,e)?Hr[e]=Vr[e]:Hr[e]=Gr("Symbol."+e)),Hr[e]},zr=_e.exports,Wr=x,Yr=Xr,Kr=wr,Jr=Ee,Qr=Yr("species"),Zr=!Wr((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),en="$0"==="a".replace(/./,"$0"),tn=Yr("replace"),rn=!!/./[tn]&&""===/./[tn]("a","$0"),nn=!Wr((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]})),on=_t,an=oe,ln=function(e){return function(t,r){var n,o,i=String(an(t)),a=on(r),l=i.length;return a<0||a>=l?e?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===l||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):n:e?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},cn={codeAt:ln(!1),charAt:ln(!0)}.charAt,sn=oe,un=function(e){return Object(sn(e))},fn=Math.floor,pn="".replace,dn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hn=/\$([$&'`]|\d{1,2})/g,gn=te,vn=wr,mn=function(e,t,r,n){var o=Yr(e),i=!Wr((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!Wr((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Qr]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||"replace"===e&&(!Zr||!en||rn)||"split"===e&&!nn){var l=/./[o],c=r(o,""[e],(function(e,t,r,n,o){return t.exec===Kr?i&&!o?{done:!0,value:l.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:en,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:rn}),s=c[0],u=c[1];zr(String.prototype,e,s),zr(RegExp.prototype,o,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}n&&Jr(RegExp.prototype[o],"sham",!0)},yn=A,bn=wt,En=_t,_n=oe,xn=function(e,t,r){return t+(r?cn(e,t).length:1)},Sn=function(e,t,r,n,o,i){var a=r+e.length,l=n.length,c=hn;return void 0!==o&&(o=un(o),c=dn),pn.call(i,c,(function(i,c){var s;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":s=o[c.slice(1,-1)];break;default:var u=+c;if(0===u)return i;if(u>l){var f=fn(u/10);return 0===f?i:f<=l?void 0===n[f-1]?c.charAt(1):n[f-1]+c.charAt(1):i}s=n[u-1]}return void 0===s?"":s}))},wn=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"!==gn(e))throw TypeError("RegExp#exec called on incompatible receiver");return vn.call(e,t)},Cn=Math.max,On=Math.min;mn("replace",2,(function(e,t,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(r,n){var o=_n(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,o,n):t.call(String(o),r,n)},function(e,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var l=r(t,e,this,n);if(l.done)return l.value}var c=yn(e),s=String(this),u="function"==typeof n;u||(n=String(n));var f=c.global;if(f){var p=c.unicode;c.lastIndex=0}for(var d=[];;){var h=wn(c,s);if(null===h)break;if(d.push(h),!f)break;""===String(h[0])&&(c.lastIndex=xn(s,bn(c.lastIndex),p))}for(var g,v="",m=0,y=0;y<d.length;y++){h=d[y];for(var b=String(h[0]),E=Cn(On(En(h.index),s.length),0),_=[],x=1;x<h.length;x++)_.push(void 0===(g=h[x])?g:String(g));var S=h.groups;if(u){var w=[b].concat(_,E,s);void 0!==S&&w.push(S);var C=String(n.apply(void 0,w))}else C=Sn(b,s,E,_,S,n);E>=m&&(v+=s.slice(m,E)+C,m=E+b.length)}return v+s.slice(m)}]}));var Nn=N,Rn=A,In=function(e){if(!Nn(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},$n=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 Rn(r),In(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),Tn=N,Pn=$n,jn=function(e,t,r){var n,o;return Pn&&"function"==typeof(n=t.constructor)&&n!==r&&Tn(o=n.prototype)&&o!==r.prototype&&Pn(e,o),e},kn=N,An=te,Bn=Xr("match"),Fn=mt,Mn=w,Dn=S,Un=Xr("species"),Ln=S,qn=O,Hn=nr,Vn=jn,Gn=w.f,Xn=yt.f,zn=function(e){var t;return kn(e)&&(void 0!==(t=e[Bn])?!!t:"RegExp"==An(e))},Wn=pr,Yn=dr,Kn=_e.exports,Jn=x,Qn=it.set,Zn=function(e){var t=Fn(e),r=Mn.f;Dn&&t&&!t[Un]&&r(t,Un,{configurable:!0,get:function(){return this}})},eo=Xr("match"),to=qn.RegExp,ro=to.prototype,no=/a/g,oo=/a/g,io=new to(no)!==no,ao=Yn.UNSUPPORTED_Y;if(Ln&&Hn("RegExp",!io||ao||Jn((function(){return oo[eo]=!1,to(no)!=no||to(oo)==oo||"/a/i"!=to(no,"i")})))){for(var lo=function(e,t){var r,n=this instanceof lo,o=zn(e),i=void 0===t;if(!n&&o&&e.constructor===lo&&i)return e;io?o&&!i&&(e=e.source):e instanceof lo&&(i&&(t=Wn.call(e)),e=e.source),ao&&(r=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a=Vn(io?new to(e,t):to(e,t),n?this:ro,lo);return ao&&r&&Qn(a,{sticky:r}),a},co=function(e){e in lo||Gn(lo,e,{configurable:!0,get:function(){return to[e]},set:function(t){to[e]=t}})},so=Xn(to),uo=0;so.length>uo;)co(so[uo++]);ro.constructor=lo,lo.prototype=ro,Kn(qn,"RegExp",lo)}Zn("RegExp");var fo=_e.exports,po=A,ho=x,go=pr,vo=RegExp.prototype,mo=vo.toString,yo=ho((function(){return"/a/b"!=mo.call({source:"a",flags:"b"})})),bo="toString"!=mo.name;(yo||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 vo)?go.call(e):r)}),{unsafe:!0});var Eo,_o=Ft,xo=Mt,So=Object.keys||function(e){return _o(e,xo)},wo=w,Co=A,Oo=So,No=S?Object.defineProperties:function(e,t){Co(e);for(var r,n=Oo(t),o=n.length,i=0;o>i;)wo.f(e,r=n[i++],t[r]);return e},Ro=mt("document","documentElement"),Io=A,$o=No,To=Mt,Po=Ge,jo=Ro,ko=T,Ao=Ve("IE_PROTO"),Bo=function(){},Fo=function(e){return"<script>"+e+"<\/script>"},Mo=function(){try{Eo=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Mo=Eo?function(e){e.write(Fo("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Eo):((t=ko("iframe")).style.display="none",jo.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Fo("document.F=Object")),e.close(),e.F);for(var r=To.length;r--;)delete Mo.prototype[To[r]];return Mo()};Po[Ao]=!0;var Do=Object.create||function(e,t){var r;return null!==e?(Bo.prototype=Io(e),r=new Bo,Bo.prototype=null,r[Ao]=e):r=Mo(),void 0===t?r:$o(r,t)},Uo=oe,Lo="[\t\n\v\f\r \u2028\u2029\ufeff]",qo=RegExp("^"+Lo+Lo+"*"),Ho=RegExp(Lo+Lo+"*$"),Vo=function(e){return function(t){var r=String(Uo(t));return 1&e&&(r=r.replace(qo,"")),2&e&&(r=r.replace(Ho,"")),r}},Go={start:Vo(1),end:Vo(2),trim:Vo(3)},Xo=S,zo=O,Wo=nr,Yo=_e.exports,Ko=se,Jo=te,Qo=jn,Zo=F,ei=x,ti=Do,ri=yt.f,ni=W.f,oi=w.f,ii=Go.trim,ai=zo.Number,li=ai.prototype,ci="Number"==Jo(ti(li)),si=function(e){var t,r,n,o,i,a,l,c,s=Zo(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=ii(s)).charCodeAt(0))||45===t){if(88===(r=s.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,l=0;l<a;l++)if((c=i.charCodeAt(l))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(Wo("Number",!ai(" 0o1")||!ai("0b1")||ai("+0x1"))){for(var ui,fi=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof fi&&(ci?ei((function(){li.valueOf.call(r)})):"Number"!=Jo(r))?Qo(new ai(si(t)),r,fi):si(t)},pi=Xo?ri(ai):"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(","),di=0;pi.length>di;di++)Ko(ai,ui=pi[di])&&!Ko(fi,ui)&&oi(fi,ui,ni(ai,ui));fi.prototype=li,li.constructor=fi,Yo(zo,"Number",fi)}function hi(e,t,r,n,o,i,a,l,c,s){"boolean"!=typeof a&&(c=l,l=a,a=!1);const u="function"==typeof r?r.options:r;let f;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,o&&(u.functional=!0)),n&&(u._scopeId=n),i?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=f):t&&(f=a?function(e){t.call(this,s(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,l(e))}),f)if(u.functional){const e=u.render;u.render=function(t,r){return f.call(r),e(t,r)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,f):[f]}return r}const gi={inject:["getBaseForm"],props:{colon:{type:Boolean,default:!1},columns:{type:Number,default:4},border:{type:Boolean,default:!0},detail:{type:Array,default:()=>[]},model:{type:Object,default:()=>({})},colHeight:{type:Number},rowErrorMessage:{type:Boolean,default:!1},colBackgroundColor:{type:String},labelBackgroundColor:{type:String}},data(){return this.desc="表单布局,是一种专门用于管理表单中输入字段的布局",this.baseSpanNum=24,this.gutter=0,{}},computed:{colonText(){return this.colon?":":""},rowsData(){const e=[];for(let t=0,r=this.detail.length;t<r;t++){const n=[this.detail[t]];let o=parseInt(this.detail[t].span);if(o>=this.columns)e.push(n);else{for(let e=t+1,r=this.detail.length;e<r;e++)if(o+=parseInt(this.detail[e].span),n.push(this.detail[e]),o>=this.columns){t=e;break}if(e.push(n),n.length===r||n[n.length-1].name===this.detail[this.detail.length-1].name)break}}return e}},created(){this.$nextTick((()=>{g(this.labelBackgroundColor)||this.setLabelElementBackgroundColor()}))},methods:{registerEvent(e){if(b(e,"listeners")&&!p(e.listeners)){const t=this.$refs["ref-"+e.name+this._uid][0],r=e.listeners;E(r,((e,r)=>{t.$off(r,e),t.$on(r,e)}))}},_isRenderErrorSlot:(e={})=>!g(m(e,"slotNode.error")),_renderErrorHtml(e=function(){},t=""){this.$slots.default=e(this.$createElement,t)},getComponent:e=>e,getComponentProps:e=>y(e,["value","span","name","label","labelHtml","rules","labelWidth","required","error","showMessage","inlineMessage","size","show-message","inline-message","itemCtCls"]),getCtCls(e){const t=[e];return this.rowErrorMessage&&t.push("item_row-error-message"),v(t," ")},getRowCls(e){return this.border?this.rowsData.length-1===e?"base-form_row-border":"base-form_row-border-no-bottom":""},setLabelElementBackgroundColor(){const e=this.getBaseForm.$children[0].$children[0].$children;for(let t=0,r=e.length;t<r;t++){const r=e[t],n=r.$children;for(let e=0,t=n.length;e<t;e++){const t=n[e].$children[0].$children[0];t.$el.style.backgroundColor=this.labelBackgroundColor,t.$el.style.lineHeight=r.$el.clientHeight+"px"}}}}};var vi=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",e._l(e.rowsData,(function(t,n){return r("el-row",{key:n,class:e.getRowCls(n),style:{"background-color":e.colBackgroundColor},attrs:{gutter:e.gutter,type:"flex"}},e._l(t,(function(n,o){return r("el-col",{key:n.name,style:{"border-right":!!e.border&&(t.length>1&&t.length-1!==o&&"1px solid #E0E0E0")},attrs:{span:e.baseSpanNum/e.columns*n.span}},[r("el-form-item",{class:e.getCtCls(n.itemCtCls),attrs:{prop:n.name,"label-width":n.labelWidth,required:n.required,rules:n.rules,error:n.error,"show-message":n.showMessage,"inline-message":n.inlineMessage,size:n.size},scopedSlots:e._u([{key:"label",fn:function(){return[n.hasOwnProperty("labelHtml")?r("label",{domProps:{innerHTML:e._s(n.labelHtml+e.colonText)}}):r("label",{domProps:{innerHTML:e._s(n.label+e.colonText)}})]},proxy:!0},e._isRenderErrorSlot(n)?{key:"error",fn:function(t){var r=t.error;return[e._v("\n "+e._s(e._renderErrorHtml(n.slotNode.error,r))+"\n "),e._t("default")]}}:null],null,!0)},[e._v(" "),e._v(" "),r(e.getComponent(n.el),e._b({ref:"ref-"+n.name+e._uid,refInFor:!0,tag:"component",on:{"hook:mounted":function(t){return e.registerEvent(n)}},model:{value:e.model[n.name],callback:function(t){e.$set(e.model,n.name,t)},expression:"model[col.name]"}},"component",e.getComponentProps(n),!1))],1)],1)})),1)})),1)};vi._withStripped=!0;const mi=hi({render:vi,staticRenderFns:[]},undefined,gi,undefined,false,undefined,!1,void 0,void 0,void 0);var yi={name:"BaseForm",inheritAttrs:!1,provide:function(){return{getBaseForm:this}},props:{border:{type:Boolean,default:!1},colon:{type:Boolean,default:!1},columns:{type:Number,default:2},detail:{type:Array,default:function(){return[]}},ctCls:{type:String},rowErrorMessage:{type:Boolean,default:!1},colBackgroundColor:{type:String},labelBackgroundColor:{type:String},colHeight:{type:Number},isRender:{type:Boolean,default:!0},isDisplay:{type:Boolean,default:!0}},data:function(){return{}},methods:{_validateEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.$emit("validate",e,t,r)},validate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.$refs["".concat(this._uid,"-el-form-ref")].validate((function(r){if(!r)return t(),!1;e()}))},resetFields:function(){this.$refs["".concat(this._uid,"-el-form-ref")].resetFields()},clearValidate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.$refs["".concat(this._uid,"-el-form-ref")].clearValidate(e)},validateField:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};p(e)||this.$refs["".concat(this._uid,"-el-form-ref")].validateField(e,t)},getForm:function(){return this.$refs["".concat(this._uid,"-el-form-ref")]}},render:function(e){if(h(this.isRender,!1))return e();var t={};h(this.isDisplay,!1)&&d(t,"display","none");var r=["base-el-form"];return g(this.ctCls)||r.push(this.ctCls),this.rowErrorMessage&&r.push("base-row_error_message"),e("el-form",{ref:"".concat(this._uid,"-el-form-ref"),style:t,attrs:{id:this.$attrs.id},class:v(r," "),props:this.$attrs,on:{validate:this._validateEvent}},[e(mi,{props:{colon:this.colon,columns:this.columns,border:this.border,detail:this.detail,model:this.$attrs.model,rowErrorMessage:this.rowErrorMessage,colBackgroundColor:this.colBackgroundColor,labelBackgroundColor:this.labelBackgroundColor,colHeight:this.colHeight}})])}};yi.install=function(e,t){var r;if(r="按需加载独立组件:"+yi.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(r),f(t)&&!p(t))for(var n=0;n<t.length;n++)t[n].name!==yi.name&&e.use(t[n]);e.component(yi.name,yi)},exports.BaseForm=yi;