Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

2 lines
1.8 KiB

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var s in t=arguments[a])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},pattern={kebab:/-(\w)/g,styleProp:/:(.*)/,styleList:/;(?![^(]*\))/g};function camelReplace(e,t){return t?t.toUpperCase():""}function camelCase(e){return e.replace(pattern.kebab,camelReplace)}function parseStyle(e){for(var t={},a=0,r=e.split(pattern.styleList);a<r.length;a++){var s=r[a].split(pattern.styleProp),c=s[0],n=s[1];(c=c.trim())&&("string"==typeof n&&(n=n.trim()),t[camelCase(c)]=n)}return t}function mergeData(){for(var e,t,a={},r=arguments.length;r--;)for(var s=0,c=Object.keys(arguments[r]);s<c.length;s++)switch(e=c[s]){case"class":case"style":case"directives":if(Array.isArray(a[e])||(a[e]=[]),"style"===e){var n=void 0;n=Array.isArray(arguments[r].style)?arguments[r].style:[arguments[r].style];for(var o=0;o<n.length;o++){var l=n[o];"string"==typeof l&&(n[o]=parseStyle(l))}arguments[r].style=n}a[e]=a[e].concat(arguments[r][e]);break;case"staticClass":if(!arguments[r][e])break;void 0===a[e]&&(a[e]=""),a[e]&&(a[e]+=" "),a[e]+=arguments[r][e].trim();break;case"on":case"nativeOn":a[e]||(a[e]={});for(var i=0,p=Object.keys(arguments[r][e]||{});i<p.length;i++)t=p[i],a[e][t]?a[e][t]=[].concat(a[e][t],arguments[r][e][t]):a[e][t]=arguments[r][e][t];break;case"attrs":case"props":case"domProps":case"scopedSlots":case"staticStyle":case"hook":case"transition":a[e]||(a[e]={}),a[e]=__assign({},arguments[r][e],a[e]);break;case"slot":case"key":case"ref":case"tag":case"show":case"keepAlive":default:a[e]||(a[e]=arguments[r][e])}return a}exports.mergeData=mergeData;
//# sourceMappingURL=lib.common.js.map