From 949959965ec50814f96bc44aedc721387307cc1f Mon Sep 17 00:00:00 2001 From: Maiz Date: Thu, 14 Jan 2021 14:50:25 +0800 Subject: [PATCH] feat: v3.4.0 released --- CHANGELOG.md | 9 +++++---- CHANGELOG_CN.md | 21 +++++++++++++++++++++ dist/vconsole.min.js | 4 ++-- package.json | 2 +- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 343dfcb7..c3069bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,15 @@ English | [简体中文](./CHANGELOG_CN.md) -#### V3.4.0 (2020-12-xx) +#### V3.4.0 (2021-01-14) -- [FEATURE] Add darkmode theme. (by @progrape) +- [FEATURE] Add darkmode theme, see `vConsole.option.theme` in [Public Properties & Methods](./doc/public_properties_methods.md). (by @progrape) - [FEATURE] Add `fetch` log in Network tab. (by @weiqian93) - [FEATURE] Add Request Headers to Network tab. - [FEATURE] Use short URL and display parameters in Network tab. (issue #291) -- [FEATURE] New plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg) -- [FEATURE] Add safe area to switch button. (issue #353) - [FEATURE] Add `Location` info to System tab. (issue #343) +- [FEATURE] Add safe area to switch button. (issue #353) - [FEATURE] Auto move input cursor to the bracket after autocomplete command. (issue #293) +- [FEATURE] New plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg) - [FIX] The position of the switch button will be reset by mistake when clicked. - [FIX] Fix `document.documentElement.offsetHeight|offsetWidth` is unreliable in newer browsers. (by @littlee) - [FIX] Prevent dispatchEvent for disabled or readOnly elements. (by @norux) @@ -20,6 +20,7 @@ English | [简体中文](./CHANGELOG_CN.md) - [FIX] Show all enumerable and unenumerable properties. (issue #327) - [IMPROVE] Update Webpack DevServer option. (by @QinZhen001) + #### V3.3.4 (2019-08-19) - [FEATURE] Add `%c` log format to support custom log style, see [Tutorial](./doc/tutorial.md) for more details. diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 932ee822..087d91ad 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,5 +1,26 @@ [English](./CHANGELOG.md) | 简体中文 +#### V3.4.0 (2021-01-14) + +- 【特性】支持暗黑模式,配置项 `vConsole.option.theme` 见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。(by @progrape) +- 【特性】Network 面板支持 `fetch` 网络记录。(by @weiqian93) +- 【特性】Network 面板支持显示 Request Headers。 +- 【特性】Network 面板仅显示简短网址,URL 参数将显示在详细信息中。(issue #291) +- 【特性】System 面板增加显示 `Location` 信息。(issue #343) +- 【特性】开关按钮加入拖拽安全区,避免遮挡全面屏手机底部操作区。(issue #353) +- 【特性】指令输入框键入括号且自动补全括号后,光标将自动移动到括号内部。(issue #293) +- 【特性】新第三方插件 [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats)。(by @smackgg) +- 【修复】修复点击开关按钮后位置会被重置的问题。 +- 【修复】修复 `document.documentElement.offsetHeight|offsetWidth` 在新浏览器中不够准确的问题。(by @littlee) +- 【修复】阻止用户事件派发到 readOnly 或 disabled 的 element 上。(by @norux) +- 【修复】修复 nonce 查找不准确的问题。(by @sunderls) +- 【修复】修复一个安全问题。(#345 by @QiAnXinCodeSafe) +- 【修复】屏蔽 "webkitStorageInfo deprecation" 告警。 +- 【修复】删除 `Symbol`、`Array.from` polyfill。(issue #325, #275) +- 【修复】日志中显示对象内所有的 enumerable 和 unenumerable 属性。 (issue #327) +- 【优化】更新 Webpack DevServer 的配置项。(by @QinZhen001) + + #### V3.3.4 (2019-08-19) - 【特性】增加 `%c` 以支持自定义日志样式,详情见 [使用教程](./doc/tutorial_CN.md)。 diff --git a/dist/vconsole.min.js b/dist/vconsole.min.js index b7ae9dac..9c54a6e4 100644 --- a/dist/vconsole.min.js +++ b/dist/vconsole.min.js @@ -1,5 +1,5 @@ /*! - * vConsole v3.4.0-alpha (https://github.com/Tencent/vConsole) + * vConsole v3.4.0 (https://github.com/Tencent/vConsole) * * Tencent is pleased to support the open source community by making vConsole available. * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. @@ -7,4 +7,4 @@ * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("VConsole",[],t):"object"==typeof exports?exports.VConsole=t():e.VConsole=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return"[object Number]"==Object.prototype.toString.call(e)}function o(e){return"[object String]"==Object.prototype.toString.call(e)}function r(e){return"[object Array]"==Object.prototype.toString.call(e)}function i(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function a(e){return void 0===e}function l(e){return null===e}function c(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function s(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&(n(e)||o(e)||i(e)||r(e)||l(e)||u(e)||a(e)||c(e)))}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function d(e){var t=Object.prototype.toString.call(e);return"[object global]"==t||"[object Window]"==t||"[object DOMWindow]"==t}function f(e){if(!s(e)&&!r(e))return[];var t=[];for(var n in e)t.push(n);return t.sort()}Object.defineProperty(e,"__esModule",{value:!0}),e.getDate=function(e){var t=e>0?new Date(e):new Date,n=t.getDate()<10?"0"+t.getDate():t.getDate(),o=t.getMonth()<9?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getFullYear(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),a=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=t.getMilliseconds()<10?"0"+t.getMilliseconds():t.getMilliseconds();return c<100&&(c="0"+c),{time:+t,year:r,month:o,day:n,hour:i,minute:a,second:l,millisecond:c}},e.isNumber=n,e.isString=o,e.isArray=r,e.isBoolean=i,e.isUndefined=a,e.isNull=l,e.isSymbol=c,e.isObject=s,e.isFunction=u,e.isElement=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":t(HTMLElement))?e instanceof HTMLElement:e&&"object"===t(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.isWindow=d,e.isPlainObject=function(e){var n,o=Object.prototype.hasOwnProperty;if(!e||"object"!==t(e)||e.nodeType||d(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(n in e);return void 0===n||o.call(e,n)},e.htmlEncode=function(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML},e.JSONStringify=function(e){if(!s(e)&&!r(e))return JSON.stringify(e);var t="{",n="}";r(e)&&(t="[",n="]");for(var o=t,i=f(e),a=0;a-1||(r.push(t),e[n].className=r.join(" "))}}},removeClass:function(e,t){if(e){(0,o.isArray)(e)||(e=[e]);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"newPlugin";o(this,e),this.id=t,this.name=n,this.isReady=!1,this.eventList={}}var t,n,i;return t=e,(n=[{key:"on",value:function(e,t){return this.eventList[e]=t,this}},{key:"trigger",value:function(e,t){if("function"==typeof this.eventList[e])this.eventList[e].call(this,t);else{var n="on"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[n]&&this[n].call(this,t)}return this}},{key:"id",get:function(){return this._id},set:function(e){if(!e)throw"Plugin ID cannot be empty";this._id=e.toLowerCase()}},{key:"name",get:function(){return this._name},set:function(e){if(!e)throw"Plugin name cannot be empty";this._name=e}},{key:"vConsole",get:function(){return this._vConsole||void 0},set:function(e){if(!e)throw"vConsole cannot be empty";this._vConsole=e}}])&&r(t.prototype,n),i&&r(t,i),e}();n.default=i,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(0),n(1),n(2),n(18),n(19),n(20)],void 0===(i="function"==typeof(o=function(n,o,r,i,a,l,c){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n=n.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)}));for(var o=0;o-1&&g.splice(e,1)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.autoScrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.autoScrollToBottom()}},{key:"onUpdateOption",value:function(){this.vConsole.option.maxLogNumber!=this.maxLogNumber&&(this.updateMaxLogNumber(),this.limitMaxLogs())}},{key:"updateMaxLogNumber",value:function(){this.maxLogNumber=this.vConsole.option.maxLogNumber||1e3,this.maxLogNumber=Math.max(1,this.maxLogNumber)}},{key:"limitMaxLogs",value:function(){if(this.isReady)for(;this.logNumber>this.maxLogNumber;){var e=r.default.one(".vc-item",this.$tabbox);if(!e)break;e.parentNode.removeChild(e),this.logNumber--}}},{key:"showLogType",value:function(e){var t=r.default.one(".vc-log",this.$tabbox);r.default.removeClass(t,"vc-log-partly-log"),r.default.removeClass(t,"vc-log-partly-info"),r.default.removeClass(t,"vc-log-partly-warn"),r.default.removeClass(t,"vc-log-partly-error"),"all"==e?r.default.removeClass(t,"vc-log-partly"):(r.default.addClass(t,"vc-log-partly"),r.default.addClass(t,"vc-log-partly-"+e))}},{key:"autoScrollToBottom",value:function(){this.vConsole.option.disableLogScrolling||this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=r.default.one(".vc-content");e&&(e.scrollTop=e.scrollHeight-e.offsetHeight)}},{key:"mockConsole",value:function(){var e=this,t=this,n=["log","info","warn","debug","error"];window.console?(n.map((function(e){t.console[e]=window.console[e]})),t.console.time=window.console.time,t.console.timeEnd=window.console.timeEnd,t.console.clear=window.console.clear):window.console={},n.map((function(t){window.console[t]=function(){for(var n=arguments.length,o=new Array(n),r=0;r0&&(r=a[1].toLowerCase(),i=g.indexOf(r)>-1)}if(r===this.id||!0!==i&&"default"===this.id)if(e._id||(e._id="__vc_"+Math.random().toString(36).substring(2,8)),e.date||(e.date=+new Date),this.isReady){o.isString(t[0])&&i&&(t[0]=t[0].replace(n,""),""===t[0]&&t.shift());for(var l={_id:e._id,logType:e.logType,logText:[],hasContent:!!e.content,count:1},c=0;c "+t[p].toString()+"":o.isObject(t[p])||o.isArray(t[p])?this.getFoldedLine(t[p]):(l[p]?' '):" ")+o.htmlEncode(t[p]).replace(/\n/g,"
")+"
"}catch(e){b=" ["+d(t[p])+"]"}b&&("string"==typeof b?v.insertAdjacentHTML("beforeend",b):v.insertAdjacentElement("beforeend",b))}o.isObject(e.content)&&v.insertAdjacentElement("beforeend",e.content),this.formatLine&&(n=this.formatLine(n)),r.default.one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",n),this.logNumber++,this.limitMaxLogs()}},{key:"getFoldedLine",value:function(e,t){var n=this;if(!t){var i=o.JSONStringify(e),a=i.substr(0,36);t=o.getObjName(e),i.length>36&&(a+="..."),t+=" "+a}var s=r.default.render(l.default,{outer:t,lineType:"obj"});return r.default.bind(r.default.one(".vc-fold-outer",s),"click",(function(t){t.preventDefault(),t.stopPropagation(),r.default.hasClass(s,"vc-toggle")?(r.default.removeClass(s,"vc-toggle"),r.default.removeClass(r.default.one(".vc-fold-inner",s),"vc-toggle"),r.default.removeClass(r.default.one(".vc-fold-outer",s),"vc-toggle")):(r.default.addClass(s,"vc-toggle"),r.default.addClass(r.default.one(".vc-fold-inner",s),"vc-toggle"),r.default.addClass(r.default.one(".vc-fold-outer",s),"vc-toggle"));var i=r.default.one(".vc-fold-inner",s);return setTimeout((function(){if(0==i.children.length&&e){for(var t=o.getObjAllKeys(e),a=0;ae.length)&&(t=e.length);for(var n=0,o=new Array(t);no&&(t=o-e.offsetWidth),n+e.offsetHeight>r&&(n=r-e.offsetHeight),t<0&&(t=0),n<20&&(n=20),[t,n]}},{key:"_mockTap",value:function(){var e,t,n,o=!1,r=null;this.$dom.addEventListener("touchstart",(function(o){if(void 0===e){var i=o.targetTouches[0];t=i.pageX,n=i.pageY,e=o.timeStamp,r=o.target.nodeType===Node.TEXT_NODE?o.target.parentNode:o.target}}),!1),this.$dom.addEventListener("touchmove",(function(e){var r=e.changedTouches[0];(Math.abs(r.pageX-t)>10||Math.abs(r.pageY-n)>10)&&(o=!0)})),this.$dom.addEventListener("touchend",(function(t){if(!1===o&&t.timeStamp-e<700&&null!=r){var n=!1;switch(r.tagName.toLowerCase()){case"textarea":n=!0;break;case"input":switch(r.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":n=!1;break;default:n=!r.disabled&&!r.readOnly}}if(n?r.focus():"function"==typeof window.getSelection&&getSelection().rangeCount||t.preventDefault(),!r.disabled&&!r.readOnly){var i=t.changedTouches[0],a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),a.forwardedTouchEvent=!0,a.initEvent("click",!0,!0),r.dispatchEvent(a)}}e=void 0,o=!1,r=null}),!1)}},{key:"_bindEvent",value:function(){var e=this,t=l.default.one(".vc-switch",e.$dom);l.default.bind(t,"touchstart",(function(t){e.switchPos.startX=t.touches[0].pageX,e.switchPos.startY=t.touches[0].pageY,e.switchPos.hasMoved=!1})),l.default.bind(t,"touchend",(function(t){e.switchPos.hasMoved&&(e.switchPos.x=e.switchPos.endX,e.switchPos.y=e.switchPos.endY,e.switchPos.startX=0,e.switchPos.startY=0,e.switchPos.hasMoved=!1,i.setStorage("switch_x",e.switchPos.x),i.setStorage("switch_y",e.switchPos.y))})),l.default.bind(t,"touchmove",(function(n){if(!(n.touches.length<=0)){var o=n.touches[0].pageX-e.switchPos.startX,r=n.touches[0].pageY-e.switchPos.startY,i=Math.floor(e.switchPos.x-o),a=Math.floor(e.switchPos.y-r),l=x(e._getSwitchButtonSafeAreaXY(t,i,a),2);i=l[0],a=l[1],t.style.right=i+"px",t.style.bottom=a+"px",e.switchPos.endX=i,e.switchPos.endY=a,e.switchPos.hasMoved=!0,console.log(i,a),n.preventDefault()}})),l.default.bind(l.default.one(".vc-switch",e.$dom),"click",(function(){e.show()})),l.default.bind(l.default.one(".vc-hide",e.$dom),"click",(function(){e.hide()}));var n=l.default.one(".vc-mask",this.$dom),o=l.default.one(".vc-panel",this.$dom),r=window.transitionEnd(n).whichTransitionEnd(),a=function(){n.style.display="none",o.style.display="none"};r?l.default.bind(n,r,a):a(),l.default.bind(n,"click",(function(t){if(t.target!=l.default.one(".vc-mask"))return!1;e.hide()})),l.default.delegate(l.default.one(".vc-tabbar",e.$dom),"click",".vc-tab",(function(t){var n=this.dataset.tab;n!=e.activedTab&&e.showTab(n)}));var c=function(t){l.default.hasClass(e.$dom,"vc-toggle")||(t.style.display="none")};r?l.default.bind(o,r,(function(e){if(e.target!=o)return!1;c(e.target)})):c(o);var s=l.default.one(".vc-content",e.$dom),u=!1;l.default.bind(s,"touchstart",(function(e){var t=s.scrollTop,n=s.scrollHeight,o=t+s.offsetHeight;0===t?(s.scrollTop=1,0===s.scrollTop&&(l.default.hasClass(e.target,"vc-cmd-input")||(u=!0))):o===n&&(s.scrollTop=t-1,s.scrollTop===t&&(l.default.hasClass(e.target,"vc-cmd-input")||(u=!0)))})),l.default.bind(s,"touchmove",(function(e){u&&e.preventDefault()})),l.default.bind(s,"touchend",(function(e){u=!1}))}},{key:"_autoRun",value:function(){for(var e in this.isInited=!0,this.pluginList)this._initPlugin(this.pluginList[e]);this.tabList.length>0&&this.showTab(this.tabList[0]),this.triggerEvent("ready")}},{key:"triggerEvent",value:function(e,t){e="on"+e.charAt(0).toUpperCase()+e.slice(1),i.isFunction(this.option[e])&&this.option[e].apply(this,t)}},{key:"_initPlugin",value:function(e){var t=this;e.vConsole=this,e.trigger("init"),e.trigger("renderTab",(function(n){t.tabList.push(e.id);var o=l.default.render(u.default,{id:e.id,name:e.name});l.default.one(".vc-tabbar",t.$dom).insertAdjacentElement("beforeend",o);var r=l.default.render(d.default,{id:e.id});n&&(i.isString(n)?r.innerHTML+=n:i.isFunction(n.appendTo)?n.appendTo(r):i.isElement(n)&&r.insertAdjacentElement("beforeend",n)),l.default.one(".vc-content",t.$dom).insertAdjacentElement("beforeend",r)})),e.trigger("addTopBar",(function(n){if(n)for(var o=l.default.one(".vc-topbar",t.$dom),r=function(t){var r=n[t],a=l.default.render(f.default,{name:r.name||"Undefined",className:r.className||"",pluginID:e.id});if(r.data)for(var c in r.data)a.dataset[c]=r.data[c];i.isFunction(r.onClick)&&l.default.bind(a,"click",(function(t){!1===r.onClick.call(a)||(l.default.removeClass(l.default.all(".vc-topbar-"+e.id),"vc-actived"),l.default.addClass(a,"vc-actived"))})),o.insertAdjacentElement("beforeend",a)},a=0;a-1&&this.tabList.splice(s,1);try{delete this.pluginList[e]}catch(t){this.pluginList[e]=void 0}return this.activedTab==e&&this.tabList.length>0&&this.showTab(this.tabList[0]),!0}},{key:"show",value:function(){if(this.isInited){var e=this;l.default.one(".vc-panel",this.$dom).style.display="block",setTimeout((function(){l.default.addClass(e.$dom,"vc-toggle"),e._triggerPluginsEvent("showConsole"),l.default.one(".vc-mask",e.$dom).style.display="block"}),10)}}},{key:"hide",value:function(){this.isInited&&(l.default.removeClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("hideConsole"))}},{key:"showSwitch",value:function(){this.isInited&&(l.default.one(".vc-switch",this.$dom).style.display="block")}},{key:"hideSwitch",value:function(){this.isInited&&(l.default.one(".vc-switch",this.$dom).style.display="none")}},{key:"showTab",value:function(e){if(this.isInited){var t=l.default.one("#__vc_log_"+e);l.default.removeClass(l.default.all(".vc-tab",this.$dom),"vc-actived"),l.default.addClass(l.default.one("#__vc_tab_"+e),"vc-actived"),l.default.removeClass(l.default.all(".vc-logbox",this.$dom),"vc-actived"),l.default.addClass(t,"vc-actived");var n=l.default.all(".vc-topbar-"+e,this.$dom);l.default.removeClass(l.default.all(".vc-toptab",this.$dom),"vc-toggle"),l.default.addClass(n,"vc-toggle"),n.length>0?l.default.addClass(l.default.one(".vc-content",this.$dom),"vc-has-topbar"):l.default.removeClass(l.default.one(".vc-content",this.$dom),"vc-has-topbar"),l.default.removeClass(l.default.all(".vc-tool",this.$dom),"vc-toggle"),l.default.addClass(l.default.all(".vc-tool-"+e,this.$dom),"vc-toggle"),this.activedTab&&this._triggerPluginEvent(this.activedTab,"hide"),this.activedTab=e,this._triggerPluginEvent(this.activedTab,"show")}}},{key:"setOption",value:function(e,t){if(i.isString(e))this.option[e]=t,this._triggerPluginsEvent("updateOption");else if(i.isObject(e)){for(var n in e)this.option[n]=e[n];this._triggerPluginsEvent("updateOption")}else console.debug("The first parameter of vConsole.setOption() must be a string or an object.")}},{key:"destroy",value:function(){if(this.isInited){for(var e=Object.keys(this.pluginList),t=e.length-1;t>=0;t--)this.removePlugin(e[t]);this.$dom.parentNode.removeChild(this.$dom),this.isInited=!1}}}])&&O(t.prototype,n),o&&O(t,o),e}();E.VConsolePlugin=p.default,E.VConsoleLogPlugin=b.default,E.VConsoleDefaultPlugin=h.default,E.VConsoleSystemPlugin=m.default,E.VConsoleNetworkPlugin=g.default,E.VConsoleElementPlugin=y.default,E.VConsoleStoragePlugin=_.default;var T=E;n.default=T,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){!function(e){"use strict";var t=function(e,t){this.element=e,this.type=t};t.prototype={add:function(e){this.callback=e,this.element.addEventListener(this.type,this.callback,!1)},remove:function(){this.element.removeEventListener(this.type,this.callback,!1)}};var n=function(e){this.element=e,this.transitionEnd=this.whichTransitionEnd(),this.event=new t(this.element,this.transitionEnd)};n.prototype={whichTransitionEnd:function(){var e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in e)if(void 0!==this.element.style[t])return e[t]},bind:function(e){this.event.add(e)},unbind:function(){this.event.remove()}};var o={list:[],getPosition:function(e){if(Array.prototype.indexOf)return this.list.indexOf(e);for(var t=0,n=this.list.length;t=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw a}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n\n
vConsole
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Hide\n
\n
\n'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='
\n \n
'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='
\n\t
\n
'},function(e,t){e.exports='
\n {{if (lineType == \'obj\')}}\n {{outer}}\n
\n {{else if (lineType == \'value\')}}\n {{value}}\n {{else if (lineType == \'kv\')}}\n {{key}}: {{value}}\n {{/if}}\n
'},function(e,t){e.exports='\n {{key}}: {{value}}\n'},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,factory=function(_exports,_query,tool,_log,_tabbox_default,_item_code){"use strict";function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelper(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n-1||(keyTypes[winKeys[i]]=_typeof(window[winKeys[i]]));var cacheObj={},ID_REGEX=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/,retrievePrecedingIdentifier=function(e,t,n){n=n||ID_REGEX;for(var o=[],r=t-1;r>=0&&n.test(e[r]);r--)o.push(e[r]);if(0==o.length){n=/\./;for(var i=t-1;i>=0&&n.test(e[i]);i--)o.push(e[i])}if(0===o.length){var a=e.match(/[\(\)\[\]\{\}]/gi)||[];return a[a.length-1]}return o.reverse().join("")},moveCursorToPos=function(e,t){e.setSelectionRange&&e.setSelectionRange(t,t)},$input=_query.default.one(".vc-cmd-input");_query.default.bind($input,"keyup",(function(e){var isDeleteKeyCode=8===e.keyCode||46===e.keyCode,$prompted=_query.default.one(".vc-cmd-prompted");$prompted.style.display="none",$prompted.innerHTML="";var tempValue=this.value,value=retrievePrecedingIdentifier(this.value,this.value.length);if(value&&value.length>0){if(/\(/.test(value)&&!isDeleteKeyCode)return $input.value+=")",void moveCursorToPos($input,$input.value.length-1);if(/\[/.test(value)&&!isDeleteKeyCode)return $input.value+="]",void moveCursorToPos($input,$input.value.length-1);if(/\{/.test(value)&&!isDeleteKeyCode)return $input.value+="}",void moveCursorToPos($input,$input.value.length-1);if("."===value){var key=retrievePrecedingIdentifier(tempValue,tempValue.length-1);if(!cacheObj[key])try{cacheObj[key]=Object.getOwnPropertyNames(eval("("+key+")")).sort()}catch(e){}try{for(var _i3=0;_i3=0){var _$li=document.createElement("li");_$li.innerHTML=winKeys[_i4],_$li.onclick=function(){$input.value="",$input.value=this.innerHTML,"function"==keyTypes[this.innerHTML]&&($input.value+="()"),$prompted.style.display="none"},$prompted.appendChild(_$li)}}else{var arr=value.split(".");if(cacheObj[arr[0]]){cacheObj[arr[0]].sort();for(var _i5=0;_i5=0&&(_$li2.innerHTML=_key3,_$li2.onclick=function(){$input.value="",$input.value=tempValue+this.innerHTML,$prompted.style.display="none"},$prompted.appendChild(_$li2))}}}if($prompted.children.length>0){var m=Math.min(200,31*$prompted.children.length);$prompted.style.display="block",$prompted.style.height=m+"px",$prompted.style.marginTop=-m+"px"}}else $prompted.style.display="none"})),_query.default.bind(_query.default.one(".vc-cmd",this.$tabbox),"submit",(function(e){e.preventDefault();var t=_query.default.one(".vc-cmd-input",e.target),n=t.value;t.value="",""!==n&&that.evalCommand(n);var o=_query.default.one(".vc-cmd-prompted");o&&(o.style.display="none")})),_query.default.bind(_query.default.one(".vc-cmd.vc-filter",this.$tabbox),"submit",(function(e){e.preventDefault();var t=_query.default.one(".vc-cmd.vc-filter .vc-cmd-input",e.target);filterText=t.value,_query.default.all(".vc-log>.vc-item").forEach((function(e){checkFilterInLine(e)?_query.default.addClass(e,"hide"):_query.default.removeClass(e,"hide")}))}));var code="";code+="if (!!window) {",code+="window.__vConsole_cmd_result = undefined;",code+="window.__vConsole_cmd_error = false;",code+="}";var scriptList=document.getElementsByTagName("script"),nonce="",_iterator=_createForOfIteratorHelper(scriptList),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _script=_step.value;if(_script.nonce){nonce=_script.nonce;break}}}catch(e){_iterator.e(e)}finally{_iterator.f()}var script=document.createElement("SCRIPT");script.innerHTML=code,script.setAttribute("nonce",nonce),document.documentElement.appendChild(script),document.documentElement.removeChild(script)}},{key:"mockConsole",value:function(){_get(_getPrototypeOf(VConsoleDefaultTab.prototype),"mockConsole",this).call(this);var e=this;tool.isFunction(window.onerror)&&(this.windowOnError=window.onerror),window.onerror=function(t,n,o,r,i){var a=t;n&&(a+="\n"+n.replace(location.origin,"")),(o||r)&&(a+=":"+o+":"+r);var l=!!i&&!!i.stack&&i.stack.toString()||"";e.printLog({logType:"error",logs:[a,l],noOrigin:!0}),tool.isFunction(e.windowOnError)&&e.windowOnError.call(window,t,n,o,r,i)}}},{key:"evalCommand",value:function(e){this.printLog({logType:"log",content:_query.default.render(_item_code.default,{content:e,type:"input"}),style:""});var t,n=void 0;try{n=eval.call(window,"("+e+")")}catch(t){try{n=eval.call(window,e)}catch(e){}}tool.isArray(n)||tool.isObject(n)?t=this.getFoldedLine(n):(tool.isNull(n)?n="null":tool.isUndefined(n)?n="undefined":tool.isFunction(n)?n="function()":tool.isString(n)&&(n='"'+n+'"'),t=_query.default.render(_item_code.default,{content:n,type:"output"})),this.printLog({logType:"log",content:t,style:""}),window.winKeys=Object.getOwnPropertyNames(window).sort()}}]),VConsoleDefaultTab}(_log.default),_default=VConsoleDefaultTab;_exports.default=_default,module.exports=exports.default},__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(1),__webpack_require__(0),__webpack_require__(3),__webpack_require__(22),__webpack_require__(23)],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t){e.exports='
\n
\n
\n \n
    \n
    \n \n
    \n
    \n
    \n \n
      \n
      \n \n
      \n
      \n
      \n'},function(e,t){e.exports='
      {{content}}
      '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(3),n(25)],void 0===(i="function"==typeof(o=function(n,o,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n\n
      \n'},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(1),n(0),n(2),n(27),n(28),n(29)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c,s){"use strict";function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=t.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)})),e.reqList)e.updateRequest(n,{})}},{key:"onRemove",value:function(){window.XMLHttpRequest&&(window.XMLHttpRequest.prototype.open=this._open,window.XMLHttpRequest.prototype.send=this._send,window.XMLHttpRequest.prototype.setRequestHeader=this._setRequestHeader,this._open=void 0,this._send=void 0,this._setRequestHeader=void 0)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.scrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=o.default.one(".vc-content");e.scrollTop=e.scrollHeight-e.offsetHeight}},{key:"clearLog",value:function(){for(var e in this.reqList={},this.domList)this.domList[e].parentNode.removeChild(this.domList[e]),this.domList[e]=void 0;this.domList={},this.renderHeader()}},{key:"renderHeader",value:function(){var e=Object.keys(this.reqList).length,t=o.default.render(c.default,{count:e}),n=o.default.one(".vc-log",this.$tabbox);this.$header?this.$header.parentNode.replaceChild(t,this.$header):n.parentNode.insertBefore(t,n),this.$header=t}},{key:"updateRequest",value:function(e,t){var n=Object.keys(this.reqList).length,i=this.reqList[e]||{};for(var a in t)i[a]=t[a];if(this.reqList[e]=i,this.isReady){var l={id:e,name:i.name,url:i.url,status:i.status,method:i.method||"-",costTime:i.costTime>0?i.costTime+"ms":"-",header:i.header||null,requestHeader:i.requestHeader||null,getData:i.getData||null,postData:i.postData||null,response:null,actived:!!i.actived};switch(i.responseType){case"":case"text":if(r.isString(i.response))try{l.response=JSON.parse(i.response),l.response=JSON.stringify(l.response,null,1),l.response=r.htmlEncode(l.response)}catch(e){l.response=r.htmlEncode(i.response)}else void 0!==i.response&&(l.response=Object.prototype.toString.call(i.response));break;case"json":void 0!==i.response&&(l.response=JSON.stringify(i.response,null,1),l.response=r.htmlEncode(l.response));break;case"blob":case"document":case"arraybuffer":default:void 0!==i.response&&(l.response=Object.prototype.toString.call(i.response))}0==i.readyState||1==i.readyState?l.status="Pending":2==i.readyState||3==i.readyState?l.status="Loading":4==i.readyState||(l.status="Unknown");var c=o.default.render(s.default,l),u=this.domList[e];i.status>=400&&o.default.addClass(o.default.one(".vc-group-preview",c),"vc-table-row-error"),u?u.parentNode.replaceChild(c,u):o.default.one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",c),this.domList[e]=c,Object.keys(this.reqList).length!=n&&this.renderHeader(),this.isInBottom&&this.scrollToBottom()}}},{key:"mockAjax",value:function(){if(window.XMLHttpRequest){var e=this,t=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send,o=window.XMLHttpRequest.prototype.setRequestHeader;e._open=t,e._send=n,e._setRequestHeader=o,window.XMLHttpRequest.prototype.open=function(){var n=this,o=[].slice.call(arguments),r=o[0],i=o[1],a=e.getUniqueID(),l=null;n._requestID=a,n._method=r,n._url=i;var c=n.onreadystatechange||function(){},s=function(){var t=e.reqList[a]||{};if(t.readyState=n.readyState,t.status=0,n.readyState>1&&(t.status=n.status),t.responseType=n.responseType,0==n.readyState)t.startTime||(t.startTime=+new Date);else if(1==n.readyState)t.startTime||(t.startTime=+new Date);else if(2==n.readyState){t.header={};for(var o=n.getAllResponseHeaders()||"",r=o.split("\n"),i=0;i0){a.name+="?"+l,a.getData={};var c,s=f(l=(l=l.join("?")).split("&"));try{for(s.s();!(c=s.n()).done;){var u=c.value;u=u.split("="),a.getData[u[0]]=decodeURIComponent(u[1])}}catch(e){s.e(e)}finally{s.f()}}if("POST"==a.method)if(r.isString(i)){var d=i.split("&");a.postData={};var v,p=f(d);try{for(p.s();!(v=p.n()).done;){var b=v.value;b=b.split("="),a.postData[b[0]]=b[1]}}catch(e){p.e(e)}finally{p.f()}}else r.isPlainObject(i)?a.postData=i:a.postData="[object Object]";return t._noVConsole||e.updateRequest(t._requestID,a),n.apply(t,o)}}}},{key:"mockFetch",value:function(){var e=window.fetch;if(e){var t=this;window.fetch=function(n,o){var i=t.getUniqueID();t.reqList[i]={};var a=t.reqList[i]||{},l=[],c="",s="GET",u=null;if(r.isString(n)?(s=o.method||"GET",c=n,u=o.headers):(s=n.method||"GET",c=n.url,u=n.headers),l=c.split("?"),a.id=i,a.method=s,a.requestHeader=u,a.url=c,a.name=l.shift()||"",a.name=a.name.replace(new RegExp("[/]*$"),"").split("/").pop()||"",l.length>0){a.name+="?"+l,a.getData={};var d,v=f(l=(l=l.join("?")).split("&"));try{for(v.s();!(d=v.n()).done;){var p=d.value;p=p.split("="),a.getData[p[0]]=p[1]}}catch(e){v.e(e)}finally{v.f()}}if("POST"===a.method)if(r.isString(n))if(r.isString(o.body)){var b=o.body.split("&");a.postData={};var h,m=f(b);try{for(m.s();!(h=m.n()).done;){var g=h.value;g=g.split("="),a.postData[g[0]]=g[1]}}catch(e){m.e(e)}finally{m.f()}}else r.isPlainObject(o.body)?a.postData=o.body:a.postData="[object Object]";else a.postData="[object Object]";return a.startTime||(a.startTime=+new Date),e(c,o).then((function(e){return e.clone().json().then((function(t){a.endTime=+new Date,a.costTime=a.endTime-(a.startTime||a.endTime),a.status=e.status,a.header={};var n,o=f(e.headers.entries());try{for(o.s();!(n=o.n()).done;){var r=n.value;a.header[r[0]]=r[1]}}catch(e){o.e(e)}finally{o.f()}a.response=t,a.readyState=4;var i=e.headers.get("content-type");return a.responseType=i.includes("application/json")?"json":i.includes("text/html")?"text":"",t})),t.updateRequest(i,a),e}))}}}},{key:"getUniqueID",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}}])&&b(t.prototype,n),i&&b(t,i),u}(i.default);n.default=_,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports='
      \n
      \n
      '},function(e,t){e.exports='
      \n
      Name {{if (count > 0)}}({{count}}){{/if}}
      \n
      Method
      \n
      Status
      \n
      Time
      \n
      '},function(e,t){e.exports='
      \n
      \n
      {{name}}
      \n
      {{method}}
      \n
      {{status}}
      \n
      {{costTime}}
      \n
      \n
      \n
      \n
      \n
      General
      \n
      \n
      \n
      URL
      \n
      {{url}}
      \n
      \n
      \n
      Method
      \n
      {{method}}
      \n
      \n
      \n {{if (header !== null)}}\n
      \n
      \n
      Response Headers
      \n
      \n {{for (var key in header)}}\n
      \n
      {{key}}
      \n
      {{header[key]}}
      \n
      \n {{/for}}\n
      \n {{/if}}\n {{if (requestHeader !== null)}}\n
      \n
      \n
      Request Headers
      \n
      \n {{for (var key in requestHeader)}}\n
      \n
      {{key}}
      \n
      {{requestHeader[key]}}
      \n
      \n {{/for}}\n
      \n {{/if}}\n {{if (getData !== null)}}\n
      \n
      \n
      Query String Parameters
      \n
      \n {{for (var key in getData)}}\n
      \n
      {{key}}
      \n
      {{getData[key]}}
      \n
      \n {{/for}}\n
      \n {{/if}}\n {{if (postData !== null)}}\n
      \n
      \n
      Request Payload
      \n
      \n {{if (typeof postData === \'string\')}}\n
      \n
      {{postData}}
      \n
      \n {{else}}\n {{for (var key in postData)}}\n
      \n
      {{key}}
      \n
      {{postData[key]}}
      \n
      \n {{/for}}\n {{/if}}\n
      \n {{/if}}\n
      \n
      \n
      Response
      \n
      \n
      \n
      {{response || \'\'}}
      \n
      \n
      \n
      \n
      '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(31),n(32),n(2),n(34),n(35),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c,s,u){"use strict";function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n0&&this.onChildRemove(e),e.addedNodes.length>0&&this.onChildAdd(e);break;case"attributes":this.onAttributesChange(e);break;case"characterData":this.onCharacterDataChange(e)}}},{key:"onChildRemove",value:function(e){var t=e.target;if(t.__vconsole_node){for(var n=0;n0||(e.childNodes[r]?o.renderView(e.childNodes[r],a,"replace"):a.style.display="none"))}}})),n){case"replace":t.parentNode.replaceChild(r,t);break;case"insertBefore":t.parentNode.insertBefore(r,t);break;default:t.appendChild(r)}return r}},{key:"getNode",value:function(e){if(!this._isIgnoredElement(e)){var t=e.__vconsole_node||{};if(t.nodeType=e.nodeType,t.nodeName=e.nodeName,t.tagName=e.tagName||"",t.textContent="",t.nodeType!=e.TEXT_NODE&&t.nodeType!=e.DOCUMENT_TYPE_NODE||(t.textContent=e.textContent),t.id=e.id||"",t.className=e.className||"",t.attributes=[],e.hasAttributes&&e.hasAttributes())for(var n=0;n0)for(var o=0;o>>0)+i+++"__"}).prototype={set:function(e,t){var n=e[this.name];return n&&n[0]===e?n[1]=t:r(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];if(!t)return!1;var n=t[0]===e;return t[0]=t[1]=void 0,n},has:function(e){var t=e[this.name];return!!t&&t[0]===e}}}var a=new o,l=window.msSetImmediate;if(!l){var c=[],s=String(Math.random());window.addEventListener("message",(function(e){if(e.data===s){var t=c;c=[],t.forEach((function(e){e()}))}})),l=function(e){c.push(e),window.postMessage(s,"*")}}var u=!1,d=[];function f(){u=!1;var e=d;d=[],e.sort((function(e,t){return e.uid_-t.uid_}));var t=!1;e.forEach((function(e){var n=e.takeRecords();!function(e){e.nodes_.forEach((function(t){var n=a.get(t);n&&n.forEach((function(t){t.observer===e&&t.removeTransientObservers()}))}))}(e),n.length&&(e.callback_(n,e),t=!0)})),t&&f()}function v(e,t){for(var n=e;n;n=n.parentNode){var o=a.get(n);if(o)for(var r=0;r0){var r=w(n[o-1],e);if(r)return void(n[o-1]=r)}else t=this.observer,d.push(t),u||(u=!0,l(f));n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=a.get(e);t||a.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach((function(e){this.removeListeners_(e);for(var t=a.get(e),n=0;n .vcelm-node {\n display: block;\n}\n.vcelm-l .vcelm-node:active {\n background-color: var(--VC-BG-COLOR-ACTIVE);\n}\n.vcelm-l.vcelm-noc .vcelm-node:active {\n background-color: transparent;\n}\n.vcelm-t {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n/* level */\n.vcelm-l .vcelm-l {\n display: none;\n}\n.vcelm-l.vc-toggle > .vcelm-l {\n margin-left: 4px;\n display: block;\n}\n/* arrow */\n.vcelm-l:before {\n content: "";\n display: block;\n position: absolute;\n top: 6px;\n left: 3px;\n width: 0;\n height: 0;\n border: transparent solid 3px;\n border-left-color: var(--VC-FG-1);\n}\n.vcelm-l.vc-toggle:before {\n display: block;\n top: 6px;\n left: 0;\n border-top-color: var(--VC-FG-1);\n border-left-color: transparent;\n}\n.vcelm-l.vcelm-noc:before {\n display: none;\n}\n',""]),e.exports=t},function(e,t){e.exports='
      \n
      \n
      '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(36),n(37),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l){"use strict";function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n-1),a=i;0==e.childNodes.length&&(a=!0);var c=l.default.render(o.default,{node:e}),s=l.default.render(r.default,{node:e});if(a)l.default.addClass(t,"vcelm-noc"),t.appendChild(c),i||t.appendChild(s);else{t.appendChild(c);for(var u=0;u<{{node.tagName.toLowerCase()}}{{if (node.className || node.attributes.length)}}\n \n {{for (var i = 0; i < node.attributes.length; i++)}}\n {{if (node.attributes[i].value !== \'\')}}\n {{node.attributes[i].name}}="{{node.attributes[i].value}}"{{else}}\n {{node.attributes[i].name}}{{/if}}{{/for}}{{/if}}>
      '},function(e,t){e.exports='</{{node.tagName.toLowerCase()}}>'},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(39),n(40),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n\n
      \n'},function(e,t){e.exports='
      \n
      \n
      Name
      \n
      Value
      \n
      \n {{for (var i = 0; i < list.length; i++)}}\n
      \n
      {{list[i].name}}
      \n
      {{list[i].value}}
      \n
      \n {{/for}}\n
      '}])})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("VConsole",[],t):"object"==typeof exports?exports.VConsole=t():e.VConsole=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return"[object Number]"==Object.prototype.toString.call(e)}function o(e){return"[object String]"==Object.prototype.toString.call(e)}function r(e){return"[object Array]"==Object.prototype.toString.call(e)}function i(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function a(e){return void 0===e}function l(e){return null===e}function c(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function s(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&(n(e)||o(e)||i(e)||r(e)||l(e)||u(e)||a(e)||c(e)))}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function d(e){var t=Object.prototype.toString.call(e);return"[object global]"==t||"[object Window]"==t||"[object DOMWindow]"==t}function f(e){if(!s(e)&&!r(e))return[];var t=[];for(var n in e)t.push(n);return t.sort()}Object.defineProperty(e,"__esModule",{value:!0}),e.getDate=function(e){var t=e>0?new Date(e):new Date,n=t.getDate()<10?"0"+t.getDate():t.getDate(),o=t.getMonth()<9?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getFullYear(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),a=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),l=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=t.getMilliseconds()<10?"0"+t.getMilliseconds():t.getMilliseconds();return c<100&&(c="0"+c),{time:+t,year:r,month:o,day:n,hour:i,minute:a,second:l,millisecond:c}},e.isNumber=n,e.isString=o,e.isArray=r,e.isBoolean=i,e.isUndefined=a,e.isNull=l,e.isSymbol=c,e.isObject=s,e.isFunction=u,e.isElement=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":t(HTMLElement))?e instanceof HTMLElement:e&&"object"===t(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.isWindow=d,e.isPlainObject=function(e){var n,o=Object.prototype.hasOwnProperty;if(!e||"object"!==t(e)||e.nodeType||d(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(n in e);return void 0===n||o.call(e,n)},e.htmlEncode=function(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML},e.JSONStringify=function(e){if(!s(e)&&!r(e))return JSON.stringify(e);var t="{",n="}";r(e)&&(t="[",n="]");for(var o=t,i=f(e),a=0;a-1||(r.push(t),e[n].className=r.join(" "))}}},removeClass:function(e,t){if(e){(0,o.isArray)(e)||(e=[e]);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"newPlugin";o(this,e),this.id=t,this.name=n,this.isReady=!1,this.eventList={}}var t,n,i;return t=e,(n=[{key:"on",value:function(e,t){return this.eventList[e]=t,this}},{key:"trigger",value:function(e,t){if("function"==typeof this.eventList[e])this.eventList[e].call(this,t);else{var n="on"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[n]&&this[n].call(this,t)}return this}},{key:"id",get:function(){return this._id},set:function(e){if(!e)throw"Plugin ID cannot be empty";this._id=e.toLowerCase()}},{key:"name",get:function(){return this._name},set:function(e){if(!e)throw"Plugin name cannot be empty";this._name=e}},{key:"vConsole",get:function(){return this._vConsole||void 0},set:function(e){if(!e)throw"vConsole cannot be empty";this._vConsole=e}}])&&r(t.prototype,n),i&&r(t,i),e}();n.default=i,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(0),n(1),n(2),n(18),n(19),n(20)],void 0===(i="function"==typeof(o=function(n,o,r,i,a,l,c){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n=n.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)}));for(var o=0;o-1&&g.splice(e,1)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.autoScrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.autoScrollToBottom()}},{key:"onUpdateOption",value:function(){this.vConsole.option.maxLogNumber!=this.maxLogNumber&&(this.updateMaxLogNumber(),this.limitMaxLogs())}},{key:"updateMaxLogNumber",value:function(){this.maxLogNumber=this.vConsole.option.maxLogNumber||1e3,this.maxLogNumber=Math.max(1,this.maxLogNumber)}},{key:"limitMaxLogs",value:function(){if(this.isReady)for(;this.logNumber>this.maxLogNumber;){var e=r.default.one(".vc-item",this.$tabbox);if(!e)break;e.parentNode.removeChild(e),this.logNumber--}}},{key:"showLogType",value:function(e){var t=r.default.one(".vc-log",this.$tabbox);r.default.removeClass(t,"vc-log-partly-log"),r.default.removeClass(t,"vc-log-partly-info"),r.default.removeClass(t,"vc-log-partly-warn"),r.default.removeClass(t,"vc-log-partly-error"),"all"==e?r.default.removeClass(t,"vc-log-partly"):(r.default.addClass(t,"vc-log-partly"),r.default.addClass(t,"vc-log-partly-"+e))}},{key:"autoScrollToBottom",value:function(){this.vConsole.option.disableLogScrolling||this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=r.default.one(".vc-content");e&&(e.scrollTop=e.scrollHeight-e.offsetHeight)}},{key:"mockConsole",value:function(){var e=this,t=this,n=["log","info","warn","debug","error"];window.console?(n.map((function(e){t.console[e]=window.console[e]})),t.console.time=window.console.time,t.console.timeEnd=window.console.timeEnd,t.console.clear=window.console.clear):window.console={},n.map((function(t){window.console[t]=function(){for(var n=arguments.length,o=new Array(n),r=0;r0&&(r=a[1].toLowerCase(),i=g.indexOf(r)>-1)}if(r===this.id||!0!==i&&"default"===this.id)if(e._id||(e._id="__vc_"+Math.random().toString(36).substring(2,8)),e.date||(e.date=+new Date),this.isReady){o.isString(t[0])&&i&&(t[0]=t[0].replace(n,""),""===t[0]&&t.shift());for(var l={_id:e._id,logType:e.logType,logText:[],hasContent:!!e.content,count:1},c=0;c "+t[p].toString()+"":o.isObject(t[p])||o.isArray(t[p])?this.getFoldedLine(t[p]):(l[p]?' '):" ")+o.htmlEncode(t[p]).replace(/\n/g,"
      ")+"
      "}catch(e){b=" ["+d(t[p])+"]"}b&&("string"==typeof b?v.insertAdjacentHTML("beforeend",b):v.insertAdjacentElement("beforeend",b))}o.isObject(e.content)&&v.insertAdjacentElement("beforeend",e.content),this.formatLine&&(n=this.formatLine(n)),r.default.one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",n),this.logNumber++,this.limitMaxLogs()}},{key:"getFoldedLine",value:function(e,t){var n=this;if(!t){var i=o.JSONStringify(e),a=i.substr(0,36);t=o.getObjName(e),i.length>36&&(a+="..."),t+=" "+a}var s=r.default.render(l.default,{outer:t,lineType:"obj"});return r.default.bind(r.default.one(".vc-fold-outer",s),"click",(function(t){t.preventDefault(),t.stopPropagation(),r.default.hasClass(s,"vc-toggle")?(r.default.removeClass(s,"vc-toggle"),r.default.removeClass(r.default.one(".vc-fold-inner",s),"vc-toggle"),r.default.removeClass(r.default.one(".vc-fold-outer",s),"vc-toggle")):(r.default.addClass(s,"vc-toggle"),r.default.addClass(r.default.one(".vc-fold-inner",s),"vc-toggle"),r.default.addClass(r.default.one(".vc-fold-outer",s),"vc-toggle"));var i=r.default.one(".vc-fold-inner",s);return setTimeout((function(){if(0==i.children.length&&e){for(var t=o.getObjAllKeys(e),a=0;ae.length)&&(t=e.length);for(var n=0,o=new Array(t);no&&(t=o-e.offsetWidth),n+e.offsetHeight>r&&(n=r-e.offsetHeight),t<0&&(t=0),n<20&&(n=20),[t,n]}},{key:"_mockTap",value:function(){var e,t,n,o=!1,r=null;this.$dom.addEventListener("touchstart",(function(o){if(void 0===e){var i=o.targetTouches[0];t=i.pageX,n=i.pageY,e=o.timeStamp,r=o.target.nodeType===Node.TEXT_NODE?o.target.parentNode:o.target}}),!1),this.$dom.addEventListener("touchmove",(function(e){var r=e.changedTouches[0];(Math.abs(r.pageX-t)>10||Math.abs(r.pageY-n)>10)&&(o=!0)})),this.$dom.addEventListener("touchend",(function(t){if(!1===o&&t.timeStamp-e<700&&null!=r){var n=!1;switch(r.tagName.toLowerCase()){case"textarea":n=!0;break;case"input":switch(r.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":n=!1;break;default:n=!r.disabled&&!r.readOnly}}if(n?r.focus():"function"==typeof window.getSelection&&getSelection().rangeCount||t.preventDefault(),!r.disabled&&!r.readOnly){var i=t.changedTouches[0],a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),a.forwardedTouchEvent=!0,a.initEvent("click",!0,!0),r.dispatchEvent(a)}}e=void 0,o=!1,r=null}),!1)}},{key:"_bindEvent",value:function(){var e=this,t=l.default.one(".vc-switch",e.$dom);l.default.bind(t,"touchstart",(function(t){e.switchPos.startX=t.touches[0].pageX,e.switchPos.startY=t.touches[0].pageY,e.switchPos.hasMoved=!1})),l.default.bind(t,"touchend",(function(t){e.switchPos.hasMoved&&(e.switchPos.x=e.switchPos.endX,e.switchPos.y=e.switchPos.endY,e.switchPos.startX=0,e.switchPos.startY=0,e.switchPos.hasMoved=!1,i.setStorage("switch_x",e.switchPos.x),i.setStorage("switch_y",e.switchPos.y))})),l.default.bind(t,"touchmove",(function(n){if(!(n.touches.length<=0)){var o=n.touches[0].pageX-e.switchPos.startX,r=n.touches[0].pageY-e.switchPos.startY,i=Math.floor(e.switchPos.x-o),a=Math.floor(e.switchPos.y-r),l=x(e._getSwitchButtonSafeAreaXY(t,i,a),2);i=l[0],a=l[1],t.style.right=i+"px",t.style.bottom=a+"px",e.switchPos.endX=i,e.switchPos.endY=a,e.switchPos.hasMoved=!0,console.log(i,a),n.preventDefault()}})),l.default.bind(l.default.one(".vc-switch",e.$dom),"click",(function(){e.show()})),l.default.bind(l.default.one(".vc-hide",e.$dom),"click",(function(){e.hide()}));var n=l.default.one(".vc-mask",this.$dom),o=l.default.one(".vc-panel",this.$dom),r=window.transitionEnd(n).whichTransitionEnd(),a=function(){n.style.display="none",o.style.display="none"};r?l.default.bind(n,r,a):a(),l.default.bind(n,"click",(function(t){if(t.target!=l.default.one(".vc-mask"))return!1;e.hide()})),l.default.delegate(l.default.one(".vc-tabbar",e.$dom),"click",".vc-tab",(function(t){var n=this.dataset.tab;n!=e.activedTab&&e.showTab(n)}));var c=function(t){l.default.hasClass(e.$dom,"vc-toggle")||(t.style.display="none")};r?l.default.bind(o,r,(function(e){if(e.target!=o)return!1;c(e.target)})):c(o);var s=l.default.one(".vc-content",e.$dom),u=!1;l.default.bind(s,"touchstart",(function(e){var t=s.scrollTop,n=s.scrollHeight,o=t+s.offsetHeight;0===t?(s.scrollTop=1,0===s.scrollTop&&(l.default.hasClass(e.target,"vc-cmd-input")||(u=!0))):o===n&&(s.scrollTop=t-1,s.scrollTop===t&&(l.default.hasClass(e.target,"vc-cmd-input")||(u=!0)))})),l.default.bind(s,"touchmove",(function(e){u&&e.preventDefault()})),l.default.bind(s,"touchend",(function(e){u=!1}))}},{key:"_autoRun",value:function(){for(var e in this.isInited=!0,this.pluginList)this._initPlugin(this.pluginList[e]);this.tabList.length>0&&this.showTab(this.tabList[0]),this.triggerEvent("ready")}},{key:"triggerEvent",value:function(e,t){e="on"+e.charAt(0).toUpperCase()+e.slice(1),i.isFunction(this.option[e])&&this.option[e].apply(this,t)}},{key:"_initPlugin",value:function(e){var t=this;e.vConsole=this,e.trigger("init"),e.trigger("renderTab",(function(n){t.tabList.push(e.id);var o=l.default.render(u.default,{id:e.id,name:e.name});l.default.one(".vc-tabbar",t.$dom).insertAdjacentElement("beforeend",o);var r=l.default.render(d.default,{id:e.id});n&&(i.isString(n)?r.innerHTML+=n:i.isFunction(n.appendTo)?n.appendTo(r):i.isElement(n)&&r.insertAdjacentElement("beforeend",n)),l.default.one(".vc-content",t.$dom).insertAdjacentElement("beforeend",r)})),e.trigger("addTopBar",(function(n){if(n)for(var o=l.default.one(".vc-topbar",t.$dom),r=function(t){var r=n[t],a=l.default.render(f.default,{name:r.name||"Undefined",className:r.className||"",pluginID:e.id});if(r.data)for(var c in r.data)a.dataset[c]=r.data[c];i.isFunction(r.onClick)&&l.default.bind(a,"click",(function(t){!1===r.onClick.call(a)||(l.default.removeClass(l.default.all(".vc-topbar-"+e.id),"vc-actived"),l.default.addClass(a,"vc-actived"))})),o.insertAdjacentElement("beforeend",a)},a=0;a-1&&this.tabList.splice(s,1);try{delete this.pluginList[e]}catch(t){this.pluginList[e]=void 0}return this.activedTab==e&&this.tabList.length>0&&this.showTab(this.tabList[0]),!0}},{key:"show",value:function(){if(this.isInited){var e=this;l.default.one(".vc-panel",this.$dom).style.display="block",setTimeout((function(){l.default.addClass(e.$dom,"vc-toggle"),e._triggerPluginsEvent("showConsole"),l.default.one(".vc-mask",e.$dom).style.display="block"}),10)}}},{key:"hide",value:function(){this.isInited&&(l.default.removeClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("hideConsole"))}},{key:"showSwitch",value:function(){this.isInited&&(l.default.one(".vc-switch",this.$dom).style.display="block")}},{key:"hideSwitch",value:function(){this.isInited&&(l.default.one(".vc-switch",this.$dom).style.display="none")}},{key:"showTab",value:function(e){if(this.isInited){var t=l.default.one("#__vc_log_"+e);l.default.removeClass(l.default.all(".vc-tab",this.$dom),"vc-actived"),l.default.addClass(l.default.one("#__vc_tab_"+e),"vc-actived"),l.default.removeClass(l.default.all(".vc-logbox",this.$dom),"vc-actived"),l.default.addClass(t,"vc-actived");var n=l.default.all(".vc-topbar-"+e,this.$dom);l.default.removeClass(l.default.all(".vc-toptab",this.$dom),"vc-toggle"),l.default.addClass(n,"vc-toggle"),n.length>0?l.default.addClass(l.default.one(".vc-content",this.$dom),"vc-has-topbar"):l.default.removeClass(l.default.one(".vc-content",this.$dom),"vc-has-topbar"),l.default.removeClass(l.default.all(".vc-tool",this.$dom),"vc-toggle"),l.default.addClass(l.default.all(".vc-tool-"+e,this.$dom),"vc-toggle"),this.activedTab&&this._triggerPluginEvent(this.activedTab,"hide"),this.activedTab=e,this._triggerPluginEvent(this.activedTab,"show")}}},{key:"setOption",value:function(e,t){if(i.isString(e))this.option[e]=t,this._triggerPluginsEvent("updateOption");else if(i.isObject(e)){for(var n in e)this.option[n]=e[n];this._triggerPluginsEvent("updateOption")}else console.debug("The first parameter of vConsole.setOption() must be a string or an object.")}},{key:"destroy",value:function(){if(this.isInited){for(var e=Object.keys(this.pluginList),t=e.length-1;t>=0;t--)this.removePlugin(e[t]);this.$dom.parentNode.removeChild(this.$dom),this.isInited=!1}}}])&&O(t.prototype,n),o&&O(t,o),e}();E.VConsolePlugin=p.default,E.VConsoleLogPlugin=b.default,E.VConsoleDefaultPlugin=h.default,E.VConsoleSystemPlugin=m.default,E.VConsoleNetworkPlugin=g.default,E.VConsoleElementPlugin=y.default,E.VConsoleStoragePlugin=_.default;var T=E;n.default=T,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){!function(e){"use strict";var t=function(e,t){this.element=e,this.type=t};t.prototype={add:function(e){this.callback=e,this.element.addEventListener(this.type,this.callback,!1)},remove:function(){this.element.removeEventListener(this.type,this.callback,!1)}};var n=function(e){this.element=e,this.transitionEnd=this.whichTransitionEnd(),this.event=new t(this.element,this.transitionEnd)};n.prototype={whichTransitionEnd:function(){var e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in e)if(void 0!==this.element.style[t])return e[t]},bind:function(e){this.event.add(e)},unbind:function(){this.event.remove()}};var o={list:[],getPosition:function(e){if(Array.prototype.indexOf)return this.list.indexOf(e);for(var t=0,n=this.list.length;t=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw a}}}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n\n
      vConsole
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n Hide\n
      \n
      \n'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='
      \n \n
      '},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='{{name}}'},function(e,t){e.exports='
      \n\t
      \n
      '},function(e,t){e.exports='
      \n {{if (lineType == \'obj\')}}\n {{outer}}\n
      \n {{else if (lineType == \'value\')}}\n {{value}}\n {{else if (lineType == \'kv\')}}\n {{key}}: {{value}}\n {{/if}}\n
      '},function(e,t){e.exports='\n {{key}}: {{value}}\n'},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,factory=function(_exports,_query,tool,_log,_tabbox_default,_item_code){"use strict";function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelper(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n-1||(keyTypes[winKeys[i]]=_typeof(window[winKeys[i]]));var cacheObj={},ID_REGEX=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/,retrievePrecedingIdentifier=function(e,t,n){n=n||ID_REGEX;for(var o=[],r=t-1;r>=0&&n.test(e[r]);r--)o.push(e[r]);if(0==o.length){n=/\./;for(var i=t-1;i>=0&&n.test(e[i]);i--)o.push(e[i])}if(0===o.length){var a=e.match(/[\(\)\[\]\{\}]/gi)||[];return a[a.length-1]}return o.reverse().join("")},moveCursorToPos=function(e,t){e.setSelectionRange&&e.setSelectionRange(t,t)},$input=_query.default.one(".vc-cmd-input");_query.default.bind($input,"keyup",(function(e){var isDeleteKeyCode=8===e.keyCode||46===e.keyCode,$prompted=_query.default.one(".vc-cmd-prompted");$prompted.style.display="none",$prompted.innerHTML="";var tempValue=this.value,value=retrievePrecedingIdentifier(this.value,this.value.length);if(value&&value.length>0){if(/\(/.test(value)&&!isDeleteKeyCode)return $input.value+=")",void moveCursorToPos($input,$input.value.length-1);if(/\[/.test(value)&&!isDeleteKeyCode)return $input.value+="]",void moveCursorToPos($input,$input.value.length-1);if(/\{/.test(value)&&!isDeleteKeyCode)return $input.value+="}",void moveCursorToPos($input,$input.value.length-1);if("."===value){var key=retrievePrecedingIdentifier(tempValue,tempValue.length-1);if(!cacheObj[key])try{cacheObj[key]=Object.getOwnPropertyNames(eval("("+key+")")).sort()}catch(e){}try{for(var _i3=0;_i3=0){var _$li=document.createElement("li");_$li.innerHTML=winKeys[_i4],_$li.onclick=function(){$input.value="",$input.value=this.innerHTML,"function"==keyTypes[this.innerHTML]&&($input.value+="()"),$prompted.style.display="none"},$prompted.appendChild(_$li)}}else{var arr=value.split(".");if(cacheObj[arr[0]]){cacheObj[arr[0]].sort();for(var _i5=0;_i5=0&&(_$li2.innerHTML=_key3,_$li2.onclick=function(){$input.value="",$input.value=tempValue+this.innerHTML,$prompted.style.display="none"},$prompted.appendChild(_$li2))}}}if($prompted.children.length>0){var m=Math.min(200,31*$prompted.children.length);$prompted.style.display="block",$prompted.style.height=m+"px",$prompted.style.marginTop=-m+"px"}}else $prompted.style.display="none"})),_query.default.bind(_query.default.one(".vc-cmd",this.$tabbox),"submit",(function(e){e.preventDefault();var t=_query.default.one(".vc-cmd-input",e.target),n=t.value;t.value="",""!==n&&that.evalCommand(n);var o=_query.default.one(".vc-cmd-prompted");o&&(o.style.display="none")})),_query.default.bind(_query.default.one(".vc-cmd.vc-filter",this.$tabbox),"submit",(function(e){e.preventDefault();var t=_query.default.one(".vc-cmd.vc-filter .vc-cmd-input",e.target);filterText=t.value,_query.default.all(".vc-log>.vc-item").forEach((function(e){checkFilterInLine(e)?_query.default.addClass(e,"hide"):_query.default.removeClass(e,"hide")}))}));var code="";code+="if (!!window) {",code+="window.__vConsole_cmd_result = undefined;",code+="window.__vConsole_cmd_error = false;",code+="}";var scriptList=document.getElementsByTagName("script"),nonce="",_iterator=_createForOfIteratorHelper(scriptList),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _script=_step.value;if(_script.nonce){nonce=_script.nonce;break}}}catch(e){_iterator.e(e)}finally{_iterator.f()}var script=document.createElement("SCRIPT");script.innerHTML=code,script.setAttribute("nonce",nonce),document.documentElement.appendChild(script),document.documentElement.removeChild(script)}},{key:"mockConsole",value:function(){_get(_getPrototypeOf(VConsoleDefaultTab.prototype),"mockConsole",this).call(this);var e=this;tool.isFunction(window.onerror)&&(this.windowOnError=window.onerror),window.onerror=function(t,n,o,r,i){var a=t;n&&(a+="\n"+n.replace(location.origin,"")),(o||r)&&(a+=":"+o+":"+r);var l=!!i&&!!i.stack&&i.stack.toString()||"";e.printLog({logType:"error",logs:[a,l],noOrigin:!0}),tool.isFunction(e.windowOnError)&&e.windowOnError.call(window,t,n,o,r,i)}}},{key:"evalCommand",value:function(e){this.printLog({logType:"log",content:_query.default.render(_item_code.default,{content:e,type:"input"}),style:""});var t,n=void 0;try{n=eval.call(window,"("+e+")")}catch(t){try{n=eval.call(window,e)}catch(e){}}tool.isArray(n)||tool.isObject(n)?t=this.getFoldedLine(n):(tool.isNull(n)?n="null":tool.isUndefined(n)?n="undefined":tool.isFunction(n)?n="function()":tool.isString(n)&&(n='"'+n+'"'),t=_query.default.render(_item_code.default,{content:n,type:"output"})),this.printLog({logType:"log",content:t,style:""}),window.winKeys=Object.getOwnPropertyNames(window).sort()}}]),VConsoleDefaultTab}(_log.default),_default=VConsoleDefaultTab;_exports.default=_default,module.exports=exports.default},__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(1),__webpack_require__(0),__webpack_require__(3),__webpack_require__(22),__webpack_require__(23)],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t){e.exports='
      \n
      \n
      \n \n
        \n
        \n \n
        \n
        \n
        \n \n
          \n
          \n \n
          \n
          \n
          \n'},function(e,t){e.exports='
          {{content}}
          '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(3),n(25)],void 0===(i="function"==typeof(o=function(n,o,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n\n
          \n'},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(1),n(0),n(2),n(27),n(28),n(29)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c,s){"use strict";function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=t.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)})),e.reqList)e.updateRequest(n,{})}},{key:"onRemove",value:function(){window.XMLHttpRequest&&(window.XMLHttpRequest.prototype.open=this._open,window.XMLHttpRequest.prototype.send=this._send,window.XMLHttpRequest.prototype.setRequestHeader=this._setRequestHeader,this._open=void 0,this._send=void 0,this._setRequestHeader=void 0)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.scrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=o.default.one(".vc-content");e.scrollTop=e.scrollHeight-e.offsetHeight}},{key:"clearLog",value:function(){for(var e in this.reqList={},this.domList)this.domList[e].parentNode.removeChild(this.domList[e]),this.domList[e]=void 0;this.domList={},this.renderHeader()}},{key:"renderHeader",value:function(){var e=Object.keys(this.reqList).length,t=o.default.render(c.default,{count:e}),n=o.default.one(".vc-log",this.$tabbox);this.$header?this.$header.parentNode.replaceChild(t,this.$header):n.parentNode.insertBefore(t,n),this.$header=t}},{key:"updateRequest",value:function(e,t){var n=Object.keys(this.reqList).length,i=this.reqList[e]||{};for(var a in t)i[a]=t[a];if(this.reqList[e]=i,this.isReady){var l={id:e,name:i.name,url:i.url,status:i.status,method:i.method||"-",costTime:i.costTime>0?i.costTime+"ms":"-",header:i.header||null,requestHeader:i.requestHeader||null,getData:i.getData||null,postData:i.postData||null,response:null,actived:!!i.actived};switch(i.responseType){case"":case"text":if(r.isString(i.response))try{l.response=JSON.parse(i.response),l.response=JSON.stringify(l.response,null,1),l.response=r.htmlEncode(l.response)}catch(e){l.response=r.htmlEncode(i.response)}else void 0!==i.response&&(l.response=Object.prototype.toString.call(i.response));break;case"json":void 0!==i.response&&(l.response=JSON.stringify(i.response,null,1),l.response=r.htmlEncode(l.response));break;case"blob":case"document":case"arraybuffer":default:void 0!==i.response&&(l.response=Object.prototype.toString.call(i.response))}0==i.readyState||1==i.readyState?l.status="Pending":2==i.readyState||3==i.readyState?l.status="Loading":4==i.readyState||(l.status="Unknown");var c=o.default.render(s.default,l),u=this.domList[e];i.status>=400&&o.default.addClass(o.default.one(".vc-group-preview",c),"vc-table-row-error"),u?u.parentNode.replaceChild(c,u):o.default.one(".vc-log",this.$tabbox).insertAdjacentElement("beforeend",c),this.domList[e]=c,Object.keys(this.reqList).length!=n&&this.renderHeader(),this.isInBottom&&this.scrollToBottom()}}},{key:"mockAjax",value:function(){if(window.XMLHttpRequest){var e=this,t=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send,o=window.XMLHttpRequest.prototype.setRequestHeader;e._open=t,e._send=n,e._setRequestHeader=o,window.XMLHttpRequest.prototype.open=function(){var n=this,o=[].slice.call(arguments),r=o[0],i=o[1],a=e.getUniqueID(),l=null;n._requestID=a,n._method=r,n._url=i;var c=n.onreadystatechange||function(){},s=function(){var t=e.reqList[a]||{};if(t.readyState=n.readyState,t.status=0,n.readyState>1&&(t.status=n.status),t.responseType=n.responseType,0==n.readyState)t.startTime||(t.startTime=+new Date);else if(1==n.readyState)t.startTime||(t.startTime=+new Date);else if(2==n.readyState){t.header={};for(var o=n.getAllResponseHeaders()||"",r=o.split("\n"),i=0;i0){a.name+="?"+l,a.getData={};var c,s=f(l=(l=l.join("?")).split("&"));try{for(s.s();!(c=s.n()).done;){var u=c.value;u=u.split("="),a.getData[u[0]]=decodeURIComponent(u[1])}}catch(e){s.e(e)}finally{s.f()}}if("POST"==a.method)if(r.isString(i)){var d=i.split("&");a.postData={};var v,p=f(d);try{for(p.s();!(v=p.n()).done;){var b=v.value;b=b.split("="),a.postData[b[0]]=b[1]}}catch(e){p.e(e)}finally{p.f()}}else r.isPlainObject(i)?a.postData=i:a.postData="[object Object]";return t._noVConsole||e.updateRequest(t._requestID,a),n.apply(t,o)}}}},{key:"mockFetch",value:function(){var e=window.fetch;if(e){var t=this;window.fetch=function(n,o){var i=t.getUniqueID();t.reqList[i]={};var a=t.reqList[i]||{},l=[],c="",s="GET",u=null;if(r.isString(n)?(s=o.method||"GET",c=n,u=o.headers):(s=n.method||"GET",c=n.url,u=n.headers),l=c.split("?"),a.id=i,a.method=s,a.requestHeader=u,a.url=c,a.name=l.shift()||"",a.name=a.name.replace(new RegExp("[/]*$"),"").split("/").pop()||"",l.length>0){a.name+="?"+l,a.getData={};var d,v=f(l=(l=l.join("?")).split("&"));try{for(v.s();!(d=v.n()).done;){var p=d.value;p=p.split("="),a.getData[p[0]]=p[1]}}catch(e){v.e(e)}finally{v.f()}}if("POST"===a.method)if(r.isString(n))if(r.isString(o.body)){var b=o.body.split("&");a.postData={};var h,m=f(b);try{for(m.s();!(h=m.n()).done;){var g=h.value;g=g.split("="),a.postData[g[0]]=g[1]}}catch(e){m.e(e)}finally{m.f()}}else r.isPlainObject(o.body)?a.postData=o.body:a.postData="[object Object]";else a.postData="[object Object]";return a.startTime||(a.startTime=+new Date),e(c,o).then((function(e){return e.clone().json().then((function(t){a.endTime=+new Date,a.costTime=a.endTime-(a.startTime||a.endTime),a.status=e.status,a.header={};var n,o=f(e.headers.entries());try{for(o.s();!(n=o.n()).done;){var r=n.value;a.header[r[0]]=r[1]}}catch(e){o.e(e)}finally{o.f()}a.response=t,a.readyState=4;var i=e.headers.get("content-type");return a.responseType=i.includes("application/json")?"json":i.includes("text/html")?"text":"",t})),t.updateRequest(i,a),e}))}}}},{key:"getUniqueID",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}}])&&b(t.prototype,n),i&&b(t,i),u}(i.default);n.default=_,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports='
          \n
          \n
          '},function(e,t){e.exports='
          \n
          Name {{if (count > 0)}}({{count}}){{/if}}
          \n
          Method
          \n
          Status
          \n
          Time
          \n
          '},function(e,t){e.exports='
          \n
          \n
          {{name}}
          \n
          {{method}}
          \n
          {{status}}
          \n
          {{costTime}}
          \n
          \n
          \n
          \n
          \n
          General
          \n
          \n
          \n
          URL
          \n
          {{url}}
          \n
          \n
          \n
          Method
          \n
          {{method}}
          \n
          \n
          \n {{if (header !== null)}}\n
          \n
          \n
          Response Headers
          \n
          \n {{for (var key in header)}}\n
          \n
          {{key}}
          \n
          {{header[key]}}
          \n
          \n {{/for}}\n
          \n {{/if}}\n {{if (requestHeader !== null)}}\n
          \n
          \n
          Request Headers
          \n
          \n {{for (var key in requestHeader)}}\n
          \n
          {{key}}
          \n
          {{requestHeader[key]}}
          \n
          \n {{/for}}\n
          \n {{/if}}\n {{if (getData !== null)}}\n
          \n
          \n
          Query String Parameters
          \n
          \n {{for (var key in getData)}}\n
          \n
          {{key}}
          \n
          {{getData[key]}}
          \n
          \n {{/for}}\n
          \n {{/if}}\n {{if (postData !== null)}}\n
          \n
          \n
          Request Payload
          \n
          \n {{if (typeof postData === \'string\')}}\n
          \n
          {{postData}}
          \n
          \n {{else}}\n {{for (var key in postData)}}\n
          \n
          {{key}}
          \n
          {{postData[key]}}
          \n
          \n {{/for}}\n {{/if}}\n
          \n {{/if}}\n
          \n
          \n
          Response
          \n
          \n
          \n
          {{response || \'\'}}
          \n
          \n
          \n
          \n
          '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(31),n(32),n(2),n(34),n(35),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c,s,u){"use strict";function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n0&&this.onChildRemove(e),e.addedNodes.length>0&&this.onChildAdd(e);break;case"attributes":this.onAttributesChange(e);break;case"characterData":this.onCharacterDataChange(e)}}},{key:"onChildRemove",value:function(e){var t=e.target;if(t.__vconsole_node){for(var n=0;n0||(e.childNodes[r]?o.renderView(e.childNodes[r],a,"replace"):a.style.display="none"))}}})),n){case"replace":t.parentNode.replaceChild(r,t);break;case"insertBefore":t.parentNode.insertBefore(r,t);break;default:t.appendChild(r)}return r}},{key:"getNode",value:function(e){if(!this._isIgnoredElement(e)){var t=e.__vconsole_node||{};if(t.nodeType=e.nodeType,t.nodeName=e.nodeName,t.tagName=e.tagName||"",t.textContent="",t.nodeType!=e.TEXT_NODE&&t.nodeType!=e.DOCUMENT_TYPE_NODE||(t.textContent=e.textContent),t.id=e.id||"",t.className=e.className||"",t.attributes=[],e.hasAttributes&&e.hasAttributes())for(var n=0;n0)for(var o=0;o>>0)+i+++"__"}).prototype={set:function(e,t){var n=e[this.name];return n&&n[0]===e?n[1]=t:r(e,this.name,{value:[e,t],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},delete:function(e){var t=e[this.name];if(!t)return!1;var n=t[0]===e;return t[0]=t[1]=void 0,n},has:function(e){var t=e[this.name];return!!t&&t[0]===e}}}var a=new o,l=window.msSetImmediate;if(!l){var c=[],s=String(Math.random());window.addEventListener("message",(function(e){if(e.data===s){var t=c;c=[],t.forEach((function(e){e()}))}})),l=function(e){c.push(e),window.postMessage(s,"*")}}var u=!1,d=[];function f(){u=!1;var e=d;d=[],e.sort((function(e,t){return e.uid_-t.uid_}));var t=!1;e.forEach((function(e){var n=e.takeRecords();!function(e){e.nodes_.forEach((function(t){var n=a.get(t);n&&n.forEach((function(t){t.observer===e&&t.removeTransientObservers()}))}))}(e),n.length&&(e.callback_(n,e),t=!0)})),t&&f()}function v(e,t){for(var n=e;n;n=n.parentNode){var o=a.get(n);if(o)for(var r=0;r0){var r=w(n[o-1],e);if(r)return void(n[o-1]=r)}else t=this.observer,d.push(t),u||(u=!0,l(f));n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=a.get(e);t||a.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach((function(e){this.removeListeners_(e);for(var t=a.get(e),n=0;n .vcelm-node {\n display: block;\n}\n.vcelm-l .vcelm-node:active {\n background-color: var(--VC-BG-COLOR-ACTIVE);\n}\n.vcelm-l.vcelm-noc .vcelm-node:active {\n background-color: transparent;\n}\n.vcelm-t {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n/* level */\n.vcelm-l .vcelm-l {\n display: none;\n}\n.vcelm-l.vc-toggle > .vcelm-l {\n margin-left: 4px;\n display: block;\n}\n/* arrow */\n.vcelm-l:before {\n content: "";\n display: block;\n position: absolute;\n top: 6px;\n left: 3px;\n width: 0;\n height: 0;\n border: transparent solid 3px;\n border-left-color: var(--VC-FG-1);\n}\n.vcelm-l.vc-toggle:before {\n display: block;\n top: 6px;\n left: 0;\n border-top-color: var(--VC-FG-1);\n border-left-color: transparent;\n}\n.vcelm-l.vcelm-noc:before {\n display: none;\n}\n',""]),e.exports=t},function(e,t){e.exports='
          \n
          \n
          '},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(36),n(37),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l){"use strict";function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n-1),a=i;0==e.childNodes.length&&(a=!0);var c=l.default.render(o.default,{node:e}),s=l.default.render(r.default,{node:e});if(a)l.default.addClass(t,"vcelm-noc"),t.appendChild(c),i||t.appendChild(s);else{t.appendChild(c);for(var u=0;u<{{node.tagName.toLowerCase()}}{{if (node.className || node.attributes.length)}}\n \n {{for (var i = 0; i < node.attributes.length; i++)}}\n {{if (node.attributes[i].value !== \'\')}}\n {{node.attributes[i].name}}="{{node.attributes[i].value}}"{{else}}\n {{node.attributes[i].name}}{{/if}}{{/for}}{{/if}}>
          '},function(e,t){e.exports='</{{node.tagName.toLowerCase()}}>'},function(e,t,n){var o,r,i;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(39),n(40),n(0),n(1)],void 0===(i="function"==typeof(o=function(n,o,r,i,l,c){"use strict";function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n\n
          \n'},function(e,t){e.exports='
          \n
          \n
          Name
          \n
          Value
          \n
          \n {{for (var i = 0; i < list.length; i++)}}\n
          \n
          {{list[i].name}}
          \n
          {{list[i].value}}
          \n
          \n {{/for}}\n
          '}])})); \ No newline at end of file diff --git a/package.json b/package.json index 3a043611..48c2968b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vconsole", - "version": "3.4.0-alpha", + "version": "3.4.0", "description": "A lightweight, extendable front-end developer tool for mobile web page.", "homepage": "https://github.com/Tencent/vConsole", "main": "dist/vconsole.min.js",