moodle_local_treestudyplan/amd/build/bootstrap-vue/vue-functional-data-merge.min.js

3 lines
4.3 KiB
JavaScript
Raw Normal View History

2023-08-19 17:54:40 +02:00
define("local_treestudyplan/bootstrap-vue/vue-functional-data-merge",["exports"],(function(_exports){function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null==_i)return;var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||_unsupportedIterableToArray(arr,i)||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 _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.mergeData=function(){var prop,mergeTarget={},i=arguments.length;for(;i--;)for(var _i2=0,_Object$keys=Object.keys(arguments[i]);_i2<_Object$keys.length;_i2++)if(prop=_Object$keys[_i2],null!=arguments[i][prop]){switch(prop){case"class":var classes=[],value=mergeTarget.class;Array.isArray(value)&&(classes=value),mergeTarget.class=classes.concat(arguments[i].class);continue;case"style":var styles=[],_value=mergeTarget.style;Array.isArray(_value)&&(styles=_value);var thisStyle=[];Array.isArray(arguments[i].style)?thisStyle=arguments[i].style:thisStyle.push(arguments[i].style);for(var j=0;j<thisStyle.length;j++){var s=thisStyle[j];"string"==typeof s&&(thisStyle[j]=parseStyle(s))}mergeTarget[prop]=styles.concat(thisStyle);continue;case"id":case"key":case"ref":case"keepAlive":mergeTarget[prop]||(mergeTarget[prop]=arguments[i][prop]);continue}if(prop.startsWith("on")&&"on"!==prop){if(mergeTarget[prop]&&!Array.isArray(mergeTarget[prop])){mergeTarget[prop]=[mergeTarget[prop],arguments[i][prop]];continue}var targetValue=mergeTarget[prop],thisValue=arguments[i][prop];if(Array.isArray(targetValue)){Array.isArray(thisValue)?targetValue.push.apply(targetValue,function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr=thisValue)||function(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||_unsupportedIterableToArray(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):targetValue.push(thisValue);continue}}mergeTarget[prop]=arguments[i][prop]}var arr;return mergeTarget};var pattern={kebab:/-(\w)/g,styleProp:/:(.*)/,styleList:/;(?![^(]*\))/g};function camelReplace(_substr,match){return match.toUpperCase()}function parseStyle(style){var _step,str,styleMap={},_iterator=function(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(_e2){throw _e2},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function(){it=it.call(o)},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(_e3){didErr=!0,err=_e3},f:function(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}(style.split(pattern.styleList));try{for(_iterator.s();!(_step=_iterator.n())
//# sourceMappingURL=vue-functional-data-merge.min.js.map