!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.DisableDevtool=e():n.DisableDevtool=e()}(this,(function(){return function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){"use strict";function o(n){return-1!==navigator.userAgent.toLocaleLowerCase().indexOf(n)}t.r(e);var r=function(){try{return window.self!==window.top}catch(n){return!0}}(),i=o("qqbrowser"),u=o("firefox"),c=o("macintosh"),a=o("edge"),l=a&&!o("chrome")||o("trident")||o("msie"),f=o("crios");var d=!1;var v,s={};for(var w in T)s[T[w]]=!1;function p(n){s[n]=!0}function m(n){s[n]=!1}function y(){for(var n in s)if(s[n])return d=!0,!0;return d=!1,!1}function b(){var n=function(){if(h(window.devicePixelRatio))return window.devicePixelRatio;var n=window.screen;if(h(n))return!1;if(n.deviceXDPI&&n.logicalXDPI)return n.deviceXDPI/n.logicalXDPI;return!1}();if(!1===n)return!0;var e=T.SIZE,t=window.outerWidth-window.innerWidth*n>200,o=window.outerHeight-window.innerHeight*n>300;return t||o?(D(e),!1):(m(e),!0)}function h(n){return null!=n}function g(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var T={UNKONW:-1,REG_TO_STRING:0,DEFINE_ID:1,SIZE:2,DATE_TO_STRING:3,FUNC_TO_STRING:4,DEBUGGER:5},E=(g(v={},T.REG_TO_STRING,(function(){var n=i,e=u;if(n||e){var t=T.REG_TO_STRING,o=0,r=/./;K(r),r.toString=function(){if(n){var r=(new Date).getTime();o&&r-o<100?D(t):o=r}else e&&D(t);return""},R(t,(function(){K(r)}))}})),g(v,T.DEFINE_ID,(function(){var n=T.DEFINE_ID,e=document.createElement("div");e.__defineGetter__("id",(function(){D(n)})),Object.defineProperty(e,"id",{get:function(){D(n)}}),R(n,(function(){K(e)}))})),g(v,T.SIZE,(function(){r?console.warn("SizeDetector is disabled in IFrame"):a?console.warn("SizeDetector is disabled in Edge"):(b(),window.addEventListener("resize",(function(){setTimeout(b,100)}),!0))})),g(v,T.DATE_TO_STRING,(function(n){if(!n){var e=T.DATE_TO_STRING,t=0,o=new Date;o.toString=function(){return t++,""};R(e,(function(){t=0,K(o),H(),t>=2&&D(e)}))}})),g(v,T.FUNC_TO_STRING,(function(n){if(!n){var e=T.FUNC_TO_STRING,t=0,o=function(){};o.toString=function(){return t++,""};R(e,(function(){t=0,K(o),H(),t>=2&&D(e)}))}})),g(v,T.DEBUGGER,(function(n){if(n){var e=T.DEBUGGER;R(e,(function(){var n=Date.now();Date.now()-n>100&&D(e)}))}})),v);function D(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T.UNKONW;console.warn("You ar not allow to use DEVTOOL! 【type = ".concat(n,"】")),L.clearIntervalWhenDevOpenTrigger&&x(),j(),L.ondevtoolopen(n,P),p(n)}function I(){if("function"==typeof L.ondevtoolclose){var n=d;!y()&&n&&L.ondevtoolclose()}}var O=null,S=null,_=[],G=0;function N(){var n,e,t,o,r,i,u=!1,c=function(){u=!0},a=function(){u=!1};n=c,e=a,t=window.alert,o=window.confirm,r=window.prompt,i=function(t){return function(){n&&n(),t.apply(void 0,arguments),e&&e()}},window.alert=i(t),window.confirm=i(o),window.prompt=i(r),function(n,e){var t,o,r;void 0!==document.hidden?(t="hidden",r="visibilitychange",o="visibilityState"):void 0!==document.mozHidden?(t="mozHidden",r="mozvisibilitychange",o="mozVisibilityState"):void 0!==document.msHidden?(t="msHidden",r="msvisibilitychange",o="msVisibilityState"):void 0!==document.webkitHidden&&(t="webkitHidden",r="webkitvisibilitychange",o="webkitVisibilityState");var i=function(){document[o]===t?e():n()};document.removeEventListener(r,i,!1),document.addEventListener(r,i,!1)}(a,c),O=window.setInterval((function(){u||(_.forEach((function(n){var e=n.type,t=n.handle;m(e),t(G++)})),H(),I())}),L.interval),S=setTimeout((function(){/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())&&x()}),L.stopIntervalTime)}function R(n,e){_.push({type:n,handle:e})}function x(){window.clearInterval(O)}function j(){window.clearTimeout(S)}function P(){if(x(),L.url)window.location.href=L.url;else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(n){console.log(n)}setTimeout((function(){window.location.href="https://tackchen.gitee.io/404.html?h=".concat(encodeURIComponent(location.host))}),500)}}function k(n){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var L={md5:"",ondevtoolopen:P,ondevtoolclose:null,url:"",tkName:"ddtk",interval:200,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:"all",clearLog:!0},A=["detectors","ondevtoolclose"];function U(){"function"==typeof L.ondevtoolclose&&!0===L.clearIntervalWhenDevOpenTrigger&&(L.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}var C=window.console||{log:function(){}},K=l?function(){return C.log.apply(C,arguments)}:C.log,W=l?function(){return C.clear()}:C.clear;function H(){L.clearLog&&W()}function z(n,e,t,o,r,i){return X((u=X(X(e,n),X(o,i)))<<(c=r)|u>>>32-c,t);var u,c}function F(n,e,t,o,r,i,u){return z(e&t|~e&o,n,e,r,i,u)}function V(n,e,t,o,r,i,u){return z(e&o|t&~o,n,e,r,i,u)}function M(n,e,t,o,r,i,u){return z(e^t^o,n,e,r,i,u)}function B(n,e,t,o,r,i,u){return z(t^(e|~o),n,e,r,i,u)}function X(n,e){var t=(65535&n)+(65535&e);return(n>>16)+(e>>16)+(t>>16)<<16|65535&t}var q=function(n){return function(n){for(var e="0123456789abcdef",t="",o=0;o<4*n.length;o++)t+=e.charAt(n[o>>2]>>o%4*8+4&15)+e.charAt(n[o>>2]>>o%4*8&15);return t}(function(n,e){n[e>>5]|=128<>>9<<4)]=e;for(var t=1732584193,o=-271733879,r=-1732584194,i=271733878,u=0;u>5]|=(255&n.charCodeAt(t/8))<0&&void 0!==arguments[0]?arguments[0]:{};for(var e in L)void 0===n[e]||k(L[e])!==k(n[e])&&-1===A.indexOf(e)||(L[e]=n[e]);U()}(n),function(){if(L.md5){var n=function(n){var e=window.location.search,t=window.location.hash;if(""===e&&""!==t&&(e="?".concat(t.split("?")[1])),""!==e&&void 0!==e){var o=new RegExp("(^|&)"+n+"=([^&]*)(&|$)","i"),r=e.substr(1).match(o);if(null!=r)return unescape(r[2])}return""}(L.tkName);if(q(n)===L.md5)return!0}return!1}())||(N(),e=73,t=85,o=83,r=123,i=c?function(n,t){return n.metaKey&&n.altKey&&t===e}:function(n,t){return n.ctrlKey&&n.shiftKey&&t===e},u=c?function(n,e){return n.metaKey&&n.altKey&&e===t||n.metaKey&&e===o}:function(n,e){return n.ctrlKey&&(e===o||e===t)},window.addEventListener("keydown",(function(n){var e=(n=n||window.event).keyCode||n.which;if(e===r||i(n,e)||u(n,e))return n.returnValue=!1,n.preventDefault(),!1}),!0),L.disableMenu&&window.addEventListener("contextmenu",(function(n){return(n=n||window.event).returnValue=!1,n.preventDefault(),!1}),!0),a="all"===L.detectors?Object.keys(E):L.detectors,f&&a.push(T.DEBUGGER),a.forEach((function(n){E[n]&&E[n](f)})))}Z.md5=q,Z.version="0.2.3",Z.DETECTOR_TYPE=T,Z.isDevToolOpened=y,function(){if("undefined"!=typeof document){var n=document.querySelector("[disable-devtool-auto]");if(n){var e={};["md5","url","tk-name","interval","disable-menu","detectors"].forEach((function(t){var o=n.getAttribute(t);null!==o&&("interval"===t?o=parseInt(o):"disable-menu"===t?o="false"!==o:"detector"===t&&"all"!==o&&(o=o.split(" ")),e[function(n){if(-1===n.indexOf("-"))return n;var e=!1;return n.split("").map((function(n){return"-"===n?(e=!0,""):e?(e=!1,n.toUpperCase()):n})).join("")}(t)]=o)})),Z(e)}}}();e.default=Z}]).default}));