text: /**
   * js-toolkits v1.1.9
   * (c) 2019-2020 weijhfly https://github.com/weijhfly/js-toolkits
   * Licensed under MIT
   * Released on: oct 21, 2019
   */
  
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).tks=t()}(this,function(){"use strict";var t=(e.prototype.isSupport=function(){return this.isCookie()?document.cookie&&navigator.cookieEnabled:void 0!==window[this.type]},e.prototype.get=function(e,t){try{var n=e.split(","),r=this.master(n,"get");return t?(t.apply(this,r),this):1<n.length?r:r[0]||null}catch(e){return console.error(e),null}},e.prototype.set=function(e,t,n){try{var r={};"object"!=typeof e?r[e]=t:(n=t,r=e),this.master(r,"set",n),this.success()}catch(e){console.error(e),this.fail()}return this},e.prototype.remove=function(e){try{var t=e.split(",");this.master(t,"remove")}catch(e){console.error(e)}return this},e.prototype.clear=function(){try{if(this.isCookie()){var e=document.cookie.split(";").map(function(e){return e.substr(0,e.indexOf("="))});this.master(e,"remove")}else window[this.type].clear()}catch(e){console.error(e)}return this},e.prototype.setType=function(e){return e=e||0,this.type=["sessionStorage","localStorage","cookie"][e]||e,this},e.prototype.master=function(e,t,n){var o=[],i=this.isCookie(),u=this;if("get"==t){for(var r in e)c(e[r]);return o}if("set"==t)for(var r in e)s(r,e[r],n);else if("remove"==t)for(var r in e)a(e[r]);function c(e){if(i){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=document.cookie.match(t),r=n?unescape(n[2]):null;o.push(u.isJson(r)||r)}else r=window[u.type].getItem(e),o.push(u.isJson(r)||r)}function s(e,t,n){if(t="object"==typeof t?JSON.stringify(t):t,i){n=n||72e5;var r=new Date;r.setTime(r.getTime()+n),document.cookie=e+"="+escape(t)+";expires="+r.toUTCString()}else window[u.type].setItem(e,t)}function a(e){if(i){var t=new Date,n=u.get(e);t.setTime(t.getTime()-1),null!=n&&(document.cookie=e+"="+n+";expires="+t.toUTCString())}else window[u.type].removeItem(e)}},e.prototype.isJson=function(e){var t;try{t=JSON.parse(e)}catch(e){return!1}return t},e.prototype.isCookie=function(){return"cookie"===this.type},e);function e(e,t){this.success="object"==typeof t?t.success:function(){},this.fail="object"==typeof t?t.fail:function(){},this.setType(e)}function p(e){return"function"==typeof e&&"number"!=typeof e.nodeType}var l,i,n=Object.prototype.hasOwnProperty,y="undefined"!=typeof Symbol?Symbol.prototype:null,h=Object.keys;l=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"==o||"object"==o||"object"==typeof t)&&i(e,t,n,r)},i=function(e,t,n,r){var o=toString.call(e);if(o!==toString.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return y.valueOf.call(e)===y.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(p(u)&&u instanceof u&&p(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var s=(n=n||[]).length;s--;)if(n[s]===e)return r[s]===t;if(n.push(e),r.push(t),i){if((s=e.length)!==t.length)return!1;for(;s--;)if(!l(e[s],t[s],n,r))return!1}else{var a=h(e),f=void 0;if(s=a.length,h(t).length!==s)return!1;for(;s--;)if(f=a[s],!d.has(t,f)||!l(e[f],t[f],n,r))return!1}return n.pop(),r.pop(),!0};var d={trim:function(e,t){return t?e.replace(/\s+/g,""):e.replace(/^\s+|\s+$/g,"")},each:function(e,t){var n,r=0;if(function(e){var t=!!e&&"length"in e&&e.length;return!p(e)&&!function(e){return null!=e&&e===e.window}(e)&&("[object Array]"===toString.call(e)||0===t||"number"==typeof t&&0<t&&t-1 in e)}(e))for(n=e.length;r<n&&!1!==t.call(e[r],e[r],r);r++);else for(r in e)if(!1===t.call(e[r],e[r],r))break;return e},get:function(){var e,t=arguments,n=t.length,r=(e=(e=1==n||0==n?location.href:t[0]).substring(e.indexOf("?")+1)).split("&"),i={};return this.each(r,function(e,t){if(-1!=e.indexOf("=")){var n=e.split("="),r=decodeURIComponent(n[0]),o=decodeURIComponent(n[1]);i[r]=o}}),1==n||2==n&&!0!==t[1]?i[1==n?t[0]:t[1]]||"":i},param:function(e){var n=[];return this.each(e,function(e,t){e=encodeURIComponent(null==e?"":e),t=encodeURIComponent(t),n.push(t+"="+e)}),n.join("&")},test:function(e,t){switch(e){case"phone":return/^1[3456789]\d{9}$/.test(t);case"email":return/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(t);case"json":if("string"!=typeof t)return!1;try{return JSON.parse(t),!0}catch(e){return!1}default:return!1}},storage:function(e){return new t(e)},min:function(e){return Math.min.apply(null,e)},max:function(e){return Math.max.apply(null,e)},sort:function(e,n){return e.sort(function(e,t){return e<t?n?1:-1:t<e?n?-1:1:0})},has:function(e,t){return n.call(e,t)},eq:function(e,t){return l(e,t)},ajaxSetup:{before:function(e,t){},after:function(e,t,n){},error:function(e,t,n){}},ajax:function(n){var r,e,o={type:"get",url:"",async:!0,data:null,headers:{},timeout:0,dataType:"json",success:function(){},error:function(){}},t=this;if(t.each(o,function(e,t){o[t]=n[t]||e}),window.XMLHttpRequest)r=new XMLHttpRequest;else{if(!window.ActiveXObject)return c("not support ajax"),!1;r=new ActiveXObject("Microsoft.XMLHTTP")}if(t.ajaxSetup.before&&!1===t.ajaxSetup.before(o,r))return!1;if(o.type=o.type.toUpperCase(),r.timeout=o.timeout,r.responseType=o.dataType,o.data&&o.data.toString&&"[object Object]"==o.data.toString()&&(e=t.param(o.data)),"GET"==o.type){var i=o.url+(e?(-1==o.url.indexOf("?")?"?":"&")+e:"");r.open(o.type,i,o.async),u(),r.send(null)}else"POST"==o.type&&(r.open(o.type,o.url,o.async),u(),r.send(e));function u(){o.headers["X-Requested-With"]="XMLHttpRequest","POST"==o.type&&(o.headers["Content-Type"]="application/x-www-form-urlencoded;charset=utf-8"),t.each(o.headers,function(e,t){r.setRequestHeader(t,e)})}function c(e){if(t.ajaxSetup.error&&!1===t.ajaxSetup.error(e,o,r))return!1;o.error(e,o,r)}r.onreadystatechange=function(){4==r.readyState&&(200==r.status?function(){if(t.ajaxSetup.after){if(!1===t.ajaxSetup.after(r.response,o,r))return}o.success(r.response,o,r)}():c(r.status))},r.ontimeout=function(){c("timeout")}},version:"1.1.9"};return d});
  