!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")&&!o("chrome")||o("trident")||o("msie"),f=o("crios"),l=window.console||{log:function(){}},d=a?function(){return l.log.apply(l,arguments)}:l.log,v=a?function(){return l.clear()}:l.clear;var s=!1;var w,p={};for(var m in D)p[D[m]]=!1;function y(n){p[n]=!0}function b(n){p[n]=!1}function h(){for(var n in p)if(p[n])return s=!0,!0;return s=!1,!1}function g(){var n=function(){if(T(window.devicePixelRatio))return window.devicePixelRatio;var n=window.screen;if(T(n))return!1;if(n.deviceXDPI&&n.logicalXDPI)return n.deviceXDPI/n.logicalXDPI;return!1}();if(!1===n)return!0;var e=D.SIZE,t=window.outerWidth-window.innerWidth*n>200,o=window.outerHeight-window.innerHeight*n>300;return t||o?(O(e),!1):(b(e),!0)}function T(n){return null!=n}function E(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var D={UNKONW:-1,REG_TO_STRING:0,DEFINE_ID:1,SIZE:2,DATE_TO_STRING:3,FUNC_TO_STRING:4,DEBUGGER:5},I=(E(w={},D.REG_TO_STRING,(function(){var n=i,e=u;if(n||e){var t=D.REG_TO_STRING,o=0,r=/./;d(r),r.toString=function(){if(n){var r=(new Date).getTime();o&&r-o<100?O(t):o=r}else e&&O(t);return""},j(t,(function(){d(r)}))}})),E(w,D.DEFINE_ID,(function(){var n=D.DEFINE_ID,e=document.createElement("div");e.__defineGetter__("id",(function(){O(n)})),Object.defineProperty(e,"id",{get:function(){O(n)}}),j(n,(function(){d(e)}))})),E(w,D.SIZE,(function(){r?console.warn("SizeDetector is disabled in IFrame"):(g(),window.addEventListener("resize",(function(){setTimeout(g,100)}),!0))})),E(w,D.DATE_TO_STRING,(function(n){if(!n){var e=D.DATE_TO_STRING,t=0,o=new Date;o.toString=function(){return t++,""};j(e,(function(){t=0,d(o),v(),t>=2&&O(e)}))}})),E(w,D.FUNC_TO_STRING,(function(n){if(!n){var e=D.FUNC_TO_STRING,t=0,o=function(){};o.toString=function(){return t++,""};j(e,(function(){t=0,d(o),v(),t>=2&&O(e)}))}})),E(w,D.DEBUGGER,(function(n){if(n){var e=D.DEBUGGER;j(e,(function(){var n=Date.now();Date.now()-n>100&&O(e)}))}})),w);function O(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D.UNKONW;console.warn("You ar not allow to use DEVTOOL! 【type = ".concat(n,"】")),U.clearIntervalWhenDevOpenTrigger&&P(),k(),U.ondevtoolopen(n,A),y(n)}function _(){if("function"==typeof U.ondevtoolclose){var n=s;!h()&&n&&U.ondevtoolclose()}}var S=null,G=null,N=[],R=0;function x(){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),S=window.setInterval((function(){u||(N.forEach((function(n){var e=n.type,t=n.handle;b(e),t(R++)})),v(),_())}),U.interval),G=setTimeout((function(){/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())&&P()}),U.stopIntervalTime)}function j(n,e){N.push({type:n,handle:e})}function P(){window.clearInterval(S)}function k(){window.clearTimeout(G)}function A(){if(P(),U.url)window.location.href=U.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 L(n){return(L="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 U={md5:"",ondevtoolopen:A,ondevtoolclose:null,url:"",tkName:"ddtk",interval:200,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:"all"},C=["detectors","ondevtoolclose"];function K(){"function"==typeof U.ondevtoolclose&&!0===U.clearIntervalWhenDevOpenTrigger&&(U.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function W(n,e,t,o,r,i){return M((u=M(M(e,n),M(o,i)))<<(c=r)|u>>>32-c,t);var u,c}function H(n,e,t,o,r,i,u){return W(e&t|~e&o,n,e,r,i,u)}function F(n,e,t,o,r,i,u){return W(e&o|t&~o,n,e,r,i,u)}function V(n,e,t,o,r,i,u){return W(e^t^o,n,e,r,i,u)}function z(n,e,t,o,r,i,u){return W(t^(e|~o),n,e,r,i,u)}function M(n,e){var t=(65535&n)+(65535&e);return(n>>16)+(e>>16)+(t>>16)<<16|65535&t}var B=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 U)void 0===n[e]||L(U[e])!==L(n[e])&&-1===C.indexOf(e)||(U[e]=n[e]);K()}(n),function(){if(U.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""}(U.tkName);if(B(n)===U.md5)return!0}return!1}())||(x(),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),U.disableMenu&&window.addEventListener("contextmenu",(function(n){return(n=n||window.event).returnValue=!1,n.preventDefault(),!1}),!0),a="all"===U.detectors?Object.keys(I):U.detectors,f&&a.push(D.DEBUGGER),a.forEach((function(n){I[n]&&I[n](f)})))}X.md5=B,X.version="0.2.2",X.DETECTOR_TYPE=D,X.isDevToolOpened=h,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)})),X(e)}}}();e.default=X}]).default}));