geno/wp-content/plugins/mailpoet/assets/dist/js/public.js

2 lines
108 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
/*! For license information please see public.js.LICENSE.txt */
!function(){var __webpack_modules__={14:function(module,__unused_webpack_exports,__webpack_require__){module.exports=function($){"use strict";function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest()}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||"[object Arguments]"===Object.prototype.toString.call(iter))return Array.from(iter)}function _iterableToArrayLimit(arr,i){if(Symbol.iterator in Object(arr)||"[object Arguments]"===Object.prototype.toString.call(arr)){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_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}}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var globalID=1,pastWarnings={},Utils={attr:function(element,namespace,obj){var i,attribute,attributes,regex=new RegExp("^"+namespace,"i");if(void 0===obj)obj={};else for(i in obj)obj.hasOwnProperty(i)&&delete obj[i];if(!element)return obj;for(i=(attributes=element.attributes).length;i--;)(attribute=attributes[i])&&attribute.specified&&regex.test(attribute.name)&&(obj[this.camelize(attribute.name.slice(namespace.length))]=this.deserializeValue(attribute.value));return obj},checkAttr:function(element,namespace,_checkAttr){return element.hasAttribute(namespace+_checkAttr)},setAttr:function(element,namespace,attr,value){element.setAttribute(this.dasherize(namespace+attr),String(value))},getType:function(element){return element.getAttribute("type")||"text"},generateID:function(){return""+globalID++},deserializeValue:function(value){var num;try{return value?"true"==value||"false"!=value&&("null"==value?null:isNaN(num=Number(value))?/^[\[\{]/.test(value)?JSON.parse(value):value:num):value}catch(e){return value}},camelize:function(str){return str.replace(/-+(.)?/g,(function(match,chr){return chr?chr.toUpperCase():""}))},dasherize:function(str){return str.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var _window$console;window.console&&"function"==typeof window.console.warn&&(_window$console=window.console).warn.apply(_window$console,arguments)},warnOnce:function(msg){pastWarnings[msg]||(pastWarnings[msg]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){pastWarnings={}},trimString:function(string){return string.replace(/^\s+|\s+$/g,"")},parse:{date:function(string){var parsed=string.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!parsed)return null;var _parsed$map2=_slicedToArray(parsed.map((function(x){return parseInt(x,10)})),4),year=(_parsed$map2[0],_parsed$map2[1]),month=_parsed$map2[2],day=_parsed$map2[3],date=new Date(year,month-1,day);return date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day?null:date},string:function(_string){return _string},integer:function(string){return isNaN(string)?null:parseInt(string,10)},number:function(string){if(isNaN(string))throw null;return parseFloat(s