shu-c-view
Version:
rollup 打包vue@2.7组件库框架
7 lines (6 loc) • 14.2 kB
JavaScript
/*!
* shu-c-view v2.0.0
* (c) 2024-04-23
* @license MIT
*/
;Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/assign"),e=require("lodash/omit"),r=require("lodash/keys"),n=require("lodash/has"),o=require("lodash/get"),i=require("vue");function u(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var c=u(t),a=u(e),s=u(r),f=u(n),l=u(o);function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b=function(t){return t&&t.Math==Math&&t},d=b("object"==typeof globalThis&&globalThis)||b("object"==typeof window&&window)||b("object"==typeof self&&self)||b("object"==typeof y&&y)||function(){return this}()||Function("return this")(),v={},h=function(t){try{return!!t()}catch(t){return!0}},g=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),w=m,O=Function.prototype.call,S=w?O.bind(O):function(){return O.apply(O,arguments)},j={},P={}.propertyIsEnumerable,T=Object.getOwnPropertyDescriptor,C=T&&!P.call({1:2},1);j.f=C?function(t){var e=T(this,t);return!!e&&e.enumerable}:P;var E,x,$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},A=m,_=Function.prototype,D=_.call,M=A&&_.bind.bind(D,D),I=A?M:function(t){return function(){return D.apply(t,arguments)}},F=I,L=F({}.toString),k=F("".slice),N=function(t){return k(L(t),8,-1)},z=h,q=N,R=Object,G=I("".split),B=z((function(){return!R("z").propertyIsEnumerable(0)}))?function(t){return"String"==q(t)?G(t,""):R(t)}:R,H=function(t){return null==t},U=H,W=TypeError,K=function(t){if(U(t))throw W("Can't call method on "+t);return t},V=B,X=K,Y=function(t){return V(X(t))},J="object"==typeof document&&document.all,Q={all:J,IS_HTMLDDA:void 0===J&&void 0!==J},Z=Q.all,tt=Q.IS_HTMLDDA?function(t){return"function"==typeof t||t===Z}:function(t){return"function"==typeof t},et=tt,rt=Q.all,nt=Q.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:et(t)||t===rt}:function(t){return"object"==typeof t?null!==t:et(t)},ot=d,it=tt,ut=function(t){return it(t)?t:void 0},ct=function(t,e){return arguments.length<2?ut(ot[t]):ot[t]&&ot[t][e]},at=I({}.isPrototypeOf),st=d,ft=ct("navigator","userAgent")||"",lt=st.process,pt=st.Deno,yt=lt&<.versions||pt&&pt.version,bt=yt&&yt.v8;bt&&(x=(E=bt.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!x&&ft&&(!(E=ft.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=ft.match(/Chrome\/(\d+)/))&&(x=+E[1]);var dt=x,vt=dt,ht=h,gt=!!Object.getOwnPropertySymbols&&!ht((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&vt&&vt<41})),mt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,wt=ct,Ot=tt,St=at,jt=Object,Pt=mt?function(t){return"symbol"==typeof t}:function(t){var e=wt("Symbol");return Ot(e)&&St(e.prototype,jt(t))},Tt=String,Ct=tt,Et=function(t){try{return Tt(t)}catch(t){return"Object"}},xt=TypeError,$t=function(t){if(Ct(t))return t;throw xt(Et(t)+" is not a function")},At=H,_t=S,Dt=tt,Mt=nt,It=TypeError,Ft={exports:{}},Lt=d,kt=Object.defineProperty,Nt=function(t,e){try{kt(Lt,t,{value:e,configurable:!0,writable:!0})}catch(r){Lt[t]=e}return e},zt=Nt,qt=d["__core-js_shared__"]||zt("__core-js_shared__",{}),Rt=qt;(Ft.exports=function(t,e){return Rt[t]||(Rt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Gt=K,Bt=Object,Ht=function(t){return Bt(Gt(t))},Ut=Ht,Wt=I({}.hasOwnProperty),Kt=Object.hasOwn||function(t,e){return Wt(Ut(t),e)},Vt=I,Xt=0,Yt=Math.random(),Jt=Vt(1..toString),Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Jt(++Xt+Yt,36)},Zt=d,te=Ft.exports,ee=Kt,re=Qt,ne=gt,oe=mt,ie=te("wks"),ue=Zt.Symbol,ce=ue&&ue.for,ae=oe?ue:ue&&ue.withoutSetter||re,se=function(t){if(!ee(ie,t)||!ne&&"string"!=typeof ie[t]){var e="Symbol."+t;ne&&ee(ue,t)?ie[t]=ue[t]:ie[t]=oe&&ce?ce(e):ae(e)}return ie[t]},fe=S,le=nt,pe=Pt,ye=function(t,e){var r=t[e];return At(r)?void 0:$t(r)},be=function(t,e){var r,n;if("string"===e&&Dt(r=t.toString)&&!Mt(n=_t(r,t)))return n;if(Dt(r=t.valueOf)&&!Mt(n=_t(r,t)))return n;if("string"!==e&&Dt(r=t.toString)&&!Mt(n=_t(r,t)))return n;throw It("Can't convert object to primitive value")},de=TypeError,ve=se("toPrimitive"),he=function(t,e){if(!le(t)||pe(t))return t;var r,n=ye(t,ve);if(n){if(void 0===e&&(e="default"),r=fe(n,t,e),!le(r)||pe(r))return r;throw de("Can't convert object to primitive value")}return void 0===e&&(e="number"),be(t,e)},ge=Pt,me=function(t){var e=he(t,"string");return ge(e)?e:e+""},we=nt,Oe=d.document,Se=we(Oe)&&we(Oe.createElement),je=function(t){return Se?Oe.createElement(t):{}},Pe=!g&&!h((function(){return 7!=Object.defineProperty(je("div"),"a",{get:function(){return 7}}).a})),Te=g,Ce=S,Ee=j,xe=$,$e=Y,Ae=me,_e=Kt,De=Pe,Me=Object.getOwnPropertyDescriptor;v.f=Te?Me:function(t,e){if(t=$e(t),e=Ae(e),De)try{return Me(t,e)}catch(t){}if(_e(t,e))return xe(!Ce(Ee.f,t,e),t[e])};var Ie={},Fe=g&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Le=nt,ke=String,Ne=TypeError,ze=function(t){if(Le(t))return t;throw Ne(ke(t)+" is not an object")},qe=g,Re=Pe,Ge=Fe,Be=ze,He=me,Ue=TypeError,We=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor;Ie.f=qe?Ge?function(t,e,r){if(Be(t),e=He(e),Be(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Ke(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return We(t,e,r)}:We:function(t,e,r){if(Be(t),e=He(e),Be(r),Re)try{return We(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Ue("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Ve=Ie,Xe=$,Ye=g?function(t,e,r){return Ve.f(t,e,Xe(1,r))}:function(t,e,r){return t[e]=r,t},Je={exports:{}},Qe=g,Ze=Kt,tr=Function.prototype,er=Qe&&Object.getOwnPropertyDescriptor,rr=Ze(tr,"name"),nr={EXISTS:rr,PROPER:rr&&"something"===function(){}.name,CONFIGURABLE:rr&&(!Qe||Qe&&er(tr,"name").configurable)},or=tt,ir=qt,ur=I(Function.toString);or(ir.inspectSource)||(ir.inspectSource=function(t){return ur(t)});var cr,ar,sr,fr=ir.inspectSource,lr=tt,pr=d.WeakMap,yr=lr(pr)&&/native code/.test(String(pr)),br=Ft.exports,dr=Qt,vr=br("keys"),hr={},gr=yr,mr=d,wr=nt,Or=Ye,Sr=Kt,jr=qt,Pr=function(t){return vr[t]||(vr[t]=dr(t))},Tr=hr,Cr=mr.TypeError,Er=mr.WeakMap;if(gr||jr.state){var xr=jr.state||(jr.state=new Er);xr.get=xr.get,xr.has=xr.has,xr.set=xr.set,cr=function(t,e){if(xr.has(t))throw Cr("Object already initialized");return e.facade=t,xr.set(t,e),e},ar=function(t){return xr.get(t)||{}},sr=function(t){return xr.has(t)}}else{var $r=Pr("state");Tr[$r]=!0,cr=function(t,e){if(Sr(t,$r))throw Cr("Object already initialized");return e.facade=t,Or(t,$r,e),e},ar=function(t){return Sr(t,$r)?t[$r]:{}},sr=function(t){return Sr(t,$r)}}var Ar={set:cr,get:ar,has:sr,enforce:function(t){return sr(t)?ar(t):cr(t,{})},getterFor:function(t){return function(e){var r;if(!wr(e)||(r=ar(e)).type!==t)throw Cr("Incompatible receiver, "+t+" required");return r}}},_r=h,Dr=tt,Mr=Kt,Ir=g,Fr=nr.CONFIGURABLE,Lr=fr,kr=Ar.enforce,Nr=Ar.get,zr=Object.defineProperty,qr=Ir&&!_r((function(){return 8!==zr((function(){}),"length",{value:8}).length})),Rr=String(String).split("String"),Gr=Je.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Mr(t,"name")||Fr&&t.name!==e)&&(Ir?zr(t,"name",{value:e,configurable:!0}):t.name=e),qr&&r&&Mr(r,"arity")&&t.length!==r.arity&&zr(t,"length",{value:r.arity});try{r&&Mr(r,"constructor")&&r.constructor?Ir&&zr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=kr(t);return Mr(n,"source")||(n.source=Rr.join("string"==typeof e?e:"")),t};Function.prototype.toString=Gr((function(){return Dr(this)&&Nr(this).source||Lr(this)}),"toString");var Br=tt,Hr=Ie,Ur=Je.exports,Wr=Nt,Kr={},Vr=Math.ceil,Xr=Math.floor,Yr=Math.trunc||function(t){var e=+t;return(e>0?Xr:Vr)(e)},Jr=function(t){var e=+t;return e!=e||0===e?0:Yr(e)},Qr=Jr,Zr=Math.max,tn=Math.min,en=Jr,rn=Math.min,nn=function(t){return t>0?rn(en(t),9007199254740991):0},on=function(t){return nn(t.length)},un=Y,cn=function(t,e){var r=Qr(t);return r<0?Zr(r+e,0):tn(r,e)},an=on,sn=function(t){return function(e,r,n){var o,i=un(e),u=an(i),c=cn(n,u);if(t&&r!=r){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},fn={includes:sn(!0),indexOf:sn(!1)},ln=Kt,pn=Y,yn=fn.indexOf,bn=hr,dn=I([].push),vn=function(t,e){var r,n=pn(t),o=0,i=[];for(r in n)!ln(bn,r)&&ln(n,r)&&dn(i,r);for(;e.length>o;)ln(n,r=e[o++])&&(~yn(i,r)||dn(i,r));return i},hn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Kr.f=Object.getOwnPropertyNames||function(t){return vn(t,hn)};var gn={};gn.f=Object.getOwnPropertySymbols;var mn=ct,wn=Kr,On=gn,Sn=ze,jn=I([].concat),Pn=mn("Reflect","ownKeys")||function(t){var e=wn.f(Sn(t)),r=On.f;return r?jn(e,r(t)):e},Tn=Kt,Cn=Pn,En=v,xn=Ie,$n=h,An=tt,_n=/#|\.prototype\./,Dn=function(t,e){var r=In[Mn(t)];return r==Ln||r!=Fn&&(An(e)?$n(e):!!e)},Mn=Dn.normalize=function(t){return String(t).replace(_n,".").toLowerCase()},In=Dn.data={},Fn=Dn.NATIVE="N",Ln=Dn.POLYFILL="P",kn=Dn,Nn=d,zn=v.f,qn=Ye,Rn=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(Br(r)&&Ur(r,i,n),n.global)o?t[e]=r:Wr(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Hr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Gn=Nt,Bn=function(t,e,r){for(var n=Cn(e),o=xn.f,i=En.f,u=0;u<n.length;u++){var c=n[u];Tn(t,c)||r&&Tn(r,c)||o(t,c,i(e,c))}},Hn=kn,Un=N,Wn=Array.isArray||function(t){return"Array"==Un(t)},Kn=TypeError,Vn=me,Xn=Ie,Yn=$,Jn={};Jn[se("toStringTag")]="z";var Qn="[object z]"===String(Jn),Zn=tt,to=N,eo=se("toStringTag"),ro=Object,no="Arguments"==to(function(){return arguments}()),oo=I,io=h,uo=tt,co=Qn?to:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ro(t),eo))?r:no?to(e):"Object"==(n=to(e))&&Zn(e.callee)?"Arguments":n},ao=fr,so=function(){},fo=[],lo=ct("Reflect","construct"),po=/^\s*(?:class|function)\b/,yo=oo(po.exec),bo=!po.exec(so),vo=function(t){if(!uo(t))return!1;try{return lo(so,fo,t),!0}catch(t){return!1}},ho=function(t){if(!uo(t))return!1;switch(co(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bo||!!yo(po,ao(t))}catch(t){return!0}};ho.sham=!0;var go=!lo||io((function(){var t;return vo(vo.call)||!vo(Object)||!vo((function(){t=!0}))||t}))?ho:vo,mo=Wn,wo=go,Oo=nt,So=se("species"),jo=Array,Po=function(t){var e;return mo(t)&&(e=t.constructor,(wo(e)&&(e===jo||mo(e.prototype))||Oo(e)&&null===(e=e[So]))&&(e=void 0)),void 0===e?jo:e},To=h,Co=dt,Eo=se("species"),xo=function(t,e){var r,n,o,i,u,c=t.target,a=t.global,s=t.stat;if(r=a?Nn:s?Nn[c]||Gn(c,{}):(Nn[c]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=zn(r,n))&&u.value:r[n],!Hn(a?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Bn(i,o)}(t.sham||o&&o.sham)&&qn(i,"sham",!0),Rn(r,n,i,t)}},$o=h,Ao=Wn,_o=nt,Do=Ht,Mo=on,Io=function(t){if(t>9007199254740991)throw Kn("Maximum allowed index exceeded");return t},Fo=function(t,e,r){var n=Vn(e);n in t?Xn.f(t,n,Yn(0,r)):t[n]=r},Lo=function(t,e){return new(Po(t))(0===e?0:e)},ko=function(t){return Co>=51||!To((function(){var e=[];return(e.constructor={})[Eo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},No=dt,zo=se("isConcatSpreadable"),qo=No>=51||!$o((function(){var t=[];return t[zo]=!1,t.concat()[0]!==t})),Ro=ko("concat"),Go=function(t){if(!_o(t))return!1;var e=t[zo];return void 0!==e?!!e:Ao(t)};xo({target:"Array",proto:!0,arity:1,forced:!qo||!Ro},{concat:function(t){var e,r,n,o,i,u=Do(this),c=Lo(u,0),a=0;for(e=-1,n=arguments.length;e<n;e++)if(Go(i=-1===e?u:arguments[e]))for(o=Mo(i),Io(a+o),r=0;r<o;r++,a++)r in i&&Fo(c,a,i[r]);else Io(a+1),Fo(c,a++,i);return c.length=a,c}});exports.BaseDrawer=function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=null,n=s(a(e,["$route","$router"])),o=t.extend({provide:function(){return{getDrawer:this}},router:e.$router,route:e.$route,props:n,render:function(t){var n=this,o="base-el-drawer";return(f(this.$props,"customClass")||f(this.$props,"custom-class"))&&(o+=" ".concat(l(this.$props,"customClass","")," ").concat(l(this.$props,"custom-class",""))),r=t(),r=f(e.component,"render")?t(e.component):e.component(),t("el-drawer",{class:p({"base-drawer":!0},e.ctCls,e.ctCls),props:c({destroyOnClose:l(e,"destroyOnClose",!0),visible:this.visible,direction:l(e,"direction","rtl"),customClass:o},a(this.$props,["listeners","customClass"]),{}),ref:"".concat(this._uid,"-base-drawer"),on:{open:function(){f(e,"listeners.open")&&e.listeners.open()},opened:function(){f(e,"listeners.opened")&&e.listeners.opened()},close:function(){n.visible=!1,f(e,"listeners.close")&&e.listeners.close()},closed:function(){e.isDestroy?(n.$destroy(),f(n,"$el")&&n.$el.remove()):f(e,"listeners.closed")&&e.listeners.closed()}}},[r,t("template",{slot:"title"},[this.appendTitle()])])}}),u=new o({propsData:e,data:function(){return{visible:!1}},created:function(){this.$nextTick((function(){document.body.appendChild(u.$mount().$el)}))},methods:{getContentNode:function(){return r.componentInstance},open:function(){var t=this;setTimeout((function(){t.visible=!0}),0)},close:function(){var t=this;setTimeout((function(){t.visible=!1}),0)},appendTitle:function(){return f(this.$props,"slotNode.title")?[this.$props.slotNode.title(i.h)]:[]}}});return u}};