mazey 4.7.3 → 4.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Mazey v4.7.3 https://github.com/mazeyqian/mazey
2
+ * Mazey v4.7.5 https://github.com/mazeyqian/mazey
3
3
  * (c) 2018-2024 Cheng
4
4
  * Released under the MIT License.
5
5
  */
6
- var e=function(){return e=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},e.apply(this,arguments)};function n(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((r=r.apply(e,n||[])).next())}))}function t(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function r(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function o(n){if("object"!=typeof n)return n;var t=["string","number","boolean","undefined"];return Object.values(n).every((function(e){return t.includes(typeof e)}))?e({},n):JSON.parse(JSON.stringify(n))}function i(e){return o(e)}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function c(e){var n=e.replace(/-([a-z])/g,(function(e,n){return n.toUpperCase()}));return n.endsWith("-")?n.slice(0,-1):n}function u(e){return a(e)}function s(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function f(e){return s(e)}function d(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)}function l(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function p(e){return l(e)}function v(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function g(e){return void 0===e&&(e=5),v(e)}function h(e){void 0===e&&(e=3);var n=[w(),g(e||3)];return n[0]+n[1]}function m(e){return void 0===e&&(e=3),h(e)}function w(){return Date.now?Date.now():(new Date).getTime()}function y(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")}function b(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)}function E(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],s=function(){u=!1===t.leading?0:w(),i=null,c=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var d=w();u||!1!==t.leading||(u=d);var l=n-(d-u);return r=this,o=a,l<=0||l>n?(i&&(clearTimeout(i),i=null),u=d,c=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),c}}function A(e,n,t){var r=null,o=null,i=null,a=null,c=null,u=function u(){var s=w()-i;s<n&&s>=0?o=setTimeout(u,n-s):(o=null,t||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=w();var d=t&&!o;return o||(o=setTimeout(u,n)),d&&(c=e.apply(r,a),r=a=null),c}}"function"==typeof SuppressedError&&SuppressedError;var S={type:"d"};function T(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=S);var r=(t=Object.assign(S,t)).type;x(e)||(e=new Date(e).getTime()),x(n)||(n=new Date(n).getTime());var o=Number(n)-Number(e),i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]),s=decodeURIComponent("%20%E5%A4%A9%20"),f=decodeURIComponent("%20%E6%97%B6%20"),d=decodeURIComponent("%20%E5%88%86%20"),l=decodeURIComponent("%20%E7%A7%92");if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+s+Math.floor(o/1e3/60/60%24)+f+Math.floor(o/1e3/60%60)+d+(u=Math.floor(o/1e3%60))+l;break;default:i=u}return i}function x(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function O(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function M(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return O.apply(void 0,r([e],n,!1))}function _(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function P(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function k(e){return!!P(e)&&0!==Object.keys(e).length}function R(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function N(e){return R(e)}function j(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function C(e,n){return void 0===n&&(n={}),j(e,n)}function B(e,n){return void 0===n&&(n={}),j(e,n)}function D(e,n){return void 0===n&&(n={}),j(e,n)}function L(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,(function(e){return n[e]}))}function F(e){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&amp;|&lt;|&gt;|&quot;|&#x27;|&#x2F;)/g,(function(e){return n[e]}))}function I(e){return F(e)}function U(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>n));u++)o+=a;return t.hasDot&&c>n&&(o+=t.dotText),o}return""}function q(e,n,t){return void 0===t&&(t=!1),U(e,n,{hasDot:t})}function z(e,n,t){return void 0===t&&(t=!1),q(e,n,t)}function Z(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i}function $(e,n,t){var r=!1;return"object"!=typeof e||n.reduce((function(e,n){return void 0===e[n]?Object.create(null):e=e[n]}),e)===t&&(r=!0),r}function W(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"}function V(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}function J(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach((function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))})),i}function Y(e){return/^1\d{10}$/.test(e)}function H(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function G(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n}function K(){return"v4"}function Q(e,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(e){return!0===e});var a=r.interval,c=void 0===a?1e3:a,u=r.times,s=void 0===u?10:u,f=r.context,d=r.args,l=0;"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof c||c<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),function r(){setTimeout((function(){return n(i,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,e.apply(f,d)];case 1:return n=t.sent(),o(n)||++l>=s?[2]:(r(),[2])}}))}))}),c)}()}function X(e){return n(this,void 0,void 0,(function(){return t(this,(function(n){return[2,new Promise((function(n){setTimeout((function(){n(e)}),e)}))]}))}))}function ee(e){return n(this,void 0,void 0,(function(){return t(this,(function(n){return[2,X(e)]}))}))}var ne="";function te(){if(ne)return"browser"===ne;var e="undefined"!=typeof window;return e&&(ne="browser"),e}function re(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=i[a-1][c-1]),i[a][c]=u+1}var s=Array.prototype.concat.apply([],i);return Math.max.apply(Math,s)}function oe(e,n){return re(e,n)}function ie(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=i[a-1][c-1]),i[a][c]=u+1}else{var s=[0,0],f=s[0],d=s[1];c>0&&(f=i[a][c-1]),a>0&&(d=i[a-1][c]),i[a][c]=Math.max(f,d)}var l=Array.prototype.concat.apply([],i);return Math.max.apply(Math,l)}function ae(e,n){return ie(e,n)}function ce(e){return Math.random()<e}function ue(e){return ce(e)}function se(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""}function fe(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""})),n}function de(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""})),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null}function le(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t}function pe(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""}function ve(e,n){if(void 0===n&&(n=["hostname"]),Ae(e)){var t=new window.URL(e);return n.reduce((function(e,n){return e+=t[n]}),"")}var r=document.createElement("a");return r.href=e,n.reduce((function(e,n){return e+=r[n]}),"")}function ge(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)$/.test(e)}function he(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function me(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n}function we(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""}function ye(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)}function be(e){return e.replace(/^http:/,"https:")}function Ee(e){return be(e)}function Ae(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}function Se(e){var n="";(!he(e)&&he(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Ae(e))&&(n=new URL(e).host);return n}function Te(e){var n="";(!he(e)&&he(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Ae(e))&&(n=new URL(e).pathname);return n}function xe(e,n){void 0===e&&(e=""),void 0===n&&(n={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var t=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},n),o=t.isClosed,i=t.showWrap,a=t.showDate,c=t.locales,u=t.logFn,s=t.errorFn,f=Object.create(null),d=function(){return(new Date).toLocaleDateString(c,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(n){f[n]=function(){for(var t=[],c=0;c<arguments.length;c++)t[c]=arguments[c];if(o)return!1;var f=e,l=e;if("string"==typeof e&&e.length>=2){var p=e.length;f=":"===e[p-1]?e.substring(0,p-1):e}i&&console.log("--- ".concat(f," - begin ---")),a&&(l=e?"".concat(d()," ").concat(e):"".concat(d())),e||a?console[n].apply(console,r([l],t,!1)):console[n].apply(console,t),"log"===n&&u(),"error"===n&&s(),i&&console.log("--- ".concat(f," - end ---"))}})),f}var Oe=xe("[Mazey]");function Me(e,n){if(!e)return Oe.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1}function _e(e,n){if(e)if(Array.isArray(n))n.forEach((function(n){e.classList.add(n)}));else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else Oe.error("The element is not exist.")}function Pe(e,n){_e(e,n)}function ke(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):Oe.error("The element is not exist.")}function Re(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0}function Ne(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each((function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&_(r)&&r[1]&&e.width(r[1]),o&&_(o)&&o[1]&&e.height(o[1])}}})),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach((function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&_(r)&&r[1]&&(n.style.width=r[1]),o&&_(o)&&o[1]&&(n.style.height=o[1])}}})),!0)}function je(){return Ne()}function Ce(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")}function Be(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""}function De(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function Le(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function Fe(e,n){var t=Le();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)}function Ie(n,t){void 0===t&&(t={});var r=Le()[n];if(r instanceof Array)for(var o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&r[o](e(e({},t),{type:n}))}function Ue(e){Ie(e)}function qe(e,n){var t=Le(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]}function ze(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))}function Ze(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function $e(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))}function We(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function Ve(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function Je(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==Ve(e)&&Ve(e)===n||(r=r||"."+c,document.cookie=e+"="+n+i+"; path=/; domain="+r))}function Ye(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function He(e){Ye(e)}function Ge(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise((function(e,n){var r;t=(r=[e,n])[0],o=r[1]})),a=function(){t("loaded")},c=document.createElement("link");c||o(new Error("Not support create link element"));var u="onload"in c,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(c.rel="stylesheet",c.type="text/css",c.href=e,void 0!==r&&(c.id=r),document.getElementsByTagName("head")[0].appendChild(c),s||!u)return setTimeout((function(){d(c,a,0)}),1),i;function f(){c&&(c.onload=c.onerror=c.onreadystatechange=null),c=null,a()}function d(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout((function(){r?n():d(e,n,t)}),20)}}return u?(c.onload=f,c.onerror=function(){f()}):c.onreadystatechange=function(){c&&/loaded|complete/.test(c.readyState)&&f()},i}function Ke(e,n){void 0===n&&(n={id:"",callback:function(){},timeout:5e3,isDefer:!1});var t,r,o=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},n),i=o.id,a=o.callback,c=o.timeout,u=o.isDefer,s=document.createElement("script");s||Promise.reject("Not support create script element");var f=document.getElementsByTagName("script")[0];return s.type="text/javascript",u&&(s.defer=!0),i&&(s.id=i),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||(s.onreadystatechange=null,M(a),M(t,"loaded"))}:s.onload=function(){M(a),M(t,"loaded")},s.src=e,f&&f.parentNode.insertBefore(s,f),new Promise((function(e,n){var o;t=(o=[e,n])[0],r=o[1],c&&setTimeout(r.bind(null,"timeout"),c)}))}function Qe(e){void 0===e&&(e=90);var n,t=function(){},r=new Promise((function(e,r){t=e,n=r}));return"complete"===document.readyState?t("complete"):window.addEventListener("load",(function(){return t("load")})),setTimeout((function(){return n(Error("timeout"))}),1e3*e),r}function Xe(e){return new Promise((function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e}))}function en(e,n){return window[e]?Promise.resolve("defined"):Ke(n)}function nn(e){var n=[],t=window.PerformanceObserver;return!!t&&(_(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function tn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return nn("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-contentful-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function rn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return nn("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function on(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return nn("largest-contentful-paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"largest-contentful-paint"===e.entryType}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"largest-contentful-paint",buffered:!0})}))]:[2,0]}))}))}function an(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return nn("first-input")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-input"===e.entryType}));if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}}));n.observe({type:"first-input",buffered:!0})}))]:[2,0]}))}))}function cn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return nn("layout-shift")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().reduce((function(e,n){var t=0;return x(n.value)&&(t=n.value),e+t}),0);n.disconnect(),e(r)}));n.observe({type:"layout-shift",buffered:!0})}))]:[2,0]}))}))}function un(){return n(this,void 0,void 0,(function(){var e,n;return t(this,(function(t){return nn("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]}))}))}function sn(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){function n(){var n={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:h-m,redirectTime:w-y,dnsTime:b-E,tcpTime:A-S,sslTime:u(A,T),responseTime:O-M,downloadTime:P-O,firstPaintTime:q,firstContentfulPaintTime:z,domReadyTime:k-I,onloadTime:R-I,whiteTime:O-I,renderTime:N-I,decodedBodySize:B,encodedBodySize:D};Object.keys(n).forEach((function(e){x(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))})),x(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var t={};e||Object.keys(n).forEach((function(e){t[f(e)]=n[e]})),Object.keys(t).length?d(t):d(n)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",c=n.match(/android/i)&&"android",u=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||c||u||s?r||o||i||a||c||u||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function u(e,n){var t=0;return n&&(t=e-n),t}var s,d,l,p,v,g,h,m,w,y,b,E,A,S,T,O,M,P,k,R,N,j,C,B,D,L,F,I,U,q,z;return t(this,(function(e){switch(e.label){case 0:if(!nn("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(s=window.performance)||"function"!=typeof s.getEntries||"function"!=typeof s.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise((function(e){d=[e][0]})),p=null,_(v=s.getEntriesByType("navigation"))&&(p=v[0]),g=new Array(19).fill(0),h=g[0],m=g[1],w=g[2],y=g[3],b=g[4],E=g[5],A=g[6],S=g[7],T=g[8],O=g[9],M=g[10],P=g[11],k=g[12],R=g[13],N=g[14],j=g[15],C=g[16],B=g[17],D=g[18],L=s.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,D=p.encodedBodySize,h=p.unloadEventEnd,m=p.unloadEventStart,w=p.redirectEnd,y=p.redirectStart,b=p.domainLookupEnd,E=p.domainLookupStart,A=p.connectEnd,S=p.connectStart,T=p.secureConnectionStart,O=p.responseStart,M=p.requestStart,P=p.responseEnd,k=p.domContentLoadedEventStart,R=p.loadEventStart,N=p.loadEventEnd,j=p.startTime,C=p.fetchStart;else{if(!L)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=L.unloadEventEnd,m=L.unloadEventStart,w=L.redirectEnd,y=L.redirectStart,b=L.domainLookupEnd,E=L.domainLookupStart,A=L.connectEnd,S=L.connectStart,T=L.secureConnectionStart,O=L.responseStart,M=L.requestStart,P=L.responseEnd,k=L.domContentLoadedEventStart,R=L.loadEventStart,N=L.loadEventEnd,j=L.navigationStart,C=L.fetchStart}if(I=0,x(j))I=j;else{if(!x(C))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=C}return[4,Promise.all([rn(),tn()])];case 1:return U=e.sent(),q=U[0],z=U[1],x(N)&&N>0?n():window.addEventListener("load",(function(){window.setTimeout((function(){n()}),0)})),[2,l]}}))}))}var fn="";function dn(){if(fn)return"pwa"===fn;var e=ln();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell?(fn="pwa",!0):(fn="no-pwa",!1)}function ln(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var n={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return n;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&_(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),n=e(e({},n),{system:i,appleType:a});var c="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?c="2000":r(/windows nt 5.1|windows xp/g)?c="xp":r(/windows nt 5.2|windows 2003/g)?c="2003":r(/windows nt 6.0|windows vista/g)?c="vista":r(/windows nt 6.1|windows 7/g)?c="7":r(/windows nt 6.2|windows 8/g)?c="8":r(/windows nt 6.3|windows 8.1/g)?c="8.1":r(/windows nt 10.0|windows 10/g)&&(c="10"):"macos"===i?c=o(/os x [\d._]+/g):"android"===i?c=o(/android [\d._]+/g):"ios"===i&&(c=o(/os [\d._]+/g)),n=e(e({},n),{systemVs:c});var u="";"windows"===i||"macos"===i||"linux"===i?u="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(u="mobile"),n=e(e({},n),{platform:u});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),n=e(e({},n),{engine:s,supporter:f});var d="";"webkit"===s?d=o(/applewebkit\/[\d._]+/g):"gecko"===s?d=o(/gecko\/[\d._]+/g):"presto"===s?d=o(/presto\/[\d._]+/g):"trident"===s&&(d=o(/trident\/[\d._]+/g)),n=e(e({},n),{engineVs:d});var l="";"chrome"===f?l=o(/chrome\/[\d._]+/g):"safari"===f?l=o(/version\/[\d._]+/g):"firefox"===f?l=o(/firefox\/[\d._]+/g):"opera"===f?l=o(/opr\/[\d._]+/g):"iexplore"===f?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=o(/edge\/[\d._]+/g)),n=e(e({},n),{supporterVs:l});var p="",v="";return r(/micromessenger/g)?(p="wechat",v=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",v=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",v=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",v=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",v=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),n=e(e({},n),{shell:p,shellVs:v}),window.MAZEY_BROWSER_INFO=n,n}catch(e){return Oe.warn(e),n}}function pn(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=ln(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach((function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}})),r}var vn="";function gn(){if(vn)return Promise.resolve("webp"===vn);return new Promise((function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;vn=t?"webp":"no-webp",e(t)},n.onerror=function(){vn="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))}export{_e as addClass,Fe as addEvent,Re as addStyle,ae as calLongestCommonSubsequence,oe as calLongestCommonSubstring,f as camelCase2Underscore,u as camelCaseToKebabCase,De as cancelBubble,B as clearHTML,D as clearHtml,G as convert10To26,a as convertCamelToKebab,s as convertCamelToUnder,be as convertHttpToHttps,c as convertKebabToCamel,ye as convertObjectToQuery,R as convertToHtmlBreaks,z as cutCHSString,U as cutZHString,A as debounce,o as deepCopy,i as deepCopyObject,He as delCookie,M as doFn,Ie as fireEvent,b as floatFixed,y as floatToPercent,J as formatDate,pn as genBrowserAttrs,xe as genCustomConsole,V as genHashCode,v as genRndNumString,Ce as genStyleString,h as genUniqueNumString,g as generateRndNum,m as generateUniqueNum,fe as getAllQueryParams,ln as getBrowserInfo,cn as getCLS,Ve as getCookie,K as getCurrentVersion,Le as getDefineListeners,ve as getDomain,tn as getFCP,an as getFID,rn as getFP,W as getFileSize,T as getFriendlyInterval,pe as getHashQueryParam,on as getLCP,We as getLocalStorage,Be as getPageMeta,sn as getPerformance,se as getQueryParam,we as getScriptQueryParam,Ze as getSessionStorage,un as getTTFB,me as getUrlFileType,Se as getUrlHost,de as getUrlParam,Te as getUrlPath,Me as hasClass,ue as inRate,Ue as invokeEvent,O as invokeFn,te as isBrowser,ce as isHit,l as isJSONString,p as isJsonString,_ as isNonEmptyArray,k as isNonEmptyObject,x as isNumber,P as isPureObject,dn as isSafePWAEnv,gn as isSupportWebp,nn as isSupportedEntryType,$ as isValidData,H as isValidEmail,he as isValidHttpUrl,Y as isValidPhoneNumber,ge as isValidUrl,Ge as loadCSS,Xe as loadImage,Ke as loadScript,en as loadScriptIfUndefined,ie as longestComSubsequence,re as longestComSubstring,w as mNow,d as mTrim,Oe as mazeyCon,N as newLine,ke as removeClass,Ye as removeCookie,qe as removeEvent,j as removeHTML,C as removeHtml,Q as repeatUntilConditionMet,Ee as replaceHttp,L as sanitizeInput,Pe as setClass,Je as setCookie,Ne as setImgSizeBySrc,je as setImgWidHeiBySrc,$e as setLocalStorage,ze as setSessionStorage,ee as sleep,E as throttle,q as truncateZHString,I as unsanitize,F as unsanitizeInput,le as updateQueryParam,X as waitTime,Qe as windowLoaded,Z as zAxiosIsValidRes};
6
+ var e=function(){return e=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},e.apply(this,arguments)};function n(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}c((r=r.apply(e,n||[])).next())}))}function t(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function r(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function o(n){if("object"!=typeof n)return n;var t=["string","number","boolean","undefined"];return Object.values(n).every((function(e){return t.includes(typeof e)}))?e({},n):JSON.parse(JSON.stringify(n))}function i(e){return o(e)}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function u(e){var n=e.replace(/-([a-z])/g,(function(e,n){return n.toUpperCase()}));return n.endsWith("-")?n.slice(0,-1):n}function c(e){return a(e)}function s(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function f(e){return s(e)}function d(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)}function l(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function p(e){return l(e)}function v(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function g(e){return void 0===e&&(e=5),v(e)}function h(e){void 0===e&&(e=3);var n=[w(),g(e||3)];return n[0]+n[1]}function m(e){return void 0===e&&(e=3),h(e)}function w(){return Date.now?Date.now():(new Date).getTime()}function y(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")}function b(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)}function E(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],u=a[0],c=a[1],s=function(){c=!1===t.leading?0:w(),i=null,u=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var d=w();c||!1!==t.leading||(c=d);var l=n-(d-c);return r=this,o=a,l<=0||l>n?(i&&(clearTimeout(i),i=null),c=d,u=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),u}}function A(e,n,t){var r=null,o=null,i=null,a=null,u=null,c=function c(){var s=w()-i;s<n&&s>=0?o=setTimeout(c,n-s):(o=null,t||(u=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=w();var d=t&&!o;return o||(o=setTimeout(c,n)),d&&(u=e.apply(r,a),r=a=null),u}}"function"==typeof SuppressedError&&SuppressedError;var S={type:"d"};function T(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=S);var r=(t=Object.assign(S,t)).type,o=decodeURIComponent;x(e)||(e=new Date(e).getTime()),x(n)||(n=new Date(n).getTime());var i=Number(n)-Number(e),a="",u=new Array(4).fill(0),c=u[0],s=(u[1],u[2],u[3]),f=o("%20%E5%A4%A9%20"),d=o("%20%E6%97%B6%20"),l=o("%20%E5%88%86%20"),p=o("%20%E7%A7%92");if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=c;break;case"text":a=(c=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+d+Math.floor(i/1e3/60%60)+l+(s=Math.floor(i/1e3%60))+p;break;default:a=s}return a}function x(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function O(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function M(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return O.apply(void 0,r([e],n,!1))}function _(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function P(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function k(e){return"function"==typeof e}function N(e){return"string"==typeof e}function j(e){return"boolean"==typeof e}function R(e){return null==e}function C(e){return"[object Array]"===Object.prototype.toString.call(e)}function B(e){return!!P(e)&&0!==Object.keys(e).length}function D(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function L(e){return D(e)}function F(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function I(e,n){return void 0===n&&(n={}),F(e,n)}function q(e,n){return void 0===n&&(n={}),F(e,n)}function z(e,n){return void 0===n&&(n={}),F(e,n)}function U(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,(function(e){return n[e]}))}function Z(e){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&amp;|&lt;|&gt;|&quot;|&#x27;|&#x2F;)/g,(function(e){return n[e]}))}function $(e){return Z(e)}function W(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>n));c++)o+=a;return t.hasDot&&u>n&&(o+=t.dotText),o}return""}function V(e,n,t){return void 0===t&&(t=!1),W(e,n,{hasDot:t})}function J(e,n,t){return void 0===t&&(t=!1),V(e,n,t)}function Y(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i}function H(e,n,t){var r=!1;return"object"!=typeof e||n.reduce((function(e,n){return void 0===e[n]?Object.create(null):e=e[n]}),e)===t&&(r=!0),r}function G(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"}function K(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}function Q(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach((function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))})),i}function X(e){return/^1\d{10}$/.test(e)}function ee(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function ne(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n}function te(){return"v4"}function re(e,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(e){return!0===e});var a=r.interval,u=void 0===a?1e3:a,c=r.times,s=void 0===c?10:c,f=r.context,d=r.args,l=0;"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),function r(){setTimeout((function(){return n(i,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,e.apply(f,d)];case 1:return n=t.sent(),o(n)||++l>=s?[2]:(r(),[2])}}))}))}),u)}()}function oe(e){return n(this,void 0,void 0,(function(){return t(this,(function(n){return[2,new Promise((function(n){setTimeout((function(){n(e)}),e)}))]}))}))}function ie(e){return n(this,void 0,void 0,(function(){return t(this,(function(n){return[2,oe(e)]}))}))}var ae="";function ue(){if(ae)return"browser"===ae;var e="undefined"!=typeof window;return e&&(ae="browser"),e}function ce(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(e[a]===n[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}var s=Array.prototype.concat.apply([],i);return Math.max.apply(Math,s)}function se(e,n){return ce(e,n)}function fe(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(e[a]===n[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}else{var s=[0,0],f=s[0],d=s[1];u>0&&(f=i[a][u-1]),a>0&&(d=i[a-1][u]),i[a][u]=Math.max(f,d)}var l=Array.prototype.concat.apply([],i);return Math.max.apply(Math,l)}function de(e,n){return fe(e,n)}function le(e){return Math.random()<e}function pe(e){return le(e)}function ve(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""}function ge(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""})),n}function he(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""})),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null}function me(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t}function we(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""}function ye(e,n){if(void 0===n&&(n=["hostname"]),Me(e)){var t=new window.URL(e);return n.reduce((function(e,n){return e+=t[n]}),"")}var r=document.createElement("a");return r.href=e,n.reduce((function(e,n){return e+=r[n]}),"")}function be(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)$/.test(e)}function Ee(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function Ae(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n}function Se(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""}function Te(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)}function xe(e){return e.replace(/^http:/,"https:")}function Oe(e){return xe(e)}function Me(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}function _e(e){var n="";(!Ee(e)&&Ee(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Me(e))&&(n=new URL(e).host);return n}function Pe(e){var n="";(!Ee(e)&&Ee(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Me(e))&&(n=new URL(e).pathname);return n}function ke(e,n){void 0===e&&(e=""),void 0===n&&(n={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var t=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},n),o=t.isClosed,i=t.showWrap,a=t.showDate,u=t.locales,c=t.logFn,s=t.errorFn,f=Object.create(null),d=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(n){f[n]=function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];if(o)return!1;var f=e,l=e;if("string"==typeof e&&e.length>=2){var p=e.length;f=":"===e[p-1]?e.substring(0,p-1):e}i&&console.log("--- ".concat(f," - begin ---")),a&&(l=e?"".concat(d()," ").concat(e):"".concat(d())),e||a?console[n].apply(console,r([l],t,!1)):console[n].apply(console,t),"log"===n&&c(),"error"===n&&s(),i&&console.log("--- ".concat(f," - end ---"))}})),f}var Ne=ke("[Mazey]");function je(e,n){if(!e)return Ne.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1}function Re(e,n){if(e)if(Array.isArray(n))n.forEach((function(n){e.classList.add(n)}));else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else Ne.error("The element is not exist.")}function Ce(e,n){Re(e,n)}function Be(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):Ne.error("The element is not exist.")}function De(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0}function Le(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each((function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&_(r)&&r[1]&&e.width(r[1]),o&&_(o)&&o[1]&&e.height(o[1])}}})),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach((function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&_(r)&&r[1]&&(n.style.width=r[1]),o&&_(o)&&o[1]&&(n.style.height=o[1])}}})),!0)}function Fe(){return Le()}function Ie(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")}function qe(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""}function ze(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function Ue(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function Ze(e,n){var t=Ue();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)}function $e(n,t){void 0===t&&(t={});var r=Ue()[n];if(r instanceof Array)for(var o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&r[o](e(e({},t),{type:n}))}function We(e){$e(e)}function Ve(e,n){var t=Ue(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]}function Je(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))}function Ye(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function He(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))}function Ge(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function Ke(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function Qe(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var u=location.host;1===u.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=u.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==Ke(e)&&Ke(e)===n||(r=r||"."+u,document.cookie=e+"="+n+i+"; path=/; domain="+r))}function Xe(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function en(e){Xe(e)}function nn(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise((function(e,n){var r;t=(r=[e,n])[0],o=r[1]})),a=function(){t("loaded")},u=document.createElement("link");u||o(new Error("Not support create link element"));var c="onload"in u,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(u.rel="stylesheet",u.type="text/css",u.href=e,void 0!==r&&(u.id=r),document.getElementsByTagName("head")[0].appendChild(u),s||!c)return setTimeout((function(){d(u,a,0)}),1),i;function f(){u&&(u.onload=u.onerror=u.onreadystatechange=null),u=null,a()}function d(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout((function(){r?n():d(e,n,t)}),20)}}return c?(u.onload=f,u.onerror=function(){f()}):u.onreadystatechange=function(){u&&/loaded|complete/.test(u.readyState)&&f()},i}function tn(e,n){void 0===n&&(n={id:"",callback:function(){},timeout:5e3,isDefer:!1});var t,r,o=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},n),i=o.id,a=o.callback,u=o.timeout,c=o.isDefer,s=document.createElement("script");s||Promise.reject("Not support create script element");var f=document.getElementsByTagName("script")[0];return s.type="text/javascript",c&&(s.defer=!0),i&&(s.id=i),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||(s.onreadystatechange=null,M(a),M(t,"loaded"))}:s.onload=function(){M(a),M(t,"loaded")},s.src=e,f&&f.parentNode.insertBefore(s,f),new Promise((function(e,n){var o;t=(o=[e,n])[0],r=o[1],u&&setTimeout(r.bind(null,"timeout"),u)}))}function rn(e){void 0===e&&(e=90);var n,t=function(){},r=new Promise((function(e,r){t=e,n=r}));return"complete"===document.readyState?t("complete"):window.addEventListener("load",(function(){return t("load")})),setTimeout((function(){return n(Error("timeout"))}),1e3*e),r}function on(e){return new Promise((function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e}))}function an(e,n){return window[e]?Promise.resolve("defined"):tn(n)}function un(e){var n=[],t=window.PerformanceObserver;return!!t&&(_(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function cn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return un("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-contentful-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function sn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return un("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function fn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return un("largest-contentful-paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"largest-contentful-paint"===e.entryType}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"largest-contentful-paint",buffered:!0})}))]:[2,0]}))}))}function dn(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return un("first-input")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-input"===e.entryType}));if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}}));n.observe({type:"first-input",buffered:!0})}))]:[2,0]}))}))}function ln(){return n(this,void 0,void 0,(function(){return t(this,(function(e){return un("layout-shift")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().reduce((function(e,n){var t=0;return x(n.value)&&(t=n.value),e+t}),0);n.disconnect(),e(r)}));n.observe({type:"layout-shift",buffered:!0})}))]:[2,0]}))}))}function pn(){return n(this,void 0,void 0,(function(){var e,n;return t(this,(function(t){return un("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]}))}))}function vn(e){return void 0===e&&(e=!1),n(this,void 0,void 0,(function(){function n(){var n={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:u(),unloadTime:h-m,redirectTime:w-y,dnsTime:b-E,tcpTime:A-S,sslTime:c(A,T),responseTime:O-M,downloadTime:P-O,firstPaintTime:z,firstContentfulPaintTime:U,domReadyTime:k-I,onloadTime:N-I,whiteTime:O-I,renderTime:j-I,decodedBodySize:B,encodedBodySize:D};Object.keys(n).forEach((function(e){x(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))})),x(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var t={};e||Object.keys(n).forEach((function(e){t[f(e)]=n[e]})),Object.keys(t).length?d(t):d(n)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",u=n.match(/android/i)&&"android",c=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||u||c||s?r||o||i||a||u||c||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function u(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function c(e,n){var t=0;return n&&(t=e-n),t}var s,d,l,p,v,g,h,m,w,y,b,E,A,S,T,O,M,P,k,N,j,R,C,B,D,L,F,I,q,z,U;return t(this,(function(e){switch(e.label){case 0:if(!un("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(s=window.performance)||"function"!=typeof s.getEntries||"function"!=typeof s.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise((function(e){d=[e][0]})),p=null,_(v=s.getEntriesByType("navigation"))&&(p=v[0]),g=new Array(19).fill(0),h=g[0],m=g[1],w=g[2],y=g[3],b=g[4],E=g[5],A=g[6],S=g[7],T=g[8],O=g[9],M=g[10],P=g[11],k=g[12],N=g[13],j=g[14],R=g[15],C=g[16],B=g[17],D=g[18],L=s.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,D=p.encodedBodySize,h=p.unloadEventEnd,m=p.unloadEventStart,w=p.redirectEnd,y=p.redirectStart,b=p.domainLookupEnd,E=p.domainLookupStart,A=p.connectEnd,S=p.connectStart,T=p.secureConnectionStart,O=p.responseStart,M=p.requestStart,P=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,j=p.loadEventEnd,R=p.startTime,C=p.fetchStart;else{if(!L)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=L.unloadEventEnd,m=L.unloadEventStart,w=L.redirectEnd,y=L.redirectStart,b=L.domainLookupEnd,E=L.domainLookupStart,A=L.connectEnd,S=L.connectStart,T=L.secureConnectionStart,O=L.responseStart,M=L.requestStart,P=L.responseEnd,k=L.domContentLoadedEventStart,N=L.loadEventStart,j=L.loadEventEnd,R=L.navigationStart,C=L.fetchStart}if(I=0,x(R))I=R;else{if(!x(C))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=C}return[4,Promise.all([sn(),cn()])];case 1:return q=e.sent(),z=q[0],U=q[1],x(j)&&j>0?n():window.addEventListener("load",(function(){window.setTimeout((function(){n()}),0)})),[2,l]}}))}))}var gn="";function hn(){if(gn)return"pwa"===gn;var e=mn();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell?(gn="pwa",!0):(gn="no-pwa",!1)}function mn(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var n={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return n;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&_(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),n=e(e({},n),{system:i,appleType:a});var u="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?u="2000":r(/windows nt 5.1|windows xp/g)?u="xp":r(/windows nt 5.2|windows 2003/g)?u="2003":r(/windows nt 6.0|windows vista/g)?u="vista":r(/windows nt 6.1|windows 7/g)?u="7":r(/windows nt 6.2|windows 8/g)?u="8":r(/windows nt 6.3|windows 8.1/g)?u="8.1":r(/windows nt 10.0|windows 10/g)&&(u="10"):"macos"===i?u=o(/os x [\d._]+/g):"android"===i?u=o(/android [\d._]+/g):"ios"===i&&(u=o(/os [\d._]+/g)),n=e(e({},n),{systemVs:u});var c="";"windows"===i||"macos"===i||"linux"===i?c="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(c="mobile"),n=e(e({},n),{platform:c});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),n=e(e({},n),{engine:s,supporter:f});var d="";"webkit"===s?d=o(/applewebkit\/[\d._]+/g):"gecko"===s?d=o(/gecko\/[\d._]+/g):"presto"===s?d=o(/presto\/[\d._]+/g):"trident"===s&&(d=o(/trident\/[\d._]+/g)),n=e(e({},n),{engineVs:d});var l="";"chrome"===f?l=o(/chrome\/[\d._]+/g):"safari"===f?l=o(/version\/[\d._]+/g):"firefox"===f?l=o(/firefox\/[\d._]+/g):"opera"===f?l=o(/opr\/[\d._]+/g):"iexplore"===f?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=o(/edge\/[\d._]+/g)),n=e(e({},n),{supporterVs:l});var p="",v="";return r(/micromessenger/g)?(p="wechat",v=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",v=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",v=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",v=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",v=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),n=e(e({},n),{shell:p,shellVs:v}),window.MAZEY_BROWSER_INFO=n,n}catch(e){return Ne.warn(e),n}}function wn(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=mn(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach((function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}})),r}var yn="";function bn(){if(yn)return Promise.resolve("webp"===yn);return new Promise((function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;yn=t?"webp":"no-webp",e(t)},n.onerror=function(){yn="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))}export{Re as addClass,Ze as addEvent,De as addStyle,de as calLongestCommonSubsequence,se as calLongestCommonSubstring,f as camelCase2Underscore,c as camelCaseToKebabCase,ze as cancelBubble,q as clearHTML,z as clearHtml,ne as convert10To26,a as convertCamelToKebab,s as convertCamelToUnder,xe as convertHttpToHttps,u as convertKebabToCamel,Te as convertObjectToQuery,D as convertToHtmlBreaks,J as cutCHSString,W as cutZHString,A as debounce,o as deepCopy,i as deepCopyObject,en as delCookie,M as doFn,$e as fireEvent,b as floatFixed,y as floatToPercent,Q as formatDate,wn as genBrowserAttrs,ke as genCustomConsole,K as genHashCode,v as genRndNumString,Ie as genStyleString,h as genUniqueNumString,g as generateRndNum,m as generateUniqueNum,ge as getAllQueryParams,mn as getBrowserInfo,ln as getCLS,Ke as getCookie,te as getCurrentVersion,Ue as getDefineListeners,ye as getDomain,cn as getFCP,dn as getFID,sn as getFP,G as getFileSize,T as getFriendlyInterval,we as getHashQueryParam,fn as getLCP,Ge as getLocalStorage,qe as getPageMeta,vn as getPerformance,ve as getQueryParam,Se as getScriptQueryParam,Ye as getSessionStorage,pn as getTTFB,Ae as getUrlFileType,_e as getUrlHost,he as getUrlParam,Pe as getUrlPath,je as hasClass,pe as inRate,We as invokeEvent,O as invokeFn,C as isArray,j as isBoolean,ue as isBrowser,k as isFunction,le as isHit,l as isJSONString,p as isJsonString,_ as isNonEmptyArray,B as isNonEmptyObject,x as isNumber,P as isPureObject,hn as isSafePWAEnv,N as isString,bn as isSupportWebp,un as isSupportedEntryType,R as isUdfOrNul,H as isValidData,ee as isValidEmail,Ee as isValidHttpUrl,X as isValidPhoneNumber,be as isValidUrl,nn as loadCSS,on as loadImage,tn as loadScript,an as loadScriptIfUndefined,fe as longestComSubsequence,ce as longestComSubstring,w as mNow,d as mTrim,Ne as mazeyCon,L as newLine,Be as removeClass,Xe as removeCookie,Ve as removeEvent,F as removeHTML,I as removeHtml,re as repeatUntilConditionMet,Oe as replaceHttp,U as sanitizeInput,Ce as setClass,Qe as setCookie,Le as setImgSizeBySrc,Fe as setImgWidHeiBySrc,He as setLocalStorage,Je as setSessionStorage,ie as sleep,E as throttle,V as truncateZHString,$ as unsanitize,Z as unsanitizeInput,me as updateQueryParam,oe as waitTime,rn as windowLoaded,Y as zAxiosIsValidRes};
package/lib/load.d.ts CHANGED
@@ -8,9 +8,9 @@ import type { MazeyFnParams, MazeyFnReturn, LoadScriptReturns } from "./typing";
8
8
  *
9
9
  * ```javascript
10
10
  * loadCSS(
11
- * 'http://example.com/path/example.css',
11
+ * "http://example.com/path/example.css",
12
12
  * {
13
- * id: 'iamid', // Optional, link ID, default none
13
+ * id: "iamid", // Optional, link ID, default none
14
14
  * }
15
15
  * )
16
16
  * .then(
@@ -48,9 +48,9 @@ export declare function loadCSS(url: string, options?: {
48
48
  *
49
49
  * ```javascript
50
50
  * loadScript(
51
- * 'http://example.com/static/js/plugin-2.1.1.min.js',
51
+ * "http://example.com/static/js/plugin-2.1.1.min.js",
52
52
  * {
53
- * id: 'iamid', // (Optional) script ID, default none
53
+ * id: "iamid", // (Optional) script ID, default none
54
54
  * timeout: 5000, // (Optional) timeout, default `5000`
55
55
  * isDefer: false, // (Optional) defer, default `false`
56
56
  * }
@@ -111,7 +111,7 @@ export declare function loadScript(url: string, options?: {
111
111
  * ```
112
112
  *
113
113
  * @param {number} timeout 超时时间 / 单位:秒
114
- * @returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
114
+ * @returns {Promise<string>} document is loaded? "complete" "load" / "timeout"
115
115
  * @category Load
116
116
  */
117
117
  export declare function windowLoaded(timeout?: number): Promise<string | Error>;
@@ -125,7 +125,7 @@ export declare function windowLoaded(timeout?: number): Promise<string | Error>;
125
125
  * Usage:
126
126
  *
127
127
  * ```javascript
128
- * loadImage('https://example.com/example.png')
128
+ * loadImage("https://example.com/example.png")
129
129
  * .then((img) => {
130
130
  * console.log(img);
131
131
  * })
@@ -140,17 +140,17 @@ export declare function windowLoaded(timeout?: number): Promise<string | Error>;
140
140
  */
141
141
  export declare function loadImage(url: string): Promise<HTMLImageElement>;
142
142
  /**
143
- * Load a script from the given URL if it (`window['attribute']`) has not already been loaded.
143
+ * Load a script from the given URL if it (`window["attribute"]`) has not already been loaded.
144
144
  *
145
145
  * Usage:
146
146
  *
147
147
  * ```javascript
148
- * loadScriptIfUndefined('xyz', 'https://example.com/lib/jquery.min.js')
148
+ * loadScriptIfUndefined("xyz", "https://example.com/lib/xyz.min.js")
149
149
  * .then(() => {
150
- * console.log('xyz is loaded.');
150
+ * console.log("xyz is loaded.");
151
151
  * })
152
152
  * .catch(err => {
153
- * console.log('Failed to load xyz.', err);
153
+ * console.log("Failed to load xyz.", err);
154
154
  * });
155
155
  * ```
156
156
  *
package/lib/load.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAChD,MAAM,UAAU,CAAC;AAGlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CA2G5F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IACP,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,aAAa,KAAK,aAAa,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAQnB,GACA,iBAAiB,CAmDnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAK,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAelE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAWhE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAK7F"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAChD,MAAM,UAAU,CAAC;AAGlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAyG5F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IACP,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,aAAa,KAAK,aAAa,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAQnB,GACA,iBAAiB,CAmDnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAK,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAelE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAWhE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAK7F"}
package/lib/mazey.min.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Mazey v4.7.3 https://github.com/mazeyqian/mazey
2
+ * Mazey v4.7.5 https://github.com/mazeyqian/mazey
3
3
  * (c) 2018-2024 Cheng
4
4
  * Released under the MIT License.
5
5
  */
6
- var mazey=function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},n.apply(this,arguments)};function t(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}u((r=r.apply(e,n||[])).next())}))}function r(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function i(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every((function(e){return t.includes(typeof e)}))?n({},e):JSON.parse(JSON.stringify(e))}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function c(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function u(e){return c(e)}function s(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function d(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function f(e){return void 0===e&&(e=5),d(e)}function l(e){void 0===e&&(e=3);var n=[p(),f(e||3)];return n[0]+n[1]}function p(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var g={type:"d"};function v(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function m(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function h(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return m.apply(void 0,o([e],n,!1))}function w(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function y(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function b(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function S(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function E(e){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&amp;|&lt;|&gt;|&quot;|&#x27;|&#x2F;)/g,(function(e){return n[e]}))}function T(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>n));u++)o+=a;return t.hasDot&&c>n&&(o+=t.dotText),o}return""}function A(e,n,t){return void 0===t&&(t=!1),T(e,n,{hasDot:t})}function x(e){return t(this,void 0,void 0,(function(){return r(this,(function(n){return[2,new Promise((function(n){setTimeout((function(){n(e)}),e)}))]}))}))}var C="";function O(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}var s=Array.prototype.concat.apply([],o);return Math.max.apply(Math,s)}function P(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}else{var s=[0,0],d=s[0],f=s[1];c>0&&(d=o[a][c-1]),a>0&&(f=o[a-1][c]),o[a][c]=Math.max(d,f)}var l=Array.prototype.concat.apply([],o);return Math.max.apply(Math,l)}function M(e){return Math.random()<e}function k(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function N(e){return e.replace(/^http:/,"https:")}function _(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}function R(e,n){void 0===e&&(e=""),void 0===n&&(n={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var t=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},n),r=t.isClosed,i=t.showWrap,a=t.showDate,c=t.locales,u=t.logFn,s=t.errorFn,d=Object.create(null),f=function(){return(new Date).toLocaleDateString(c,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(n){d[n]=function(){for(var t=[],c=0;c<arguments.length;c++)t[c]=arguments[c];if(r)return!1;var d=e,l=e;if("string"==typeof e&&e.length>=2){var p=e.length;d=":"===e[p-1]?e.substring(0,p-1):e}i&&console.log("--- ".concat(d," - begin ---")),a&&(l=e?"".concat(f()," ").concat(e):"".concat(f())),e||a?console[n].apply(console,o([l],t,!1)):console[n].apply(console,t),"log"===n&&u(),"error"===n&&s(),i&&console.log("--- ".concat(d," - end ---"))}})),d}var j=R("[Mazey]");function B(e,n){if(e)if(Array.isArray(n))n.forEach((function(n){e.classList.add(n)}));else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else j.error("The element is not exist.")}function L(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each((function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&e.width(r[1]),o&&w(o)&&o[1]&&e.height(o[1])}}})),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach((function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&(n.style.width=r[1]),o&&w(o)&&o[1]&&(n.style.height=o[1])}}})),!0)}function F(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function I(e,t){void 0===t&&(t={});var r=F()[e];if(r instanceof Array)for(var o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&r[o](n(n({},t),{type:e}))}function U(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function D(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function z(e,n){void 0===n&&(n={id:"",callback:function(){},timeout:5e3,isDefer:!1});var t,r,o=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},n),i=o.id,a=o.callback,c=o.timeout,u=o.isDefer,s=document.createElement("script");s||Promise.reject("Not support create script element");var d=document.getElementsByTagName("script")[0];return s.type="text/javascript",u&&(s.defer=!0),i&&(s.id=i),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||(s.onreadystatechange=null,h(a),h(t,"loaded"))}:s.onload=function(){h(a),h(t,"loaded")},s.src=e,d&&d.parentNode.insertBefore(s,d),new Promise((function(e,n){var o;t=(o=[e,n])[0],r=o[1],c&&setTimeout(r.bind(null,"timeout"),c)}))}function q(e){var n=[],t=window.PerformanceObserver;return!!t&&(w(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function H(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-contentful-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function Z(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}var V="";function W(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&w(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),e=n(n({},e),{system:i,appleType:a});var c="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?c="2000":r(/windows nt 5.1|windows xp/g)?c="xp":r(/windows nt 5.2|windows 2003/g)?c="2003":r(/windows nt 6.0|windows vista/g)?c="vista":r(/windows nt 6.1|windows 7/g)?c="7":r(/windows nt 6.2|windows 8/g)?c="8":r(/windows nt 6.3|windows 8.1/g)?c="8.1":r(/windows nt 10.0|windows 10/g)&&(c="10"):"macos"===i?c=o(/os x [\d._]+/g):"android"===i?c=o(/android [\d._]+/g):"ios"===i&&(c=o(/os [\d._]+/g)),e=n(n({},e),{systemVs:c});var u="";"windows"===i||"macos"===i||"linux"===i?u="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(u="mobile"),e=n(n({},e),{platform:u});var s="",d="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?d="edge":r(/opr/g)?d="opera":r(/chrome/g)?d="chrome":r(/safari/g)&&(d="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",d="firefox"):r(/presto/g)?(s="presto",d="opera"):r(/trident|compatible|msie/g)&&(s="trident",d="iexplore"),e=n(n({},e),{engine:s,supporter:d});var f="";"webkit"===s?f=o(/applewebkit\/[\d._]+/g):"gecko"===s?f=o(/gecko\/[\d._]+/g):"presto"===s?f=o(/presto\/[\d._]+/g):"trident"===s&&(f=o(/trident\/[\d._]+/g)),e=n(n({},e),{engineVs:f});var l="";"chrome"===d?l=o(/chrome\/[\d._]+/g):"safari"===d?l=o(/version\/[\d._]+/g):"firefox"===d?l=o(/firefox\/[\d._]+/g):"opera"===d?l=o(/opr\/[\d._]+/g):"iexplore"===d?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===d&&(l=o(/edge\/[\d._]+/g)),e=n(n({},e),{supporterVs:l});var p="",g="";return r(/micromessenger/g)?(p="wechat",g=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",g=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",g=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",g=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",g=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=n(n({},e),{shell:p,shellVs:g}),window.MAZEY_BROWSER_INFO=e,e}catch(n){return j.warn(n),e}}var $="";return e.addClass=B,e.addEvent=function(e,n){var t=F();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)},e.addStyle=function(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0},e.calLongestCommonSubsequence=function(e,n){return P(e,n)},e.calLongestCommonSubstring=function(e,n){return O(e,n)},e.camelCase2Underscore=u,e.camelCaseToKebabCase=function(e){return a(e)},e.cancelBubble=function(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},e.clearHTML=function(e,n){return void 0===n&&(n={}),S(e,n)},e.clearHtml=function(e,n){return void 0===n&&(n={}),S(e,n)},e.convert10To26=function(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n},e.convertCamelToKebab=a,e.convertCamelToUnder=c,e.convertHttpToHttps=N,e.convertKebabToCamel=function(e){var n=e.replace(/-([a-z])/g,(function(e,n){return n.toUpperCase()}));return n.endsWith("-")?n.slice(0,-1):n},e.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)},e.convertToHtmlBreaks=b,e.cutCHSString=function(e,n,t){return void 0===t&&(t=!1),A(e,n,t)},e.cutZHString=T,e.debounce=function(e,n,t){var r=null,o=null,i=null,a=null,c=null,u=function u(){var s=p()-i;s<n&&s>=0?o=setTimeout(u,n-s):(o=null,t||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],d=0;d<arguments.length;d++)s[d]=arguments[d];r=this,a=s,i=p();var f=t&&!o;return o||(o=setTimeout(u,n)),f&&(c=e.apply(r,a),r=a=null),c}},e.deepCopy=i,e.deepCopyObject=function(e){return i(e)},e.delCookie=function(e){D(e)},e.doFn=h,e.fireEvent=I,e.floatFixed=function(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)},e.floatToPercent=function(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")},e.formatDate=function(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach((function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))})),i},e.genBrowserAttrs=function(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=W(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach((function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}})),r},e.genCustomConsole=R,e.genHashCode=function(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t},e.genRndNumString=d,e.genStyleString=function(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")},e.genUniqueNumString=l,e.generateRndNum=f,e.generateUniqueNum=function(e){return void 0===e&&(e=3),l(e)},e.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""})),n},e.getBrowserInfo=W,e.getCLS=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("layout-shift")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().reduce((function(e,n){var t=0;return v(n.value)&&(t=n.value),e+t}),0);n.disconnect(),e(r)}));n.observe({type:"layout-shift",buffered:!0})}))]:[2,0]}))}))},e.getCookie=U,e.getCurrentVersion=function(){return"v4"},e.getDefineListeners=F,e.getDomain=function(e,n){if(void 0===n&&(n=["hostname"]),_(e)){var t=new window.URL(e);return n.reduce((function(e,n){return e+=t[n]}),"")}var r=document.createElement("a");return r.href=e,n.reduce((function(e,n){return e+=r[n]}),"")},e.getFCP=H,e.getFID=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("first-input")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-input"===e.entryType}));if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}}));n.observe({type:"first-input",buffered:!0})}))]:[2,0]}))}))},e.getFP=Z,e.getFileSize=function(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"},e.getFriendlyInterval=function(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=g);var r=(t=Object.assign(g,t)).type;v(e)||(e=new Date(e).getTime()),v(n)||(n=new Date(n).getTime());var o=Number(n)-Number(e),i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]),s=decodeURIComponent("%20%E5%A4%A9%20"),d=decodeURIComponent("%20%E6%97%B6%20"),f=decodeURIComponent("%20%E5%88%86%20"),l=decodeURIComponent("%20%E7%A7%92");if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+s+Math.floor(o/1e3/60/60%24)+d+Math.floor(o/1e3/60%60)+f+(u=Math.floor(o/1e3%60))+l;break;default:i=u}return i},e.getHashQueryParam=function(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""},e.getLCP=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("largest-contentful-paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"largest-contentful-paint"===e.entryType}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"largest-contentful-paint",buffered:!0})}))]:[2,0]}))}))},e.getLocalStorage=function(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getPageMeta=function(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""},e.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,(function(){function n(){var n={source:I,os:t(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:h-y,redirectTime:b-S,dnsTime:E-T,tcpTime:A-x,sslTime:s(A,C),responseTime:O-P,downloadTime:M-O,firstPaintTime:z,firstContentfulPaintTime:V,domReadyTime:k-U,onloadTime:N-U,whiteTime:O-U,renderTime:_-U,decodedBodySize:B,encodedBodySize:L};Object.keys(n).forEach((function(e){v(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))})),v(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var r={};e||Object.keys(n).forEach((function(e){r[u(e)]=n[e]})),Object.keys(r).length?f(r):f(n)}function t(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",c=n.match(/android/i)&&"android",u=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||c||u||s?r||o||i||a||c||u||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function s(e,n){var t=0;return n&&(t=e-n),t}var d,f,l,p,g,m,h,y,b,S,E,T,A,x,C,O,P,M,k,N,_,R,j,B,L,F,I,U,D,z,V;return r(this,(function(e){switch(e.label){case 0:if(!q("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(d=window.performance)||"function"!=typeof d.getEntries||"function"!=typeof d.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise((function(e){f=[e][0]})),p=null,w(g=d.getEntriesByType("navigation"))&&(p=g[0]),m=new Array(19).fill(0),h=m[0],y=m[1],b=m[2],S=m[3],E=m[4],T=m[5],A=m[6],x=m[7],C=m[8],O=m[9],P=m[10],M=m[11],k=m[12],N=m[13],_=m[14],R=m[15],j=m[16],B=m[17],L=m[18],F=d.timing,I="",p)I="PerformanceNavigationTiming",B=p.decodedBodySize,L=p.encodedBodySize,h=p.unloadEventEnd,y=p.unloadEventStart,b=p.redirectEnd,S=p.redirectStart,E=p.domainLookupEnd,T=p.domainLookupStart,A=p.connectEnd,x=p.connectStart,C=p.secureConnectionStart,O=p.responseStart,P=p.requestStart,M=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,_=p.loadEventEnd,R=p.startTime,j=p.fetchStart;else{if(!F)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];I="PerformanceTiming",h=F.unloadEventEnd,y=F.unloadEventStart,b=F.redirectEnd,S=F.redirectStart,E=F.domainLookupEnd,T=F.domainLookupStart,A=F.connectEnd,x=F.connectStart,C=F.secureConnectionStart,O=F.responseStart,P=F.requestStart,M=F.responseEnd,k=F.domContentLoadedEventStart,N=F.loadEventStart,_=F.loadEventEnd,R=F.navigationStart,j=F.fetchStart}if(U=0,v(R))U=R;else{if(!v(j))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];U=j}return[4,Promise.all([Z(),H()])];case 1:return D=e.sent(),z=D[0],V=D[1],v(_)&&_>0?n():window.addEventListener("load",(function(){window.setTimeout((function(){n()}),0)})),[2,l]}}))}))},e.getQueryParam=function(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""},e.getScriptQueryParam=function(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""},e.getSessionStorage=function(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getTTFB=function(){return t(this,void 0,void 0,(function(){var e,n;return r(this,(function(t){return q("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]}))}))},e.getUrlFileType=function(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n},e.getUrlHost=function(e){var n="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).host),n},e.getUrlParam=function(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""})),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null},e.getUrlPath=function(e){var n="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).pathname),n},e.hasClass=function(e,n){if(!e)return j.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1},e.inRate=function(e){return M(e)},e.invokeEvent=function(e){I(e)},e.invokeFn=m,e.isBrowser=function(){if(C)return"browser"===C;var e="undefined"!=typeof window;return e&&(C="browser"),e},e.isHit=M,e.isJSONString=s,e.isJsonString=function(e){return s(e)},e.isNonEmptyArray=w,e.isNonEmptyObject=function(e){return!!y(e)&&0!==Object.keys(e).length},e.isNumber=v,e.isPureObject=y,e.isSafePWAEnv=function(){if(V)return"pwa"===V;var e=W();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell?(V="pwa",!0):(V="no-pwa",!1)},e.isSupportWebp=function(){return $?Promise.resolve("webp"===$):new Promise((function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;$=t?"webp":"no-webp",e(t)},n.onerror=function(){$="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.isSupportedEntryType=q,e.isValidData=function(e,n,t){var r=!1;return"object"!=typeof e||n.reduce((function(e,n){return void 0===e[n]?Object.create(null):e=e[n]}),e)===t&&(r=!0),r},e.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.isValidHttpUrl=k,e.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},e.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)$/.test(e)},e.loadCSS=function(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise((function(e,n){var r;t=(r=[e,n])[0],o=r[1]})),a=function(){t("loaded")},c=document.createElement("link");c||o(new Error("Not support create link element"));var u="onload"in c,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(c.rel="stylesheet",c.type="text/css",c.href=e,void 0!==r&&(c.id=r),document.getElementsByTagName("head")[0].appendChild(c),s||!u)return setTimeout((function(){f(c,a,0)}),1),i;function d(){c&&(c.onload=c.onerror=c.onreadystatechange=null),c=null,a()}function f(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout((function(){r?n():f(e,n,t)}),20)}}return u?(c.onload=d,c.onerror=function(){d()}):c.onreadystatechange=function(){c&&/loaded|complete/.test(c.readyState)&&d()},i},e.loadImage=function(e){return new Promise((function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e}))},e.loadScript=z,e.loadScriptIfUndefined=function(e,n){return window[e]?Promise.resolve("defined"):z(n)},e.longestComSubsequence=P,e.longestComSubstring=O,e.mNow=p,e.mTrim=function(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)},e.mazeyCon=j,e.newLine=function(e){return b(e)},e.removeClass=function(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):j.error("The element is not exist.")},e.removeCookie=D,e.removeEvent=function(e,n){var t=F(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]},e.removeHTML=S,e.removeHtml=function(e,n){return void 0===n&&(n={}),S(e,n)},e.repeatUntilConditionMet=function(e,n,o){var i=this;void 0===n&&(n={}),void 0===o&&(o=function(e){return!0===e});var a=n.interval,c=void 0===a?1e3:a,u=n.times,s=void 0===u?10:u,d=n.context,f=n.args,l=0;"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof c||c<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),function n(){setTimeout((function(){return t(i,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,e.apply(d,f)];case 1:return t=r.sent(),o(t)||++l>=s?[2]:(n(),[2])}}))}))}),c)}()},e.replaceHttp=function(e){return N(e)},e.sanitizeInput=function(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,(function(e){return n[e]}))},e.setClass=function(e,n){B(e,n)},e.setCookie=function(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==U(e)&&U(e)===n||(r=r||"."+c,document.cookie=e+"="+n+i+"; path=/; domain="+r))},e.setImgSizeBySrc=L,e.setImgWidHeiBySrc=function(){return L()},e.setLocalStorage=function(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))},e.setSessionStorage=function(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))},e.sleep=function(e){return t(this,void 0,void 0,(function(){return r(this,(function(n){return[2,x(e)]}))}))},e.throttle=function(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],s=function(){u=!1===t.leading?0:p(),i=null,c=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];var f=p();u||!1!==t.leading||(u=f);var l=n-(f-u);return r=this,o=a,l<=0||l>n?(i&&(clearTimeout(i),i=null),u=f,c=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),c}},e.truncateZHString=A,e.unsanitize=function(e){return E(e)},e.unsanitizeInput=E,e.updateQueryParam=function(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t},e.waitTime=x,e.windowLoaded=function(e){void 0===e&&(e=90);var n,t=function(){},r=new Promise((function(e,r){t=e,n=r}));return"complete"===document.readyState?t("complete"):window.addEventListener("load",(function(){return t("load")})),setTimeout((function(){return n(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},e}({});
6
+ var mazey=function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},n.apply(this,arguments)};function t(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,u)}c((r=r.apply(e,n||[])).next())}))}function r(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(e,a)}catch(e){u=[6,e],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function i(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every((function(e){return t.includes(typeof e)}))?n({},e):JSON.parse(JSON.stringify(e))}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function u(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function c(e){return u(e)}function s(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function f(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function d(e){return void 0===e&&(e=5),f(e)}function l(e){void 0===e&&(e=3);var n=[g(),d(e||3)];return n[0]+n[1]}function g(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var p={type:"d"};function v(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function m(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function h(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return m.apply(void 0,o([e],n,!1))}function w(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function y(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function b(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function S(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function E(e){var n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&amp;|&lt;|&gt;|&quot;|&#x27;|&#x2F;)/g,(function(e){return n[e]}))}function T(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>n));c++)o+=a;return t.hasDot&&u>n&&(o+=t.dotText),o}return""}function A(e,n,t){return void 0===t&&(t=!1),T(e,n,{hasDot:t})}function x(e){return t(this,void 0,void 0,(function(){return r(this,(function(n){return[2,new Promise((function(n){setTimeout((function(){n(e)}),e)}))]}))}))}var O="";function C(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(e[a]===n[u]){var c=0;a>0&&u>0&&(c=o[a-1][u-1]),o[a][u]=c+1}var s=Array.prototype.concat.apply([],o);return Math.max.apply(Math,s)}function P(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(e[a]===n[u]){var c=0;a>0&&u>0&&(c=o[a-1][u-1]),o[a][u]=c+1}else{var s=[0,0],f=s[0],d=s[1];u>0&&(f=o[a][u-1]),a>0&&(d=o[a-1][u]),o[a][u]=Math.max(f,d)}var l=Array.prototype.concat.apply([],o);return Math.max.apply(Math,l)}function M(e){return Math.random()<e}function k(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function N(e){return e.replace(/^http:/,"https:")}function _(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}function j(e,n){void 0===e&&(e=""),void 0===n&&(n={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var t=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},n),r=t.isClosed,i=t.showWrap,a=t.showDate,u=t.locales,c=t.logFn,s=t.errorFn,f=Object.create(null),d=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(n){f[n]=function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];if(r)return!1;var f=e,l=e;if("string"==typeof e&&e.length>=2){var g=e.length;f=":"===e[g-1]?e.substring(0,g-1):e}i&&console.log("--- ".concat(f," - begin ---")),a&&(l=e?"".concat(d()," ").concat(e):"".concat(d())),e||a?console[n].apply(console,o([l],t,!1)):console[n].apply(console,t),"log"===n&&c(),"error"===n&&s(),i&&console.log("--- ".concat(f," - end ---"))}})),f}var R=j("[Mazey]");function B(e,n){if(e)if(Array.isArray(n))n.forEach((function(n){e.classList.add(n)}));else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else R.error("The element is not exist.")}function L(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each((function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&e.width(r[1]),o&&w(o)&&o[1]&&e.height(o[1])}}})),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach((function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&(n.style.width=r[1]),o&&w(o)&&o[1]&&(n.style.height=o[1])}}})),!0)}function F(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function D(e,t){void 0===t&&(t={});var r=F()[e];if(r instanceof Array)for(var o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&r[o](n(n({},t),{type:e}))}function U(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function I(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function z(e,n){void 0===n&&(n={id:"",callback:function(){},timeout:5e3,isDefer:!1});var t,r,o=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},n),i=o.id,a=o.callback,u=o.timeout,c=o.isDefer,s=document.createElement("script");s||Promise.reject("Not support create script element");var f=document.getElementsByTagName("script")[0];return s.type="text/javascript",c&&(s.defer=!0),i&&(s.id=i),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||(s.onreadystatechange=null,h(a),h(t,"loaded"))}:s.onload=function(){h(a),h(t,"loaded")},s.src=e,f&&f.parentNode.insertBefore(s,f),new Promise((function(e,n){var o;t=(o=[e,n])[0],r=o[1],u&&setTimeout(r.bind(null,"timeout"),u)}))}function q(e){var n=[],t=window.PerformanceObserver;return!!t&&(w(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function H(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-contentful-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}function Z(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-paint"===e.name}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"paint",buffered:!0})}))]:[2,0]}))}))}var V="";function W(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&w(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),e=n(n({},e),{system:i,appleType:a});var u="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?u="2000":r(/windows nt 5.1|windows xp/g)?u="xp":r(/windows nt 5.2|windows 2003/g)?u="2003":r(/windows nt 6.0|windows vista/g)?u="vista":r(/windows nt 6.1|windows 7/g)?u="7":r(/windows nt 6.2|windows 8/g)?u="8":r(/windows nt 6.3|windows 8.1/g)?u="8.1":r(/windows nt 10.0|windows 10/g)&&(u="10"):"macos"===i?u=o(/os x [\d._]+/g):"android"===i?u=o(/android [\d._]+/g):"ios"===i&&(u=o(/os [\d._]+/g)),e=n(n({},e),{systemVs:u});var c="";"windows"===i||"macos"===i||"linux"===i?c="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(c="mobile"),e=n(n({},e),{platform:c});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),e=n(n({},e),{engine:s,supporter:f});var d="";"webkit"===s?d=o(/applewebkit\/[\d._]+/g):"gecko"===s?d=o(/gecko\/[\d._]+/g):"presto"===s?d=o(/presto\/[\d._]+/g):"trident"===s&&(d=o(/trident\/[\d._]+/g)),e=n(n({},e),{engineVs:d});var l="";"chrome"===f?l=o(/chrome\/[\d._]+/g):"safari"===f?l=o(/version\/[\d._]+/g):"firefox"===f?l=o(/firefox\/[\d._]+/g):"opera"===f?l=o(/opr\/[\d._]+/g):"iexplore"===f?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=o(/edge\/[\d._]+/g)),e=n(n({},e),{supporterVs:l});var g="",p="";return r(/micromessenger/g)?(g="wechat",p=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(g="qq_browser",p=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?g="qq_app":r(/ucbrowser/g)?(g="uc",p=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?g="360":r(/2345explorer/g)?(g="2345",p=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?g="sougou":r(/lbbrowser/g)?g="liebao":r(/maxthon/g)?(g="maxthon",p=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(g="bilibili"),e=n(n({},e),{shell:g,shellVs:p}),window.MAZEY_BROWSER_INFO=e,e}catch(n){return R.warn(n),e}}var $="";return e.addClass=B,e.addEvent=function(e,n){var t=F();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)},e.addStyle=function(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0},e.calLongestCommonSubsequence=function(e,n){return P(e,n)},e.calLongestCommonSubstring=function(e,n){return C(e,n)},e.camelCase2Underscore=c,e.camelCaseToKebabCase=function(e){return a(e)},e.cancelBubble=function(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},e.clearHTML=function(e,n){return void 0===n&&(n={}),S(e,n)},e.clearHtml=function(e,n){return void 0===n&&(n={}),S(e,n)},e.convert10To26=function(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n},e.convertCamelToKebab=a,e.convertCamelToUnder=u,e.convertHttpToHttps=N,e.convertKebabToCamel=function(e){var n=e.replace(/-([a-z])/g,(function(e,n){return n.toUpperCase()}));return n.endsWith("-")?n.slice(0,-1):n},e.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)},e.convertToHtmlBreaks=b,e.cutCHSString=function(e,n,t){return void 0===t&&(t=!1),A(e,n,t)},e.cutZHString=T,e.debounce=function(e,n,t){var r=null,o=null,i=null,a=null,u=null,c=function c(){var s=g()-i;s<n&&s>=0?o=setTimeout(c,n-s):(o=null,t||(u=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=g();var d=t&&!o;return o||(o=setTimeout(c,n)),d&&(u=e.apply(r,a),r=a=null),u}},e.deepCopy=i,e.deepCopyObject=function(e){return i(e)},e.delCookie=function(e){I(e)},e.doFn=h,e.fireEvent=D,e.floatFixed=function(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)},e.floatToPercent=function(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")},e.formatDate=function(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach((function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))})),i},e.genBrowserAttrs=function(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=W(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach((function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}})),r},e.genCustomConsole=j,e.genHashCode=function(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t},e.genRndNumString=f,e.genStyleString=function(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")},e.genUniqueNumString=l,e.generateRndNum=d,e.generateUniqueNum=function(e){return void 0===e&&(e=3),l(e)},e.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""})),n},e.getBrowserInfo=W,e.getCLS=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("layout-shift")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().reduce((function(e,n){var t=0;return v(n.value)&&(t=n.value),e+t}),0);n.disconnect(),e(r)}));n.observe({type:"layout-shift",buffered:!0})}))]:[2,0]}))}))},e.getCookie=U,e.getCurrentVersion=function(){return"v4"},e.getDefineListeners=F,e.getDomain=function(e,n){if(void 0===n&&(n=["hostname"]),_(e)){var t=new window.URL(e);return n.reduce((function(e,n){return e+=t[n]}),"")}var r=document.createElement("a");return r.href=e,n.reduce((function(e,n){return e+=r[n]}),"")},e.getFCP=H,e.getFID=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("first-input")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"first-input"===e.entryType}));if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}}));n.observe({type:"first-input",buffered:!0})}))]:[2,0]}))}))},e.getFP=Z,e.getFileSize=function(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"},e.getFriendlyInterval=function(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=p);var r=(t=Object.assign(p,t)).type,o=decodeURIComponent;v(e)||(e=new Date(e).getTime()),v(n)||(n=new Date(n).getTime());var i=Number(n)-Number(e),a="",u=new Array(4).fill(0),c=u[0],s=(u[1],u[2],u[3]),f=o("%20%E5%A4%A9%20"),d=o("%20%E6%97%B6%20"),l=o("%20%E5%88%86%20"),g=o("%20%E7%A7%92");if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=c;break;case"text":a=(c=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+d+Math.floor(i/1e3/60%60)+l+(s=Math.floor(i/1e3%60))+g;break;default:a=s}return a},e.getHashQueryParam=function(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""},e.getLCP=function(){return t(this,void 0,void 0,(function(){return r(this,(function(e){return q("largest-contentful-paint")?[2,new Promise((function(e){var n=new PerformanceObserver((function(t){var r=t.getEntries().find((function(e){return"largest-contentful-paint"===e.entryType}));r&&(n.disconnect(),e(Math.round(r.startTime)))}));n.observe({type:"largest-contentful-paint",buffered:!0})}))]:[2,0]}))}))},e.getLocalStorage=function(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getPageMeta=function(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""},e.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,(function(){function n(){var n={source:D,os:t(),osVersion:o(),deviceType:i(),network:a(),screenDirection:u(),unloadTime:h-y,redirectTime:b-S,dnsTime:E-T,tcpTime:A-x,sslTime:s(A,O),responseTime:C-P,downloadTime:M-C,firstPaintTime:z,firstContentfulPaintTime:V,domReadyTime:k-U,onloadTime:N-U,whiteTime:C-U,renderTime:_-U,decodedBodySize:B,encodedBodySize:L};Object.keys(n).forEach((function(e){v(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))})),v(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var r={};e||Object.keys(n).forEach((function(e){r[c(e)]=n[e]})),Object.keys(r).length?d(r):d(n)}function t(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",u=n.match(/android/i)&&"android",c=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||u||c||s?r||o||i||a||u||c||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function u(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function s(e,n){var t=0;return n&&(t=e-n),t}var f,d,l,g,p,m,h,y,b,S,E,T,A,x,O,C,P,M,k,N,_,j,R,B,L,F,D,U,I,z,V;return r(this,(function(e){switch(e.label){case 0:if(!q("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(f=window.performance)||"function"!=typeof f.getEntries||"function"!=typeof f.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise((function(e){d=[e][0]})),g=null,w(p=f.getEntriesByType("navigation"))&&(g=p[0]),m=new Array(19).fill(0),h=m[0],y=m[1],b=m[2],S=m[3],E=m[4],T=m[5],A=m[6],x=m[7],O=m[8],C=m[9],P=m[10],M=m[11],k=m[12],N=m[13],_=m[14],j=m[15],R=m[16],B=m[17],L=m[18],F=f.timing,D="",g)D="PerformanceNavigationTiming",B=g.decodedBodySize,L=g.encodedBodySize,h=g.unloadEventEnd,y=g.unloadEventStart,b=g.redirectEnd,S=g.redirectStart,E=g.domainLookupEnd,T=g.domainLookupStart,A=g.connectEnd,x=g.connectStart,O=g.secureConnectionStart,C=g.responseStart,P=g.requestStart,M=g.responseEnd,k=g.domContentLoadedEventStart,N=g.loadEventStart,_=g.loadEventEnd,j=g.startTime,R=g.fetchStart;else{if(!F)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];D="PerformanceTiming",h=F.unloadEventEnd,y=F.unloadEventStart,b=F.redirectEnd,S=F.redirectStart,E=F.domainLookupEnd,T=F.domainLookupStart,A=F.connectEnd,x=F.connectStart,O=F.secureConnectionStart,C=F.responseStart,P=F.requestStart,M=F.responseEnd,k=F.domContentLoadedEventStart,N=F.loadEventStart,_=F.loadEventEnd,j=F.navigationStart,R=F.fetchStart}if(U=0,v(j))U=j;else{if(!v(R))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];U=R}return[4,Promise.all([Z(),H()])];case 1:return I=e.sent(),z=I[0],V=I[1],v(_)&&_>0?n():window.addEventListener("load",(function(){window.setTimeout((function(){n()}),0)})),[2,l]}}))}))},e.getQueryParam=function(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""},e.getScriptQueryParam=function(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""},e.getSessionStorage=function(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getTTFB=function(){return t(this,void 0,void 0,(function(){var e,n;return r(this,(function(t){return q("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]}))}))},e.getUrlFileType=function(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n},e.getUrlHost=function(e){var n="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).host),n},e.getUrlParam=function(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""})),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null},e.getUrlPath=function(e){var n="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).pathname),n},e.hasClass=function(e,n){if(!e)return R.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1},e.inRate=function(e){return M(e)},e.invokeEvent=function(e){D(e)},e.invokeFn=m,e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=function(){if(O)return"browser"===O;var e="undefined"!=typeof window;return e&&(O="browser"),e},e.isFunction=function(e){return"function"==typeof e},e.isHit=M,e.isJSONString=s,e.isJsonString=function(e){return s(e)},e.isNonEmptyArray=w,e.isNonEmptyObject=function(e){return!!y(e)&&0!==Object.keys(e).length},e.isNumber=v,e.isPureObject=y,e.isSafePWAEnv=function(){if(V)return"pwa"===V;var e=W();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell?(V="pwa",!0):(V="no-pwa",!1)},e.isString=function(e){return"string"==typeof e},e.isSupportWebp=function(){return $?Promise.resolve("webp"===$):new Promise((function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;$=t?"webp":"no-webp",e(t)},n.onerror=function(){$="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.isSupportedEntryType=q,e.isUdfOrNul=function(e){return null==e},e.isValidData=function(e,n,t){var r=!1;return"object"!=typeof e||n.reduce((function(e,n){return void 0===e[n]?Object.create(null):e=e[n]}),e)===t&&(r=!0),r},e.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.isValidHttpUrl=k,e.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},e.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)$/.test(e)},e.loadCSS=function(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise((function(e,n){var r;t=(r=[e,n])[0],o=r[1]})),a=function(){t("loaded")},u=document.createElement("link");u||o(new Error("Not support create link element"));var c="onload"in u,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(u.rel="stylesheet",u.type="text/css",u.href=e,void 0!==r&&(u.id=r),document.getElementsByTagName("head")[0].appendChild(u),s||!c)return setTimeout((function(){d(u,a,0)}),1),i;function f(){u&&(u.onload=u.onerror=u.onreadystatechange=null),u=null,a()}function d(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout((function(){r?n():d(e,n,t)}),20)}}return c?(u.onload=f,u.onerror=function(){f()}):u.onreadystatechange=function(){u&&/loaded|complete/.test(u.readyState)&&f()},i},e.loadImage=function(e){return new Promise((function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e}))},e.loadScript=z,e.loadScriptIfUndefined=function(e,n){return window[e]?Promise.resolve("defined"):z(n)},e.longestComSubsequence=P,e.longestComSubstring=C,e.mNow=g,e.mTrim=function(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)},e.mazeyCon=R,e.newLine=function(e){return b(e)},e.removeClass=function(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):R.error("The element is not exist.")},e.removeCookie=I,e.removeEvent=function(e,n){var t=F(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]},e.removeHTML=S,e.removeHtml=function(e,n){return void 0===n&&(n={}),S(e,n)},e.repeatUntilConditionMet=function(e,n,o){var i=this;void 0===n&&(n={}),void 0===o&&(o=function(e){return!0===e});var a=n.interval,u=void 0===a?1e3:a,c=n.times,s=void 0===c?10:c,f=n.context,d=n.args,l=0;"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),function n(){setTimeout((function(){return t(i,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,e.apply(f,d)];case 1:return t=r.sent(),o(t)||++l>=s?[2]:(n(),[2])}}))}))}),u)}()},e.replaceHttp=function(e){return N(e)},e.sanitizeInput=function(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,(function(e){return n[e]}))},e.setClass=function(e,n){B(e,n)},e.setCookie=function(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var u=location.host;1===u.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=u.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==U(e)&&U(e)===n||(r=r||"."+u,document.cookie=e+"="+n+i+"; path=/; domain="+r))},e.setImgSizeBySrc=L,e.setImgWidHeiBySrc=function(){return L()},e.setLocalStorage=function(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))},e.setSessionStorage=function(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))},e.sleep=function(e){return t(this,void 0,void 0,(function(){return r(this,(function(n){return[2,x(e)]}))}))},e.throttle=function(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],u=a[0],c=a[1],s=function(){c=!1===t.leading?0:g(),i=null,u=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var d=g();c||!1!==t.leading||(c=d);var l=n-(d-c);return r=this,o=a,l<=0||l>n?(i&&(clearTimeout(i),i=null),c=d,u=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),u}},e.truncateZHString=A,e.unsanitize=function(e){return E(e)},e.unsanitizeInput=E,e.updateQueryParam=function(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t},e.waitTime=x,e.windowLoaded=function(e){void 0===e&&(e=90);var n,t=function(){},r=new Promise((function(e,r){t=e,n=r}));return"complete"===document.readyState?t("complete"):window.addEventListener("load",(function(){return t("load")})),setTimeout((function(){return n(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},e}({});
package/lib/perf.d.ts CHANGED
@@ -23,7 +23,7 @@ export declare function isSupportedEntryType(name: string): boolean;
23
23
  * FCP: 123
24
24
  * ```
25
25
  *
26
- * @returns A promise that resolves with the FCP time in milliseconds, or 0 if the 'paint' entry type is not supported.
26
+ * @returns A promise that resolves with the FCP time in milliseconds, or 0 if the "paint" entry type is not supported.
27
27
  * @category Perf
28
28
  */
29
29
  export declare function getFCP(): Promise<number>;
@@ -47,7 +47,7 @@ export declare function getFCP(): Promise<number>;
47
47
  * FP: 123
48
48
  * ```
49
49
  *
50
- * @returns A promise that resolves with the FP time in milliseconds, or 0 if the 'paint' entry type is not supported.
50
+ * @returns A promise that resolves with the FP time in milliseconds, or 0 if the "paint" entry type is not supported.
51
51
  * @category Perf
52
52
  */
53
53
  export declare function getFP(): Promise<number>;
@@ -71,7 +71,7 @@ export declare function getFP(): Promise<number>;
71
71
  * LCP: 123
72
72
  * ```
73
73
  *
74
- * @returns A promise that resolves with the LCP time in milliseconds, or 0 if the 'largest-contentful-paint' entry type is not supported.
74
+ * @returns A promise that resolves with the LCP time in milliseconds, or 0 if the "largest-contentful-paint" entry type is not supported.
75
75
  * @category Perf
76
76
  */
77
77
  export declare function getLCP(): Promise<number>;
@@ -95,7 +95,7 @@ export declare function getLCP(): Promise<number>;
95
95
  * FID: 123
96
96
  * ```
97
97
  *
98
- * @returns A promise that resolves with the FID in milliseconds, or 0 if the 'first-input' entry type is not supported.
98
+ * @returns A promise that resolves with the FID in milliseconds, or 0 if the "first-input" entry type is not supported.
99
99
  * @category Perf
100
100
  */
101
101
  export declare function getFID(): Promise<number>;
@@ -119,7 +119,7 @@ export declare function getFID(): Promise<number>;
119
119
  * CLS: 123
120
120
  * ```
121
121
  *
122
- * @returns A promise that resolves with the CLS score, or 0 if the 'layout-shift' entry type is not supported.
122
+ * @returns A promise that resolves with the CLS score, or 0 if the "layout-shift" entry type is not supported.
123
123
  * @category Perf
124
124
  */
125
125
  export declare function getCLS(): Promise<number>;
package/lib/store.d.ts CHANGED
@@ -6,14 +6,14 @@
6
6
  * Usage:
7
7
  *
8
8
  * ```javascript
9
- * setSessionStorage('test', '123');
10
- * const ret1 = getSessionStorage('test');
11
- * setLocalStorage('test', '123');
12
- * const ret2 = getLocalStorage('test');
9
+ * setSessionStorage("test", "123");
10
+ * const ret1 = getSessionStorage("test");
11
+ * setLocalStorage("test", "123");
12
+ * const ret2 = getLocalStorage("test");
13
13
  * console.log(ret1, ret2);
14
14
  *
15
15
  * // or package in usage
16
- * const projectName = 'mazey';
16
+ * const projectName = "mazey";
17
17
  * function mSetLocalStorage (key, value) {
18
18
  * return setLocalStorage(`${projectName}_${key}`, value);
19
19
  * }
@@ -42,14 +42,14 @@ export declare function setSessionStorage<T>(key: string, value?: T | null): voi
42
42
  * Usage:
43
43
  *
44
44
  * ```javascript
45
- * setSessionStorage('test', '123');
46
- * const ret1 = getSessionStorage('test');
47
- * setLocalStorage('test', '123');
48
- * const ret2 = getLocalStorage('test');
45
+ * setSessionStorage("test", "123");
46
+ * const ret1 = getSessionStorage("test");
47
+ * setLocalStorage("test", "123");
48
+ * const ret2 = getLocalStorage("test");
49
49
  * console.log(ret1, ret2);
50
50
  *
51
51
  * // or package in usage
52
- * const projectName = 'mazey';
52
+ * const projectName = "mazey";
53
53
  * function mSetLocalStorage (key, value) {
54
54
  * return setLocalStorage(`${projectName}_${key}`, value);
55
55
  * }
@@ -78,14 +78,14 @@ export declare function getSessionStorage<T>(key: string): T | null;
78
78
  * Usage:
79
79
  *
80
80
  * ```javascript
81
- * setSessionStorage('test', '123');
82
- * const ret1 = getSessionStorage('test');
83
- * setLocalStorage('test', '123');
84
- * const ret2 = getLocalStorage('test');
81
+ * setSessionStorage("test", "123");
82
+ * const ret1 = getSessionStorage("test");
83
+ * setLocalStorage("test", "123");
84
+ * const ret2 = getLocalStorage("test");
85
85
  * console.log(ret1, ret2);
86
86
  *
87
87
  * // or package in usage
88
- * const projectName = 'mazey';
88
+ * const projectName = "mazey";
89
89
  * function mSetLocalStorage (key, value) {
90
90
  * return setLocalStorage(`${projectName}_${key}`, value);
91
91
  * }
@@ -114,14 +114,14 @@ export declare function setLocalStorage<T>(key: string, value?: T | null): void;
114
114
  * Usage:
115
115
  *
116
116
  * ```javascript
117
- * setSessionStorage('test', '123');
118
- * const ret1 = getSessionStorage('test');
119
- * setLocalStorage('test', '123');
120
- * const ret2 = getLocalStorage('test');
117
+ * setSessionStorage("test", "123");
118
+ * const ret1 = getSessionStorage("test");
119
+ * setLocalStorage("test", "123");
120
+ * const ret2 = getLocalStorage("test");
121
121
  * console.log(ret1, ret2);
122
122
  *
123
123
  * // or package in usage
124
- * const projectName = 'mazey';
124
+ * const projectName = "mazey";
125
125
  * function mSetLocalStorage (key, value) {
126
126
  * return setLocalStorage(`${projectName}_${key}`, value);
127
127
  * }
@@ -150,8 +150,8 @@ export declare function getLocalStorage<T>(key: string): T | null;
150
150
  * Usage:
151
151
  *
152
152
  * ```javascript
153
- * setCookie('test', '123', 30, 'example.com'); // key value day domain
154
- * const ret = getCookie('test');
153
+ * setCookie("test", "123", 30, "example.com"); // key value day domain
154
+ * const ret = getCookie("test");
155
155
  * console.log(ret);
156
156
  * ```
157
157
  *
@@ -172,8 +172,8 @@ export declare function getCookie(name: string): string;
172
172
  * Usage:
173
173
  *
174
174
  * ```javascript
175
- * setCookie('test', '123', 30, 'example.com'); // key value day domain
176
- * const ret = getCookie('test');
175
+ * setCookie("test", "123", 30, "example.com"); // key value day domain
176
+ * const ret = getCookie("test");
177
177
  * console.log(ret);
178
178
  * ```
179
179
  *
@@ -192,7 +192,7 @@ export declare function setCookie(name: string, value: string, days?: number, do
192
192
  * Usage:
193
193
  *
194
194
  * ```javascript
195
- * const ret = removeCookie('test');
195
+ * const ret = removeCookie("test");
196
196
  * console.log(ret);
197
197
  * ```
198
198
  *